Curl_altsvc_init:
  319|  10.0k|{
  320|  10.0k|  struct altsvcinfo *asi = curlx_calloc(1, sizeof(struct altsvcinfo));
  ------------------
  |  | 1480|  10.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  321|  10.0k|  if(!asi)
  ------------------
  |  Branch (321:6): [True: 0, False: 10.0k]
  ------------------
  322|      0|    return NULL;
  323|  10.0k|  Curl_llist_init(&asi->list, NULL);
  324|       |
  325|       |  /* set default behavior */
  326|  10.0k|  asi->flags = CURLALTSVC_H1
  ------------------
  |  | 1035|  10.0k|#define CURLALTSVC_H1           (1L << 3)
  ------------------
  327|  10.0k|#ifdef USE_HTTP2
  328|  10.0k|    | CURLALTSVC_H2
  ------------------
  |  | 1036|  10.0k|#define CURLALTSVC_H2           (1L << 4)
  ------------------
  329|  10.0k|#endif
  330|       |#ifdef USE_HTTP3
  331|       |    | CURLALTSVC_H3
  332|       |#endif
  333|  10.0k|    ;
  334|  10.0k|  return asi;
  335|  10.0k|}
Curl_altsvc_load:
  341|  10.0k|{
  342|  10.0k|  DEBUGASSERT(asi);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (342:3): [True: 0, False: 10.0k]
  |  Branch (342:3): [True: 10.0k, False: 0]
  ------------------
  343|  10.0k|  return altsvc_load(asi, file);
  344|  10.0k|}
Curl_altsvc_ctrl:
  350|     37|{
  351|     37|  DEBUGASSERT(data);
  ------------------
  |  | 1081|     37|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (351:3): [True: 0, False: 37]
  |  Branch (351:3): [True: 37, False: 0]
  ------------------
  352|     37|  if(!ctrl)
  ------------------
  |  Branch (352:6): [True: 1, False: 36]
  ------------------
  353|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  354|       |
  355|     36|  if(!data->asi) {
  ------------------
  |  Branch (355:6): [True: 36, False: 0]
  ------------------
  356|     36|    data->asi = Curl_altsvc_init();
  357|     36|    if(!data->asi)
  ------------------
  |  Branch (357:8): [True: 0, False: 36]
  ------------------
  358|      0|      return CURLE_OUT_OF_MEMORY;
  359|     36|  }
  360|     36|  data->asi->flags = ctrl;
  361|     36|  return CURLE_OK;
  362|     36|}
Curl_altsvc_cleanup:
  369|  22.4k|{
  370|  22.4k|  if(*asi) {
  ------------------
  |  Branch (370:6): [True: 10.0k, False: 12.3k]
  ------------------
  371|  10.0k|    struct Curl_llist_node *e;
  372|  10.0k|    struct Curl_llist_node *n;
  373|  10.0k|    struct altsvcinfo *altsvc = *asi;
  374|  10.0k|    for(e = Curl_llist_head(&altsvc->list); e; e = n) {
  ------------------
  |  Branch (374:45): [True: 0, False: 10.0k]
  ------------------
  375|      0|      struct altsvc *as = Curl_node_elem(e);
  376|      0|      n = Curl_node_next(e);
  377|      0|      altsvc_free(as);
  ------------------
  |  |   81|      0|#define altsvc_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  378|      0|    }
  379|  10.0k|    curlx_free(altsvc->filename);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  380|  10.0k|    curlx_free(altsvc);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  381|       |    *asi = NULL; /* clear the pointer */
  382|  10.0k|  }
  383|  22.4k|}
Curl_altsvc_save:
  390|  22.4k|{
  391|  22.4k|  CURLcode result = CURLE_OK;
  392|  22.4k|  FILE *out;
  393|  22.4k|  char *tempstore = NULL;
  394|       |
  395|  22.4k|  if(!asi)
  ------------------
  |  Branch (395:6): [True: 12.3k, False: 10.0k]
  ------------------
  396|       |    /* no cache activated */
  397|  12.3k|    return CURLE_OK;
  398|       |
  399|       |  /* if not new name is given, use the one we stored from the load */
  400|  10.0k|  if(!file && asi->filename)
  ------------------
  |  Branch (400:6): [True: 5, False: 10.0k]
  |  Branch (400:15): [True: 0, False: 5]
  ------------------
  401|      0|    file = asi->filename;
  402|       |
  403|  10.0k|  if((asi->flags & CURLALTSVC_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1034|  10.0k|#define CURLALTSVC_READONLYFILE (1L << 2)
  ------------------
  |  Branch (403:6): [True: 21, False: 10.0k]
  |  Branch (403:48): [True: 4, False: 10.0k]
  |  Branch (403:57): [True: 0, False: 10.0k]
  ------------------
  404|       |    /* marked as read-only, no file or zero length filename */
  405|     25|    return CURLE_OK;
  406|       |
  407|  10.0k|  result = Curl_fopen(data, file, &out, &tempstore);
  408|  10.0k|  if(!result) {
  ------------------
  |  Branch (408:6): [True: 10.0k, False: 0]
  ------------------
  409|  10.0k|    struct Curl_llist_node *e;
  410|  10.0k|    struct Curl_llist_node *n;
  411|  10.0k|    fputs("# Your alt-svc cache. https://curl.se/docs/alt-svc.html\n"
  412|  10.0k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  413|  10.0k|          out);
  414|  10.0k|    for(e = Curl_llist_head(&asi->list); e; e = n) {
  ------------------
  |  Branch (414:42): [True: 0, False: 10.0k]
  ------------------
  415|      0|      struct altsvc *as = Curl_node_elem(e);
  416|      0|      n = Curl_node_next(e);
  417|      0|      result = altsvc_out(as, out);
  418|      0|      if(result)
  ------------------
  |  Branch (418:10): [True: 0, False: 0]
  ------------------
  419|      0|        break;
  420|      0|    }
  421|  10.0k|    curlx_fclose(out);
  ------------------
  |  |   79|  10.0k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  422|  10.0k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (422:8): [True: 10.0k, False: 0]
  |  Branch (422:19): [True: 0, False: 10.0k]
  |  Branch (422:32): [True: 0, False: 0]
  ------------------
  423|      0|      result = CURLE_WRITE_ERROR;
  424|       |
  425|  10.0k|    if(result && tempstore)
  ------------------
  |  Branch (425:8): [True: 0, False: 10.0k]
  |  Branch (425:18): [True: 0, False: 0]
  ------------------
  426|      0|      unlink(tempstore);
  427|  10.0k|  }
  428|  10.0k|  curlx_free(tempstore);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  429|  10.0k|  return result;
  430|  10.0k|}
altsvc.c:altsvc_load:
  232|  10.0k|{
  233|  10.0k|  CURLcode result = CURLE_OK;
  234|  10.0k|  FILE *fp;
  235|       |
  236|       |  /* we need a private copy of the filename so that the altsvc cache file
  237|       |     name survives an easy handle reset */
  238|  10.0k|  curlx_free(asi->filename);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  239|  10.0k|  asi->filename = curlx_strdup(file);
  ------------------
  |  | 1477|  10.0k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  240|  10.0k|  if(!asi->filename)
  ------------------
  |  Branch (240:6): [True: 0, False: 10.0k]
  ------------------
  241|      0|    return CURLE_OUT_OF_MEMORY;
  242|       |
  243|  10.0k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   74|  10.0k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  244|  10.0k|  if(fp) {
  ------------------
  |  Branch (244:6): [True: 10.0k, False: 0]
  ------------------
  245|  10.0k|    curlx_struct_stat stat;
  ------------------
  |  |   63|  10.0k|#define curlx_struct_stat       struct stat
  ------------------
  246|  10.0k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  10.0k|#define curlx_fstat             fstat
  ------------------
  |  Branch (246:8): [True: 0, False: 10.0k]
  |  Branch (246:50): [True: 10.0k, False: 0]
  ------------------
  247|  10.0k|      bool eof = FALSE;
  ------------------
  |  | 1058|  10.0k|#define FALSE false
  ------------------
  248|  10.0k|      struct dynbuf buf;
  249|  10.0k|      curlx_dyn_init(&buf, MAX_ALTSVC_LINE);
  ------------------
  |  |   41|  10.0k|#define MAX_ALTSVC_LINE    4095
  ------------------
  250|  10.0k|      do {
  251|  10.0k|        result = Curl_get_line(&buf, fp, &eof);
  252|  10.0k|        if(!result) {
  ------------------
  |  Branch (252:12): [True: 10.0k, False: 0]
  ------------------
  253|  10.0k|          const char *lineptr = curlx_dyn_ptr(&buf);
  254|  10.0k|          curlx_str_passblanks(&lineptr);
  255|  10.0k|          if(curlx_str_single(&lineptr, '#'))
  ------------------
  |  Branch (255:14): [True: 10.0k, False: 0]
  ------------------
  256|  10.0k|            altsvc_add(asi, lineptr);
  257|  10.0k|        }
  258|  10.0k|      } while(!result && !eof);
  ------------------
  |  Branch (258:15): [True: 10.0k, False: 0]
  |  Branch (258:26): [True: 0, False: 10.0k]
  ------------------
  259|  10.0k|      curlx_dyn_free(&buf); /* free the line buffer */
  260|  10.0k|    }
  261|  10.0k|    curlx_fclose(fp);
  ------------------
  |  |   79|  10.0k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  262|  10.0k|  }
  263|  10.0k|  return result;
  264|  10.0k|}
altsvc.c:altsvc_add:
  163|  10.0k|{
  164|       |  /* Example line:
  165|       |     h2 example.com 443 h3 shiny.example.com 8443 "20191231 10:00:00" 1
  166|       |   */
  167|  10.0k|  struct Curl_str srchost;
  168|  10.0k|  struct Curl_str dsthost;
  169|  10.0k|  struct Curl_str srcalpn;
  170|  10.0k|  struct Curl_str dstalpn;
  171|  10.0k|  struct Curl_str date;
  172|  10.0k|  curl_off_t srcport;
  173|  10.0k|  curl_off_t dstport;
  174|  10.0k|  curl_off_t persist;
  175|  10.0k|  curl_off_t prio;
  176|       |
  177|  10.0k|  if(curlx_str_word(&line, &srcalpn, MAX_ALTSVC_ALPNLEN) ||
  ------------------
  |  |   44|  10.0k|#define MAX_ALTSVC_ALPNLEN 10
  ------------------
  |  Branch (177:6): [True: 0, False: 10.0k]
  ------------------
  178|  10.0k|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (178:6): [True: 10.0k, False: 0]
  ------------------
  179|      0|     curlx_str_word(&line, &srchost, MAX_ALTSVC_HOSTLEN) ||
  ------------------
  |  |   43|      0|#define MAX_ALTSVC_HOSTLEN 2048
  ------------------
  |  Branch (179:6): [True: 0, False: 0]
  ------------------
  180|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (180:6): [True: 0, False: 0]
  ------------------
  181|      0|     curlx_str_number(&line, &srcport, 65535) ||
  ------------------
  |  Branch (181:6): [True: 0, False: 0]
  ------------------
  182|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (182:6): [True: 0, False: 0]
  ------------------
  183|      0|     curlx_str_word(&line, &dstalpn, MAX_ALTSVC_ALPNLEN) ||
  ------------------
  |  |   44|      0|#define MAX_ALTSVC_ALPNLEN 10
  ------------------
  |  Branch (183:6): [True: 0, False: 0]
  ------------------
  184|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (184:6): [True: 0, False: 0]
  ------------------
  185|      0|     curlx_str_word(&line, &dsthost, 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, &dstport, 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_quotedword(&line, &date, MAX_ALTSVC_DATELEN) ||
  ------------------
  |  |   42|      0|#define MAX_ALTSVC_DATELEN 17
  ------------------
  |  Branch (189:6): [True: 0, False: 0]
  ------------------
  190|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (190:6): [True: 0, False: 0]
  ------------------
  191|      0|     curlx_str_number(&line, &persist, 1) ||
  ------------------
  |  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, &prio, 0) ||
  ------------------
  |  Branch (193:6): [True: 0, False: 0]
  ------------------
  194|      0|     curlx_str_newline(&line))
  ------------------
  |  Branch (194:6): [True: 0, False: 0]
  ------------------
  195|  10.0k|    ;
  196|      0|  else {
  197|      0|    char dbuf[MAX_ALTSVC_DATELEN + 1];
  198|      0|    time_t expires = 0;
  199|      0|    time_t now = time(NULL);
  ------------------
  |  |   63|      0|#define time(x) altsvc_debugtime(x)
  ------------------
  200|       |
  201|       |    /* The date parser works on a null-terminated string. The maximum length
  202|       |       is upheld by curlx_str_quotedword(). */
  203|      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)
  ------------------
  204|      0|    dbuf[curlx_strlen(&date)] = 0;
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  205|      0|    Curl_getdate_capped(dbuf, &expires);
  206|       |
  207|      0|    if(now < expires) {
  ------------------
  |  Branch (207:8): [True: 0, False: 0]
  ------------------
  208|      0|      struct altsvc *as = altsvc_create(&srchost, &dsthost, &srcalpn, &dstalpn,
  209|      0|                                        (size_t)srcport, (size_t)dstport);
  210|      0|      if(as) {
  ------------------
  |  Branch (210:10): [True: 0, False: 0]
  ------------------
  211|      0|        as->expires = expires;
  212|      0|        as->persist = persist ? 1 : 0;
  ------------------
  |  Branch (212:23): [True: 0, False: 0]
  ------------------
  213|      0|        altsvc_append(asi, as);
  214|      0|      }
  215|      0|      else
  216|      0|        return CURLE_OUT_OF_MEMORY;
  217|      0|    }
  218|      0|  }
  219|       |
  220|  10.0k|  return CURLE_OK;
  221|  10.0k|}

Curl_async_timeleft_ms:
   60|   178k|{
   61|   178k|  if(async->timeout_ms) {
  ------------------
  |  Branch (61:6): [True: 178k, False: 0]
  ------------------
   62|   178k|    timediff_t elapsed_ms =
   63|   178k|      curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
   64|   178k|    return async->timeout_ms - elapsed_ms;
   65|   178k|  }
   66|      0|  return Curl_timeleft_ms(data);
   67|   178k|}
Curl_async_shutdown:
  210|    833|{
  211|    833|  if(async) {
  ------------------
  |  Branch (211:6): [True: 833, False: 0]
  ------------------
  212|    833|    CURL_TRC_DNS(data, "[%u] shutdown async", async->id);
  ------------------
  |  |  168|    833|  do {                                 \
  |  |  169|    833|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    833|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    833|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.66k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 833, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 833]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.66k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    833|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    833|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    833|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 833]
  |  |  ------------------
  ------------------
  213|    833|    async->shutdown = TRUE;
  ------------------
  |  | 1055|    833|#define TRUE true
  ------------------
  214|       |#ifdef USE_RESOLV_ARES
  215|       |    Curl_async_ares_shutdown(data, async);
  216|       |#endif
  217|    833|#ifdef USE_RESOLV_THREADED
  218|    833|    Curl_async_thrdd_shutdown(data, async);
  219|    833|#endif
  220|    833|#ifndef CURL_DISABLE_DOH
  221|    833|    Curl_doh_cleanup(data, async);
  222|    833|#endif
  223|    833|  }
  224|    833|}
Curl_async_destroy:
  228|    931|{
  229|    931|  if(async) {
  ------------------
  |  Branch (229:6): [True: 931, False: 0]
  ------------------
  230|    931|    CURL_TRC_DNS(data, "[%u] destroy async", async->id);
  ------------------
  |  |  168|    931|  do {                                 \
  |  |  169|    931|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    931|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    931|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.86k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 931, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 931]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.86k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    931|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    931|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    931|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 931]
  |  |  ------------------
  ------------------
  231|    931|    async->shutdown = TRUE;
  ------------------
  |  | 1055|    931|#define TRUE true
  ------------------
  232|       |#ifdef USE_RESOLV_ARES
  233|       |    Curl_async_ares_destroy(data, async);
  234|       |#endif
  235|    931|#ifdef USE_RESOLV_THREADED
  236|    931|    Curl_async_thrdd_destroy(data, async);
  237|    931|#endif
  238|    931|#ifndef CURL_DISABLE_DOH
  239|    931|    Curl_doh_cleanup(data, async);
  240|    931|#endif
  241|       |    curlx_safefree(async);
  ------------------
  |  | 1327|    931|  do {                      \
  |  | 1328|    931|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    931|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    931|    (ptr) = NULL;           \
  |  | 1330|    931|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 931]
  |  |  ------------------
  ------------------
  242|    931|  }
  243|    931|}
Curl_async_failed:
  248|    651|{
  249|    651|  const char *host_or_proxy = "host";
  250|    651|  CURLcode result = CURLE_COULDNT_RESOLVE_HOST;
  251|       |
  252|    651|#ifndef CURL_DISABLE_PROXY
  253|    651|  if(async->for_proxy) {
  ------------------
  |  Branch (253:6): [True: 296, False: 355]
  ------------------
  254|    296|    host_or_proxy = "proxy";
  255|    296|    result = CURLE_COULDNT_RESOLVE_PROXY;
  256|    296|  }
  257|    651|#endif
  258|       |
  259|    651|  failf(data, "Could not resolve %s: %s%s%s%s",
  ------------------
  |  |   62|    651|#define failf Curl_failf
  ------------------
  260|    651|        host_or_proxy, async->hostname,
  261|    651|        detail ? " (" : "", detail ? detail : "", detail ? ")" : "");
  ------------------
  |  Branch (261:9): [True: 0, False: 651]
  |  Branch (261:29): [True: 0, False: 651]
  |  Branch (261:51): [True: 0, False: 651]
  ------------------
  262|    651|  return result;
  263|    651|}

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:
  256|  1.28k|{
  257|  1.28k|  Curl_async_thrdd_destroy(data, async);
  258|  1.28k|}
Curl_async_thrdd_destroy:
  274|  2.21k|{
  275|  2.21k|  (void)data;
  276|  2.21k|  if(async->queries_ongoing && !async->done &&
  ------------------
  |  Branch (276:6): [True: 194, False: 2.02k]
  |  Branch (276:32): [True: 194, False: 0]
  ------------------
  277|    194|     data->multi && data->multi->resolv_thrdq) {
  ------------------
  |  Branch (277:6): [True: 97, False: 97]
  |  Branch (277:21): [True: 97, False: 0]
  ------------------
  278|       |    /* Remove any resolve items still queued */
  279|     97|    struct async_thrdd_match_ctx mctx;
  280|     97|    mctx.mid = data->mid;
  281|     97|    mctx.resolv_id = async->id;
  282|     97|    Curl_thrdq_clear(data->multi->resolv_thrdq,
  283|     97|                     async_thrdd_match_item, &mctx);
  284|     97|  }
  285|       |#ifdef USE_HTTPSRR_ARES
  286|       |  if(async->thrdd.rr.channel) {
  287|       |    ares_destroy(async->thrdd.rr.channel);
  288|       |    async->thrdd.rr.channel = NULL;
  289|       |  }
  290|       |  Curl_httpsrr_cleanup(&async->thrdd.rr.hinfo);
  291|       |#endif
  292|  2.21k|  async_thrdd_item_destroy(async->thrdd.res_A);
  293|  2.21k|  async->thrdd.res_A = NULL;
  294|  2.21k|  async_thrdd_item_destroy(async->thrdd.res_AAAA);
  295|       |  async->thrdd.res_AAAA = NULL;
  296|  2.21k|}
Curl_async_await:
  304|     88|{
  305|     88|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  306|     88|  struct async_thrdd_ctx *thrdd = async ? &async->thrdd : NULL;
  ------------------
  |  Branch (306:35): [True: 88, False: 0]
  ------------------
  307|     88|  timediff_t milli, ms;
  308|       |
  309|     88|  if(!thrdd)
  ------------------
  |  Branch (309:6): [True: 0, False: 88]
  ------------------
  310|      0|    return CURLE_FAILED_INIT;
  311|       |
  312|   324k|  while(async->queries_ongoing && !async->done) {
  ------------------
  |  Branch (312:9): [True: 324k, False: 0]
  |  Branch (312:35): [True: 324k, False: 0]
  ------------------
  313|   324k|    Curl_async_thrdd_multi_process(data->multi);
  314|   324k|    if(async->done)
  ------------------
  |  Branch (314:8): [True: 88, False: 324k]
  ------------------
  315|     88|      break;
  316|       |
  317|   324k|    ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  318|   324k|    if(ms < 3)
  ------------------
  |  Branch (318:8): [True: 324k, False: 50]
  ------------------
  319|   324k|      milli = 0;
  320|     50|    else if(ms <= 50)
  ------------------
  |  Branch (320:13): [True: 45, False: 5]
  ------------------
  321|     45|      milli = ms / 3;
  322|      5|    else if(ms <= 250)
  ------------------
  |  Branch (322:13): [True: 4, False: 1]
  ------------------
  323|      4|      milli = 50;
  324|      1|    else
  325|      1|      milli = 200;
  326|   324k|    CURL_TRC_DNS(data, "await, waiting %" FMT_TIMEDIFF_T "ms", milli);
  ------------------
  |  |  168|   324k|  do {                                 \
  |  |  169|   324k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|   324k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   324k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|   648k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 324k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 324k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|   648k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   324k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|   324k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|   324k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 324k]
  |  |  ------------------
  ------------------
  327|   324k|    curlx_wait_ms(milli);
  328|   324k|  }
  329|     88|  return Curl_async_take_result(data, async, pdns);
  330|     88|}
Curl_async_thrdd_multi_init:
  439|  10.0k|{
  440|  10.0k|  CURLcode result;
  441|  10.0k|  DEBUGASSERT(!multi->resolv_thrdq);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (441:3): [True: 0, False: 10.0k]
  |  Branch (441:3): [True: 10.0k, False: 0]
  ------------------
  442|  10.0k|  result = Curl_thrdq_create(&multi->resolv_thrdq, "DNS", 0,
  443|  10.0k|                             min_threads, max_threads, idle_time_ms,
  444|  10.0k|                             async_thrdd_item_free,
  445|  10.0k|                             async_thrdd_item_process,
  446|  10.0k|                             async_thrdd_event,
  447|  10.0k|                             multi);
  448|  10.0k|#ifdef DEBUGBUILD
  449|  10.0k|  if(!result) {
  ------------------
  |  Branch (449:6): [True: 10.0k, False: 0]
  ------------------
  450|  10.0k|    const char *p = getenv("CURL_DBG_RESOLV_MAX_THREADS");
  451|  10.0k|    if(p) {
  ------------------
  |  Branch (451:8): [True: 0, False: 10.0k]
  ------------------
  452|      0|      curl_off_t l;
  453|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (453:10): [True: 0, False: 0]
  ------------------
  454|      0|        result = Curl_async_thrdd_multi_set_props(
  455|      0|          multi, min_threads, (uint32_t)l, idle_time_ms);
  456|      0|      }
  457|      0|    }
  458|  10.0k|  }
  459|  10.0k|#endif
  460|  10.0k|  return result;
  461|  10.0k|}
Curl_async_thrdd_multi_destroy:
  465|  10.0k|{
  466|  10.0k|  if(multi->resolv_thrdq) {
  ------------------
  |  Branch (466:6): [True: 10.0k, False: 0]
  ------------------
  467|  10.0k|#ifdef CURLVERBOSE
  468|  10.0k|    CURL_TRC_DNS(multi->admin, "destroy thread queue+pool, join=%d", join);
  ------------------
  |  |  168|  10.0k|  do {                                 \
  |  |  169|  10.0k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  10.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  20.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  20.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  10.0k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  469|  10.0k|    Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  470|  10.0k|#endif
  471|  10.0k|    Curl_thrdq_destroy(multi->resolv_thrdq, join);
  472|       |    multi->resolv_thrdq = NULL;
  473|  10.0k|  }
  474|  10.0k|}
Curl_async_thrdd_multi_process:
  516|   536k|{
  517|   536k|  struct Curl_easy *data;
  518|   536k|  void *qitem;
  519|       |
  520|   537k|  while(!Curl_thrdq_recv(multi->resolv_thrdq, &qitem)) {
  ------------------
  |  Branch (520:9): [True: 826, False: 536k]
  ------------------
  521|       |    /* dispatch resolve result */
  522|    826|    struct async_thrdd_item *item = qitem;
  523|    826|    struct Curl_resolv_async *async = NULL;
  524|       |
  525|    826|    data = Curl_multi_get_easy(multi, item->mid);
  526|    826|    if(data)
  ------------------
  |  Branch (526:8): [True: 826, False: 0]
  ------------------
  527|    826|      async = Curl_async_get(data, item->resolv_id);
  528|    826|    if(async) {
  ------------------
  |  Branch (528:8): [True: 826, False: 0]
  ------------------
  529|    826|      struct async_thrdd_item **pdest = &async->thrdd.res_A;
  530|       |
  531|    826|      async->dns_responses |= item->dns_queries;
  532|    826|      --async->queries_ongoing;
  533|    826|      async->done = !async->queries_ongoing;
  534|       |
  535|    826|#ifdef CURLRES_IPV6
  536|    826|      if(item->dns_queries & CURL_DNSQ_AAAA)
  ------------------
  |  |   52|    826|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (536:10): [True: 361, False: 465]
  ------------------
  537|    361|        pdest = &async->thrdd.res_AAAA;
  538|    826|#endif
  539|    826|      if(!*pdest) {
  ------------------
  |  Branch (539:10): [True: 826, False: 0]
  ------------------
  540|    826|        VERBOSE(async_thrdd_report_item(data, item));
  ------------------
  |  | 1618|    826|#define VERBOSE(x) x
  ------------------
  541|    826|        *pdest = item;
  542|    826|        item = NULL;
  543|    826|      }
  544|      0|      else
  545|    826|        DEBUGASSERT(0); /* should not receive duplicates here */
  ------------------
  |  | 1081|    826|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (545:9): [Folded, False: 0]
  |  Branch (545:9): [Folded, False: 0]
  ------------------
  546|    826|      Curl_multi_mark_dirty(data);
  547|    826|    }
  548|    826|    async_thrdd_item_free(item);
  549|    826|  }
  550|   536k|#ifdef CURLVERBOSE
  551|   536k|  Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  552|   536k|#endif
  553|   536k|}
Curl_async_getaddrinfo:
  594|    550|{
  595|    550|  CURLcode result = CURLE_FAILED_INIT;
  596|    550|  void *resolver = NULL;
  597|       |
  598|    550|  if(async->queries_ongoing || async->done)
  ------------------
  |  Branch (598:6): [True: 0, False: 550]
  |  Branch (598:32): [True: 0, False: 550]
  ------------------
  599|      0|    return CURLE_FAILED_INIT;
  600|       |
  601|       |#ifdef USE_HTTPSRR_ARES
  602|       |  DEBUGASSERT(!async->thrdd.rr.channel);
  603|       |  if((async->dns_queries & CURL_DNSQ_HTTPS) && !async->is_ipaddr) {
  604|       |    result = async_rr_start(data, async);
  605|       |    if(result)
  606|       |      goto out;
  607|       |    resolver = async->thrdd.rr.channel;
  608|       |  }
  609|       |#endif
  610|       |
  611|    550|  result = Curl_resolv_announce_start(data, resolver);
  612|    550|  if(result)
  ------------------
  |  Branch (612:6): [True: 0, False: 550]
  ------------------
  613|      0|    return result;
  614|       |
  615|    550|#ifdef CURLRES_IPV6
  616|       |  /* Do not start an AAAA query for an ipv4 address when
  617|       |   * we will start an A query for it. */
  618|    550|  if((async->dns_queries & CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|    550|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (618:6): [True: 449, False: 101]
  ------------------
  619|    449|     !(async->is_ipv4addr && (async->dns_queries & CURL_DNSQ_A))) {
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (619:8): [True: 0, False: 449]
  |  Branch (619:30): [True: 0, False: 0]
  ------------------
  620|    449|    result = async_thrdd_query(data, async, CURL_DNSQ_AAAA);
  ------------------
  |  |   52|    449|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  621|    449|    if(result)
  ------------------
  |  Branch (621:8): [True: 0, False: 449]
  ------------------
  622|      0|      goto out;
  623|    449|  }
  624|    550|#endif
  625|    550|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    550|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (625:6): [True: 536, False: 14]
  ------------------
  626|    536|    result = async_thrdd_query(data, async, CURL_DNSQ_A);
  ------------------
  |  |   51|    536|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  627|    536|    if(result)
  ------------------
  |  Branch (627:8): [True: 0, False: 536]
  ------------------
  628|      0|      goto out;
  629|    536|  }
  630|       |
  631|    550|#ifdef CURLVERBOSE
  632|    550|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  633|    550|#endif
  634|       |
  635|    550|out:
  636|    550|  if(result)
  ------------------
  |  Branch (636:6): [True: 0, False: 550]
  ------------------
  637|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  638|    550|                 async->hostname, async->port, result);
  639|    550|  return result;
  640|    550|}
Curl_async_pollset:
  645|   178k|{
  646|   178k|  timediff_t timeout_ms;
  647|       |
  648|   178k|  timeout_ms = Curl_async_timeleft_ms(data, async);
  649|       |#ifdef USE_HTTPSRR_ARES
  650|       |  if(async->thrdd.rr.channel) {
  651|       |    CURLcode result = Curl_ares_pollset(data, async->thrdd.rr.channel, ps);
  652|       |    if(result)
  653|       |      return result;
  654|       |    timeout_ms = Curl_ares_timeout_ms(data, async, async->thrdd.rr.channel);
  655|       |  }
  656|       |#else
  657|   178k|  (void)ps;
  658|   178k|#endif
  659|       |
  660|   178k|  if(!async->done) {
  ------------------
  |  Branch (660:6): [True: 172k, False: 6.33k]
  ------------------
  661|       |#ifndef ENABLE_WAKEUP
  662|       |    timediff_t stutter_ms, elapsed_ms;
  663|       |    elapsed_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  664|       |    if(elapsed_ms < 3)
  665|       |      stutter_ms = 1;
  666|       |    else if(elapsed_ms <= 50)
  667|       |      stutter_ms = elapsed_ms / 3;
  668|       |    else if(elapsed_ms <= 250)
  669|       |      stutter_ms = 50;
  670|       |    else
  671|       |      stutter_ms = 200;
  672|       |    timeout_ms = CURLMIN(stutter_ms, timeout_ms);
  673|       |#endif
  674|   172k|    Curl_expire(data, timeout_ms, EXPIRE_ASYNC_NAME);
  675|   172k|  }
  676|   178k|  return CURLE_OK;
  677|   178k|}
Curl_async_take_result:
  687|   172k|{
  688|   172k|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  689|   172k|  struct Curl_dns_entry *dns = NULL;
  690|   172k|  CURLcode result = CURLE_OK;
  691|       |
  692|   172k|  DEBUGASSERT(pdns);
  ------------------
  |  | 1081|   172k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (692:3): [True: 0, False: 172k]
  |  Branch (692:3): [True: 172k, False: 0]
  ------------------
  693|   172k|  *pdns = NULL;
  694|   172k|  if(!async->queries_ongoing && !async->done) {
  ------------------
  |  Branch (694:6): [True: 453, False: 172k]
  |  Branch (694:33): [True: 0, False: 453]
  ------------------
  695|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (695:5): [Folded, False: 0]
  |  Branch (695:5): [Folded, False: 0]
  ------------------
  696|      0|    return CURLE_FAILED_INIT;
  697|      0|  }
  698|       |
  699|       |#ifdef USE_HTTPSRR_ARES
  700|       |  /* best effort, ignore errors */
  701|       |  if(thrdd->rr.channel)
  702|       |    (void)Curl_ares_perform(thrdd->rr.channel, 0);
  703|       |#endif
  704|       |#ifndef ENABLE_WAKEUP
  705|       |  Curl_async_thrdd_multi_process(data->multi);
  706|       |#endif
  707|       |
  708|   172k|  if(!async->done)
  ------------------
  |  Branch (708:6): [True: 172k, False: 453]
  ------------------
  709|   172k|    return CURLE_AGAIN;
  710|       |
  711|    453|  Curl_expire_done(data, EXPIRE_ASYNC_NAME);
  712|    453|  if(async->result) {
  ------------------
  |  Branch (712:6): [True: 0, False: 453]
  ------------------
  713|      0|    result = async->result;
  714|      0|    goto out;
  715|      0|  }
  716|       |
  717|    453|  if((thrdd->res_A && thrdd->res_A->res) ||
  ------------------
  |  Branch (717:7): [True: 439, False: 14]
  |  Branch (717:23): [True: 217, False: 222]
  ------------------
  718|    236|     (thrdd->res_AAAA && thrdd->res_AAAA->res)) {
  ------------------
  |  Branch (718:7): [True: 156, False: 80]
  |  Branch (718:26): [True: 2, False: 154]
  ------------------
  719|    219|    dns = Curl_dnscache_mk_entry2(
  720|    219|      data, async->dns_queries,
  721|    219|      thrdd->res_A ? &thrdd->res_A->res : NULL,
  ------------------
  |  Branch (721:7): [True: 217, False: 2]
  ------------------
  722|    219|      thrdd->res_AAAA ? &thrdd->res_AAAA->res : NULL,
  ------------------
  |  Branch (722:7): [True: 198, False: 21]
  ------------------
  723|    219|      async->hostname, async->port);
  724|    219|    if(!dns) {
  ------------------
  |  Branch (724:8): [True: 0, False: 219]
  ------------------
  725|      0|      result = CURLE_OUT_OF_MEMORY;
  726|      0|      goto out;
  727|      0|    }
  728|       |
  729|       |#ifdef USE_HTTPSRR_ARES
  730|       |    if(thrdd->rr.channel) {
  731|       |      struct Curl_https_rrinfo *lhrr = NULL;
  732|       |      if(thrdd->rr.hinfo.complete) {
  733|       |        lhrr = Curl_httpsrr_dup_move(&thrdd->rr.hinfo);
  734|       |        if(!lhrr) {
  735|       |          result = CURLE_OUT_OF_MEMORY;
  736|       |          goto out;
  737|       |        }
  738|       |      }
  739|       |      Curl_httpsrr_trace(data, lhrr);
  740|       |      Curl_dns_entry_set_https_rr(dns, lhrr);
  741|       |    }
  742|       |#endif
  743|    219|  }
  744|       |
  745|    453|  if(dns) {
  ------------------
  |  Branch (745:6): [True: 219, False: 234]
  ------------------
  746|    219|    *pdns = dns;
  747|    219|    dns = NULL;
  748|    219|  }
  749|    453|#ifdef CURLVERBOSE
  750|    453|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  751|    453|#endif
  752|       |
  753|    453|out:
  754|    453|  Curl_dns_entry_unlink(data, &dns);
  755|    453|  Curl_async_thrdd_shutdown(data, async);
  756|    453|  if(!result && !*pdns)
  ------------------
  |  Branch (756:6): [True: 453, False: 0]
  |  Branch (756:17): [True: 234, False: 219]
  ------------------
  757|    234|    result = Curl_async_failed(data, async, NULL);
  758|    453|  if(result &&
  ------------------
  |  Branch (758:6): [True: 234, False: 219]
  ------------------
  759|    234|     (result != CURLE_COULDNT_RESOLVE_HOST) &&
  ------------------
  |  Branch (759:6): [True: 31, False: 203]
  ------------------
  760|     31|     (result != CURLE_COULDNT_RESOLVE_PROXY)) {
  ------------------
  |  Branch (760:6): [True: 0, False: 31]
  ------------------
  761|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  762|      0|                 result, async->hostname, async->port);
  763|      0|  }
  764|    453|  return result;
  765|    453|}
Curl_async_get_ai:
  786|   277k|{
  787|   277k|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  788|       |
  789|   277k|  (void)data;
  790|   277k|  switch(ai_family) {
  791|   138k|  case AF_INET:
  ------------------
  |  Branch (791:3): [True: 138k, False: 138k]
  ------------------
  792|   138k|    if(thrdd->res_A)
  ------------------
  |  Branch (792:8): [True: 40.7k, False: 97.8k]
  ------------------
  793|  40.7k|      return async_thrdd_get_ai(thrdd->res_A->res, ai_family, index);
  794|  97.8k|    break;
  795|   138k|  case AF_INET6:
  ------------------
  |  Branch (795:3): [True: 138k, False: 138k]
  ------------------
  796|   138k|    if(thrdd->res_AAAA)
  ------------------
  |  Branch (796:8): [True: 97.8k, False: 40.7k]
  ------------------
  797|  97.8k|      return async_thrdd_get_ai(thrdd->res_AAAA->res, ai_family, index);
  798|  40.7k|    break;
  799|  40.7k|  default:
  ------------------
  |  Branch (799:3): [True: 0, False: 277k]
  ------------------
  800|      0|    break;
  801|   277k|  }
  802|   138k|  return NULL;
  803|   277k|}
asyn-thrdd.c:async_thrdd_item_destroy:
  129|  5.41k|{
  130|  5.41k|  if(item) {
  ------------------
  |  Branch (130:6): [True: 985, False: 4.43k]
  ------------------
  131|    985|    if(item->res)
  ------------------
  |  Branch (131:8): [True: 1, False: 984]
  ------------------
  132|      1|      Curl_freeaddrinfo(item->res);
  133|    985|    curlx_free(item);
  ------------------
  |  | 1483|    985|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  134|    985|  }
  135|  5.41k|}
asyn-thrdd.c:async_thrdd_item_free:
  430|    985|{
  431|    985|  async_thrdd_item_destroy(item);
  432|    985|}
asyn-thrdd.c:async_thrdd_item_process:
  336|    985|{
  337|    985|  struct async_thrdd_item *item = arg;
  338|    985|  struct addrinfo hints;
  339|    985|  char service[12];
  340|    985|  int pf = PF_INET;
  341|    985|  int rc;
  342|       |
  343|    985|#ifdef DEBUGBUILD
  344|    985|  if(item->delay_ms) {
  ------------------
  |  Branch (344:6): [True: 0, False: 985]
  ------------------
  345|      0|    curlx_wait_ms(item->delay_ms);
  346|      0|  }
  347|    985|  if(item->delay_fail_ms) {
  ------------------
  |  Branch (347:6): [True: 0, False: 985]
  ------------------
  348|      0|    curlx_wait_ms(item->delay_fail_ms);
  349|      0|    return;
  350|      0|  }
  351|    985|#endif
  352|       |
  353|    985|  memset(&hints, 0, sizeof(hints));
  354|    985|#ifdef CURLRES_IPV6
  355|    985|  if(item->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    985|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (355:6): [True: 449, False: 536]
  ------------------
  356|    449|    pf = (item->dns_queries & CURL_DNSQ_A) ? PF_UNSPEC : PF_INET6;
  ------------------
  |  |   51|    449|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (356:10): [True: 0, False: 449]
  ------------------
  357|    449|  }
  358|    985|#endif
  359|    985|  hints.ai_family = pf;
  360|    985|  hints.ai_socktype = Curl_socktype_for_transport(item->transport);
  361|    985|  hints.ai_protocol = Curl_protocol_for_transport(item->transport);
  362|       |#ifdef __APPLE__
  363|       |  /* If we leave `ai_flags == 0` then macOS is looking for IPV4MAPPED
  364|       |   * when doing AAAA queries. We do not want this "help". */
  365|       |  hints.ai_flags = AI_ADDRCONFIG;
  366|       |#endif
  367|       |
  368|    985|  curl_msnprintf(service, sizeof(service), "%u", item->port);
  369|    985|#ifdef AI_NUMERICSERV
  370|    985|  hints.ai_flags |= AI_NUMERICSERV;
  371|    985|#endif
  372|       |
  373|    985|  rc = Curl_getaddrinfo_ex(item->hostname, service, &hints, &item->res);
  374|    985|  if(rc) {
  ------------------
  |  Branch (374:6): [True: 765, False: 220]
  ------------------
  375|    765|    item->sock_error = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1095|    765|#define SOCKERRNO         errno
  ------------------
                  item->sock_error = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1095|    765|#define SOCKERRNO         errno
  ------------------
  |  Branch (375:24): [True: 6, False: 759]
  ------------------
  376|    765|    if(item->sock_error == 0)
  ------------------
  |  Branch (376:8): [True: 0, False: 765]
  ------------------
  377|      0|      item->sock_error = RESOLVER_ENOMEM;
  ------------------
  |  |   46|      0|#define RESOLVER_ENOMEM  EAI_MEMORY  /* = WSA_NOT_ENOUGH_MEMORY on Windows */
  ------------------
  378|    765|  }
  379|    220|  else {
  380|    220|    Curl_addrinfo_set_port(item->res, item->port);
  381|    220|  }
  382|    985|}
asyn-thrdd.c:async_thrdd_event:
  414|    826|{
  415|    826|  struct Curl_multi *multi = user_data;
  416|    826|  (void)tqueue;
  417|    826|  switch(ev) {
  418|    826|  case CURL_THRDQ_EV_ITEM_DONE:
  ------------------
  |  Branch (418:3): [True: 826, False: 0]
  ------------------
  419|    826|    (void)curl_multi_wakeup(multi);
  420|    826|    break;
  421|      0|  default:
  ------------------
  |  Branch (421:3): [True: 0, False: 826]
  ------------------
  422|      0|    break;
  423|    826|  }
  424|    826|}
asyn-thrdd.c:async_thrdd_report_item:
  479|    826|{
  480|    826|  char buf[MAX_IPADR_LEN];
  481|    826|  struct dynbuf tmp;
  482|    826|  const char *sep = "";
  483|    826|  const struct Curl_addrinfo *ai = item->res;
  484|    826|  int ai_family = (item->dns_queries & CURL_DNSQ_AAAA) ? AF_INET6 : AF_INET;
  ------------------
  |  |   52|    826|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (484:19): [True: 361, False: 465]
  ------------------
  485|    826|  CURLcode result;
  486|       |
  487|    826|  if(!CURL_TRC_DNS_is_verbose(data))
  ------------------
  |  |  137|    826|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  ------------------
  |  |  |  |  326|    826|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.65k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 826, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 826]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.65k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    826|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  488|    826|    return;
  489|       |
  490|      0|  curlx_dyn_init(&tmp, 1024);
  491|      0|  for(; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (491:9): [True: 0, False: 0]
  ------------------
  492|      0|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (492:8): [True: 0, False: 0]
  ------------------
  493|      0|      Curl_printable_address(ai, buf, sizeof(buf));
  494|      0|      result = curlx_dyn_addf(&tmp, "%s%s", sep, buf);
  495|      0|      if(result) {
  ------------------
  |  Branch (495:10): [True: 0, False: 0]
  ------------------
  496|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  497|      0|        goto out;
  498|      0|      }
  499|      0|      sep = ", ";
  500|      0|    }
  501|      0|  }
  502|       |
  503|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  504|      0|               item->hostname, item->port,
  505|      0|               (item->dns_queries & CURL_DNSQ_AAAA) ? '6' : '4',
  506|      0|               (curlx_dyn_len(&tmp) ? curlx_dyn_ptr(&tmp) : "(none)"));
  507|      0|out:
  508|      0|  curlx_dyn_free(&tmp);
  509|      0|}
asyn-thrdd.c:async_thrdd_query:
  567|    985|{
  568|    985|  struct async_thrdd_item *item;
  569|    985|  CURLcode result;
  570|       |
  571|    985|  item = async_thrdd_item_create(data, async->id, dns_queries,
  572|    985|                                 async->hostname, async->port,
  573|    985|                                 async->transport);
  574|    985|  if(!item) {
  ------------------
  |  Branch (574:6): [True: 0, False: 985]
  ------------------
  575|      0|    result = CURLE_OUT_OF_MEMORY;
  576|      0|    goto out;
  577|      0|  }
  578|    985|  CURL_TRC_DNS(data, "queueing query %s", item->description);
  ------------------
  |  |  168|    985|  do {                                 \
  |  |  169|    985|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    985|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    985|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.97k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 985, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 985]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.97k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    985|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    985|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    985|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 985]
  |  |  ------------------
  ------------------
  579|    985|  result = Curl_thrdq_send(data->multi->resolv_thrdq, item,
  580|    985|                           async_item_description(item), async->timeout_ms);
  ------------------
  |  |  104|    985|#define async_item_description(x)   (x)->description
  ------------------
  581|    985|  if(result)
  ------------------
  |  Branch (581:6): [True: 0, False: 985]
  ------------------
  582|      0|    goto out;
  583|    985|  item = NULL;
  584|    985|  async->queries_ongoing++;
  585|       |
  586|    985|out:
  587|    985|  if(item)
  ------------------
  |  Branch (587:6): [True: 0, False: 985]
  ------------------
  588|      0|    async_thrdd_item_free(item);
  589|    985|  return result;
  590|    985|}
asyn-thrdd.c:async_thrdd_item_create:
  143|    985|{
  144|    985|  size_t hostlen = strlen(hostname);
  145|    985|  struct async_thrdd_item *item;
  146|       |
  147|    985|  item = curlx_calloc(1, sizeof(*item) + hostlen);
  ------------------
  |  | 1480|    985|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  148|    985|  if(!item)
  ------------------
  |  Branch (148:6): [True: 0, False: 985]
  ------------------
  149|      0|    return NULL;
  150|       |
  151|    985|  if(hostlen) /* NUL byte of name already in struct size */
  ------------------
  |  Branch (151:6): [True: 985, False: 0]
  ------------------
  152|    985|    memcpy(item->hostname, hostname, hostlen);
  153|    985|  item->mid = data->mid;
  154|    985|  item->resolv_id = resolv_id;
  155|    985|  item->dns_queries = dns_queries;
  156|    985|  item->port = port;
  157|    985|  item->transport = transport;
  158|       |
  159|    985|#ifdef CURLVERBOSE
  160|    985|  curl_msnprintf(item->description, sizeof(item->description),
  161|    985|                 "[%" FMT_OFF_T "/%u] %s %s:%u",
  162|    985|                 data->id, item->resolv_id,
  163|    985|                 Curl_resolv_query_str(dns_queries),
  164|    985|                 item->hostname, item->port);
  165|    985|#endif
  166|       |
  167|    985|#ifdef DEBUGBUILD
  168|    985|  {
  169|    985|    const char *p = getenv("CURL_DBG_RESOLV_DELAY");
  170|    985|    if(p) {
  ------------------
  |  Branch (170:8): [True: 0, False: 985]
  ------------------
  171|      0|      curl_off_t l;
  172|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (172:10): [True: 0, False: 0]
  ------------------
  173|      0|        item->delay_ms = (uint32_t)l;
  174|      0|      }
  175|      0|    }
  176|    985|    p = getenv("CURL_DBG_RESOLV_FAIL_DELAY");
  177|    985|    if(p) {
  ------------------
  |  Branch (177:8): [True: 0, False: 985]
  ------------------
  178|      0|      curl_off_t l;
  179|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (179:10): [True: 0, False: 0]
  ------------------
  180|      0|        unsigned char c = 0;
  181|      0|        Curl_rand_bytes(data, FALSE, &c, 1);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  182|      0|        item->delay_fail_ms = (uint32_t)l + c;
  183|      0|      }
  184|      0|    }
  185|    985|  }
  186|    985|#endif
  187|       |
  188|    985|  return item;
  189|    985|}
asyn-thrdd.c:async_thrdd_get_ai:
  770|   138k|{
  771|   138k|  unsigned int i = 0;
  772|   138k|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (772:14): [True: 0, False: 138k]
  ------------------
  773|      0|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (773:8): [True: 0, False: 0]
  ------------------
  774|      0|      if(i == index)
  ------------------
  |  Branch (774:10): [True: 0, False: 0]
  ------------------
  775|      0|        return ai;
  776|      0|      ++i;
  777|      0|    }
  778|      0|  }
  779|   138k|  return NULL;
  780|   138k|}

Curl_bufq_init2:
  220|  8.99k|{
  221|       |  bufq_init(q, NULL, chunk_size, max_chunks, opts);
  222|  8.99k|}
Curl_bufq_free:
  236|  8.99k|{
  237|  8.99k|  chunk_list_free(&q->head);
  238|  8.99k|  chunk_list_free(&q->spare);
  239|       |  q->tail = NULL;
  240|  8.99k|  q->chunk_count = 0;
  241|  8.99k|}
Curl_bufq_reset:
  244|    123|{
  245|    123|  struct buf_chunk *chunk;
  246|    123|  while(q->head) {
  ------------------
  |  Branch (246:9): [True: 0, False: 123]
  ------------------
  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|    123|}
Curl_bufq_len:
  256|    407|{
  257|    407|  const struct buf_chunk *chunk = q->head;
  258|    407|  size_t len = 0;
  259|    616|  while(chunk) {
  ------------------
  |  Branch (259:9): [True: 209, False: 407]
  ------------------
  260|    209|    len += chunk_len(chunk);
  261|    209|    chunk = chunk->next;
  262|    209|  }
  263|    407|  return len;
  264|    407|}
Curl_bufq_is_empty:
  267|  1.67k|{
  268|  1.67k|  return !q->head || chunk_is_empty(q->head);
  ------------------
  |  Branch (268:10): [True: 1.57k, False: 99]
  |  Branch (268:22): [True: 0, False: 99]
  ------------------
  269|  1.67k|}
Curl_bufq_write:
  370|    311|{
  371|    311|  struct buf_chunk *tail;
  372|    311|  size_t n;
  373|       |
  374|    311|  DEBUGASSERT(q->max_chunks > 0);
  ------------------
  |  | 1081|    311|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (374:3): [True: 0, False: 311]
  |  Branch (374:3): [True: 311, False: 0]
  ------------------
  375|    311|  *pnwritten = 0;
  376|    622|  while(len) {
  ------------------
  |  Branch (376:9): [True: 311, False: 311]
  ------------------
  377|    311|    tail = get_non_full_tail(q);
  378|    311|    if(!tail) {
  ------------------
  |  Branch (378:8): [True: 0, False: 311]
  ------------------
  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|    311|    n = chunk_append(tail, buf, len);
  385|    311|    if(!n)
  ------------------
  |  Branch (385:8): [True: 0, False: 311]
  ------------------
  386|      0|      break;
  387|    311|    *pnwritten += n;
  388|    311|    buf += n;
  389|    311|    len -= n;
  390|    311|  }
  391|    311|  return (!*pnwritten && len) ? CURLE_AGAIN : CURLE_OK;
  ------------------
  |  Branch (391:11): [True: 0, False: 311]
  |  Branch (391:26): [True: 0, False: 0]
  ------------------
  392|    311|}
Curl_bufq_cwrite:
  397|     35|{
  398|     35|  return Curl_bufq_write(q, (const uint8_t *)buf, len, pnwritten);
  399|     35|}
Curl_bufq_peek:
  425|    245|{
  426|    245|  if(q->head && chunk_is_empty(q->head)) {
  ------------------
  |  Branch (426:6): [True: 146, False: 99]
  |  Branch (426:17): [True: 0, False: 146]
  ------------------
  427|      0|    prune_head(q);
  428|      0|  }
  429|    245|  if(q->head && !chunk_is_empty(q->head)) {
  ------------------
  |  Branch (429:6): [True: 146, False: 99]
  |  Branch (429:17): [True: 146, False: 0]
  ------------------
  430|    146|    chunk_peek(q->head, pbuf, plen);
  431|    146|    return TRUE;
  ------------------
  |  | 1055|    146|#define TRUE true
  ------------------
  432|    146|  }
  433|     99|  *pbuf = NULL;
  434|     99|  *plen = 0;
  435|       |  return FALSE;
  ------------------
  |  | 1058|     99|#define FALSE false
  ------------------
  436|    245|}
Curl_bufq_skip:
  462|    127|{
  463|    127|  size_t n;
  464|       |
  465|    254|  while(amount && q->head) {
  ------------------
  |  Branch (465:9): [True: 127, False: 127]
  |  Branch (465:19): [True: 127, False: 0]
  ------------------
  466|    127|    n = chunk_skip(q->head, amount);
  467|    127|    amount -= n;
  468|    127|    prune_head(q);
  469|    127|  }
  470|    127|}
Curl_bufq_pass:
  474|     99|{
  475|     99|  const uint8_t *buf;
  476|     99|  size_t blen;
  477|     99|  CURLcode result = CURLE_OK;
  478|       |
  479|     99|  *pwritten = 0;
  480|    198|  while(Curl_bufq_peek(q, &buf, &blen)) {
  ------------------
  |  Branch (480:9): [True: 99, False: 99]
  ------------------
  481|     99|    size_t chunk_written;
  482|       |
  483|     99|    result = writer(writer_ctx, buf, blen, &chunk_written);
  484|     99|    if(result) {
  ------------------
  |  Branch (484:8): [True: 0, False: 99]
  ------------------
  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|     99|    if(!chunk_written) {
  ------------------
  |  Branch (491:8): [True: 0, False: 99]
  ------------------
  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|     99|    *pwritten += chunk_written;
  499|     99|    Curl_bufq_skip(q, chunk_written);
  500|     99|  }
  501|     99|  return result;
  502|     99|}
Curl_bufq_sipn:
  556|    155|{
  557|    155|  struct buf_chunk *tail = NULL;
  558|       |
  559|    155|  *pnread = 0;
  560|    155|  tail = get_non_full_tail(q);
  561|    155|  if(!tail) {
  ------------------
  |  Branch (561:6): [True: 0, False: 155]
  ------------------
  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|    155|  return chunk_slurpn(tail, max_len, reader, reader_ctx, pnread);
  569|    155|}
bufq.c:chunk_list_free:
  137|  17.9k|{
  138|  17.9k|  struct buf_chunk *chunk;
  139|  18.1k|  while(*anchor) {
  ------------------
  |  Branch (139:9): [True: 130, False: 17.9k]
  ------------------
  140|    130|    chunk = *anchor;
  141|    130|    *anchor = chunk->next;
  142|    130|    curlx_free(chunk);
  ------------------
  |  | 1483|    130|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  143|    130|  }
  144|  17.9k|}
bufq.c:bufq_init:
  208|  8.99k|{
  209|  8.99k|  DEBUGASSERT(chunk_size > 0);
  ------------------
  |  | 1081|  8.99k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (209:3): [True: 0, False: 8.99k]
  |  Branch (209:3): [True: 8.99k, False: 0]
  ------------------
  210|  8.99k|  DEBUGASSERT(max_chunks > 0);
  ------------------
  |  | 1081|  8.99k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (210:3): [True: 0, False: 8.99k]
  |  Branch (210:3): [True: 8.99k, False: 0]
  ------------------
  211|  8.99k|  memset(q, 0, sizeof(*q));
  212|  8.99k|  q->chunk_size = chunk_size;
  213|  8.99k|  q->max_chunks = max_chunks;
  214|  8.99k|  q->pool = pool;
  215|  8.99k|  q->opts = opts;
  216|  8.99k|}
bufq.c:chunk_len:
   39|    209|{
   40|    209|  return chunk->w_offset - chunk->r_offset;
   41|    209|}
bufq.c:chunk_is_empty:
   29|    518|{
   30|    518|  return chunk->r_offset >= chunk->w_offset;
   31|    518|}
bufq.c:chunk_is_full:
   34|    221|{
   35|    221|  return chunk->w_offset >= chunk->dlen;
   36|    221|}
bufq.c:get_non_full_tail:
  347|    466|{
  348|    466|  struct buf_chunk *chunk;
  349|       |
  350|    466|  if(q->tail && !chunk_is_full(q->tail))
  ------------------
  |  Branch (350:6): [True: 221, False: 245]
  |  Branch (350:17): [True: 221, False: 0]
  ------------------
  351|    221|    return q->tail;
  352|    245|  chunk = get_spare(q);
  353|    245|  if(chunk) {
  ------------------
  |  Branch (353:6): [True: 245, False: 0]
  ------------------
  354|       |    /* new tail, and possibly new head */
  355|    245|    if(q->tail) {
  ------------------
  |  Branch (355:8): [True: 0, False: 245]
  ------------------
  356|      0|      q->tail->next = chunk;
  357|      0|      q->tail = chunk;
  358|      0|    }
  359|    245|    else {
  360|    245|      DEBUGASSERT(!q->head);
  ------------------
  |  | 1081|    245|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (360:7): [True: 0, False: 245]
  |  Branch (360:7): [True: 245, False: 0]
  ------------------
  361|    245|      q->head = q->tail = chunk;
  362|    245|    }
  363|    245|  }
  364|    245|  return chunk;
  365|    245|}
bufq.c:get_spare:
  284|    245|{
  285|    245|  struct buf_chunk *chunk = NULL;
  286|       |
  287|    245|  if(q->spare) {
  ------------------
  |  Branch (287:6): [True: 115, False: 130]
  ------------------
  288|    115|    chunk = q->spare;
  289|    115|    q->spare = chunk->next;
  290|    115|    chunk_reset(chunk);
  291|    115|    return chunk;
  292|    115|  }
  293|       |
  294|    130|  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: 130]
  |  Branch (294:41): [True: 0, False: 0]
  ------------------
  295|      0|    return NULL;
  296|       |
  297|    130|  if(q->pool) {
  ------------------
  |  Branch (297:6): [True: 0, False: 130]
  ------------------
  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|    130|  else {
  304|       |    /* Check for integer overflow before allocation */
  305|    130|    if(q->chunk_size > SIZE_MAX - sizeof(*chunk)) {
  ------------------
  |  Branch (305:8): [True: 0, False: 130]
  ------------------
  306|      0|      return NULL;
  307|      0|    }
  308|       |
  309|    130|    chunk = curlx_calloc(1, sizeof(*chunk) + q->chunk_size);
  ------------------
  |  | 1480|    130|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  310|    130|    if(!chunk)
  ------------------
  |  Branch (310:8): [True: 0, False: 130]
  ------------------
  311|      0|      return NULL;
  312|    130|    chunk->dlen = q->chunk_size;
  313|    130|    ++q->chunk_count;
  314|    130|    return chunk;
  315|    130|  }
  316|    130|}
bufq.c:chunk_reset:
   44|    115|{
   45|       |  chunk->next = NULL;
   46|    115|  chunk->r_offset = chunk->w_offset = 0;
   47|    115|}
bufq.c:chunk_append:
   51|    311|{
   52|    311|  uint8_t *p = &chunk->x.data[chunk->w_offset];
   53|    311|  size_t n = chunk->dlen - chunk->w_offset;
   54|    311|  DEBUGASSERT(chunk->dlen >= chunk->w_offset);
  ------------------
  |  | 1081|    311|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 311]
  |  Branch (54:3): [True: 311, False: 0]
  ------------------
   55|    311|  if(n) {
  ------------------
  |  Branch (55:6): [True: 311, False: 0]
  ------------------
   56|    311|    n = CURLMIN(n, len);
  ------------------
  |  | 1287|    311|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 311]
  |  |  ------------------
  ------------------
   57|    311|    memcpy(p, buf, n);
   58|    311|    chunk->w_offset += n;
   59|    311|  }
   60|    311|  return n;
   61|    311|}
bufq.c:prune_head:
  319|    127|{
  320|    127|  struct buf_chunk *chunk;
  321|       |
  322|    254|  while(q->head && chunk_is_empty(q->head)) {
  ------------------
  |  Branch (322:9): [True: 127, False: 127]
  |  Branch (322:20): [True: 127, False: 0]
  ------------------
  323|    127|    chunk = q->head;
  324|    127|    q->head = chunk->next;
  325|    127|    if(q->tail == chunk)
  ------------------
  |  Branch (325:8): [True: 127, False: 0]
  ------------------
  326|    127|      q->tail = q->head;
  327|    127|    if(q->pool) {
  ------------------
  |  Branch (327:8): [True: 0, False: 127]
  ------------------
  328|      0|      bufcp_put(q->pool, chunk);
  329|      0|      --q->chunk_count;
  330|      0|    }
  331|    127|    else if((q->chunk_count > q->max_chunks) ||
  ------------------
  |  Branch (331:13): [True: 0, False: 127]
  ------------------
  332|    127|            (q->opts & BUFQ_OPT_NO_SPARES)) {
  ------------------
  |  |  115|    127|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  |  Branch (332:13): [True: 0, False: 127]
  ------------------
  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);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  337|      0|      --q->chunk_count;
  338|      0|    }
  339|    127|    else {
  340|    127|      chunk->next = q->spare;
  341|    127|      q->spare = chunk;
  342|    127|    }
  343|    127|  }
  344|    127|}
bufq.c:chunk_peek:
  108|    146|{
  109|    146|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1081|    146|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (109:3): [True: 0, False: 146]
  |  Branch (109:3): [True: 146, False: 0]
  ------------------
  110|    146|  *pbuf = &chunk->x.data[chunk->r_offset];
  111|    146|  *plen = chunk->w_offset - chunk->r_offset;
  112|    146|}
bufq.c:chunk_skip:
  124|    127|{
  125|    127|  size_t n = chunk->w_offset - chunk->r_offset;
  126|    127|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1081|    127|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (126:3): [True: 0, False: 127]
  |  Branch (126:3): [True: 127, False: 0]
  ------------------
  127|    127|  if(n) {
  ------------------
  |  Branch (127:6): [True: 127, False: 0]
  ------------------
  128|    127|    n = CURLMIN(n, amount);
  ------------------
  |  | 1287|    127|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 127]
  |  |  ------------------
  ------------------
  129|    127|    chunk->r_offset += n;
  130|    127|    if(chunk->r_offset == chunk->w_offset)
  ------------------
  |  Branch (130:8): [True: 127, False: 0]
  ------------------
  131|    127|      chunk->r_offset = chunk->w_offset = 0;
  132|    127|  }
  133|    127|  return n;
  134|    127|}
bufq.c:chunk_slurpn:
   87|    155|{
   88|    155|  uint8_t *p = &chunk->x.data[chunk->w_offset];
   89|    155|  size_t n = chunk->dlen - chunk->w_offset; /* free amount */
   90|    155|  CURLcode result;
   91|       |
   92|    155|  *pnread = 0;
   93|    155|  DEBUGASSERT(chunk->dlen >= chunk->w_offset);
  ------------------
  |  | 1081|    155|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 155]
  |  Branch (93:3): [True: 155, False: 0]
  ------------------
   94|    155|  if(!n)
  ------------------
  |  Branch (94:6): [True: 0, False: 155]
  ------------------
   95|      0|    return CURLE_AGAIN;
   96|    155|  if(max_len && n > max_len)
  ------------------
  |  Branch (96:6): [True: 155, False: 0]
  |  Branch (96:17): [True: 155, False: 0]
  ------------------
   97|    155|    n = max_len;
   98|    155|  result = reader(reader_ctx, p, n, pnread);
   99|    155|  if(!result) {
  ------------------
  |  Branch (99:6): [True: 112, False: 43]
  ------------------
  100|    112|    DEBUGASSERT(*pnread <= n);
  ------------------
  |  | 1081|    112|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (100:5): [True: 0, False: 112]
  |  Branch (100:5): [True: 112, False: 0]
  ------------------
  101|    112|    chunk->w_offset += *pnread;
  102|    112|  }
  103|    155|  return result;
  104|    155|}

Curl_bufref_init:
   38|  45.6k|{
   39|  45.6k|  DEBUGASSERT(br);
  ------------------
  |  | 1081|  45.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 45.6k]
  |  Branch (39:3): [True: 45.6k, False: 0]
  ------------------
   40|  45.6k|  br->dtor = NULL;
   41|  45.6k|  br->ptr = NULL;
   42|  45.6k|  br->len = 0;
   43|       |
   44|  45.6k|#ifdef DEBUGBUILD
   45|  45.6k|  br->signature = SIGNATURE;
  ------------------
  |  |   31|  45.6k|#define SIGNATURE 0x5c48e9b2    /* Random pattern. */
  ------------------
   46|  45.6k|#endif
   47|  45.6k|}
Curl_bufref_free:
   55|  98.4k|{
   56|  98.4k|  DEBUGASSERT(br);
  ------------------
  |  | 1081|  98.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 98.4k]
  |  Branch (56:3): [True: 98.4k, False: 0]
  ------------------
   57|  98.4k|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1081|  98.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 98.4k]
  |  Branch (57:3): [True: 98.4k, False: 0]
  ------------------
   58|  98.4k|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1081|  98.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 98.4k, False: 0]
  |  Branch (58:3): [True: 0, False: 0]
  |  Branch (58:3): [True: 23.0k, False: 75.4k]
  |  Branch (58:3): [True: 75.4k, False: 0]
  ------------------
   59|       |
   60|  98.4k|  if(br->ptr && br->dtor)
  ------------------
  |  Branch (60:6): [True: 23.0k, False: 75.4k]
  |  Branch (60:17): [True: 7.76k, False: 15.2k]
  ------------------
   61|  7.76k|    br->dtor(CURL_UNCONST(br->ptr));
  ------------------
  |  |  866|  7.76k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   62|       |
   63|  98.4k|  br->dtor = NULL;
   64|       |  br->ptr = NULL;
   65|  98.4k|  br->len = 0;
   66|  98.4k|}
Curl_bufref_set:
   74|  23.1k|{
   75|  23.1k|  DEBUGASSERT(ptr || !len);
  ------------------
  |  | 1081|  23.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (75:3): [True: 23.1k, False: 0]
  |  Branch (75:3): [True: 0, False: 0]
  |  Branch (75:3): [True: 23.0k, False: 45]
  |  Branch (75:3): [True: 45, False: 0]
  ------------------
   76|  23.1k|  DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
  ------------------
  |  | 1081|  23.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 23.1k]
  |  Branch (76:3): [True: 23.1k, False: 0]
  ------------------
   77|       |
   78|  23.1k|  Curl_bufref_free(br);
   79|  23.1k|  br->ptr = (const unsigned char *)ptr;
   80|  23.1k|  br->len = len;
   81|  23.1k|  br->dtor = dtor;
   82|  23.1k|}
Curl_bufref_uptr:
   88|     69|{
   89|     69|  DEBUGASSERT(br);
  ------------------
  |  | 1081|     69|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (89:3): [True: 0, False: 69]
  |  Branch (89:3): [True: 69, False: 0]
  ------------------
   90|     69|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1081|     69|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (90:3): [True: 0, False: 69]
  |  Branch (90:3): [True: 69, False: 0]
  ------------------
   91|     69|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1081|     69|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:3): [True: 69, False: 0]
  |  Branch (91:3): [True: 0, False: 0]
  |  Branch (91:3): [True: 69, False: 0]
  |  Branch (91:3): [True: 0, False: 0]
  ------------------
   92|       |
   93|     69|  return br->ptr;
   94|     69|}
Curl_bufref_ptr:
  100|  17.8k|{
  101|  17.8k|  DEBUGASSERT(br);
  ------------------
  |  | 1081|  17.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (101:3): [True: 0, False: 17.8k]
  |  Branch (101:3): [True: 17.8k, False: 0]
  ------------------
  102|  17.8k|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1081|  17.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (102:3): [True: 0, False: 17.8k]
  |  Branch (102:3): [True: 17.8k, False: 0]
  ------------------
  103|  17.8k|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1081|  17.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 17.8k, False: 0]
  |  Branch (103:3): [True: 0, False: 0]
  |  Branch (103:3): [True: 17.2k, False: 561]
  |  Branch (103:3): [True: 561, False: 0]
  ------------------
  104|       |
  105|  17.8k|  return (const char *)br->ptr;
  106|  17.8k|}
Curl_bufref_len:
  112|    351|{
  113|    351|  DEBUGASSERT(br);
  ------------------
  |  | 1081|    351|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 351]
  |  Branch (113:3): [True: 351, False: 0]
  ------------------
  114|    351|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1081|    351|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (114:3): [True: 0, False: 351]
  |  Branch (114:3): [True: 351, False: 0]
  ------------------
  115|    351|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1081|    351|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (115:3): [True: 351, False: 0]
  |  Branch (115:3): [True: 0, False: 0]
  |  Branch (115:3): [True: 171, False: 180]
  |  Branch (115:3): [True: 180, False: 0]
  ------------------
  116|       |
  117|    351|  return br->len;
  118|    351|}
Curl_bufref_memdup0:
  121|     27|{
  122|     27|  unsigned char *cpy = NULL;
  123|       |
  124|     27|  DEBUGASSERT(br);
  ------------------
  |  | 1081|     27|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (124:3): [True: 0, False: 27]
  |  Branch (124:3): [True: 27, False: 0]
  ------------------
  125|     27|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1081|     27|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (125:3): [True: 0, False: 27]
  |  Branch (125:3): [True: 27, False: 0]
  ------------------
  126|     27|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1081|     27|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (126:3): [True: 27, False: 0]
  |  Branch (126:3): [True: 0, False: 0]
  |  Branch (126:3): [True: 27, False: 0]
  |  Branch (126:3): [True: 0, False: 0]
  ------------------
  127|     27|  DEBUGASSERT(ptr || !len);
  ------------------
  |  | 1081|     27|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (127:3): [True: 27, False: 0]
  |  Branch (127:3): [True: 0, False: 0]
  |  Branch (127:3): [True: 27, False: 0]
  |  Branch (127:3): [True: 0, False: 0]
  ------------------
  128|     27|  DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
  ------------------
  |  | 1081|     27|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (128:3): [True: 0, False: 27]
  |  Branch (128:3): [True: 27, False: 0]
  ------------------
  129|       |
  130|     27|  if(ptr) {
  ------------------
  |  Branch (130:6): [True: 27, False: 0]
  ------------------
  131|     27|    cpy = curlx_memdup0(ptr, len);
  132|     27|    if(!cpy)
  ------------------
  |  Branch (132:8): [True: 0, False: 27]
  ------------------
  133|      0|      return CURLE_OUT_OF_MEMORY;
  134|     27|  }
  135|       |
  136|     27|  Curl_bufref_set(br, cpy, len, curl_free);
  137|     27|  return CURLE_OK;
  138|     27|}

Curl_cf_dns_add:
  414|  6.06k|{
  415|  6.06k|  struct Curl_cfilter *cf = NULL;
  416|  6.06k|  bool for_proxy = FALSE;
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
  417|  6.06k|  CURLcode result;
  418|       |
  419|  6.06k|  if(!peer)
  ------------------
  |  Branch (419:6): [True: 0, False: 6.06k]
  ------------------
  420|      0|    return CURLE_FAILED_INIT;
  421|  6.06k|#ifndef CURL_DISABLE_PROXY
  422|  6.06k|  for_proxy = (peer == conn->socks_proxy.peer) ||
  ------------------
  |  Branch (422:15): [True: 516, False: 5.54k]
  ------------------
  423|  5.54k|              (peer == conn->http_proxy.peer);
  ------------------
  |  Branch (423:15): [True: 1.28k, False: 4.26k]
  ------------------
  424|  6.06k|#endif
  425|       |
  426|  6.06k|  result = cf_dns_create(&cf, data, peer, dns_queries, transport,
  427|  6.06k|                         for_proxy, FALSE);
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
  428|  6.06k|  if(result)
  ------------------
  |  Branch (428:6): [True: 0, False: 6.06k]
  ------------------
  429|      0|    goto out;
  430|  6.06k|  Curl_conn_cf_add(data, conn, sockindex, cf);
  431|  6.06k|out:
  432|  6.06k|  return result;
  433|  6.06k|}
Curl_cf_dns_insert_after:
  447|    113|{
  448|    113|  struct Curl_cfilter *cf;
  449|    113|  CURLcode result;
  450|       |
  451|    113|  result = cf_dns_create(&cf, data, peer, dns_queries, transport,
  452|    113|                         FALSE, complete_resolve);
  ------------------
  |  | 1058|    113|#define FALSE false
  ------------------
  453|    113|  if(result)
  ------------------
  |  Branch (453:6): [True: 0, False: 113]
  ------------------
  454|      0|    return result;
  455|       |
  456|    113|  Curl_conn_cf_insert_after(cf_at, cf);
  457|    113|  return CURLE_OK;
  458|    113|}
Curl_conn_dns_result:
  484|  74.7k|{
  485|  74.7k|  return cf_dns_result(conn->cfilter[sockindex]);
  486|  74.7k|}
Curl_cf_dns_get_ai:
  520|   390k|{
  521|   390k|  (void)data;
  522|   390k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (522:9): [True: 390k, False: 0]
  ------------------
  523|   390k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (523:8): [True: 390k, False: 0]
  ------------------
  524|   390k|      struct cf_dns_ctx *ctx = cf->ctx;
  525|   390k|      if(ctx->resolv_result)
  ------------------
  |  Branch (525:10): [True: 0, False: 390k]
  ------------------
  526|      0|        return NULL;
  527|   390k|      else if(ctx->dns)
  ------------------
  |  Branch (527:15): [True: 113k, False: 277k]
  ------------------
  528|   113k|        return cf_dns_get_nth_ai(cf, ctx->dns->addr, ai_family, index);
  529|   277k|      else
  530|   277k|        return Curl_resolv_get_ai(data, ctx->resolv_id, ai_family, index);
  531|   390k|    }
  532|   390k|  }
  533|      0|  return NULL;
  534|   390k|}
Curl_conn_dns_get_ai:
  543|   390k|{
  544|   390k|  struct connectdata *conn = data->conn;
  545|   390k|  return Curl_cf_dns_get_ai(conn->cfilter[sockindex], data, ai_family, index);
  546|   390k|}
cf-dns.c:cf_dns_destroy:
  306|  6.17k|{
  307|  6.17k|  struct cf_dns_ctx *ctx = cf->ctx;
  308|       |
  309|  6.17k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  6.17k|  do {                                          \
  |  |  154|  6.17k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  6.17k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  12.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 6.17k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  12.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  6.17k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  6.17k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  6.17k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6.17k]
  |  |  ------------------
  ------------------
  310|  6.17k|  cf_dns_ctx_destroy(data, ctx);
  311|  6.17k|}
cf-dns.c:cf_dns_ctx_destroy:
   77|  6.17k|{
   78|  6.17k|  if(ctx) {
  ------------------
  |  Branch (78:6): [True: 6.17k, False: 0]
  ------------------
   79|  6.17k|    Curl_peer_unlink(&ctx->peer);
   80|  6.17k|    Curl_dns_entry_unlink(data, &ctx->dns);
   81|  6.17k|    curlx_free(ctx);
  ------------------
  |  | 1483|  6.17k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   82|  6.17k|  }
   83|  6.17k|}
cf-dns.c:cf_dns_connect:
  247|   553k|{
  248|   553k|  struct cf_dns_ctx *ctx = cf->ctx;
  249|       |
  250|   553k|  if(cf->connected) {
  ------------------
  |  Branch (250:6): [True: 22, False: 553k]
  ------------------
  251|     22|    *done = TRUE;
  ------------------
  |  | 1055|     22|#define TRUE true
  ------------------
  252|     22|    return CURLE_OK;
  253|     22|  }
  254|       |
  255|   553k|  *done = FALSE;
  ------------------
  |  | 1058|   553k|#define FALSE false
  ------------------
  256|   553k|  if(!ctx->started) {
  ------------------
  |  Branch (256:6): [True: 6.17k, False: 547k]
  ------------------
  257|  6.17k|    ctx->started = TRUE;
  ------------------
  |  | 1055|  6.17k|#define TRUE true
  ------------------
  258|  6.17k|    ctx->resolv_result = cf_dns_start(cf, data, &ctx->dns);
  259|  6.17k|  }
  260|       |
  261|   553k|  if(!ctx->dns && !ctx->resolv_result) {
  ------------------
  |  Branch (261:6): [True: 325k, False: 227k]
  |  Branch (261:19): [True: 325k, False: 98]
  ------------------
  262|   325k|    ctx->resolv_result =
  263|   325k|      Curl_resolv_take_result(data, ctx->resolv_id, &ctx->dns);
  264|   325k|  }
  265|       |
  266|   553k|  if(ctx->resolv_result) {
  ------------------
  |  Branch (266:6): [True: 515, False: 552k]
  ------------------
  267|    515|    CURL_TRC_CF(data, cf, "error resolving: %d", ctx->resolv_result);
  ------------------
  |  |  153|    515|  do {                                          \
  |  |  154|    515|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    515|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.03k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 515, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 515]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.03k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    515|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    515|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    515|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 515]
  |  |  ------------------
  ------------------
  268|    515|    return ctx->resolv_result;
  269|    515|  }
  270|       |
  271|   552k|  if(ctx->dns && !ctx->announced) {
  ------------------
  |  Branch (271:6): [True: 228k, False: 324k]
  |  Branch (271:18): [True: 5.45k, False: 222k]
  ------------------
  272|  5.45k|    ctx->announced = TRUE;
  ------------------
  |  | 1055|  5.45k|#define TRUE true
  ------------------
  273|  5.45k|    if(cf->sockindex == FIRSTSOCKET) {
  ------------------
  |  |  303|  5.45k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (273:8): [True: 5.45k, False: 0]
  ------------------
  274|  5.45k|      cf->conn->bits.dns_resolved = TRUE;
  ------------------
  |  | 1055|  5.45k|#define TRUE true
  ------------------
  275|  5.45k|      Curl_pgrsTime(data, TIMER_NAMELOOKUP);
  276|  5.45k|    }
  277|  5.45k|    cf_dns_report(cf, data, ctx->dns);
  278|  5.45k|  }
  279|       |
  280|   552k|  if(!cf_dns_ready_to_connect(cf, data)) {
  ------------------
  |  Branch (280:6): [True: 58.4k, False: 494k]
  ------------------
  281|  58.4k|    return CURLE_OK;
  282|  58.4k|  }
  283|       |
  284|   494k|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (284:6): [True: 494k, False: 0]
  |  Branch (284:18): [True: 297k, False: 196k]
  ------------------
  285|   297k|    bool sub_done;
  286|   297k|    CURLcode result = Curl_conn_cf_connect(cf->next, data, &sub_done);
  287|   297k|    if(result || !sub_done)
  ------------------
  |  Branch (287:8): [True: 3.97k, False: 293k]
  |  Branch (287:18): [True: 292k, False: 1.36k]
  ------------------
  288|   296k|      return result;
  289|  1.36k|    DEBUGASSERT(sub_done);
  ------------------
  |  | 1081|  1.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:5): [True: 0, False: 1.36k]
  |  Branch (289:5): [True: 1.36k, False: 0]
  ------------------
  290|  1.36k|  }
  291|       |
  292|       |  /* sub filter chain is connected */
  293|   198k|  CURL_TRC_CF(data, cf, "connected filter chain below");
  ------------------
  |  |  153|   198k|  do {                                          \
  |  |  154|   198k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   198k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   396k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 198k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 198k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   396k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   198k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   198k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   198k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 198k]
  |  |  ------------------
  ------------------
  294|   198k|  if(ctx->complete_resolve && !ctx->dns && !ctx->resolv_result) {
  ------------------
  |  Branch (294:6): [True: 196k, False: 1.36k]
  |  Branch (294:31): [True: 196k, False: 68]
  |  Branch (294:44): [True: 196k, False: 0]
  ------------------
  295|       |    /* This filter only connects when it has resolved everything. */
  296|   196k|    CURL_TRC_CF(data, cf, "delay connect until resolve complete");
  ------------------
  |  |  153|   196k|  do {                                          \
  |  |  154|   196k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   196k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   393k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 196k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 196k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   393k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   196k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   196k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   196k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 196k]
  |  |  ------------------
  ------------------
  297|   196k|    return CURLE_OK;
  298|   196k|  }
  299|  1.43k|  *done = TRUE;
  ------------------
  |  | 1055|  1.43k|#define TRUE true
  ------------------
  300|       |  cf->connected = TRUE;
  ------------------
  |  | 1055|  1.43k|#define TRUE true
  ------------------
  301|  1.43k|  Curl_resolv_destroy(data, ctx->resolv_id);
  302|  1.43k|  return CURLE_OK;
  303|   198k|}
cf-dns.c:cf_dns_start:
  165|  6.17k|{
  166|  6.17k|  struct cf_dns_ctx *ctx = cf->ctx;
  167|  6.17k|  timediff_t timeout_ms = Curl_timeleft_ms(data);
  168|  6.17k|  CURLcode result;
  169|       |
  170|  6.17k|  *pdns = NULL;
  171|       |
  172|  6.17k|  CURL_TRC_CF(data, cf, "cf_dns_start %s %s:%u",
  ------------------
  |  |  153|  6.17k|  do {                                          \
  |  |  154|  6.17k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  6.17k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  12.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 6.17k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  12.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  6.17k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  6.17k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  6.17k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6.17k]
  |  |  ------------------
  ------------------
  173|  6.17k|              ctx->peer->unix_socket ? "unix-domain-socket" : "host",
  174|  6.17k|              ctx->peer->hostname, ctx->peer->port);
  175|  6.17k|  if(ctx->peer->unix_socket)
  ------------------
  |  Branch (175:6): [True: 15, False: 6.16k]
  ------------------
  176|     15|    ctx->dns_queries = 0;
  177|  6.16k|  else if(Curl_is_ipv4addr(ctx->peer->hostname))
  ------------------
  |  Branch (177:11): [True: 5.13k, False: 1.03k]
  ------------------
  178|  5.13k|    ctx->dns_queries |= CURL_DNSQ_A;
  ------------------
  |  |   51|  5.13k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  179|  1.03k|#ifdef USE_IPV6
  180|  1.03k|  else if(ctx->peer->ipv6)
  ------------------
  |  Branch (180:11): [True: 40, False: 990]
  ------------------
  181|     40|    ctx->dns_queries |= CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     40|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  182|  6.17k|#endif
  183|       |
  184|  6.17k|  result = Curl_resolv(data, ctx->peer, ctx->dns_queries, ctx->transport,
  185|  6.17k|                       (bool)ctx->for_proxy, timeout_ms,
  186|  6.17k|                       &ctx->resolv_id, pdns);
  187|  6.17k|  DEBUGASSERT(!result || !*pdns);
  ------------------
  |  | 1081|  6.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (187:3): [True: 6.17k, False: 0]
  |  Branch (187:3): [True: 0, False: 0]
  |  Branch (187:3): [True: 5.24k, False: 933]
  |  Branch (187:3): [True: 933, False: 0]
  ------------------
  188|  6.17k|  if(!result) { /* resolved right away, either sync or from dnscache */
  ------------------
  |  Branch (188:6): [True: 5.24k, False: 933]
  ------------------
  189|  5.24k|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1081|  5.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (189:5): [True: 0, False: 5.24k]
  |  Branch (189:5): [True: 5.24k, False: 0]
  ------------------
  190|  5.24k|    return CURLE_OK;
  191|  5.24k|  }
  192|    933|  else if(result == CURLE_AGAIN) { /* async resolv in progress */
  ------------------
  |  Branch (192:11): [True: 835, False: 98]
  ------------------
  193|    835|    return CURLE_OK;
  194|    835|  }
  195|     98|  else if(result == CURLE_OPERATION_TIMEDOUT) { /* took too long */
  ------------------
  |  Branch (195:11): [True: 0, False: 98]
  ------------------
  196|      0|    failf(data, "Failed to resolve '%s' with timeout after %"
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  197|      0|          FMT_TIMEDIFF_T " ms", ctx->peer->hostname,
  198|      0|          curlx_ptimediff_ms(Curl_pgrs_now(data),
  199|      0|                             &data->progress.t_startsingle));
  200|      0|    return CURLE_OPERATION_TIMEDOUT;
  201|      0|  }
  202|     98|  else {
  203|     98|    DEBUGASSERT(result);
  ------------------
  |  | 1081|     98|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (203:5): [True: 0, False: 98]
  |  Branch (203:5): [True: 98, False: 0]
  ------------------
  204|     98|    failf(data, "Could not resolve: %s", ctx->peer->hostname);
  ------------------
  |  |   62|     98|#define failf Curl_failf
  ------------------
  205|     98|    return result;
  206|     98|  }
  207|  6.17k|}
cf-dns.c:cf_dns_report:
  116|  5.45k|{
  117|  5.45k|  struct cf_dns_ctx *ctx = cf->ctx;
  118|  5.45k|  struct dynbuf tmp;
  119|       |
  120|  5.45k|  if(!Curl_trc_is_verbose(data) ||
  ------------------
  |  |  319|  10.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (319:4): [True: 5.45k, False: 0]
  |  |  |  Branch (319:14): [True: 0, False: 5.45k]
  |  |  ------------------
  |  |  320|  10.9k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  121|       |     /* ignore no name or numerical IP addresses */
  122|      0|     !dns->hostname[0] || Curl_host_is_ipnum(dns->hostname))
  ------------------
  |  Branch (122:6): [True: 0, False: 0]
  |  Branch (122:27): [True: 0, False: 0]
  ------------------
  123|  5.45k|    return;
  124|       |
  125|      0|  if(ctx->peer->unix_socket) {
  ------------------
  |  Branch (125:6): [True: 0, False: 0]
  ------------------
  126|      0|#ifdef USE_UNIX_SOCKETS
  127|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  128|       |#else
  129|       |    DEBUGASSERT(0);
  130|       |#endif
  131|      0|  }
  132|      0|  else {
  133|      0|    curlx_dyn_init(&tmp, 1024);
  134|      0|    infof(data, "Host %s:%u was resolved.", dns->hostname, dns->port);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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|       |#ifdef USE_HTTPSRR
  140|       |    if(!dns->hinfo)
  141|       |      infof(data, "HTTPS-RR: -");
  142|       |    else if(!Curl_httpsrr_applicable(data, dns->hinfo))
  143|       |      infof(data, "HTTPS-RR: not applicable");
  144|       |    else {
  145|       |      CURLcode result = Curl_httpsrr_print(&tmp, dns->hinfo);
  146|       |      if(!result)
  147|       |        infof(data, "HTTPS-RR: %s", curlx_dyn_ptr(&tmp));
  148|       |      else
  149|       |        infof(data, "Error printing HTTPS-RR information");
  150|       |    }
  151|       |#endif
  152|      0|    curlx_dyn_free(&tmp);
  153|      0|  }
  154|      0|}
cf-dns.c:cf_dns_ready_to_connect:
  213|   552k|{
  214|   552k|  struct cf_dns_ctx *ctx = cf->ctx;
  215|       |
  216|   552k|  if(ctx->resolv_result)
  ------------------
  |  Branch (216:6): [True: 0, False: 552k]
  ------------------
  217|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  218|   552k|  else if(ctx->dns)
  ------------------
  |  Branch (218:11): [True: 228k, False: 324k]
  ------------------
  219|   228k|    return TRUE;
  ------------------
  |  | 1055|   228k|#define TRUE true
  ------------------
  220|   324k|#ifdef USE_CURL_ASYNC
  221|   324k|  else {
  222|       |    /* We want AAAA answer as we prefer ipv6. If a sub-filter desires
  223|       |    * HTTPS-RR, we check for that query as well. */
  224|   324k|    uint8_t wanted_answers = CURL_DNSQ_AAAA;
  ------------------
  |  |   52|   324k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  225|   324k|    if(Curl_conn_cf_wants_httpsrr(cf, data))
  ------------------
  |  Branch (225:8): [True: 126k, False: 197k]
  ------------------
  226|   126k|      wanted_answers |= CURL_DNSQ_HTTPS;
  ------------------
  |  |   53|   126k|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  227|       |
  228|       |    /* Note: if a query was never started, it is considered to have
  229|       |     * an answer (e.g. a negative one). */
  230|   324k|    if(Curl_resolv_has_answers(data, ctx->resolv_id, wanted_answers))
  ------------------
  |  Branch (230:8): [True: 245k, False: 78.7k]
  ------------------
  231|   245k|      return TRUE;
  ------------------
  |  | 1055|   245k|#define TRUE true
  ------------------
  232|       |    /* If the wanted answers are not available after a delay,
  233|       |     * we let the connect attempts start anyway. */
  234|  78.7k|    return Curl_resolv_elapsed_ms(data, ctx->resolv_id) >=
  235|  78.7k|           CURL_HEV3_RESOLVE_DELAY_MS;
  ------------------
  |  |  209|  78.7k|#define CURL_HEV3_RESOLVE_DELAY_MS    50
  ------------------
  236|   324k|  }
  237|       |#else
  238|       |  (void)data;
  239|       |  DEBUGASSERT(0); /* We should not come here */
  240|       |  return FALSE;
  241|       |#endif /* USE_CURL_ASYNC */
  242|   552k|}
cf-dns.c:cf_dns_close:
  314|  4.80k|{
  315|  4.80k|  cf->connected = FALSE;
  ------------------
  |  | 1058|  4.80k|#define FALSE false
  ------------------
  316|  4.80k|  if(cf->next)
  ------------------
  |  Branch (316:6): [True: 4.80k, False: 0]
  ------------------
  317|  4.80k|    cf->next->cft->do_close(cf->next, data);
  318|  4.80k|}
cf-dns.c:cf_dns_adjust_pollset:
  323|   196k|{
  324|   196k|#ifdef USE_CURL_ASYNC
  325|   196k|  if(!cf->connected)
  ------------------
  |  Branch (325:6): [True: 196k, False: 19]
  ------------------
  326|   196k|    return Curl_resolv_pollset(data, ps);
  327|       |#else
  328|       |  (void)cf;
  329|       |  (void)data;
  330|       |  (void)ps;
  331|       |#endif
  332|     19|  return CURLE_OK;
  333|   196k|}
cf-dns.c:cf_dns_cntrl:
  338|  6.17k|{
  339|  6.17k|  struct cf_dns_ctx *ctx = cf->ctx;
  340|  6.17k|  CURLcode result = CURLE_OK;
  341|       |
  342|  6.17k|  (void)arg1;
  343|  6.17k|  (void)arg2;
  344|  6.17k|  switch(event) {
  345|  4.80k|  case CF_CTRL_DATA_DONE:
  ------------------
  |  |  122|  4.80k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  |  Branch (345:3): [True: 4.80k, False: 1.37k]
  ------------------
  346|  4.80k|    if(ctx->dns) {
  ------------------
  |  Branch (346:8): [True: 4.08k, False: 723]
  ------------------
  347|       |      /* Should only come here when the connect attempt failed and
  348|       |       * `data` is giving up on it. On a successful connect, we already
  349|       |       * unlinked the DNS entry. */
  350|  4.08k|      Curl_dns_entry_unlink(data, &ctx->dns);
  351|  4.08k|    }
  352|  4.80k|    break;
  353|  1.37k|  default:
  ------------------
  |  Branch (353:3): [True: 1.37k, False: 4.80k]
  ------------------
  354|  1.37k|    break;
  355|  6.17k|  }
  356|  6.17k|  return result;
  357|  6.17k|}
cf-dns.c:cf_dns_create:
  384|  6.17k|{
  385|  6.17k|  struct Curl_cfilter *cf = NULL;
  386|  6.17k|  struct cf_dns_ctx *ctx;
  387|  6.17k|  CURLcode result = CURLE_OK;
  388|       |
  389|  6.17k|  (void)data;
  390|  6.17k|  ctx = cf_dns_ctx_create(data, peer, dns_queries, transport,
  391|  6.17k|                          for_proxy, complete_resolve);
  392|  6.17k|  if(!ctx) {
  ------------------
  |  Branch (392:6): [True: 0, False: 6.17k]
  ------------------
  393|      0|    result = CURLE_OUT_OF_MEMORY;
  394|      0|    goto out;
  395|      0|  }
  396|       |
  397|  6.17k|  result = Curl_cf_create(&cf, &Curl_cft_dns, ctx);
  398|       |
  399|  6.17k|out:
  400|  6.17k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (400:10): [True: 0, False: 6.17k]
  ------------------
  401|  6.17k|  if(result)
  ------------------
  |  Branch (401:6): [True: 0, False: 6.17k]
  ------------------
  402|      0|    cf_dns_ctx_destroy(data, ctx);
  403|  6.17k|  return result;
  404|  6.17k|}
cf-dns.c:cf_dns_ctx_create:
   57|  6.17k|{
   58|  6.17k|  struct cf_dns_ctx *ctx;
   59|       |
   60|  6.17k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  6.17k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   61|  6.17k|  if(!ctx)
  ------------------
  |  Branch (61:6): [True: 0, False: 6.17k]
  ------------------
   62|      0|    return NULL;
   63|       |
   64|  6.17k|  Curl_peer_link(&ctx->peer, peer);
   65|  6.17k|  ctx->dns_queries = dns_queries;
   66|  6.17k|  ctx->transport = transport;
   67|  6.17k|  ctx->for_proxy = for_proxy;
   68|  6.17k|  ctx->complete_resolve = complete_resolve;
   69|       |
   70|  6.17k|  CURL_TRC_DNS(data, "created DNS filter for %s:%u, transport=%x, queries=%x",
  ------------------
  |  |  168|  6.17k|  do {                                 \
  |  |  169|  6.17k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  6.17k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  6.17k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  12.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 6.17k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.17k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  12.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  6.17k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  6.17k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  6.17k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 6.17k]
  |  |  ------------------
  ------------------
   71|  6.17k|               peer->hostname, peer->port, ctx->transport, ctx->dns_queries);
   72|  6.17k|  return ctx;
   73|  6.17k|}
cf-dns.c:cf_dns_result:
  464|  74.7k|{
  465|  74.7k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (465:9): [True: 74.7k, False: 0]
  ------------------
  466|  74.7k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (466:8): [True: 74.7k, False: 0]
  ------------------
  467|  74.7k|      struct cf_dns_ctx *ctx = cf->ctx;
  468|  74.7k|      if(ctx->dns || ctx->resolv_result)
  ------------------
  |  Branch (468:10): [True: 5.38k, False: 69.3k]
  |  Branch (468:22): [True: 0, False: 69.3k]
  ------------------
  469|  5.38k|        return ctx->resolv_result;
  470|  69.3k|      return CURLE_AGAIN;
  471|  74.7k|    }
  472|  74.7k|  }
  473|      0|  return CURLE_FAILED_INIT;
  474|  74.7k|}
cf-dns.c:cf_dns_get_nth_ai:
  492|   113k|{
  493|   113k|  struct cf_dns_ctx *ctx = cf->ctx;
  494|   113k|  unsigned int i = 0;
  495|       |
  496|   113k|  if((ai_family == AF_INET) && !(ctx->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|  56.5k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (496:6): [True: 56.5k, False: 56.4k]
  |  Branch (496:32): [True: 0, False: 56.5k]
  ------------------
  497|      0|    return NULL;
  498|   113k|#ifdef USE_IPV6
  499|   113k|  if((ai_family == AF_INET6) && !(ctx->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|  56.4k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (499:6): [True: 56.4k, False: 56.5k]
  |  Branch (499:33): [True: 7, False: 56.4k]
  ------------------
  500|      7|    return NULL;
  501|   112k|#endif
  502|   220k|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (502:14): [True: 113k, False: 107k]
  ------------------
  503|   113k|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (503:8): [True: 56.6k, False: 56.5k]
  ------------------
  504|  56.6k|      if(i == index)
  ------------------
  |  Branch (504:10): [True: 5.55k, False: 51.1k]
  ------------------
  505|  5.55k|        return ai;
  506|  51.1k|      ++i;
  507|  51.1k|    }
  508|   113k|  }
  509|   107k|  return NULL;
  510|   112k|}

Curl_cf_h1_proxy_insert_after:
  970|    921|{
  971|    921|  struct Curl_cfilter *cf;
  972|    921|  struct cf_h1_proxy_ctx *pctx;
  973|    921|  struct h1_tunnel_state *ts;
  974|    921|  CURLcode result;
  975|       |
  976|    921|  (void)data;
  977|    921|  if(!dest)
  ------------------
  |  Branch (977:6): [True: 0, False: 921]
  ------------------
  978|      0|    return CURLE_FAILED_INIT;
  979|    921|  if((httpversion < 10) || (httpversion >= 20))
  ------------------
  |  Branch (979:6): [True: 0, False: 921]
  |  Branch (979:28): [True: 0, False: 921]
  ------------------
  980|      0|    return CURLE_FAILED_INIT;
  981|       |
  982|    921|  ts = curlx_calloc(1, sizeof(*ts));
  ------------------
  |  | 1480|    921|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  983|    921|  if(!ts) {
  ------------------
  |  Branch (983:6): [True: 0, False: 921]
  ------------------
  984|      0|    result = CURLE_OUT_OF_MEMORY;
  985|      0|    goto out;
  986|      0|  }
  987|    921|  Curl_peer_link(&ts->dest, dest);
  988|    921|  ts->httpversion = httpversion;
  989|    921|  curlx_dyn_init(&ts->rcvbuf, DYN_PROXY_CONNECT_HEADERS);
  ------------------
  |  |   73|    921|#define DYN_PROXY_CONNECT_HEADERS 16384
  ------------------
  990|    921|  curlx_dyn_init(&ts->request_data, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|    921|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
  991|    921|  Curl_httpchunk_init(data, &ts->ch, TRUE);
  ------------------
  |  | 1055|    921|#define TRUE true
  ------------------
  992|       |
  993|    921|  pctx = curlx_calloc(1, sizeof(*pctx));
  ------------------
  |  | 1480|    921|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  994|    921|  if(!pctx) {
  ------------------
  |  Branch (994:6): [True: 0, False: 921]
  ------------------
  995|      0|    result = CURLE_OUT_OF_MEMORY;
  996|      0|    goto out;
  997|      0|  }
  998|    921|  pctx->udp_tunnel = udp_tunnel;
  999|    921|  pctx->ts = ts;
 1000|    921|  result = Curl_cf_create(&cf, &Curl_cft_h1_proxy, pctx);
 1001|    921|  if(result) {
  ------------------
  |  Branch (1001:6): [True: 0, False: 921]
  ------------------
 1002|      0|    curlx_free(pctx);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1003|      0|    goto out;
 1004|      0|  }
 1005|    921|  ts = NULL;
 1006|    921|  Curl_conn_cf_insert_after(cf_at, cf);
 1007|       |
 1008|    921|out:
 1009|    921|  tunnel_free(ts, data);
 1010|    921|  return result;
 1011|    921|}
cf-h1-proxy.c:cf_h1_proxy_destroy:
  902|    921|{
  903|    921|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|    921|  do {                                          \
  |  |  154|    921|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    921|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.84k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 921, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 921]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.84k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    921|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    921|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    921|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 921]
  |  |  ------------------
  ------------------
  904|    921|  cf_tunnel_free(cf, data);
  905|       |  curlx_safefree(cf->ctx);
  ------------------
  |  | 1327|    921|  do {                      \
  |  | 1328|    921|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    921|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    921|    (ptr) = NULL;           \
  |  | 1330|    921|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 921]
  |  |  ------------------
  ------------------
  906|    921|}
cf-h1-proxy.c:cf_tunnel_free:
  214|    936|{
  215|    936|  if(cf) {
  ------------------
  |  Branch (215:6): [True: 936, False: 0]
  ------------------
  216|    936|    struct cf_h1_proxy_ctx *pctx = cf->ctx;
  217|    936|    struct h1_tunnel_state *ts = pctx ? pctx->ts : NULL;
  ------------------
  |  Branch (217:34): [True: 936, False: 0]
  ------------------
  218|    936|    if(ts) {
  ------------------
  |  Branch (218:8): [True: 921, False: 15]
  ------------------
  219|    921|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  220|    921|      tunnel_free(ts, data);
  221|       |      pctx->ts = NULL;
  222|    921|    }
  223|    936|  }
  224|    936|}
cf-h1-proxy.c:h1_tunnel_go_state:
  148|  4.58k|{
  149|  4.58k|  if(ts->tunnel_state == new_state)
  ------------------
  |  Branch (149:6): [True: 0, False: 4.58k]
  ------------------
  150|      0|    return;
  151|       |  /* entering this one */
  152|  4.58k|  switch(new_state) {
  ------------------
  |  Branch (152:10): [True: 4.58k, False: 0]
  ------------------
  153|    906|  case H1_TUNNEL_INIT:
  ------------------
  |  Branch (153:3): [True: 906, False: 3.67k]
  ------------------
  154|    906|    CURL_TRC_CF(data, cf, "new tunnel state 'init'");
  ------------------
  |  |  153|    906|  do {                                          \
  |  |  154|    906|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    906|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.81k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 906, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 906]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.81k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    906|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    906|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    906|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 906]
  |  |  ------------------
  ------------------
  155|    906|    tunnel_reinit(cf, data, ts);
  156|    906|    break;
  157|       |
  158|    887|  case H1_TUNNEL_CONNECT:
  ------------------
  |  Branch (158:3): [True: 887, False: 3.69k]
  ------------------
  159|    887|    CURL_TRC_CF(data, cf, "new tunnel state 'connect'");
  ------------------
  |  |  153|    887|  do {                                          \
  |  |  154|    887|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    887|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.77k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 887, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 887]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.77k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    887|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    887|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    887|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 887]
  |  |  ------------------
  ------------------
  160|    887|    ts->tunnel_state = H1_TUNNEL_CONNECT;
  161|    887|    ts->keepon = KEEPON_CONNECT;
  162|    887|    curlx_dyn_reset(&ts->rcvbuf);
  163|    887|    break;
  164|       |
  165|    887|  case H1_TUNNEL_RECEIVE:
  ------------------
  |  Branch (165:3): [True: 887, False: 3.69k]
  ------------------
  166|    887|    CURL_TRC_CF(data, cf, "new tunnel state 'receive'");
  ------------------
  |  |  153|    887|  do {                                          \
  |  |  154|    887|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    887|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.77k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 887, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 887]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.77k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    887|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    887|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    887|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 887]
  |  |  ------------------
  ------------------
  167|    887|    ts->tunnel_state = H1_TUNNEL_RECEIVE;
  168|    887|    break;
  169|       |
  170|     63|  case H1_TUNNEL_RESPONSE:
  ------------------
  |  Branch (170:3): [True: 63, False: 4.51k]
  ------------------
  171|     63|    CURL_TRC_CF(data, cf, "new tunnel state 'response'");
  ------------------
  |  |  153|     63|  do {                                          \
  |  |  154|     63|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     63|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    126|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 63, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 63]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    126|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     63|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     63|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     63|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 63]
  |  |  ------------------
  ------------------
  172|     63|    ts->tunnel_state = H1_TUNNEL_RESPONSE;
  173|     63|    break;
  174|       |
  175|     15|  case H1_TUNNEL_ESTABLISHED:
  ------------------
  |  Branch (175:3): [True: 15, False: 4.56k]
  ------------------
  176|     15|    CURL_TRC_CF(data, cf, "new tunnel state 'established'");
  ------------------
  |  |  153|     15|  do {                                          \
  |  |  154|     15|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     15|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     30|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 15, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     30|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     15|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     15|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  177|     15|    infof(data, "CONNECT%s phase completed for HTTP proxy",
  ------------------
  |  |  143|     15|  do {                               \
  |  |  144|     15|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     15|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 15, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  320|     15|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     15|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  178|     15|          h1_proxy_is_udp(cf) ? "-UDP" : "");
  179|       |
  180|     15|    data->state.authproxy.done = TRUE;
  ------------------
  |  | 1055|     15|#define TRUE true
  ------------------
  181|     15|    data->state.authproxy.multipass = FALSE;
  ------------------
  |  | 1058|     15|#define FALSE false
  ------------------
  182|     15|    FALLTHROUGH();
  ------------------
  |  |  821|     15|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  183|  1.83k|  case H1_TUNNEL_FAILED:
  ------------------
  |  Branch (183:3): [True: 1.82k, False: 2.75k]
  ------------------
  184|  1.83k|    if(new_state == H1_TUNNEL_FAILED)
  ------------------
  |  Branch (184:8): [True: 1.82k, False: 15]
  ------------------
  185|  1.82k|      CURL_TRC_CF(data, cf, "new tunnel state 'failed'");
  ------------------
  |  |  153|  1.82k|  do {                                          \
  |  |  154|  1.82k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.82k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.64k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.82k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.64k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.82k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.82k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.82k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.82k]
  |  |  ------------------
  ------------------
  186|  1.83k|    ts->tunnel_state = new_state;
  187|  1.83k|    curlx_dyn_reset(&ts->rcvbuf);
  188|  1.83k|    curlx_dyn_reset(&ts->request_data);
  189|       |    /* restore the protocol pointer */
  190|  1.83k|    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);
  ------------------
  |  | 1327|  1.83k|  do {                      \
  |  | 1328|  1.83k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  1.83k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  1.83k|    (ptr) = NULL;           \
  |  | 1330|  1.83k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
  196|  1.83k|    break;
  197|  4.58k|  }
  198|  4.58k|}
cf-h1-proxy.c:tunnel_reinit:
  102|    906|{
  103|    906|  (void)data;
  104|    906|  (void)cf;
  105|    906|  DEBUGASSERT(ts);
  ------------------
  |  | 1081|    906|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (105:3): [True: 0, False: 906]
  |  Branch (105:3): [True: 906, False: 0]
  ------------------
  106|    906|  curlx_dyn_reset(&ts->rcvbuf);
  107|    906|  curlx_dyn_reset(&ts->request_data);
  108|    906|  ts->tunnel_state = H1_TUNNEL_INIT;
  109|    906|  ts->keepon = KEEPON_CONNECT;
  110|    906|  ts->cl = 0;
  111|    906|  ts->close_connection = FALSE;
  ------------------
  |  | 1058|    906|#define FALSE false
  ------------------
  112|    906|  ts->maybe_folded = FALSE;
  ------------------
  |  | 1058|    906|#define FALSE false
  ------------------
  113|       |  ts->leading_unfold = FALSE;
  ------------------
  |  | 1058|    906|#define FALSE false
  ------------------
  114|    906|  ts->nsent = 0;
  115|    906|  ts->headerlines = 0;
  116|    906|  return CURLE_OK;
  117|    906|}
cf-h1-proxy.c:h1_proxy_is_udp:
   94|  12.2k|{
   95|  12.2k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
   96|  12.2k|  return (pctx->udp_tunnel ? TRUE : FALSE);
  ------------------
  |  | 1055|  12.2k|#define TRUE true
  ------------------
                return (pctx->udp_tunnel ? TRUE : FALSE);
  ------------------
  |  | 1058|  12.2k|#define FALSE false
  ------------------
  |  Branch (96:11): [True: 0, False: 12.2k]
  ------------------
   97|  12.2k|}
cf-h1-proxy.c:cf_h1_proxy_connect:
  819|  1.00k|{
  820|  1.00k|  CURLcode result;
  821|  1.00k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  822|  1.00k|  struct h1_tunnel_state *ts = pctx->ts;
  823|       |
  824|  1.00k|  if(cf->connected) {
  ------------------
  |  Branch (824:6): [True: 0, False: 1.00k]
  ------------------
  825|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  826|      0|    return CURLE_OK;
  827|      0|  }
  828|       |
  829|  1.00k|  CURL_TRC_CF(data, cf, "connect");
  ------------------
  |  |  153|  1.00k|  do {                                          \
  |  |  154|  1.00k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.00k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.01k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.00k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.01k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.00k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.00k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.00k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.00k]
  |  |  ------------------
  ------------------
  830|  1.00k|  result = cf->next->cft->do_connect(cf->next, data, done);
  831|  1.00k|  if(result || !*done)
  ------------------
  |  Branch (831:6): [True: 0, False: 1.00k]
  |  Branch (831:16): [True: 0, False: 1.00k]
  ------------------
  832|      0|    return result;
  833|       |
  834|  1.00k|  *done = FALSE;
  ------------------
  |  | 1058|  1.00k|#define FALSE false
  ------------------
  835|  1.00k|  if(!ts) {
  ------------------
  |  Branch (835:6): [True: 0, False: 1.00k]
  ------------------
  836|      0|    result = tunnel_init(cf, data, &ts);
  837|      0|    if(result)
  ------------------
  |  Branch (837:8): [True: 0, False: 0]
  ------------------
  838|      0|      return result;
  839|      0|    pctx->ts = ts;
  840|      0|  }
  841|       |
  842|       |  /* We want "seamless" operations through HTTP proxy tunnel */
  843|       |
  844|  1.00k|  result = H1_CONNECT(cf, data, ts);
  845|  1.00k|  if(result)
  ------------------
  |  Branch (845:6): [True: 902, False: 106]
  ------------------
  846|    902|    goto out;
  847|    106|  curlx_safefree(data->req.hd_proxy_auth);
  ------------------
  |  | 1327|    106|  do {                      \
  |  | 1328|    106|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    106|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    106|    (ptr) = NULL;           \
  |  | 1330|    106|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 106]
  |  |  ------------------
  ------------------
  848|       |
  849|  1.00k|out:
  850|  1.00k|  *done = (result == CURLE_OK) && tunnel_is_established(pctx->ts);
  ------------------
  |  Branch (850:11): [True: 106, False: 902]
  |  Branch (850:35): [True: 15, False: 91]
  ------------------
  851|  1.00k|  if(*done) {
  ------------------
  |  Branch (851:6): [True: 15, False: 993]
  ------------------
  852|     15|    cf->connected = TRUE;
  ------------------
  |  | 1055|     15|#define TRUE true
  ------------------
  853|       |    /* The real request will follow the CONNECT, reset request partially */
  854|     15|    Curl_req_soft_reset(&data->req, data);
  855|     15|    Curl_client_reset(data);
  856|     15|    Curl_pgrsReset(data);
  857|     15|    cf_tunnel_free(cf, data);
  858|     15|  }
  859|  1.00k|  return result;
  860|    106|}
cf-h1-proxy.c:H1_CONNECT:
  692|  1.00k|{
  693|  1.00k|  struct connectdata *conn = cf->conn;
  694|  1.00k|  CURLcode result;
  695|  1.00k|  bool done;
  696|       |
  697|  1.00k|  if(tunnel_is_established(ts))
  ------------------
  |  Branch (697:6): [True: 0, False: 1.00k]
  ------------------
  698|      0|    return CURLE_OK;
  699|  1.00k|  if(tunnel_is_failed(ts))
  ------------------
  |  Branch (699:6): [True: 0, False: 1.00k]
  ------------------
  700|      0|    return CURLE_RECV_ERROR; /* Need a cfilter close and new bootstrap */
  701|       |
  702|  1.00k|  do {
  703|       |
  704|  1.00k|    if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (704:8): [True: 0, False: 1.00k]
  ------------------
  705|      0|      failf(data, "Proxy CONNECT aborted due to timeout");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  706|      0|      result = CURLE_OPERATION_TIMEDOUT;
  707|      0|      goto out;
  708|      0|    }
  709|       |
  710|  1.00k|    switch(ts->tunnel_state) {
  711|    921|    case H1_TUNNEL_INIT:
  ------------------
  |  Branch (711:5): [True: 921, False: 87]
  ------------------
  712|       |      /* Prepare the CONNECT request and make a first attempt to send. */
  713|    921|      CURL_TRC_CF(data, cf, "CONNECT start");
  ------------------
  |  |  153|    921|  do {                                          \
  |  |  154|    921|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    921|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.84k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 921, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 921]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.84k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    921|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    921|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    921|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 921]
  |  |  ------------------
  ------------------
  714|    921|      result = start_CONNECT(cf, data, ts);
  715|    921|      if(result)
  ------------------
  |  Branch (715:10): [True: 34, False: 887]
  ------------------
  716|     34|        goto out;
  717|    887|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_CONNECT, data);
  718|    887|      FALLTHROUGH();
  ------------------
  |  |  821|    887|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  719|       |
  720|    887|    case H1_TUNNEL_CONNECT:
  ------------------
  |  Branch (720:5): [True: 0, False: 1.00k]
  ------------------
  721|       |      /* see that the request is completely sent */
  722|    887|      CURL_TRC_CF(data, cf, "CONNECT send");
  ------------------
  |  |  153|    887|  do {                                          \
  |  |  154|    887|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    887|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.77k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 887, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 887]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.77k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    887|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    887|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    887|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 887]
  |  |  ------------------
  ------------------
  723|    887|      result = send_CONNECT(cf, data, ts, &done);
  724|    887|      if(result || !done)
  ------------------
  |  Branch (724:10): [True: 0, False: 887]
  |  Branch (724:20): [True: 0, False: 887]
  ------------------
  725|      0|        goto out;
  726|    887|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_RECEIVE, data);
  727|    887|      FALLTHROUGH();
  ------------------
  |  |  821|    887|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  728|       |
  729|    974|    case H1_TUNNEL_RECEIVE:
  ------------------
  |  Branch (729:5): [True: 87, False: 921]
  ------------------
  730|       |      /* read what is there */
  731|    974|      CURL_TRC_CF(data, cf, "CONNECT receive");
  ------------------
  |  |  153|    974|  do {                                          \
  |  |  154|    974|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    974|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.94k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 974, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 974]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.94k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    974|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    974|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    974|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 974]
  |  |  ------------------
  ------------------
  732|    974|      result = recv_CONNECT_resp(cf, data, ts, &done);
  733|    974|      if(result)
  ------------------
  |  Branch (733:10): [True: 820, False: 154]
  ------------------
  734|    820|        CURL_TRC_CF(data, cf, "error receiving CONNECT response: %d", result);
  ------------------
  |  |  153|    820|  do {                                          \
  |  |  154|    820|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    820|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.64k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 820, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 820]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.64k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    820|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    820|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    820|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 820]
  |  |  ------------------
  ------------------
  735|    974|      if(!result)
  ------------------
  |  Branch (735:10): [True: 154, False: 820]
  ------------------
  736|    154|        result = Curl_pgrsUpdate(data);
  737|       |      /* error or not complete yet. return for more multi-multi */
  738|    974|      if(result || !done)
  ------------------
  |  Branch (738:10): [True: 820, False: 154]
  |  Branch (738:20): [True: 91, False: 63]
  ------------------
  739|    911|        goto out;
  740|       |      /* got it */
  741|     63|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_RESPONSE, data);
  742|     63|      FALLTHROUGH();
  ------------------
  |  |  821|     63|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  743|       |
  744|     63|    case H1_TUNNEL_RESPONSE:
  ------------------
  |  Branch (744:5): [True: 0, False: 1.00k]
  ------------------
  745|     63|      CURL_TRC_CF(data, cf, "CONNECT response");
  ------------------
  |  |  153|     63|  do {                                          \
  |  |  154|     63|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     63|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    126|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 63, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 63]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    126|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     63|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     63|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     63|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 63]
  |  |  ------------------
  ------------------
  746|     63|      if(data->req.newurl) {
  ------------------
  |  Branch (746:10): [True: 0, False: 63]
  ------------------
  747|       |        /* not the "final" response, we need to do a follow up request.
  748|       |         * If the other side indicated a connection close, or if someone
  749|       |         * else told us to close this connection, do so now.
  750|       |         */
  751|      0|        Curl_req_soft_reset(&data->req, data);
  752|      0|        if(ts->close_connection || conn->bits.close) {
  ------------------
  |  Branch (752:12): [True: 0, False: 0]
  |  Branch (752:36): [True: 0, False: 0]
  ------------------
  753|       |          /* Close this filter and the sub-chain, re-connect the
  754|       |           * sub-chain and continue. Closing this filter will
  755|       |           * reset our tunnel state. To avoid recursion, we return
  756|       |           * and expect to be called again.
  757|       |           */
  758|      0|          CURL_TRC_CF(data, cf, "CONNECT need to close+open");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  759|      0|          infof(data, "Connect me again please");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  760|      0|          Curl_conn_cf_close(cf, data);
  761|      0|          result = Curl_conn_cf_connect(cf->next, data, &done);
  762|      0|          return result;
  763|      0|        }
  764|      0|        else {
  765|       |          /* staying on this connection, reset state */
  766|      0|          h1_tunnel_go_state(cf, ts, H1_TUNNEL_INIT, data);
  767|      0|        }
  768|      0|      }
  769|     63|      break;
  770|       |
  771|     63|    default:
  ------------------
  |  Branch (771:5): [True: 0, False: 1.00k]
  ------------------
  772|      0|      break;
  773|  1.00k|    }
  774|       |
  775|  1.00k|  } while(data->req.newurl);
  ------------------
  |  Branch (775:11): [True: 0, False: 63]
  ------------------
  776|       |
  777|     63|  DEBUGASSERT(ts->tunnel_state == H1_TUNNEL_RESPONSE);
  ------------------
  |  | 1081|     63|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (777:3): [True: 0, False: 63]
  |  Branch (777:3): [True: 63, False: 0]
  ------------------
  778|     63|  if(h1_proxy_is_udp(cf)) {
  ------------------
  |  Branch (778:6): [True: 0, False: 63]
  ------------------
  779|       |    /* RFC 9298: Accept 101 Upgrade for HTTP/1.1 and
  780|       |     * 2xx responses for HTTP/2 and HTTP/3 proxies. */
  781|      0|    if(data->info.httpproxycode / 100 != 2 &&
  ------------------
  |  Branch (781:8): [True: 0, False: 0]
  ------------------
  782|      0|       data->info.httpproxycode != 101) {
  ------------------
  |  Branch (782:8): [True: 0, False: 0]
  ------------------
  783|      0|      curlx_safefree(data->req.newurl);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  784|      0|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  785|      0|      failf(data, "CONNECT-UDP tunnel failed, response %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  786|      0|            data->req.httpcode);
  787|      0|      return CURLE_COULDNT_CONNECT;
  788|      0|    }
  789|      0|  }
  790|     63|  else {
  791|     63|    if(data->info.httpproxycode / 100 != 2) {
  ------------------
  |  Branch (791:8): [True: 48, False: 15]
  ------------------
  792|       |      /* a non-2xx response and we have no next URL to try. */
  793|     48|      curlx_safefree(data->req.newurl);
  ------------------
  |  | 1327|     48|  do {                      \
  |  | 1328|     48|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|     48|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|     48|    (ptr) = NULL;           \
  |  | 1330|     48|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 48]
  |  |  ------------------
  ------------------
  794|     48|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  795|     48|      failf(data, "CONNECT tunnel failed, response %d", data->req.httpcode);
  ------------------
  |  |   62|     48|#define failf Curl_failf
  ------------------
  796|     48|      return CURLE_COULDNT_CONNECT;
  797|     48|    }
  798|     63|  }
  799|       |  /* 2xx response, SUCCESS! */
  800|       |  /* 101 Switching Protocol for CONNECT-UDP */
  801|     15|  h1_tunnel_go_state(cf, ts, H1_TUNNEL_ESTABLISHED, data);
  802|     15|  if(h1_proxy_is_udp(cf))
  ------------------
  |  Branch (802:6): [True: 0, False: 15]
  ------------------
  803|      0|    infof(data, "CONNECT-UDP tunnel established, response %d",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  804|     15|                                    data->info.httpproxycode);
  805|     15|  else
  806|     15|    infof(data, "CONNECT tunnel established, response %d",
  ------------------
  |  |  143|     15|  do {                               \
  |  |  144|     15|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     15|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 15, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  320|     15|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     15|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  807|     15|                                    data->info.httpproxycode);
  808|     15|  result = CURLE_OK;
  809|       |
  810|    960|out:
  811|    960|  if(result)
  ------------------
  |  Branch (811:6): [True: 854, False: 106]
  ------------------
  812|    854|    h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  813|    960|  return result;
  814|     15|}
cf-h1-proxy.c:tunnel_is_failed:
   89|  1.00k|{
   90|  1.00k|  return ts && (ts->tunnel_state == H1_TUNNEL_FAILED);
  ------------------
  |  Branch (90:10): [True: 1.00k, False: 0]
  |  Branch (90:16): [True: 0, False: 1.00k]
  ------------------
   91|  1.00k|}
cf-h1-proxy.c:start_CONNECT:
  234|    921|{
  235|    921|  struct httpreq *req = NULL;
  236|    921|  int http_minor;
  237|    921|  CURLcode result;
  238|       |
  239|    921|  DEBUGASSERT(data);
  ------------------
  |  | 1081|    921|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [True: 0, False: 921]
  |  Branch (239:3): [True: 921, 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|    921|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1327|    921|  do {                      \
  |  | 1328|    921|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    921|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    921|    (ptr) = NULL;           \
  |  | 1330|    921|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 921]
  |  |  ------------------
  ------------------
  243|       |
  244|    921|  result = Curl_http_proxy_create_tunnel_request(&req, cf, data, ts->dest,
  245|    921|                                                  PROXY_HTTP_V1,
  246|    921|                                                  h1_proxy_is_udp(cf));
  247|    921|  if(result)
  ------------------
  |  Branch (247:6): [True: 34, False: 887]
  ------------------
  248|     34|    goto out;
  249|       |
  250|    887|  curlx_dyn_reset(&ts->request_data);
  251|    887|  ts->nsent = 0;
  252|    887|  ts->headerlines = 0;
  253|    887|  http_minor = ts->httpversion % 10;
  254|       |
  255|    887|  result = Curl_h1_req_write_head(req, http_minor, &ts->request_data);
  256|    887|  if(!result)
  ------------------
  |  Branch (256:6): [True: 887, False: 0]
  ------------------
  257|    887|    result = Curl_creader_set_null(data);
  258|       |
  259|    921|out:
  260|    921|  if(result)
  ------------------
  |  Branch (260:6): [True: 34, False: 887]
  ------------------
  261|     34|    failf(data, "Failed sending CONNECT to proxy");
  ------------------
  |  |   62|     34|#define failf Curl_failf
  ------------------
  262|    921|  if(req)
  ------------------
  |  Branch (262:6): [True: 887, False: 34]
  ------------------
  263|    887|    Curl_http_req_free(req);
  264|    921|  return result;
  265|    887|}
cf-h1-proxy.c:send_CONNECT:
  271|    887|{
  272|    887|  const uint8_t *buf = curlx_dyn_uptr(&ts->request_data);
  273|    887|  size_t request_len = curlx_dyn_len(&ts->request_data);
  274|    887|  size_t blen = request_len;
  275|    887|  CURLcode result = CURLE_OK;
  276|    887|  size_t nwritten;
  277|       |
  278|    887|  if(blen <= ts->nsent)
  ------------------
  |  Branch (278:6): [True: 0, False: 887]
  ------------------
  279|      0|    goto out;  /* we are done */
  280|       |
  281|    887|  blen -= ts->nsent;
  282|    887|  buf += ts->nsent;
  283|       |
  284|    887|  result = cf->next->cft->do_send(cf->next, data, buf, blen, FALSE, &nwritten);
  ------------------
  |  | 1058|    887|#define FALSE false
  ------------------
  285|    887|  if(result) {
  ------------------
  |  Branch (285:6): [True: 0, False: 887]
  ------------------
  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|    887|  DEBUGASSERT(blen >= nwritten);
  ------------------
  |  | 1081|    887|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (291:3): [True: 0, False: 887]
  |  Branch (291:3): [True: 887, False: 0]
  ------------------
  292|    887|  ts->nsent += nwritten;
  293|    887|  Curl_debug(data, CURLINFO_HEADER_OUT, (const char *)buf, nwritten);
  294|       |
  295|    887|out:
  296|    887|  if(result)
  ------------------
  |  Branch (296:6): [True: 0, False: 887]
  ------------------
  297|      0|    failf(data, "Failed sending CONNECT to proxy");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  298|    887|  *done = (!result && (ts->nsent >= request_len));
  ------------------
  |  Branch (298:12): [True: 887, False: 0]
  |  Branch (298:23): [True: 887, False: 0]
  ------------------
  299|    887|  return result;
  300|    887|}
cf-h1-proxy.c:recv_CONNECT_resp:
  544|    974|{
  545|    974|  CURLcode result = CURLE_OK;
  546|    974|  int error;
  547|       |
  548|    974|#define SELECT_OK      0
  549|    974|#define SELECT_ERROR   1
  550|       |
  551|    974|  error = SELECT_OK;
  ------------------
  |  |  548|    974|#define SELECT_OK      0
  ------------------
  552|    974|  *done = FALSE;
  ------------------
  |  | 1058|    974|#define FALSE false
  ------------------
  553|       |
  554|   428k|  while(ts->keepon) {
  ------------------
  |  Branch (554:9): [True: 428k, False: 70]
  ------------------
  555|   428k|    size_t nread;
  556|   428k|    char byte;
  557|       |
  558|       |    /* Read one byte at a time to avoid a race condition. Wait at most one
  559|       |       second before looping to ensure continuous pgrsUpdates. */
  560|   428k|    result = Curl_conn_recv(data, cf->sockindex, &byte, 1, &nread);
  561|   428k|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (561:8): [True: 91, False: 428k]
  ------------------
  562|       |      /* socket buffer drained, return */
  563|     91|      return CURLE_OK;
  564|       |
  565|   428k|    if(!result)
  ------------------
  |  Branch (565:8): [True: 428k, False: 0]
  ------------------
  566|   428k|      result = Curl_pgrsUpdate(data);
  567|       |
  568|   428k|    if(result) {
  ------------------
  |  Branch (568:8): [True: 0, False: 428k]
  ------------------
  569|      0|      ts->keepon = KEEPON_DONE;
  570|      0|      break;
  571|      0|    }
  572|       |
  573|   428k|    if(!nread) {
  ------------------
  |  Branch (573:8): [True: 812, False: 427k]
  ------------------
  574|    812|      if(ts->maybe_folded) {
  ------------------
  |  Branch (574:10): [True: 3, False: 809]
  ------------------
  575|       |        /* EOF right after LF: finalize the pending header line. */
  576|      3|        result = single_header(cf, data, ts);
  577|      3|        if(result)
  ------------------
  |  Branch (577:12): [True: 0, False: 3]
  ------------------
  578|      0|          return result;
  579|      3|        ts->maybe_folded = FALSE;
  ------------------
  |  | 1058|      3|#define FALSE false
  ------------------
  580|      3|      }
  581|    812|      if(data->set.proxyauth && data->state.authproxy.avail &&
  ------------------
  |  Branch (581:10): [True: 811, False: 1]
  |  Branch (581:33): [True: 0, False: 811]
  ------------------
  582|      0|         data->req.hd_proxy_auth) {
  ------------------
  |  Branch (582:10): [True: 0, False: 0]
  ------------------
  583|       |        /* proxy auth was requested and there was proxy auth available,
  584|       |           then deem this as "mere" proxy disconnect */
  585|      0|        ts->close_connection = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  586|      0|        infof(data, "Proxy CONNECT connection closed");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  587|      0|      }
  588|    812|      else {
  589|    812|        error = SELECT_ERROR;
  ------------------
  |  |  549|    812|#define SELECT_ERROR   1
  ------------------
  590|    812|        failf(data, "Proxy CONNECT aborted");
  ------------------
  |  |   62|    812|#define failf Curl_failf
  ------------------
  591|    812|      }
  592|    812|      ts->keepon = KEEPON_DONE;
  593|    812|      break;
  594|    812|    }
  595|       |
  596|   427k|    if(ts->keepon == KEEPON_IGNORE) {
  ------------------
  |  Branch (596:8): [True: 0, False: 427k]
  ------------------
  597|       |      /* This means we are currently ignoring a response-body */
  598|      0|      if(ts->chunked_encoding) {
  ------------------
  |  Branch (598:10): [True: 0, False: 0]
  ------------------
  599|       |        /* chunked-encoded body, so we need to do the chunked dance
  600|       |           properly to know when the end of the body is reached */
  601|      0|        size_t consumed = 0;
  602|       |
  603|       |        /* now parse the chunked piece of data so that we can
  604|       |           properly tell when the stream ends */
  605|      0|        result = Curl_httpchunk_read(data, &ts->ch, &byte, 1, &consumed);
  606|      0|        if(result)
  ------------------
  |  Branch (606:12): [True: 0, False: 0]
  ------------------
  607|      0|          return result;
  608|      0|        if(Curl_httpchunk_is_done(data, &ts->ch)) {
  ------------------
  |  Branch (608:12): [True: 0, False: 0]
  ------------------
  609|       |          /* we are done reading chunks! */
  610|      0|          infof(data, "chunk reading DONE");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  611|      0|          ts->keepon = KEEPON_DONE;
  612|      0|        }
  613|      0|      }
  614|      0|      else if(ts->cl) {
  ------------------
  |  Branch (614:15): [True: 0, False: 0]
  ------------------
  615|       |        /* A Content-Length based body: count down the counter
  616|       |           and make sure to break out of the loop when we are done! */
  617|      0|        ts->cl--;
  618|      0|        if(ts->cl <= 0) {
  ------------------
  |  Branch (618:12): [True: 0, False: 0]
  ------------------
  619|      0|          ts->keepon = KEEPON_DONE;
  620|      0|          break;
  621|      0|        }
  622|      0|      }
  623|      0|      continue;
  624|      0|    }
  625|       |
  626|   427k|    if(ts->maybe_folded) {
  ------------------
  |  Branch (626:8): [True: 11.6k, False: 416k]
  ------------------
  627|  11.6k|      if(ISBLANK(byte)) {
  ------------------
  |  |   45|  11.6k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 342, False: 11.3k]
  |  |  |  Branch (45:38): [True: 152, False: 11.1k]
  |  |  ------------------
  ------------------
  628|    494|        Curl_http_to_fold(&ts->rcvbuf);
  629|    494|        ts->leading_unfold = TRUE;
  ------------------
  |  | 1055|    494|#define TRUE true
  ------------------
  630|    494|      }
  631|  11.1k|      else {
  632|  11.1k|        result = single_header(cf, data, ts);
  633|  11.1k|        if(result)
  ------------------
  |  Branch (633:12): [True: 0, False: 11.1k]
  ------------------
  634|      0|          return result;
  635|       |        /* now handle the new byte */
  636|  11.1k|      }
  637|  11.6k|      ts->maybe_folded = FALSE;
  ------------------
  |  | 1058|  11.6k|#define FALSE false
  ------------------
  638|  11.6k|    }
  639|       |
  640|   427k|    if(ts->leading_unfold) {
  ------------------
  |  Branch (640:8): [True: 4.81k, False: 422k]
  ------------------
  641|  4.81k|      if(ISBLANK(byte))
  ------------------
  |  |   45|  4.81k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 2.53k, False: 2.27k]
  |  |  |  Branch (45:38): [True: 1.78k, False: 487]
  |  |  ------------------
  ------------------
  642|       |        /* skip a bit brother */
  643|  4.32k|        continue;
  644|       |      /* non-blank, insert a space then continue the unfolding */
  645|    487|      if(curlx_dyn_addn(&ts->rcvbuf, " ", 1)) {
  ------------------
  |  Branch (645:10): [True: 0, False: 487]
  ------------------
  646|      0|        failf(data, "CONNECT response too large");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  647|      0|        return CURLE_RECV_ERROR;
  648|      0|      }
  649|    487|      ts->leading_unfold = FALSE;
  ------------------
  |  | 1058|    487|#define FALSE false
  ------------------
  650|    487|    }
  651|   423k|    if(curlx_dyn_addn(&ts->rcvbuf, &byte, 1)) {
  ------------------
  |  Branch (651:8): [True: 1, False: 423k]
  ------------------
  652|      1|      failf(data, "CONNECT response too large");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  653|      1|      return CURLE_RECV_ERROR;
  654|      1|    }
  655|       |
  656|       |    /* if this is not the end of a header line then continue */
  657|   423k|    if(byte != 0x0a)
  ------------------
  |  Branch (657:8): [True: 411k, False: 11.7k]
  ------------------
  658|   411k|      continue;
  659|  11.7k|    else {
  660|  11.7k|      const char *linep = curlx_dyn_ptr(&ts->rcvbuf);
  661|  11.7k|      size_t hlen = curlx_dyn_len(&ts->rcvbuf);
  662|  11.7k|      if(hlen && ISNEWLINE(linep[0])) {
  ------------------
  |  |   50|  11.7k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 68, False: 11.6k]
  |  |  |  Branch (50:43): [True: 2, False: 11.6k]
  |  |  ------------------
  ------------------
  |  Branch (662:10): [True: 11.7k, False: 0]
  ------------------
  663|       |        /* end of headers */
  664|     70|        result = single_header(cf, data, ts);
  665|     70|        if(result)
  ------------------
  |  Branch (665:12): [True: 0, False: 70]
  ------------------
  666|      0|          return result;
  667|     70|      }
  668|  11.6k|      else
  669|  11.6k|        ts->maybe_folded = TRUE;
  ------------------
  |  | 1055|  11.6k|#define TRUE true
  ------------------
  670|  11.7k|    }
  671|       |
  672|  11.7k|    if(result)
  ------------------
  |  Branch (672:8): [True: 0, False: 11.7k]
  ------------------
  673|      0|      return result;
  674|  11.7k|  } /* while there is buffer left and loop is requested */
  675|       |
  676|    882|  if(error)
  ------------------
  |  Branch (676:6): [True: 812, False: 70]
  ------------------
  677|    812|    result = CURLE_RECV_ERROR;
  678|    882|  *done = (ts->keepon == KEEPON_DONE);
  679|    882|  if(!result && *done &&
  ------------------
  |  Branch (679:6): [True: 70, False: 812]
  |  Branch (679:17): [True: 70, False: 0]
  ------------------
  680|     70|     data->info.httpproxycode / 100 != 2 &&
  ------------------
  |  Branch (680:6): [True: 55, False: 15]
  ------------------
  681|     55|     !(h1_proxy_is_udp(cf) && data->info.httpproxycode == 101)) {
  ------------------
  |  Branch (681:8): [True: 0, False: 55]
  |  Branch (681:31): [True: 0, False: 0]
  ------------------
  682|       |    /* Deal with the possibly already received authenticate
  683|       |       headers. 'newurl' is set to a new URL if we must loop. */
  684|     55|    result = Curl_http_auth_act(data);
  685|     55|  }
  686|    882|  return result;
  687|    974|}
cf-h1-proxy.c:single_header:
  468|  11.2k|{
  469|  11.2k|  CURLcode result = CURLE_OK;
  470|  11.2k|  const char *linep = curlx_dyn_ptr(&ts->rcvbuf);
  471|  11.2k|  size_t line_len = curlx_dyn_len(&ts->rcvbuf); /* bytes in this line */
  472|  11.2k|  const struct SingleRequest *k = &data->req;
  473|  11.2k|  int writetype;
  474|  11.2k|  ts->headerlines++;
  475|       |
  476|       |  /* output debug if that is requested */
  477|  11.2k|  Curl_debug(data, CURLINFO_HEADER_IN, linep, line_len);
  478|       |
  479|       |  /* send the header to the callback */
  480|  11.2k|  writetype = CLIENTWRITE_HEADER | CLIENTWRITE_CONNECT |
  ------------------
  |  |   44|  11.2k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                writetype = CLIENTWRITE_HEADER | CLIENTWRITE_CONNECT |
  ------------------
  |  |   46|  11.2k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  481|  11.2k|    (ts->headerlines == 1 ? CLIENTWRITE_STATUS : 0);
  ------------------
  |  |   45|    162|#define CLIENTWRITE_STATUS  (1 << 3) /* a special status HEADER */
  ------------------
  |  Branch (481:6): [True: 162, False: 11.0k]
  ------------------
  482|  11.2k|  result = Curl_client_write(data, writetype, linep, line_len);
  483|  11.2k|  if(result)
  ------------------
  |  Branch (483:6): [True: 0, False: 11.2k]
  ------------------
  484|      0|    return result;
  485|       |
  486|  11.2k|  result = Curl_bump_headersize(data, line_len, TRUE);
  ------------------
  |  | 1055|  11.2k|#define TRUE true
  ------------------
  487|  11.2k|  if(result)
  ------------------
  |  Branch (487:6): [True: 0, False: 11.2k]
  ------------------
  488|      0|    return result;
  489|       |
  490|       |  /* Newlines are CRLF, so the CR is ignored as the line is not
  491|       |     really terminated until the LF comes. Treat a following CR
  492|       |     as end-of-headers as well.*/
  493|       |
  494|  11.2k|  if(ISNEWLINE(linep[0])) {
  ------------------
  |  |   50|  11.2k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 68, False: 11.1k]
  |  |  |  Branch (50:43): [True: 2, False: 11.1k]
  |  |  ------------------
  ------------------
  495|       |    /* end of response-headers from the proxy */
  496|       |
  497|     70|    if((407 == k->httpcode) && !data->state.authproblem) {
  ------------------
  |  Branch (497:8): [True: 2, False: 68]
  |  Branch (497:32): [True: 2, False: 0]
  ------------------
  498|       |      /* If we get a 407 response code with content length
  499|       |         when we have no auth problem, we must ignore the
  500|       |         whole response-body */
  501|      2|      ts->keepon = KEEPON_IGNORE;
  502|       |
  503|      2|      if(ts->cl) {
  ------------------
  |  Branch (503:10): [True: 0, False: 2]
  ------------------
  504|      0|        infof(data, "Ignore %" FMT_OFF_T " bytes of response-body", ts->cl);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  505|      0|      }
  506|      2|      else if(ts->chunked_encoding) {
  ------------------
  |  Branch (506:15): [True: 0, False: 2]
  ------------------
  507|      0|        infof(data, "Ignore chunked response-body");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  508|      0|      }
  509|      2|      else {
  510|       |        /* without content-length or chunked encoding, we
  511|       |           cannot keep the connection alive since the close is
  512|       |           the end signal so we bail out at once instead */
  513|      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))        \
  |  |  ------------------
  |  |  |  |  323|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  514|      2|        ts->keepon = KEEPON_DONE;
  515|      2|      }
  516|      2|    }
  517|     68|    else {
  518|     68|      ts->keepon = KEEPON_DONE;
  519|     68|    }
  520|       |
  521|     70|    DEBUGASSERT(ts->keepon == KEEPON_IGNORE ||
  ------------------
  |  | 1081|     70|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (521:5): [True: 70, False: 0]
  |  Branch (521:5): [True: 0, False: 0]
  |  Branch (521:5): [True: 0, False: 70]
  |  Branch (521:5): [True: 70, False: 0]
  ------------------
  522|     70|                ts->keepon == KEEPON_DONE);
  523|     70|    return result;
  524|     70|  }
  525|       |
  526|  11.1k|  if(h1_proxy_is_udp(cf)) {
  ------------------
  |  Branch (526:6): [True: 0, False: 11.1k]
  ------------------
  527|      0|    result = on_resp_header_udp(cf, data, ts, linep);
  528|      0|  }
  529|  11.1k|  else {
  530|  11.1k|    result = on_resp_header(cf, data, ts, linep);
  531|  11.1k|  }
  532|       |
  533|  11.1k|  if(result)
  ------------------
  |  Branch (533:6): [True: 0, False: 11.1k]
  ------------------
  534|      0|    return result;
  535|       |
  536|  11.1k|  curlx_dyn_reset(&ts->rcvbuf);
  537|  11.1k|  return result;
  538|  11.1k|}
cf-h1-proxy.c:on_resp_header:
  392|  11.1k|{
  393|  11.1k|  CURLcode result = CURLE_OK;
  394|  11.1k|  struct SingleRequest *k = &data->req;
  395|  11.1k|  (void)cf;
  396|       |
  397|  11.1k|  if((checkprefix("WWW-Authenticate:", header) && (401 == k->httpcode)) ||
  ------------------
  |  |   33|  22.3k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  11.1k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 11.1k]
  |  |  ------------------
  ------------------
  |  Branch (397:51): [True: 0, False: 0]
  ------------------
  398|  11.1k|     (checkprefix("Proxy-authenticate:", header) && (407 == k->httpcode))) {
  ------------------
  |  |   33|  22.3k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  11.1k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 11.1k]
  |  |  ------------------
  ------------------
  |  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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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);
  ------------------
  |  | 1483|      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|  11.1k|  else if(checkprefix("Content-Length:", header)) {
  ------------------
  |  |   33|  11.1k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  11.1k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 11.1k]
  |  |  ------------------
  ------------------
  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))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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 + strlen("Content-Length:");
  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|  11.1k|  else if(Curl_compareheader(header,
  ------------------
  |  Branch (429:11): [True: 0, False: 11.1k]
  ------------------
  430|  11.1k|                             STRCONST("Connection:"), STRCONST("close")))
  ------------------
  |  | 1292|  11.1k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
                                           STRCONST("Connection:"), STRCONST("close")))
  ------------------
  |  | 1292|  11.1k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  431|      0|    ts->close_connection = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  432|  11.1k|  else if(checkprefix("Transfer-Encoding:", header)) {
  ------------------
  |  |   33|  11.1k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  11.1k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 11.1k]
  |  |  ------------------
  ------------------
  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))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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:"),
  ------------------
  |  | 1292|      0|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  442|      0|                               STRCONST("chunked"))) {
  ------------------
  |  | 1292|      0|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  443|      0|      infof(data, "CONNECT responded chunked");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  445|       |      /* reset our chunky engine */
  446|      0|      Curl_httpchunk_reset(data, &ts->ch, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  447|      0|    }
  448|      0|  }
  449|  11.1k|  else if(Curl_compareheader(header,
  ------------------
  |  Branch (449:11): [True: 0, False: 11.1k]
  ------------------
  450|  11.1k|                             STRCONST("Proxy-Connection:"),
  ------------------
  |  | 1292|  11.1k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  451|  11.1k|                             STRCONST("close")))
  ------------------
  |  | 1292|  11.1k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  452|      0|    ts->close_connection = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  453|  11.1k|  else if(!strncmp(header, "HTTP/1.", 7) &&
  ------------------
  |  Branch (453:11): [True: 3.16k, False: 8.00k]
  ------------------
  454|  3.16k|          ((header[7] == '0') || (header[7] == '1')) &&
  ------------------
  |  Branch (454:12): [True: 2.54k, False: 624]
  |  Branch (454:34): [True: 371, False: 253]
  ------------------
  455|  2.91k|          (header[8] == ' ') &&
  ------------------
  |  Branch (455:11): [True: 2.69k, False: 222]
  ------------------
  456|  2.69k|          ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   44|  13.8k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 2.52k, False: 163]
  |  |  |  Branch (44:38): [True: 1.94k, False: 582]
  |  |  ------------------
  ------------------
                        ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   44|  13.1k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 1.29k, False: 652]
  |  |  |  Branch (44:38): [True: 1.11k, False: 175]
  |  |  ------------------
  ------------------
                        ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   44|  12.2k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 694, False: 425]
  |  |  |  Branch (44:38): [True: 553, False: 141]
  |  |  ------------------
  ------------------
  457|    553|          !ISDIGIT(header[12])) {
  ------------------
  |  |   44|    553|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 379, False: 174]
  |  |  |  Branch (44:38): [True: 279, False: 100]
  |  |  ------------------
  ------------------
  458|       |    /* store the HTTP code from the proxy */
  459|    274|    data->info.httpproxycode = k->httpcode = ((header[9] - '0') * 100) +
  460|    274|      ((header[10] - '0') * 10) + (header[11] - '0');
  461|    274|  }
  462|  11.1k|  return result;
  463|  11.1k|}
cf-h1-proxy.c:tunnel_is_established:
   84|  1.11k|{
   85|  1.11k|  return ts && (ts->tunnel_state == H1_TUNNEL_ESTABLISHED);
  ------------------
  |  Branch (85:10): [True: 1.11k, False: 0]
  |  Branch (85:16): [True: 15, False: 1.09k]
  ------------------
   86|  1.11k|}
cf-h1-proxy.c:cf_h1_proxy_close:
  910|    921|{
  911|    921|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  912|    921|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|    921|  do {                                          \
  |  |  154|    921|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    921|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.84k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 921, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 921]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.84k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    921|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    921|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    921|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 921]
  |  |  ------------------
  ------------------
  913|    921|  cf->connected = FALSE;
  ------------------
  |  | 1058|    921|#define FALSE false
  ------------------
  914|    921|  if(pctx && pctx->ts)
  ------------------
  |  Branch (914:6): [True: 921, False: 0]
  |  Branch (914:14): [True: 906, False: 15]
  ------------------
  915|    906|    h1_tunnel_go_state(cf, pctx->ts, H1_TUNNEL_INIT, data);
  916|    921|  if(cf->next)
  ------------------
  |  Branch (916:6): [True: 921, False: 0]
  ------------------
  917|    921|    cf->next->cft->do_close(cf->next, data);
  918|    921|}
cf-h1-proxy.c:cf_h1_proxy_adjust_pollset:
  865|    160|{
  866|    160|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  867|    160|  struct h1_tunnel_state *ts = pctx->ts;
  868|    160|  CURLcode result = CURLE_OK;
  869|       |
  870|    160|  if(!cf->connected) {
  ------------------
  |  Branch (870:6): [True: 91, False: 69]
  ------------------
  871|       |    /* If we are not connected, but the filter "below" is
  872|       |     * and not waiting on something, we are tunneling. */
  873|     91|    curl_socket_t sock = Curl_conn_cf_get_socket(cf, data);
  874|     91|    if(ts) {
  ------------------
  |  Branch (874:8): [True: 91, False: 0]
  ------------------
  875|       |      /* when we have sent a CONNECT to a proxy, we should rather either
  876|       |         wait for the socket to become readable to be able to get the
  877|       |         response headers or if we are still sending the request, wait
  878|       |         for write. */
  879|     91|      if(tunnel_want_send(ts))
  ------------------
  |  Branch (879:10): [True: 0, False: 91]
  ------------------
  880|      0|        result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  174|      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
  |  |  ------------------
  ------------------
  881|     91|      else
  882|     91|        result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  172|     91|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|     91|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|     91|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
  883|     91|    }
  884|      0|    else
  885|      0|      result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  174|      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|     91|  }
  887|     69|  else {
  888|     69|    if(cf->next)
  ------------------
  |  Branch (888:8): [True: 69, False: 0]
  ------------------
  889|     69|      result = cf->next->cft->adjust_pollset(cf->next, data, ps);
  890|     69|  }
  891|    160|  return result;
  892|    160|}
cf-h1-proxy.c:tunnel_want_send:
  227|     91|{
  228|     91|  return ts->tunnel_state == H1_TUNNEL_CONNECT;
  229|     91|}
cf-h1-proxy.c:cf_h1_proxy_data_pending:
  896|    305|{
  897|    305|  return cf->next ? cf->next->cft->has_data_pending(cf->next, data) : FALSE;
  ------------------
  |  | 1058|    305|#define FALSE false
  ------------------
  |  Branch (897:10): [True: 305, False: 0]
  ------------------
  898|    305|}
cf-h1-proxy.c:cf_h1_proxy_query:
  923|  2.12k|{
  924|  2.12k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  925|  2.12k|  struct h1_tunnel_state *ts = pctx ? pctx->ts : NULL;
  ------------------
  |  Branch (925:32): [True: 2.12k, False: 0]
  ------------------
  926|  2.12k|  switch(query) {
  927|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  177|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (927:3): [True: 0, False: 2.12k]
  ------------------
  928|      0|    if(!ts || !ts->dest)
  ------------------
  |  Branch (928:8): [True: 0, False: 0]
  |  Branch (928:15): [True: 0, False: 0]
  ------------------
  929|      0|      break;
  930|      0|    *pres1 = (int)ts->dest->port;
  931|      0|    *((const char **)pres2) = ts->dest->hostname;
  932|      0|    return CURLE_OK;
  933|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  181|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (933:3): [True: 0, False: 2.12k]
  ------------------
  934|      0|    const char **palpn = pres2;
  935|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (935:5): [True: 0, False: 0]
  |  Branch (935:5): [True: 0, False: 0]
  ------------------
  936|      0|    *palpn = NULL;
  937|      0|    return CURLE_OK;
  938|      0|  }
  939|  2.12k|  default:
  ------------------
  |  Branch (939:3): [True: 2.12k, False: 0]
  ------------------
  940|  2.12k|    break;
  941|  2.12k|  }
  942|  2.12k|  return cf->next ?
  ------------------
  |  Branch (942:10): [True: 2.12k, False: 0]
  ------------------
  943|  2.12k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  944|  2.12k|    CURLE_UNKNOWN_OPTION;
  945|  2.12k|}
cf-h1-proxy.c:tunnel_free:
  202|  1.84k|{
  203|  1.84k|  if(ts) {
  ------------------
  |  Branch (203:6): [True: 921, False: 921]
  ------------------
  204|    921|    Curl_peer_unlink(&ts->dest);
  205|    921|    curlx_dyn_free(&ts->rcvbuf);
  206|    921|    curlx_dyn_free(&ts->request_data);
  207|    921|    Curl_httpchunk_free(data, &ts->ch);
  208|    921|    curlx_free(ts);
  ------------------
  |  | 1483|    921|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  209|    921|  }
  210|  1.84k|}

Curl_cf_haproxy_insert_after:
  246|     18|{
  247|     18|  struct Curl_cfilter *cf;
  248|     18|  CURLcode result;
  249|       |
  250|     18|  result = cf_haproxy_create(&cf, data);
  251|     18|  if(result)
  ------------------
  |  Branch (251:6): [True: 0, False: 18]
  ------------------
  252|      0|    goto out;
  253|     18|  Curl_conn_cf_insert_after(cf_at, cf);
  254|       |
  255|     18|out:
  256|     18|  return result;
  257|     18|}
cf-haproxy.c:cf_haproxy_destroy:
  171|     18|{
  172|     18|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|     18|  do {                                          \
  |  |  154|     18|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     18|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     36|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 18, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     36|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     18|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     18|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     18|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 18]
  |  |  ------------------
  ------------------
  173|     18|  cf_haproxy_ctx_free(cf->ctx);
  174|     18|}
cf-haproxy.c:cf_haproxy_ctx_free:
   56|     36|{
   57|     36|  if(ctx) {
  ------------------
  |  Branch (57:6): [True: 18, False: 18]
  ------------------
   58|     18|    curlx_dyn_free(&ctx->data_out);
   59|     18|    curlx_free(ctx);
  ------------------
  |  | 1483|     18|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   60|     18|  }
   61|     36|}
cf-haproxy.c:cf_haproxy_connect:
  115|     18|{
  116|     18|  struct cf_haproxy_ctx *ctx = cf->ctx;
  117|     18|  CURLcode result;
  118|     18|  size_t len;
  119|       |
  120|     18|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|     18|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (120:3): [True: 0, False: 18]
  |  Branch (120:3): [True: 18, False: 0]
  ------------------
  121|     18|  if(cf->connected) {
  ------------------
  |  Branch (121:6): [True: 0, False: 18]
  ------------------
  122|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  123|      0|    return CURLE_OK;
  124|      0|  }
  125|       |
  126|     18|  result = cf->next->cft->do_connect(cf->next, data, done);
  127|     18|  if(result || !*done)
  ------------------
  |  Branch (127:6): [True: 0, False: 18]
  |  Branch (127:16): [True: 0, False: 18]
  ------------------
  128|      0|    return result;
  129|       |
  130|     18|  switch(ctx->state) {
  131|     18|  case HAPROXY_INIT:
  ------------------
  |  Branch (131:3): [True: 18, False: 0]
  ------------------
  132|     18|    result = cf_haproxy_date_out_set(cf, data);
  133|     18|    if(result)
  ------------------
  |  Branch (133:8): [True: 1, False: 17]
  ------------------
  134|      1|      goto out;
  135|     17|    ctx->state = HAPROXY_SEND;
  136|     17|    FALLTHROUGH();
  ------------------
  |  |  821|     17|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  137|     17|  case HAPROXY_SEND:
  ------------------
  |  Branch (137:3): [True: 0, False: 18]
  ------------------
  138|     17|    len = curlx_dyn_len(&ctx->data_out);
  139|     17|    if(len > 0) {
  ------------------
  |  Branch (139:8): [True: 17, False: 0]
  ------------------
  140|     17|      size_t nwritten;
  141|     17|      result = Curl_conn_cf_send(cf->next, data,
  142|     17|                                 curlx_dyn_uptr(&ctx->data_out), len, FALSE,
  ------------------
  |  | 1058|     17|#define FALSE false
  ------------------
  143|     17|                                 &nwritten);
  144|     17|      if(result) {
  ------------------
  |  Branch (144:10): [True: 0, False: 17]
  ------------------
  145|      0|        if(result != CURLE_AGAIN)
  ------------------
  |  Branch (145:12): [True: 0, False: 0]
  ------------------
  146|      0|          goto out;
  147|      0|        result = CURLE_OK;
  148|      0|        nwritten = 0;
  149|      0|      }
  150|     17|      curlx_dyn_tail(&ctx->data_out, len - nwritten);
  151|     17|      if(curlx_dyn_len(&ctx->data_out) > 0) {
  ------------------
  |  Branch (151:10): [True: 0, False: 17]
  ------------------
  152|      0|        result = CURLE_OK;
  153|      0|        goto out;
  154|      0|      }
  155|     17|    }
  156|     17|    ctx->state = HAPROXY_DONE;
  157|     17|    FALLTHROUGH();
  ------------------
  |  |  821|     17|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  158|     17|  default:
  ------------------
  |  Branch (158:3): [True: 0, False: 18]
  ------------------
  159|     17|    curlx_dyn_free(&ctx->data_out);
  160|     17|    break;
  161|     18|  }
  162|       |
  163|     18|out:
  164|     18|  *done = (!result) && (ctx->state == HAPROXY_DONE);
  ------------------
  |  Branch (164:11): [True: 17, False: 1]
  |  Branch (164:24): [True: 17, False: 0]
  ------------------
  165|     18|  cf->connected = *done;
  166|     18|  return result;
  167|     18|}
cf-haproxy.c:cf_haproxy_date_out_set:
   65|     18|{
   66|       |  /* We fake a client connection report to the upstream server
   67|       |   * with the HAProxy protocol, reporting the client's source
   68|       |   * and destination IP addresses and ports.
   69|       |   * addresses: either the ones used to talk to the upstream
   70|       |   *            OR the value supplied by the user
   71|       |   * ports: the ports used in the upstream connection */
   72|     18|  const char *client_source_ip;
   73|     18|  const char *client_dest_ip;
   74|     18|  struct cf_haproxy_ctx *ctx = cf->ctx;
   75|     18|  CURLcode result;
   76|     18|  struct ip_quadruple ipquad;
   77|     18|  bool is_ipv6;
   78|       |
   79|     18|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|     18|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 18]
  |  Branch (79:3): [True: 18, False: 0]
  ------------------
   80|     18|  DEBUGASSERT(ctx->state == HAPROXY_INIT);
  ------------------
  |  | 1081|     18|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (80:3): [True: 0, False: 18]
  |  Branch (80:3): [True: 18, False: 0]
  ------------------
   81|     18|#ifdef USE_UNIX_SOCKETS
   82|     18|  if(Curl_conn_get_first_peer(cf->conn, cf->sockindex)->unix_socket)
  ------------------
  |  Branch (82:6): [True: 1, False: 17]
  ------------------
   83|       |    /* the buffer is large enough to hold this! */
   84|      1|    result = curlx_dyn_addn(&ctx->data_out, STRCONST("PROXY UNKNOWN\r\n"));
  ------------------
  |  | 1292|      1|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   85|     17|  else {
   86|     17|#endif /* USE_UNIX_SOCKETS */
   87|     17|  result = Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad);
   88|     17|  if(result)
  ------------------
  |  Branch (88:6): [True: 0, False: 17]
  ------------------
   89|      0|    return result;
   90|       |
   91|     17|  if(data->set.str[STRING_HAPROXY_CLIENT_IP]) {
  ------------------
  |  Branch (91:6): [True: 12, False: 5]
  ------------------
   92|     12|    client_source_ip = data->set.str[STRING_HAPROXY_CLIENT_IP];
   93|     12|    client_dest_ip = client_source_ip;
   94|     12|    is_ipv6 = !Curl_is_ipv4addr(client_source_ip);
   95|     12|  }
   96|      5|  else {
   97|      5|    client_source_ip = ipquad.local_ip;
   98|      5|    client_dest_ip = ipquad.remote_ip;
   99|      5|  }
  100|       |
  101|     17|  result = curlx_dyn_addf(&ctx->data_out, "PROXY %s %s %s %i %i\r\n",
  102|     17|                          is_ipv6 ? "TCP6" : "TCP4",
  ------------------
  |  Branch (102:27): [True: 12, False: 5]
  ------------------
  103|     17|                          client_source_ip, client_dest_ip,
  104|     17|                          ipquad.local_port, ipquad.remote_port);
  105|       |
  106|     17|#ifdef USE_UNIX_SOCKETS
  107|     17|  }
  108|     18|#endif /* USE_UNIX_SOCKETS */
  109|     18|  return result;
  110|     18|}
cf-haproxy.c:cf_haproxy_close:
  178|      5|{
  179|      5|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|      5|  do {                                          \
  |  |  154|      5|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      5|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     10|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     10|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      5|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  180|      5|  cf->connected = FALSE;
  ------------------
  |  | 1058|      5|#define FALSE false
  ------------------
  181|      5|  cf_haproxy_ctx_reset(cf->ctx);
  182|      5|  if(cf->next)
  ------------------
  |  Branch (182:6): [True: 5, False: 0]
  ------------------
  183|      5|    cf->next->cft->do_close(cf->next, data);
  184|      5|}
cf-haproxy.c:cf_haproxy_ctx_reset:
   49|      5|{
   50|      5|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (50:3): [True: 0, False: 5]
  |  Branch (50:3): [True: 5, False: 0]
  ------------------
   51|      5|  ctx->state = HAPROXY_INIT;
   52|      5|  curlx_dyn_reset(&ctx->data_out);
   53|      5|}
cf-haproxy.c:cf_haproxy_adjust_pollset:
  189|      1|{
  190|      1|  if(cf->next->connected && !cf->connected) {
  ------------------
  |  Branch (190:6): [True: 1, False: 0]
  |  Branch (190:29): [True: 0, False: 1]
  ------------------
  191|       |    /* If we are not connected, but the filter "below" is
  192|       |     * and not waiting on something, we are sending. */
  193|      0|    return Curl_pollset_set_out_only(
  ------------------
  |  |  174|      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
  |  |  ------------------
  ------------------
  194|      0|      data, ps, Curl_conn_cf_get_socket(cf, data));
  195|      0|  }
  196|      1|  return CURLE_OK;
  197|      1|}
cf-haproxy.c:cf_haproxy_create:
  219|     18|{
  220|     18|  struct Curl_cfilter *cf = NULL;
  221|     18|  struct cf_haproxy_ctx *ctx;
  222|     18|  CURLcode result;
  223|       |
  224|     18|  (void)data;
  225|     18|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|     18|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  226|     18|  if(!ctx) {
  ------------------
  |  Branch (226:6): [True: 0, False: 18]
  ------------------
  227|      0|    result = CURLE_OUT_OF_MEMORY;
  228|      0|    goto out;
  229|      0|  }
  230|     18|  ctx->state = HAPROXY_INIT;
  231|     18|  curlx_dyn_init(&ctx->data_out, DYN_HAXPROXY);
  ------------------
  |  |   68|     18|#define DYN_HAXPROXY        2048
  ------------------
  232|       |
  233|     18|  result = Curl_cf_create(&cf, &Curl_cft_haproxy, ctx);
  234|     18|  if(result)
  ------------------
  |  Branch (234:6): [True: 0, False: 18]
  ------------------
  235|      0|    goto out;
  236|     18|  ctx = NULL;
  237|       |
  238|     18|out:
  239|     18|  cf_haproxy_ctx_free(ctx);
  240|     18|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (240:10): [True: 0, False: 18]
  ------------------
  241|     18|  return result;
  242|     18|}

Curl_cf_https_setup:
  820|    351|{
  821|    351|  CURLcode result = CURLE_OK;
  822|       |
  823|    351|  DEBUGASSERT(conn->scheme->protocol == CURLPROTO_HTTPS);
  ------------------
  |  | 1081|    351|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (823:3): [True: 0, False: 351]
  |  Branch (823:3): [True: 351, False: 0]
  ------------------
  824|       |
  825|    351|  if((conn->scheme->protocol != CURLPROTO_HTTPS) ||
  ------------------
  |  | 1079|    351|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (825:6): [True: 0, False: 351]
  ------------------
  826|    351|     !conn->bits.tls_enable_alpn)
  ------------------
  |  Branch (826:6): [True: 0, False: 351]
  ------------------
  827|      0|    goto out;
  828|       |
  829|    351|  result = cf_hc_add(data, conn, sockindex, conn->transport_wanted);
  830|       |
  831|    351|out:
  832|    351|  return result;
  833|    351|}
cf-https-connect.c:cf_hc_destroy:
  747|    351|{
  748|    351|  struct cf_hc_ctx *ctx = cf->ctx;
  749|       |
  750|    351|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|    351|  do {                                          \
  |  |  154|    351|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    351|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    702|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 351, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 351]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    702|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    351|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    351|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    351|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 351]
  |  |  ------------------
  ------------------
  751|    351|  cf_hc_ctx_destroy(data, ctx);
  752|    351|}
cf-https-connect.c:cf_hc_ctx_destroy:
  138|    702|{
  139|    702|  if(ctx) {
  ------------------
  |  Branch (139:6): [True: 351, False: 351]
  ------------------
  140|    351|    cf_hc_ctx_close(data, ctx);
  141|    351|    curlx_free(ctx);
  ------------------
  |  | 1483|    351|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  142|    351|  }
  143|    702|}
cf-https-connect.c:cf_hc_ctx_close:
  128|    702|{
  129|    702|  if(ctx) {
  ------------------
  |  Branch (129:6): [True: 702, False: 0]
  ------------------
  130|    702|    size_t i;
  131|    954|    for(i = 0; i < ctx->baller_count; ++i)
  ------------------
  |  Branch (131:16): [True: 252, False: 702]
  ------------------
  132|    252|      cf_hc_baller_discard(&ctx->ballers[i], data);
  133|    702|  }
  134|    702|}
cf-https-connect.c:cf_hc_baller_discard:
   63|    252|{
   64|    252|  if(b->cf) {
  ------------------
  |  Branch (64:6): [True: 126, False: 126]
  ------------------
   65|    126|    Curl_conn_cf_close(b->cf, data);
   66|    126|    Curl_conn_cf_discard_chain(&b->cf, data);
   67|       |    b->cf = NULL;
   68|    126|  }
   69|    252|}
cf-https-connect.c:cf_hc_connect:
  484|  94.7k|{
  485|  94.7k|  struct cf_hc_ctx *ctx = cf->ctx;
  486|  94.7k|  CURLcode result = CURLE_OK;
  487|       |
  488|  94.7k|  if(cf->connected) {
  ------------------
  |  Branch (488:6): [True: 0, False: 94.7k]
  ------------------
  489|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  490|      0|    return CURLE_OK;
  491|      0|  }
  492|       |
  493|  94.7k|  *done = FALSE;
  ------------------
  |  | 1058|  94.7k|#define FALSE false
  ------------------
  494|       |
  495|  94.7k|  if(!ctx->httpsrr_resolved) {
  ------------------
  |  Branch (495:6): [True: 126, False: 94.6k]
  ------------------
  496|    126|    ctx->httpsrr_resolved = Curl_conn_dns_resolved_https(data, cf->sockindex);
  ------------------
  |  |   66|    126|#define Curl_conn_dns_resolved_https(a, b)   TRUE
  |  |  ------------------
  |  |  |  | 1055|    126|#define TRUE true
  |  |  ------------------
  ------------------
  497|    126|#ifdef DEBUGBUILD
  498|    126|    if(!ctx->httpsrr_resolved && getenv("CURL_DBG_AWAIT_HTTPSRR")) {
  ------------------
  |  Branch (498:8): [True: 0, False: 126]
  |  Branch (498:34): [True: 0, False: 0]
  ------------------
  499|      0|      CURL_TRC_CF(data, cf, "awaiting HTTPS-RR");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  500|      0|      return CURLE_OK;
  501|      0|    }
  502|    126|#endif
  503|    126|  }
  504|       |
  505|  94.7k|  switch(ctx->state) {
  ------------------
  |  Branch (505:10): [True: 94.7k, False: 0]
  ------------------
  506|    126|  case CF_HC_RESOLV:
  ------------------
  |  Branch (506:3): [True: 126, False: 94.6k]
  ------------------
  507|    126|    ctx->state = CF_HC_INIT;
  508|    126|    FALLTHROUGH();
  ------------------
  |  |  821|    126|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  509|       |
  510|    126|  case CF_HC_INIT:
  ------------------
  |  Branch (510:3): [True: 0, False: 94.7k]
  ------------------
  511|    126|    DEBUGASSERT(!cf->next);
  ------------------
  |  | 1081|    126|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (511:5): [True: 0, False: 126]
  |  Branch (511:5): [True: 126, False: 0]
  ------------------
  512|    126|    CURL_TRC_CF(data, cf, "connect, init");
  ------------------
  |  |  153|    126|  do {                                          \
  |  |  154|    126|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    126|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    252|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 126, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 126]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    252|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    126|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    126|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    126|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 126]
  |  |  ------------------
  ------------------
  513|    126|    result = cf_hc_set_baller1(cf, data);
  514|    126|    if(result) {
  ------------------
  |  Branch (514:8): [True: 0, False: 126]
  ------------------
  515|      0|      ctx->result = result;
  516|      0|      ctx->state = CF_HC_FAILURE;
  517|      0|      goto out;
  518|      0|    }
  519|    126|    cf_hc_set_baller2(cf, data);
  520|    126|    ctx->started = *Curl_pgrs_now(data);
  521|    126|    cf_hc_baller_init(&ctx->ballers[0], cf, data);
  522|    126|    if((ctx->baller_count > 1) || !ctx->ballers_complete) {
  ------------------
  |  Branch (522:8): [True: 0, False: 126]
  |  Branch (522:35): [True: 0, False: 126]
  ------------------
  523|      0|      Curl_expire(data, ctx->soft_eyeballs_timeout_ms, EXPIRE_ALPN_EYEBALLS);
  524|      0|    }
  525|    126|    ctx->state = CF_HC_CONNECT;
  526|    126|    FALLTHROUGH();
  ------------------
  |  |  821|    126|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  527|       |
  528|  94.7k|  case CF_HC_CONNECT:
  ------------------
  |  Branch (528:3): [True: 94.6k, False: 126]
  ------------------
  529|  94.7k|    if(!ctx->ballers_complete)
  ------------------
  |  Branch (529:8): [True: 0, False: 94.7k]
  ------------------
  530|      0|      cf_hc_set_baller2(cf, data);
  531|       |
  532|  94.7k|    if(cf_hc_baller_is_connecting(&ctx->ballers[0])) {
  ------------------
  |  Branch (532:8): [True: 94.7k, False: 0]
  ------------------
  533|  94.7k|      result = cf_hc_baller_connect(&ctx->ballers[0], cf, data, done);
  534|  94.7k|      if(!result && *done) {
  ------------------
  |  Branch (534:10): [True: 94.7k, False: 38]
  |  Branch (534:21): [True: 0, False: 94.7k]
  ------------------
  535|      0|        result = baller_connected(cf, data, &ctx->ballers[0]);
  536|      0|        goto out;
  537|      0|      }
  538|  94.7k|    }
  539|       |
  540|  94.7k|    if(time_to_start_baller2(cf, data)) {
  ------------------
  |  Branch (540:8): [True: 0, False: 94.7k]
  ------------------
  541|      0|      cf_hc_baller_init(&ctx->ballers[1], cf, data);
  542|      0|    }
  543|       |
  544|  94.7k|    if(cf_hc_baller_is_connecting(&ctx->ballers[1])) {
  ------------------
  |  Branch (544:8): [True: 0, False: 94.7k]
  ------------------
  545|      0|      result = cf_hc_baller_connect(&ctx->ballers[1], cf, data, done);
  546|      0|      if(!result && *done) {
  ------------------
  |  Branch (546:10): [True: 0, False: 0]
  |  Branch (546:21): [True: 0, False: 0]
  ------------------
  547|      0|        result = baller_connected(cf, data, &ctx->ballers[1]);
  548|      0|        goto out;
  549|      0|      }
  550|      0|    }
  551|       |
  552|  94.7k|    if(ctx->ballers[0].result &&
  ------------------
  |  Branch (552:8): [True: 38, False: 94.7k]
  ------------------
  553|     38|       (ctx->ballers[1].result ||
  ------------------
  |  Branch (553:9): [True: 0, False: 38]
  ------------------
  554|     38|        (ctx->ballers_complete && (ctx->baller_count < 2)))) {
  ------------------
  |  Branch (554:10): [True: 38, False: 0]
  |  Branch (554:35): [True: 38, False: 0]
  ------------------
  555|       |      /* all have failed. we give up */
  556|     38|      CURL_TRC_CF(data, cf, "connect, all attempts failed");
  ------------------
  |  |  153|     38|  do {                                          \
  |  |  154|     38|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     38|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     76|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 38, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     76|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     38|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     38|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     38|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 38]
  |  |  ------------------
  ------------------
  557|     38|      ctx->result = result = ctx->ballers[0].result;
  558|     38|      ctx->state = CF_HC_FAILURE;
  559|     38|      goto out;
  560|     38|    }
  561|  94.7k|    result = CURLE_OK;
  562|  94.7k|    *done = FALSE;
  ------------------
  |  | 1058|  94.7k|#define FALSE false
  ------------------
  563|  94.7k|    break;
  564|       |
  565|      0|  case CF_HC_FAILURE:
  ------------------
  |  Branch (565:3): [True: 0, False: 94.7k]
  ------------------
  566|      0|    result = ctx->result;
  567|      0|    cf->connected = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  568|      0|    *done = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  569|      0|    break;
  570|       |
  571|      0|  case CF_HC_SUCCESS:
  ------------------
  |  Branch (571:3): [True: 0, False: 94.7k]
  ------------------
  572|      0|    result = CURLE_OK;
  573|      0|    cf->connected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  574|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  575|      0|    break;
  576|  94.7k|  }
  577|       |
  578|  94.7k|out:
  579|  94.7k|  CURL_TRC_CF(data, cf, "connect -> %d, done=%d", result, *done);
  ------------------
  |  |  153|  94.7k|  do {                                          \
  |  |  154|  94.7k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  94.7k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   189k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 94.7k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 94.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   189k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  94.7k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  94.7k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  94.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 94.7k]
  |  |  ------------------
  ------------------
  580|  94.7k|  return result;
  581|  94.7k|}
cf-https-connect.c:cf_hc_set_baller1:
  394|    126|{
  395|    126|  struct cf_hc_ctx *ctx = cf->ctx;
  396|    126|  enum alpnid alpn1 = ALPN_none;
  397|    126|  VERBOSE(const char *source = "HTTPS-RR");
  ------------------
  |  | 1618|    126|#define VERBOSE(x) x
  ------------------
  398|       |
  399|    126|  DEBUGASSERT(cf->conn->bits.tls_enable_alpn);
  ------------------
  |  | 1081|    126|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (399:3): [True: 0, False: 126]
  |  Branch (399:3): [True: 126, False: 0]
  ------------------
  400|       |
  401|    126|  alpn1 = cf_hc_get_httpsrr_alpn(cf, data, ALPN_none);
  402|    126|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (402:6): [True: 126, False: 0]
  ------------------
  403|       |    /* preference is configured and allowed, can we use it? */
  404|    126|    VERBOSE(source = "preferred version");
  ------------------
  |  | 1618|    126|#define VERBOSE(x) x
  ------------------
  405|    126|    alpn1 = cf_hc_get_pref_alpn(cf, data, ALPN_none);
  406|    126|  }
  407|    126|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (407:6): [True: 126, False: 0]
  ------------------
  408|    126|    VERBOSE(source = "wanted versions");
  ------------------
  |  | 1618|    126|#define VERBOSE(x) x
  ------------------
  409|    126|    alpn1 = cf_hc_get_first_alpn(cf, data,
  410|    126|                                 data->state.http_neg.wanted,
  411|    126|                                 ALPN_none);
  412|    126|  }
  413|    126|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (413:6): [True: 0, False: 126]
  ------------------
  414|      0|    VERBOSE(source = "allowed versions");
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
  415|      0|    alpn1 = cf_hc_get_first_alpn(cf, data,
  416|      0|                                 data->state.http_neg.allowed,
  417|      0|                                 ALPN_none);
  418|      0|  }
  419|       |
  420|    126|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (420:6): [True: 0, False: 126]
  ------------------
  421|       |    /* None of the wanted/allowed HTTP versions could be chosen */
  422|      0|    if(ctx->check_h3_result) {
  ------------------
  |  Branch (422:8): [True: 0, False: 0]
  ------------------
  423|      0|      CURL_TRC_CF(data, cf, "unable to use HTTP/3");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  424|      0|      return ctx->check_h3_result;
  425|      0|    }
  426|      0|    CURL_TRC_CF(data, cf, "unable to select HTTP version");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  427|      0|    return CURLE_FAILED_INIT;
  428|      0|  }
  429|       |
  430|    126|  cf_hc_baller_assign(&ctx->ballers[0], alpn1, ctx->def_transport);
  431|    126|  ctx->baller_count = 1;
  432|    126|  CURL_TRC_CF(data, cf, "1st attempt uses %s from %s",
  ------------------
  |  |  153|    126|  do {                                          \
  |  |  154|    126|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    126|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    252|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 126, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 126]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    252|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    126|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    126|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    126|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 126]
  |  |  ------------------
  ------------------
  433|    126|              ctx->ballers[0].name, source);
  434|       |
  435|    126|  switch(alpn1) {
  436|      0|  case ALPN_h1:
  ------------------
  |  Branch (436:3): [True: 0, False: 126]
  ------------------
  437|       |    /* We really want h1, switch off h2 to make it disappear in ALPN */
  438|      0|    data->state.http_neg.wanted &= (uint8_t)~CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  439|      0|    break;
  440|    126|  default:
  ------------------
  |  Branch (440:3): [True: 126, False: 0]
  ------------------
  441|    126|    break;
  442|    126|  }
  443|       |
  444|    126|  return CURLE_OK;
  445|    126|}
cf-https-connect.c:cf_hc_get_httpsrr_alpn:
  297|    252|{
  298|       |#ifdef USE_HTTPSRR
  299|       |  /* Is there an HTTPSRR use its ALPNs here.
  300|       |   * We are here after having selected a connection to a host+port and
  301|       |   * can no longer change that. Any HTTPSRR advice for other hosts and ports
  302|       |   * we need to ignore. */
  303|       |  const struct Curl_https_rrinfo *rr;
  304|       |  size_t i;
  305|       |
  306|       |  /* Do we have HTTPS-RR information? */
  307|       |  rr = Curl_conn_dns_get_https(data, cf->sockindex);
  308|       |
  309|       |  /* We do not support `rr->no_def_alpn`. */
  310|       |  if(Curl_httpsrr_applicable(data, rr) && !rr->no_def_alpn) {
  311|       |    for(i = 0; i < CURL_ARRAYSIZE(rr->alpns); ++i) {
  312|       |      enum alpnid alpn_rr = (enum alpnid)rr->alpns[i];
  313|       |      if(alpn_rr == not_this_one) /* don't want this one */
  314|       |        continue;
  315|       |      switch(alpn_rr) {
  316|       |      case ALPN_h3:
  317|       |        if((data->state.http_neg.allowed & CURL_HTTP_V3x) &&
  318|       |           cf_hc_may_h3(cf, data)) {
  319|       |          return alpn_rr;
  320|       |        }
  321|       |        break;
  322|       |      case ALPN_h2:
  323|       |        if(data->state.http_neg.allowed & CURL_HTTP_V2x) {
  324|       |          return alpn_rr;
  325|       |        }
  326|       |        break;
  327|       |      case ALPN_h1:
  328|       |        if(data->state.http_neg.allowed & CURL_HTTP_V1x) {
  329|       |          return alpn_rr;
  330|       |        }
  331|       |        break;
  332|       |      default: /* ignore */
  333|       |        break;
  334|       |      }
  335|       |    }
  336|       |  }
  337|       |#else
  338|    252|  (void)cf;
  339|    252|  (void)data;
  340|    252|  (void)not_this_one;
  341|    252|#endif
  342|    252|  return ALPN_none;
  343|    252|}
cf-https-connect.c:cf_hc_get_pref_alpn:
  348|    252|{
  349|    252|  if((data->state.http_neg.preferred & data->state.http_neg.allowed)) {
  ------------------
  |  Branch (349:6): [True: 0, False: 252]
  ------------------
  350|      0|    switch(data->state.http_neg.preferred) {
  351|      0|    case CURL_HTTP_V3x:
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (351:5): [True: 0, False: 0]
  ------------------
  352|      0|      if(cf_hc_may_h3(cf, data) && (ALPN_h3 != not_this_one))
  ------------------
  |  Branch (352:10): [True: 0, False: 0]
  |  Branch (352:36): [True: 0, False: 0]
  ------------------
  353|      0|        return ALPN_h3;
  354|      0|      break;
  355|      0|    case CURL_HTTP_V2x:
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (355:5): [True: 0, False: 0]
  ------------------
  356|      0|      if(ALPN_h2 != not_this_one)
  ------------------
  |  Branch (356:10): [True: 0, False: 0]
  ------------------
  357|      0|        return ALPN_h2;
  358|      0|      break;
  359|      0|    case CURL_HTTP_V1x:
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (359:5): [True: 0, False: 0]
  ------------------
  360|       |      /* If we are trying h2 already, h1 is already used as fallback */
  361|      0|      if((ALPN_h1 != not_this_one) && (ALPN_h2 != not_this_one))
  ------------------
  |  Branch (361:10): [True: 0, False: 0]
  |  Branch (361:39): [True: 0, False: 0]
  ------------------
  362|      0|        return ALPN_h1;
  363|      0|      break;
  364|      0|    default:
  ------------------
  |  Branch (364:5): [True: 0, False: 0]
  ------------------
  365|      0|      break;
  366|      0|    }
  367|      0|  }
  368|    252|  return ALPN_none;
  369|    252|}
cf-https-connect.c:cf_hc_get_first_alpn:
  375|    252|{
  376|       |  /* When told to not try h2, we also do not try h1 and vice versa */
  377|    252|  bool allow_h1_or_h2 = (not_this_one != ALPN_h1) &&
  ------------------
  |  Branch (377:25): [True: 252, False: 0]
  ------------------
  378|    252|                        (not_this_one != ALPN_h2);
  ------------------
  |  Branch (378:25): [True: 126, False: 126]
  ------------------
  379|    252|  if((ALPN_h3 != not_this_one) && (choices & CURL_HTTP_V3x) &&
  ------------------
  |  |   42|    252|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (379:6): [True: 252, False: 0]
  |  Branch (379:35): [True: 0, False: 252]
  ------------------
  380|      0|     cf_hc_may_h3(cf, data)) {
  ------------------
  |  Branch (380:6): [True: 0, False: 0]
  ------------------
  381|      0|    return ALPN_h3;
  382|      0|  }
  383|    252|  if(allow_h1_or_h2 && (choices & CURL_HTTP_V2x)) {
  ------------------
  |  |   41|    126|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (383:6): [True: 126, False: 126]
  |  Branch (383:24): [True: 126, False: 0]
  ------------------
  384|    126|    return ALPN_h2;
  385|    126|  }
  386|    126|  if(allow_h1_or_h2 && (choices & CURL_HTTP_V1x)) {
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (386:6): [True: 0, False: 126]
  |  Branch (386:24): [True: 0, False: 0]
  ------------------
  387|      0|    return ALPN_h1;
  388|      0|  }
  389|    126|  return ALPN_none;
  390|    126|}
cf-https-connect.c:cf_hc_baller_assign:
  148|    126|{
  149|    126|  b->alpn_id = alpn_id;
  150|    126|  b->transport = def_transport;
  151|    126|  b->cf = NULL;
  152|    126|  b->result = CURLE_OK;
  153|    126|  b->reply_ms = -1;
  154|    126|  b->shutdown = FALSE;
  ------------------
  |  | 1058|    126|#define FALSE false
  ------------------
  155|    126|  switch(b->alpn_id) {
  156|      0|  case ALPN_h3:
  ------------------
  |  Branch (156:3): [True: 0, False: 126]
  ------------------
  157|      0|    b->name = "h3";
  158|      0|    b->transport = TRNSPRT_QUIC;
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  159|      0|    break;
  160|    126|  case ALPN_h2:
  ------------------
  |  Branch (160:3): [True: 126, False: 0]
  ------------------
  161|    126|    b->name = "h2";
  162|    126|    break;
  163|      0|  case ALPN_h1:
  ------------------
  |  Branch (163:3): [True: 0, False: 126]
  ------------------
  164|      0|    b->name = "h1";
  165|      0|    break;
  166|      0|  case ALPN_none:
  ------------------
  |  Branch (166:3): [True: 0, False: 126]
  ------------------
  167|      0|    b->name = "no-alpn";
  168|      0|    break;
  169|      0|  default:
  ------------------
  |  Branch (169:3): [True: 0, False: 126]
  ------------------
  170|      0|    b->result = CURLE_FAILED_INIT;
  171|      0|    break;
  172|    126|  }
  173|    126|}
cf-https-connect.c:cf_hc_set_baller2:
  449|    126|{
  450|    126|  struct cf_hc_ctx *ctx = cf->ctx;
  451|    126|  enum alpnid alpn2 = ALPN_none, alpn1 = ctx->ballers[0].alpn_id;
  452|    126|  VERBOSE(const char *source = "HTTPS-RR");
  ------------------
  |  | 1618|    126|#define VERBOSE(x) x
  ------------------
  453|       |
  454|    126|  if(ctx->ballers_complete)
  ------------------
  |  Branch (454:6): [True: 0, False: 126]
  ------------------
  455|      0|    return; /* already done */
  456|    126|  if(!ctx->httpsrr_resolved)
  ------------------
  |  Branch (456:6): [True: 0, False: 126]
  ------------------
  457|      0|    return; /* HTTPS-RR pending */
  458|       |
  459|    126|  alpn2 = cf_hc_get_httpsrr_alpn(cf, data, alpn1);
  460|    126|  if(alpn2 == ALPN_none) {
  ------------------
  |  Branch (460:6): [True: 126, False: 0]
  ------------------
  461|       |    /* preference is configured and allowed, can we use it? */
  462|    126|    VERBOSE(source = "preferred version");
  ------------------
  |  | 1618|    126|#define VERBOSE(x) x
  ------------------
  463|    126|    alpn2 = cf_hc_get_pref_alpn(cf, data, alpn1);
  464|    126|  }
  465|    126|  if(alpn2 == ALPN_none) {
  ------------------
  |  Branch (465:6): [True: 126, False: 0]
  ------------------
  466|    126|    VERBOSE(source = "wanted versions");
  ------------------
  |  | 1618|    126|#define VERBOSE(x) x
  ------------------
  467|    126|    alpn2 = cf_hc_get_first_alpn(cf, data,
  468|    126|                                 data->state.http_neg.wanted,
  469|    126|                                 alpn1);
  470|    126|  }
  471|       |
  472|    126|  if(alpn2 != ALPN_none) {
  ------------------
  |  Branch (472:6): [True: 0, False: 126]
  ------------------
  473|      0|    cf_hc_baller_assign(&ctx->ballers[1], alpn2, ctx->def_transport);
  474|      0|    ctx->baller_count = 2;
  475|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  476|      0|                ctx->ballers[1].name, source);
  477|      0|  }
  478|       |  ctx->ballers_complete = TRUE;
  ------------------
  |  | 1055|    126|#define TRUE true
  ------------------
  479|    126|}
cf-https-connect.c:cf_hc_baller_init:
  178|    126|{
  179|    126|  struct Curl_cfilter *save = cf->next;
  180|       |
  181|    126|  cf->next = NULL;
  182|    126|  b->started = *Curl_pgrs_now(data);
  183|    126|  b->result = Curl_cf_setup_insert_after(cf, data, b->transport,
  184|    126|                                         CURL_CF_SSL_ENABLE);
  ------------------
  |  |  365|    126|#define CURL_CF_SSL_ENABLE   1
  ------------------
  185|    126|  b->cf = cf->next;
  186|    126|  cf->next = save;
  187|    126|}
cf-https-connect.c:cf_hc_baller_is_connecting:
   72|   284k|{
   73|   284k|  return b->cf && !b->result;
  ------------------
  |  Branch (73:10): [True: 189k, False: 94.7k]
  |  Branch (73:19): [True: 189k, False: 0]
  ------------------
   74|   284k|}
cf-https-connect.c:cf_hc_baller_connect:
  193|  94.7k|{
  194|  94.7k|  struct Curl_cfilter *save = cf->next;
  195|       |
  196|  94.7k|  cf->next = b->cf;
  197|  94.7k|  b->result = Curl_conn_cf_connect(cf->next, data, done);
  198|  94.7k|  b->cf = cf->next; /* it might mutate */
  199|  94.7k|  cf->next = save;
  200|  94.7k|  return b->result;
  201|  94.7k|}
cf-https-connect.c:time_to_start_baller2:
  249|  94.7k|{
  250|  94.7k|  struct cf_hc_ctx *ctx = cf->ctx;
  251|  94.7k|  timediff_t elapsed_ms;
  252|       |
  253|  94.7k|  if(ctx->baller_count < 2)
  ------------------
  |  Branch (253:6): [True: 94.7k, False: 0]
  ------------------
  254|  94.7k|    return FALSE;
  ------------------
  |  | 1058|  94.7k|#define FALSE false
  ------------------
  255|      0|  else if(cf_hc_baller_has_started(&ctx->ballers[1]))
  ------------------
  |  Branch (255:11): [True: 0, False: 0]
  ------------------
  256|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  257|      0|  else if(ctx->ballers[0].result) {
  ------------------
  |  Branch (257:11): [True: 0, False: 0]
  ------------------
  258|      0|    CURL_TRC_CF(data, cf, "%s baller failed, starting %s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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|                ctx->ballers[0].name, ctx->ballers[1].name);
  260|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  261|      0|  }
  262|       |
  263|      0|  elapsed_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &ctx->started);
  264|      0|  if(elapsed_ms >= ctx->hard_eyeballs_timeout_ms) {
  ------------------
  |  Branch (264:6): [True: 0, False: 0]
  ------------------
  265|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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|                "starting %s", ctx->ballers[0].name,
  267|      0|                ctx->hard_eyeballs_timeout_ms, ctx->ballers[1].name);
  268|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  269|      0|  }
  270|      0|  else if(elapsed_ms >= ctx->soft_eyeballs_timeout_ms) {
  ------------------
  |  Branch (270:11): [True: 0, False: 0]
  ------------------
  271|      0|    if(cf_hc_baller_reply_ms(&ctx->ballers[0], data) < 0) {
  ------------------
  |  Branch (271:8): [True: 0, False: 0]
  ------------------
  272|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  273|      0|                  FMT_TIMEDIFF_T "ms, starting %s",
  274|      0|                  ctx->ballers[0].name, ctx->soft_eyeballs_timeout_ms,
  275|      0|                  ctx->ballers[1].name);
  276|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  277|      0|    }
  278|      0|  }
  279|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  280|      0|}
cf-https-connect.c:cf_hc_close:
  735|    351|{
  736|    351|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|    351|  do {                                          \
  |  |  154|    351|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    351|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    702|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 351, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 351]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    702|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    351|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    351|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    351|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 351]
  |  |  ------------------
  ------------------
  737|    351|  cf_hc_ctx_close(data, cf->ctx);
  738|    351|  cf->connected = FALSE;
  ------------------
  |  | 1058|    351|#define FALSE false
  ------------------
  739|       |
  740|    351|  if(cf->next) {
  ------------------
  |  Branch (740:6): [True: 0, False: 351]
  ------------------
  741|      0|    cf->next->cft->do_close(cf->next, data);
  742|      0|    Curl_conn_cf_discard_chain(&cf->next, data);
  743|      0|  }
  744|    351|}
cf-https-connect.c:cf_hc_adjust_pollset:
  626|   152k|{
  627|   152k|  CURLcode result = CURLE_OK;
  628|   152k|  if(!cf->connected) {
  ------------------
  |  Branch (628:6): [True: 152k, False: 0]
  ------------------
  629|   152k|    struct cf_hc_ctx *ctx = cf->ctx;
  630|   152k|    size_t i;
  631|       |
  632|   246k|    for(i = 0; (i < ctx->baller_count) && !result; i++) {
  ------------------
  |  Branch (632:16): [True: 94.7k, False: 152k]
  |  Branch (632:43): [True: 94.7k, False: 0]
  ------------------
  633|  94.7k|      struct cf_hc_baller *b = &ctx->ballers[i];
  634|  94.7k|      if(!cf_hc_baller_is_connecting(b))
  ------------------
  |  Branch (634:10): [True: 0, False: 94.7k]
  ------------------
  635|      0|        continue;
  636|  94.7k|      result = Curl_conn_cf_adjust_pollset(b->cf, data, ps);
  637|  94.7k|    }
  638|   152k|    CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", result, ps->n);
  ------------------
  |  |  153|   152k|  do {                                          \
  |  |  154|   152k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   152k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   304k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 152k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 152k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   304k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   152k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   152k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   152k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 152k]
  |  |  ------------------
  ------------------
  639|   152k|  }
  640|   152k|  return result;
  641|   152k|}
cf-https-connect.c:cf_hc_cntrl:
  717|    351|{
  718|    351|  struct cf_hc_ctx *ctx = cf->ctx;
  719|    351|  CURLcode result = CURLE_OK;
  720|    351|  size_t i;
  721|       |
  722|    351|  if(!cf->connected) {
  ------------------
  |  Branch (722:6): [True: 351, False: 0]
  ------------------
  723|    477|    for(i = 0; i < ctx->baller_count; i++) {
  ------------------
  |  Branch (723:16): [True: 126, False: 351]
  ------------------
  724|    126|      result = cf_hc_baller_cntrl(&ctx->ballers[i], data, event, arg1, arg2);
  725|    126|      if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (725:10): [True: 0, False: 126]
  |  Branch (725:20): [True: 0, False: 0]
  ------------------
  726|      0|        goto out;
  727|    126|    }
  728|    351|    result = CURLE_OK;
  729|    351|  }
  730|    351|out:
  731|    351|  return result;
  732|    351|}
cf-https-connect.c:cf_hc_baller_cntrl:
  105|    126|{
  106|    126|  if(b->cf && !b->result)
  ------------------
  |  Branch (106:6): [True: 126, False: 0]
  |  Branch (106:15): [True: 88, False: 38]
  ------------------
  107|     88|    return Curl_conn_cf_cntrl(b->cf, data, FALSE, event, arg1, arg2);
  ------------------
  |  | 1058|     88|#define FALSE false
  ------------------
  108|     38|  return CURLE_OK;
  109|    126|}
cf-https-connect.c:cf_hc_query:
  681|   305k|{
  682|   305k|  struct cf_hc_ctx *ctx = cf->ctx;
  683|   305k|  size_t i;
  684|       |
  685|   305k|  if(!cf->connected) {
  ------------------
  |  Branch (685:6): [True: 305k, False: 0]
  ------------------
  686|   305k|    switch(query) {
  687|    237|    case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  168|    237|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (687:5): [True: 237, False: 304k]
  ------------------
  688|    237|      struct curltime *when = pres2;
  689|    237|      *when = cf_get_max_baller_time(cf, data, CF_QUERY_TIMER_CONNECT);
  ------------------
  |  |  168|    237|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  690|    237|      return CURLE_OK;
  691|      0|    }
  692|    237|    case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  169|    237|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (692:5): [True: 237, False: 304k]
  ------------------
  693|    237|      struct curltime *when = pres2;
  694|    237|      *when = cf_get_max_baller_time(cf, data, CF_QUERY_TIMER_APPCONNECT);
  ------------------
  |  |  169|    237|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  695|    237|      return CURLE_OK;
  696|      0|    }
  697|   152k|    case CF_QUERY_NEED_FLUSH: {
  ------------------
  |  |  171|   152k|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (697:5): [True: 152k, False: 152k]
  ------------------
  698|   247k|      for(i = 0; i < ctx->baller_count; i++)
  ------------------
  |  Branch (698:18): [True: 94.6k, False: 152k]
  ------------------
  699|  94.6k|        if(cf_hc_baller_needs_flush(&ctx->ballers[i], data)) {
  ------------------
  |  Branch (699:12): [True: 0, False: 94.6k]
  ------------------
  700|      0|          *pres1 = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  701|      0|          return CURLE_OK;
  702|      0|        }
  703|   152k|      break;
  704|   152k|    }
  705|   152k|    default:
  ------------------
  |  Branch (705:5): [True: 152k, False: 152k]
  ------------------
  706|   152k|      break;
  707|   305k|    }
  708|   305k|  }
  709|   304k|  return cf->next ?
  ------------------
  |  Branch (709:10): [True: 0, False: 304k]
  ------------------
  710|      0|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  711|   304k|    CURLE_UNKNOWN_OPTION;
  712|   305k|}
cf-https-connect.c:cf_get_max_baller_time:
  661|    474|{
  662|    474|  struct cf_hc_ctx *ctx = cf->ctx;
  663|    474|  struct curltime t, tmax;
  664|    474|  size_t i;
  665|       |
  666|    474|  memset(&tmax, 0, sizeof(tmax));
  667|    654|  for(i = 0; i < ctx->baller_count; i++) {
  ------------------
  |  Branch (667:14): [True: 180, False: 474]
  ------------------
  668|    180|    struct Curl_cfilter *cfb = ctx->ballers[i].cf;
  669|    180|    memset(&t, 0, sizeof(t));
  670|    180|    if(cfb && !cfb->cft->query(cfb, data, query, NULL, &t)) {
  ------------------
  |  Branch (670:8): [True: 180, False: 0]
  |  Branch (670:15): [True: 180, False: 0]
  ------------------
  671|    180|      if((t.tv_sec || t.tv_usec) && curlx_ptimediff_us(&t, &tmax) > 0)
  ------------------
  |  Branch (671:11): [True: 0, False: 180]
  |  Branch (671:23): [True: 0, False: 180]
  |  Branch (671:37): [True: 0, False: 0]
  ------------------
  672|      0|        tmax = t;
  673|    180|    }
  674|    180|  }
  675|    474|  return tmax;
  676|    474|}
cf-https-connect.c:cf_hc_baller_needs_flush:
   98|  94.6k|{
   99|  94.6k|  return b->cf && !b->result && Curl_conn_cf_needs_flush(b->cf, data);
  ------------------
  |  Branch (99:10): [True: 94.6k, False: 0]
  |  Branch (99:19): [True: 94.6k, False: 0]
  |  Branch (99:33): [True: 0, False: 94.6k]
  ------------------
  100|  94.6k|}
cf-https-connect.c:cf_hc_add:
  804|    351|{
  805|    351|  struct Curl_cfilter *cf;
  806|    351|  CURLcode result = CURLE_OK;
  807|       |
  808|    351|  DEBUGASSERT(data);
  ------------------
  |  | 1081|    351|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (808:3): [True: 0, False: 351]
  |  Branch (808:3): [True: 351, False: 0]
  ------------------
  809|    351|  result = cf_hc_create(&cf, data, def_transport);
  810|    351|  if(result)
  ------------------
  |  Branch (810:6): [True: 0, False: 351]
  ------------------
  811|      0|    goto out;
  812|    351|  Curl_conn_cf_add(data, conn, sockindex, cf);
  813|    351|out:
  814|    351|  return result;
  815|    351|}
cf-https-connect.c:cf_hc_create:
  775|    351|{
  776|    351|  struct Curl_cfilter *cf = NULL;
  777|    351|  struct cf_hc_ctx *ctx;
  778|    351|  CURLcode result = CURLE_OK;
  779|       |
  780|    351|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|    351|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  781|    351|  if(!ctx) {
  ------------------
  |  Branch (781:6): [True: 0, False: 351]
  ------------------
  782|      0|    result = CURLE_OUT_OF_MEMORY;
  783|      0|    goto out;
  784|      0|  }
  785|    351|  ctx->def_transport = def_transport;
  786|    351|  ctx->hard_eyeballs_timeout_ms = data->set.happy_eyeballs_timeout;
  787|    351|  ctx->soft_eyeballs_timeout_ms = data->set.happy_eyeballs_timeout / 2;
  788|       |
  789|    351|  result = Curl_cf_create(&cf, &Curl_cft_http_connect, ctx);
  790|    351|  if(result)
  ------------------
  |  Branch (790:6): [True: 0, False: 351]
  ------------------
  791|      0|    goto out;
  792|    351|  ctx = NULL;
  793|       |
  794|    351|out:
  795|    351|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (795:10): [True: 0, False: 351]
  ------------------
  796|    351|  cf_hc_ctx_destroy(data, ctx);
  797|    351|  return result;
  798|    351|}

cf_ip_happy_insert_after:
 1036|  5.46k|{
 1037|  5.46k|  cf_ip_connect_create *cf_create;
 1038|  5.46k|  struct Curl_cfilter *cf;
 1039|  5.46k|  CURLcode result;
 1040|       |
 1041|       |  /* Need to be first */
 1042|  5.46k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1081|  5.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1042:3): [True: 0, False: 5.46k]
  |  Branch (1042:3): [True: 5.46k, False: 0]
  ------------------
 1043|  5.46k|  cf_create = get_cf_create(transport_out, tunnel_proxy);
 1044|  5.46k|  if(!cf_create) {
  ------------------
  |  Branch (1044:6): [True: 0, False: 5.46k]
  ------------------
 1045|      0|    CURL_TRC_CF(data, cf_at, "unsupported transport type %u%s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1046|      0|                transport_out, tunnel_proxy ? "to proxy" : "");
 1047|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
 1048|      0|  }
 1049|  5.46k|  result = cf_ip_happy_create(&cf, data, peer, cf_at->conn, cf_create,
 1050|  5.46k|                              transport_in, transport_out);
 1051|  5.46k|  if(result)
  ------------------
  |  Branch (1051:6): [True: 0, False: 5.46k]
  ------------------
 1052|      0|    return result;
 1053|       |
 1054|  5.46k|  Curl_conn_cf_insert_after(cf_at, cf);
 1055|  5.46k|  return CURLE_OK;
 1056|  5.46k|}
cf-ip-happy.c:cf_ip_happy_destroy:
  958|  5.46k|{
  959|  5.46k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  960|       |
  961|  5.46k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  5.46k|  do {                                          \
  |  |  154|  5.46k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.46k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.46k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.46k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.46k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.46k]
  |  |  ------------------
  ------------------
  962|  5.46k|  if(ctx) {
  ------------------
  |  Branch (962:6): [True: 5.46k, False: 0]
  ------------------
  963|  5.46k|    cf_ip_happy_ctx_clear(cf, data);
  964|  5.46k|    cf_ip_happy_ctx_destroy(ctx);
  965|  5.46k|  }
  966|  5.46k|}
cf-ip-happy.c:cf_ip_happy_ctx_clear:
  765|  14.7k|{
  766|  14.7k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  767|       |
  768|  14.7k|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|  14.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (768:3): [True: 0, False: 14.7k]
  |  Branch (768:3): [True: 14.7k, False: 0]
  ------------------
  769|  14.7k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  14.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (769:3): [True: 0, False: 14.7k]
  |  Branch (769:3): [True: 14.7k, False: 0]
  ------------------
  770|  14.7k|  cf_ip_ballers_clear(cf, data, &ctx->ballers);
  771|  14.7k|}
cf-ip-happy.c:cf_ip_ballers_clear:
  302|  14.7k|{
  303|  14.7k|  (void)cf;
  304|  15.0k|  while(bs->running) {
  ------------------
  |  Branch (304:9): [True: 253, False: 14.7k]
  ------------------
  305|    253|    struct cf_ip_attempt *a = bs->running;
  306|    253|    bs->running = a->next;
  307|    253|    cf_ip_attempt_free(a, data);
  308|    253|  }
  309|  14.7k|  cf_ip_attempt_free(bs->winner, data);
  310|       |  bs->winner = NULL;
  311|  14.7k|}
cf-ip-happy.c:cf_ip_attempt_free:
  176|  15.0k|{
  177|  15.0k|  if(a) {
  ------------------
  |  Branch (177:6): [True: 5.43k, False: 9.56k]
  ------------------
  178|  5.43k|    if(a->cf)
  ------------------
  |  Branch (178:8): [True: 29, False: 5.41k]
  ------------------
  179|     29|      Curl_conn_cf_discard_chain(&a->cf, data);
  180|  5.43k|    curlx_free(a);
  ------------------
  |  | 1483|  5.43k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  181|  5.43k|  }
  182|  15.0k|}
cf-ip-happy.c:cf_ip_happy_ctx_destroy:
  774|  5.46k|{
  775|  5.46k|  if(ctx) {
  ------------------
  |  Branch (775:6): [True: 5.46k, False: 0]
  ------------------
  776|  5.46k|    Curl_peer_unlink(&ctx->peer);
  777|  5.46k|    curlx_free(ctx);
  ------------------
  |  | 1483|  5.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  778|  5.46k|  }
  779|  5.46k|}
cf-ip-happy.c:cf_ip_happy_connect:
  816|   102k|{
  817|   102k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  818|   102k|  CURLcode result = CURLE_OK;
  819|       |
  820|       |  /* -Werror=null-dereference finds false positives suddenly. */
  821|   102k|  if(!data)
  ------------------
  |  Branch (821:6): [True: 0, False: 102k]
  ------------------
  822|      0|    return CURLE_FAILED_INIT;
  823|       |
  824|   102k|  if(cf->connected) {
  ------------------
  |  Branch (824:6): [True: 2.09k, False: 100k]
  ------------------
  825|  2.09k|    *done = TRUE;
  ------------------
  |  | 1055|  2.09k|#define TRUE true
  ------------------
  826|  2.09k|    return CURLE_OK;
  827|  2.09k|  }
  828|       |
  829|   100k|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|   100k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (829:3): [True: 0, False: 100k]
  |  Branch (829:3): [True: 100k, False: 0]
  ------------------
  830|   100k|  *done = FALSE;
  ------------------
  |  | 1058|   100k|#define FALSE false
  ------------------
  831|       |
  832|   100k|  if(!ctx->dns_resolved) {
  ------------------
  |  Branch (832:6): [True: 74.7k, False: 25.4k]
  ------------------
  833|  74.7k|    result = Curl_conn_dns_result(cf->conn, cf->sockindex);
  834|  74.7k|    if(!result)
  ------------------
  |  Branch (834:8): [True: 5.38k, False: 69.3k]
  ------------------
  835|  5.38k|      ctx->dns_resolved = TRUE;
  ------------------
  |  | 1055|  5.38k|#define TRUE true
  ------------------
  836|  69.3k|    else if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (836:13): [True: 69.3k, False: 0]
  ------------------
  837|  69.3k|      result = CURLE_OK;
  838|  69.3k|    }
  839|      0|    else /* real error */
  840|      0|      goto out;
  841|  74.7k|  }
  842|       |
  843|   100k|  switch(ctx->state) {
  ------------------
  |  Branch (843:10): [True: 100k, False: 0]
  ------------------
  844|  5.46k|  case SCFST_INIT:
  ------------------
  |  Branch (844:3): [True: 5.46k, False: 94.6k]
  ------------------
  845|  5.46k|    DEBUGASSERT(CURL_SOCKET_BAD == Curl_conn_cf_get_socket(cf, data));
  ------------------
  |  | 1081|  5.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (845:5): [True: 0, False: 5.46k]
  |  Branch (845:5): [True: 5.46k, False: 0]
  ------------------
  846|  5.46k|    DEBUGASSERT(!cf->connected);
  ------------------
  |  | 1081|  5.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (846:5): [True: 0, False: 5.46k]
  |  Branch (846:5): [True: 5.46k, False: 0]
  ------------------
  847|  5.46k|    result = cf_ip_happy_init(cf, data);
  848|  5.46k|    if(result)
  ------------------
  |  Branch (848:8): [True: 0, False: 5.46k]
  ------------------
  849|      0|      goto out;
  850|  5.46k|    ctx->state = SCFST_WAITING;
  851|  5.46k|    FALLTHROUGH();
  ------------------
  |  |  821|  5.46k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  852|   100k|  case SCFST_WAITING:
  ------------------
  |  Branch (852:3): [True: 94.6k, False: 5.46k]
  ------------------
  853|   100k|    result = is_connected(cf, data, done);
  854|   100k|    if(!result && *done) {
  ------------------
  |  Branch (854:8): [True: 99.9k, False: 172]
  |  Branch (854:19): [True: 5.18k, False: 94.7k]
  ------------------
  855|  5.18k|      DEBUGASSERT(ctx->ballers.winner);
  ------------------
  |  | 1081|  5.18k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (855:7): [True: 0, False: 5.18k]
  |  Branch (855:7): [True: 5.18k, False: 0]
  ------------------
  856|  5.18k|      DEBUGASSERT(ctx->ballers.winner->cf);
  ------------------
  |  | 1081|  5.18k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (856:7): [True: 0, False: 5.18k]
  |  Branch (856:7): [True: 5.18k, False: 0]
  ------------------
  857|  5.18k|      DEBUGASSERT(ctx->ballers.winner->cf->connected);
  ------------------
  |  | 1081|  5.18k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (857:7): [True: 0, False: 5.18k]
  |  Branch (857:7): [True: 5.18k, False: 0]
  ------------------
  858|       |      /* we have a winner. Install and activate it.
  859|       |       * close/free all others. */
  860|  5.18k|      ctx->state = SCFST_DONE;
  861|  5.18k|      cf->connected = TRUE;
  ------------------
  |  | 1055|  5.18k|#define TRUE true
  ------------------
  862|  5.18k|      cf->next = ctx->ballers.winner->cf;
  863|  5.18k|      ctx->ballers.winner->cf = NULL;
  864|  5.18k|      cf_ip_happy_ctx_clear(cf, data);
  865|  5.18k|      Curl_expire_done(data, EXPIRE_HAPPY_EYEBALLS);
  866|       |      /* whatever errors where reported by ballers, clear our errorbuf */
  867|  5.18k|      Curl_reset_fail(data);
  868|       |
  869|  5.18k|      if(cf->conn->scheme->protocol & PROTO_FAMILY_SSH)
  ------------------
  |  |   90|  5.18k|#define PROTO_FAMILY_SSH  (CURLPROTO_SCP | CURLPROTO_SFTP)
  |  |  ------------------
  |  |  |  | 1082|  5.18k|#define CURLPROTO_SCP     (1L << 4)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_SSH  (CURLPROTO_SCP | CURLPROTO_SFTP)
  |  |  ------------------
  |  |  |  | 1083|  5.18k|#define CURLPROTO_SFTP    (1L << 5)
  |  |  ------------------
  ------------------
  |  Branch (869:10): [True: 0, False: 5.18k]
  ------------------
  870|      0|        Curl_pgrsTime(data, TIMER_APPCONNECT); /* we are connected already */
  871|  5.18k|#ifdef CURLVERBOSE
  872|  5.18k|      if(Curl_trc_cf_is_verbose(cf, data)) {
  ------------------
  |  |  323|  5.18k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  ------------------
  |  |  |  |  319|  10.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 5.18k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.18k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  324|  5.18k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  873|      0|        struct ip_quadruple ipquad;
  874|      0|        bool is_ipv6;
  875|      0|        if(!Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad)) {
  ------------------
  |  Branch (875:12): [True: 0, False: 0]
  ------------------
  876|      0|          const char *host;
  877|      0|          Curl_conn_get_current_host(data, cf->sockindex, &host, NULL);
  878|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  879|      0|                      host, ipquad.remote_ip, ipquad.remote_port);
  880|      0|        }
  881|      0|      }
  882|  5.18k|#endif
  883|  5.18k|      data->info.numconnects++; /* to track the # of connections made */
  884|  5.18k|    }
  885|   100k|    break;
  886|   100k|  case SCFST_DONE:
  ------------------
  |  Branch (886:3): [True: 0, False: 100k]
  ------------------
  887|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  888|      0|    break;
  889|   100k|  }
  890|   100k|out:
  891|   100k|  return result;
  892|   100k|}
cf-ip-happy.c:cf_ip_happy_init:
  745|  5.46k|{
  746|  5.46k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  747|       |
  748|  5.46k|  if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (748:6): [True: 0, False: 5.46k]
  ------------------
  749|       |    /* a precaution, no need to continue if time already is up */
  750|      0|    failf(data, "Connection time-out");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  751|      0|    return CURLE_OPERATION_TIMEDOUT;
  752|      0|  }
  753|       |
  754|  5.46k|  CURL_TRC_CF(data, cf, "init ip ballers for transport %u",
  ------------------
  |  |  153|  5.46k|  do {                                          \
  |  |  154|  5.46k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.46k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.46k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.46k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.46k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.46k]
  |  |  ------------------
  ------------------
  755|  5.46k|              ctx->transport_out);
  756|  5.46k|  ctx->started = *Curl_pgrs_now(data);
  757|  5.46k|  return cf_ip_ballers_init(&ctx->ballers, cf, ctx->cf_create,
  758|  5.46k|                            ctx->transport_in, ctx->transport_out,
  759|  5.46k|                            data->set.happy_eyeballs_timeout,
  760|  5.46k|                            IP_HE_MAX_CONCURRENT_ATTEMPTS);
  ------------------
  |  |  741|  5.46k|#define IP_HE_MAX_CONCURRENT_ATTEMPTS     6
  ------------------
  761|  5.46k|}
cf-ip-happy.c:cf_ip_ballers_init:
  320|  5.46k|{
  321|  5.46k|  memset(bs, 0, sizeof(*bs));
  322|  5.46k|  bs->cf_create = cf_create;
  323|  5.46k|  bs->transport_in = transport_in;
  324|  5.46k|  bs->transport_out = transport_out;
  325|  5.46k|  bs->attempt_delay_ms = attempt_delay_ms;
  326|  5.46k|  bs->max_concurrent = max_concurrent;
  327|  5.46k|  bs->last_attempt_ai_family = AF_INET; /* so AF_INET6 is next */
  328|       |
  329|  5.46k|  if(transport_in == TRNSPRT_UNIX) {
  ------------------
  |  |  310|  5.46k|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (329:6): [True: 14, False: 5.45k]
  ------------------
  330|     14|#ifdef USE_UNIX_SOCKETS
  331|     14|    cf_ai_iter_init(&bs->addr_iter, cf, AF_UNIX);
  332|       |#else
  333|       |    return CURLE_UNSUPPORTED_PROTOCOL;
  334|       |#endif
  335|     14|  }
  336|  5.45k|  else { /* TCP/UDP/QUIC */
  337|  5.45k|#ifdef USE_IPV6
  338|  5.45k|    cf_ai_iter_init(&bs->ipv6_iter, cf, AF_INET6);
  339|  5.45k|#endif
  340|       |    cf_ai_iter_init(&bs->addr_iter, cf, AF_INET);
  341|  5.45k|  }
  342|  5.46k|  return CURLE_OK;
  343|  5.46k|}
cf-ip-happy.c:cf_ai_iter_init:
  128|  10.9k|{
  129|  10.9k|  iter->cf = cf;
  130|  10.9k|  iter->ai_family = ai_family;
  131|  10.9k|  iter->n = 0;
  132|  10.9k|}
cf-ip-happy.c:is_connected:
  685|   100k|{
  686|   100k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  687|   100k|  struct connectdata *conn = cf->conn;
  688|   100k|  CURLcode result;
  689|       |
  690|   100k|  result = cf_ip_ballers_run(&ctx->ballers, cf, data,
  691|   100k|                             (bool)ctx->dns_resolved, connected);
  692|       |
  693|   100k|  if(!result)
  ------------------
  |  Branch (693:6): [True: 99.9k, False: 172]
  ------------------
  694|  99.9k|    return CURLE_OK;
  695|    172|  else {
  696|    172|    struct Curl_peer *peer = NULL, *proxy_peer = NULL;
  697|    172|    char viamsg[160];
  698|       |
  699|    172|    peer = Curl_conn_get_first_peer(conn, cf->sockindex);
  700|    172|    if(!conn->origin || !peer)
  ------------------
  |  Branch (700:8): [True: 0, False: 172]
  |  Branch (700:25): [True: 0, False: 172]
  ------------------
  701|      0|      return CURLE_FAILED_INIT;
  702|       |
  703|    172|#ifndef CURL_DISABLE_PROXY
  704|    172|    if(conn->bits.socksproxy)
  ------------------
  |  Branch (704:8): [True: 48, False: 124]
  ------------------
  705|     48|      proxy_peer = conn->socks_proxy.peer;
  706|    124|    else if(conn->bits.httpproxy)
  ------------------
  |  Branch (706:13): [True: 11, False: 113]
  ------------------
  707|     11|      proxy_peer = conn->http_proxy.peer;
  708|    172|#endif
  709|       |
  710|    172|    viamsg[0] = 0;
  711|    172|    if((peer != conn->origin) && (peer != proxy_peer)) {
  ------------------
  |  Branch (711:8): [True: 134, False: 38]
  |  Branch (711:34): [True: 75, False: 59]
  ------------------
  712|     75|#ifdef USE_UNIX_SOCKETS
  713|     75|      if(peer->unix_socket)
  ------------------
  |  Branch (713:10): [True: 0, False: 75]
  ------------------
  714|      0|        curl_msnprintf(viamsg, sizeof(viamsg), " over unix://%s",
  715|      0|                       peer->hostname);
  716|     75|      else
  717|     75|#endif
  718|     75|      curl_msnprintf(viamsg, sizeof(viamsg), " via %s:%u",
  719|     75|                     peer->hostname, peer->port);
  720|     75|    }
  721|       |
  722|    172|    failf(data, "Failed to connect to %s:%u%s %s%s%safter "
  ------------------
  |  |   62|    172|#define failf Curl_failf
  ------------------
  723|    172|          "%" FMT_TIMEDIFF_T " ms: %s",
  724|    172|          conn->origin->hostname, conn->origin->port, viamsg,
  725|    172|          proxy_peer ? "over proxy " : "",
  ------------------
  |  Branch (725:11): [True: 59, False: 113]
  ------------------
  726|    172|          proxy_peer ? proxy_peer->hostname : "",
  ------------------
  |  Branch (726:11): [True: 59, False: 113]
  ------------------
  727|    172|          proxy_peer ? " " : "",
  ------------------
  |  Branch (727:11): [True: 59, False: 113]
  ------------------
  728|    172|          curlx_ptimediff_ms(Curl_pgrs_now(data),
  729|    172|                             &data->progress.t_startsingle),
  730|    172|          curl_easy_strerror(result));
  731|       |
  732|    172|#ifdef SOCKETIMEDOUT
  733|    172|    if(SOCKETIMEDOUT == data->state.os_errno)
  ------------------
  |  | 1135|    172|#define SOCKETIMEDOUT     ETIMEDOUT
  ------------------
  |  Branch (733:8): [True: 0, False: 172]
  ------------------
  734|      0|      result = CURLE_OPERATION_TIMEDOUT;
  735|    172|#endif
  736|       |
  737|    172|    return result;
  738|    172|  }
  739|   100k|}
cf-ip-happy.c:cf_ip_ballers_run:
  379|   100k|{
  380|   100k|  CURLcode result = CURLE_OK;
  381|   100k|  struct cf_ip_attempt *a = NULL, **panchor;
  382|   100k|  bool do_more;
  383|   100k|  timediff_t next_expire_ms;
  384|   100k|  uint32_t inconclusive, ongoing;
  385|   100k|  VERBOSE(int i);
  ------------------
  |  | 1618|   100k|#define VERBOSE(x) x
  ------------------
  386|       |
  387|   100k|  if(bs->winner)
  ------------------
  |  Branch (387:6): [True: 0, False: 100k]
  ------------------
  388|      0|    return CURLE_OK;
  389|       |
  390|   105k|evaluate:
  391|   105k|  ongoing = inconclusive = 0;
  392|       |
  393|       |  /* check if a running baller connects now */
  394|   105k|  VERBOSE(i = -1);
  ------------------
  |  | 1618|   105k|#define VERBOSE(x) x
  ------------------
  395|   131k|  for(panchor = &bs->running; *panchor; panchor = &((*panchor)->next)) {
  ------------------
  |  Branch (395:31): [True: 30.9k, False: 100k]
  ------------------
  396|  30.9k|    VERBOSE(++i);
  ------------------
  |  | 1618|  30.9k|#define VERBOSE(x) x
  ------------------
  397|  30.9k|    a = *panchor;
  398|  30.9k|    a->result = cf_ip_attempt_connect(a, data, connected);
  399|  30.9k|    if(!a->result) {
  ------------------
  |  Branch (399:8): [True: 30.6k, False: 279]
  ------------------
  400|  30.6k|      if(*connected) {
  ------------------
  |  Branch (400:10): [True: 5.18k, False: 25.4k]
  ------------------
  401|       |        /* connected, declare the winner, remove from running,
  402|       |         * clear remaining running list. */
  403|  5.18k|        CURL_TRC_CF(data, cf, "connect attempt #%d successful", i);
  ------------------
  |  |  153|  5.18k|  do {                                          \
  |  |  154|  5.18k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.18k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.18k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.18k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.18k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.18k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.18k]
  |  |  ------------------
  ------------------
  404|  5.18k|        bs->winner = a;
  405|  5.18k|        *panchor = a->next;
  406|  5.18k|        a->next = NULL;
  407|  5.18k|        while(bs->running) {
  ------------------
  |  Branch (407:15): [True: 0, False: 5.18k]
  ------------------
  408|      0|          a = bs->running;
  409|      0|          bs->running = a->next;
  410|      0|          cf_ip_attempt_free(a, data);
  411|      0|        }
  412|  5.18k|        return CURLE_OK;
  413|  5.18k|      }
  414|       |      /* still running */
  415|  25.4k|      ++ongoing;
  416|  25.4k|    }
  417|    279|    else if(a->inconclusive) /* failed, but inconclusive */
  ------------------
  |  Branch (417:13): [True: 0, False: 279]
  ------------------
  418|      0|      ++inconclusive;
  419|  30.9k|  }
  420|   100k|  if(bs->running)
  ------------------
  |  Branch (420:6): [True: 25.6k, False: 74.7k]
  ------------------
  421|  25.6k|    CURL_TRC_CF(data, cf, "checked connect attempts: "
  ------------------
  |  |  153|  25.6k|  do {                                          \
  |  |  154|  25.6k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  25.6k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  51.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 25.6k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 25.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  51.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  25.6k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  25.6k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  25.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 25.6k]
  |  |  ------------------
  ------------------
  422|   100k|                "%u ongoing, %u inconclusive", ongoing, inconclusive);
  423|       |
  424|       |  /* no attempt connected yet, start another one? */
  425|   100k|  if(!ongoing) {
  ------------------
  |  Branch (425:6): [True: 74.9k, False: 25.4k]
  ------------------
  426|  74.9k|    if(!bs->started.tv_sec && !bs->started.tv_usec)
  ------------------
  |  Branch (426:8): [True: 5.46k, False: 69.4k]
  |  Branch (426:31): [True: 5.46k, False: 0]
  ------------------
  427|  5.46k|      bs->started = *Curl_pgrs_now(data);
  428|  74.9k|    do_more = TRUE;
  ------------------
  |  | 1055|  74.9k|#define TRUE true
  ------------------
  429|  74.9k|  }
  430|  25.4k|  else {
  431|  25.4k|    bool more_possible = cf_ai_iter_has_more(&bs->addr_iter, data);
  432|  25.4k|#ifdef USE_IPV6
  433|  25.4k|    if(!more_possible)
  ------------------
  |  Branch (433:8): [True: 25.4k, False: 0]
  ------------------
  434|  25.4k|      more_possible = cf_ai_iter_has_more(&bs->ipv6_iter, data);
  435|  25.4k|#endif
  436|  25.4k|    do_more = more_possible &&
  ------------------
  |  Branch (436:15): [True: 0, False: 25.4k]
  ------------------
  437|      0|      (curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started) >=
  ------------------
  |  Branch (437:7): [True: 0, False: 0]
  ------------------
  438|      0|       bs->attempt_delay_ms);
  439|  25.4k|    if(do_more)
  ------------------
  |  Branch (439:8): [True: 0, False: 25.4k]
  ------------------
  440|      0|      CURL_TRC_CF(data, cf, "happy eyeballs timeout expired, "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  441|  25.4k|                  "start next attempt");
  442|  25.4k|  }
  443|       |
  444|   100k|  if(do_more) {
  ------------------
  |  Branch (444:6): [True: 74.9k, False: 25.4k]
  ------------------
  445|       |    /* start the next attempt if there is another ip address to try.
  446|       |     * Alternate between address families when possible. */
  447|  74.9k|    const struct Curl_addrinfo *ai = NULL;
  448|  74.9k|    int ai_family = 0;
  449|  74.9k|    CURL_TRC_CF(data, cf, "want to do more");
  ------------------
  |  |  153|  74.9k|  do {                                          \
  |  |  154|  74.9k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  74.9k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   149k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 74.9k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 74.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   149k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  74.9k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  74.9k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  74.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 74.9k]
  |  |  ------------------
  ------------------
  450|  74.9k|#ifdef USE_IPV6
  451|  74.9k|    if((bs->last_attempt_ai_family == AF_INET) ||
  ------------------
  |  Branch (451:8): [True: 74.8k, False: 77]
  ------------------
  452|  74.8k|       !cf_ai_iter_has_more(&bs->addr_iter, data)) {
  ------------------
  |  Branch (452:8): [True: 25, False: 52]
  ------------------
  453|  74.8k|      ai = cf_ai_iter_next(&bs->ipv6_iter, data);
  454|  74.8k|      ai_family = bs->ipv6_iter.ai_family;
  455|  74.8k|      CURL_TRC_CF(data, cf, "check for next AAAA address: %s",
  ------------------
  |  |  153|  74.8k|  do {                                          \
  |  |  154|  74.8k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  74.8k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   149k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 74.8k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 74.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   149k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  74.8k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  74.8k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  74.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 74.8k]
  |  |  ------------------
  ------------------
  456|  74.8k|                  ai ? "found" : "none");
  457|  74.8k|    }
  458|  74.9k|#endif
  459|  74.9k|    if(!ai) {
  ------------------
  |  Branch (459:8): [True: 74.8k, False: 96]
  ------------------
  460|  74.8k|      ai = cf_ai_iter_next(&bs->addr_iter, data);
  461|  74.8k|      ai_family = bs->addr_iter.ai_family;
  462|  74.8k|      CURL_TRC_CF(data, cf, "check for next A address: %s",
  ------------------
  |  |  153|  74.8k|  do {                                          \
  |  |  154|  74.8k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  74.8k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   149k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 74.8k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 74.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   149k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  74.8k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  74.8k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  74.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 74.8k]
  |  |  ------------------
  ------------------
  463|  74.8k|                  ai ? "found" : "none");
  464|  74.8k|    }
  465|       |    /* We are (re-)starting attempts. We are not interested in
  466|       |     * keeping old failure information. The new attempt will either
  467|       |     * succeed or persist new failure. */
  468|  74.9k|    Curl_reset_fail(data);
  469|       |
  470|  74.9k|    if(ai) {  /* try another address */
  ------------------
  |  Branch (470:8): [True: 5.43k, False: 69.4k]
  ------------------
  471|  5.43k|      struct Curl_sockaddr_ex addr;
  472|       |
  473|       |      /* Discard oldest to make room for new attempt */
  474|  5.43k|      if(bs->max_concurrent)
  ------------------
  |  Branch (474:10): [True: 5.43k, False: 0]
  ------------------
  475|  5.43k|        cf_ip_ballers_prune(bs, cf, data, bs->max_concurrent - 1);
  476|       |
  477|  5.43k|      result = Curl_socket_addr_from_ai(&addr, ai, bs->transport_out);
  478|  5.43k|      if(result)
  ------------------
  |  Branch (478:10): [True: 0, False: 5.43k]
  ------------------
  479|      0|        goto out;
  480|       |
  481|  5.43k|      result = cf_ip_attempt_new(&a, cf, data, &addr, ai_family,
  482|  5.43k|                                 bs->transport_in, bs->transport_out,
  483|  5.43k|                                 bs->cf_create);
  484|  5.43k|      CURL_TRC_CF(data, cf, "starting %s attempt for ipv%s -> %d",
  ------------------
  |  |  153|  5.43k|  do {                                          \
  |  |  154|  5.43k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.43k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.43k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.43k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.43k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  5.43k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.43k]
  |  |  ------------------
  ------------------
  485|  5.43k|                  bs->running ? "next" : "first",
  486|  5.43k|                  (ai_family == AF_INET) ? "4" : "6", result);
  487|  5.43k|      if(result)
  ------------------
  |  Branch (487:10): [True: 0, False: 5.43k]
  ------------------
  488|      0|        goto out;
  489|  5.43k|      DEBUGASSERT(a);
  ------------------
  |  | 1081|  5.43k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (489:7): [True: 0, False: 5.43k]
  |  Branch (489:7): [True: 5.43k, False: 0]
  ------------------
  490|       |
  491|       |      /* append to running list */
  492|  5.43k|      panchor = &bs->running;
  493|  5.49k|      while(*panchor)
  ------------------
  |  Branch (493:13): [True: 52, False: 5.43k]
  ------------------
  494|     52|        panchor = &((*panchor)->next);
  495|  5.43k|      *panchor = a;
  496|  5.43k|      bs->last_attempt_started = *Curl_pgrs_now(data);
  497|  5.43k|      bs->last_attempt_ai_family = ai_family;
  498|       |      /* and run everything again */
  499|  5.43k|      goto evaluate;
  500|  5.43k|    }
  501|  69.4k|    else if(inconclusive) {
  ------------------
  |  Branch (501:13): [True: 0, False: 69.4k]
  ------------------
  502|       |      /* tried all addresses, no success but some where inconclusive.
  503|       |       * Let's restart the inconclusive ones. */
  504|      0|      timediff_t since_ms =
  505|      0|        curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started);
  506|      0|      timediff_t delay_ms = bs->attempt_delay_ms - since_ms;
  507|      0|      if(delay_ms <= 0) {
  ------------------
  |  Branch (507:10): [True: 0, False: 0]
  ------------------
  508|      0|        CURL_TRC_CF(data, cf, "all attempts inconclusive, restarting one");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  509|      0|        VERBOSE(i = -1);
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
  510|      0|        for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (510:30): [True: 0, False: 0]
  ------------------
  511|      0|          VERBOSE(++i);
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
  512|      0|          if(!a->inconclusive)
  ------------------
  |  Branch (512:14): [True: 0, False: 0]
  ------------------
  513|      0|            continue;
  514|      0|          result = cf_ip_attempt_restart(a, cf, data);
  515|      0|          CURL_TRC_CF(data, cf, "restarted baller %d -> %d", i, result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  516|      0|          if(result) /* serious failure */
  ------------------
  |  Branch (516:14): [True: 0, False: 0]
  ------------------
  517|      0|            goto out;
  518|      0|          bs->last_attempt_started = *Curl_pgrs_now(data);
  519|      0|          goto evaluate;
  520|      0|        }
  521|      0|        DEBUGASSERT(0); /* should not come here */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (521:9): [Folded, False: 0]
  |  Branch (521:9): [Folded, False: 0]
  ------------------
  522|      0|      }
  523|      0|      else {
  524|       |        /* let's wait some more before restarting */
  525|      0|        infof(data, "connect attempts inconclusive, retrying "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  526|      0|                    "in %" FMT_TIMEDIFF_T "ms", delay_ms);
  527|      0|        Curl_expire(data, delay_ms, EXPIRE_HAPPY_EYEBALLS);
  528|      0|      }
  529|       |      /* attempt timeout for restart has not expired yet */
  530|      0|      goto out;
  531|      0|    }
  532|  69.4k|    else if(!ongoing && dns_resolved) {
  ------------------
  |  Branch (532:13): [True: 69.4k, False: 0]
  |  Branch (532:25): [True: 172, False: 69.3k]
  ------------------
  533|       |      /* no more addresses, no inconclusive attempts */
  534|    172|      CURL_TRC_CF(data, cf, "no more attempts to try");
  ------------------
  |  |  153|    172|  do {                                          \
  |  |  154|    172|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    172|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    344|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 172, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 172]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    344|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    172|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    172|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    172|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 172]
  |  |  ------------------
  ------------------
  535|    172|      result = CURLE_COULDNT_CONNECT;
  536|    172|      VERBOSE(i = 0);
  ------------------
  |  | 1618|    172|#define VERBOSE(x) x
  ------------------
  537|    396|      for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (537:28): [True: 224, False: 172]
  ------------------
  538|    224|        CURL_TRC_CF(data, cf, "baller %d: result=%d", i, a->result);
  ------------------
  |  |  153|    224|  do {                                          \
  |  |  154|    224|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    224|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    448|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 224, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 224]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    448|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    224|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    224|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    224|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 224]
  |  |  ------------------
  ------------------
  539|    224|        if(a->result)
  ------------------
  |  Branch (539:12): [True: 224, False: 0]
  ------------------
  540|    224|          result = a->result;
  541|    224|      }
  542|    172|    }
  543|  74.9k|  }
  544|       |
  545|  94.9k|out:
  546|  94.9k|  if(!result) {
  ------------------
  |  Branch (546:6): [True: 94.7k, False: 172]
  ------------------
  547|  94.7k|    bool more_possible;
  548|       |
  549|       |    /* when do we need to be called again? */
  550|  94.7k|    next_expire_ms = Curl_timeleft_ms(data);
  551|  94.7k|    if(next_expire_ms < 0) {
  ------------------
  |  Branch (551:8): [True: 0, False: 94.7k]
  ------------------
  552|      0|      failf(data, "Connection timeout after %" FMT_OFF_T " ms",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  553|      0|            curlx_ptimediff_ms(Curl_pgrs_now(data),
  554|      0|                               &data->progress.t_startsingle));
  555|      0|      return CURLE_OPERATION_TIMEDOUT;
  556|      0|    }
  557|       |
  558|  94.7k|    more_possible = cf_ai_iter_has_more(&bs->addr_iter, data);
  559|  94.7k|#ifdef USE_IPV6
  560|  94.7k|    if(!more_possible)
  ------------------
  |  Branch (560:8): [True: 94.7k, False: 0]
  ------------------
  561|  94.7k|      more_possible = cf_ai_iter_has_more(&bs->ipv6_iter, data);
  562|  94.7k|#endif
  563|  94.7k|    if(more_possible) {
  ------------------
  |  Branch (563:8): [True: 0, False: 94.7k]
  ------------------
  564|      0|      timediff_t expire_ms, elapsed_ms;
  565|      0|      elapsed_ms =
  566|      0|        curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started);
  567|      0|      expire_ms = CURLMAX(bs->attempt_delay_ms - elapsed_ms, 0);
  ------------------
  |  | 1286|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  568|      0|      next_expire_ms = CURLMIN(next_expire_ms, expire_ms);
  ------------------
  |  | 1287|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  569|      0|      if(next_expire_ms <= 0) {
  ------------------
  |  Branch (569:10): [True: 0, False: 0]
  ------------------
  570|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  571|      0|        goto evaluate;
  572|      0|      }
  573|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  574|      0|                  "ms", next_expire_ms);
  575|      0|      Curl_expire(data, next_expire_ms, EXPIRE_HAPPY_EYEBALLS);
  576|      0|    }
  577|  94.7k|  }
  578|  94.9k|  return result;
  579|  94.9k|}
cf-ip-happy.c:cf_ip_attempt_connect:
  232|  30.9k|{
  233|  30.9k|  *connected = (bool)a->connected;
  234|  30.9k|  if(!a->result && !*connected) {
  ------------------
  |  Branch (234:6): [True: 30.8k, False: 55]
  |  Branch (234:20): [True: 30.8k, False: 0]
  ------------------
  235|       |    /* evaluate again */
  236|  30.8k|    a->result = Curl_conn_cf_connect(a->cf, data, connected);
  237|       |
  238|  30.8k|    if(!a->result) {
  ------------------
  |  Branch (238:8): [True: 30.6k, False: 224]
  ------------------
  239|  30.6k|      if(*connected) {
  ------------------
  |  Branch (239:10): [True: 5.18k, False: 25.4k]
  ------------------
  240|  5.18k|        a->connected = TRUE;
  ------------------
  |  | 1055|  5.18k|#define TRUE true
  ------------------
  241|  5.18k|      }
  242|  30.6k|    }
  243|    224|    else {
  244|    224|      if(a->result == CURLE_WEIRD_SERVER_REPLY)
  ------------------
  |  Branch (244:10): [True: 0, False: 224]
  ------------------
  245|      0|        a->inconclusive = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  246|    224|      if(a->cf)
  ------------------
  |  Branch (246:10): [True: 224, False: 0]
  ------------------
  247|    224|        Curl_conn_cf_discard_chain(&a->cf, data);
  248|    224|    }
  249|  30.8k|  }
  250|  30.9k|  return a->result;
  251|  30.9k|}
cf-ip-happy.c:cf_ai_iter_has_more:
  151|   240k|{
  152|   240k|  return (iter->cf &&
  ------------------
  |  Branch (152:11): [True: 240k, False: 0]
  ------------------
  153|   240k|          !!Curl_conn_dns_get_ai(data, iter->cf->sockindex,
  ------------------
  |  Branch (153:11): [True: 52, False: 240k]
  ------------------
  154|   240k|                                 iter->ai_family, iter->n));
  155|   240k|}
cf-ip-happy.c:cf_ai_iter_next:
  136|   149k|{
  137|   149k|  const struct Curl_addrinfo *addr;
  138|       |
  139|   149k|  if(!iter->cf)
  ------------------
  |  Branch (139:6): [True: 14, False: 149k]
  ------------------
  140|     14|    return NULL;
  141|       |
  142|   149k|  addr = Curl_conn_dns_get_ai(data, iter->cf->sockindex,
  143|   149k|                              iter->ai_family, iter->n);
  144|   149k|  if(addr)
  ------------------
  |  Branch (144:6): [True: 5.43k, False: 144k]
  ------------------
  145|  5.43k|    iter->n++;
  146|   149k|  return addr;
  147|   149k|}
cf-ip-happy.c:cf_ip_ballers_prune:
  349|  5.43k|{
  350|  5.43k|  struct cf_ip_attempt *a = NULL, **panchor;
  351|  5.43k|  uint32_t ongoing = 0;
  352|       |
  353|  5.49k|  for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (353:24): [True: 52, False: 5.43k]
  ------------------
  354|     52|    if(!a->result && !a->connected)
  ------------------
  |  Branch (354:8): [True: 0, False: 52]
  |  Branch (354:22): [True: 0, False: 0]
  ------------------
  355|      0|      ++ongoing;
  356|     52|  }
  357|       |
  358|  5.43k|  panchor = &bs->running;
  359|  5.43k|  while(*panchor && (ongoing > max_concurrent)) {
  ------------------
  |  Branch (359:9): [True: 52, False: 5.38k]
  |  Branch (359:21): [True: 0, False: 52]
  ------------------
  360|      0|    a = *panchor;
  361|      0|    if(!a->result && !a->connected) {
  ------------------
  |  Branch (361:8): [True: 0, False: 0]
  |  Branch (361:22): [True: 0, False: 0]
  ------------------
  362|      0|      *panchor = a->next;
  363|      0|      a->next = NULL;
  364|      0|      cf_ip_attempt_free(a, data);
  365|      0|      --ongoing;
  366|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  367|      0|    }
  368|      0|    else {
  369|      0|      panchor = &a->next;
  370|      0|    }
  371|      0|  }
  372|  5.43k|}
cf-ip-happy.c:cf_ip_attempt_new:
  192|  5.43k|{
  193|  5.43k|  struct Curl_cfilter *wcf;
  194|  5.43k|  struct cf_ip_attempt *a;
  195|  5.43k|  CURLcode result = CURLE_OK;
  196|       |
  197|  5.43k|  *pa = NULL;
  198|  5.43k|  a = curlx_calloc(1, sizeof(*a));
  ------------------
  |  | 1480|  5.43k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  199|  5.43k|  if(!a)
  ------------------
  |  Branch (199:6): [True: 0, False: 5.43k]
  ------------------
  200|      0|    return CURLE_OUT_OF_MEMORY;
  201|       |
  202|  5.43k|  a->addr = *addr;
  203|  5.43k|  a->ai_family = ai_family;
  204|  5.43k|  a->transport_in = transport_in;
  205|  5.43k|  a->transport_out = transport_out;
  206|  5.43k|  a->result = CURLE_OK;
  207|  5.43k|  a->cf_create = cf_create;
  208|  5.43k|  *pa = a;
  209|       |
  210|  5.43k|  result = a->cf_create(&a->cf, data, cf->conn, &a->addr,
  211|  5.43k|                        a->transport_in, a->transport_out);
  212|  5.43k|  if(result)
  ------------------
  |  Branch (212:6): [True: 0, False: 5.43k]
  ------------------
  213|      0|    goto out;
  214|       |
  215|       |  /* the new filter might have sub-filters */
  216|  10.8k|  for(wcf = a->cf; wcf; wcf = wcf->next) {
  ------------------
  |  Branch (216:20): [True: 5.43k, False: 5.43k]
  ------------------
  217|  5.43k|    wcf->conn = cf->conn;
  218|  5.43k|    wcf->sockindex = cf->sockindex;
  219|  5.43k|  }
  220|       |
  221|  5.43k|out:
  222|  5.43k|  if(result) {
  ------------------
  |  Branch (222:6): [True: 0, False: 5.43k]
  ------------------
  223|      0|    cf_ip_attempt_free(a, data);
  224|       |    *pa = NULL;
  225|      0|  }
  226|  5.43k|  return result;
  227|  5.43k|}
cf-ip-happy.c:cf_ip_happy_close:
  896|  4.10k|{
  897|  4.10k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  898|       |
  899|  4.10k|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|  4.10k|  do {                                          \
  |  |  154|  4.10k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.10k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  8.20k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.10k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  8.20k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  4.10k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  4.10k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.10k]
  |  |  ------------------
  ------------------
  900|  4.10k|  cf_ip_happy_ctx_clear(cf, data);
  901|  4.10k|  cf->connected = FALSE;
  ------------------
  |  | 1058|  4.10k|#define FALSE false
  ------------------
  902|  4.10k|  ctx->state = SCFST_INIT;
  903|       |
  904|  4.10k|  if(cf->next) {
  ------------------
  |  Branch (904:6): [True: 3.82k, False: 280]
  ------------------
  905|  3.82k|    cf->next->cft->do_close(cf->next, data);
  906|  3.82k|    Curl_conn_cf_discard_chain(&cf->next, data);
  907|  3.82k|  }
  908|  4.10k|}
cf-ip-happy.c:cf_ip_happy_adjust_pollset:
  802|   292k|{
  803|   292k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  804|   292k|  CURLcode result = CURLE_OK;
  805|       |
  806|   292k|  if(!cf->connected) {
  ------------------
  |  Branch (806:6): [True: 94.7k, False: 197k]
  ------------------
  807|  94.7k|    result = cf_ip_ballers_pollset(&ctx->ballers, data, ps);
  808|  94.7k|    CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", result, ps->n);
  ------------------
  |  |  153|  94.7k|  do {                                          \
  |  |  154|  94.7k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  94.7k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   189k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 94.7k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 94.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   189k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  94.7k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  94.7k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  94.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 94.7k]
  |  |  ------------------
  ------------------
  809|  94.7k|  }
  810|   292k|  return result;
  811|   292k|}
cf-ip-happy.c:cf_ip_ballers_pollset:
  606|  94.7k|{
  607|  94.7k|  struct cf_ip_attempt *a;
  608|  94.7k|  CURLcode result = CURLE_OK;
  609|   120k|  for(a = bs->running; a && !result; a = a->next) {
  ------------------
  |  Branch (609:24): [True: 25.4k, False: 94.7k]
  |  Branch (609:29): [True: 25.4k, False: 0]
  ------------------
  610|  25.4k|    if(a->result)
  ------------------
  |  Branch (610:8): [True: 3, False: 25.4k]
  ------------------
  611|      3|      continue;
  612|  25.4k|    result = Curl_conn_cf_adjust_pollset(a->cf, data, ps);
  613|  25.4k|  }
  614|  94.7k|  return result;
  615|  94.7k|}
cf-ip-happy.c:cf_ip_happy_query:
  924|   504k|{
  925|   504k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  926|       |
  927|   504k|  if(!cf->connected) {
  ------------------
  |  Branch (927:6): [True: 100k, False: 403k]
  ------------------
  928|   100k|    switch(query) {
  929|      0|    case CF_QUERY_CONNECT_REPLY_MS: {
  ------------------
  |  |  166|      0|#define CF_QUERY_CONNECT_REPLY_MS   2  /* number     -        */
  ------------------
  |  Branch (929:5): [True: 0, False: 100k]
  ------------------
  930|      0|      *pres1 = cf_ip_ballers_min_reply_ms(&ctx->ballers, data);
  931|      0|      CURL_TRC_CF(data, cf, "query connect reply: %dms", *pres1);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  932|      0|      return CURLE_OK;
  933|      0|    }
  934|    239|    case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  168|    239|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (934:5): [True: 239, False: 100k]
  ------------------
  935|    239|      struct curltime *when = pres2;
  936|    239|      *when = cf_ip_ballers_max_time(&ctx->ballers, data,
  937|    239|                                     CF_QUERY_TIMER_CONNECT);
  ------------------
  |  |  168|    239|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  938|    239|      return CURLE_OK;
  939|      0|    }
  940|    239|    case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  169|    239|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (940:5): [True: 239, False: 100k]
  ------------------
  941|    239|      struct curltime *when = pres2;
  942|    239|      *when = cf_ip_ballers_max_time(&ctx->ballers, data,
  943|    239|                                     CF_QUERY_TIMER_APPCONNECT);
  ------------------
  |  |  169|    239|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  944|    239|      return CURLE_OK;
  945|      0|    }
  946|   100k|    default:
  ------------------
  |  Branch (946:5): [True: 100k, False: 478]
  ------------------
  947|   100k|      break;
  948|   100k|    }
  949|   100k|  }
  950|       |
  951|   503k|  return cf->next ?
  ------------------
  |  Branch (951:10): [True: 403k, False: 100k]
  ------------------
  952|   403k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  953|   503k|    CURLE_UNKNOWN_OPTION;
  954|   504k|}
cf-ip-happy.c:cf_ip_ballers_max_time:
  634|    478|{
  635|    478|  struct curltime t, tmax;
  636|    478|  struct cf_ip_attempt *a;
  637|       |
  638|    478|  memset(&tmax, 0, sizeof(tmax));
  639|    926|  for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (639:24): [True: 448, False: 478]
  ------------------
  640|    448|    memset(&t, 0, sizeof(t));
  641|    448|    if(a->cf && !a->cf->cft->query(a->cf, data, query, NULL, &t)) {
  ------------------
  |  Branch (641:8): [True: 0, False: 448]
  |  Branch (641:17): [True: 0, False: 0]
  ------------------
  642|      0|      if((t.tv_sec || t.tv_usec) && curlx_ptimediff_us(&t, &tmax) > 0)
  ------------------
  |  Branch (642:11): [True: 0, False: 0]
  |  Branch (642:23): [True: 0, False: 0]
  |  Branch (642:37): [True: 0, False: 0]
  ------------------
  643|      0|        tmax = t;
  644|      0|    }
  645|    448|  }
  646|    478|  return tmax;
  647|    478|}
cf-ip-happy.c:get_cf_create:
   93|  5.46k|{
   94|  5.46k|  size_t i;
   95|  6.79k|  for(i = 0; i < CURL_ARRAYSIZE(transport_providers); ++i) {
  ------------------
  |  | 1294|  6.79k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (95:14): [True: 6.79k, False: 0]
  ------------------
   96|  6.79k|    if((transport == transport_providers[i].transport) &&
  ------------------
  |  Branch (96:8): [True: 6.75k, False: 39]
  ------------------
   97|  6.75k|       (tunnel_proxy == transport_providers[i].tunnel_proxy))
  ------------------
  |  Branch (97:8): [True: 5.46k, False: 1.29k]
  ------------------
   98|  5.46k|      return transport_providers[i].cf_create;
   99|  6.79k|  }
  100|      0|  return NULL;
  101|  5.46k|}
cf-ip-happy.c:cf_ip_happy_create:
 1003|  5.46k|{
 1004|  5.46k|  struct cf_ip_happy_ctx *ctx = NULL;
 1005|  5.46k|  CURLcode result;
 1006|       |
 1007|  5.46k|  (void)data;
 1008|  5.46k|  (void)conn;
 1009|  5.46k|  *pcf = NULL;
 1010|  5.46k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  5.46k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1011|  5.46k|  if(!ctx) {
  ------------------
  |  Branch (1011:6): [True: 0, False: 5.46k]
  ------------------
 1012|      0|    result = CURLE_OUT_OF_MEMORY;
 1013|      0|    goto out;
 1014|      0|  }
 1015|  5.46k|  ctx->transport_in = transport_in;
 1016|  5.46k|  ctx->transport_out = transport_out;
 1017|  5.46k|  ctx->cf_create = cf_create;
 1018|  5.46k|  Curl_peer_link(&ctx->peer, peer);
 1019|       |
 1020|  5.46k|  result = Curl_cf_create(pcf, &Curl_cft_ip_happy, ctx);
 1021|       |
 1022|  5.46k|out:
 1023|  5.46k|  if(result) {
  ------------------
  |  Branch (1023:6): [True: 0, False: 5.46k]
  ------------------
 1024|       |    curlx_safefree(*pcf);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1025|      0|    cf_ip_happy_ctx_destroy(ctx);
 1026|      0|  }
 1027|  5.46k|  return result;
 1028|  5.46k|}

Curl_socket_addr_from_ai:
  276|  5.43k|{
  277|       |  /*
  278|       |   * The Curl_sockaddr_ex structure is libcurl's external API
  279|       |   * curl_sockaddr structure with enough space available to directly hold
  280|       |   * any protocol-specific address structures. The variable declared here
  281|       |   * will be used to pass / receive data to/from the fopensocket callback
  282|       |   * if this has been set, before that, it is initialized from parameters.
  283|       |   */
  284|  5.43k|  addr->family = ai->ai_family;
  285|  5.43k|  addr->socktype = Curl_socktype_for_transport(transport);
  286|  5.43k|  addr->protocol = Curl_protocol_for_transport(transport);
  287|  5.43k|  addr->addrlen = (unsigned int)ai->ai_addrlen;
  288|       |
  289|  5.43k|  DEBUGASSERT(addr->addrlen <= sizeof(addr->curl_sa_addrbuf));
  ------------------
  |  | 1081|  5.43k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:3): [True: 0, False: 5.43k]
  |  Branch (289:3): [True: 5.43k, False: 0]
  ------------------
  290|  5.43k|  if(addr->addrlen > sizeof(addr->curl_sa_addrbuf))
  ------------------
  |  |   55|  5.43k|#define curl_sa_addrbuf addr.buf
  ------------------
  |  Branch (290:6): [True: 0, False: 5.43k]
  ------------------
  291|      0|    return CURLE_TOO_LARGE;
  292|       |
  293|  5.43k|  memcpy(&addr->curl_sa_addrbuf, ai->ai_addr, addr->addrlen);
  ------------------
  |  |   55|  5.43k|#define curl_sa_addrbuf addr.buf
  ------------------
  294|  5.43k|  return CURLE_OK;
  295|  5.43k|}
Curl_parse_interface:
  517|    225|{
  518|    225|  static const char if_prefix[] = "if!";
  519|    225|  static const char host_prefix[] = "host!";
  520|    225|  static const char if_host_prefix[] = "ifhost!";
  521|    225|  size_t len;
  522|       |
  523|    225|  DEBUGASSERT(dev);
  ------------------
  |  | 1081|    225|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (523:3): [True: 0, False: 225]
  |  Branch (523:3): [True: 225, False: 0]
  ------------------
  524|    225|  DEBUGASSERT(iface);
  ------------------
  |  | 1081|    225|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (524:3): [True: 0, False: 225]
  |  Branch (524:3): [True: 225, False: 0]
  ------------------
  525|    225|  DEBUGASSERT(host);
  ------------------
  |  | 1081|    225|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (525:3): [True: 0, False: 225]
  |  Branch (525:3): [True: 225, False: 0]
  ------------------
  526|       |
  527|    225|  len = strlen(input);
  528|    225|  if(len > 512)
  ------------------
  |  Branch (528:6): [True: 1, False: 224]
  ------------------
  529|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  530|       |
  531|    224|  if(!strncmp(if_prefix, input, strlen(if_prefix))) {
  ------------------
  |  Branch (531:6): [True: 4, False: 220]
  ------------------
  532|      4|    input += strlen(if_prefix);
  533|      4|    if(!*input)
  ------------------
  |  Branch (533:8): [True: 1, False: 3]
  ------------------
  534|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
  535|      3|    *iface = curlx_memdup0(input, len - strlen(if_prefix));
  536|      3|    return *iface ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (536:12): [True: 3, False: 0]
  ------------------
  537|      4|  }
  538|    220|  else if(!strncmp(host_prefix, input, strlen(host_prefix))) {
  ------------------
  |  Branch (538:11): [True: 6, False: 214]
  ------------------
  539|      6|    input += strlen(host_prefix);
  540|      6|    if(!*input)
  ------------------
  |  Branch (540:8): [True: 1, False: 5]
  ------------------
  541|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
  542|      5|    *host = curlx_memdup0(input, len - strlen(host_prefix));
  543|      5|    return *host ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (543:12): [True: 5, False: 0]
  ------------------
  544|      6|  }
  545|    214|  else if(!strncmp(if_host_prefix, input, strlen(if_host_prefix))) {
  ------------------
  |  Branch (545:11): [True: 7, False: 207]
  ------------------
  546|      7|    const char *host_part;
  547|      7|    input += strlen(if_host_prefix);
  548|      7|    len -= strlen(if_host_prefix);
  549|      7|    host_part = memchr(input, '!', len);
  550|      7|    if(!host_part || !*(host_part + 1))
  ------------------
  |  Branch (550:8): [True: 1, False: 6]
  |  Branch (550:22): [True: 1, False: 5]
  ------------------
  551|      2|      return CURLE_BAD_FUNCTION_ARGUMENT;
  552|      5|    *iface = curlx_memdup0(input, host_part - input);
  553|      5|    if(!*iface)
  ------------------
  |  Branch (553:8): [True: 0, False: 5]
  ------------------
  554|      0|      return CURLE_OUT_OF_MEMORY;
  555|      5|    ++host_part;
  556|      5|    *host = curlx_memdup0(host_part, len - (host_part - input));
  557|      5|    if(!*host) {
  ------------------
  |  Branch (557:8): [True: 0, False: 5]
  ------------------
  558|      0|      curlx_safefree(*iface);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  559|      0|      return CURLE_OUT_OF_MEMORY;
  560|      0|    }
  561|      5|    return CURLE_OK;
  562|      5|  }
  563|       |
  564|    207|  if(!*input)
  ------------------
  |  Branch (564:6): [True: 1, False: 206]
  ------------------
  565|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  566|    206|  *dev = curlx_memdup0(input, len);
  567|    206|  return *dev ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (567:10): [True: 206, False: 0]
  ------------------
  568|    207|}
Curl_cf_tcp_create:
 1773|  5.42k|{
 1774|  5.42k|  struct cf_socket_ctx *ctx = NULL;
 1775|  5.42k|  struct Curl_cfilter *cf = NULL;
 1776|  5.42k|  CURLcode result;
 1777|       |
 1778|  5.42k|  (void)data;
 1779|  5.42k|  (void)conn;
 1780|  5.42k|  (void)transport_in;
 1781|  5.42k|  DEBUGASSERT(transport_out == TRNSPRT_TCP);
  ------------------
  |  | 1081|  5.42k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1781:3): [True: 0, False: 5.42k]
  |  Branch (1781:3): [True: 5.42k, False: 0]
  ------------------
 1782|  5.42k|  if(!addr) {
  ------------------
  |  Branch (1782:6): [True: 0, False: 5.42k]
  ------------------
 1783|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
 1784|      0|    goto out;
 1785|      0|  }
 1786|       |
 1787|  5.42k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  5.42k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1788|  5.42k|  if(!ctx) {
  ------------------
  |  Branch (1788:6): [True: 0, False: 5.42k]
  ------------------
 1789|      0|    result = CURLE_OUT_OF_MEMORY;
 1790|      0|    goto out;
 1791|      0|  }
 1792|       |
 1793|  5.42k|  result = cf_socket_ctx_init(ctx, addr, transport_out);
 1794|  5.42k|  if(result)
  ------------------
  |  Branch (1794:6): [True: 0, False: 5.42k]
  ------------------
 1795|      0|    goto out;
 1796|       |
 1797|  5.42k|  result = Curl_cf_create(&cf, &Curl_cft_tcp, ctx);
 1798|       |
 1799|  5.42k|out:
 1800|  5.42k|  *pcf = (!result) ? cf : NULL;
  ------------------
  |  Branch (1800:10): [True: 5.42k, False: 0]
  ------------------
 1801|  5.42k|  if(result) {
  ------------------
  |  Branch (1801:6): [True: 0, False: 5.42k]
  ------------------
 1802|      0|    curlx_safefree(cf);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1803|      0|    curlx_safefree(ctx);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1804|      0|  }
 1805|       |
 1806|  5.42k|  return result;
 1807|  5.42k|}
Curl_cf_unix_create:
 1997|     13|{
 1998|     13|  struct cf_socket_ctx *ctx = NULL;
 1999|     13|  struct Curl_cfilter *cf = NULL;
 2000|     13|  CURLcode result;
 2001|       |
 2002|     13|  (void)data;
 2003|     13|  (void)conn;
 2004|     13|  (void)transport_in;
 2005|     13|  DEBUGASSERT(transport_out == TRNSPRT_UNIX);
  ------------------
  |  | 1081|     13|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2005:3): [True: 0, False: 13]
  |  Branch (2005:3): [True: 13, False: 0]
  ------------------
 2006|     13|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|     13|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 2007|     13|  if(!ctx) {
  ------------------
  |  Branch (2007:6): [True: 0, False: 13]
  ------------------
 2008|      0|    result = CURLE_OUT_OF_MEMORY;
 2009|      0|    goto out;
 2010|      0|  }
 2011|       |
 2012|     13|  result = cf_socket_ctx_init(ctx, addr, transport_out);
 2013|     13|  if(result)
  ------------------
  |  Branch (2013:6): [True: 0, False: 13]
  ------------------
 2014|      0|    goto out;
 2015|       |
 2016|     13|  result = Curl_cf_create(&cf, &Curl_cft_unix, ctx);
 2017|       |
 2018|     13|out:
 2019|     13|  *pcf = (!result) ? cf : NULL;
  ------------------
  |  Branch (2019:10): [True: 13, False: 0]
  ------------------
 2020|     13|  if(result) {
  ------------------
  |  Branch (2020:6): [True: 0, False: 13]
  ------------------
 2021|      0|    curlx_safefree(cf);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2022|      0|    curlx_safefree(ctx);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2023|      0|  }
 2024|       |
 2025|     13|  return result;
 2026|     13|}
cf-socket.c:socket_open:
  352|  5.43k|{
  353|  5.43k|  char errbuf[STRERROR_LEN];
  354|       |
  355|  5.43k|#ifdef SOCK_CLOEXEC
  356|  5.43k|  addr->socktype |= SOCK_CLOEXEC;
  357|  5.43k|#endif
  358|       |
  359|  5.43k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  5.43k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (359:3): [True: 0, False: 5.43k]
  |  Branch (359:3): [True: 5.43k, False: 0]
  ------------------
  360|  5.43k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  5.43k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (360:3): [True: 0, False: 5.43k]
  |  Branch (360:3): [True: 5.43k, False: 0]
  ------------------
  361|  5.43k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (361:6): [True: 5.36k, False: 70]
  ------------------
  362|       |    /*
  363|       |     * If the opensocket callback is set, all the destination address
  364|       |     * information is passed to the callback. Depending on this information the
  365|       |     * callback may opt to abort the connection, this is indicated returning
  366|       |     * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When
  367|       |     * the callback returns a valid socket the destination address information
  368|       |     * might have been changed and this 'new' address will actually be used
  369|       |     * here to connect.
  370|       |     */
  371|  5.36k|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|  5.36k|#define TRUE true
  ------------------
  372|  5.36k|    *sockfd = data->set.fopensocket(data->set.opensocket_client,
  373|  5.36k|                                    CURLSOCKTYPE_IPCXN,
  374|  5.36k|                                    (struct curl_sockaddr *)addr);
  375|  5.36k|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|  5.36k|#define FALSE false
  ------------------
  376|  5.36k|  }
  377|     70|  else {
  378|       |    /* opensocket callback not set, so create the socket now */
  379|     70|#ifdef DEBUGBUILD
  380|     70|    if((addr->family == AF_INET6) && getenv("CURL_DBG_SOCK_FAIL_IPV6")) {
  ------------------
  |  Branch (380:8): [True: 27, False: 43]
  |  Branch (380:38): [True: 0, False: 27]
  ------------------
  381|      0|      failf(data, "CURL_DBG_SOCK_FAIL_IPV6: failed to open socket");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  382|      0|      return CURLE_COULDNT_CONNECT;
  383|      0|    }
  384|     70|#endif
  385|     70|    *sockfd = CURL_SOCKET(addr->family, addr->socktype, addr->protocol);
  ------------------
  |  | 1436|     70|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  386|     70|    if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  |  145|     70|#define CURL_SOCKET_BAD (-1)
  ------------------
                  if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
                  if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  | 1133|      0|#define SOCKENOMEM        ENOMEM
  ------------------
  |  Branch (386:8): [True: 0, False: 70]
  |  Branch (386:40): [True: 0, False: 0]
  ------------------
  387|      0|      return CURLE_OUT_OF_MEMORY;
  388|     70|  }
  389|       |
  390|  5.43k|  if(*sockfd == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.43k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (390:6): [True: 0, False: 5.43k]
  ------------------
  391|       |    /* no socket, no connection */
  392|      0|    failf(data, "failed to open socket: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  393|      0|          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
  394|      0|    return CURLE_COULDNT_CONNECT;
  395|      0|  }
  396|       |
  397|       |#ifdef USE_SO_NOSIGPIPE
  398|       |  if(Curl_sock_nosigpipe(*sockfd) < 0) {
  399|       |    failf(data, "setsockopt enable SO_NOSIGPIPE: %s",
  400|       |          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  401|       |    sclose(*sockfd);
  402|       |    *sockfd = CURL_SOCKET_BAD;
  403|       |    return CURLE_COULDNT_CONNECT;
  404|       |  }
  405|       |#endif /* USE_SO_NOSIGPIPE */
  406|       |
  407|       |#if defined(HAVE_FCNTL) && !defined(SOCK_CLOEXEC)
  408|       |  if(fcntl(*sockfd, F_SETFD, FD_CLOEXEC) < 0) {
  409|       |    failf(data, "fcntl set CLOEXEC: %s",
  410|       |          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  411|       |    sclose(*sockfd);
  412|       |    *sockfd = CURL_SOCKET_BAD;
  413|       |    return CURLE_COULDNT_CONNECT;
  414|       |  }
  415|       |#endif
  416|       |
  417|  5.43k|#if defined(USE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
  418|  5.43k|  if(addr->family == AF_INET6) {
  ------------------
  |  Branch (418:6): [True: 96, False: 5.34k]
  ------------------
  419|     96|    struct sockaddr_in6 * const sa6 = (void *)&addr->curl_sa_addr;
  ------------------
  |  |   54|     96|#define curl_sa_addr    addr.sa
  ------------------
  420|     96|    sa6->sin6_scope_id = get_scope_id(data, sa6);
  421|     96|  }
  422|  5.43k|#endif
  423|  5.43k|  return CURLE_OK;
  424|  5.43k|}
cf-socket.c:get_scope_id:
  309|     96|{
  310|     96|  uint32_t scope_id = 0;
  311|     96|  if(data->conn->scope_id)
  ------------------
  |  Branch (311:6): [True: 11, False: 85]
  ------------------
  312|     11|    return data->conn->scope_id;
  313|       |  /* NOLINTNEXTLINE(clang-analyzer-core.uninitialized.Assign) */
  314|     85|  scope_id = sa6->sin6_scope_id;
  315|     85|  if(!scope_id && IN6_IS_ADDR_LINKLOCAL(&sa6->sin6_addr)) {
  ------------------
  |  Branch (315:6): [True: 85, False: 0]
  |  Branch (315:19): [True: 1, False: 84]
  ------------------
  316|       |    /* The resolver did not set scope_id for this link-local address.
  317|       |     * Try to determine it from the system's network interfaces.
  318|       |     * Without a scope_id, connect() to a link-local address fails
  319|       |     * with EINVAL on Linux.
  320|       |     * NOTE: On multi-homed hosts with several interfaces having
  321|       |     * link-local addresses, this picks the first one found, which
  322|       |     * may not be the correct outgoing interface. */
  323|      1|#if defined(HAVE_GETIFADDRS) && defined(HAVE_NET_IF_H)
  324|      1|    struct ifaddrs *ifa, *ifa_list;
  325|      1|    if(getifaddrs(&ifa_list) == 0) {
  ------------------
  |  Branch (325:8): [True: 1, False: 0]
  ------------------
  326|      5|      for(ifa = ifa_list; ifa; ifa = ifa->ifa_next) {
  ------------------
  |  Branch (326:27): [True: 4, False: 1]
  ------------------
  327|      4|        if(ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET6 &&
  ------------------
  |  Branch (327:12): [True: 4, False: 0]
  |  Branch (327:29): [True: 0, False: 4]
  ------------------
  328|      0|           (ifa->ifa_flags & IFF_UP) &&
  ------------------
  |  Branch (328:12): [True: 0, False: 0]
  ------------------
  329|      0|           !(ifa->ifa_flags & IFF_LOOPBACK)) {
  ------------------
  |  Branch (329:12): [True: 0, False: 0]
  ------------------
  330|      0|          struct sockaddr_in6 *s6 = (void *)ifa->ifa_addr;
  331|      0|          if(IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr) && s6->sin6_scope_id) {
  ------------------
  |  Branch (331:14): [True: 0, False: 0]
  |  Branch (331:55): [True: 0, False: 0]
  ------------------
  332|      0|            scope_id = s6->sin6_scope_id;
  333|      0|            infof(data,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  334|      0|                  "determined scope_id=%lu for link-local address "
  335|      0|                  "from local interface",
  336|      0|                  (unsigned long)scope_id);
  337|      0|            break;
  338|      0|          }
  339|      0|        }
  340|      4|      }
  341|      1|      freeifaddrs(ifa_list);
  342|      1|    }
  343|      1|#endif /* HAVE_GETIFADDRS && HAVE_NET_IF_H */
  344|      1|  }
  345|     85|  return scope_id;
  346|     96|}
cf-socket.c:socket_close:
  457|  5.43k|{
  458|  5.43k|  if(sock == CURL_SOCKET_BAD)
  ------------------
  |  |  145|  5.43k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (458:6): [True: 0, False: 5.43k]
  ------------------
  459|      0|    return 0;
  460|       |
  461|  5.43k|  if(use_callback && conn && conn->fclosesocket) {
  ------------------
  |  Branch (461:6): [True: 5.43k, False: 0]
  |  Branch (461:22): [True: 5.43k, False: 0]
  |  Branch (461:30): [True: 0, False: 5.43k]
  ------------------
  462|      0|    int rc;
  463|      0|    Curl_multi_will_close(data, sock);
  464|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  465|      0|    rc = conn->fclosesocket(conn->closesocket_client, sock);
  466|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  467|      0|    return rc;
  468|      0|  }
  469|       |
  470|  5.43k|  if(conn)
  ------------------
  |  Branch (470:6): [True: 5.43k, False: 0]
  ------------------
  471|       |    /* tell the multi-socket code about this */
  472|  5.43k|    Curl_multi_will_close(data, sock);
  473|       |
  474|  5.43k|  sclose(sock);
  ------------------
  |  | 1428|  5.43k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  475|       |
  476|  5.43k|  return 0;
  477|  5.43k|}
cf-socket.c:cf_socket_destroy:
 1016|  5.43k|{
 1017|  5.43k|  struct cf_socket_ctx *ctx = cf->ctx;
 1018|       |
 1019|  5.43k|  cf_socket_close(cf, data);
 1020|  5.43k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  5.43k|  do {                                          \
  |  |  154|  5.43k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.43k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.43k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.43k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.43k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.43k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.43k]
  |  |  ------------------
  ------------------
 1021|  5.43k|  curlx_free(ctx);
  ------------------
  |  | 1483|  5.43k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1022|       |  cf->ctx = NULL;
 1023|  5.43k|}
cf-socket.c:cf_tcp_connect:
 1304|  30.8k|{
 1305|  30.8k|  struct cf_socket_ctx *ctx = cf->ctx;
 1306|  30.8k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1307|  30.8k|  int rc = 0;
 1308|       |
 1309|  30.8k|  if(cf->connected) {
  ------------------
  |  Branch (1309:6): [True: 0, False: 30.8k]
  ------------------
 1310|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1311|      0|    return CURLE_OK;
 1312|      0|  }
 1313|       |
 1314|  30.8k|  *done = FALSE; /* a negative world view is best */
  ------------------
  |  | 1058|  30.8k|#define FALSE false
  ------------------
 1315|  30.8k|  if(ctx->sock == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  30.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1315:6): [True: 5.43k, False: 25.4k]
  ------------------
 1316|  5.43k|    int error;
 1317|       |
 1318|  5.43k|    result = cf_socket_open(cf, data);
 1319|  5.43k|    if(result)
  ------------------
  |  Branch (1319:8): [True: 183, False: 5.25k]
  ------------------
 1320|    183|      goto out;
 1321|       |
 1322|  5.25k|    if(cf->connected) {
  ------------------
  |  Branch (1322:8): [True: 5.18k, False: 70]
  ------------------
 1323|  5.18k|      *done = TRUE;
  ------------------
  |  | 1055|  5.18k|#define TRUE true
  ------------------
 1324|  5.18k|      return CURLE_OK;
 1325|  5.18k|    }
 1326|       |
 1327|       |    /* Connect TCP socket */
 1328|     70|    rc = do_connect(cf, data, (bool)cf->conn->bits.tcp_fastopen);
 1329|     70|    error = SOCKERRNO;
  ------------------
  |  | 1095|     70|#define SOCKERRNO         errno
  ------------------
 1330|     70|    set_local_ip(cf, data);
 1331|     70|    CURL_TRC_CF(data, cf, "local address %s port %d...",
  ------------------
  |  |  153|     70|  do {                                          \
  |  |  154|     70|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     70|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    140|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 70, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    140|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     70|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     70|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     70|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 70]
  |  |  ------------------
  ------------------
 1332|     70|                ctx->ip.local_ip, ctx->ip.local_port);
 1333|     70|    if(rc == -1) {
  ------------------
  |  Branch (1333:8): [True: 70, False: 0]
  ------------------
 1334|     70|      result = socket_connect_result(data, ctx->ip.remote_ip, error);
 1335|     70|      goto out;
 1336|     70|    }
 1337|     70|  }
 1338|       |
 1339|       |#ifdef mpeix
 1340|       |  /* Call this function once now, and ignore the results. We do this to
 1341|       |     "clear" the error state on the socket so that we can later read it
 1342|       |     reliably. This is reported necessary on the MPE/iX operating
 1343|       |     system. */
 1344|       |  (void)verifyconnect(ctx->sock, NULL);
 1345|       |#endif
 1346|       |  /* check socket for connect */
 1347|  25.4k|  rc = SOCKET_WRITABLE(ctx->sock, 0);
  ------------------
  |  |   79|  25.4k|  Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  145|  25.4k|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  |  |                 Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  145|  25.4k|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  ------------------
 1348|       |
 1349|  25.4k|  if(rc == 0) { /* no connection yet */
  ------------------
  |  Branch (1349:6): [True: 25.4k, False: 14]
  ------------------
 1350|  25.4k|    CURL_TRC_CF(data, cf, "not connected yet on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|  25.4k|  do {                                          \
  |  |  154|  25.4k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  25.4k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  50.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 25.4k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 25.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  50.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  25.4k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  25.4k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  25.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 25.4k]
  |  |  ------------------
  ------------------
 1351|  25.4k|    return CURLE_OK;
 1352|  25.4k|  }
 1353|     14|  else if(rc == CURL_CSELECT_OUT || cf->conn->bits.tcp_fastopen) {
  ------------------
  |  |  291|     28|#define CURL_CSELECT_OUT  0x02
  ------------------
  |  Branch (1353:11): [True: 0, False: 14]
  |  Branch (1353:37): [True: 0, False: 14]
  ------------------
 1354|      0|    if(verifyconnect(ctx->sock, &ctx->error)) {
  ------------------
  |  Branch (1354:8): [True: 0, False: 0]
  ------------------
 1355|       |      /* we are connected with TCP, awesome! */
 1356|      0|      ctx->connected_at = *Curl_pgrs_now(data);
 1357|      0|      set_local_ip(cf, data);
 1358|      0|      *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1359|      0|      cf->connected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1360|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 1361|      0|      return CURLE_OK;
 1362|      0|    }
 1363|      0|  }
 1364|     14|  else if(rc & CURL_CSELECT_ERR) {
  ------------------
  |  |  292|     14|#define CURL_CSELECT_ERR  0x04
  ------------------
  |  Branch (1364:11): [True: 14, False: 0]
  ------------------
 1365|     14|    CURL_TRC_CF(data, cf, "poll/select error on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|     14|  do {                                          \
  |  |  154|     14|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     14|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     28|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 14, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     28|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     14|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     14|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     14|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 14]
  |  |  ------------------
  ------------------
 1366|     14|    (void)verifyconnect(ctx->sock, &ctx->error);
 1367|     14|    result = CURLE_COULDNT_CONNECT;
 1368|     14|  }
 1369|       |
 1370|    267|out:
 1371|    267|  if(result) {
  ------------------
  |  Branch (1371:6): [True: 224, False: 43]
  ------------------
 1372|    224|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1618|    224|#define VERBOSE(x) x
  ------------------
 1373|    224|    set_local_ip(cf, data);
 1374|    224|    if(ctx->error) {
  ------------------
  |  Branch (1374:8): [True: 14, False: 210]
  ------------------
 1375|     14|      data->state.os_errno = ctx->error;
 1376|     14|      SET_SOCKERRNO(ctx->error);
  ------------------
  |  | 1096|     14|#define SET_SOCKERRNO(x)  (errno = (x))
  ------------------
 1377|     14|      VERBOSE(curlx_strerror(ctx->error, buffer, sizeof(buffer)));
  ------------------
  |  | 1618|     14|#define VERBOSE(x) x
  ------------------
 1378|     14|    }
 1379|    210|    else {
 1380|    210|      VERBOSE(curlx_strcopy(buffer, sizeof(buffer), STRCONST("peer closed")));
  ------------------
  |  | 1618|    210|#define VERBOSE(x) x
  ------------------
 1381|    210|    }
 1382|    224|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    224|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1382:8): [True: 41, False: 183]
  ------------------
 1383|     41|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1055|     41|#define TRUE true
  ------------------
 1384|     41|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|     41|#define CURL_SOCKET_BAD (-1)
  ------------------
 1385|     41|    }
 1386|    224|    infof(data, "connect to %s port %u from %s port %d failed: %s",
  ------------------
  |  |  143|    224|  do {                               \
  |  |  144|    224|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    224|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 224, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 224]
  |  |  |  |  ------------------
  |  |  |  |  320|    224|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    224|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    224|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 224]
  |  |  ------------------
  ------------------
 1387|    224|          ctx->ip.remote_ip, ctx->ip.remote_port,
 1388|    224|          ctx->ip.local_ip, ctx->ip.local_port,
 1389|    224|          curlx_strerror(ctx->error, buffer, sizeof(buffer)));
 1390|       |    *done = FALSE;
  ------------------
  |  | 1058|    224|#define FALSE false
  ------------------
 1391|    224|  }
 1392|    267|  return result;
 1393|  25.4k|}
cf-socket.c:cf_socket_open:
 1093|  5.43k|{
 1094|  5.43k|  struct cf_socket_ctx *ctx = cf->ctx;
 1095|  5.43k|  int error = 0;
 1096|  5.43k|  bool isconnected = FALSE;
  ------------------
  |  | 1058|  5.43k|#define FALSE false
  ------------------
 1097|  5.43k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1098|  5.43k|  bool is_tcp;
 1099|       |
 1100|  5.43k|  DEBUGASSERT(ctx->sock == CURL_SOCKET_BAD);
  ------------------
  |  | 1081|  5.43k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1100:3): [True: 0, False: 5.43k]
  |  Branch (1100:3): [True: 5.43k, False: 0]
  ------------------
 1101|  5.43k|  ctx->started_at = *Curl_pgrs_now(data);
 1102|  5.43k|#ifdef SOCK_NONBLOCK
 1103|       |  /* Do not tuck SOCK_NONBLOCK into socktype when opensocket callback is set
 1104|       |   * because we would not know how socketype is about to be used in the
 1105|       |   * callback, SOCK_NONBLOCK might get factored out before calling socket().
 1106|       |   */
 1107|  5.43k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1107:6): [True: 70, False: 5.36k]
  ------------------
 1108|     70|    ctx->addr.socktype |= SOCK_NONBLOCK;
 1109|  5.43k|#endif
 1110|  5.43k|  result = socket_open(data, &ctx->addr, &ctx->sock);
 1111|  5.43k|#ifdef SOCK_NONBLOCK
 1112|       |  /* Restore the socktype after the socket is created. */
 1113|  5.43k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1113:6): [True: 70, False: 5.36k]
  ------------------
 1114|     70|    ctx->addr.socktype &= ~SOCK_NONBLOCK;
 1115|  5.43k|#endif
 1116|  5.43k|  if(result)
  ------------------
  |  Branch (1116:6): [True: 0, False: 5.43k]
  ------------------
 1117|      0|    goto out;
 1118|       |
 1119|  5.43k|  result = set_remote_ip(cf, data);
 1120|  5.43k|  if(result)
  ------------------
  |  Branch (1120:6): [True: 0, False: 5.43k]
  ------------------
 1121|      0|    goto out;
 1122|       |
 1123|  5.43k|#ifdef USE_IPV6
 1124|  5.43k|  if(ctx->addr.family == AF_INET6) {
  ------------------
  |  Branch (1124:6): [True: 96, False: 5.34k]
  ------------------
 1125|       |#ifdef USE_WINSOCK
 1126|       |    /* Turn on support for IPv4-mapped IPv6 addresses.
 1127|       |     * Linux kernel, NetBSD, FreeBSD, Darwin, lwIP: default is off;
 1128|       |     * Windows Vista and later: default is on;
 1129|       |     * DragonFly BSD: acts like off, and dummy setting;
 1130|       |     * OpenBSD and earlier Windows: unsupported.
 1131|       |     * Linux: controlled by /proc/sys/net/ipv6/bindv6only.
 1132|       |     */
 1133|       |    int on = 0;
 1134|       |    (void)setsockopt(ctx->sock, IPPROTO_IPV6, IPV6_V6ONLY,
 1135|       |                     (void *)&on, sizeof(on));
 1136|       |#endif
 1137|     96|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1138|     96|    {
 1139|     96|      struct sockaddr_in6 *sa6 = (void *)&ctx->addr.curl_sa_addr;
  ------------------
  |  |   54|     96|#define curl_sa_addr    addr.sa
  ------------------
 1140|     96|      if(sa6->sin6_scope_id)
  ------------------
  |  Branch (1140:10): [True: 11, False: 85]
  ------------------
 1141|     11|        infof(data, "  Trying [%s]:%d scope_id=%lu...",
  ------------------
  |  |  143|     11|  do {                               \
  |  |  144|     11|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     11|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 11, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  320|     11|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     11|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     11|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 11]
  |  |  ------------------
  ------------------
 1142|     96|              ctx->ip.remote_ip, ctx->ip.remote_port,
 1143|     96|              (unsigned long)sa6->sin6_scope_id);
 1144|     85|      else
 1145|     85|#endif
 1146|     85|        infof(data, "  Trying [%s]:%d...",
  ------------------
  |  |  143|     85|  do {                               \
  |  |  144|     85|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     85|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 85, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 85]
  |  |  |  |  ------------------
  |  |  |  |  320|     85|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     85|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     85|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 85]
  |  |  ------------------
  ------------------
 1147|     96|              ctx->ip.remote_ip, ctx->ip.remote_port);
 1148|     96|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1149|     96|    }
 1150|     96|#endif
 1151|     96|  }
 1152|  5.34k|  else
 1153|  5.34k|#endif
 1154|  5.34k|    infof(data, "  Trying %s:%d...", ctx->ip.remote_ip, ctx->ip.remote_port);
  ------------------
  |  |  143|  5.34k|  do {                               \
  |  |  144|  5.34k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  5.34k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 5.34k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.34k]
  |  |  |  |  ------------------
  |  |  |  |  320|  5.34k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  5.34k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  5.34k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 5.34k]
  |  |  ------------------
  ------------------
 1155|       |
 1156|  5.43k|#ifdef USE_IPV6
 1157|  5.43k|  is_tcp = (ctx->addr.family == AF_INET ||
  ------------------
  |  Branch (1157:13): [True: 5.32k, False: 110]
  ------------------
 1158|    110|            ctx->addr.family == AF_INET6) &&
  ------------------
  |  Branch (1158:13): [True: 96, False: 14]
  ------------------
 1159|  5.42k|    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
  ------------------
  |  Branch (1159:5): [True: 5.42k, False: 0]
  ------------------
 1160|       |#else
 1161|       |  is_tcp = (ctx->addr.family == AF_INET) &&
 1162|       |    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
 1163|       |#endif
 1164|  5.43k|  if(is_tcp && data->set.tcp_nodelay)
  ------------------
  |  Branch (1164:6): [True: 5.42k, False: 14]
  |  Branch (1164:16): [True: 5.42k, False: 3]
  ------------------
 1165|  5.42k|    tcpnodelay(cf, data, ctx->sock);
 1166|       |
 1167|  5.43k|  if(is_tcp && data->set.tcp_keepalive)
  ------------------
  |  Branch (1167:6): [True: 5.42k, False: 14]
  |  Branch (1167:16): [True: 28, False: 5.39k]
  ------------------
 1168|     28|    tcpkeepalive(cf, data, ctx->sock);
 1169|       |
 1170|  5.43k|  if(data->set.fsockopt) {
  ------------------
  |  Branch (1170:6): [True: 5.36k, False: 70]
  ------------------
 1171|       |    /* activate callback for setting socket options */
 1172|  5.36k|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|  5.36k|#define TRUE true
  ------------------
 1173|  5.36k|    error = data->set.fsockopt(data->set.sockopt_client,
 1174|  5.36k|                               ctx->sock,
 1175|  5.36k|                               CURLSOCKTYPE_IPCXN);
 1176|  5.36k|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|  5.36k|#define FALSE false
  ------------------
 1177|       |
 1178|  5.36k|    if(error == CURL_SOCKOPT_ALREADY_CONNECTED)
  ------------------
  |  |  421|  5.36k|#define CURL_SOCKOPT_ALREADY_CONNECTED 2
  ------------------
  |  Branch (1178:8): [True: 5.36k, False: 0]
  ------------------
 1179|  5.36k|      isconnected = TRUE;
  ------------------
  |  | 1055|  5.36k|#define TRUE true
  ------------------
 1180|      0|    else if(error) {
  ------------------
  |  Branch (1180:13): [True: 0, False: 0]
  ------------------
 1181|      0|      result = CURLE_ABORTED_BY_CALLBACK;
 1182|      0|      goto out;
 1183|      0|    }
 1184|  5.36k|  }
 1185|       |
 1186|  5.43k|#ifndef CURL_DISABLE_BINDLOCAL
 1187|       |  /* possibly bind the local end to an IP, interface or port */
 1188|  5.43k|  if(ctx->addr.family == AF_INET
  ------------------
  |  Branch (1188:6): [True: 5.32k, False: 110]
  ------------------
 1189|    110|#ifdef USE_IPV6
 1190|    110|     || ctx->addr.family == AF_INET6
  ------------------
  |  Branch (1190:9): [True: 96, False: 14]
  ------------------
 1191|  5.43k|#endif
 1192|  5.43k|    ) {
 1193|  5.42k|    result = bindlocal(data, cf->conn, ctx->sock, ctx->addr.family,
 1194|  5.42k|                       Curl_ipv6_scope(&ctx->addr.curl_sa_addr),
  ------------------
  |  |   54|  5.42k|#define curl_sa_addr    addr.sa
  ------------------
 1195|  5.42k|                       ctx->transport);
 1196|  5.42k|    if(result) {
  ------------------
  |  Branch (1196:8): [True: 183, False: 5.24k]
  ------------------
 1197|    183|      if(result == CURLE_UNSUPPORTED_PROTOCOL) {
  ------------------
  |  Branch (1197:10): [True: 40, False: 143]
  ------------------
 1198|       |        /* The address family is not supported on this interface.
 1199|       |           We can continue trying addresses */
 1200|     40|        result = CURLE_COULDNT_CONNECT;
 1201|     40|      }
 1202|    183|      goto out;
 1203|    183|    }
 1204|  5.42k|  }
 1205|  5.25k|#endif
 1206|       |
 1207|       |#ifndef SOCK_NONBLOCK
 1208|       |  /* Set socket non-blocking, must be a non-blocking socket for
 1209|       |   * a non-blocking connect. */
 1210|       |  error = curlx_nonblock(ctx->sock, TRUE);
 1211|       |  if(error < 0) {
 1212|       |    result = CURLE_UNSUPPORTED_PROTOCOL;
 1213|       |    ctx->error = SOCKERRNO;
 1214|       |    goto out;
 1215|       |  }
 1216|       |#else
 1217|  5.25k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (1217:6): [True: 5.18k, False: 70]
  ------------------
 1218|       |    /* Set socket non-blocking, must be a non-blocking socket for
 1219|       |     * a non-blocking connect. */
 1220|  5.18k|    error = curlx_nonblock(ctx->sock, TRUE);
  ------------------
  |  | 1055|  5.18k|#define TRUE true
  ------------------
 1221|  5.18k|    if(error < 0) {
  ------------------
  |  Branch (1221:8): [True: 0, False: 5.18k]
  ------------------
 1222|      0|      result = CURLE_UNSUPPORTED_PROTOCOL;
 1223|      0|      ctx->error = SOCKERRNO;
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
 1224|      0|      goto out;
 1225|      0|    }
 1226|  5.18k|  }
 1227|  5.25k|#endif
 1228|  5.25k|  ctx->sock_connected = (cf_socktype(ctx->addr.socktype) != SOCK_DGRAM);
 1229|  5.43k|out:
 1230|  5.43k|  if(result) {
  ------------------
  |  Branch (1230:6): [True: 183, False: 5.25k]
  ------------------
 1231|    183|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    183|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1231:8): [True: 183, False: 0]
  ------------------
 1232|    183|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1055|    183|#define TRUE true
  ------------------
 1233|    183|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|    183|#define CURL_SOCKET_BAD (-1)
  ------------------
 1234|    183|    }
 1235|    183|  }
 1236|  5.25k|  else if(isconnected) {
  ------------------
  |  Branch (1236:11): [True: 5.18k, False: 70]
  ------------------
 1237|  5.18k|    set_local_ip(cf, data);
 1238|  5.18k|    ctx->connected_at = *Curl_pgrs_now(data);
 1239|  5.18k|    cf->connected = TRUE;
  ------------------
  |  | 1055|  5.18k|#define TRUE true
  ------------------
 1240|  5.18k|  }
 1241|  5.43k|  CURL_TRC_CF(data, cf, "cf_socket_open() -> %d, fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|  5.43k|  do {                                          \
  |  |  154|  5.43k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.43k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.43k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.43k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.43k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.43k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.43k]
  |  |  ------------------
  ------------------
 1242|  5.43k|              result, ctx->sock);
 1243|  5.43k|  return result;
 1244|  5.25k|}
cf-socket.c:set_remote_ip:
 1059|  5.43k|{
 1060|  5.43k|  struct cf_socket_ctx *ctx = cf->ctx;
 1061|       |
 1062|       |  /* store remote address and port used in this connection attempt */
 1063|  5.43k|  ctx->ip.transport = ctx->transport;
 1064|  5.43k|  if(!Curl_addr2string(&ctx->addr.curl_sa_addr,
  ------------------
  |  |   54|  5.43k|#define curl_sa_addr    addr.sa
  ------------------
  |  Branch (1064:6): [True: 0, False: 5.43k]
  ------------------
 1065|  5.43k|                       (curl_socklen_t)ctx->addr.addrlen,
 1066|  5.43k|                       ctx->ip.remote_ip, &ctx->ip.remote_port)) {
 1067|      0|    char buffer[STRERROR_LEN];
 1068|       |
 1069|      0|    ctx->error = errno;
 1070|       |    /* malformed address or bug in inet_ntop, try next address */
 1071|      0|    failf(data, "curl_sa_addr inet_ntop() failed with errno %d: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1072|      0|          errno, curlx_strerror(errno, buffer, sizeof(buffer)));
 1073|      0|    return CURLE_FAILED_INIT;
 1074|      0|  }
 1075|  5.43k|  return CURLE_OK;
 1076|  5.43k|}
cf-socket.c:cf_socktype:
 1081|  10.6k|{
 1082|  10.6k|#ifdef SOCK_CLOEXEC
 1083|  10.6k|  x &= ~SOCK_CLOEXEC;
 1084|  10.6k|#endif
 1085|  10.6k|#ifdef SOCK_NONBLOCK
 1086|       |  x &= ~SOCK_NONBLOCK;
 1087|  10.6k|#endif
 1088|  10.6k|  return x;
 1089|  10.6k|}
cf-socket.c:tcpnodelay:
   84|  5.42k|{
   85|  5.42k|#if defined(TCP_NODELAY) && defined(CURL_TCP_NODELAY_SUPPORTED)
   86|  5.42k|  curl_socklen_t onoff = (curl_socklen_t)1;
   87|  5.42k|  int level = IPPROTO_TCP;
   88|  5.42k|  VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1618|  5.42k|#define VERBOSE(x) x
  ------------------
   89|       |
   90|  5.42k|  if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff, sizeof(onoff)) < 0)
  ------------------
  |  Branch (90:6): [True: 5.35k, False: 70]
  ------------------
   91|  5.35k|    CURL_TRC_CF(data, cf, "Could not set TCP_NODELAY: %s",
  ------------------
  |  |  153|  5.35k|  do {                                          \
  |  |  154|  5.35k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.35k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.35k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.35k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.35k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.35k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.35k]
  |  |  ------------------
  ------------------
   92|  5.42k|                curlx_strerror(SOCKERRNO, buffer, sizeof(buffer)));
   93|       |#else
   94|       |  (void)cf;
   95|       |  (void)data;
   96|       |  (void)sockfd;
   97|       |#endif
   98|  5.42k|}
cf-socket.c:tcpkeepalive:
  118|     28|{
  119|     28|  int optval = data->set.tcp_keepalive ? 1 : 0;
  ------------------
  |  Branch (119:16): [True: 28, False: 0]
  ------------------
  120|       |
  121|       |  /* only set IDLE and INTVL if setting KEEPALIVE is successful */
  122|     28|  if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE,
  ------------------
  |  Branch (122:6): [True: 0, False: 28]
  ------------------
  123|     28|                (void *)&optval, sizeof(optval)) < 0) {
  124|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  125|      0|                "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  126|      0|  }
  127|     28|  else {
  128|       |#ifdef USE_WINSOCK
  129|       |    /* Windows 10, version 1709 (10.0.16299) and later versions can use
  130|       |       setsockopt() TCP_KEEP*. Older versions return with failure. */
  131|       |    if(curlx_verify_windows_version(10, 0, 16299, PLATFORM_WINNT,
  132|       |                                    VERSION_GREATER_THAN_EQUAL)) {
  133|       |      CURL_TRC_CF(data, cf, "Set TCP_KEEP* on fd=%" FMT_SOCKET_T, sockfd);
  134|       |      optval = curlx_sltosi(data->set.tcp_keepidle);
  135|       |/* Offered by mingw-w64 v12+, MS SDK 6.0A/VS2008+ */
  136|       |#ifndef TCP_KEEPALIVE
  137|       |#define TCP_KEEPALIVE 3
  138|       |#endif
  139|       |/* Offered by mingw-w64 v12+, MS SDK 10.0.15063.0/VS2017 15.1+ */
  140|       |#ifndef TCP_KEEPCNT
  141|       |#define TCP_KEEPCNT 16
  142|       |#endif
  143|       |/* Offered by mingw-w64 v12+, MS SDK 10.0.16299.0/VS2017 15.4+ */
  144|       |#ifndef TCP_KEEPIDLE
  145|       |#define TCP_KEEPIDLE TCP_KEEPALIVE
  146|       |#endif
  147|       |#ifndef TCP_KEEPINTVL
  148|       |#define TCP_KEEPINTVL 17
  149|       |#endif
  150|       |      if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
  151|       |                    (const char *)&optval, sizeof(optval)) < 0) {
  152|       |        CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPIDLE on fd "
  153|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  154|       |      }
  155|       |      optval = curlx_sltosi(data->set.tcp_keepintvl);
  156|       |      if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
  157|       |                    (const char *)&optval, sizeof(optval)) < 0) {
  158|       |        CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPINTVL on fd "
  159|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  160|       |      }
  161|       |      optval = curlx_sltosi(data->set.tcp_keepcnt);
  162|       |      if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT,
  163|       |                    (const char *)&optval, sizeof(optval)) < 0) {
  164|       |        CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPCNT on fd "
  165|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  166|       |      }
  167|       |    }
  168|       |    else {
  169|       |/* Offered by mingw-w64 and MS SDK. Latter only when targeting Win7+. */
  170|       |#ifndef SIO_KEEPALIVE_VALS
  171|       |#define SIO_KEEPALIVE_VALS  _WSAIOW(IOC_VENDOR, 4)
  172|       |      struct tcp_keepalive {
  173|       |        u_long onoff;
  174|       |        u_long keepalivetime;
  175|       |        u_long keepaliveinterval;
  176|       |      };
  177|       |#endif
  178|       |      struct tcp_keepalive vals;
  179|       |      DWORD dummy;
  180|       |      vals.onoff = 1;
  181|       |      optval = curlx_sltosi(data->set.tcp_keepidle);
  182|       |      KEEPALIVE_FACTOR(optval);
  183|       |      vals.keepalivetime = (u_long)optval;
  184|       |      optval = curlx_sltosi(data->set.tcp_keepintvl);
  185|       |      KEEPALIVE_FACTOR(optval);
  186|       |      vals.keepaliveinterval = (u_long)optval;
  187|       |      if(WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, (LPVOID)&vals, sizeof(vals),
  188|       |                  NULL, 0, &dummy, NULL, NULL) != 0) {
  189|       |        CURL_TRC_CF(data, cf, "Failed to set SIO_KEEPALIVE_VALS on fd "
  190|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  191|       |      }
  192|       |    }
  193|       |#else /* !USE_WINSOCK */
  194|     28|#ifdef TCP_KEEPIDLE
  195|     28|    optval = curlx_sltosi(data->set.tcp_keepidle);
  196|     28|    KEEPALIVE_FACTOR(optval);
  197|     28|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
  ------------------
  |  Branch (197:8): [True: 28, False: 0]
  ------------------
  198|     28|                  (void *)&optval, sizeof(optval)) < 0) {
  199|     28|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPIDLE on fd "
  ------------------
  |  |  153|     28|  do {                                          \
  |  |  154|     28|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     28|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     56|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 28, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     56|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     28|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     28|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     28|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 28]
  |  |  ------------------
  ------------------
  200|     28|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  201|     28|    }
  202|       |#elif defined(TCP_KEEPALIVE)
  203|       |    /* macOS style */
  204|       |    optval = curlx_sltosi(data->set.tcp_keepidle);
  205|       |    KEEPALIVE_FACTOR(optval);
  206|       |    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE,
  207|       |                  (void *)&optval, sizeof(optval)) < 0) {
  208|       |      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE on fd "
  209|       |                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  210|       |    }
  211|       |#elif defined(TCP_KEEPALIVE_THRESHOLD)
  212|       |    /* Solaris <11.4 style */
  213|       |    optval = curlx_sltosi(data->set.tcp_keepidle);
  214|       |    KEEPALIVE_FACTOR(optval);
  215|       |    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE_THRESHOLD,
  216|       |                  (void *)&optval, sizeof(optval)) < 0) {
  217|       |      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE_THRESHOLD on fd "
  218|       |                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  219|       |    }
  220|       |#endif
  221|     28|#ifdef TCP_KEEPINTVL
  222|     28|    optval = curlx_sltosi(data->set.tcp_keepintvl);
  223|     28|    KEEPALIVE_FACTOR(optval);
  224|     28|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
  ------------------
  |  Branch (224:8): [True: 28, False: 0]
  ------------------
  225|     28|                  (void *)&optval, sizeof(optval)) < 0) {
  226|     28|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPINTVL on fd "
  ------------------
  |  |  153|     28|  do {                                          \
  |  |  154|     28|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     28|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     56|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 28, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     56|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     28|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     28|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     28|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 28]
  |  |  ------------------
  ------------------
  227|     28|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  228|     28|    }
  229|       |#elif defined(TCP_KEEPALIVE_ABORT_THRESHOLD)
  230|       |    /* Solaris <11.4 style */
  231|       |    /* TCP_KEEPALIVE_ABORT_THRESHOLD should equal to
  232|       |     * TCP_KEEPCNT * TCP_KEEPINTVL on other platforms.
  233|       |     * The default value of TCP_KEEPCNT is 9 on Linux,
  234|       |     * 8 on *BSD/macOS, 5 or 10 on Windows. We use the
  235|       |     * default config for Solaris <11.4 because there is
  236|       |     * no default value for TCP_KEEPCNT on Solaris 11.4.
  237|       |     *
  238|       |     * Note that the consequent probes will not be sent
  239|       |     * at equal intervals on Solaris, but will be sent
  240|       |     * using the exponential backoff algorithm. */
  241|       |    {
  242|       |      int keepcnt = curlx_sltosi(data->set.tcp_keepcnt);
  243|       |      int keepintvl = curlx_sltosi(data->set.tcp_keepintvl);
  244|       |
  245|       |      if(keepcnt > 0 && keepintvl > (INT_MAX / keepcnt))
  246|       |        optval = INT_MAX;
  247|       |      else
  248|       |        optval = keepcnt * keepintvl;
  249|       |    }
  250|       |    KEEPALIVE_FACTOR(optval);
  251|       |    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE_ABORT_THRESHOLD,
  252|       |                  (void *)&optval, sizeof(optval)) < 0) {
  253|       |      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE_ABORT_THRESHOLD"
  254|       |                  " on fd %" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  255|       |    }
  256|       |#endif
  257|     28|#ifdef TCP_KEEPCNT
  258|     28|    optval = curlx_sltosi(data->set.tcp_keepcnt);
  259|     28|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT,
  ------------------
  |  Branch (259:8): [True: 28, False: 0]
  ------------------
  260|     28|                  (void *)&optval, sizeof(optval)) < 0) {
  261|     28|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPCNT on fd "
  ------------------
  |  |  153|     28|  do {                                          \
  |  |  154|     28|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     28|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     56|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 28, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     56|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     28|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     28|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     28|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 28]
  |  |  ------------------
  ------------------
  262|     28|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  263|     28|    }
  264|     28|#endif
  265|     28|#endif /* USE_WINSOCK */
  266|     28|  }
  267|     28|}
cf-socket.c:bindlocal:
  574|  5.42k|{
  575|  5.42k|  struct Curl_sockaddr_storage sa;
  576|  5.42k|  struct sockaddr *sock = (struct sockaddr *)&sa;  /* bind to this address */
  577|  5.42k|  curl_socklen_t sizeof_sa = 0; /* size of the data sock points to */
  578|  5.42k|  struct sockaddr_in *si4 = (struct sockaddr_in *)&sa;
  579|  5.42k|#ifdef USE_IPV6
  580|  5.42k|  struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&sa;
  581|  5.42k|#endif
  582|       |
  583|  5.42k|  struct Curl_dns_entry *h = NULL;
  584|  5.42k|  unsigned short port = data->set.localport; /* use this port number, 0 for
  585|       |                                                "random" */
  586|       |  /* how many port numbers to try to bind to, increasing one at a time */
  587|  5.42k|  int portnum = data->set.localportrange;
  588|  5.42k|  const char *dev = data->set.str[STRING_DEVICE];
  589|  5.42k|  const char *iface_input = data->set.str[STRING_INTERFACE];
  590|  5.42k|  const char *host_input = data->set.str[STRING_BINDHOST];
  591|  5.42k|  const char *iface = iface_input ? iface_input : dev;
  ------------------
  |  Branch (591:23): [True: 8, False: 5.41k]
  ------------------
  592|  5.42k|  const char *host = host_input ? host_input : dev;
  ------------------
  |  Branch (592:22): [True: 9, False: 5.41k]
  ------------------
  593|  5.42k|  int error;
  594|  5.42k|#ifdef IP_BIND_ADDRESS_NO_PORT
  595|  5.42k|  int on = 1;
  596|  5.42k|#endif
  597|       |#ifndef USE_IPV6
  598|       |  (void)scope;
  599|       |#endif
  600|       |
  601|       |  /*************************************************************
  602|       |   * Select device to bind socket to
  603|       |   *************************************************************/
  604|  5.42k|  if(!iface && !host && !port)
  ------------------
  |  Branch (604:6): [True: 5.25k, False: 168]
  |  Branch (604:16): [True: 5.25k, False: 4]
  |  Branch (604:25): [True: 5.24k, False: 12]
  ------------------
  605|       |    /* no local kind of binding was requested */
  606|  5.24k|    return CURLE_OK;
  607|    184|  else if(iface && (strlen(iface) >= 255))
  ------------------
  |  Branch (607:11): [True: 168, False: 16]
  |  Branch (607:20): [True: 2, False: 166]
  ------------------
  608|      2|    return CURLE_BAD_FUNCTION_ARGUMENT;
  609|       |
  610|    182|  memset(&sa, 0, sizeof(struct Curl_sockaddr_storage));
  611|       |
  612|    182|  if(iface || host) {
  ------------------
  |  Branch (612:6): [True: 166, False: 16]
  |  Branch (612:15): [True: 4, False: 12]
  ------------------
  613|    170|    char myhost[256] = "";
  614|    170|    int done = 0; /* -1 for error, 1 for address found */
  615|    170|    if2ip_result_t if2ip_result = IF2IP_NOT_FOUND;
  616|       |
  617|    170|#ifdef SO_BINDTODEVICE
  618|    170|    if(iface) {
  ------------------
  |  Branch (618:8): [True: 166, False: 4]
  ------------------
  619|       |      /*
  620|       |       * This binds the local socket to a particular interface. This will
  621|       |       * force even requests to other local interfaces to go out the external
  622|       |       * interface. Only bind to the interface when specified as interface,
  623|       |       * not as a hostname or ip address.
  624|       |       *
  625|       |       * The interface might be a VRF, eg: vrf-blue, which means it cannot be
  626|       |       * converted to an IP address and would fail Curl_if2ip. Try to
  627|       |       * use it straight away.
  628|       |       */
  629|    166|      if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
  ------------------
  |  Branch (629:10): [True: 4, False: 162]
  ------------------
  630|    166|                    iface, (curl_socklen_t)strlen(iface) + 1) == 0) {
  631|       |        /* This is often "errno 1, error: Operation not permitted" if you are
  632|       |         * not running as root or another suitable privileged user. If it
  633|       |         * succeeds it means the parameter was a valid interface and not an IP
  634|       |         * address. Return immediately.
  635|       |         */
  636|      4|        if(!host_input) {
  ------------------
  |  Branch (636:12): [True: 1, False: 3]
  ------------------
  637|      1|          infof(data, "socket successfully bound to interface '%s'", iface);
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  320|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  638|      1|          return CURLE_OK;
  639|      1|        }
  640|      4|      }
  641|    166|    }
  642|    169|#endif
  643|    169|    if(!host_input) {
  ------------------
  |  Branch (643:8): [True: 160, False: 9]
  ------------------
  644|       |      /* Discover IP from input device, then bind to it */
  645|    160|      if2ip_result = Curl_if2ip(af,
  646|    160|#ifdef USE_IPV6
  647|    160|                                scope, conn->scope_id,
  648|    160|#endif
  649|    160|                                iface, myhost, sizeof(myhost));
  650|    160|    }
  651|    169|    switch(if2ip_result) {
  ------------------
  |  Branch (651:12): [True: 169, False: 0]
  ------------------
  652|    166|    case IF2IP_NOT_FOUND:
  ------------------
  |  Branch (652:5): [True: 166, False: 3]
  ------------------
  653|    166|      if(iface_input && !host_input) {
  ------------------
  |  Branch (653:10): [True: 8, False: 158]
  |  Branch (653:25): [True: 3, False: 5]
  ------------------
  654|       |        /* Do not fall back to treating it as a hostname */
  655|      3|        char buffer[STRERROR_LEN];
  656|      3|        data->state.os_errno = error = SOCKERRNO;
  ------------------
  |  | 1095|      3|#define SOCKERRNO         errno
  ------------------
  657|      3|        failf(data, "Could not bind to interface '%s' with errno %d: %s",
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  658|      3|              iface, error, curlx_strerror(error, buffer, sizeof(buffer)));
  659|      3|        return CURLE_INTERFACE_FAILED;
  660|      3|      }
  661|    163|      break;
  662|    163|    case IF2IP_AF_NOT_SUPPORTED:
  ------------------
  |  Branch (662:5): [True: 1, False: 168]
  ------------------
  663|       |      /* Signal the caller to try another address family if available */
  664|      1|      return CURLE_UNSUPPORTED_PROTOCOL;
  665|      2|    case IF2IP_FOUND:
  ------------------
  |  Branch (665:5): [True: 2, False: 167]
  ------------------
  666|       |      /*
  667|       |       * We now have the numerical IP address in the 'myhost' buffer
  668|       |       */
  669|      2|      host = myhost;
  670|      2|      infof(data, "Local Interface %s is ip %s using address family %i",
  ------------------
  |  |  143|      2|  do {                               \
  |  |  144|      2|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      2|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  671|      2|            iface, host, af);
  672|      2|      done = 1;
  673|      2|      break;
  674|    169|    }
  675|    165|    if(!iface_input || host_input) {
  ------------------
  |  Branch (675:8): [True: 160, False: 5]
  |  Branch (675:24): [True: 5, False: 0]
  ------------------
  676|       |      /*
  677|       |       * This was not an interface, resolve the name as a hostname
  678|       |       * or IP number
  679|       |       *
  680|       |       * Temporarily force name resolution to use only the address type
  681|       |       * of the connection. The resolve functions should really be changed
  682|       |       * to take a type parameter instead.
  683|       |       */
  684|    165|      uint8_t dns_queries = (af == AF_INET) ?
  ------------------
  |  Branch (684:29): [True: 118, False: 47]
  ------------------
  685|    118|                            CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|    118|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|     47|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|     47|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  686|    165|#ifdef USE_IPV6
  687|    165|      if(af == AF_INET6)
  ------------------
  |  Branch (687:10): [True: 47, False: 118]
  ------------------
  688|     47|        dns_queries = CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     47|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  689|    165|#endif
  690|       |
  691|    165|      (void)Curl_resolv_blocking(data, dns_queries, host, 80, transport, &h);
  692|    165|      if(h) {
  ------------------
  |  Branch (692:10): [True: 93, False: 72]
  ------------------
  693|     93|        int h_af = h->addr->ai_family;
  694|       |        /* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */
  695|     93|        Curl_printable_address(h->addr, myhost, sizeof(myhost));
  696|     93|        infof(data, "Name '%s' family %i resolved to '%s' family %i",
  ------------------
  |  |  143|     93|  do {                               \
  |  |  144|     93|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     93|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 93, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 93]
  |  |  |  |  ------------------
  |  |  |  |  320|     93|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     93|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     93|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 93]
  |  |  ------------------
  ------------------
  697|     93|              host, af, myhost, h_af);
  698|     93|        Curl_dns_entry_unlink(data, &h); /* this will NULL, potential free h */
  699|     93|        if(af != h_af) {
  ------------------
  |  Branch (699:12): [True: 39, False: 54]
  ------------------
  700|       |          /* bad IP version combo, signal the caller to try another address
  701|       |             family if available */
  702|     39|          return CURLE_UNSUPPORTED_PROTOCOL;
  703|     39|        }
  704|     54|        done = 1;
  705|     54|      }
  706|     72|      else {
  707|       |        /*
  708|       |         * provided dev was no interface (or interfaces are not supported
  709|       |         * e.g. Solaris) no ip address and no domain we fail here
  710|       |         */
  711|     72|        done = -1;
  712|     72|      }
  713|    165|    }
  714|       |
  715|    126|    if(done > 0) {
  ------------------
  |  Branch (715:8): [True: 54, False: 72]
  ------------------
  716|     54|#ifdef USE_IPV6
  717|       |      /* IPv6 address */
  718|     54|      if(af == AF_INET6) {
  ------------------
  |  Branch (718:10): [True: 30, False: 24]
  ------------------
  719|     30|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  720|     30|        char *scope_ptr = strchr(myhost, '%');
  721|     30|        if(scope_ptr)
  ------------------
  |  Branch (721:12): [True: 0, False: 30]
  ------------------
  722|      0|          *(scope_ptr++) = '\0';
  723|     30|#endif
  724|     30|        if(curlx_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) {
  ------------------
  |  |   43|     30|  inet_pton(x, y, z)
  ------------------
  |  Branch (724:12): [True: 30, False: 0]
  ------------------
  725|     30|          si6->sin6_family = AF_INET6;
  726|     30|          si6->sin6_port = htons(port);
  727|     30|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  728|     30|          if(scope_ptr) {
  ------------------
  |  Branch (728:14): [True: 0, False: 30]
  ------------------
  729|       |            /* The "myhost" string either comes from Curl_if2ip or from
  730|       |               Curl_printable_address. The latter returns only numeric scope
  731|       |               IDs and the former returns none at all. Making the scope ID,
  732|       |               if present, known to be numeric */
  733|      0|            curl_off_t scope_id;
  734|      0|            if(curlx_str_number((const char **)CURL_UNCONST(&scope_ptr),
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (734:16): [True: 0, False: 0]
  ------------------
  735|      0|                                &scope_id, UINT_MAX))
  736|      0|              return CURLE_UNSUPPORTED_PROTOCOL;
  737|      0|            si6->sin6_scope_id = (unsigned int)scope_id;
  738|      0|          }
  739|     30|#endif
  740|     30|        }
  741|     30|        sizeof_sa = sizeof(struct sockaddr_in6);
  742|     30|      }
  743|     24|      else
  744|     24|#endif
  745|       |      /* IPv4 address */
  746|     24|      if((af == AF_INET) &&
  ------------------
  |  Branch (746:10): [True: 24, False: 0]
  ------------------
  747|     24|         (curlx_inet_pton(AF_INET, myhost, &si4->sin_addr) > 0)) {
  ------------------
  |  |   43|     24|  inet_pton(x, y, z)
  ------------------
  |  Branch (747:10): [True: 24, False: 0]
  ------------------
  748|     24|        si4->sin_family = AF_INET;
  749|     24|        si4->sin_port = htons(port);
  750|     24|        sizeof_sa = sizeof(struct sockaddr_in);
  751|     24|      }
  752|     54|    }
  753|       |
  754|    126|    if(done < 1) {
  ------------------
  |  Branch (754:8): [True: 72, False: 54]
  ------------------
  755|       |      /* errorbuf is set false so failf will overwrite any message already in
  756|       |         the error buffer, so the user receives this error message instead of a
  757|       |         generic resolve error. */
  758|     72|      char buffer[STRERROR_LEN];
  759|     72|      data->state.errorbuf = FALSE;
  ------------------
  |  | 1058|     72|#define FALSE false
  ------------------
  760|     72|      data->state.os_errno = error = SOCKERRNO;
  ------------------
  |  | 1095|     72|#define SOCKERRNO         errno
  ------------------
  761|     72|      failf(data, "Could not bind to '%s' with errno %d: %s", host,
  ------------------
  |  |   62|     72|#define failf Curl_failf
  ------------------
  762|     72|            error, curlx_strerror(error, buffer, sizeof(buffer)));
  763|     72|      return CURLE_INTERFACE_FAILED;
  764|     72|    }
  765|    126|  }
  766|     12|  else {
  767|       |    /* no device was given, prepare sa to match af's needs */
  768|     12|#ifdef USE_IPV6
  769|     12|    if(af == AF_INET6) {
  ------------------
  |  Branch (769:8): [True: 1, False: 11]
  ------------------
  770|      1|      si6->sin6_family = AF_INET6;
  771|      1|      si6->sin6_port = htons(port);
  772|      1|      sizeof_sa = sizeof(struct sockaddr_in6);
  773|      1|    }
  774|     11|    else
  775|     11|#endif
  776|     11|    if(af == AF_INET) {
  ------------------
  |  Branch (776:8): [True: 11, False: 0]
  ------------------
  777|     11|      si4->sin_family = AF_INET;
  778|     11|      si4->sin_port = htons(port);
  779|     11|      sizeof_sa = sizeof(struct sockaddr_in);
  780|     11|    }
  781|     12|  }
  782|     66|#ifdef IP_BIND_ADDRESS_NO_PORT
  783|     66|  (void)setsockopt(sockfd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &on, sizeof(on));
  784|     66|#endif
  785|  2.96k|  for(;;) {
  786|  2.96k|    if(bind(sockfd, sock, sizeof_sa) >= 0) {
  ------------------
  |  Branch (786:8): [True: 0, False: 2.96k]
  ------------------
  787|       |      /* we succeeded to bind */
  788|      0|      infof(data, "Local port: %hu", port);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  789|      0|      conn->bits.bound = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  790|      0|      return CURLE_OK;
  791|      0|    }
  792|       |
  793|  2.96k|    if(--portnum > 0) {
  ------------------
  |  Branch (793:8): [True: 2.90k, False: 58]
  ------------------
  794|  2.90k|      port++; /* try next port */
  795|  2.90k|      if(port == 0)
  ------------------
  |  Branch (795:10): [True: 8, False: 2.90k]
  ------------------
  796|      8|        break;
  797|  2.90k|      infof(data, "Bind to local port %d failed, trying next", port - 1);
  ------------------
  |  |  143|  2.90k|  do {                               \
  |  |  144|  2.90k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.90k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.90k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.90k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.90k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.90k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.90k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.90k]
  |  |  ------------------
  ------------------
  798|       |      /* We reuse/clobber the port variable here below */
  799|  2.90k|      if(sock->sa_family == AF_INET)
  ------------------
  |  Branch (799:10): [True: 2.78k, False: 116]
  ------------------
  800|  2.78k|        si4->sin_port = htons(port);
  801|    116|#ifdef USE_IPV6
  802|    116|      else
  803|    116|        si6->sin6_port = htons(port);
  804|  2.90k|#endif
  805|  2.90k|    }
  806|     58|    else
  807|     58|      break;
  808|  2.96k|  }
  809|     66|  {
  810|     66|    char buffer[STRERROR_LEN];
  811|     66|    data->state.os_errno = error = SOCKERRNO;
  ------------------
  |  | 1095|     66|#define SOCKERRNO         errno
  ------------------
  812|     66|    failf(data, "bind failed with errno %d: %s",
  ------------------
  |  |   62|     66|#define failf Curl_failf
  ------------------
  813|     66|          error, curlx_strerror(error, buffer, sizeof(buffer)));
  814|     66|  }
  815|       |
  816|     66|  return CURLE_INTERFACE_FAILED;
  817|     66|}
cf-socket.c:do_connect:
 1248|     70|{
 1249|     70|  struct cf_socket_ctx *ctx = cf->ctx;
 1250|     70|#ifdef TCP_FASTOPEN_CONNECT
 1251|     70|  int optval = 1;
 1252|     70|#endif
 1253|     70|  int rc = -1;
 1254|       |
 1255|     70|  (void)data;
 1256|     70|  if(is_tcp_fastopen) {
  ------------------
  |  Branch (1256:6): [True: 0, False: 70]
  ------------------
 1257|       |#ifdef CONNECT_DATA_IDEMPOTENT /* Darwin */
 1258|       |#  ifdef HAVE_BUILTIN_AVAILABLE
 1259|       |    /* while connectx function is available since macOS 10.11 / iOS 9,
 1260|       |       it did not have the interface declared correctly until
 1261|       |       Xcode 9 / macOS SDK 10.13 */
 1262|       |    if(__builtin_available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *)) {
 1263|       |      sa_endpoints_t endpoints;
 1264|       |      endpoints.sae_srcif = 0;
 1265|       |      endpoints.sae_srcaddr = NULL;
 1266|       |      endpoints.sae_srcaddrlen = 0;
 1267|       |      endpoints.sae_dstaddr = &ctx->addr.curl_sa_addr;
 1268|       |      endpoints.sae_dstaddrlen = ctx->addr.addrlen;
 1269|       |
 1270|       |      rc = connectx(ctx->sock, &endpoints, SAE_ASSOCID_ANY,
 1271|       |                    CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT,
 1272|       |                    NULL, 0, NULL, NULL);
 1273|       |    }
 1274|       |    else {
 1275|       |      rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1276|       |    }
 1277|       |#  else
 1278|       |    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1279|       |#  endif /* HAVE_BUILTIN_AVAILABLE */
 1280|       |#elif defined(TCP_FASTOPEN_CONNECT) /* Linux >= 4.11 */
 1281|      0|    if(setsockopt(ctx->sock, IPPROTO_TCP, TCP_FASTOPEN_CONNECT,
  ------------------
  |  Branch (1281:8): [True: 0, False: 0]
  ------------------
 1282|      0|                  (void *)&optval, sizeof(optval)) < 0)
 1283|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 1284|      0|                  FMT_SOCKET_T, ctx->sock);
 1285|       |
 1286|      0|    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
  ------------------
  |  |   54|      0|#define curl_sa_addr    addr.sa
  ------------------
 1287|       |#elif defined(MSG_FASTOPEN) /* old Linux */
 1288|       |    if(Curl_conn_is_ssl(cf->conn, cf->sockindex))
 1289|       |      rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1290|       |    else
 1291|       |      rc = 0; /* Do nothing */
 1292|       |#endif
 1293|      0|  }
 1294|     70|  else {
 1295|     70|    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr,
  ------------------
  |  |   54|     70|#define curl_sa_addr    addr.sa
  ------------------
 1296|     70|                 (curl_socklen_t)ctx->addr.addrlen);
 1297|     70|  }
 1298|     70|  return rc;
 1299|     70|}
cf-socket.c:socket_connect_result:
  879|     70|{
  880|     70|  switch(error) {
  881|     43|  case SOCKEINPROGRESS:
  ------------------
  |  | 1128|     43|#define SOCKEINPROGRESS   EINPROGRESS
  ------------------
  |  Branch (881:3): [True: 43, False: 27]
  ------------------
  882|     43|  case SOCKEWOULDBLOCK:
  ------------------
  |  | 1137|     43|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
  |  Branch (882:3): [True: 0, False: 70]
  ------------------
  883|     43|#ifdef EAGAIN
  884|       |#if (EAGAIN) != (SOCKEWOULDBLOCK)
  885|       |    /* On some platforms EAGAIN and EWOULDBLOCK are the
  886|       |     * same value, and on others they are different, hence
  887|       |     * the odd #if
  888|       |     */
  889|       |  case EAGAIN:
  890|       |#endif
  891|     43|#endif
  892|     43|    return CURLE_OK;
  893|       |
  894|     27|  default:
  ------------------
  |  Branch (894:3): [True: 27, False: 43]
  ------------------
  895|       |    /* unknown error, fallthrough and try another address! */
  896|     27|    {
  897|     27|      VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1618|     27|#define VERBOSE(x) x
  ------------------
  898|     27|      infof(data, "Immediate connect fail for %s: %s", ipaddress,
  ------------------
  |  |  143|     27|  do {                               \
  |  |  144|     27|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     27|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 27, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 27]
  |  |  |  |  ------------------
  |  |  |  |  320|     27|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     27|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     27|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 27]
  |  |  ------------------
  ------------------
  899|     27|            curlx_strerror(error, buffer, sizeof(buffer)));
  900|     27|      NOVERBOSE((void)ipaddress);
  ------------------
  |  | 1619|     27|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1180|     27|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1180:35): [Folded, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  901|     27|    }
  902|     27|    data->state.os_errno = error;
  903|       |    /* connect failed */
  904|     27|    return CURLE_COULDNT_CONNECT;
  905|     70|  }
  906|     70|}
cf-socket.c:verifyconnect:
  824|     14|{
  825|     14|  bool rc = TRUE;
  ------------------
  |  | 1055|     14|#define TRUE true
  ------------------
  826|     14|#ifdef SO_ERROR
  827|     14|  int err = 0;
  828|     14|  curl_socklen_t errSize = sizeof(err);
  829|       |
  830|       |#ifdef _WIN32
  831|       |  /*
  832|       |   * In October 2003 we effectively nullified this function on Windows due to
  833|       |   * problems with it using all CPU in multi-threaded cases.
  834|       |   *
  835|       |   * In May 2004, we brought it back to offer more info back on connect
  836|       |   * failures. We could reproduce the former problems with this function, but
  837|       |   * could avoid them by adding this SleepEx() call below:
  838|       |   *
  839|       |   *    "I do not have Rational Quantify, but the hint from his post was
  840|       |   *    ntdll::NtRemoveIoCompletion(). I would assume the SleepEx (or maybe
  841|       |   *    Sleep(0) would be enough?) would release whatever
  842|       |   *    mutex/critical-section the ntdll call is waiting on.
  843|       |   *
  844|       |   *    Someone got to verify this on Win-NT 4.0, 2000."
  845|       |   */
  846|       |  SleepEx(0, FALSE);
  847|       |#endif
  848|       |
  849|     14|  if(getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize))
  ------------------
  |  Branch (849:6): [True: 0, False: 14]
  ------------------
  850|      0|    err = SOCKERRNO;
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
  851|       |#if defined(EBADIOCTL) && defined(__minix)
  852|       |  /* Minix 3.1.x does not support getsockopt on UDP sockets */
  853|       |  if(EBADIOCTL == err) {
  854|       |    SET_SOCKERRNO(0);
  855|       |    err = 0;
  856|       |  }
  857|       |#endif
  858|     14|  if((err == 0) || (SOCKEISCONN == err))
  ------------------
  |  | 1131|     14|#define SOCKEISCONN       EISCONN
  ------------------
  |  Branch (858:6): [True: 0, False: 14]
  |  Branch (858:20): [True: 0, False: 14]
  ------------------
  859|       |    /* we are connected, awesome! */
  860|      0|    rc = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  861|     14|  else
  862|       |    /* This was not a successful connect */
  863|     14|    rc = FALSE;
  ------------------
  |  | 1058|     14|#define FALSE false
  ------------------
  864|     14|  if(error)
  ------------------
  |  Branch (864:6): [True: 14, False: 0]
  ------------------
  865|     14|    *error = err;
  866|       |#else
  867|       |  (void)sockfd;
  868|       |  if(error)
  869|       |    *error = SOCKERRNO;
  870|       |#endif
  871|     14|  return rc;
  872|     14|}
cf-socket.c:cf_socket_close:
  976|  10.6k|{
  977|  10.6k|  struct cf_socket_ctx *ctx = cf->ctx;
  978|       |
  979|  10.6k|  if(ctx && ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  10.6k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (979:6): [True: 10.6k, False: 0]
  |  Branch (979:13): [True: 5.21k, False: 5.41k]
  ------------------
  980|  5.21k|    CURL_TRC_CF(data, cf, "cf_socket_close, fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|  5.21k|  do {                                          \
  |  |  154|  5.21k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.21k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.21k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.21k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.21k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.21k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.21k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.21k]
  |  |  ------------------
  ------------------
  981|  5.21k|    if(ctx->sock == cf->conn->sock[cf->sockindex])
  ------------------
  |  Branch (981:8): [True: 1.36k, False: 3.85k]
  ------------------
  982|  1.36k|      cf->conn->sock[cf->sockindex] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  1.36k|#define CURL_SOCKET_BAD (-1)
  ------------------
  983|  5.21k|    socket_close(data, cf->conn, !ctx->accepted, ctx->sock);
  984|  5.21k|    ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  5.21k|#define CURL_SOCKET_BAD (-1)
  ------------------
  985|  5.21k|    ctx->active = FALSE;
  ------------------
  |  | 1058|  5.21k|#define FALSE false
  ------------------
  986|  5.21k|    memset(&ctx->started_at, 0, sizeof(ctx->started_at));
  987|  5.21k|    memset(&ctx->connected_at, 0, sizeof(ctx->connected_at));
  988|  5.21k|  }
  989|       |
  990|       |  cf->connected = FALSE;
  ------------------
  |  | 1058|  10.6k|#define FALSE false
  ------------------
  991|  10.6k|}
cf-socket.c:cf_socket_shutdown:
  996|    450|{
  997|    450|  if(cf->connected) {
  ------------------
  |  Branch (997:6): [True: 450, False: 0]
  ------------------
  998|    450|    struct cf_socket_ctx *ctx = cf->ctx;
  999|       |
 1000|    450|    CURL_TRC_CF(data, cf, "cf_socket_shutdown, fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|    450|  do {                                          \
  |  |  154|    450|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    450|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    900|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 450, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 450]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    900|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    450|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    450|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    450|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 450]
  |  |  ------------------
  ------------------
 1001|       |    /* On TCP, and when the socket looks well and non-blocking mode
 1002|       |     * can be enabled, receive dangling bytes before close to avoid
 1003|       |     * entering RST states unnecessarily. */
 1004|    450|    if(ctx->sock != CURL_SOCKET_BAD &&
  ------------------
  |  |  145|    900|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1004:8): [True: 450, False: 0]
  ------------------
 1005|    450|       ctx->transport == TRNSPRT_TCP &&
  ------------------
  |  |  307|    900|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (1005:8): [True: 446, False: 4]
  ------------------
 1006|    446|       (curlx_nonblock(ctx->sock, TRUE) >= 0)) {
  ------------------
  |  | 1055|    446|#define TRUE true
  ------------------
  |  Branch (1006:8): [True: 446, False: 0]
  ------------------
 1007|    446|      unsigned char buf[1024];
 1008|    446|      (void)sread(ctx->sock, buf, sizeof(buf));
  ------------------
  |  |  954|    446|#define sread(x, y, z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
  |  |  955|    446|                                     (RECV_TYPE_ARG2)(y), \
  |  |  956|    446|                                     (RECV_TYPE_ARG3)(z), \
  |  |  957|    446|                                     (RECV_TYPE_ARG4)(0))
  ------------------
 1009|    446|    }
 1010|    450|  }
 1011|       |  *done = TRUE;
  ------------------
  |  | 1055|    450|#define TRUE true
  ------------------
 1012|    450|  return CURLE_OK;
 1013|    450|}
cf-socket.c:cf_socket_adjust_pollset:
 1398|   227k|{
 1399|   227k|  struct cf_socket_ctx *ctx = cf->ctx;
 1400|   227k|  CURLcode result = CURLE_OK;
 1401|       |
 1402|   227k|  if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|   227k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1402:6): [True: 227k, False: 0]
  ------------------
 1403|       |    /* A listening socket filter needs to be connected before the accept
 1404|       |     * for some weird FTP interaction. This should be rewritten, so that
 1405|       |     * FTP no longer does the socket checks and accept calls and delegates
 1406|       |     * all that to the filter. */
 1407|   227k|    if(ctx->listening) {
  ------------------
  |  Branch (1407:8): [True: 0, False: 227k]
  ------------------
 1408|      0|      result = Curl_pollset_set_in_only(data, ps, ctx->sock);
  ------------------
  |  |  172|      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
  |  |  ------------------
  ------------------
 1409|      0|      CURL_TRC_CF(data, cf, "adjust_pollset, listening, POLLIN fd=%"
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 1410|      0|                  FMT_SOCKET_T, ctx->sock);
 1411|      0|    }
 1412|   227k|    else if(!cf->connected) {
  ------------------
  |  Branch (1412:13): [True: 25.4k, False: 201k]
  ------------------
 1413|  25.4k|      result = Curl_pollset_set_out_only(data, ps, ctx->sock);
  ------------------
  |  |  174|  25.4k|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|  25.4k|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|  25.4k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1414|  25.4k|      CURL_TRC_CF(data, cf, "adjust_pollset, !connected, POLLOUT fd=%"
  ------------------
  |  |  153|  25.4k|  do {                                          \
  |  |  154|  25.4k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  25.4k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  50.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 25.4k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 25.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  50.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  25.4k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  25.4k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  25.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 25.4k]
  |  |  ------------------
  ------------------
 1415|  25.4k|                  FMT_SOCKET_T, ctx->sock);
 1416|  25.4k|    }
 1417|   201k|    else if(!ctx->active) {
  ------------------
  |  Branch (1417:13): [True: 197k, False: 4.29k]
  ------------------
 1418|   197k|      result = Curl_pollset_add_in(data, ps, ctx->sock);
  ------------------
  |  |  162|   197k|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|   197k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1419|   197k|      CURL_TRC_CF(data, cf, "adjust_pollset, !active, POLLIN fd=%"
  ------------------
  |  |  153|   197k|  do {                                          \
  |  |  154|   197k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   197k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   394k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 197k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 197k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   394k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   197k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   197k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   197k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 197k]
  |  |  ------------------
  ------------------
 1420|   197k|                  FMT_SOCKET_T, ctx->sock);
 1421|   197k|    }
 1422|   227k|  }
 1423|   227k|  return result;
 1424|   227k|}
cf-socket.c:cf_socket_send:
 1457|  6.87k|{
 1458|  6.87k|  struct cf_socket_ctx *ctx = cf->ctx;
 1459|  6.87k|  curl_socket_t fdsave;
 1460|  6.87k|  ssize_t rv;
 1461|  6.87k|  CURLcode result = CURLE_OK;
 1462|  6.87k|  VERBOSE(size_t orig_len = len);
  ------------------
  |  | 1618|  6.87k|#define VERBOSE(x) x
  ------------------
 1463|       |
 1464|  6.87k|  (void)eos;
 1465|  6.87k|  *pnwritten = 0;
 1466|  6.87k|  fdsave = cf->conn->sock[cf->sockindex];
 1467|  6.87k|  cf->conn->sock[cf->sockindex] = ctx->sock;
 1468|       |
 1469|  6.87k|#ifdef DEBUGBUILD
 1470|       |  /* simulate network blocking/partial writes */
 1471|  6.87k|  if(ctx->wblock_percent > 0) {
  ------------------
  |  Branch (1471:6): [True: 0, False: 6.87k]
  ------------------
 1472|      0|    unsigned char c = 0;
 1473|      0|    Curl_rand_bytes(data, FALSE, &c, 1);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1474|      0|    if(c >= ((100 - ctx->wblock_percent) * 256 / 100)) {
  ------------------
  |  Branch (1474:8): [True: 0, False: 0]
  ------------------
 1475|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 1476|      0|      cf->conn->sock[cf->sockindex] = fdsave;
 1477|      0|      return CURLE_AGAIN;
 1478|      0|    }
 1479|      0|  }
 1480|  6.87k|  if(cf->cft != &Curl_cft_udp && ctx->wpartial_percent > 0 && len > 8) {
  ------------------
  |  Branch (1480:6): [True: 6.87k, False: 0]
  |  Branch (1480:34): [True: 0, False: 6.87k]
  |  Branch (1480:63): [True: 0, False: 0]
  ------------------
 1481|      0|    len = len * ctx->wpartial_percent / 100;
 1482|      0|    if(!len)
  ------------------
  |  Branch (1482:8): [True: 0, False: 0]
  ------------------
 1483|      0|      len = 1;
 1484|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 1485|      0|                orig_len, len);
 1486|      0|  }
 1487|  6.87k|#endif
 1488|       |
 1489|       |#if defined(MSG_FASTOPEN) && !defined(TCP_FASTOPEN_CONNECT) /* Linux */
 1490|       |  if(cf->conn->bits.tcp_fastopen) {
 1491|       |    rv = sendto(ctx->sock, buf, len, MSG_FASTOPEN,
 1492|       |                &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1493|       |    cf->conn->bits.tcp_fastopen = FALSE;
 1494|       |  }
 1495|       |  else
 1496|       |#endif
 1497|  6.87k|    rv = swrite(ctx->sock, buf, len);
  ------------------
  |  |  976|  6.87k|#define swrite(x, y, z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
  |  |  977|  6.87k|                                      (const SEND_TYPE_ARG2)(y), \
  |  |  978|  6.87k|                                      (SEND_TYPE_ARG3)(z), \
  |  |  979|  6.87k|                                      (SEND_TYPE_ARG4)(SEND_4TH_ARG))
  |  |  ------------------
  |  |  |  |  919|  6.87k|#define SEND_4TH_ARG MSG_NOSIGNAL
  |  |  ------------------
  ------------------
 1498|       |
 1499|  6.87k|  if(!curlx_sztouz(rv, pnwritten)) {
  ------------------
  |  Branch (1499:6): [True: 0, False: 6.87k]
  ------------------
 1500|      0|    int sockerr = SOCKERRNO;
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
 1501|       |
 1502|      0|    if(
 1503|       |#ifdef USE_WINSOCK
 1504|       |      /* This is how Windows does it */
 1505|       |      (SOCKEWOULDBLOCK == sockerr)
 1506|       |#else
 1507|       |      /* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned
 1508|       |         due to its inability to send off data without blocking. We therefore
 1509|       |         treat both error codes the same here */
 1510|      0|      (SOCKEWOULDBLOCK == sockerr) ||
  ------------------
  |  | 1137|      0|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
  |  Branch (1510:7): [True: 0, False: 0]
  ------------------
 1511|      0|      (EAGAIN == sockerr) || (SOCKEINTR == sockerr) ||
  ------------------
  |  | 1129|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (1511:7): [True: 0, False: 0]
  |  Branch (1511:30): [True: 0, False: 0]
  ------------------
 1512|      0|      (SOCKEINPROGRESS == sockerr)
  ------------------
  |  | 1128|      0|#define SOCKEINPROGRESS   EINPROGRESS
  ------------------
  |  Branch (1512:7): [True: 0, False: 0]
  ------------------
 1513|      0|#endif
 1514|      0|      ) {
 1515|       |      /* EWOULDBLOCK */
 1516|      0|      result = CURLE_AGAIN;
 1517|      0|    }
 1518|      0|    else {
 1519|      0|      char buffer[STRERROR_LEN];
 1520|      0|      failf(data, "Send failure: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1521|      0|            curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1522|      0|      data->state.os_errno = sockerr;
 1523|      0|      result = CURLE_SEND_ERROR;
 1524|      0|    }
 1525|      0|  }
 1526|       |
 1527|       |#ifdef USE_WINSOCK
 1528|       |  if(!result)
 1529|       |    win_update_sndbuf_size(data, ctx);
 1530|       |#endif
 1531|       |
 1532|  6.87k|  CURL_TRC_CF(data, cf, "send(len=%zu) -> %d, %zu",
  ------------------
  |  |  153|  6.87k|  do {                                          \
  |  |  154|  6.87k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  6.87k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  13.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 6.87k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.87k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  13.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  6.87k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  6.87k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  6.87k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6.87k]
  |  |  ------------------
  ------------------
 1533|  6.87k|              orig_len, result, *pnwritten);
 1534|  6.87k|  cf->conn->sock[cf->sockindex] = fdsave;
 1535|  6.87k|  return result;
 1536|  6.87k|}
cf-socket.c:cf_socket_recv:
 1540|   441k|{
 1541|   441k|  struct cf_socket_ctx *ctx = cf->ctx;
 1542|   441k|  CURLcode result = CURLE_OK;
 1543|   441k|  ssize_t rv;
 1544|       |
 1545|   441k|  *pnread = 0;
 1546|   441k|#ifdef DEBUGBUILD
 1547|       |  /* simulate network blocking/partial reads */
 1548|   441k|  if(cf->cft != &Curl_cft_udp && ctx->rblock_percent > 0) {
  ------------------
  |  Branch (1548:6): [True: 441k, False: 0]
  |  Branch (1548:34): [True: 0, False: 441k]
  ------------------
 1549|      0|    unsigned char c = 0;
 1550|      0|    Curl_rand(data, &c, 1);
  ------------------
  |  |   33|      0|#define Curl_rand(a, b, c) Curl_rand_bytes(a, TRUE, b, c)
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  ------------------
 1551|      0|    if(c >= ((100 - ctx->rblock_percent) * 256 / 100)) {
  ------------------
  |  Branch (1551:8): [True: 0, False: 0]
  ------------------
 1552|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 1553|      0|      return CURLE_AGAIN;
 1554|      0|    }
 1555|      0|  }
 1556|   441k|  if(cf->cft != &Curl_cft_udp && ctx->recv_max && ctx->recv_max < len) {
  ------------------
  |  Branch (1556:6): [True: 441k, False: 0]
  |  Branch (1556:34): [True: 0, False: 441k]
  |  Branch (1556:51): [True: 0, False: 0]
  ------------------
 1557|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 1558|      0|                len, ctx->recv_max);
 1559|      0|    len = ctx->recv_max;
 1560|      0|  }
 1561|   441k|#endif
 1562|       |
 1563|   441k|  rv = sread(ctx->sock, buf, len);
  ------------------
  |  |  954|   441k|#define sread(x, y, z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
  |  |  955|   441k|                                     (RECV_TYPE_ARG2)(y), \
  |  |  956|   441k|                                     (RECV_TYPE_ARG3)(z), \
  |  |  957|   441k|                                     (RECV_TYPE_ARG4)(0))
  ------------------
 1564|       |
 1565|   441k|  if(!curlx_sztouz(rv, pnread)) {
  ------------------
  |  Branch (1565:6): [True: 535, False: 441k]
  ------------------
 1566|    535|    int sockerr = SOCKERRNO;
  ------------------
  |  | 1095|    535|#define SOCKERRNO         errno
  ------------------
 1567|       |
 1568|    535|    if(
 1569|       |#ifdef USE_WINSOCK
 1570|       |      /* This is how Windows does it */
 1571|       |      (SOCKEWOULDBLOCK == sockerr)
 1572|       |#else
 1573|       |      /* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned
 1574|       |         due to its inability to send off data without blocking. We therefore
 1575|       |         treat both error codes the same here */
 1576|    535|      (SOCKEWOULDBLOCK == sockerr) ||
  ------------------
  |  | 1137|    535|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
  |  Branch (1576:7): [True: 535, False: 0]
  ------------------
 1577|      0|      (EAGAIN == sockerr) || (SOCKEINTR == sockerr)
  ------------------
  |  | 1129|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (1577:7): [True: 0, False: 0]
  |  Branch (1577:30): [True: 0, False: 0]
  ------------------
 1578|    535|#endif
 1579|    535|      ) {
 1580|       |      /* EWOULDBLOCK */
 1581|    535|      result = CURLE_AGAIN;
 1582|    535|    }
 1583|      0|    else {
 1584|      0|      char buffer[STRERROR_LEN];
 1585|      0|      failf(data, "Recv failure: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1586|      0|            curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1587|      0|      data->state.os_errno = sockerr;
 1588|      0|      result = CURLE_RECV_ERROR;
 1589|      0|    }
 1590|    535|  }
 1591|       |
 1592|   441k|  CURL_TRC_CF(data, cf, "recv(len=%zu) -> %d, %zu", len, result, *pnread);
  ------------------
  |  |  153|   441k|  do {                                          \
  |  |  154|   441k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   441k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   883k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 441k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 441k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   883k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   441k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   441k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   441k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 441k]
  |  |  ------------------
  ------------------
 1593|   441k|  if(!result && !ctx->got_first_byte) {
  ------------------
  |  Branch (1593:6): [True: 441k, False: 535]
  |  Branch (1593:17): [True: 4.03k, False: 437k]
  ------------------
 1594|  4.03k|    ctx->first_byte_at = *Curl_pgrs_now(data);
 1595|       |    ctx->got_first_byte = TRUE;
  ------------------
  |  | 1055|  4.03k|#define TRUE true
  ------------------
 1596|  4.03k|  }
 1597|   441k|  return result;
 1598|   441k|}
cf-socket.c:cf_socket_cntrl:
 1629|  6.55k|{
 1630|  6.55k|  struct cf_socket_ctx *ctx = cf->ctx;
 1631|       |
 1632|  6.55k|  (void)arg1;
 1633|  6.55k|  (void)arg2;
 1634|  6.55k|  switch(event) {
  ------------------
  |  Branch (1634:10): [True: 1.36k, False: 5.18k]
  ------------------
 1635|  1.36k|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  125|  1.36k|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (1635:3): [True: 1.36k, False: 5.18k]
  ------------------
 1636|  1.36k|    cf_socket_active(cf, data);
 1637|  1.36k|    cf_socket_update_data(cf, data);
 1638|  1.36k|    break;
 1639|      0|  case CF_CTRL_DATA_SETUP:
  ------------------
  |  |  119|      0|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
  |  Branch (1639:3): [True: 0, False: 6.55k]
  ------------------
 1640|      0|    cf_socket_update_data(cf, data);
 1641|      0|    break;
 1642|      0|  case CF_CTRL_FORGET_SOCKET:
  ------------------
  |  |  126|      0|#define CF_CTRL_FORGET_SOCKET    (256 + 1) /* 0          NULL     ignored */
  ------------------
  |  Branch (1642:3): [True: 0, False: 6.55k]
  ------------------
 1643|      0|    ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1644|      0|    break;
 1645|  6.55k|  }
 1646|  6.55k|  return CURLE_OK;
 1647|  6.55k|}
cf-socket.c:cf_socket_active:
 1613|  1.36k|{
 1614|  1.36k|  struct cf_socket_ctx *ctx = cf->ctx;
 1615|       |
 1616|       |  /* use this socket from now on */
 1617|  1.36k|  cf->conn->sock[cf->sockindex] = ctx->sock;
 1618|  1.36k|  set_local_ip(cf, data);
 1619|  1.36k|#ifdef USE_IPV6
 1620|  1.36k|  if(cf->sockindex == FIRSTSOCKET)
  ------------------
  |  |  303|  1.36k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1620:6): [True: 1.36k, False: 0]
  ------------------
 1621|  1.36k|    cf->conn->bits.ipv6 = (ctx->addr.family == AF_INET6);
 1622|  1.36k|#endif
 1623|       |  ctx->active = TRUE;
  ------------------
  |  | 1055|  1.36k|#define TRUE true
  ------------------
 1624|  1.36k|}
cf-socket.c:cf_socket_update_data:
 1602|  1.36k|{
 1603|       |  /* Update the IP info held in the transfer, if we have that. */
 1604|  1.36k|  if(cf->connected && (cf->sockindex == FIRSTSOCKET)) {
  ------------------
  |  |  303|  1.36k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1604:6): [True: 1.36k, False: 0]
  |  Branch (1604:23): [True: 1.36k, False: 0]
  ------------------
 1605|  1.36k|    struct cf_socket_ctx *ctx = cf->ctx;
 1606|  1.36k|    data->info.primary = ctx->ip;
 1607|       |    /* not sure if this is redundant... */
 1608|  1.36k|    data->info.conn_remote_port = cf->conn->origin->port;
 1609|  1.36k|  }
 1610|  1.36k|}
cf-socket.c:cf_socket_query:
 1689|   404k|{
 1690|   404k|  struct cf_socket_ctx *ctx = cf->ctx;
 1691|       |
 1692|   404k|  switch(query) {
 1693|   197k|  case CF_QUERY_SOCKET:
  ------------------
  |  |  167|   197k|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (1693:3): [True: 197k, False: 206k]
  ------------------
 1694|   197k|    DEBUGASSERT(pres2);
  ------------------
  |  | 1081|   197k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1694:5): [True: 0, False: 197k]
  |  Branch (1694:5): [True: 197k, False: 0]
  ------------------
 1695|   197k|    *((curl_socket_t *)pres2) = ctx->sock;
 1696|   197k|    return CURLE_OK;
 1697|      0|  case CF_QUERY_TRANSPORT:
  ------------------
  |  |  180|      0|#define CF_QUERY_TRANSPORT         14  /* TRNSPRT_*  - * */
  ------------------
  |  Branch (1697:3): [True: 0, False: 404k]
  ------------------
 1698|      0|    DEBUGASSERT(pres1);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1698:5): [True: 0, False: 0]
  |  Branch (1698:5): [True: 0, False: 0]
  ------------------
 1699|      0|    *pres1 = ctx->transport;
 1700|      0|    return CURLE_OK;
 1701|      0|  case CF_QUERY_REMOTE_ADDR:
  ------------------
  |  |  176|      0|#define CF_QUERY_REMOTE_ADDR       10  /* -          `Curl_sockaddr_ex *` */
  ------------------
  |  Branch (1701:3): [True: 0, False: 404k]
  ------------------
 1702|      0|    DEBUGASSERT(pres2);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1702:5): [True: 0, False: 0]
  |  Branch (1702:5): [True: 0, False: 0]
  ------------------
 1703|      0|    *((const struct Curl_sockaddr_ex **)pres2) = cf->connected ?
  ------------------
  |  Branch (1703:50): [True: 0, False: 0]
  ------------------
 1704|      0|                                                 &ctx->addr : NULL;
 1705|      0|    return CURLE_OK;
 1706|      0|  case CF_QUERY_CONNECT_REPLY_MS:
  ------------------
  |  |  166|      0|#define CF_QUERY_CONNECT_REPLY_MS   2  /* number     -        */
  ------------------
  |  Branch (1706:3): [True: 0, False: 404k]
  ------------------
 1707|      0|    if(ctx->got_first_byte) {
  ------------------
  |  Branch (1707:8): [True: 0, False: 0]
  ------------------
 1708|      0|      timediff_t ms = curlx_ptimediff_ms(&ctx->first_byte_at,
 1709|      0|                                         &ctx->started_at);
 1710|      0|      *pres1 = (ms < INT_MAX) ? (int)ms : INT_MAX;
  ------------------
  |  Branch (1710:16): [True: 0, False: 0]
  ------------------
 1711|      0|    }
 1712|      0|    else
 1713|      0|      *pres1 = -1;
 1714|      0|    return CURLE_OK;
 1715|  5.16k|  case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  168|  5.16k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (1715:3): [True: 5.16k, False: 399k]
  ------------------
 1716|  5.16k|    struct curltime *when = pres2;
 1717|  5.16k|    switch(ctx->transport) {
 1718|      0|    case TRNSPRT_UDP:
  ------------------
  |  |  308|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (1718:5): [True: 0, False: 5.16k]
  ------------------
 1719|      0|    case TRNSPRT_QUIC:
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (1719:5): [True: 0, False: 5.16k]
  ------------------
 1720|       |      /* Since UDP connected sockets work different from TCP, we use the
 1721|       |       * time of the first byte from the peer as the "connect" time. */
 1722|      0|      if(ctx->got_first_byte) {
  ------------------
  |  Branch (1722:10): [True: 0, False: 0]
  ------------------
 1723|      0|        *when = ctx->first_byte_at;
 1724|      0|        break;
 1725|      0|      }
 1726|      0|      FALLTHROUGH();
  ------------------
  |  |  821|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1727|  5.16k|    default:
  ------------------
  |  Branch (1727:5): [True: 5.16k, False: 0]
  ------------------
 1728|  5.16k|      *when = ctx->connected_at;
 1729|  5.16k|      break;
 1730|  5.16k|    }
 1731|  5.16k|    return CURLE_OK;
 1732|  5.16k|  }
 1733|     17|  case CF_QUERY_IP_INFO:
  ------------------
  |  |  172|     17|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
  |  Branch (1733:3): [True: 17, False: 404k]
  ------------------
 1734|     17|#ifdef USE_IPV6
 1735|     17|    *pres1 = (ctx->addr.family == AF_INET6);
 1736|       |#else
 1737|       |    *pres1 = FALSE;
 1738|       |#endif
 1739|     17|    *(struct ip_quadruple *)pres2 = ctx->ip;
 1740|     17|    return CURLE_OK;
 1741|   201k|  default:
  ------------------
  |  Branch (1741:3): [True: 201k, False: 202k]
  ------------------
 1742|   201k|    break;
 1743|   404k|  }
 1744|   201k|  return cf->next ?
  ------------------
  |  Branch (1744:10): [True: 0, False: 201k]
  ------------------
 1745|      0|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1746|   201k|    CURLE_UNKNOWN_OPTION;
 1747|   404k|}
cf-socket.c:cf_socket_ctx_init:
  937|  5.43k|{
  938|  5.43k|  memset(ctx, 0, sizeof(*ctx));
  939|  5.43k|  ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  5.43k|#define CURL_SOCKET_BAD (-1)
  ------------------
  940|  5.43k|  ctx->transport = transport;
  941|  5.43k|  ctx->addr = *addr;
  942|       |
  943|  5.43k|#ifdef DEBUGBUILD
  944|  5.43k|  {
  945|  5.43k|    const char *p = getenv("CURL_DBG_SOCK_WBLOCK");
  946|  5.43k|    if(p) {
  ------------------
  |  Branch (946:8): [True: 0, False: 5.43k]
  ------------------
  947|      0|      curl_off_t l;
  948|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (948:10): [True: 0, False: 0]
  ------------------
  949|      0|        ctx->wblock_percent = (int)l;
  950|      0|    }
  951|  5.43k|    p = getenv("CURL_DBG_SOCK_WPARTIAL");
  952|  5.43k|    if(p) {
  ------------------
  |  Branch (952:8): [True: 0, False: 5.43k]
  ------------------
  953|      0|      curl_off_t l;
  954|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (954:10): [True: 0, False: 0]
  ------------------
  955|      0|        ctx->wpartial_percent = (int)l;
  956|      0|    }
  957|  5.43k|    p = getenv("CURL_DBG_SOCK_RBLOCK");
  958|  5.43k|    if(p) {
  ------------------
  |  Branch (958:8): [True: 0, False: 5.43k]
  ------------------
  959|      0|      curl_off_t l;
  960|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (960:10): [True: 0, False: 0]
  ------------------
  961|      0|        ctx->rblock_percent = (int)l;
  962|      0|    }
  963|  5.43k|    p = getenv("CURL_DBG_SOCK_RMAX");
  964|  5.43k|    if(p) {
  ------------------
  |  Branch (964:8): [True: 0, False: 5.43k]
  ------------------
  965|      0|      curl_off_t l;
  966|      0|      if(!curlx_str_number(&p, &l, CURL_OFF_T_MAX))
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (966:10): [True: 0, False: 0]
  ------------------
  967|      0|        ctx->recv_max = (size_t)l;
  968|      0|    }
  969|  5.43k|  }
  970|  5.43k|#endif
  971|       |
  972|  5.43k|  return CURLE_OK;
  973|  5.43k|}
cf-socket.c:set_local_ip:
 1027|  6.84k|{
 1028|  6.84k|  struct cf_socket_ctx *ctx = cf->ctx;
 1029|  6.84k|  ctx->ip.local_ip[0] = 0;
 1030|  6.84k|  ctx->ip.local_port = 0;
 1031|       |
 1032|  6.84k|#ifdef HAVE_GETSOCKNAME
 1033|  6.84k|  if((ctx->sock != CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|  6.84k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1033:6): [True: 6.66k, False: 183]
  ------------------
 1034|  6.66k|     !(data->conn->scheme->protocol & CURLPROTO_TFTP)) {
  ------------------
  |  | 1089|  6.66k|#define CURLPROTO_TFTP    (1L << 11)
  ------------------
  |  Branch (1034:6): [True: 6.66k, False: 0]
  ------------------
 1035|       |    /* TFTP does not connect, so it cannot get the IP like this */
 1036|  6.66k|    struct Curl_sockaddr_storage ssloc;
 1037|  6.66k|    curl_socklen_t slen = sizeof(struct Curl_sockaddr_storage);
 1038|  6.66k|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1618|  6.66k|#define VERBOSE(x) x
  ------------------
 1039|       |
 1040|  6.66k|    memset(&ssloc, 0, sizeof(ssloc));
 1041|  6.66k|    if(getsockname(ctx->sock, (struct sockaddr *)&ssloc, &slen)) {
  ------------------
  |  Branch (1041:8): [True: 0, False: 6.66k]
  ------------------
 1042|      0|      VERBOSE(int error = SOCKERRNO);
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
 1043|      0|      infof(data, "getsockname() failed with errno %d: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1044|      0|            error, curlx_strerror(error, buffer, sizeof(buffer)));
 1045|      0|    }
 1046|  6.66k|    else if(!Curl_addr2string((struct sockaddr *)&ssloc, slen,
  ------------------
  |  Branch (1046:13): [True: 0, False: 6.66k]
  ------------------
 1047|  6.66k|                              ctx->ip.local_ip, &ctx->ip.local_port)) {
 1048|      0|      infof(data, "ssloc inet_ntop() failed with errno %d: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1049|      0|            errno, curlx_strerror(errno, buffer, sizeof(buffer)));
 1050|      0|    }
 1051|  6.66k|  }
 1052|       |#else
 1053|       |  (void)data;
 1054|       |#endif
 1055|  6.84k|}

Curl_cf_def_shutdown:
   49|     14|{
   50|     14|  (void)cf;
   51|     14|  (void)data;
   52|       |  *done = TRUE;
  ------------------
  |  | 1055|     14|#define TRUE true
  ------------------
   53|     14|  return CURLE_OK;
   54|     14|}
Curl_cf_def_adjust_pollset:
   59|    924|{
   60|       |  /* NOP */
   61|    924|  (void)cf;
   62|    924|  (void)data;
   63|    924|  (void)ps;
   64|    924|  return CURLE_OK;
   65|    924|}
Curl_cf_def_data_pending:
   69|  17.9k|{
   70|  17.9k|  return cf->next ?
  ------------------
  |  Branch (70:10): [True: 274, False: 17.6k]
  ------------------
   71|    274|    cf->next->cft->has_data_pending(cf->next, data) : FALSE;
  ------------------
  |  | 1058|  17.9k|#define FALSE false
  ------------------
   72|  17.9k|}
Curl_cf_def_send:
   77|  4.77k|{
   78|  4.77k|  if(cf->next)
  ------------------
  |  Branch (78:6): [True: 4.77k, False: 0]
  ------------------
   79|  4.77k|    return cf->next->cft->do_send(cf->next, data, buf, len, eos, pnwritten);
   80|      0|  *pnwritten = 0;
   81|      0|  return CURLE_RECV_ERROR;
   82|  4.77k|}
Curl_cf_def_recv:
   86|   431k|{
   87|   431k|  if(cf->next)
  ------------------
  |  Branch (87:6): [True: 431k, False: 0]
  ------------------
   88|   431k|    return cf->next->cft->do_recv(cf->next, data, buf, len, pnread);
   89|      0|  *pnread = 0;
   90|      0|  return CURLE_SEND_ERROR;
   91|   431k|}
Curl_cf_def_query:
  113|  1.62M|{
  114|  1.62M|  return cf->next ?
  ------------------
  |  Branch (114:10): [True: 1.61M, False: 7.96k]
  ------------------
  115|  1.61M|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  116|  1.62M|    CURLE_UNKNOWN_OPTION;
  117|  1.62M|}
Curl_conn_trc_filters:
  122|   313k|{
  123|   313k|  if(CURL_TRC_M_is_verbose(data) && data->conn) {
  ------------------
  |  |  135|   313k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  326|   627k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   627k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 313k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 313k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   627k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|   627k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (123:37): [True: 0, False: 0]
  ------------------
  124|      0|    struct Curl_cfilter *cf = data->conn->cfilter[sockindex];
  125|       |
  126|      0|    if(cf) {
  ------------------
  |  Branch (126:8): [True: 0, False: 0]
  ------------------
  127|      0|      char msg[256], *buf;
  128|      0|      int blen, n;
  129|       |
  130|      0|      buf = msg;
  131|      0|      blen = sizeof(msg) - 1;
  132|      0|      n = curl_msnprintf(buf, blen, "%s [%d]", info, sockindex);
  133|      0|      buf += n;
  134|      0|      blen -= n;
  135|      0|      for(; cf && blen; cf = cf->next) {
  ------------------
  |  Branch (135:13): [True: 0, False: 0]
  |  Branch (135:19): [True: 0, False: 0]
  ------------------
  136|      0|        n = curl_msnprintf(buf, blen, "[%s%s]",
  137|      0|                           cf->connected ? "" : "!", cf->cft->name);
  ------------------
  |  Branch (137:28): [True: 0, False: 0]
  ------------------
  138|      0|        buf += n;
  139|      0|        blen -= n;
  140|      0|      }
  141|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  142|      0|    }
  143|      0|    else
  144|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  145|      0|  }
  146|   313k|}
Curl_conn_cf_discard_chain:
  151|  23.4k|{
  152|  23.4k|  struct Curl_cfilter *cfn, *cf = *pcf;
  153|       |
  154|  23.4k|  if(cf) {
  ------------------
  |  Branch (154:6): [True: 14.3k, False: 9.12k]
  ------------------
  155|  14.3k|    *pcf = NULL;
  156|  38.5k|    while(cf) {
  ------------------
  |  Branch (156:11): [True: 24.2k, False: 14.3k]
  ------------------
  157|  24.2k|      cfn = cf->next;
  158|       |      /* prevent destroying filter to mess with its sub-chain, since
  159|       |       * we have the reference now and will call destroy on it.
  160|       |       */
  161|  24.2k|      cf->next = NULL;
  162|  24.2k|      cf->cft->destroy(cf, data);
  163|  24.2k|      curlx_free(cf);
  ------------------
  |  | 1483|  24.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  164|  24.2k|      cf = cfn;
  165|  24.2k|    }
  166|  14.3k|  }
  167|  23.4k|}
Curl_conn_cf_discard_all:
  171|  15.1k|{
  172|  15.1k|  Curl_conn_cf_discard_chain(&conn->cfilter[sockindex], data);
  173|  15.1k|}
Curl_conn_close:
  176|  12.1k|{
  177|  12.1k|  struct Curl_cfilter *cf;
  178|       |
  179|  12.1k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  12.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 12.1k]
  |  Branch (179:3): [True: 12.1k, False: 0]
  ------------------
  180|       |  /* it is valid to call that without filters being present */
  181|  12.1k|  cf = data->conn->cfilter[sockindex];
  182|  12.1k|  if(cf) {
  ------------------
  |  Branch (182:6): [True: 6.06k, False: 6.06k]
  ------------------
  183|  6.06k|    cf->cft->do_close(cf, data);
  184|  6.06k|  }
  185|  12.1k|  Curl_shutdown_clear(data, sockindex);
  186|  12.1k|}
Curl_conn_shutdown:
  189|    450|{
  190|    450|  struct Curl_cfilter *cf;
  191|    450|  CURLcode result = CURLE_OK;
  192|    450|  timediff_t timeout_ms;
  193|       |
  194|    450|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|    450|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 450]
  |  Branch (194:3): [True: 450, False: 0]
  ------------------
  195|       |
  196|    450|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|    450|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 450, False: 0]
  |  |  |  Branch (382:50): [True: 450, False: 0]
  |  |  ------------------
  ------------------
  197|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  198|       |
  199|       |  /* Get the first connected filter that is not shut down already. */
  200|    450|  cf = data->conn->cfilter[sockindex];
  201|    450|  while(cf && (!cf->connected || cf->shutdown))
  ------------------
  |  Branch (201:9): [True: 450, False: 0]
  |  Branch (201:16): [True: 0, False: 450]
  |  Branch (201:34): [True: 0, False: 450]
  ------------------
  202|      0|    cf = cf->next;
  203|       |
  204|    450|  if(!cf) {
  ------------------
  |  Branch (204:6): [True: 0, False: 450]
  ------------------
  205|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  206|      0|    return CURLE_OK;
  207|      0|  }
  208|       |
  209|    450|  *done = FALSE;
  ------------------
  |  | 1058|    450|#define FALSE false
  ------------------
  210|    450|  if(!Curl_shutdown_started(data, sockindex)) {
  ------------------
  |  Branch (210:6): [True: 0, False: 450]
  ------------------
  211|      0|    Curl_shutdown_start(data, sockindex, 0);
  212|      0|  }
  213|    450|  else {
  214|    450|    timeout_ms = Curl_shutdown_timeleft(data, data->conn, sockindex);
  215|    450|    if(timeout_ms < 0) {
  ------------------
  |  Branch (215:8): [True: 0, False: 450]
  ------------------
  216|       |      /* info message, since this might be regarded as acceptable */
  217|      0|      infof(data, "shutdown timeout");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  218|      0|      return CURLE_OPERATION_TIMEDOUT;
  219|      0|    }
  220|    450|  }
  221|       |
  222|    914|  while(cf) {
  ------------------
  |  Branch (222:9): [True: 464, False: 450]
  ------------------
  223|    464|    if(!cf->shutdown) {
  ------------------
  |  Branch (223:8): [True: 464, False: 0]
  ------------------
  224|    464|      bool cfdone = FALSE;
  ------------------
  |  | 1058|    464|#define FALSE false
  ------------------
  225|    464|      result = cf->cft->do_shutdown(cf, data, &cfdone);
  226|    464|      if(result) {
  ------------------
  |  Branch (226:10): [True: 0, False: 464]
  ------------------
  227|      0|        CURL_TRC_CF(data, cf, "shut down failed with %d", result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  228|      0|        return result;
  229|      0|      }
  230|    464|      else if(!cfdone) {
  ------------------
  |  Branch (230:15): [True: 0, False: 464]
  ------------------
  231|      0|        CURL_TRC_CF(data, cf, "shut down not done yet");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  232|      0|        return CURLE_OK;
  233|      0|      }
  234|    464|      CURL_TRC_CF(data, cf, "shut down successfully");
  ------------------
  |  |  153|    464|  do {                                          \
  |  |  154|    464|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    464|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    928|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 464, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 464]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    928|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    464|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    464|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    464|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 464]
  |  |  ------------------
  ------------------
  235|    464|      cf->shutdown = TRUE;
  ------------------
  |  | 1055|    464|#define TRUE true
  ------------------
  236|    464|    }
  237|    464|    cf = cf->next;
  238|    464|  }
  239|    450|  *done = (!result);
  240|    450|  return result;
  241|    450|}
Curl_cf_recv:
  245|   438k|{
  246|   438k|  struct Curl_cfilter *cf;
  247|       |
  248|   438k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|   438k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 438k]
  |  Branch (248:3): [True: 438k, False: 0]
  ------------------
  249|   438k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|   438k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 438k]
  |  Branch (249:3): [True: 438k, False: 0]
  ------------------
  250|   438k|  cf = data->conn->cfilter[sockindex];
  251|  2.15M|  while(cf && !cf->connected)
  ------------------
  |  Branch (251:9): [True: 2.15M, False: 0]
  |  Branch (251:15): [True: 1.71M, False: 438k]
  ------------------
  252|  1.71M|    cf = cf->next;
  253|   438k|  if(cf)
  ------------------
  |  Branch (253:6): [True: 438k, False: 0]
  ------------------
  254|   438k|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  255|      0|  failf(data, "recv: no filter connected");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  256|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (256:3): [Folded, False: 0]
  |  Branch (256:3): [Folded, False: 0]
  ------------------
  257|      0|  *pnread = 0;
  258|      0|  return CURLE_FAILED_INIT;
  259|      0|}
Curl_cf_send:
  264|  2.23k|{
  265|  2.23k|  struct Curl_cfilter *cf;
  266|       |
  267|  2.23k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  2.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (267:3): [True: 0, False: 2.23k]
  |  Branch (267:3): [True: 2.23k, False: 0]
  ------------------
  268|  2.23k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  2.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (268:3): [True: 0, False: 2.23k]
  |  Branch (268:3): [True: 2.23k, False: 0]
  ------------------
  269|  2.23k|  cf = data->conn->cfilter[sockindex];
  270|  2.23k|  while(cf && !cf->connected)
  ------------------
  |  Branch (270:9): [True: 2.23k, False: 0]
  |  Branch (270:15): [True: 0, False: 2.23k]
  ------------------
  271|      0|    cf = cf->next;
  272|  2.23k|  if(cf) {
  ------------------
  |  Branch (272:6): [True: 2.23k, False: 0]
  ------------------
  273|  2.23k|    return cf->cft->do_send(cf, data, buf, len, eos, pnwritten);
  274|  2.23k|  }
  275|      0|  failf(data, "send: no filter connected");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  276|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (276:3): [Folded, False: 0]
  |  Branch (276:3): [Folded, False: 0]
  ------------------
  277|      0|  *pnwritten = 0;
  278|      0|  return CURLE_FAILED_INIT;
  279|      0|}
Curl_cf_recv_bufq:
  299|    155|{
  300|    155|  struct cf_io_ctx io;
  301|       |
  302|    155|  if(!cf || !data) {
  ------------------
  |  Branch (302:6): [True: 0, False: 155]
  |  Branch (302:13): [True: 0, False: 155]
  ------------------
  303|      0|    *pnread = 0;
  304|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  305|      0|  }
  306|    155|  io.data = data;
  307|    155|  io.cf = cf;
  308|    155|  return Curl_bufq_sipn(bufq, maxlen, cf_bufq_reader, &io, pnread);
  309|    155|}
Curl_cf_send_bufq:
  324|     99|{
  325|     99|  struct cf_io_ctx io;
  326|       |
  327|     99|  if(!cf || !data) {
  ------------------
  |  Branch (327:6): [True: 0, False: 99]
  |  Branch (327:13): [True: 0, False: 99]
  ------------------
  328|      0|    *pnwritten = 0;
  329|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  330|      0|  }
  331|     99|  io.data = data;
  332|     99|  io.cf = cf;
  333|     99|  if(buf && blen)
  ------------------
  |  Branch (333:6): [True: 0, False: 99]
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|    return Curl_bufq_write_pass(bufq, buf, blen, cf_bufq_writer, &io,
  335|      0|                                pnwritten);
  336|     99|  else
  337|     99|    return Curl_bufq_pass(bufq, cf_bufq_writer, &io, pnwritten);
  338|     99|}
Curl_cf_create:
  343|  28.3k|{
  344|  28.3k|  struct Curl_cfilter *cf;
  345|  28.3k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  346|       |
  347|  28.3k|  DEBUGASSERT(cft);
  ------------------
  |  | 1081|  28.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (347:3): [True: 0, False: 28.3k]
  |  Branch (347:3): [True: 28.3k, False: 0]
  ------------------
  348|  28.3k|  cf = curlx_calloc(1, sizeof(*cf));
  ------------------
  |  | 1480|  28.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  349|  28.3k|  if(!cf)
  ------------------
  |  Branch (349:6): [True: 0, False: 28.3k]
  ------------------
  350|      0|    goto out;
  351|       |
  352|  28.3k|  cf->cft = cft;
  353|  28.3k|  cf->ctx = ctx;
  354|  28.3k|  result = CURLE_OK;
  355|  28.3k|out:
  356|  28.3k|  *pcf = cf;
  357|  28.3k|  return result;
  358|  28.3k|}
Curl_conn_cf_add:
  364|  12.1k|{
  365|  12.1k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  12.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (365:3): [True: 0, False: 12.1k]
  |  Branch (365:3): [True: 12.1k, False: 0]
  ------------------
  366|  12.1k|  DEBUGASSERT(!cf->conn);
  ------------------
  |  | 1081|  12.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (366:3): [True: 0, False: 12.1k]
  |  Branch (366:3): [True: 12.1k, False: 0]
  ------------------
  367|  12.1k|  DEBUGASSERT(!cf->next);
  ------------------
  |  | 1081|  12.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (367:3): [True: 0, False: 12.1k]
  |  Branch (367:3): [True: 12.1k, False: 0]
  ------------------
  368|       |
  369|  12.1k|  cf->next = conn->cfilter[sockindex];
  370|  12.1k|  cf->conn = conn;
  371|  12.1k|  cf->sockindex = sockindex;
  372|  12.1k|  conn->cfilter[sockindex] = cf;
  373|  12.1k|  CURL_TRC_CF(data, cf, "added");
  ------------------
  |  |  153|  12.1k|  do {                                          \
  |  |  154|  12.1k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  12.1k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  24.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 12.1k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 12.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  24.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  12.1k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  12.1k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  374|  12.1k|}
Curl_conn_cf_insert_after:
  378|  10.7k|{
  379|  10.7k|  struct Curl_cfilter *tail, **pnext;
  380|       |
  381|  10.7k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1081|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 0, False: 10.7k]
  |  Branch (381:3): [True: 10.7k, False: 0]
  ------------------
  382|  10.7k|  DEBUGASSERT(cf_new);
  ------------------
  |  | 1081|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (382:3): [True: 0, False: 10.7k]
  |  Branch (382:3): [True: 10.7k, False: 0]
  ------------------
  383|  10.7k|  DEBUGASSERT(!cf_new->conn);
  ------------------
  |  | 1081|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (383:3): [True: 0, False: 10.7k]
  |  Branch (383:3): [True: 10.7k, False: 0]
  ------------------
  384|       |
  385|  10.7k|  tail = cf_at->next;
  386|  10.7k|  cf_at->next = cf_new;
  387|  10.7k|  do {
  388|  10.7k|    cf_new->conn = cf_at->conn;
  389|  10.7k|    cf_new->sockindex = cf_at->sockindex;
  390|  10.7k|    pnext = &cf_new->next;
  391|  10.7k|    cf_new = cf_new->next;
  392|  10.7k|  } while(cf_new);
  ------------------
  |  Branch (392:11): [True: 0, False: 10.7k]
  ------------------
  393|  10.7k|  *pnext = tail;
  394|  10.7k|}
Curl_conn_cf_connect:
  423|   724k|{
  424|   724k|  if(cf)
  ------------------
  |  Branch (424:6): [True: 724k, False: 0]
  ------------------
  425|   724k|    return cf->cft->do_connect(cf, data, done);
  426|      0|  return CURLE_FAILED_INIT;
  427|   724k|}
Curl_conn_cf_close:
  430|    126|{
  431|    126|  if(cf)
  ------------------
  |  Branch (431:6): [True: 126, False: 0]
  ------------------
  432|    126|    cf->cft->do_close(cf, data);
  433|    126|}
Curl_conn_cf_send:
  438|  3.75k|{
  439|  3.75k|  if(cf)
  ------------------
  |  Branch (439:6): [True: 3.75k, False: 0]
  ------------------
  440|  3.75k|    return cf->cft->do_send(cf, data, buf, len, eos, pnwritten);
  441|      0|  *pnwritten = 0;
  442|      0|  return CURLE_SEND_ERROR;
  443|  3.75k|}
Curl_conn_cf_recv:
  447|  2.71k|{
  448|  2.71k|  if(cf)
  ------------------
  |  Branch (448:6): [True: 2.71k, False: 0]
  ------------------
  449|  2.71k|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  450|      0|  *pnread = 0;
  451|      0|  return CURLE_RECV_ERROR;
  452|  2.71k|}
Curl_conn_connect:
  544|   356k|{
  545|   356k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  546|   356k|  struct pollfd a_few_on_stack[CF_CONN_NUM_POLLS_ON_STACK];
  547|   356k|  struct easy_pollset ps;
  548|   356k|  struct curl_pollfds cpfds;
  549|   356k|  struct Curl_cfilter *cf;
  550|   356k|  CURLcode result = CURLE_OK;
  551|       |
  552|   356k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|   356k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (552:3): [True: 0, False: 356k]
  |  Branch (552:3): [True: 356k, False: 0]
  ------------------
  553|   356k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|   356k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (553:3): [True: 0, False: 356k]
  |  Branch (553:3): [True: 356k, False: 0]
  ------------------
  554|   356k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|   356k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 356k, False: 0]
  |  |  |  Branch (382:50): [True: 356k, False: 0]
  |  |  ------------------
  ------------------
  555|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  556|       |
  557|   356k|  if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|   356k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (557:6): [True: 0, False: 356k]
  ------------------
  558|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  559|      0|    return CURLE_OK;
  560|      0|  }
  561|       |
  562|   356k|  cf = data->conn->cfilter[sockindex];
  563|   356k|  if(!cf) {
  ------------------
  |  Branch (563:6): [True: 0, False: 356k]
  ------------------
  564|      0|    *done = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  565|      0|    return CURLE_FAILED_INIT;
  566|      0|  }
  567|       |
  568|   356k|  *done = (bool)cf->connected;
  569|   356k|  if(*done)
  ------------------
  |  Branch (569:6): [True: 0, False: 356k]
  ------------------
  570|      0|    return CURLE_OK;
  571|       |
  572|   356k|  Curl_pollset_init(&ps);
  573|   356k|  Curl_pollfds_init(&cpfds, a_few_on_stack, CF_CONN_NUM_POLLS_ON_STACK);
  ------------------
  |  |  545|   356k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  ------------------
  574|   356k|  while(!*done) {
  ------------------
  |  Branch (574:9): [True: 356k, False: 0]
  ------------------
  575|   356k|    if(Curl_conn_needs_flush(data, sockindex)) {
  ------------------
  |  Branch (575:8): [True: 0, False: 356k]
  ------------------
  576|      0|      DEBUGF(infof(data, "Curl_conn_connect(index=%d), flush", sockindex));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  577|      0|      result = Curl_conn_flush(data, sockindex);
  578|      0|      if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (578:10): [True: 0, False: 0]
  |  Branch (578:20): [True: 0, False: 0]
  ------------------
  579|      0|        return result;
  580|      0|    }
  581|       |
  582|   356k|    result = cf->cft->do_connect(cf, data, done);
  583|   356k|    CURL_TRC_CF(data, cf, "Curl_conn_connect(block=%d) -> %d, done=%d",
  ------------------
  |  |  153|   356k|  do {                                          \
  |  |  154|   356k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   356k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   712k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 356k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 356k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   712k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   356k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   356k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   356k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 356k]
  |  |  ------------------
  ------------------
  584|   356k|                blocking, result, *done);
  585|   356k|    if(!result && *done) {
  ------------------
  |  Branch (585:8): [True: 351k, False: 4.44k]
  |  Branch (585:19): [True: 1.36k, False: 350k]
  ------------------
  586|       |      /* Now that the complete filter chain is connected, let all filters
  587|       |       * persist information at the connection. E.g. cf-socket sets the
  588|       |       * socket and ip related information. */
  589|  1.36k|      cf_cntrl_update_info(data, data->conn);
  590|  1.36k|      conn_report_connect_stats(cf, data);
  591|  1.36k|      data->conn->keepalive = *Curl_pgrs_now(data);
  592|  1.36k|      VERBOSE(result = cf_verboseconnect(data, cf));
  ------------------
  |  | 1618|  1.36k|#define VERBOSE(x) x
  ------------------
  593|  1.36k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "connected"));
  ------------------
  |  | 1618|  1.36k|#define VERBOSE(x) x
  ------------------
  594|  1.36k|      conn_remove_setup_filters(data, sockindex);
  595|  1.36k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "reduced to"));
  ------------------
  |  | 1618|  1.36k|#define VERBOSE(x) x
  ------------------
  596|  1.36k|      goto out;
  597|  1.36k|    }
  598|   354k|    else if(result) {
  ------------------
  |  Branch (598:13): [True: 4.44k, False: 350k]
  ------------------
  599|  4.44k|      CURL_TRC_CF(data, cf, "Curl_conn_connect(), filter returned %d", result);
  ------------------
  |  |  153|  4.44k|  do {                                          \
  |  |  154|  4.44k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.44k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  8.88k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.44k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  8.88k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  4.44k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  4.44k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.44k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.44k]
  |  |  ------------------
  ------------------
  600|  4.44k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "failed to connect"));
  ------------------
  |  | 1618|  4.44k|#define VERBOSE(x) x
  ------------------
  601|  4.44k|      conn_report_connect_stats(cf, data);
  602|  4.44k|      goto out;
  603|  4.44k|    }
  604|       |
  605|   350k|    if(!blocking)
  ------------------
  |  Branch (605:8): [True: 350k, False: 0]
  ------------------
  606|   350k|      goto out;
  607|      0|    else {
  608|       |      /* check allowed time left */
  609|      0|      const timediff_t timeout_ms = Curl_timeleft_ms(data);
  610|      0|      curl_socket_t sockfd = Curl_conn_cf_get_socket(cf, data);
  611|      0|      int rc;
  612|       |
  613|      0|      if(timeout_ms < 0) {
  ------------------
  |  Branch (613:10): [True: 0, False: 0]
  ------------------
  614|       |        /* no need to continue if time already is up */
  615|      0|        failf(data, "connect timeout");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  616|      0|        result = CURLE_OPERATION_TIMEDOUT;
  617|      0|        goto out;
  618|      0|      }
  619|       |
  620|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  621|      0|      Curl_pollset_reset(&ps);
  622|      0|      Curl_pollfds_reset(&cpfds);
  623|       |      /* In general, we want to send after connect, wait on that. */
  624|      0|      if(sockfd != CURL_SOCKET_BAD)
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (624:10): [True: 0, False: 0]
  ------------------
  625|      0|        result = Curl_pollset_set_out_only(data, &ps, sockfd);
  ------------------
  |  |  174|      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
  |  |  ------------------
  ------------------
  626|      0|      if(!result)
  ------------------
  |  Branch (626:10): [True: 0, False: 0]
  ------------------
  627|      0|        result = Curl_conn_adjust_pollset(data, data->conn, &ps);
  628|      0|      if(result)
  ------------------
  |  Branch (628:10): [True: 0, False: 0]
  ------------------
  629|      0|        goto out;
  630|      0|      result = Curl_pollfds_add_ps(&cpfds, &ps);
  631|      0|      if(result)
  ------------------
  |  Branch (631:10): [True: 0, False: 0]
  ------------------
  632|      0|        goto out;
  633|       |
  634|      0|      rc = Curl_poll(cpfds.pfds, cpfds.n,
  635|      0|                     CURLMIN(timeout_ms, (cpfds.n ? 1000 : 10)));
  ------------------
  |  | 1287|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  |  Branch (1287:31): [True: 0, False: 0]
  |  |  |  Branch (1287:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  636|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  637|      0|                  rc);
  638|      0|      if(rc < 0) {
  ------------------
  |  Branch (638:10): [True: 0, False: 0]
  ------------------
  639|      0|        result = CURLE_COULDNT_CONNECT;
  640|      0|        goto out;
  641|      0|      }
  642|       |      /* continue iterating */
  643|      0|    }
  644|   350k|  }
  645|       |
  646|   356k|out:
  647|   356k|  Curl_pollset_cleanup(&ps);
  648|   356k|  Curl_pollfds_cleanup(&cpfds);
  649|   356k|  return result;
  650|   356k|}
Curl_conn_is_connected:
  660|   520k|{
  661|   520k|  struct Curl_cfilter *cf;
  662|       |
  663|   520k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|   520k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 520k, False: 0]
  |  |  |  Branch (382:50): [True: 520k, False: 0]
  |  |  ------------------
  ------------------
  664|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  665|   520k|  cf = conn->cfilter[sockindex];
  666|   520k|  if(cf)
  ------------------
  |  Branch (666:6): [True: 520k, False: 450]
  ------------------
  667|   520k|    return (bool)cf->connected;
  668|    450|  else if(conn->scheme->flags & PROTOPT_NONETWORK)
  ------------------
  |  |  215|    450|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (668:11): [True: 0, False: 450]
  ------------------
  669|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  670|    450|  return FALSE;
  ------------------
  |  | 1058|    450|#define FALSE false
  ------------------
  671|   520k|}
Curl_conn_is_ssl:
  704|  2.80k|{
  705|  2.80k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  2.80k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 2.80k, False: 0]
  |  |  |  Branch (382:50): [True: 2.80k, False: 0]
  |  |  ------------------
  ------------------
  706|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  707|  2.80k|  return conn ? cf_is_ssl(conn->cfilter[sockindex]) : FALSE;
  ------------------
  |  | 1058|  2.80k|#define FALSE false
  ------------------
  |  Branch (707:10): [True: 2.80k, False: 0]
  ------------------
  708|  2.80k|}
Curl_conn_is_multiplex:
  739|  14.1k|{
  740|  14.1k|  struct Curl_cfilter *cf;
  741|       |
  742|  14.1k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  14.1k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 14.1k, False: 0]
  |  |  |  Branch (382:50): [True: 14.1k, False: 0]
  |  |  ------------------
  ------------------
  743|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  744|  14.1k|  cf = conn ? conn->cfilter[sockindex] : NULL;
  ------------------
  |  Branch (744:8): [True: 14.1k, False: 0]
  ------------------
  745|       |
  746|  33.2k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (746:9): [True: 31.5k, False: 1.75k]
  ------------------
  747|  31.5k|    if(cf->cft->flags & CF_TYPE_MULTIPLEX)
  ------------------
  |  |  208|  31.5k|#define CF_TYPE_MULTIPLEX   (1 << 2)
  ------------------
  |  Branch (747:8): [True: 0, False: 31.5k]
  ------------------
  748|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  749|  31.5k|    if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  206|  31.5k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
                  if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  207|  31.5k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
  |  Branch (749:8): [True: 12.4k, False: 19.1k]
  ------------------
  750|  12.4k|      return FALSE;
  ------------------
  |  | 1058|  12.4k|#define FALSE false
  ------------------
  751|  31.5k|  }
  752|  1.75k|  return FALSE;
  ------------------
  |  | 1058|  1.75k|#define FALSE false
  ------------------
  753|  14.1k|}
Curl_socktype_for_transport:
  763|  6.42k|{
  764|  6.42k|  switch(transport) {
  765|  6.41k|  case TRNSPRT_TCP:
  ------------------
  |  |  307|  6.41k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (765:3): [True: 6.41k, False: 13]
  ------------------
  766|  6.41k|    return SOCK_STREAM;
  767|     13|  case TRNSPRT_UNIX:
  ------------------
  |  |  310|     13|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (767:3): [True: 13, False: 6.41k]
  ------------------
  768|     13|    return SOCK_STREAM;
  769|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (769:3): [True: 0, False: 6.42k]
  ------------------
  770|       |    return SOCK_DGRAM;
  771|  6.42k|  }
  772|  6.42k|}
Curl_protocol_for_transport:
  775|  6.42k|{
  776|  6.42k|  switch(transport) {
  777|  6.41k|  case TRNSPRT_TCP:
  ------------------
  |  |  307|  6.41k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (777:3): [True: 6.41k, False: 13]
  ------------------
  778|  6.41k|    return IPPROTO_TCP;
  779|     13|  case TRNSPRT_UNIX:
  ------------------
  |  |  310|     13|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (779:3): [True: 13, False: 6.41k]
  ------------------
  780|     13|    return IPPROTO_IP;
  781|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (781:3): [True: 0, False: 6.42k]
  ------------------
  782|       |    return IPPROTO_UDP;
  783|  6.42k|  }
  784|  6.42k|}
Curl_conn_cf_wants_httpsrr:
  788|   324k|{
  789|   324k|  (void)data;
  790|  1.04M|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (790:9): [True: 846k, False: 197k]
  ------------------
  791|   846k|    if(cf->cft->flags & CF_TYPE_HTTPSRR)
  ------------------
  |  |  212|   846k|#define CF_TYPE_HTTPSRR     (1 << 6)
  ------------------
  |  Branch (791:8): [True: 126k, False: 719k]
  ------------------
  792|   126k|      return TRUE;
  ------------------
  |  | 1055|   126k|#define TRUE true
  ------------------
  793|   846k|  }
  794|   197k|  return FALSE;
  ------------------
  |  | 1058|   197k|#define FALSE false
  ------------------
  795|   324k|}
Curl_conn_data_pending:
  829|  17.6k|{
  830|  17.6k|  struct Curl_cfilter *cf;
  831|       |
  832|  17.6k|  (void)data;
  833|  17.6k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (833:3): [True: 0, False: 17.6k]
  |  Branch (833:3): [True: 17.6k, False: 0]
  ------------------
  834|  17.6k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (834:3): [True: 0, False: 17.6k]
  |  Branch (834:3): [True: 17.6k, False: 0]
  ------------------
  835|  17.6k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  17.6k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 17.6k, False: 0]
  |  |  |  Branch (382:50): [True: 17.6k, False: 0]
  |  |  ------------------
  ------------------
  836|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  837|       |
  838|  17.6k|  cf = data->conn->cfilter[sockindex];
  839|  17.6k|  while(cf && !cf->connected) {
  ------------------
  |  Branch (839:9): [True: 17.6k, False: 0]
  |  Branch (839:15): [True: 0, False: 17.6k]
  ------------------
  840|      0|    cf = cf->next;
  841|      0|  }
  842|  17.6k|  if(cf) {
  ------------------
  |  Branch (842:6): [True: 17.6k, False: 0]
  ------------------
  843|  17.6k|    return cf->cft->has_data_pending(cf, data);
  844|  17.6k|  }
  845|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  846|  17.6k|}
Curl_conn_cf_needs_flush:
  850|   451k|{
  851|   451k|  CURLcode result;
  852|   451k|  int pending = 0;
  853|   451k|  result = cf ? cf->cft->query(cf, data, CF_QUERY_NEED_FLUSH,
  ------------------
  |  |  171|   451k|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (853:12): [True: 451k, False: 0]
  ------------------
  854|   451k|                               &pending, NULL) : CURLE_UNKNOWN_OPTION;
  855|   451k|  return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1058|   451k|#define FALSE false
  ------------------
                return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1055|   451k|#define TRUE true
  ------------------
  |  Branch (855:11): [True: 451k, False: 0]
  |  Branch (855:21): [True: 0, False: 0]
  ------------------
  856|   451k|}
Curl_conn_needs_flush:
  859|   357k|{
  860|   357k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|   357k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 356k, False: 1.03k]
  |  |  |  Branch (382:50): [True: 356k, False: 0]
  |  |  ------------------
  ------------------
  861|  1.03k|    return FALSE;
  ------------------
  |  | 1058|  1.03k|#define FALSE false
  ------------------
  862|   356k|  return Curl_conn_cf_needs_flush(data->conn->cfilter[sockindex], data);
  863|   357k|}
Curl_conn_cf_adjust_pollset:
  868|   829k|{
  869|   829k|  CURLcode result = CURLE_OK;
  870|       |  /* Get the lowest not-connected filter, if there are any */
  871|  1.66M|  while(cf && !cf->connected && cf->next && !cf->next->connected)
  ------------------
  |  Branch (871:9): [True: 1.31M, False: 354k]
  |  Branch (871:15): [True: 1.31M, False: 4.22k]
  |  Branch (871:33): [True: 1.03M, False: 273k]
  |  Branch (871:45): [True: 839k, False: 197k]
  ------------------
  872|   839k|    cf = cf->next;
  873|       |  /* Skip all filters that have already shut down */
  874|   829k|  while(cf && cf->shutdown)
  ------------------
  |  Branch (874:9): [True: 474k, False: 354k]
  |  Branch (874:15): [True: 0, False: 474k]
  ------------------
  875|      0|    cf = cf->next;
  876|       |  /* From there on, give all filters a chance to adjust the pollset.
  877|       |   * Lower filters are called later, so they may override */
  878|  1.69M|  while(cf && !result) {
  ------------------
  |  Branch (878:9): [True: 869k, False: 829k]
  |  Branch (878:15): [True: 869k, False: 0]
  ------------------
  879|   869k|    result = cf->cft->adjust_pollset(cf, data, ps);
  880|   869k|    cf = cf->next;
  881|   869k|  }
  882|   829k|  return result;
  883|   829k|}
Curl_conn_adjust_pollset:
  888|   354k|{
  889|   354k|  CURLcode result = CURLE_OK;
  890|   354k|  int i;
  891|       |
  892|   354k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|   354k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (892:3): [True: 0, False: 354k]
  |  Branch (892:3): [True: 354k, False: 0]
  ------------------
  893|   354k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|   354k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (893:3): [True: 0, False: 354k]
  |  Branch (893:3): [True: 354k, False: 0]
  ------------------
  894|       |  /* During connect time, connection filters may add sockets to the pollset
  895|       |   * even when the transfer neither wants to send nor receive. And those
  896|       |   * sockets, when having events, are served.
  897|       |   * Once connected however, a transfer that neither wants to send nor receive
  898|       |   * will never call the connection filters. Any sockets added by the filters
  899|       |   * will not change state and POLLIN/POLLOUT events will trigger forever,
  900|       |   * making us busy loop. See #21671 */
  901|   354k|  if(ps->n || !Curl_conn_is_connected(conn, FIRSTSOCKET) ||
  ------------------
  |  |  303|   153k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (901:6): [True: 201k, False: 153k]
  |  Branch (901:15): [True: 153k, False: 0]
  ------------------
  902|      0|     (conn->cfilter[SECONDARYSOCKET] &&
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (902:7): [True: 0, False: 0]
  ------------------
  903|   354k|      !Curl_conn_is_connected(conn, SECONDARYSOCKET))) {
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (903:7): [True: 0, False: 0]
  ------------------
  904|  1.06M|    for(i = 0; (i < 2) && !result && conn; ++i) {
  ------------------
  |  Branch (904:16): [True: 709k, False: 354k]
  |  Branch (904:27): [True: 709k, False: 0]
  |  Branch (904:38): [True: 709k, False: 0]
  ------------------
  905|   709k|      result = Curl_conn_cf_adjust_pollset(conn->cfilter[i], data, ps);
  906|   709k|    }
  907|   354k|  }
  908|   354k|  return result;
  909|   354k|}
Curl_conn_get_current_host:
  941|    200|{
  942|    200|  struct Curl_cfilter *cf, *cf_proxy = NULL;
  943|    200|  int portarg = -1;
  944|       |
  945|    200|  if(!data->conn) {
  ------------------
  |  Branch (945:6): [True: 0, False: 200]
  ------------------
  946|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (946:5): [Folded, False: 0]
  |  Branch (946:5): [Folded, False: 0]
  ------------------
  947|      0|    *phost = "";
  948|      0|    if(pport)
  ------------------
  |  Branch (948:8): [True: 0, False: 0]
  ------------------
  949|      0|      *pport = -1;
  950|      0|    return;
  951|      0|  }
  952|       |
  953|    200|  cf = CONN_SOCK_IDX_VALID(sockindex) ? data->conn->cfilter[sockindex] : NULL;
  ------------------
  |  |  382|    200|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 200, False: 0]
  |  |  |  Branch (382:50): [True: 200, False: 0]
  |  |  ------------------
  ------------------
  954|       |  /* Find the "lowest" tunneling proxy filter that has not connected yet. */
  955|    200|  while(cf && !cf->connected) {
  ------------------
  |  Branch (955:9): [True: 200, False: 0]
  |  Branch (955:15): [True: 0, False: 200]
  ------------------
  956|      0|    if((cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_PROXY)) ==
  ------------------
  |  |  206|      0|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
                  if((cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_PROXY)) ==
  ------------------
  |  |  209|      0|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (956:8): [True: 0, False: 0]
  ------------------
  957|      0|       (CF_TYPE_IP_CONNECT | CF_TYPE_PROXY))
  ------------------
  |  |  206|      0|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
                     (CF_TYPE_IP_CONNECT | CF_TYPE_PROXY))
  ------------------
  |  |  209|      0|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  958|      0|      cf_proxy = cf;
  959|      0|    cf = cf->next;
  960|      0|  }
  961|       |  /* cf_proxy (!= NULL) is not connected yet. It is talking
  962|       |   * to an interim host and any authentication or other things apply
  963|       |   * to this interim host and port. */
  964|    200|  if(!cf_proxy || cf_proxy->cft->query(cf_proxy, data, CF_QUERY_HOST_PORT,
  ------------------
  |  |  177|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (964:6): [True: 200, False: 0]
  |  Branch (964:19): [True: 0, False: 0]
  ------------------
  965|    200|                                       &portarg, CURL_UNCONST(phost))) {
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  966|       |    /* Everything connected or query unsuccessful, the overall
  967|       |     * connection's destination is the answer */
  968|    200|    *phost = data->conn->origin->hostname;
  969|    200|    portarg = data->conn->origin->port;
  970|    200|  }
  971|    200|  if(pport)
  ------------------
  |  Branch (971:6): [True: 200, False: 0]
  ------------------
  972|    200|    *pport = portarg;
  973|    200|}
Curl_conn_cf_cntrl:
  991|  27.0k|{
  992|  27.0k|  CURLcode result = CURLE_OK;
  993|       |
  994|  56.4k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (994:9): [True: 29.4k, False: 27.0k]
  ------------------
  995|  29.4k|    if(cf->cft->cntrl == Curl_cf_def_cntrl)
  ------------------
  |  Branch (995:8): [True: 13.8k, False: 15.5k]
  ------------------
  996|  13.8k|      continue;
  997|  15.5k|    result = cf->cft->cntrl(cf, data, event, arg1, arg2);
  998|  15.5k|    if(!ignore_result && result)
  ------------------
  |  Branch (998:8): [True: 0, False: 15.5k]
  |  Branch (998:26): [True: 0, False: 0]
  ------------------
  999|      0|      break;
 1000|  15.5k|  }
 1001|  27.0k|  return result;
 1002|  27.0k|}
Curl_conn_cf_get_socket:
 1006|   356k|{
 1007|   356k|  curl_socket_t sock;
 1008|   356k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_SOCKET, NULL, &sock))
  ------------------
  |  |  167|   356k|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (1008:6): [True: 356k, False: 0]
  |  Branch (1008:12): [True: 197k, False: 158k]
  ------------------
 1009|   197k|    return sock;
 1010|   158k|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|   158k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1011|   356k|}
Curl_conn_cf_get_alpn_negotiated:
 1024|    921|{
 1025|    921|  const char *alpn = NULL;
 1026|    921|  CURL_TRC_CF(data, cf, "query ALPN");
  ------------------
  |  |  153|    921|  do {                                          \
  |  |  154|    921|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    921|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.84k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 921, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 921]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.84k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    921|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    921|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    921|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 921]
  |  |  ------------------
  ------------------
 1027|    921|  if(cf && !cf->cft->query(cf, data, CF_QUERY_ALPN_NEGOTIATED, NULL,
  ------------------
  |  |  181|    921|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1027:6): [True: 921, False: 0]
  |  Branch (1027:12): [True: 0, False: 921]
  ------------------
 1028|    921|                           CURL_UNCONST(&alpn)))
  ------------------
  |  |  866|    921|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1029|      0|    return alpn;
 1030|    921|  return NULL;
 1031|    921|}
Curl_conn_cf_get_ip_info:
 1047|     17|{
 1048|     17|  CURLcode result = CURLE_UNKNOWN_OPTION;
 1049|     17|  if(cf) {
  ------------------
  |  Branch (1049:6): [True: 17, False: 0]
  ------------------
 1050|     17|    int ipv6 = 0;
 1051|     17|    result = cf->cft->query(cf, data, CF_QUERY_IP_INFO, &ipv6, ipquad);
  ------------------
  |  |  172|     17|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
 1052|     17|    *is_ipv6 = !!ipv6;
 1053|     17|  }
 1054|     17|  return result;
 1055|     17|}
Curl_conn_get_first_socket:
 1058|   350k|{
 1059|   350k|  struct Curl_cfilter *cf;
 1060|       |
 1061|   350k|  if(!data->conn)
  ------------------
  |  Branch (1061:6): [True: 0, False: 350k]
  ------------------
 1062|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1063|       |
 1064|   350k|  cf = data->conn->cfilter[FIRSTSOCKET];
  ------------------
  |  |  303|   350k|#define FIRSTSOCKET     0
  ------------------
 1065|       |  /* if the top filter has not connected, ask it (and its sub-filters)
 1066|       |   * for the socket. Otherwise conn->sock[sockindex] should have it. */
 1067|   350k|  if(cf && !cf->connected)
  ------------------
  |  Branch (1067:6): [True: 350k, False: 0]
  |  Branch (1067:12): [True: 350k, False: 0]
  ------------------
 1068|   350k|    return Curl_conn_cf_get_socket(cf, data);
 1069|      0|  return data->conn->sock[FIRSTSOCKET];
  ------------------
  |  |  303|      0|#define FIRSTSOCKET     0
  ------------------
 1070|   350k|}
Curl_conn_ev_data_setup:
 1082|  6.06k|{
 1083|  6.06k|  return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
                return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  |  119|  6.06k|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
 1084|  6.06k|}
Curl_conn_ev_data_done:
 1108|  6.06k|{
 1109|  6.06k|  cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  | 1055|  6.06k|#define TRUE true
  ------------------
                cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  |  122|  6.06k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
 1110|  6.06k|}
Curl_conn_get_max_concurrent:
 1141|    370|{
 1142|    370|  struct Curl_cfilter *cf;
 1143|    370|  CURLcode result;
 1144|    370|  int n = -1;
 1145|       |
 1146|    370|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|    370|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 370, False: 0]
  |  |  |  Branch (382:50): [True: 370, False: 0]
  |  |  ------------------
  ------------------
 1147|      0|    return 0;
 1148|       |
 1149|    370|  cf = conn->cfilter[sockindex];
 1150|    370|  result = cf ? cf->cft->query(cf, data, CF_QUERY_MAX_CONCURRENT,
  ------------------
  |  |  165|    370|#define CF_QUERY_MAX_CONCURRENT     1  /* number     -        */
  ------------------
  |  Branch (1150:12): [True: 370, False: 0]
  ------------------
 1151|    370|                               &n, NULL) : CURLE_UNKNOWN_OPTION;
 1152|       |  /* If no filter answered the query, the default is a non-multiplexed
 1153|       |   * connection with limit 1. Otherwise, the query may return 0
 1154|       |   * for connections that are in shutdown, e.g. server HTTP/2 GOAWAY. */
 1155|    370|  return (result || n < 0) ? 1 : (size_t)n;
  ------------------
  |  Branch (1155:11): [True: 370, False: 0]
  |  Branch (1155:21): [True: 0, False: 0]
  ------------------
 1156|    370|}
Curl_conn_recv:
 1185|   438k|{
 1186|   438k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|   438k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1186:3): [True: 0, False: 438k]
  |  Branch (1186:3): [True: 438k, False: 0]
  ------------------
 1187|   438k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|   438k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1187:3): [True: 0, False: 438k]
  |  Branch (1187:3): [True: 438k, False: 0]
  ------------------
 1188|   438k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|   438k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 438k, False: 0]
  |  |  |  Branch (382:50): [True: 438k, False: 0]
  |  |  ------------------
  ------------------
 1189|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1190|   438k|  if(data && data->conn && data->conn->recv[sockindex])
  ------------------
  |  Branch (1190:6): [True: 438k, False: 0]
  |  Branch (1190:14): [True: 438k, False: 0]
  |  Branch (1190:28): [True: 438k, False: 0]
  ------------------
 1191|   438k|    return data->conn->recv[sockindex](data, sockindex, buf, len, pnread);
 1192|      0|  *pnread = 0;
 1193|      0|  return CURLE_FAILED_INIT;
 1194|   438k|}
Curl_conn_send:
 1199|  2.23k|{
 1200|  2.23k|  size_t write_len = len;
 1201|       |
 1202|  2.23k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  2.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1202:3): [True: 0, False: 2.23k]
  |  Branch (1202:3): [True: 2.23k, False: 0]
  ------------------
 1203|  2.23k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  2.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1203:3): [True: 0, False: 2.23k]
  |  Branch (1203:3): [True: 2.23k, False: 0]
  ------------------
 1204|  2.23k|  DEBUGASSERT(CONN_SOCK_IDX_VALID(sockindex));
  ------------------
  |  | 1081|  2.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1204:3): [True: 0, False: 2.23k]
  |  Branch (1204:3): [True: 0, False: 0]
  |  Branch (1204:3): [True: 2.23k, False: 0]
  |  Branch (1204:3): [True: 2.23k, False: 0]
  ------------------
 1205|  2.23k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  2.23k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 2.23k, False: 0]
  |  |  |  Branch (382:50): [True: 2.23k, False: 0]
  |  |  ------------------
  ------------------
 1206|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1207|  2.23k|#ifdef DEBUGBUILD
 1208|  2.23k|  if(write_len) {
  ------------------
  |  Branch (1208:6): [True: 2.23k, False: 0]
  ------------------
 1209|       |    /* Allow debug builds to override this logic to force short sends */
 1210|  2.23k|    const char *p = getenv("CURL_SMALLSENDS");
 1211|  2.23k|    if(p) {
  ------------------
  |  Branch (1211:8): [True: 0, False: 2.23k]
  ------------------
 1212|      0|      curl_off_t altsize;
 1213|      0|      if(!curlx_str_number(&p, &altsize, write_len)) {
  ------------------
  |  Branch (1213:10): [True: 0, False: 0]
  ------------------
 1214|      0|        write_len = (size_t)altsize;
 1215|      0|        if(write_len != len)
  ------------------
  |  Branch (1215:12): [True: 0, False: 0]
  ------------------
 1216|      0|          eos = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1217|      0|      }
 1218|      0|    }
 1219|  2.23k|  }
 1220|  2.23k|#endif
 1221|  2.23k|  if(data && data->conn && data->conn->send[sockindex])
  ------------------
  |  Branch (1221:6): [True: 2.23k, False: 0]
  |  Branch (1221:14): [True: 2.23k, False: 0]
  |  Branch (1221:28): [True: 2.23k, False: 0]
  ------------------
 1222|  2.23k|    return data->conn->send[sockindex](data, sockindex, buf, write_len, eos,
 1223|  2.23k|                                       pnwritten);
 1224|      0|  *pnwritten = 0;
 1225|      0|  return CURLE_FAILED_INIT;
 1226|  2.23k|}
cfilters.c:cf_bufq_reader:
  289|    155|{
  290|    155|  struct cf_io_ctx *io = writer_ctx;
  291|    155|  return Curl_conn_cf_recv(io->cf, io->data, (char *)buf, blen, pnread);
  292|    155|}
cfilters.c:cf_bufq_writer:
  314|     99|{
  315|     99|  struct cf_io_ctx *io = writer_ctx;
  316|       |  return Curl_conn_cf_send(io->cf, io->data, buf, buflen, FALSE, pnwritten);
  ------------------
  |  | 1058|     99|#define FALSE false
  ------------------
  317|     99|}
cfilters.c:cf_cntrl_update_info:
  496|  1.36k|{
  497|  1.36k|  cf_cntrl_all(conn, data, TRUE, CF_CTRL_CONN_INFO_UPDATE, 0, NULL);
  ------------------
  |  | 1055|  1.36k|#define TRUE true
  ------------------
                cf_cntrl_all(conn, data, TRUE, CF_CTRL_CONN_INFO_UPDATE, 0, NULL);
  ------------------
  |  |  125|  1.36k|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  498|  1.36k|}
cfilters.c:conn_report_connect_stats:
  505|  5.80k|{
  506|  5.80k|  if(cf) {
  ------------------
  |  Branch (506:6): [True: 5.80k, False: 0]
  ------------------
  507|  5.80k|    struct curltime connected;
  508|  5.80k|    struct curltime appconnected;
  509|       |
  510|  5.80k|    memset(&connected, 0, sizeof(connected));
  511|  5.80k|    cf->cft->query(cf, data, CF_QUERY_TIMER_CONNECT, NULL, &connected);
  ------------------
  |  |  168|  5.80k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  512|  5.80k|    if(connected.tv_sec || connected.tv_usec)
  ------------------
  |  Branch (512:8): [True: 5.16k, False: 646]
  |  Branch (512:28): [True: 0, False: 646]
  ------------------
  513|  5.16k|      Curl_pgrsTimeWas(data, TIMER_CONNECT, connected);
  514|       |
  515|  5.80k|    memset(&appconnected, 0, sizeof(appconnected));
  516|  5.80k|    cf->cft->query(cf, data, CF_QUERY_TIMER_APPCONNECT, NULL, &appconnected);
  ------------------
  |  |  169|  5.80k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  517|  5.80k|    if(appconnected.tv_sec || appconnected.tv_usec)
  ------------------
  |  Branch (517:8): [True: 0, False: 5.80k]
  |  Branch (517:31): [True: 0, False: 5.80k]
  ------------------
  518|      0|      Curl_pgrsTimeWas(data, TIMER_APPCONNECT, appconnected);
  519|  5.80k|  }
  520|  5.80k|}
cfilters.c:cf_verboseconnect:
  457|  1.36k|{
  458|  1.36k|  if(Curl_trc_is_verbose(data)) {
  ------------------
  |  |  319|  1.36k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (319:4): [True: 1.36k, False: 0]
  |  |  |  Branch (319:14): [True: 0, False: 1.36k]
  |  |  ------------------
  |  |  320|  1.36k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  459|      0|    struct ip_quadruple ipquad;
  460|      0|    bool is_ipv6;
  461|      0|    CURLcode result;
  462|       |
  463|      0|    result = Curl_conn_cf_get_ip_info(cf, data, &is_ipv6, &ipquad);
  464|      0|    if(result)
  ------------------
  |  Branch (464:8): [True: 0, False: 0]
  ------------------
  465|      0|      return result;
  466|       |
  467|      0|    infof(data, "Established %sconnection to %s (%s port %u) from %s port %u ",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  468|      0|          (cf->sockindex == SECONDARYSOCKET) ? "2nd " : "",
  469|      0|          CURL_CONN_HOST_DISPNAME(data->conn),
  470|      0|          ipquad.remote_ip, ipquad.remote_port,
  471|      0|          ipquad.local_ip, ipquad.local_port);
  472|      0|  }
  473|  1.36k|  return CURLE_OK;
  474|  1.36k|}
cfilters.c:conn_remove_setup_filters:
  524|  1.36k|{
  525|  1.36k|  struct Curl_cfilter **anchor = &data->conn->cfilter[sockindex];
  526|  6.88k|  while(*anchor) {
  ------------------
  |  Branch (526:9): [True: 5.52k, False: 1.36k]
  ------------------
  527|  5.52k|    struct Curl_cfilter *cf = *anchor;
  528|  5.52k|    if(cf->connected && (cf->cft->flags & CF_TYPE_SETUP)) {
  ------------------
  |  |  211|  5.52k|#define CF_TYPE_SETUP       (1 << 5)
  ------------------
  |  Branch (528:8): [True: 5.52k, False: 0]
  |  Branch (528:25): [True: 4.13k, False: 1.39k]
  ------------------
  529|  4.13k|      *anchor = cf->next;
  530|  4.13k|      cf->next = NULL;
  531|  4.13k|      CURL_TRC_CF(data, cf, "removing connected setup filter");
  ------------------
  |  |  153|  4.13k|  do {                                          \
  |  |  154|  4.13k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.13k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  8.26k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.13k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  8.26k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  4.13k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  4.13k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.13k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.13k]
  |  |  ------------------
  ------------------
  532|  4.13k|      cf->cft->destroy(cf, data);
  533|  4.13k|      curlx_free(cf);
  ------------------
  |  | 1483|  4.13k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  534|  4.13k|    }
  535|  1.39k|    else
  536|  1.39k|      anchor = &cf->next;
  537|  5.52k|  }
  538|  1.36k|}
cfilters.c:cf_is_ssl:
  691|  2.80k|{
  692|  11.1k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (692:9): [True: 11.1k, False: 0]
  ------------------
  693|       |    /* A tunneling proxy does not offer end2end encryption, even if
  694|       |     * it does SSL itself (e.g. QUIC H3 proxy) */
  695|  11.1k|    if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  207|  11.1k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                  if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  209|      0|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (695:8): [True: 0, False: 11.1k]
  |  Branch (695:42): [True: 0, False: 0]
  ------------------
  696|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  697|  11.1k|    if(cf->cft->flags & CF_TYPE_IP_CONNECT)
  ------------------
  |  |  206|  11.1k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
  |  Branch (697:8): [True: 2.80k, False: 8.39k]
  ------------------
  698|  2.80k|      return FALSE;
  ------------------
  |  | 1058|  2.80k|#define FALSE false
  ------------------
  699|  11.1k|  }
  700|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  701|  2.80k|}
cfilters.c:cf_cntrl_all:
  481|  13.4k|{
  482|  13.4k|  CURLcode result = CURLE_OK;
  483|  13.4k|  size_t i;
  484|       |
  485|  40.4k|  for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1294|  40.4k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (485:14): [True: 26.9k, False: 13.4k]
  ------------------
  486|  26.9k|    result = Curl_conn_cf_cntrl(conn->cfilter[i], data, ignore_result,
  487|  26.9k|                                event, arg1, arg2);
  488|  26.9k|    if(!ignore_result && result)
  ------------------
  |  Branch (488:8): [True: 12.1k, False: 14.8k]
  |  Branch (488:26): [True: 0, False: 12.1k]
  ------------------
  489|      0|      break;
  490|  26.9k|  }
  491|  13.4k|  return result;
  492|  13.4k|}

Curl_cpool_init:
  117|  10.0k|{
  118|  10.0k|  Curl_hash_init(&cpool->dest2bundle, size, Curl_hash_str,
  119|  10.0k|                 curlx_str_key_compare, cpool_bundle_free_entry);
  120|       |
  121|  10.0k|  DEBUGASSERT(idata);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (121:3): [True: 0, False: 10.0k]
  |  Branch (121:3): [True: 10.0k, False: 0]
  ------------------
  122|       |
  123|  10.0k|  cpool->idata = idata;
  124|  10.0k|  cpool->share = share;
  125|       |  cpool->initialized = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  126|  10.0k|}
Curl_cpool_destroy:
  232|  10.0k|{
  233|  10.0k|  if(cpool && cpool->initialized && cpool->idata) {
  ------------------
  |  Branch (233:6): [True: 10.0k, False: 0]
  |  Branch (233:15): [True: 10.0k, False: 0]
  |  Branch (233:37): [True: 10.0k, False: 0]
  ------------------
  234|  10.0k|    struct connectdata *conn;
  235|  10.0k|    struct Curl_sigpipe_ctx pipe_ctx;
  236|       |
  237|  10.0k|    CURL_TRC_M(cpool->idata, "%s[CPOOL] destroy, %zu connections",
  ------------------
  |  |  148|  10.0k|  do {                                   \
  |  |  149|  10.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  20.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  20.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  238|  10.0k|               cpool->share ? "[SHARE] " : "", cpool->num_conn);
  239|       |    /* Move all connections to the shutdown list */
  240|  10.0k|    sigpipe_init(&pipe_ctx);
  241|  10.0k|    CPOOL_LOCK(cpool, cpool->idata);
  ------------------
  |  |   42|  10.0k|  do {                                                                  \
  |  |   43|  10.0k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 10.0k, False: 0]
  |  |  ------------------
  |  |   44|  10.0k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  10.0k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 10.0k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  10.0k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  10.0k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  10.0k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  10.0k|#define TRUE true
  |  |  ------------------
  |  |   49|  10.0k|    }                                                                   \
  |  |   50|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  |  Branch (241:5): [True: 0, False: 10.0k]
  |  Branch (241:5): [True: 10.0k, False: 0]
  ------------------
  242|  10.0k|    conn = cpool_get_first(cpool);
  243|  10.0k|    if(conn)
  ------------------
  |  Branch (243:8): [True: 369, False: 9.70k]
  ------------------
  244|    369|      sigpipe_apply(cpool->idata, &pipe_ctx);
  245|  10.4k|    while(conn) {
  ------------------
  |  Branch (245:11): [True: 369, False: 10.0k]
  ------------------
  246|    369|      cpool_remove_conn(cpool, conn);
  247|    369|      cpool_discard_conn(cpool, cpool->idata, conn, FALSE);
  ------------------
  |  | 1058|    369|#define FALSE false
  ------------------
  248|    369|      conn = cpool_get_first(cpool);
  249|    369|    }
  250|  10.0k|    CPOOL_UNLOCK(cpool, cpool->idata);
  ------------------
  |  |   53|  10.0k|  do {                                                                  \
  |  |   54|  10.0k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 10.0k, False: 0]
  |  |  ------------------
  |  |   55|  10.0k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  10.0k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  10.0k|#define FALSE false
  |  |  ------------------
  |  |   57|  10.0k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  10.0k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 10.0k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  10.0k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  10.0k|    }                                                                   \
  |  |   60|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  |  Branch (250:5): [True: 0, False: 10.0k]
  |  Branch (250:5): [True: 10.0k, False: 0]
  ------------------
  251|  10.0k|    sigpipe_restore(&pipe_ctx);
  252|  10.0k|    Curl_hash_destroy(&cpool->dest2bundle);
  253|  10.0k|  }
  254|  10.0k|}
Curl_cpool_xfer_init:
  270|  10.7k|{
  271|  10.7k|  struct cpool *cpool = cpool_get_instance(data);
  272|       |
  273|  10.7k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 10.7k]
  |  Branch (273:3): [True: 10.7k, False: 0]
  ------------------
  274|  10.7k|  if(cpool) {
  ------------------
  |  Branch (274:6): [True: 10.7k, False: 0]
  ------------------
  275|  10.7k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  10.7k|  do {                                                                  \
  |  |   43|  10.7k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 10.7k, False: 0]
  |  |  ------------------
  |  |   44|  10.7k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  10.7k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 10.7k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  10.7k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  10.7k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  10.7k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  10.7k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  10.7k|#define TRUE true
  |  |  ------------------
  |  |   49|  10.7k|    }                                                                   \
  |  |   50|  10.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
  |  Branch (275:5): [True: 0, False: 10.7k]
  |  Branch (275:5): [True: 10.7k, False: 0]
  ------------------
  276|       |    /* the identifier inside the connection cache */
  277|  10.7k|    data->id = cpool->next_easy_id++;
  278|  10.7k|    if(cpool->next_easy_id <= 0)
  ------------------
  |  Branch (278:8): [True: 0, False: 10.7k]
  ------------------
  279|      0|      cpool->next_easy_id = 0;
  280|  10.7k|    data->state.lastconnect_id = -1;
  281|       |
  282|  10.7k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  10.7k|  do {                                                                  \
  |  |   54|  10.7k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 10.7k, False: 0]
  |  |  ------------------
  |  |   55|  10.7k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  10.7k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  10.7k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  10.7k|#define FALSE false
  |  |  ------------------
  |  |   57|  10.7k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  10.7k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 10.7k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  10.7k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  10.7k|    }                                                                   \
  |  |   60|  10.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
  |  Branch (282:5): [True: 0, False: 10.7k]
  |  Branch (282:5): [True: 10.7k, False: 0]
  ------------------
  283|  10.7k|  }
  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|  10.7k|}
Curl_cpool_check_limits:
  372|  6.06k|{
  373|  6.06k|  struct cpool *cpool = cpool_get_instance(data);
  374|  6.06k|  struct cpool_bundle *bundle;
  375|  6.06k|  size_t dest_limit = 0;
  376|  6.06k|  size_t total_limit = 0;
  377|  6.06k|  size_t shutdowns;
  378|  6.06k|  int res = CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  6.06k|#define CPOOL_LIMIT_OK     0
  ------------------
  379|       |
  380|  6.06k|  if(!cpool)
  ------------------
  |  Branch (380:6): [True: 0, False: 6.06k]
  ------------------
  381|      0|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   90|      0|#define CPOOL_LIMIT_OK     0
  ------------------
  382|       |
  383|  6.06k|  if(cpool->idata->multi) {
  ------------------
  |  Branch (383:6): [True: 6.06k, False: 0]
  ------------------
  384|  6.06k|    dest_limit = cpool->idata->multi->max_host_connections;
  385|  6.06k|    total_limit = cpool->idata->multi->max_total_connections;
  386|  6.06k|  }
  387|       |
  388|  6.06k|  if(!dest_limit && !total_limit)
  ------------------
  |  Branch (388:6): [True: 6.06k, False: 0]
  |  Branch (388:21): [True: 6.06k, False: 0]
  ------------------
  389|  6.06k|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  6.06k|#define CPOOL_LIMIT_OK     0
  ------------------
  390|       |
  391|      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);                                        \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (391:3): [True: 0, False: 0]
  |  Branch (391:3): [True: 0, False: 0]
  ------------------
  392|      0|  if(dest_limit) {
  ------------------
  |  Branch (392:6): [True: 0, False: 0]
  ------------------
  393|      0|    size_t live;
  394|       |
  395|      0|    bundle = cpool_find_bundle(cpool, conn);
  396|      0|    live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (396:12): [True: 0, False: 0]
  ------------------
  397|      0|    shutdowns = Curl_cshutdn_dest_count(data, conn->destination);
  398|      0|    while((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (398:11): [True: 0, False: 0]
  ------------------
  399|      0|      if(shutdowns) {
  ------------------
  |  Branch (399:10): [True: 0, False: 0]
  ------------------
  400|       |        /* close one connection in shutdown right away, if we can */
  401|      0|        if(!Curl_cshutdn_close_oldest(data, conn->destination))
  ------------------
  |  Branch (401:12): [True: 0, False: 0]
  ------------------
  402|      0|          break;
  403|      0|      }
  404|      0|      else if(!bundle)
  ------------------
  |  Branch (404:15): [True: 0, False: 0]
  ------------------
  405|      0|        break;
  406|      0|      else {
  407|      0|        struct connectdata *oldest_idle = NULL;
  408|       |        /* The bundle is full. Extract the oldest connection that may
  409|       |         * be removed now, if there is one. */
  410|      0|        oldest_idle = cpool_bundle_get_oldest_idle(bundle,
  411|      0|                                                   Curl_pgrs_now(data));
  412|      0|        if(!oldest_idle)
  ------------------
  |  Branch (412:12): [True: 0, False: 0]
  ------------------
  413|      0|          break;
  414|       |        /* disconnect the old conn and continue */
  415|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  416|      0|                   " from %zu to reach destination limit of %zu",
  417|      0|                   oldest_idle->connection_id,
  418|      0|                   Curl_llist_count(&bundle->conns), dest_limit);
  419|      0|        Curl_conn_terminate(cpool->idata, oldest_idle, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  420|       |
  421|       |        /* in case the bundle was destroyed in disconnect, look it up again */
  422|      0|        bundle = cpool_find_bundle(cpool, conn);
  423|      0|        live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (423:16): [True: 0, False: 0]
  ------------------
  424|      0|      }
  425|      0|      shutdowns = Curl_cshutdn_dest_count(cpool->idata, conn->destination);
  426|      0|    }
  427|      0|    if((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (427:8): [True: 0, False: 0]
  ------------------
  428|      0|      res = CPOOL_LIMIT_DEST;
  ------------------
  |  |   91|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  429|      0|      goto out;
  430|      0|    }
  431|      0|  }
  432|       |
  433|      0|  if(total_limit) {
  ------------------
  |  Branch (433:6): [True: 0, False: 0]
  ------------------
  434|      0|    shutdowns = Curl_cshutdn_count(cpool->idata);
  435|      0|    while((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (435:11): [True: 0, False: 0]
  ------------------
  436|      0|      if(shutdowns) {
  ------------------
  |  Branch (436:10): [True: 0, False: 0]
  ------------------
  437|       |        /* close one connection in shutdown right away, if we can */
  438|      0|        if(!Curl_cshutdn_close_oldest(data, NULL))
  ------------------
  |  Branch (438:12): [True: 0, False: 0]
  ------------------
  439|      0|          break;
  440|      0|      }
  441|      0|      else {
  442|      0|        struct connectdata *oldest_idle =
  443|      0|          cpool_get_oldest_idle(cpool, Curl_pgrs_now(data));
  444|      0|        if(!oldest_idle)
  ------------------
  |  Branch (444:12): [True: 0, False: 0]
  ------------------
  445|      0|          break;
  446|       |        /* disconnect the old conn and continue */
  447|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  448|      0|                   FMT_OFF_T " from %zu to reach total "
  449|      0|                   "limit of %zu",
  450|      0|                   oldest_idle->connection_id, cpool->num_conn, total_limit);
  451|      0|        Curl_conn_terminate(cpool->idata, oldest_idle, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  452|      0|      }
  453|      0|      shutdowns = Curl_cshutdn_count(cpool->idata);
  454|      0|    }
  455|      0|    if((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (455:8): [True: 0, False: 0]
  ------------------
  456|      0|      res = CPOOL_LIMIT_TOTAL;
  ------------------
  |  |   92|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  457|      0|      goto out;
  458|      0|    }
  459|      0|  }
  460|       |
  461|      0|out:
  462|      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);                                         \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|      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 (462:3): [True: 0, False: 0]
  |  Branch (462:3): [True: 0, False: 0]
  ------------------
  463|      0|  return res;
  464|      0|}
Curl_cpool_add:
  468|  6.06k|{
  469|  6.06k|  CURLcode result = CURLE_OK;
  470|  6.06k|  struct cpool_bundle *bundle = NULL;
  471|  6.06k|  struct cpool *cpool = cpool_get_instance(data);
  472|  6.06k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (472:3): [True: 0, False: 6.06k]
  |  Branch (472:3): [True: 6.06k, False: 0]
  ------------------
  473|       |
  474|  6.06k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (474:3): [True: 0, False: 6.06k]
  |  Branch (474:3): [True: 6.06k, False: 0]
  ------------------
  475|  6.06k|  if(!cpool)
  ------------------
  |  Branch (475:6): [True: 0, False: 6.06k]
  ------------------
  476|      0|    return CURLE_FAILED_INIT;
  477|       |
  478|  6.06k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  6.06k|  do {                                                                  \
  |  |   43|  6.06k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 6.06k, False: 0]
  |  |  ------------------
  |  |   44|  6.06k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.06k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.06k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  6.06k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  6.06k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  6.06k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  6.06k|#define TRUE true
  |  |  ------------------
  |  |   49|  6.06k|    }                                                                   \
  |  |   50|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  |  Branch (478:3): [True: 0, False: 6.06k]
  |  Branch (478:3): [True: 6.06k, False: 0]
  ------------------
  479|  6.06k|  bundle = cpool_find_bundle(cpool, conn);
  480|  6.06k|  if(!bundle) {
  ------------------
  |  Branch (480:6): [True: 6.06k, False: 3]
  ------------------
  481|  6.06k|    bundle = cpool_add_bundle(cpool, conn);
  482|  6.06k|    if(!bundle) {
  ------------------
  |  Branch (482:8): [True: 0, False: 6.06k]
  ------------------
  483|      0|      result = CURLE_OUT_OF_MEMORY;
  484|      0|      goto out;
  485|      0|    }
  486|  6.06k|  }
  487|       |
  488|  6.06k|  cpool_bundle_add(bundle, conn);
  489|  6.06k|  conn->connection_id = cpool->next_connection_id++;
  490|  6.06k|  cpool->num_conn++;
  491|  6.06k|  CURL_TRC_M(data, "[CPOOL] added connection %" FMT_OFF_T ". "
  ------------------
  |  |  148|  6.06k|  do {                                   \
  |  |  149|  6.06k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.06k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  6.06k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  12.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 6.06k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  12.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  6.06k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.06k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  492|  6.06k|             "The cache now contains %zu members",
  493|  6.06k|             conn->connection_id, cpool->num_conn);
  494|  6.06k|out:
  495|  6.06k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  6.06k|  do {                                                                  \
  |  |   54|  6.06k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 6.06k, False: 0]
  |  |  ------------------
  |  |   55|  6.06k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  6.06k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  6.06k|#define FALSE false
  |  |  ------------------
  |  |   57|  6.06k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.06k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.06k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  6.06k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  6.06k|    }                                                                   \
  |  |   60|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  |  Branch (495:3): [True: 0, False: 6.06k]
  |  Branch (495:3): [True: 6.06k, False: 0]
  ------------------
  496|       |
  497|  6.06k|  return result;
  498|  6.06k|}
Curl_cpool_conn_now_idle:
  555|    370|{
  556|    370|  unsigned int maxconnects;
  557|    370|  struct connectdata *oldest_idle = NULL;
  558|    370|  struct cpool *cpool = cpool_get_instance(data);
  559|    370|  bool kept = TRUE;
  ------------------
  |  | 1055|    370|#define TRUE true
  ------------------
  560|       |
  561|    370|  if(!data || !data->multi)
  ------------------
  |  Branch (561:6): [True: 0, False: 370]
  |  Branch (561:15): [True: 0, False: 370]
  ------------------
  562|      0|    return kept;
  563|       |
  564|    370|  if(!data->multi->maxconnects) {
  ------------------
  |  Branch (564:6): [True: 370, False: 0]
  ------------------
  565|    370|    unsigned int running = Curl_multi_xfers_running(data->multi);
  566|    370|    maxconnects = (running <= UINT_MAX / 4) ? running * 4 : UINT_MAX;
  ------------------
  |  Branch (566:19): [True: 370, False: 0]
  ------------------
  567|    370|  }
  568|      0|  else {
  569|      0|    maxconnects = data->multi->maxconnects;
  570|      0|  }
  571|       |
  572|    370|  conn->lastused = *Curl_pgrs_now(data); /* it was used up until now */
  573|    370|  if(cpool && maxconnects) {
  ------------------
  |  Branch (573:6): [True: 370, False: 0]
  |  Branch (573:15): [True: 370, False: 0]
  ------------------
  574|       |    /* may be called form a callback already under lock */
  575|    370|    bool do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|    370|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 370, False: 0]
  |  |  |  Branch (39:39): [True: 370, False: 0]
  |  |  ------------------
  ------------------
  576|    370|    if(do_lock)
  ------------------
  |  Branch (576:8): [True: 0, False: 370]
  ------------------
  577|      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);                                        \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (577:7): [True: 0, False: 0]
  |  Branch (577:7): [True: 0, False: 0]
  ------------------
  578|    370|    if(cpool->num_conn > maxconnects) {
  ------------------
  |  Branch (578:8): [True: 0, False: 370]
  ------------------
  579|      0|      infof(data, "Connection pool is full, closing the oldest of %zu/%u",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  580|      0|            cpool->num_conn, maxconnects);
  581|       |
  582|      0|      oldest_idle = cpool_get_oldest_idle(cpool, Curl_pgrs_now(data));
  583|      0|      kept = (oldest_idle != conn);
  584|      0|      if(oldest_idle) {
  ------------------
  |  Branch (584:10): [True: 0, False: 0]
  ------------------
  585|      0|        Curl_conn_terminate(data, oldest_idle, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  586|      0|      }
  587|      0|    }
  588|    370|    if(do_lock)
  ------------------
  |  Branch (588:8): [True: 0, False: 370]
  ------------------
  589|      0|      CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|      0|  do {                                                                  \
  |  |   54|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|      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 (589:7): [True: 0, False: 0]
  |  Branch (589:7): [True: 0, False: 0]
  ------------------
  590|    370|  }
  591|       |
  592|    370|  return kept;
  593|    370|}
Curl_cpool_find:
  600|  6.26k|{
  601|  6.26k|  struct cpool *cpool = cpool_get_instance(data);
  602|  6.26k|  struct cpool_bundle *bundle;
  603|  6.26k|  bool found = FALSE;
  ------------------
  |  | 1058|  6.26k|#define FALSE false
  ------------------
  604|       |
  605|  6.26k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (605:3): [True: 0, False: 6.26k]
  |  Branch (605:3): [True: 6.26k, False: 0]
  ------------------
  606|  6.26k|  DEBUGASSERT(conn_cb);
  ------------------
  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (606:3): [True: 0, False: 6.26k]
  |  Branch (606:3): [True: 6.26k, False: 0]
  ------------------
  607|  6.26k|  if(!cpool)
  ------------------
  |  Branch (607:6): [True: 0, False: 6.26k]
  ------------------
  608|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  609|       |
  610|  6.26k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  6.26k|  do {                                                                  \
  |  |   43|  6.26k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 6.26k, False: 0]
  |  |  ------------------
  |  |   44|  6.26k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.26k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.26k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  6.26k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  6.26k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  6.26k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  6.26k|#define TRUE true
  |  |  ------------------
  |  |   49|  6.26k|    }                                                                   \
  |  |   50|  6.26k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
  |  Branch (610:3): [True: 0, False: 6.26k]
  |  Branch (610:3): [True: 6.26k, False: 0]
  ------------------
  611|  6.26k|  bundle = Curl_hash_pick(&cpool->dest2bundle,
  612|  6.26k|                          CURL_UNCONST(destination),
  ------------------
  |  |  866|  6.26k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  613|  6.26k|                          strlen(destination) + 1);
  614|  6.26k|  if(bundle) {
  ------------------
  |  Branch (614:6): [True: 206, False: 6.05k]
  ------------------
  615|    206|    struct Curl_llist_node *curr = Curl_llist_head(&bundle->conns);
  616|    413|    while(curr) {
  ------------------
  |  Branch (616:11): [True: 207, False: 206]
  ------------------
  617|    207|      struct connectdata *conn = Curl_node_elem(curr);
  618|       |      /* Get next node now. callback might discard current */
  619|    207|      curr = Curl_node_next(curr);
  620|       |
  621|    207|      if(conn_cb(conn, userdata)) {
  ------------------
  |  Branch (621:10): [True: 0, False: 207]
  ------------------
  622|      0|        found = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  623|      0|        break;
  624|      0|      }
  625|    207|    }
  626|    206|  }
  627|       |
  628|  6.26k|  if(done_cb) {
  ------------------
  |  Branch (628:6): [True: 6.26k, False: 0]
  ------------------
  629|  6.26k|    found = done_cb(userdata);
  630|  6.26k|  }
  631|  6.26k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  6.26k|  do {                                                                  \
  |  |   54|  6.26k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 6.26k, False: 0]
  |  |  ------------------
  |  |   55|  6.26k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  6.26k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  6.26k|#define FALSE false
  |  |  ------------------
  |  |   57|  6.26k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.26k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.26k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  6.26k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  6.26k|    }                                                                   \
  |  |   60|  6.26k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
  |  Branch (631:3): [True: 0, False: 6.26k]
  |  Branch (631:3): [True: 6.26k, False: 0]
  ------------------
  632|  6.26k|  return found;
  633|  6.26k|}
Curl_conn_terminate:
  638|  5.69k|{
  639|  5.69k|  struct cpool *cpool = cpool_get_instance(data);
  640|  5.69k|  bool do_lock;
  641|       |
  642|  5.69k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  5.69k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (642:3): [True: 0, False: 5.69k]
  |  Branch (642:3): [True: 5.69k, False: 0]
  ------------------
  643|  5.69k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1081|  5.69k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (643:3): [True: 0, False: 5.69k]
  |  Branch (643:3): [True: 0, False: 0]
  |  Branch (643:3): [True: 5.69k, False: 0]
  |  Branch (643:3): [True: 5.69k, False: 0]
  ------------------
  644|  5.69k|  if(!cpool)
  ------------------
  |  Branch (644:6): [True: 0, False: 5.69k]
  ------------------
  645|      0|    return;
  646|       |
  647|       |  /* If this connection is not marked to force-close, leave it open if there
  648|       |   * are other users of it */
  649|  5.69k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  346|  11.3k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (346:23): [True: 0, False: 5.69k]
  |  |  ------------------
  ------------------
  |  Branch (649:26): [True: 0, False: 0]
  ------------------
  650|      0|    DEBUGASSERT(0); /* does this ever happen? */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (650:5): [Folded, False: 0]
  |  Branch (650:5): [Folded, False: 0]
  ------------------
  651|      0|    DEBUGF(infof(data, "conn terminate when inuse: %u", conn->attached_xfers));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  652|      0|    return;
  653|      0|  }
  654|       |
  655|       |  /* This method may be called while we are under lock, e.g. from a
  656|       |   * user callback in find. */
  657|  5.69k|  do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|  5.69k|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 5.69k, False: 0]
  |  |  |  Branch (39:39): [True: 5.69k, False: 1]
  |  |  ------------------
  ------------------
  658|  5.69k|  if(do_lock)
  ------------------
  |  Branch (658:6): [True: 1, False: 5.69k]
  ------------------
  659|      1|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|      1|  do {                                                                  \
  |  |   43|      1|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 1, False: 0]
  |  |  ------------------
  |  |   44|      1|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      1|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 1]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      1|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      1|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|      1|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      1|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|      1|#define TRUE true
  |  |  ------------------
  |  |   49|      1|    }                                                                   \
  |  |   50|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (659:5): [True: 0, False: 1]
  |  Branch (659:5): [True: 1, False: 0]
  ------------------
  660|       |
  661|  5.69k|  if(conn->bits.in_cpool) {
  ------------------
  |  Branch (661:6): [True: 5.69k, False: 0]
  ------------------
  662|  5.69k|    cpool_remove_conn(cpool, conn);
  663|  5.69k|    DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1081|  5.69k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (663:5): [True: 0, False: 5.69k]
  |  Branch (663:5): [True: 5.69k, False: 0]
  ------------------
  664|  5.69k|  }
  665|       |
  666|       |  /* treat the connection as aborted in CONNECT_ONLY situations,
  667|       |   * so no graceful shutdown is attempted. */
  668|  5.69k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (668:6): [True: 5, False: 5.69k]
  ------------------
  669|      5|    aborted = TRUE;
  ------------------
  |  | 1055|      5|#define TRUE true
  ------------------
  670|       |
  671|  5.69k|  if(data->multi) {
  ------------------
  |  Branch (671:6): [True: 5.69k, False: 0]
  ------------------
  672|       |    /* Add it to the multi's cpool for shutdown handling */
  673|  5.69k|    infof(data, "%s connection #%" FMT_OFF_T,
  ------------------
  |  |  143|  5.69k|  do {                               \
  |  |  144|  5.69k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  5.69k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 5.69k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.69k]
  |  |  |  |  ------------------
  |  |  |  |  320|  5.69k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  5.69k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  5.69k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 5.69k]
  |  |  ------------------
  ------------------
  674|  5.69k|          aborted ? "closing" : "shutting down", conn->connection_id);
  675|  5.69k|    cpool_discard_conn(&data->multi->cpool, data, conn, aborted);
  676|  5.69k|  }
  677|      0|  else {
  678|       |    /* No multi available, terminate */
  679|      0|    infof(data, "closing connection #%" FMT_OFF_T, conn->connection_id);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  680|      0|    Curl_cshutdn_terminate(cpool->idata, conn, !aborted);
  681|      0|  }
  682|       |
  683|  5.69k|  if(do_lock)
  ------------------
  |  Branch (683:6): [True: 1, False: 5.69k]
  ------------------
  684|       |    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|      1|  do {                                                                  \
  |  |   54|      1|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 1, False: 0]
  |  |  ------------------
  |  |   55|      1|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|      1|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      1|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|      1|#define FALSE false
  |  |  ------------------
  |  |   57|      1|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      1|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 1]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      1|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      1|    }                                                                   \
  |  |   60|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (684:5): [True: 0, False: 1]
  |  Branch (684:5): [True: 1, False: 0]
  ------------------
  685|  5.69k|}
Curl_cpool_prune_dead:
  719|  6.26k|{
  720|  6.26k|  struct cpool *cpool = cpool_get_instance(data);
  721|  6.26k|  struct cpool_reaper_ctx reaper;
  722|  6.26k|  timediff_t elapsed;
  723|       |
  724|  6.26k|  if(!cpool)
  ------------------
  |  Branch (724:6): [True: 0, False: 6.26k]
  ------------------
  725|      0|    return;
  726|       |
  727|  6.26k|  memset(&reaper, 0, sizeof(reaper));
  728|  6.26k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  6.26k|  do {                                                                  \
  |  |   43|  6.26k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 6.26k, False: 0]
  |  |  ------------------
  |  |   44|  6.26k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.26k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.26k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  6.26k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  6.26k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  6.26k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  6.26k|#define TRUE true
  |  |  ------------------
  |  |   49|  6.26k|    }                                                                   \
  |  |   50|  6.26k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
  |  Branch (728:3): [True: 0, False: 6.26k]
  |  Branch (728:3): [True: 6.26k, False: 0]
  ------------------
  729|  6.26k|  elapsed = curlx_ptimediff_ms(Curl_pgrs_now(data), &cpool->last_cleanup);
  730|       |
  731|  6.26k|  if(elapsed >= 1000L) {
  ------------------
  |  Branch (731:6): [True: 5.71k, False: 558]
  ------------------
  732|  5.71k|    while(cpool_foreach(data, cpool, &reaper, cpool_reap_dead_cb))
  ------------------
  |  Branch (732:11): [True: 0, False: 5.71k]
  ------------------
  733|      0|      ;
  734|  5.71k|    cpool->last_cleanup = *Curl_pgrs_now(data);
  735|  5.71k|  }
  736|       |  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  6.26k|  do {                                                                  \
  |  |   54|  6.26k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 6.26k, False: 0]
  |  |  ------------------
  |  |   55|  6.26k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  6.26k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  6.26k|#define FALSE false
  |  |  ------------------
  |  |   57|  6.26k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.26k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.26k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  6.26k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  6.26k|    }                                                                   \
  |  |   60|  6.26k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
  |  Branch (736:3): [True: 0, False: 6.26k]
  |  Branch (736:3): [True: 6.26k, False: 0]
  ------------------
  737|  6.26k|}
Curl_cpool_get_conn:
  780|      1|{
  781|      1|  struct cpool *cpool = cpool_get_instance(data);
  782|      1|  struct cpool_find_ctx fctx;
  783|       |
  784|      1|  if(!cpool)
  ------------------
  |  Branch (784:6): [True: 0, False: 1]
  ------------------
  785|      0|    return NULL;
  786|      1|  fctx.id = conn_id;
  787|      1|  fctx.conn = NULL;
  788|      1|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|      1|  do {                                                                  \
  |  |   43|      1|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 1, False: 0]
  |  |  ------------------
  |  |   44|      1|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      1|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 1]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      1|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      1|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|      1|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      1|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|      1|#define TRUE true
  |  |  ------------------
  |  |   49|      1|    }                                                                   \
  |  |   50|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (788:3): [True: 0, False: 1]
  |  Branch (788:3): [True: 1, False: 0]
  ------------------
  789|      1|  cpool_foreach(data, cpool, &fctx, cpool_find_conn);
  790|      1|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|      1|  do {                                                                  \
  |  |   54|      1|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 1, False: 0]
  |  |  ------------------
  |  |   55|      1|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|      1|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      1|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|      1|#define FALSE false
  |  |  ------------------
  |  |   57|      1|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      1|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 1]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      1|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      1|    }                                                                   \
  |  |   60|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (790:3): [True: 0, False: 1]
  |  Branch (790:3): [True: 1, False: 0]
  ------------------
  791|      1|  return fctx.conn;
  792|      1|}
Curl_cpool_do_by_id:
  814|    370|{
  815|    370|  struct cpool *cpool = cpool_get_instance(data);
  816|    370|  struct cpool_do_conn_ctx dctx;
  817|       |
  818|    370|  if(!cpool)
  ------------------
  |  Branch (818:6): [True: 0, False: 370]
  ------------------
  819|      0|    return;
  820|    370|  dctx.id = conn_id;
  821|    370|  dctx.cb = cb;
  822|    370|  dctx.cbdata = cbdata;
  823|    370|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|    370|  do {                                                                  \
  |  |   43|    370|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 370, False: 0]
  |  |  ------------------
  |  |   44|    370|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|    370|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 370]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|    370|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|    370|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|    370|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|    370|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|    370|#define TRUE true
  |  |  ------------------
  |  |   49|    370|    }                                                                   \
  |  |   50|    370|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 370]
  |  |  ------------------
  ------------------
  |  Branch (823:3): [True: 0, False: 370]
  |  Branch (823:3): [True: 370, False: 0]
  ------------------
  824|    370|  cpool_foreach(data, cpool, &dctx, cpool_do_conn);
  825|       |  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|    370|  do {                                                                  \
  |  |   54|    370|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 370, False: 0]
  |  |  ------------------
  |  |   55|    370|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|    370|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|    370|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|    370|#define FALSE false
  |  |  ------------------
  |  |   57|    370|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|    370|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 370]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|    370|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|    370|    }                                                                   \
  |  |   60|    370|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 370]
  |  |  ------------------
  ------------------
  |  Branch (825:3): [True: 0, False: 370]
  |  Branch (825:3): [True: 370, False: 0]
  ------------------
  826|    370|}
Curl_cpool_do_locked:
  831|  6.06k|{
  832|  6.06k|  struct cpool *cpool = cpool_get_instance(data);
  833|  6.06k|  if(cpool) {
  ------------------
  |  Branch (833:6): [True: 6.06k, False: 0]
  ------------------
  834|  6.06k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  6.06k|  do {                                                                  \
  |  |   43|  6.06k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 6.06k, False: 0]
  |  |  ------------------
  |  |   44|  6.06k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.06k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.06k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  6.06k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  6.06k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  6.06k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  6.06k|#define TRUE true
  |  |  ------------------
  |  |   49|  6.06k|    }                                                                   \
  |  |   50|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  |  Branch (834:5): [True: 0, False: 6.06k]
  |  Branch (834:5): [True: 6.06k, False: 0]
  ------------------
  835|  6.06k|    cb(conn, data, cbdata);
  836|  6.06k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  6.06k|  do {                                                                  \
  |  |   54|  6.06k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 6.06k, False: 0]
  |  |  ------------------
  |  |   55|  6.06k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  6.06k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  6.06k|#define FALSE false
  |  |  ------------------
  |  |   57|  6.06k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.06k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.06k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  6.06k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  6.06k|    }                                                                   \
  |  |   60|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  |  Branch (836:5): [True: 0, False: 6.06k]
  |  Branch (836:5): [True: 6.06k, False: 0]
  ------------------
  837|  6.06k|  }
  838|      0|  else
  839|      0|    cb(conn, data, cbdata);
  840|  6.06k|}
conncache.c:cpool_bundle_free_entry:
  109|  6.06k|{
  110|  6.06k|  cpool_bundle_destroy((struct cpool_bundle *)freethis);
  111|  6.06k|}
conncache.c:cpool_bundle_destroy:
   84|  6.06k|{
   85|  6.06k|  DEBUGASSERT(!Curl_llist_count(&bundle->conns));
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (85:3): [True: 0, False: 6.06k]
  |  Branch (85:3): [True: 6.06k, False: 0]
  ------------------
   86|  6.06k|  curlx_free(bundle);
  ------------------
  |  | 1483|  6.06k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   87|  6.06k|}
conncache.c:cpool_get_first:
  130|  10.4k|{
  131|  10.4k|  struct Curl_hash_iterator iter;
  132|  10.4k|  struct Curl_hash_element *he;
  133|  10.4k|  struct cpool_bundle *bundle;
  134|  10.4k|  struct Curl_llist_node *conn_node;
  135|       |
  136|  10.4k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  137|  10.4k|  for(he = Curl_hash_next_element(&iter); he;
  ------------------
  |  Branch (137:43): [True: 369, False: 10.0k]
  ------------------
  138|  10.4k|      he = Curl_hash_next_element(&iter)) {
  139|    369|    bundle = he->ptr;
  140|    369|    conn_node = Curl_llist_head(&bundle->conns);
  141|    369|    if(conn_node)
  ------------------
  |  Branch (141:8): [True: 369, False: 0]
  ------------------
  142|    369|      return Curl_node_elem(conn_node);
  143|    369|  }
  144|  10.0k|  return NULL;
  145|  10.4k|}
conncache.c:cpool_remove_conn:
  164|  6.06k|{
  165|  6.06k|  struct Curl_llist *list = Curl_node_llist(&conn->cpool_node);
  166|  6.06k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 6.06k]
  |  Branch (166:3): [True: 6.06k, False: 0]
  ------------------
  167|  6.06k|  if(list) {
  ------------------
  |  Branch (167:6): [True: 6.06k, False: 0]
  ------------------
  168|       |    /* The connection is certainly in the pool, but where? */
  169|  6.06k|    struct cpool_bundle *bundle = cpool_find_bundle(cpool, conn);
  170|  6.06k|    if(bundle && (list == &bundle->conns)) {
  ------------------
  |  Branch (170:8): [True: 6.06k, False: 0]
  |  Branch (170:18): [True: 6.06k, False: 0]
  ------------------
  171|  6.06k|      cpool_bundle_remove(bundle, conn);
  172|  6.06k|      if(!Curl_llist_count(&bundle->conns))
  ------------------
  |  Branch (172:10): [True: 6.06k, False: 3]
  ------------------
  173|  6.06k|        cpool_remove_bundle(cpool, bundle);
  174|  6.06k|      conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
  175|  6.06k|      cpool->num_conn--;
  176|  6.06k|    }
  177|      0|    else {
  178|       |      /* Should have been in the bundle list */
  179|       |      DEBUGASSERT(NULL);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:7): [True: 0, False: 0]
  |  Branch (179:7): [True: 0, False: 0]
  ------------------
  180|      0|    }
  181|  6.06k|  }
  182|  6.06k|}
conncache.c:cpool_bundle_remove:
  101|  6.06k|{
  102|  6.06k|  (void)bundle;
  103|  6.06k|  DEBUGASSERT(Curl_node_llist(&conn->cpool_node) == &bundle->conns);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 0, False: 6.06k]
  |  Branch (103:3): [True: 6.06k, False: 0]
  ------------------
  104|  6.06k|  Curl_node_remove(&conn->cpool_node);
  105|       |  conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
  106|  6.06k|}
conncache.c:cpool_remove_bundle:
  156|  6.06k|{
  157|  6.06k|  if(!cpool)
  ------------------
  |  Branch (157:6): [True: 0, False: 6.06k]
  ------------------
  158|      0|    return;
  159|  6.06k|  Curl_hash_delete(&cpool->dest2bundle, bundle->dest, bundle->dest_len);
  160|  6.06k|}
conncache.c:cpool_discard_conn:
  188|  6.06k|{
  189|  6.06k|  bool done = FALSE;
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
  190|       |
  191|  6.06k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 6.06k]
  |  Branch (191:3): [True: 6.06k, False: 0]
  ------------------
  192|  6.06k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 6.06k]
  |  Branch (192:3): [True: 6.06k, False: 0]
  ------------------
  193|  6.06k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 0, False: 6.06k]
  |  Branch (193:3): [True: 6.06k, False: 0]
  ------------------
  194|  6.06k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 6.06k]
  |  Branch (194:3): [True: 6.06k, 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.06k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  346|  12.1k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (346:23): [True: 0, False: 6.06k]
  |  |  ------------------
  ------------------
  |  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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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.06k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (209:6): [True: 5, False: 6.06k]
  ------------------
  210|      5|    aborted = TRUE;
  ------------------
  |  | 1055|      5|#define TRUE true
  ------------------
  211|  6.06k|  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.06k|  if(aborted)
  ------------------
  |  Branch (218:6): [True: 5.61k, False: 450]
  ------------------
  219|  5.61k|    done = TRUE;
  ------------------
  |  | 1055|  5.61k|#define TRUE true
  ------------------
  220|  6.06k|  if(!done) {
  ------------------
  |  Branch (220:6): [True: 450, False: 5.61k]
  ------------------
  221|       |    /* Attempt to shutdown the connection right away. */
  222|    450|    Curl_cshutdn_run_once(cpool->idata, conn, &done);
  223|    450|  }
  224|       |
  225|  6.06k|  if(done || !data->multi)
  ------------------
  |  Branch (225:6): [True: 6.06k, False: 0]
  |  Branch (225:14): [True: 0, False: 0]
  ------------------
  226|  6.06k|    Curl_cshutdn_terminate(cpool->idata, conn, FALSE);
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
  227|      0|  else
  228|      0|    Curl_cshutdn_add(&data->multi->cshutdn, conn, cpool->num_conn);
  229|  6.06k|}
conncache.c:cpool_get_instance:
  257|  47.9k|{
  258|  47.9k|  if(data) {
  ------------------
  |  Branch (258:6): [True: 47.9k, False: 0]
  ------------------
  259|  47.9k|    if(CURL_SHARE_KEEP_CONNECT(data->share))
  ------------------
  |  |   41|  47.9k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  ------------------
  |  |  |  Branch (41:4): [True: 0, False: 47.9k]
  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  260|      0|      return &data->share->cpool;
  261|  47.9k|    else if(data->multi_easy)
  ------------------
  |  Branch (261:13): [True: 0, False: 47.9k]
  ------------------
  262|      0|      return &data->multi_easy->cpool;
  263|  47.9k|    else if(data->multi)
  ------------------
  |  Branch (263:13): [True: 47.9k, False: 0]
  ------------------
  264|  47.9k|      return &data->multi->cpool;
  265|  47.9k|  }
  266|      0|  return NULL;
  267|  47.9k|}
conncache.c:cpool_find_bundle:
  149|  12.1k|{
  150|  12.1k|  return Curl_hash_pick(&cpool->dest2bundle,
  151|  12.1k|                        conn->destination, strlen(conn->destination) + 1);
  152|  12.1k|}
conncache.c:cpool_add_bundle:
  293|  6.06k|{
  294|  6.06k|  struct cpool_bundle *bundle;
  295|       |
  296|  6.06k|  bundle = cpool_bundle_create(conn->destination);
  297|  6.06k|  if(!bundle)
  ------------------
  |  Branch (297:6): [True: 0, False: 6.06k]
  ------------------
  298|      0|    return NULL;
  299|       |
  300|  6.06k|  if(!Curl_hash_add(&cpool->dest2bundle,
  ------------------
  |  Branch (300:6): [True: 0, False: 6.06k]
  ------------------
  301|  6.06k|                    bundle->dest, bundle->dest_len, bundle)) {
  302|      0|    cpool_bundle_destroy(bundle);
  303|      0|    return NULL;
  304|      0|  }
  305|  6.06k|  return bundle;
  306|  6.06k|}
conncache.c:cpool_bundle_create:
   70|  6.06k|{
   71|  6.06k|  struct cpool_bundle *bundle;
   72|  6.06k|  size_t dest_len = strlen(dest) + 1;
   73|       |
   74|  6.06k|  bundle = curlx_calloc(1, sizeof(*bundle) + dest_len - 1);
  ------------------
  |  | 1480|  6.06k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   75|  6.06k|  if(!bundle)
  ------------------
  |  Branch (75:6): [True: 0, False: 6.06k]
  ------------------
   76|      0|    return NULL;
   77|  6.06k|  Curl_llist_init(&bundle->conns, NULL);
   78|  6.06k|  bundle->dest_len = dest_len;
   79|  6.06k|  memcpy(bundle->dest, dest, bundle->dest_len);
   80|  6.06k|  return bundle;
   81|  6.06k|}
conncache.c:cpool_bundle_add:
   92|  6.06k|{
   93|  6.06k|  DEBUGASSERT(!Curl_node_llist(&conn->cpool_node));
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 6.06k]
  |  Branch (93:3): [True: 6.06k, False: 0]
  ------------------
   94|  6.06k|  Curl_llist_append(&bundle->conns, conn, &conn->cpool_node);
   95|       |  conn->bits.in_cpool = TRUE;
  ------------------
  |  | 1055|  6.06k|#define TRUE true
  ------------------
   96|  6.06k|}
conncache.c:cpool_foreach:
  517|  6.08k|{
  518|  6.08k|  struct Curl_hash_iterator iter;
  519|  6.08k|  struct Curl_hash_element *he;
  520|       |
  521|  6.08k|  if(!cpool)
  ------------------
  |  Branch (521:6): [True: 0, False: 6.08k]
  ------------------
  522|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  523|       |
  524|  6.08k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  525|       |
  526|  6.08k|  he = Curl_hash_next_element(&iter);
  527|  6.08k|  while(he) {
  ------------------
  |  Branch (527:9): [True: 370, False: 5.71k]
  ------------------
  528|    370|    struct Curl_llist_node *curr;
  529|    370|    struct cpool_bundle *bundle = he->ptr;
  530|    370|    he = Curl_hash_next_element(&iter);
  531|       |
  532|    370|    curr = Curl_llist_head(&bundle->conns);
  533|    370|    while(curr) {
  ------------------
  |  Branch (533:11): [True: 370, False: 0]
  ------------------
  534|       |      /* Yes, we need to update curr before calling func(), because func()
  535|       |         might decide to remove the connection */
  536|    370|      struct connectdata *conn = Curl_node_elem(curr);
  537|    370|      curr = Curl_node_next(curr);
  538|       |
  539|    370|      if(func(data, conn, param) == 1) {
  ------------------
  |  Branch (539:10): [True: 370, False: 0]
  ------------------
  540|    370|        return TRUE;
  ------------------
  |  | 1055|    370|#define TRUE true
  ------------------
  541|    370|      }
  542|    370|    }
  543|    370|  }
  544|  5.71k|  return FALSE;
  ------------------
  |  | 1058|  5.71k|#define FALSE false
  ------------------
  545|  6.08k|}
conncache.c:cpool_find_conn:
  768|      1|{
  769|      1|  struct cpool_find_ctx *fctx = param;
  770|      1|  (void)data;
  771|      1|  if(conn->connection_id == fctx->id) {
  ------------------
  |  Branch (771:6): [True: 1, False: 0]
  ------------------
  772|      1|    fctx->conn = conn;
  773|      1|    return 1;
  774|      1|  }
  775|      0|  return 0;
  776|      1|}
conncache.c:cpool_do_conn:
  802|    369|{
  803|    369|  struct cpool_do_conn_ctx *dctx = param;
  804|       |
  805|    369|  if(conn->connection_id == dctx->id) {
  ------------------
  |  Branch (805:6): [True: 369, False: 0]
  ------------------
  806|    369|    dctx->cb(conn, data, dctx->cbdata);
  807|    369|    return 1;
  808|    369|  }
  809|      0|  return 0;
  810|    369|}

timeleft_now_ms:
  112|   842k|{
  113|   842k|  timediff_t timeleft_ms = 0;
  114|   842k|  timediff_t ctimeleft_ms = 0;
  115|       |
  116|   842k|  if(Curl_shutdown_started(data, FIRSTSOCKET))
  ------------------
  |  |  303|   842k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (116:6): [True: 486, False: 842k]
  ------------------
  117|    486|    return Curl_shutdown_timeleft(data, data->conn, FIRSTSOCKET);
  ------------------
  |  |  303|    486|#define FIRSTSOCKET     0
  ------------------
  118|   842k|  else if(Curl_is_connecting(data)) {
  ------------------
  |  Branch (118:11): [True: 839k, False: 2.84k]
  ------------------
  119|   839k|    timediff_t ctimeout_ms = (data->set.connecttimeout > 0) ?
  ------------------
  |  Branch (119:30): [True: 19.2k, False: 820k]
  ------------------
  120|   820k|      data->set.connecttimeout : DEFAULT_CONNECT_TIMEOUT;
  ------------------
  |  |   43|   820k|#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */
  ------------------
  121|   839k|    ctimeleft_ms = ctimeout_ms -
  122|   839k|      curlx_ptimediff_ms(pnow, &data->progress.t_startsingle);
  123|   839k|    if(!ctimeleft_ms)
  ------------------
  |  Branch (123:8): [True: 1, False: 839k]
  ------------------
  124|      1|      ctimeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
  125|   839k|  }
  126|  2.84k|  else if(!data->set.timeout || data->set.connect_only) {
  ------------------
  |  Branch (126:11): [True: 0, False: 2.84k]
  |  Branch (126:33): [True: 8, False: 2.83k]
  ------------------
  127|      8|    return 0; /* no timeout in place or checked, return "no limit" */
  128|      8|  }
  129|       |
  130|   842k|  if(data->set.timeout) {
  ------------------
  |  Branch (130:6): [True: 842k, False: 0]
  ------------------
  131|   842k|    timeleft_ms = data->set.timeout -
  132|   842k|      curlx_ptimediff_ms(pnow, &data->progress.t_startop);
  133|   842k|    if(!timeleft_ms)
  ------------------
  |  Branch (133:8): [True: 4, False: 842k]
  ------------------
  134|      4|      timeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
  135|   842k|  }
  136|       |
  137|   842k|  if(!ctimeleft_ms)
  ------------------
  |  Branch (137:6): [True: 2.83k, False: 839k]
  ------------------
  138|  2.83k|    return timeleft_ms;
  139|   839k|  else if(!timeleft_ms)
  ------------------
  |  Branch (139:11): [True: 0, False: 839k]
  ------------------
  140|      0|    return ctimeleft_ms;
  141|   839k|  return CURLMIN(ctimeleft_ms, timeleft_ms);
  ------------------
  |  | 1287|   839k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 12.9k, False: 826k]
  |  |  ------------------
  ------------------
  142|   842k|}
Curl_timeleft_ms:
  145|   842k|{
  146|   842k|  return timeleft_now_ms(data, Curl_pgrs_now(data));
  147|   842k|}
Curl_shutdown_start:
  151|    450|{
  152|    450|  struct connectdata *conn = data->conn;
  153|       |
  154|    450|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|    450|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (154:3): [True: 0, False: 450]
  |  Branch (154:3): [True: 450, False: 0]
  ------------------
  155|    450|  conn->shutdown.start[sockindex] = *Curl_pgrs_now(data);
  156|    450|  conn->shutdown.timeout_ms = (timeout_ms > 0) ?
  ------------------
  |  Branch (156:31): [True: 0, False: 450]
  ------------------
  157|      0|    (timediff_t)timeout_ms :
  158|    450|    ((data->set.shutdowntimeout > 0) ?
  ------------------
  |  Branch (158:6): [True: 0, False: 450]
  ------------------
  159|    450|     data->set.shutdowntimeout : DEFAULT_SHUTDOWN_TIMEOUT_MS);
  ------------------
  |  |   45|    450|#define DEFAULT_SHUTDOWN_TIMEOUT_MS   (2 * 1000)
  ------------------
  160|       |  /* Set a timer, unless we operate on the admin handle */
  161|    450|  if(data->mid)
  ------------------
  |  Branch (161:6): [True: 0, False: 450]
  ------------------
  162|      0|    Curl_expire_ex(data, conn->shutdown.timeout_ms, EXPIRE_SHUTDOWN);
  163|    450|  CURL_TRC_M(data, "shutdown start on%s connection",
  ------------------
  |  |  148|    450|  do {                                   \
  |  |  149|    450|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    450|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    450|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    900|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 450, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 450]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    900|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    450|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    450|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|    450|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 450]
  |  |  ------------------
  ------------------
  164|    450|             sockindex ? " secondary" : "");
  165|    450|}
Curl_shutdown_timeleft:
  170|    936|{
  171|    936|  timediff_t left_ms;
  172|       |
  173|    936|  if(!conn->shutdown.start[sockindex].tv_sec ||
  ------------------
  |  Branch (173:6): [True: 0, False: 936]
  ------------------
  174|    936|     (conn->shutdown.timeout_ms <= 0))
  ------------------
  |  Branch (174:6): [True: 0, False: 936]
  ------------------
  175|      0|    return 0; /* not started or no limits */
  176|       |
  177|    936|  left_ms = conn->shutdown.timeout_ms -
  178|    936|            curlx_ptimediff_ms(Curl_pgrs_now(data),
  179|    936|                               &conn->shutdown.start[sockindex]);
  180|    936|  return left_ms ? left_ms : -1;
  ------------------
  |  Branch (180:10): [True: 936, False: 0]
  ------------------
  181|    936|}
Curl_shutdown_clear:
  200|  12.1k|{
  201|  12.1k|  struct curltime *pt = &data->conn->shutdown.start[sockindex];
  202|  12.1k|  memset(pt, 0, sizeof(*pt));
  203|  12.1k|}
Curl_shutdown_started:
  206|   845k|{
  207|   845k|  if(data->conn) {
  ------------------
  |  Branch (207:6): [True: 836k, False: 8.92k]
  ------------------
  208|   836k|    struct curltime *pt = &data->conn->shutdown.start[sockindex];
  209|   836k|    return (pt->tv_sec > 0) || (pt->tv_usec > 0);
  ------------------
  |  Branch (209:12): [True: 936, False: 835k]
  |  Branch (209:32): [True: 0, False: 835k]
  ------------------
  210|   836k|  }
  211|  8.92k|  return FALSE;
  ------------------
  |  | 1058|  8.92k|#define FALSE false
  ------------------
  212|   845k|}
Curl_addr2string:
  218|  12.1k|{
  219|  12.1k|  struct sockaddr_in *si = NULL;
  220|  12.1k|#ifdef USE_IPV6
  221|  12.1k|  struct sockaddr_in6 *si6 = NULL;
  222|  12.1k|#endif
  223|  12.1k|#ifdef USE_UNIX_SOCKETS
  224|  12.1k|  struct sockaddr_un *su = NULL;
  225|       |#else
  226|       |  (void)salen;
  227|       |#endif
  228|       |
  229|  12.1k|  switch(sa->sa_family) {
  230|  5.38k|  case AF_INET:
  ------------------
  |  Branch (230:3): [True: 5.38k, False: 6.71k]
  ------------------
  231|  5.38k|    si = (struct sockaddr_in *)(void *)sa;
  232|  5.38k|    if(curlx_inet_ntop(sa->sa_family, &si->sin_addr, addr, MAX_IPADR_LEN)) {
  ------------------
  |  |   44|  5.38k|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  |  |  ------------------
  |  |  |  Branch (44:3): [True: 5.38k, False: 0]
  |  |  ------------------
  ------------------
  233|  5.38k|      *port = ntohs(si->sin_port);
  234|  5.38k|      return TRUE;
  ------------------
  |  | 1055|  5.38k|#define TRUE true
  ------------------
  235|  5.38k|    }
  236|      0|    break;
  237|      0|#ifdef USE_IPV6
  238|    150|  case AF_INET6:
  ------------------
  |  Branch (238:3): [True: 150, False: 11.9k]
  ------------------
  239|    150|    si6 = (struct sockaddr_in6 *)(void *)sa;
  240|    150|    if(curlx_inet_ntop(sa->sa_family, &si6->sin6_addr, addr, MAX_IPADR_LEN)) {
  ------------------
  |  |   44|    150|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  |  |  ------------------
  |  |  |  Branch (44:3): [True: 150, False: 0]
  |  |  ------------------
  ------------------
  241|    150|      *port = ntohs(si6->sin6_port);
  242|    150|      return TRUE;
  ------------------
  |  | 1055|    150|#define TRUE true
  ------------------
  243|    150|    }
  244|      0|    break;
  245|      0|#endif
  246|      0|#ifdef USE_UNIX_SOCKETS
  247|  6.56k|  case AF_UNIX:
  ------------------
  |  Branch (247:3): [True: 6.56k, False: 5.53k]
  ------------------
  248|  6.56k|    if(salen > (curl_socklen_t)sizeof(CURL_SA_FAMILY_T)) {
  ------------------
  |  Branch (248:8): [True: 14, False: 6.55k]
  ------------------
  249|     14|      su = (struct sockaddr_un *)sa;
  250|     14|      curl_msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
  ------------------
  |  |   41|     14|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  251|     14|    }
  252|  6.55k|    else
  253|  6.55k|      addr[0] = 0; /* socket with no name */
  254|  6.56k|    *port = 0;
  255|  6.56k|    return TRUE;
  ------------------
  |  | 1055|  6.56k|#define TRUE true
  ------------------
  256|      0|#endif
  257|      0|  default:
  ------------------
  |  Branch (257:3): [True: 0, False: 12.1k]
  ------------------
  258|      0|    break;
  259|  12.1k|  }
  260|       |
  261|      0|  addr[0] = '\0';
  262|      0|  *port = 0;
  263|      0|  errno = SOCKEAFNOSUPPORT;
  ------------------
  |  | 1124|      0|#define SOCKEAFNOSUPPORT  EAFNOSUPPORT
  ------------------
  264|       |  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  265|  12.1k|}
Curl_getconnectinfo:
  275|      6|{
  276|      6|  DEBUGASSERT(data);
  ------------------
  |  | 1081|      6|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (276:3): [True: 0, False: 6]
  |  Branch (276:3): [True: 6, False: 0]
  ------------------
  277|       |
  278|       |  /* this works for an easy handle:
  279|       |   * - that has been used for curl_easy_perform()
  280|       |   * - that is associated with a multi handle, and whose connection
  281|       |   *   was detached with CURLOPT_CONNECT_ONLY
  282|       |   */
  283|      6|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (283:6): [True: 1, False: 5]
  ------------------
  284|      1|    struct connectdata *conn;
  285|       |
  286|      1|    conn = Curl_cpool_get_conn(data, data->state.lastconnect_id);
  287|      1|    if(!conn) {
  ------------------
  |  Branch (287:8): [True: 0, False: 1]
  ------------------
  288|      0|      data->state.lastconnect_id = -1;
  289|      0|      return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  290|      0|    }
  291|       |
  292|      1|    if(connp)
  ------------------
  |  Branch (292:8): [True: 1, False: 0]
  ------------------
  293|       |      /* only store this if the caller cares for it */
  294|      1|      *connp = conn;
  295|      1|    return conn->sock[FIRSTSOCKET];
  ------------------
  |  |  303|      1|#define FIRSTSOCKET     0
  ------------------
  296|      1|  }
  297|      5|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      5|#define CURL_SOCKET_BAD (-1)
  ------------------
  298|      6|}
Curl_conncontrol:
  309|  6.65k|{
  310|       |  /* close if a connection, or a stream that is not multiplexed. */
  311|       |  /* This function will be called both before and after this connection is
  312|       |     associated with a transfer. */
  313|  6.65k|  bool closeit, is_multiplex;
  314|  6.65k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  6.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (314:3): [True: 0, False: 6.65k]
  |  Branch (314:3): [True: 6.65k, False: 0]
  ------------------
  315|  6.65k|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  316|  6.65k|  (void)reason; /* useful for debugging */
  317|  6.65k|#endif
  318|  6.65k|  is_multiplex = Curl_conn_is_multiplex(conn, FIRSTSOCKET);
  ------------------
  |  |  303|  6.65k|#define FIRSTSOCKET     0
  ------------------
  319|  6.65k|  closeit = (ctrl == CONNCTRL_CONNECTION) ||
  ------------------
  |  |   91|  6.65k|#define CONNCTRL_CONNECTION 1
  ------------------
  |  Branch (319:13): [True: 6.58k, False: 61]
  ------------------
  320|     61|            ((ctrl == CONNCTRL_STREAM) && !is_multiplex);
  ------------------
  |  |   92|     61|#define CONNCTRL_STREAM     2
  ------------------
  |  Branch (320:14): [True: 61, False: 0]
  |  Branch (320:43): [True: 61, False: 0]
  ------------------
  321|  6.65k|  if((ctrl == CONNCTRL_STREAM) && is_multiplex)
  ------------------
  |  |   92|  6.65k|#define CONNCTRL_STREAM     2
  ------------------
  |  Branch (321:6): [True: 61, False: 6.58k]
  |  Branch (321:35): [True: 0, False: 61]
  ------------------
  322|      0|    ;  /* stream signal on multiplex conn never affects close state */
  323|  6.65k|  else if((curl_bit)closeit != conn->bits.close) {
  ------------------
  |  Branch (323:11): [True: 5.69k, False: 955]
  ------------------
  324|  5.69k|    conn->bits.close = closeit; /* the only place in the source code that
  325|       |                                   should assign this bit */
  326|  5.69k|  }
  327|  6.65k|}
Curl_cf_setup_insert_after:
  615|    126|{
  616|    126|  struct Curl_cfilter *cf;
  617|    126|  CURLcode result;
  618|       |
  619|    126|  DEBUGASSERT(data);
  ------------------
  |  | 1081|    126|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (619:3): [True: 0, False: 126]
  |  Branch (619:3): [True: 126, False: 0]
  ------------------
  620|    126|  result = cf_setup_create(&cf, data, transport, ssl_mode);
  621|    126|  if(result)
  ------------------
  |  Branch (621:6): [True: 0, False: 126]
  ------------------
  622|      0|    goto out;
  623|    126|  Curl_conn_cf_insert_after(cf_at, cf);
  624|    126|out:
  625|    126|  return result;
  626|    126|}
Curl_conn_setup:
  632|  6.06k|{
  633|  6.06k|  CURLcode result = CURLE_OK;
  634|  6.06k|  struct Curl_peer *peer = Curl_conn_get_first_peer(conn, sockindex);
  635|  6.06k|  uint8_t dns_queries;
  636|       |
  637|  6.06k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (637:3): [True: 0, False: 6.06k]
  |  Branch (637:3): [True: 6.06k, False: 0]
  ------------------
  638|  6.06k|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (638:3): [True: 0, False: 6.06k]
  |  Branch (638:3): [True: 6.06k, False: 0]
  ------------------
  639|  6.06k|  DEBUGASSERT(!conn->cfilter[sockindex]);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (639:3): [True: 0, False: 6.06k]
  |  Branch (639:3): [True: 6.06k, False: 0]
  ------------------
  640|       |
  641|  6.06k|  if(!peer)
  ------------------
  |  Branch (641:6): [True: 0, False: 6.06k]
  ------------------
  642|      0|    return CURLE_FAILED_INIT;
  643|       |
  644|  6.06k|#ifndef CURL_DISABLE_HTTP
  645|  6.06k|  if(!conn->cfilter[sockindex] &&
  ------------------
  |  Branch (645:6): [True: 6.06k, False: 0]
  ------------------
  646|  6.06k|     conn->scheme->protocol == CURLPROTO_HTTPS) {
  ------------------
  |  | 1079|  6.06k|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (646:6): [True: 351, False: 5.71k]
  ------------------
  647|    351|    DEBUGASSERT(ssl_mode != CURL_CF_SSL_DISABLE);
  ------------------
  |  | 1081|    351|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (647:5): [True: 0, False: 351]
  |  Branch (647:5): [True: 351, False: 0]
  ------------------
  648|    351|    result = Curl_cf_https_setup(data, conn, sockindex);
  649|    351|    if(result)
  ------------------
  |  Branch (649:8): [True: 0, False: 351]
  ------------------
  650|      0|      goto out;
  651|    351|  }
  652|  6.06k|#endif /* !CURL_DISABLE_HTTP */
  653|       |
  654|       |  /* Still no cfilter set, apply default. */
  655|  6.06k|  if(!conn->cfilter[sockindex]) {
  ------------------
  |  Branch (655:6): [True: 5.71k, False: 351]
  ------------------
  656|  5.71k|    result = cf_setup_add(data, conn, sockindex,
  657|  5.71k|                          conn->transport_wanted, ssl_mode);
  658|  5.71k|    if(result)
  ------------------
  |  Branch (658:8): [True: 0, False: 5.71k]
  ------------------
  659|      0|      goto out;
  660|  5.71k|  }
  661|       |
  662|  6.06k|  dns_queries = Curl_resolv_dns_queries(data, conn->ip_version);
  663|       |#ifdef USE_HTTPSRR
  664|       |  if(sockindex == FIRSTSOCKET)
  665|       |    dns_queries |= CURL_DNSQ_HTTPS;
  666|       |#endif
  667|  6.06k|  result = Curl_cf_dns_add(data, conn, sockindex, peer, dns_queries,
  668|  6.06k|                           conn->transport_wanted);
  669|  6.06k|  DEBUGASSERT(conn->cfilter[sockindex]);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (669:3): [True: 0, False: 6.06k]
  |  Branch (669:3): [True: 6.06k, False: 0]
  ------------------
  670|  6.06k|out:
  671|  6.06k|  return result;
  672|  6.06k|}
Curl_conn_get_destination:
  686|  7.55k|{
  687|  7.55k|#ifndef CURL_DISABLE_PROXY
  688|  7.55k|  if(conn->http_proxy.peer && !conn->bits.tunnel_proxy)
  ------------------
  |  Branch (688:6): [True: 2.56k, False: 4.99k]
  |  Branch (688:31): [True: 0, False: 2.56k]
  ------------------
  689|      0|    return conn->http_proxy.peer;
  690|  7.55k|#endif
  691|  7.55k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  304|  7.55k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (691:10): [True: 0, False: 7.55k]
  ------------------
  692|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (692:6): [True: 0, False: 0]
  ------------------
  693|  7.55k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (693:6): [True: 7.00k, False: 558]
  ------------------
  694|  7.55k|}
Curl_conn_get_first_peer:
  698|   309k|{
  699|   309k|#ifndef CURL_DISABLE_PROXY
  700|   309k|  if(conn->socks_proxy.peer)
  ------------------
  |  Branch (700:6): [True: 198k, False: 111k]
  ------------------
  701|   198k|    return conn->socks_proxy.peer;
  702|   111k|  if(conn->http_proxy.peer)
  ------------------
  |  Branch (702:6): [True: 4.09k, False: 107k]
  ------------------
  703|  4.09k|    return conn->http_proxy.peer;
  704|   107k|#endif
  705|   107k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  304|   107k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (705:10): [True: 0, False: 107k]
  ------------------
  706|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (706:6): [True: 0, False: 0]
  ------------------
  707|   107k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (707:6): [True: 11.9k, False: 95.7k]
  ------------------
  708|   111k|}
connect.c:cf_setup_destroy:
  536|  5.84k|{
  537|  5.84k|  struct cf_setup_ctx *ctx = cf->ctx;
  538|       |
  539|  5.84k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  5.84k|  do {                                          \
  |  |  154|  5.84k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.84k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  11.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.84k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.84k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  11.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.84k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.84k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.84k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.84k]
  |  |  ------------------
  ------------------
  540|       |  curlx_safefree(ctx);
  ------------------
  |  | 1327|  5.84k|  do {                      \
  |  | 1328|  5.84k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  5.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  5.84k|    (ptr) = NULL;           \
  |  | 1330|  5.84k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 5.84k]
  |  |  ------------------
  ------------------
  541|  5.84k|}
connect.c:cf_setup_connect:
  348|   297k|{
  349|   297k|  struct cf_setup_ctx *ctx = cf->ctx;
  350|   297k|  CURLcode result = CURLE_OK;
  351|   297k|  struct Curl_peer *first_peer =
  352|   297k|    Curl_conn_get_first_peer(cf->conn, cf->sockindex);
  353|       |
  354|   297k|  if(cf->connected) {
  ------------------
  |  Branch (354:6): [True: 0, False: 297k]
  ------------------
  355|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  356|      0|    return CURLE_OK;
  357|      0|  }
  358|       |
  359|       |  /* connect current sub-chain */
  360|   306k|connect_sub_chain:
  361|   306k|  VERBOSE(Curl_conn_trc_filters(data, cf->sockindex, "cf_setup_connect"));
  ------------------
  |  | 1618|   306k|#define VERBOSE(x) x
  ------------------
  362|       |
  363|   306k|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (363:6): [True: 301k, False: 5.46k]
  |  Branch (363:18): [True: 301k, False: 0]
  ------------------
  364|   301k|    result = Curl_conn_cf_connect(cf->next, data, done);
  365|   301k|    if(result || !*done)
  ------------------
  |  Branch (365:8): [True: 3.97k, False: 297k]
  |  Branch (365:18): [True: 292k, False: 5.23k]
  ------------------
  366|   296k|      return result;
  367|   301k|  }
  368|       |
  369|  10.6k|  if(ctx->state < CF_SETUP_CNNCT_EYEBALLS) {
  ------------------
  |  Branch (369:6): [True: 5.46k, False: 5.23k]
  ------------------
  370|       |    /* What type of thing we do connect to first?
  371|       |     * - without a proxy, `ctx->transport` defines it
  372|       |     * - with non-tunneling proxy, `ctx->transport` also applies, but
  373|       |     *   for QUIC we need the cf-h3-proxy, not the standard vquic one
  374|       |     * - with tunneling proxy, transport is defined by the proxytype
  375|       |     *   chosen and `ctx->transport` is tunneled through it.
  376|       |     */
  377|  5.46k|    uint8_t transport_out = ctx->transport;
  378|  5.46k|    bool tunnel_proxy = FALSE;
  ------------------
  |  | 1058|  5.46k|#define FALSE false
  ------------------
  379|  5.46k|#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
  380|  5.46k|    CURL_TRC_CF(data, cf, "happy eyeballing, httpproxy=%d, type=%d, "
  ------------------
  |  |  153|  5.46k|  do {                                          \
  |  |  154|  5.46k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.46k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.46k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.46k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.46k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.46k]
  |  |  ------------------
  ------------------
  381|  5.46k|                "transport=%d",
  382|  5.46k|                cf->conn->bits.httpproxy, cf->conn->http_proxy.proxytype,
  383|  5.46k|                ctx->transport);
  384|  5.46k|    if(cf->conn->bits.httpproxy && cf->conn->bits.tunnel_proxy) {
  ------------------
  |  Branch (384:8): [True: 1.29k, False: 4.17k]
  |  Branch (384:36): [True: 1.29k, False: 0]
  ------------------
  385|  1.29k|      transport_out =
  386|  1.29k|        Curl_http_proxy_transport(cf->conn->http_proxy.proxytype);
  387|  1.29k|      tunnel_proxy = TRUE;
  ------------------
  |  | 1055|  1.29k|#define TRUE true
  ------------------
  388|  1.29k|      if((transport_out == TRNSPRT_QUIC) && (cf->conn->bits.socksproxy)) {
  ------------------
  |  |  309|  1.29k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (388:10): [True: 0, False: 1.29k]
  |  Branch (388:45): [True: 0, False: 0]
  ------------------
  389|      0|        failf(data, "HTTP/3 proxy not possible via SOCKS");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  390|      0|        return CURLE_UNSUPPORTED_PROTOCOL;
  391|      0|      }
  392|  1.29k|    }
  393|  5.46k|#endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */
  394|       |
  395|  5.46k|    result = cf_ip_happy_insert_after(cf, data, first_peer,
  396|  5.46k|                                      ctx->transport, transport_out,
  397|  5.46k|                                      tunnel_proxy);
  398|  5.46k|    if(result)
  ------------------
  |  Branch (398:8): [True: 0, False: 5.46k]
  ------------------
  399|      0|      return result;
  400|  5.46k|    ctx->state = (tunnel_proxy && (transport_out == TRNSPRT_QUIC)) ?
  ------------------
  |  |  309|  1.29k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (400:19): [True: 1.29k, False: 4.17k]
  |  Branch (400:35): [True: 0, False: 1.29k]
  ------------------
  401|  5.46k|      CF_SETUP_CNNCT_HTTP_PROXY : CF_SETUP_CNNCT_EYEBALLS;
  402|  5.46k|    if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (402:8): [True: 0, False: 5.46k]
  |  Branch (402:21): [True: 5.46k, False: 0]
  ------------------
  403|  5.46k|      goto connect_sub_chain;
  404|  5.46k|  }
  405|       |
  406|       |  /* sub-chain connected, do we need to add more? */
  407|  5.23k|#ifndef CURL_DISABLE_PROXY
  408|  5.23k|  if(ctx->state < CF_SETUP_CNNCT_SOCKS && cf->conn->bits.socksproxy) {
  ------------------
  |  Branch (408:6): [True: 5.18k, False: 44]
  |  Branch (408:43): [True: 130, False: 5.05k]
  ------------------
  409|    130|    struct Curl_peer *dest; /* where SOCKS should tunnel to */
  410|       |
  411|    130|    if(cf->conn->bits.httpproxy)
  ------------------
  |  Branch (411:8): [True: 58, False: 72]
  ------------------
  412|     58|      dest = cf->conn->http_proxy.peer;
  413|     72|    else
  414|     72|      dest = Curl_conn_get_destination(cf->conn, cf->sockindex);
  415|    130|    if(!dest)
  ------------------
  |  Branch (415:8): [True: 0, False: 130]
  ------------------
  416|      0|      return CURLE_FAILED_INIT;
  417|       |
  418|    130|    result = Curl_cf_socks_proxy_insert_after(
  419|    130|      cf, data, dest, cf->conn->ip_version,
  420|    130|      cf->conn->socks_proxy.proxytype,
  421|    130|      cf->conn->socks_proxy.creds);
  422|       |
  423|    130|    if(result) {
  ------------------
  |  Branch (423:8): [True: 0, False: 130]
  ------------------
  424|       |      /* 'dest' might be freed now so it can't be dereferenced */
  425|      0|      CURL_TRC_CF(data, cf, "added SOCKS filter failed -> %d", result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  426|      0|      return result;
  427|      0|    }
  428|    130|    CURL_TRC_CF(data, cf, "added SOCKS filter to %s:%u -> %d",
  ------------------
  |  |  153|    130|  do {                                          \
  |  |  154|    130|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    130|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    260|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 130, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 130]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    260|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    130|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    130|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    130|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 130]
  |  |  ------------------
  ------------------
  429|    130|                dest->hostname, dest->port, result);
  430|    130|    ctx->state = CF_SETUP_CNNCT_SOCKS;
  431|    130|    if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (431:8): [True: 0, False: 130]
  |  Branch (431:21): [True: 130, False: 0]
  ------------------
  432|    130|      goto connect_sub_chain;
  433|    130|  }
  434|       |
  435|  5.10k|  if(ctx->state < CF_SETUP_CNNCT_HTTP_PROXY && cf->conn->bits.httpproxy) {
  ------------------
  |  Branch (435:6): [True: 5.06k, False: 32]
  |  Branch (435:48): [True: 1.21k, False: 3.84k]
  ------------------
  436|  1.21k|#ifdef USE_SSL
  437|  1.21k|    if(IS_HTTPS_PROXY(cf->conn->http_proxy.proxytype) &&
  ------------------
  |  |   80|  2.43k|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  794|  1.21k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (80:4): [True: 139, False: 1.08k]
  |  |  ------------------
  |  |   81|  1.21k|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  796|  1.08k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (81:4): [True: 159, False: 921]
  |  |  ------------------
  |  |   82|  2.43k|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  805|    921|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 0, False: 921]
  |  |  ------------------
  ------------------
  438|    298|       !Curl_conn_is_ssl(cf->conn, cf->sockindex)) {
  ------------------
  |  Branch (438:8): [True: 298, False: 0]
  ------------------
  439|    298|      result = Curl_cf_ssl_proxy_insert_after(cf, data);
  440|    298|      if(result)
  ------------------
  |  Branch (440:10): [True: 0, False: 298]
  ------------------
  441|      0|        return result;
  442|    298|    }
  443|  1.21k|#endif /* USE_SSL */
  444|       |
  445|  1.21k|#ifndef CURL_DISABLE_HTTP
  446|  1.21k|    if(cf->conn->bits.tunnel_proxy) {
  ------------------
  |  Branch (446:8): [True: 1.21k, False: 0]
  ------------------
  447|  1.21k|      struct Curl_peer *dest; /* where HTTP should tunnel to */
  448|  1.21k|      dest = Curl_conn_get_destination(cf->conn, cf->sockindex);
  449|  1.21k|      result = Curl_cf_http_proxy_insert_after(
  450|  1.21k|        cf, data, dest, ctx->transport, cf->conn->http_proxy.proxytype);
  451|  1.21k|      if(result)
  ------------------
  |  Branch (451:10): [True: 0, False: 1.21k]
  ------------------
  452|      0|        return result;
  453|  1.21k|    }
  454|  1.21k|#endif /* !CURL_DISABLE_HTTP */
  455|  1.21k|    ctx->state = CF_SETUP_CNNCT_HTTP_PROXY;
  456|  1.21k|    if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (456:8): [True: 0, False: 1.21k]
  |  Branch (456:21): [True: 1.21k, False: 0]
  ------------------
  457|  1.21k|      goto connect_sub_chain;
  458|  1.21k|  }
  459|  3.88k|#endif /* !CURL_DISABLE_PROXY */
  460|       |
  461|  3.88k|  if(ctx->state < CF_SETUP_CNNCT_HAPROXY) {
  ------------------
  |  Branch (461:6): [True: 3.86k, False: 17]
  ------------------
  462|  3.86k|#ifndef CURL_DISABLE_PROXY
  463|  3.86k|    if(data->set.haproxyprotocol) {
  ------------------
  |  Branch (463:8): [True: 18, False: 3.84k]
  ------------------
  464|     18|      if(ctx->transport == TRNSPRT_QUIC) {
  ------------------
  |  |  309|     18|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (464:10): [True: 0, False: 18]
  ------------------
  465|      0|        failf(data, "haproxy protocol not support QUIC");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  466|      0|        return CURLE_UNSUPPORTED_PROTOCOL;
  467|      0|      }
  468|     18|      result = Curl_cf_haproxy_insert_after(cf, data);
  469|     18|      if(result)
  ------------------
  |  Branch (469:10): [True: 0, False: 18]
  ------------------
  470|      0|        return result;
  471|     18|    }
  472|  3.86k|#endif /* !CURL_DISABLE_PROXY */
  473|  3.86k|    ctx->state = CF_SETUP_CNNCT_HAPROXY;
  474|  3.86k|    if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (474:8): [True: 0, False: 3.86k]
  |  Branch (474:21): [True: 18, False: 3.84k]
  ------------------
  475|     18|      goto connect_sub_chain;
  476|  3.86k|  }
  477|       |
  478|       |  /* Adding Curl_cf_quic_insert_after() because now we
  479|       |     need the next filter to be QUIC/HTTP/3 (which has SSL) */
  480|       |#if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3) && \
  481|       |  defined(USE_PROXY_HTTP3)
  482|       |  if(ctx->transport == TRNSPRT_QUIC && cf->conn->bits.httpproxy &&
  483|       |     cf->conn->bits.tunnel_proxy &&
  484|       |     (data->state.http_neg.wanted == CURL_HTTP_V3x)) {
  485|       |    if(ctx->state < CF_SETUP_CNNCT_SSL) {
  486|       |      result = Curl_cf_quic_insert_after(cf);
  487|       |      if(result)
  488|       |        return result;
  489|       |      ctx->state = CF_SETUP_CNNCT_SSL;
  490|       |    }
  491|       |    if(!cf->next || !cf->next->connected)
  492|       |      goto connect_sub_chain;
  493|       |  }
  494|       |  else
  495|       |#endif /* !CURL_DISABLE_HTTP && USE_HTTP3 && USE_PROXY_HTTP3 */
  496|  3.86k|  {
  497|  3.86k|    if(ctx->state < CF_SETUP_CNNCT_SSL) {
  ------------------
  |  Branch (497:8): [True: 3.86k, False: 0]
  ------------------
  498|  3.86k|#ifdef USE_SSL
  499|  3.86k|      if((ctx->ssl_mode == CURL_CF_SSL_ENABLE ||
  ------------------
  |  |  365|  7.72k|#define CURL_CF_SSL_ENABLE   1
  ------------------
  |  Branch (499:11): [True: 0, False: 3.86k]
  ------------------
  500|  3.86k|          (ctx->ssl_mode != CURL_CF_SSL_DISABLE &&
  ------------------
  |  |  364|  7.72k|#define CURL_CF_SSL_DISABLE  0
  ------------------
  |  Branch (500:12): [True: 3.86k, False: 0]
  ------------------
  501|  3.86k|           cf->conn->scheme->flags & PROTOPT_SSL)) && /* we want SSL */
  ------------------
  |  |  207|  3.86k|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (501:12): [True: 2.49k, False: 1.36k]
  ------------------
  502|  2.49k|         !Curl_conn_is_ssl(cf->conn, cf->sockindex)) { /* it is missing */
  ------------------
  |  Branch (502:10): [True: 2.49k, False: 0]
  ------------------
  503|  2.49k|        result = Curl_cf_ssl_insert_after(cf, data);
  504|  2.49k|        if(result)
  ------------------
  |  Branch (504:12): [True: 0, False: 2.49k]
  ------------------
  505|      0|          return result;
  506|  2.49k|      }
  507|  3.86k|#endif /* USE_SSL */
  508|  3.86k|      ctx->state = CF_SETUP_CNNCT_SSL;
  509|  3.86k|      if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (509:10): [True: 0, False: 3.86k]
  |  Branch (509:23): [True: 2.49k, False: 1.36k]
  ------------------
  510|  2.49k|        goto connect_sub_chain;
  511|  3.86k|    }
  512|  3.86k|  }
  513|       |
  514|  1.36k|  ctx->state = CF_SETUP_DONE;
  515|  1.36k|  cf->connected = TRUE;
  ------------------
  |  | 1055|  1.36k|#define TRUE true
  ------------------
  516|       |  *done = TRUE;
  ------------------
  |  | 1055|  1.36k|#define TRUE true
  ------------------
  517|  1.36k|  return CURLE_OK;
  518|  3.86k|}
connect.c:cf_setup_close:
  522|  4.47k|{
  523|  4.47k|  struct cf_setup_ctx *ctx = cf->ctx;
  524|       |
  525|  4.47k|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|  4.47k|  do {                                          \
  |  |  154|  4.47k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.47k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  8.95k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.47k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  8.95k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  4.47k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  4.47k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.47k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.47k]
  |  |  ------------------
  ------------------
  526|  4.47k|  cf->connected = FALSE;
  ------------------
  |  | 1058|  4.47k|#define FALSE false
  ------------------
  527|  4.47k|  ctx->state = CF_SETUP_INIT;
  528|       |
  529|  4.47k|  if(cf->next) {
  ------------------
  |  Branch (529:6): [True: 4.10k, False: 374]
  ------------------
  530|  4.10k|    cf->next->cft->do_close(cf->next, data);
  531|  4.10k|    Curl_conn_cf_discard_chain(&cf->next, data);
  532|  4.10k|  }
  533|  4.47k|}
connect.c:cf_setup_create:
  565|  5.84k|{
  566|  5.84k|  struct Curl_cfilter *cf = NULL;
  567|  5.84k|  struct cf_setup_ctx *ctx;
  568|  5.84k|  CURLcode result = CURLE_OK;
  569|       |
  570|  5.84k|  (void)data;
  571|  5.84k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  5.84k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  572|  5.84k|  if(!ctx) {
  ------------------
  |  Branch (572:6): [True: 0, False: 5.84k]
  ------------------
  573|      0|    result = CURLE_OUT_OF_MEMORY;
  574|      0|    goto out;
  575|      0|  }
  576|  5.84k|  ctx->state = CF_SETUP_INIT;
  577|  5.84k|  ctx->ssl_mode = ssl_mode;
  578|  5.84k|  ctx->transport = transport;
  579|       |
  580|  5.84k|  result = Curl_cf_create(&cf, &Curl_cft_setup, ctx);
  581|  5.84k|  if(result)
  ------------------
  |  Branch (581:6): [True: 0, False: 5.84k]
  ------------------
  582|      0|    goto out;
  583|  5.84k|  ctx = NULL;
  584|       |
  585|  5.84k|out:
  586|  5.84k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (586:10): [True: 0, False: 5.84k]
  ------------------
  587|  5.84k|  if(ctx) {
  ------------------
  |  Branch (587:6): [True: 0, False: 5.84k]
  ------------------
  588|      0|    curlx_free(ctx);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  589|      0|  }
  590|  5.84k|  return result;
  591|  5.84k|}
connect.c:cf_setup_add:
  598|  5.71k|{
  599|  5.71k|  struct Curl_cfilter *cf;
  600|  5.71k|  CURLcode result = CURLE_OK;
  601|       |
  602|  5.71k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  5.71k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (602:3): [True: 0, False: 5.71k]
  |  Branch (602:3): [True: 5.71k, False: 0]
  ------------------
  603|  5.71k|  result = cf_setup_create(&cf, data, transport, ssl_mode);
  604|  5.71k|  if(result)
  ------------------
  |  Branch (604:6): [True: 0, False: 5.71k]
  ------------------
  605|      0|    goto out;
  606|  5.71k|  Curl_conn_cf_add(data, conn, sockindex, cf);
  607|  5.71k|out:
  608|  5.71k|  return result;
  609|  5.71k|}

Curl_get_content_encodings:
  641|      7|{
  642|      7|  struct dynbuf enc;
  643|      7|  const struct Curl_cwtype * const *cep;
  644|      7|  CURLcode result = CURLE_OK;
  645|      7|  curlx_dyn_init(&enc, 255);
  646|       |
  647|     35|  for(cep = general_unencoders; *cep && !result; cep++) {
  ------------------
  |  Branch (647:33): [True: 28, False: 7]
  |  Branch (647:41): [True: 28, False: 0]
  ------------------
  648|     28|    const struct Curl_cwtype *ce = *cep;
  649|     28|    if(!curl_strequal(ce->name, CONTENT_ENCODING_DEFAULT)) {
  ------------------
  |  |   54|     28|#define CONTENT_ENCODING_DEFAULT  "identity"
  ------------------
  |  Branch (649:8): [True: 21, False: 7]
  ------------------
  650|     21|      if(curlx_dyn_len(&enc))
  ------------------
  |  Branch (650:10): [True: 14, False: 7]
  ------------------
  651|     14|        result = curlx_dyn_addn(&enc, ", ", 2);
  652|     21|      if(!result)
  ------------------
  |  Branch (652:10): [True: 21, False: 0]
  ------------------
  653|     21|        result = curlx_dyn_add(&enc, ce->name);
  654|     21|    }
  655|     28|  }
  656|      7|  if(!result && !curlx_dyn_len(&enc))
  ------------------
  |  Branch (656:6): [True: 7, False: 0]
  |  Branch (656:17): [True: 0, False: 7]
  ------------------
  657|      0|    result = curlx_dyn_add(&enc, CONTENT_ENCODING_DEFAULT);
  ------------------
  |  |   54|      0|#define CONTENT_ENCODING_DEFAULT  "identity"
  ------------------
  658|       |
  659|      7|  if(!result)
  ------------------
  |  Branch (659:6): [True: 7, False: 0]
  ------------------
  660|      7|    return curlx_dyn_ptr(&enc);
  661|      0|  return NULL;
  662|      7|}

Curl_cookie_add:
  943|  8.18k|{
  944|  8.18k|  struct Cookie comem;
  945|  8.18k|  struct Cookie *co;
  946|  8.18k|  size_t myhash;
  947|  8.18k|  CURLcode result;
  948|  8.18k|  bool replaces = FALSE;
  ------------------
  |  | 1058|  8.18k|#define FALSE false
  ------------------
  949|  8.18k|  bool okay;
  950|       |
  951|  8.18k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  8.18k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (951:3): [True: 0, False: 8.18k]
  |  Branch (951:3): [True: 8.18k, False: 0]
  ------------------
  952|  8.18k|  DEBUGASSERT(MAX_SET_COOKIE_AMOUNT <= 255); /* counter is an unsigned char */
  ------------------
  |  | 1081|  8.18k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (952:3): [True: 0, Folded]
  |  Branch (952:3): [True: 8.18k, Folded]
  ------------------
  953|  8.18k|  if(data->req.setcookies >= MAX_SET_COOKIE_AMOUNT)
  ------------------
  |  |   90|  8.18k|#define MAX_SET_COOKIE_AMOUNT 50
  ------------------
  |  Branch (953:6): [True: 0, False: 8.18k]
  ------------------
  954|      0|    return CURLE_OK; /* silently ignore */
  955|       |
  956|  8.18k|  co = &comem;
  957|  8.18k|  memset(co, 0, sizeof(comem));
  958|       |
  959|  8.18k|  if(httpheader)
  ------------------
  |  Branch (959:6): [True: 1.02k, False: 7.16k]
  ------------------
  960|  1.02k|    result = parse_cookie_header(data, co, ci, &okay,
  961|  1.02k|                                 lineptr, domain, path, secure);
  962|  7.16k|  else
  963|  7.16k|    result = parse_netscape(co, ci, &okay, lineptr, secure);
  964|       |
  965|  8.18k|  if(result || !okay)
  ------------------
  |  Branch (965:6): [True: 0, False: 8.18k]
  |  Branch (965:16): [True: 7.03k, False: 1.15k]
  ------------------
  966|  7.03k|    goto fail;
  967|       |
  968|  1.15k|  if(co->prefix_secure && !co->secure)
  ------------------
  |  Branch (968:6): [True: 4, False: 1.15k]
  |  Branch (968:27): [True: 3, False: 1]
  ------------------
  969|       |    /* The __Secure- prefix only requires that the cookie be set secure */
  970|      3|    goto fail;
  971|       |
  972|  1.15k|  if(co->prefix_host) {
  ------------------
  |  Branch (972:6): [True: 12, False: 1.14k]
  ------------------
  973|       |    /*
  974|       |     * The __Host- prefix requires the cookie to be secure, have a "/" path
  975|       |     * and not have a domain set.
  976|       |     */
  977|     12|    if(co->secure && co->path && !strcmp(co->path, "/") && !co->tailmatch)
  ------------------
  |  Branch (977:8): [True: 4, False: 8]
  |  Branch (977:22): [True: 3, False: 1]
  |  Branch (977:34): [True: 2, False: 1]
  |  Branch (977:60): [True: 1, False: 1]
  ------------------
  978|      1|      ;
  979|     11|    else
  980|     11|      goto fail;
  981|     12|  }
  982|       |
  983|  1.14k|  if(!ci->running &&    /* read from a file */
  ------------------
  |  Branch (983:6): [True: 1.14k, False: 0]
  ------------------
  984|  1.14k|     ci->newsession &&  /* clean session cookies */
  ------------------
  |  Branch (984:6): [True: 0, False: 1.14k]
  ------------------
  985|      0|     !co->expires)      /* this is a session cookie */
  ------------------
  |  Branch (985:6): [True: 0, False: 0]
  ------------------
  986|      0|    goto fail;
  987|       |
  988|  1.14k|  co->livecookie = ci->running;
  989|  1.14k|  co->creationtime = ++ci->lastct;
  990|       |
  991|       |  /*
  992|       |   * Now we have parsed the incoming line, we must now check if this supersedes
  993|       |   * an already existing cookie, which it may if the previous have the same
  994|       |   * domain and path as this.
  995|       |   */
  996|       |
  997|       |  /* remove expired cookies */
  998|  1.14k|  if(!noexpire)
  ------------------
  |  Branch (998:6): [True: 1.14k, False: 0]
  ------------------
  999|  1.14k|    remove_expired(ci);
 1000|       |
 1001|  1.14k|  if(is_public_suffix(data, co, domain))
  ------------------
  |  Branch (1001:6): [True: 0, False: 1.14k]
  ------------------
 1002|      0|    goto fail;
 1003|       |
 1004|  1.14k|  if(!replace_existing(data, co, ci, secure, &replaces))
  ------------------
  |  Branch (1004:6): [True: 0, False: 1.14k]
  ------------------
 1005|      0|    goto fail;
 1006|       |
 1007|       |  /* clone the stack struct into heap */
 1008|  1.14k|  co = curlx_memdup(&comem, sizeof(comem));
 1009|  1.14k|  if(!co) {
  ------------------
  |  Branch (1009:6): [True: 0, False: 1.14k]
  ------------------
 1010|      0|    co = &comem;
 1011|      0|    result = CURLE_OUT_OF_MEMORY;
 1012|      0|    goto fail; /* bail out if we are this low on memory */
 1013|      0|  }
 1014|       |
 1015|       |  /* add this cookie to the list */
 1016|  1.14k|  myhash = cookiehash(co->domain);
 1017|  1.14k|  Curl_llist_append(&ci->cookielist[myhash], co, &co->node);
 1018|       |
 1019|  1.14k|  if(ci->running)
  ------------------
  |  Branch (1019:6): [True: 0, False: 1.14k]
  ------------------
 1020|       |    /* Only show this when NOT reading the cookies from a file */
 1021|      0|    infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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]
  |  |  ------------------
  ------------------
 1022|  1.14k|          "expire %" FMT_OFF_T,
 1023|  1.14k|          replaces ? "Replaced" : "Added", co->name, co->value,
 1024|  1.14k|          co->domain, co->path, co->expires);
 1025|       |
 1026|  1.14k|  if(!replaces)
  ------------------
  |  Branch (1026:6): [True: 1.14k, False: 0]
  ------------------
 1027|  1.14k|    ci->numcookies++; /* one more cookie in the jar */
 1028|       |
 1029|       |  /*
 1030|       |   * Now that we have added a new cookie to the jar, update the expiration
 1031|       |   * tracker in case it is the next one to expire.
 1032|       |   */
 1033|  1.14k|  if(co->expires && (co->expires < ci->next_expiration))
  ------------------
  |  Branch (1033:6): [True: 399, False: 745]
  |  Branch (1033:21): [True: 397, False: 2]
  ------------------
 1034|    397|    ci->next_expiration = co->expires;
 1035|       |
 1036|  1.14k|  if(httpheader)
  ------------------
  |  Branch (1036:6): [True: 966, False: 178]
  ------------------
 1037|    966|    data->req.setcookies++;
 1038|       |
 1039|  1.14k|  return result;
 1040|  7.04k|fail:
 1041|       |  freecookie(co, FALSE);
  ------------------
  |  | 1058|  7.04k|#define FALSE false
  ------------------
 1042|  7.04k|  return result;
 1043|  1.14k|}
Curl_cookie_init:
 1060|  10.1k|{
 1061|  10.1k|  int i;
 1062|  10.1k|  struct CookieInfo *ci = curlx_calloc(1, sizeof(struct CookieInfo));
  ------------------
  |  | 1480|  10.1k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1063|  10.1k|  if(!ci)
  ------------------
  |  Branch (1063:6): [True: 0, False: 10.1k]
  ------------------
 1064|      0|    return NULL;
 1065|       |
 1066|       |  /* This does not use the destructor callback since we want to add
 1067|       |     and remove to lists while keeping the cookie struct intact */
 1068|   649k|  for(i = 0; i < COOKIE_HASH_SIZE; i++)
  ------------------
  |  |   54|   649k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1068:14): [True: 639k, False: 10.1k]
  ------------------
 1069|   639k|    Curl_llist_init(&ci->cookielist[i], NULL);
 1070|       |  /*
 1071|       |   * Initialize the next_expiration time to signal that we do not have enough
 1072|       |   * information yet.
 1073|       |   */
 1074|  10.1k|  ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  594|  10.1k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
 1075|       |
 1076|  10.1k|  return ci;
 1077|  10.1k|}
Curl_cookie_loadfiles:
 1165|  7.50k|{
 1166|  7.50k|  CURLcode result = CURLE_OK;
 1167|  7.50k|  struct curl_slist *list = data->state.cookielist;
 1168|  7.50k|  if(list) {
  ------------------
  |  Branch (1168:6): [True: 6.78k, False: 712]
  ------------------
 1169|  6.78k|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1170|  6.78k|    if(!data->cookies)
  ------------------
  |  Branch (1170:8): [True: 0, False: 6.78k]
  ------------------
 1171|      0|      data->cookies = Curl_cookie_init();
 1172|  6.78k|    if(!data->cookies)
  ------------------
  |  Branch (1172:8): [True: 0, False: 6.78k]
  ------------------
 1173|      0|      result = CURLE_OUT_OF_MEMORY;
 1174|  6.78k|    else {
 1175|  6.78k|      data->state.cookie_engine = TRUE;
  ------------------
  |  | 1055|  6.78k|#define TRUE true
  ------------------
 1176|  13.5k|      while(list) {
  ------------------
  |  Branch (1176:13): [True: 6.78k, False: 6.78k]
  ------------------
 1177|  6.78k|        result = cookie_load(data, list->data, data->cookies,
 1178|  6.78k|                             (bool)data->set.cookiesession);
 1179|  6.78k|        if(result)
  ------------------
  |  Branch (1179:12): [True: 0, False: 6.78k]
  ------------------
 1180|      0|          break;
 1181|  6.78k|        list = list->next;
 1182|  6.78k|      }
 1183|  6.78k|    }
 1184|  6.78k|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1185|  6.78k|  }
 1186|  7.50k|  return result;
 1187|  7.50k|}
Curl_cookie_clearall:
 1369|  10.1k|{
 1370|  10.1k|  if(ci) {
  ------------------
  |  Branch (1370:6): [True: 10.1k, False: 1]
  ------------------
 1371|  10.1k|    unsigned int i;
 1372|   649k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|   649k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1372:16): [True: 639k, False: 10.1k]
  ------------------
 1373|   639k|      struct Curl_llist_node *n;
 1374|   640k|      for(n = Curl_llist_head(&ci->cookielist[i]); n;) {
  ------------------
  |  Branch (1374:52): [True: 1.10k, False: 639k]
  ------------------
 1375|  1.10k|        struct Cookie *c = Curl_node_elem(n);
 1376|  1.10k|        struct Curl_llist_node *e = Curl_node_next(n);
 1377|  1.10k|        Curl_node_remove(n);
 1378|       |        freecookie(c, TRUE);
  ------------------
  |  | 1055|  1.10k|#define TRUE true
  ------------------
 1379|  1.10k|        n = e;
 1380|  1.10k|      }
 1381|   639k|    }
 1382|  10.1k|    ci->numcookies = 0;
 1383|  10.1k|  }
 1384|  10.1k|}
Curl_cookie_clearsess:
 1392|      1|{
 1393|      1|  unsigned int i;
 1394|       |
 1395|      1|  if(!ci)
  ------------------
  |  Branch (1395:6): [True: 1, False: 0]
  ------------------
 1396|      1|    return;
 1397|       |
 1398|      0|  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|      0|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1398:14): [True: 0, False: 0]
  ------------------
 1399|      0|    struct Curl_llist_node *n = Curl_llist_head(&ci->cookielist[i]);
 1400|      0|    struct Curl_llist_node *e = NULL;
 1401|       |
 1402|      0|    for(; n; n = e) {
  ------------------
  |  Branch (1402:11): [True: 0, False: 0]
  ------------------
 1403|      0|      struct Cookie *curr = Curl_node_elem(n);
 1404|      0|      e = Curl_node_next(n); /* in case the node is removed, get it early */
 1405|      0|      if(!curr->expires) {
  ------------------
  |  Branch (1405:10): [True: 0, False: 0]
  ------------------
 1406|      0|        Curl_node_remove(n);
 1407|       |        freecookie(curr, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1408|      0|        ci->numcookies--;
 1409|      0|      }
 1410|      0|    }
 1411|      0|  }
 1412|      0|}
Curl_cookie_cleanup:
 1420|  10.1k|{
 1421|  10.1k|  if(ci) {
  ------------------
  |  Branch (1421:6): [True: 10.1k, False: 0]
  ------------------
 1422|  10.1k|    Curl_cookie_clearall(ci);
 1423|  10.1k|    curlx_free(ci); /* free the base struct as well */
  ------------------
  |  | 1483|  10.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1424|  10.1k|  }
 1425|  10.1k|}
Curl_flush_cookies:
 1613|  22.4k|{
 1614|  22.4k|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1615|       |  /* only save the cookie file if a transfer was started (cookies->running is
 1616|       |     set), as otherwise the cookies were not completely initialized and there
 1617|       |     might be cookie files that were not loaded so saving the file is the
 1618|       |     wrong thing. */
 1619|  22.4k|  if(data->cookies) {
  ------------------
  |  Branch (1619:6): [True: 10.1k, False: 12.3k]
  ------------------
 1620|  10.1k|    if(data->set.str[STRING_COOKIEJAR] && data->cookies->running) {
  ------------------
  |  Branch (1620:8): [True: 10.0k, False: 80]
  |  Branch (1620:43): [True: 6.78k, False: 3.28k]
  ------------------
 1621|       |      /* if we have a destination file for all the cookies to get dumped to */
 1622|  6.78k|      CURLcode result = cookie_output(data, data->cookies,
 1623|  6.78k|                                      data->set.str[STRING_COOKIEJAR]);
 1624|  6.78k|      if(result)
  ------------------
  |  Branch (1624:10): [True: 0, False: 6.78k]
  ------------------
 1625|      0|        infof(data, "WARNING: failed to save cookies in %s: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1626|  6.78k|              data->set.str[STRING_COOKIEJAR], curl_easy_strerror(result));
 1627|  6.78k|    }
 1628|       |
 1629|  10.1k|    if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
  ------------------
  |  Branch (1629:8): [True: 10.1k, False: 0]
  |  Branch (1629:20): [True: 10.1k, False: 0]
  |  Branch (1629:36): [True: 0, False: 0]
  ------------------
 1630|  10.1k|      Curl_cookie_cleanup(data->cookies);
 1631|       |      data->cookies = NULL;
 1632|  10.1k|    }
 1633|  10.1k|  }
 1634|  22.4k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1635|  22.4k|}
Curl_cookie_run:
 1638|  7.49k|{
 1639|  7.49k|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1640|  7.49k|  if(data->cookies)
  ------------------
  |  Branch (1640:6): [True: 6.78k, False: 710]
  ------------------
 1641|  6.78k|    data->cookies->running = TRUE;
  ------------------
  |  | 1055|  6.78k|#define TRUE true
  ------------------
 1642|  7.49k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1643|  7.49k|}
cookie.c:parse_cookie_header:
  429|  1.02k|{
  430|       |  /* This line was read off an HTTP-header */
  431|  1.02k|  time_t now = 0;
  432|  1.02k|  size_t linelength = strlen(ptr);
  433|  1.02k|  CURLcode result = CURLE_OK;
  434|  1.02k|  struct Curl_str cookie[COOKIE_PIECES];
  435|  1.02k|  *okay = FALSE;
  ------------------
  |  | 1058|  1.02k|#define FALSE false
  ------------------
  436|  1.02k|  if(linelength > MAX_COOKIE_LINE)
  ------------------
  |  |   81|  1.02k|#define MAX_COOKIE_LINE 5000
  ------------------
  |  Branch (436:6): [True: 3, False: 1.01k]
  ------------------
  437|       |    /* discard overly long lines at once */
  438|      3|    return CURLE_OK;
  439|       |
  440|       |  /* memset instead of initializer because gcc 4.8.1 is silly */
  441|  1.01k|  memset(cookie, 0, sizeof(cookie));
  442|  20.5k|  do {
  443|  20.5k|    struct Curl_str name;
  444|  20.5k|    struct Curl_str val;
  445|       |
  446|       |    /* we have a <name>=<value> pair or a stand-alone word here */
  447|  20.5k|    if(!curlx_str_cspn(&ptr, &name, ";\t\r\n=")) {
  ------------------
  |  Branch (447:8): [True: 18.9k, False: 1.58k]
  ------------------
  448|  18.9k|      bool sep = FALSE;
  ------------------
  |  | 1058|  18.9k|#define FALSE false
  ------------------
  449|  18.9k|      curlx_str_trimblanks(&name);
  450|       |
  451|  18.9k|      if(!curlx_str_single(&ptr, '=')) {
  ------------------
  |  Branch (451:10): [True: 14.1k, False: 4.88k]
  ------------------
  452|  14.1k|        sep = TRUE; /* a '=' was used */
  ------------------
  |  | 1055|  14.1k|#define TRUE true
  ------------------
  453|  14.1k|        if(!curlx_str_cspn(&ptr, &val, ";\r\n"))
  ------------------
  |  Branch (453:12): [True: 12.4k, False: 1.68k]
  ------------------
  454|  12.4k|          curlx_str_trimblanks(&val);
  455|       |
  456|       |        /* Reject cookies with a TAB inside the value */
  457|  14.1k|        if(curlx_strlen(&val) &&
  ------------------
  |  |   50|  28.2k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 12.4k, False: 1.70k]
  |  |  ------------------
  ------------------
  458|  12.4k|           memchr(curlx_str(&val), '\t', curlx_strlen(&val))) {
  ------------------
  |  |   49|  12.4k|#define curlx_str(x)    ((x)->str)
  ------------------
                         memchr(curlx_str(&val), '\t', curlx_strlen(&val))) {
  ------------------
  |  |   50|  12.4k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (458:12): [True: 6, False: 12.4k]
  ------------------
  459|      6|          infof(data, "cookie contains TAB, dropping");
  ------------------
  |  |  143|      6|  do {                               \
  |  |  144|      6|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      6|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 6, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  320|      6|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      6|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      6|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 6]
  |  |  ------------------
  ------------------
  460|      6|          return CURLE_OK;
  461|      6|        }
  462|  14.1k|      }
  463|  4.88k|      else
  464|  4.88k|        curlx_str_init(&val);
  465|       |
  466|  18.9k|      if(!curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|  18.9k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (466:10): [True: 1.01k, False: 17.9k]
  ------------------
  467|       |        /* The first name/value pair is the actual cookie name */
  468|  1.01k|        if(!sep ||
  ------------------
  |  Branch (468:12): [True: 17, False: 994]
  ------------------
  469|       |           /* Bad name/value pair. */
  470|    994|           invalid_octets(curlx_str(&name), curlx_strlen(&name)) ||
  ------------------
  |  |   49|    994|#define curlx_str(x)    ((x)->str)
  ------------------
                         invalid_octets(curlx_str(&name), curlx_strlen(&name)) ||
  ------------------
  |  |   50|    994|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (470:12): [True: 2, False: 992]
  ------------------
  471|    992|           invalid_octets(curlx_str(&val), curlx_strlen(&val)) ||
  ------------------
  |  |   49|    992|#define curlx_str(x)    ((x)->str)
  ------------------
                         invalid_octets(curlx_str(&val), curlx_strlen(&val)) ||
  ------------------
  |  |   50|    992|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (471:12): [True: 4, False: 988]
  ------------------
  472|    988|           !curlx_strlen(&name)) {
  ------------------
  |  |   50|    988|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (472:12): [True: 2, False: 986]
  ------------------
  473|     25|          infof(data, "invalid octets in name/value, cookie dropped");
  ------------------
  |  |  143|     25|  do {                               \
  |  |  144|     25|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     25|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 25, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 25]
  |  |  |  |  ------------------
  |  |  |  |  320|     25|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     25|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     25|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 25]
  |  |  ------------------
  ------------------
  474|     25|          return CURLE_OK;
  475|     25|        }
  476|       |
  477|       |        /*
  478|       |         * Check for too long individual name or contents, or too long
  479|       |         * combination of name + contents. Chrome and Firefox support 4095 or
  480|       |         * 4096 bytes combo
  481|       |         */
  482|    986|        if(curlx_strlen(&name) >= (MAX_NAME - 1) ||
  ------------------
  |  |   50|    986|#define curlx_strlen(x) ((x)->len)
  ------------------
                      if(curlx_strlen(&name) >= (MAX_NAME - 1) ||
  ------------------
  |  |   85|    986|#define MAX_NAME 4096
  ------------------
  |  Branch (482:12): [True: 1, False: 985]
  ------------------
  483|    985|           curlx_strlen(&val) >= (MAX_NAME - 1) ||
  ------------------
  |  |   50|    985|#define curlx_strlen(x) ((x)->len)
  ------------------
                         curlx_strlen(&val) >= (MAX_NAME - 1) ||
  ------------------
  |  |   85|    985|#define MAX_NAME 4096
  ------------------
  |  Branch (483:12): [True: 3, False: 982]
  ------------------
  484|    982|           ((curlx_strlen(&name) + curlx_strlen(&val)) > MAX_NAME)) {
  ------------------
  |  |   50|    982|#define curlx_strlen(x) ((x)->len)
  ------------------
                         ((curlx_strlen(&name) + curlx_strlen(&val)) > MAX_NAME)) {
  ------------------
  |  |   50|    982|#define curlx_strlen(x) ((x)->len)
  ------------------
                         ((curlx_strlen(&name) + curlx_strlen(&val)) > MAX_NAME)) {
  ------------------
  |  |   85|    982|#define MAX_NAME 4096
  ------------------
  |  Branch (484:12): [True: 1, False: 981]
  ------------------
  485|      5|          infof(data, "oversized cookie dropped, name/val %zu + %zu bytes",
  ------------------
  |  |  143|      5|  do {                               \
  |  |  144|      5|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      5|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 5, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  320|      5|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      5|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  486|      5|                curlx_strlen(&name), curlx_strlen(&val));
  487|      5|          return CURLE_OK;
  488|      5|        }
  489|       |
  490|       |        /* Check if we have a reserved prefix set. */
  491|    981|        if(!strncmp("__Secure-", curlx_str(&name), 9))
  ------------------
  |  |   49|    981|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (491:12): [True: 3, False: 978]
  ------------------
  492|      3|          co->prefix_secure = TRUE;
  ------------------
  |  | 1055|      3|#define TRUE true
  ------------------
  493|    978|        else if(!strncmp("__Host-", curlx_str(&name), 7))
  ------------------
  |  |   49|    978|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (493:17): [True: 8, False: 970]
  ------------------
  494|      8|          co->prefix_host = TRUE;
  ------------------
  |  | 1055|      8|#define TRUE true
  ------------------
  495|       |
  496|    981|        cookie[COOKIE_NAME] = name;
  ------------------
  |  |  365|    981|#define COOKIE_NAME   0
  ------------------
  497|    981|        cookie[COOKIE_VALUE] = val;
  ------------------
  |  |  366|    981|#define COOKIE_VALUE  1
  ------------------
  498|    981|      }
  499|  17.9k|      else if(!sep) {
  ------------------
  |  Branch (499:15): [True: 4.86k, False: 13.1k]
  ------------------
  500|       |        /*
  501|       |         * this is a "<name>" with no content
  502|       |         */
  503|       |
  504|       |        /*
  505|       |         * secure cookies are only allowed to be set when the connection is
  506|       |         * using a secure protocol, or when the cookie is being set by
  507|       |         * reading from file
  508|       |         */
  509|  4.86k|        if(curlx_str_casecompare(&name, "secure")) {
  ------------------
  |  Branch (509:12): [True: 200, False: 4.66k]
  ------------------
  510|    200|          if(secure || !ci->running)
  ------------------
  |  Branch (510:14): [True: 200, False: 0]
  |  Branch (510:24): [True: 0, False: 0]
  ------------------
  511|    200|            co->secure = TRUE;
  ------------------
  |  | 1055|    200|#define TRUE true
  ------------------
  512|      0|          else {
  513|      0|            infof(data, "skipped cookie because not 'secure'");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  514|      0|            return CURLE_OK;
  515|      0|          }
  516|    200|        }
  517|  4.66k|        else if(curlx_str_casecompare(&name, "httponly"))
  ------------------
  |  Branch (517:17): [True: 199, False: 4.46k]
  ------------------
  518|    199|          co->httponly = TRUE;
  ------------------
  |  | 1055|    199|#define TRUE true
  ------------------
  519|  4.86k|      }
  520|  13.1k|      else if(curlx_str_casecompare(&name, "path")) {
  ------------------
  |  Branch (520:15): [True: 246, False: 12.8k]
  ------------------
  521|    246|        cookie[COOKIE_PATH] = val;
  ------------------
  |  |  368|    246|#define COOKIE_PATH   3
  ------------------
  522|    246|      }
  523|  12.8k|      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 (523:15): [True: 0, False: 12.8k]
  ------------------
  524|      0|        bool is_ip;
  525|      0|        const char *v = curlx_str(&val);
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  526|       |        /*
  527|       |         * Now, we make sure that our host is within the given domain, or
  528|       |         * the given domain is not valid and thus cannot be set.
  529|       |         */
  530|       |
  531|      0|        if('.' == *v)
  ------------------
  |  Branch (531:12): [True: 0, False: 0]
  ------------------
  532|      0|          curlx_str_nudge(&val, 1);
  533|       |
  534|      0|#ifndef USE_LIBPSL
  535|       |        /*
  536|       |         * Without PSL we do not know when the incoming cookie is set on a
  537|       |         * TLD or otherwise "protected" suffix. To reduce risk, we require a
  538|       |         * dot OR the exact hostname being "localhost".
  539|       |         */
  540|      0|        if(bad_domain(curlx_str(&val), curlx_strlen(&val)))
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
                      if(bad_domain(curlx_str(&val), curlx_strlen(&val)))
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (540:12): [True: 0, False: 0]
  ------------------
  541|      0|          domain = ":";
  542|      0|#endif
  543|       |
  544|      0|        is_ip = Curl_host_is_ipnum(domain ? domain : curlx_str(&val));
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (544:36): [True: 0, False: 0]
  ------------------
  545|       |
  546|      0|        if(!domain ||
  ------------------
  |  Branch (546:12): [True: 0, False: 0]
  ------------------
  547|      0|           (is_ip &&
  ------------------
  |  Branch (547:13): [True: 0, False: 0]
  ------------------
  548|      0|            !strncmp(curlx_str(&val), domain, curlx_strlen(&val)) &&
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
                          !strncmp(curlx_str(&val), domain, curlx_strlen(&val)) &&
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (548:13): [True: 0, False: 0]
  ------------------
  549|      0|            (curlx_strlen(&val) == strlen(domain))) ||
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (549:13): [True: 0, False: 0]
  ------------------
  550|      0|           (!is_ip && cookie_tailmatch(curlx_str(&val),
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (550:13): [True: 0, False: 0]
  |  Branch (550:23): [True: 0, False: 0]
  ------------------
  551|      0|                                          curlx_strlen(&val), domain))) {
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  552|      0|          cookie[COOKIE_DOMAIN] = val;
  ------------------
  |  |  367|      0|#define COOKIE_DOMAIN 2
  ------------------
  553|      0|          if(!is_ip)
  ------------------
  |  Branch (553:14): [True: 0, False: 0]
  ------------------
  554|      0|            co->tailmatch = TRUE; /* we always do that if the domain name was
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  555|       |                                     given */
  556|      0|        }
  557|      0|        else {
  558|       |          /*
  559|       |           * We did not get a tailmatch and then the attempted set domain is
  560|       |           * not a domain to which the current host belongs. Mark as bad.
  561|       |           */
  562|      0|          infof(data, "skipped cookie with bad tailmatch domain: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  563|      0|                curlx_str(&val));
  564|      0|          return CURLE_OK;
  565|      0|        }
  566|      0|      }
  567|  12.8k|      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 (567:15): [True: 0, False: 12.8k]
  ------------------
  568|       |        /*
  569|       |         * Defined in RFC2109:
  570|       |         *
  571|       |         * Optional. The Max-Age attribute defines the lifetime of the
  572|       |         * cookie, in seconds. The delta-seconds value is a decimal non-
  573|       |         * negative integer. After delta-seconds seconds elapse, the
  574|       |         * client should discard the cookie. A value of zero means the
  575|       |         * cookie should be discarded immediately.
  576|       |         */
  577|      0|        int rc;
  578|      0|        const char *maxage = curlx_str(&val);
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  579|      0|        if(*maxage == '\"')
  ------------------
  |  Branch (579:12): [True: 0, False: 0]
  ------------------
  580|      0|          maxage++;
  581|      0|        rc = curlx_str_number(&maxage, &co->expires, CURL_OFF_T_MAX);
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  582|      0|        if(!now)
  ------------------
  |  Branch (582:12): [True: 0, False: 0]
  ------------------
  583|      0|          now = time(NULL);
  584|      0|        switch(rc) {
  585|      0|        case STRE_OVERFLOW:
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  |  Branch (585:9): [True: 0, False: 0]
  ------------------
  586|       |          /* overflow, used max value */
  587|      0|          co->expires = CURL_OFF_T_MAX;
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  588|      0|          break;
  589|      0|        default:
  ------------------
  |  Branch (589:9): [True: 0, False: 0]
  ------------------
  590|       |          /* negative or otherwise bad, expire */
  591|      0|          co->expires = 1;
  592|      0|          break;
  593|      0|        case STRE_OK:
  ------------------
  |  |   28|      0|#define STRE_OK       0
  ------------------
  |  Branch (593:9): [True: 0, False: 0]
  ------------------
  594|      0|          if(!co->expires)
  ------------------
  |  Branch (594:14): [True: 0, False: 0]
  ------------------
  595|      0|            co->expires = 1; /* expire now */
  596|      0|          else if(CURL_OFF_T_MAX - now < co->expires)
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (596:19): [True: 0, False: 0]
  ------------------
  597|       |            /* would overflow */
  598|      0|            co->expires = CURL_OFF_T_MAX;
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  599|      0|          else
  600|      0|            co->expires += now;
  601|      0|          break;
  602|      0|        }
  603|      0|        cap_expires(now, co);
  604|      0|      }
  605|  12.8k|      else if(curlx_str_casecompare(&name, "expires") && curlx_strlen(&val) &&
  ------------------
  |  |   50|  23.2k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 10.0k, False: 256]
  |  |  ------------------
  ------------------
  |  Branch (605:15): [True: 10.3k, False: 2.50k]
  ------------------
  606|  10.0k|              !co->expires && (curlx_strlen(&val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |   50|  9.67k|#define curlx_strlen(x) ((x)->len)
  ------------------
                            !co->expires && (curlx_strlen(&val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |  363|  9.67k|#define MAX_DATE_LENGTH 80
  ------------------
  |  Branch (606:15): [True: 9.67k, False: 424]
  |  Branch (606:31): [True: 9.61k, False: 62]
  ------------------
  607|       |        /*
  608|       |         * Let max-age have priority.
  609|       |         *
  610|       |         * If the date cannot get parsed for whatever reason, the cookie
  611|       |         * will be treated as a session cookie
  612|       |         */
  613|  9.61k|        char dbuf[MAX_DATE_LENGTH + 1];
  614|  9.61k|        time_t date = 0;
  615|  9.61k|        memcpy(dbuf, curlx_str(&val), curlx_strlen(&val));
  ------------------
  |  |   49|  9.61k|#define curlx_str(x)    ((x)->str)
  ------------------
                      memcpy(dbuf, curlx_str(&val), curlx_strlen(&val));
  ------------------
  |  |   50|  9.61k|#define curlx_strlen(x) ((x)->len)
  ------------------
  616|  9.61k|        dbuf[curlx_strlen(&val)] = 0;
  ------------------
  |  |   50|  9.61k|#define curlx_strlen(x) ((x)->len)
  ------------------
  617|  9.61k|        if(!Curl_getdate_capped(dbuf, &date)) {
  ------------------
  |  Branch (617:12): [True: 232, False: 9.38k]
  ------------------
  618|    232|          if(!date)
  ------------------
  |  Branch (618:14): [True: 1, False: 231]
  ------------------
  619|      1|            date++;
  620|    232|          co->expires = (curl_off_t)date;
  621|    232|        }
  622|  9.38k|        else
  623|  9.38k|          co->expires = 0;
  624|  9.61k|        if(!now)
  ------------------
  |  Branch (624:12): [True: 784, False: 8.82k]
  ------------------
  625|    784|          now = time(NULL);
  626|  9.61k|        cap_expires(now, co);
  627|  9.61k|      }
  628|  18.9k|    }
  629|  20.5k|  } while(!curlx_str_single(&ptr, ';'));
  ------------------
  |  Branch (629:11): [True: 19.5k, False: 981]
  ------------------
  630|       |
  631|    981|  if(curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|    981|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 977, False: 4]
  |  |  ------------------
  ------------------
  632|       |    /* the header was fine, now store the data */
  633|    977|    result = storecookie(co, &cookie[0], path, domain);
  634|    977|    if(!result)
  ------------------
  |  Branch (634:8): [True: 977, False: 0]
  ------------------
  635|    977|      *okay = TRUE;
  ------------------
  |  | 1055|    977|#define TRUE true
  ------------------
  636|    977|  }
  637|    981|  return result;
  638|  1.01k|}
cookie.c:invalid_octets:
  347|  1.98k|{
  348|  1.98k|  const unsigned char *p = (const unsigned char *)ptr;
  349|       |  /* Reject all bytes \x01 - \x1f (*except* \x09, TAB) + \x7f */
  350|  66.6k|  while(len && *p) {
  ------------------
  |  Branch (350:9): [True: 64.6k, False: 1.98k]
  |  Branch (350:16): [True: 64.6k, False: 0]
  ------------------
  351|  64.6k|    if(((*p != 9) && (*p < 0x20)) || (*p == 0x7f))
  ------------------
  |  Branch (351:9): [True: 64.6k, False: 0]
  |  Branch (351:22): [True: 6, False: 64.6k]
  |  Branch (351:38): [True: 0, False: 64.6k]
  ------------------
  352|      6|      return TRUE;
  ------------------
  |  | 1055|      6|#define TRUE true
  ------------------
  353|  64.6k|    p++;
  354|  64.6k|    len--;
  355|  64.6k|  }
  356|  1.98k|  return FALSE;
  ------------------
  |  | 1058|  1.98k|#define FALSE false
  ------------------
  357|  1.98k|}
cookie.c:cap_expires:
   53|  9.61k|{
   54|  9.61k|  if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |  614|    232|#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
                if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |   44|    232|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
  |  Branch (54:6): [True: 232, False: 9.38k]
  |  Branch (54:21): [True: 232, False: 0]
  ------------------
   55|    232|    timediff_t cap = now + COOKIES_MAXAGE;
  ------------------
  |  |   44|    232|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
   56|    232|    if(co->expires > cap) {
  ------------------
  |  Branch (56:8): [True: 71, False: 161]
  ------------------
   57|     71|      cap += 30;
   58|     71|      co->expires = (cap / 60) * 60;
   59|     71|    }
   60|    232|  }
   61|  9.61k|}
cookie.c:storecookie:
  374|    977|{
  375|    977|  CURLcode result;
  376|    977|  result = strstore(&co->name, curlx_str(&cp[COOKIE_NAME]),
  ------------------
  |  |   49|    977|#define curlx_str(x)    ((x)->str)
  ------------------
  377|    977|                    curlx_strlen(&cp[COOKIE_NAME]));
  ------------------
  |  |   50|    977|#define curlx_strlen(x) ((x)->len)
  ------------------
  378|    977|  if(!result)
  ------------------
  |  Branch (378:6): [True: 977, False: 0]
  ------------------
  379|    977|    result = strstore(&co->value, curlx_str(&cp[COOKIE_VALUE]),
  ------------------
  |  |   49|    977|#define curlx_str(x)    ((x)->str)
  ------------------
  380|    977|                      curlx_strlen(&cp[COOKIE_VALUE]));
  ------------------
  |  |   50|    977|#define curlx_strlen(x) ((x)->len)
  ------------------
  381|    977|  if(!result) {
  ------------------
  |  Branch (381:6): [True: 977, False: 0]
  ------------------
  382|    977|    size_t plen = 0;
  383|    977|    if(curlx_strlen(&cp[COOKIE_PATH])) {
  ------------------
  |  |   50|    977|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 30, False: 947]
  |  |  ------------------
  ------------------
  384|     30|      path = curlx_str(&cp[COOKIE_PATH]);
  ------------------
  |  |   49|     30|#define curlx_str(x)    ((x)->str)
  ------------------
  385|     30|      plen = curlx_strlen(&cp[COOKIE_PATH]);
  ------------------
  |  |   50|     30|#define curlx_strlen(x) ((x)->len)
  ------------------
  386|     30|    }
  387|    947|    else if(path) {
  ------------------
  |  Branch (387:13): [True: 0, False: 947]
  ------------------
  388|       |      /* No path was given in the header line, set the default */
  389|      0|      const char *endslash = strrchr(path, '/');
  390|      0|      if(endslash)
  ------------------
  |  Branch (390:10): [True: 0, False: 0]
  ------------------
  391|      0|        plen = endslash - path + 1; /* include end slash */
  392|      0|      else
  393|      0|        plen = strlen(path);
  394|      0|    }
  395|       |
  396|    977|    if(path) {
  ------------------
  |  Branch (396:8): [True: 30, False: 947]
  ------------------
  397|     30|      co->path = sanitize_cookie_path(path, plen);
  398|     30|      if(!co->path)
  ------------------
  |  Branch (398:10): [True: 0, False: 30]
  ------------------
  399|      0|        result = CURLE_OUT_OF_MEMORY;
  400|     30|    }
  401|    977|  }
  402|    977|  if(!result) {
  ------------------
  |  Branch (402:6): [True: 977, False: 0]
  ------------------
  403|    977|    if(curlx_strlen(&cp[COOKIE_DOMAIN]))
  ------------------
  |  |   50|    977|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 0, False: 977]
  |  |  ------------------
  ------------------
  404|      0|      result = strstore(&co->domain, curlx_str(&cp[COOKIE_DOMAIN]),
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  405|      0|                        curlx_strlen(&cp[COOKIE_DOMAIN]));
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  406|    977|    else if(domain) {
  ------------------
  |  Branch (406:13): [True: 0, False: 977]
  ------------------
  407|       |      /* no domain was given in the header line, set the default */
  408|      0|      co->domain = curlx_strdup(domain);
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  409|      0|      if(!co->domain)
  ------------------
  |  Branch (409:10): [True: 0, False: 0]
  ------------------
  410|      0|        result = CURLE_OUT_OF_MEMORY;
  411|      0|    }
  412|    977|  }
  413|    977|  return result;
  414|    977|}
cookie.c:strstore:
  256|  1.95k|{
  257|  1.95k|  DEBUGASSERT(str);
  ------------------
  |  | 1081|  1.95k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (257:3): [True: 0, False: 1.95k]
  |  Branch (257:3): [True: 1.95k, False: 0]
  ------------------
  258|  1.95k|  *str = curlx_memdup0(newstr, len);
  259|  1.95k|  if(!*str)
  ------------------
  |  Branch (259:6): [True: 0, False: 1.95k]
  ------------------
  260|      0|    return CURLE_OUT_OF_MEMORY;
  261|  1.95k|  return CURLE_OK;
  262|  1.95k|}
cookie.c:sanitize_cookie_path:
  227|    111|{
  228|       |  /* some sites send path attribute within '"'. */
  229|    111|  if(len && (cookie_path[0] == '\"')) {
  ------------------
  |  Branch (229:6): [True: 111, False: 0]
  |  Branch (229:13): [True: 32, False: 79]
  ------------------
  230|     32|    cookie_path++;
  231|     32|    len--;
  232|       |
  233|     32|    if(len && (cookie_path[len - 1] == '\"'))
  ------------------
  |  Branch (233:8): [True: 30, False: 2]
  |  Branch (233:15): [True: 2, False: 28]
  ------------------
  234|      2|      len--;
  235|     32|  }
  236|       |
  237|       |  /* RFC6265 5.2.4 The Path Attribute */
  238|    111|  if(!len || (cookie_path[0] != '/'))
  ------------------
  |  Branch (238:6): [True: 4, False: 107]
  |  Branch (238:14): [True: 76, False: 31]
  ------------------
  239|       |    /* Let cookie-path be the default-path. */
  240|     80|    return curlx_strdup("/");
  ------------------
  |  | 1477|     80|#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|     31|  if(len > 1 && cookie_path[len - 1] == '/')
  ------------------
  |  Branch (244:6): [True: 28, False: 3]
  |  Branch (244:17): [True: 10, False: 18]
  ------------------
  245|     10|    len--;
  246|       |
  247|     31|  return curlx_memdup0(cookie_path, len);
  248|    111|}
cookie.c:parse_netscape:
  646|  7.16k|{
  647|       |  /*
  648|       |   * This line is NOT an HTTP header style line, we do offer support for
  649|       |   * reading the odd netscape cookies-file format here
  650|       |   */
  651|  7.16k|  const char *ptr, *next;
  652|  7.16k|  int fields;
  653|  7.16k|  size_t len;
  654|  7.16k|  *okay = FALSE;
  ------------------
  |  | 1058|  7.16k|#define FALSE false
  ------------------
  655|       |
  656|       |  /*
  657|       |   * In 2008, Internet Explorer introduced HTTP-only cookies to prevent XSS
  658|       |   * attacks. Cookies marked httpOnly are not accessible to JavaScript. In
  659|       |   * Firefox's cookie files, they are prefixed #HttpOnly_ and the rest
  660|       |   * remains as usual, so we skip 10 characters of the line.
  661|       |   */
  662|  7.16k|  if(strncmp(lineptr, "#HttpOnly_", 10) == 0) {
  ------------------
  |  Branch (662:6): [True: 1, False: 7.16k]
  ------------------
  663|      1|    lineptr += 10;
  664|      1|    co->httponly = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  665|      1|  }
  666|       |
  667|  7.16k|  if(lineptr[0] == '#')
  ------------------
  |  Branch (667:6): [True: 31, False: 7.13k]
  ------------------
  668|       |    /* do not even try the comments */
  669|     31|    return CURLE_OK;
  670|       |
  671|       |  /*
  672|       |   * Now loop through the fields and init the struct we already have
  673|       |   * allocated
  674|       |   */
  675|  7.13k|  fields = 0;
  676|  15.7k|  for(next = lineptr; next; fields++) {
  ------------------
  |  Branch (676:23): [True: 8.66k, False: 7.10k]
  ------------------
  677|  8.66k|    ptr = next;
  678|  8.66k|    len = strcspn(ptr, "\t\r\n");
  679|  8.66k|    next = (ptr[len] == '\t' ? &ptr[len + 1] : NULL);
  ------------------
  |  Branch (679:13): [True: 1.54k, False: 7.12k]
  ------------------
  680|  8.66k|    switch(fields) {
  ------------------
  |  Branch (680:12): [True: 8.25k, False: 413]
  ------------------
  681|  7.13k|    case 0:
  ------------------
  |  Branch (681:5): [True: 7.13k, False: 1.53k]
  ------------------
  682|  7.13k|      if(ptr[0] == '.') { /* skip preceding dots */
  ------------------
  |  Branch (682:10): [True: 1, False: 7.13k]
  ------------------
  683|      1|        ptr++;
  684|      1|        len--;
  685|      1|      }
  686|  7.13k|      co->domain = curlx_memdup0(ptr, len);
  687|  7.13k|      if(!co->domain)
  ------------------
  |  Branch (687:10): [True: 0, False: 7.13k]
  ------------------
  688|      0|        return CURLE_OUT_OF_MEMORY;
  689|  7.13k|      break;
  690|  7.13k|    case 1:
  ------------------
  |  Branch (690:5): [True: 328, False: 8.34k]
  ------------------
  691|       |      /*
  692|       |       * flag: A TRUE/FALSE value indicating if all machines within a given
  693|       |       * domain can access the variable. Set TRUE when the cookie says
  694|       |       * .example.com and to false when the domain is complete www.example.com
  695|       |       */
  696|    328|      co->tailmatch = !!curl_strnequal(ptr, "TRUE", len);
  697|    328|      break;
  698|    325|    case 2:
  ------------------
  |  Branch (698:5): [True: 325, False: 8.34k]
  ------------------
  699|       |      /* The file format allows the path field to remain not filled in */
  700|    325|      if(strncmp("TRUE", ptr, len) && strncmp("FALSE", ptr, len)) {
  ------------------
  |  Branch (700:10): [True: 83, False: 242]
  |  Branch (700:39): [True: 81, False: 2]
  ------------------
  701|       |        /* only if the path does not look like a boolean option! */
  702|     81|        co->path = sanitize_cookie_path(ptr, len);
  703|     81|        if(!co->path)
  ------------------
  |  Branch (703:12): [True: 0, False: 81]
  ------------------
  704|      0|          return CURLE_OUT_OF_MEMORY;
  705|     81|        break;
  706|     81|      }
  707|    244|      else {
  708|       |        /* this does not look like a path, make one up! */
  709|    244|        co->path = curlx_strdup("/");
  ------------------
  |  | 1477|    244|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  710|    244|        if(!co->path)
  ------------------
  |  Branch (710:12): [True: 0, False: 244]
  ------------------
  711|      0|          return CURLE_OUT_OF_MEMORY;
  712|    244|      }
  713|    244|      fields++; /* add a field and fall down to secure */
  714|    244|      FALLTHROUGH();
  ------------------
  |  |  821|    244|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  715|    253|    case 3:
  ------------------
  |  Branch (715:5): [True: 9, False: 8.65k]
  ------------------
  716|    253|      co->secure = FALSE;
  ------------------
  |  | 1058|    253|#define FALSE false
  ------------------
  717|    253|      if(curl_strnequal(ptr, "TRUE", len)) {
  ------------------
  |  Branch (717:10): [True: 247, False: 6]
  ------------------
  718|    247|        if(secure || ci->running)
  ------------------
  |  Branch (718:12): [True: 247, False: 0]
  |  Branch (718:22): [True: 0, False: 0]
  ------------------
  719|    247|          co->secure = TRUE;
  ------------------
  |  | 1055|    247|#define TRUE true
  ------------------
  720|      0|        else
  721|      0|          return CURLE_OK;
  722|    247|      }
  723|    253|      break;
  724|    253|    case 4:
  ------------------
  |  Branch (724:5): [True: 245, False: 8.42k]
  ------------------
  725|    245|      if(curlx_str_number(&ptr, &co->expires, CURL_OFF_T_MAX))
  ------------------
  |  |  594|    245|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (725:10): [True: 38, False: 207]
  ------------------
  726|     38|        return CURLE_OK;
  727|    207|      break;
  728|    207|    case 5:
  ------------------
  |  Branch (728:5): [True: 194, False: 8.47k]
  ------------------
  729|    194|      co->name = curlx_memdup0(ptr, len);
  730|    194|      if(!co->name)
  ------------------
  |  Branch (730:10): [True: 0, False: 194]
  ------------------
  731|      0|        return CURLE_OUT_OF_MEMORY;
  732|    194|      else {
  733|       |        /* For Netscape file format cookies we check prefix on the name */
  734|    194|        if(curl_strnequal("__Secure-", co->name, 9))
  ------------------
  |  Branch (734:12): [True: 1, False: 193]
  ------------------
  735|      1|          co->prefix_secure = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  736|    193|        else if(curl_strnequal("__Host-", co->name, 7))
  ------------------
  |  Branch (736:17): [True: 4, False: 189]
  ------------------
  737|      4|          co->prefix_host = TRUE;
  ------------------
  |  | 1055|      4|#define TRUE true
  ------------------
  738|    194|      }
  739|    194|      break;
  740|    194|    case 6:
  ------------------
  |  Branch (740:5): [True: 16, False: 8.65k]
  ------------------
  741|     16|      co->value = curlx_memdup0(ptr, len);
  742|     16|      if(!co->value)
  ------------------
  |  Branch (742:10): [True: 0, False: 16]
  ------------------
  743|      0|        return CURLE_OUT_OF_MEMORY;
  744|     16|      break;
  745|  8.66k|    }
  746|  8.66k|  }
  747|  7.10k|  if(fields == 6) {
  ------------------
  |  Branch (747:6): [True: 178, False: 6.92k]
  ------------------
  748|       |    /* we got a cookie with blank contents, fix it */
  749|    178|    co->value = curlx_strdup("");
  ------------------
  |  | 1477|    178|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  750|    178|    if(!co->value)
  ------------------
  |  Branch (750:8): [True: 0, False: 178]
  ------------------
  751|      0|      return CURLE_OUT_OF_MEMORY;
  752|    178|    else
  753|    178|      fields++;
  754|    178|  }
  755|       |
  756|  7.10k|  if(fields != 7)
  ------------------
  |  Branch (756:6): [True: 6.91k, False: 181]
  ------------------
  757|       |    /* we did not find the sufficient number of fields */
  758|  6.91k|    return CURLE_OK;
  759|       |
  760|    181|  *okay = TRUE;
  ------------------
  |  | 1055|    181|#define TRUE true
  ------------------
  761|    181|  return CURLE_OK;
  762|  7.10k|}
cookie.c:remove_expired:
  274|  14.7k|{
  275|  14.7k|  struct Cookie *co;
  276|  14.7k|  curl_off_t now = (curl_off_t)time(NULL);
  277|  14.7k|  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|  14.7k|  if(now < ci->next_expiration &&
  ------------------
  |  Branch (287:6): [True: 14.6k, False: 44]
  ------------------
  288|  14.6k|     ci->next_expiration != CURL_OFF_T_MAX)
  ------------------
  |  |  594|  14.6k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (288:6): [True: 170, False: 14.5k]
  ------------------
  289|    170|    return;
  290|  14.5k|  else
  291|  14.5k|    ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  594|  14.5k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  292|       |
  293|   931k|  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|   931k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (293:14): [True: 916k, False: 14.5k]
  ------------------
  294|   916k|    struct Curl_llist_node *n;
  295|   916k|    struct Curl_llist_node *e = NULL;
  296|       |
  297|   916k|    for(n = Curl_llist_head(&ci->cookielist[i]); n; n = e) {
  ------------------
  |  Branch (297:50): [True: 70, False: 916k]
  ------------------
  298|     70|      co = Curl_node_elem(n);
  299|     70|      e = Curl_node_next(n);
  300|     70|      if(co->expires) {
  ------------------
  |  Branch (300:10): [True: 46, False: 24]
  ------------------
  301|     46|        if(co->expires < now) {
  ------------------
  |  Branch (301:12): [True: 44, False: 2]
  ------------------
  302|     44|          Curl_node_remove(n);
  303|     44|          freecookie(co, TRUE);
  ------------------
  |  | 1055|     44|#define TRUE true
  ------------------
  304|     44|          ci->numcookies--;
  305|     44|        }
  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|     46|      }
  313|     70|    }
  314|   916k|  }
  315|  14.5k|}
cookie.c:is_public_suffix:
  767|  1.14k|{
  768|       |#ifdef USE_LIBPSL
  769|       |  /*
  770|       |   * Check if the domain is a Public Suffix and if yes, ignore the cookie. We
  771|       |   * must also check that the data handle is not NULL since the psl code will
  772|       |   * dereference it.
  773|       |   */
  774|       |  DEBUGF(infof(data, "PSL check set-cookie '%s' for domain=%s in %s",
  775|       |               co->name, co->domain, domain));
  776|       |  if(data && (domain && co->domain && !Curl_host_is_ipnum(co->domain))) {
  777|       |    bool acceptable = FALSE;
  778|       |    char lcase[256];
  779|       |    char lcookie[256];
  780|       |    size_t dlen = strlen(domain);
  781|       |    size_t clen = strlen(co->domain);
  782|       |
  783|       |    /* trim trailing dots */
  784|       |    if(dlen && (domain[dlen - 1] == '.'))
  785|       |      dlen--;
  786|       |    if(clen && (co->domain[clen - 1] == '.'))
  787|       |      clen--;
  788|       |
  789|       |    if((dlen < sizeof(lcase)) && (clen < sizeof(lcookie))) {
  790|       |      const psl_ctx_t *psl = Curl_psl_use(data);
  791|       |      if(psl) {
  792|       |        /* the PSL check requires lowercase domain name and pattern */
  793|       |        Curl_strntolower(lcase, domain, dlen);
  794|       |        lcase[dlen] = 0;
  795|       |        Curl_strntolower(lcookie, co->domain, clen);
  796|       |        lcookie[clen] = 0;
  797|       |        acceptable = psl_is_cookie_domain_acceptable(psl, lcase, lcookie);
  798|       |        Curl_psl_release(data);
  799|       |      }
  800|       |      else
  801|       |        infof(data, "libpsl problem, rejecting cookie for safety");
  802|       |    }
  803|       |
  804|       |    if(!acceptable) {
  805|       |      infof(data, "cookie '%s' dropped, domain '%s' must not "
  806|       |            "set cookies for '%s'", co->name, domain, co->domain);
  807|       |      return TRUE;
  808|       |    }
  809|       |  }
  810|       |#else
  811|  1.14k|  (void)data;
  812|  1.14k|  (void)co;
  813|  1.14k|  (void)domain;
  814|  1.14k|  DEBUGF(infof(data, "NO PSL to check set-cookie '%s' for domain=%s in %s",
  ------------------
  |  | 1067|  8.00k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 1.14k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 1.14k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 1.14k]
  |  |  ------------------
  ------------------
  815|  1.14k|               co->name, co->domain, domain));
  816|  1.14k|#endif
  817|       |  return FALSE;
  ------------------
  |  | 1058|  1.14k|#define FALSE false
  ------------------
  818|  1.14k|}
cookie.c:replace_existing:
  826|  1.14k|{
  827|  1.14k|  bool replace_old = FALSE;
  ------------------
  |  | 1058|  1.14k|#define FALSE false
  ------------------
  828|  1.14k|  struct Curl_llist_node *replace_n = NULL;
  829|  1.14k|  struct Curl_llist_node *n;
  830|  1.14k|  size_t myhash = cookiehash(co->domain);
  831|  1.14k|  for(n = Curl_llist_head(&ci->cookielist[myhash]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (831:53): [True: 0, False: 1.14k]
  ------------------
  832|      0|    struct Cookie *clist = Curl_node_elem(n);
  833|      0|    if(!strcmp(clist->name, co->name)) {
  ------------------
  |  Branch (833:8): [True: 0, False: 0]
  ------------------
  834|       |      /* the names are identical */
  835|      0|      bool matching_domains = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  836|       |
  837|      0|      if(clist->domain && co->domain) {
  ------------------
  |  Branch (837:10): [True: 0, False: 0]
  |  Branch (837:27): [True: 0, False: 0]
  ------------------
  838|      0|        if(curl_strequal(clist->domain, co->domain))
  ------------------
  |  Branch (838:12): [True: 0, False: 0]
  ------------------
  839|       |          /* The domains are identical */
  840|      0|          matching_domains = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  841|      0|      }
  842|      0|      else if(!clist->domain && !co->domain)
  ------------------
  |  Branch (842:15): [True: 0, False: 0]
  |  Branch (842:33): [True: 0, False: 0]
  ------------------
  843|      0|        matching_domains = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  844|       |
  845|      0|      if(matching_domains && /* the domains were identical */
  ------------------
  |  Branch (845:10): [True: 0, False: 0]
  ------------------
  846|      0|         clist->path && co->path && /* both have paths */
  ------------------
  |  Branch (846:10): [True: 0, False: 0]
  |  Branch (846:25): [True: 0, False: 0]
  ------------------
  847|      0|         clist->secure && !co->secure && !secure) {
  ------------------
  |  Branch (847:10): [True: 0, False: 0]
  |  Branch (847:27): [True: 0, False: 0]
  |  Branch (847:42): [True: 0, False: 0]
  ------------------
  848|      0|        size_t cllen;
  849|      0|        const char *sep = NULL;
  850|       |
  851|       |        /*
  852|       |         * A non-secure cookie may not overlay an existing secure cookie.
  853|       |         * For an existing cookie "a" with path "/login", refuse a new
  854|       |         * cookie "a" with for example path "/login/en", while the path
  855|       |         * "/loginhelper" is ok.
  856|       |         */
  857|       |
  858|      0|        DEBUGASSERT(clist->path[0]);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (858:9): [True: 0, False: 0]
  |  Branch (858:9): [True: 0, False: 0]
  ------------------
  859|      0|        if(clist->path[0])
  ------------------
  |  Branch (859:12): [True: 0, False: 0]
  ------------------
  860|      0|          sep = strchr(clist->path + 1, '/');
  861|      0|        if(sep)
  ------------------
  |  Branch (861:12): [True: 0, False: 0]
  ------------------
  862|      0|          cllen = sep - clist->path;
  863|      0|        else
  864|      0|          cllen = strlen(clist->path);
  865|       |
  866|      0|        if(!strncmp(clist->path, co->path, cllen)) {
  ------------------
  |  Branch (866:12): [True: 0, False: 0]
  ------------------
  867|      0|          infof(data, "cookie '%s' for domain '%s' dropped, would "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  868|      0|                "overlay an existing cookie", co->name, co->domain);
  869|      0|          return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  870|      0|        }
  871|      0|      }
  872|      0|    }
  873|       |
  874|      0|    if(!replace_n && !strcmp(clist->name, co->name)) {
  ------------------
  |  Branch (874:8): [True: 0, False: 0]
  |  Branch (874:22): [True: 0, False: 0]
  ------------------
  875|       |      /* the names are identical */
  876|       |
  877|      0|      if(clist->domain && co->domain) {
  ------------------
  |  Branch (877:10): [True: 0, False: 0]
  |  Branch (877:27): [True: 0, False: 0]
  ------------------
  878|      0|        if(curl_strequal(clist->domain, co->domain) &&
  ------------------
  |  Branch (878:12): [True: 0, False: 0]
  ------------------
  879|      0|           (clist->tailmatch == co->tailmatch))
  ------------------
  |  Branch (879:12): [True: 0, False: 0]
  ------------------
  880|       |          /* The domains are identical */
  881|      0|          replace_old = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  882|      0|      }
  883|      0|      else if(!clist->domain && !co->domain)
  ------------------
  |  Branch (883:15): [True: 0, False: 0]
  |  Branch (883:33): [True: 0, False: 0]
  ------------------
  884|      0|        replace_old = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  885|       |
  886|      0|      if(replace_old) {
  ------------------
  |  Branch (886:10): [True: 0, False: 0]
  ------------------
  887|       |        /* the domains were identical */
  888|       |
  889|      0|        if(clist->path && co->path &&
  ------------------
  |  Branch (889:12): [True: 0, False: 0]
  |  Branch (889:27): [True: 0, False: 0]
  ------------------
  890|      0|           strcmp(clist->path, co->path))
  ------------------
  |  Branch (890:12): [True: 0, False: 0]
  ------------------
  891|      0|          replace_old = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  892|      0|        else if(!clist->path != !co->path)
  ------------------
  |  Branch (892:17): [True: 0, False: 0]
  ------------------
  893|      0|          replace_old = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  894|      0|      }
  895|       |
  896|      0|      if(replace_old && !co->livecookie && clist->livecookie) {
  ------------------
  |  Branch (896:10): [True: 0, False: 0]
  |  Branch (896:25): [True: 0, False: 0]
  |  Branch (896:44): [True: 0, False: 0]
  ------------------
  897|       |        /*
  898|       |         * Both cookies matched fine, except that the already present cookie
  899|       |         * is "live", which means it was set from a header, while the new one
  900|       |         * was read from a file and thus is not "live". "live" cookies are
  901|       |         * preferred so the new cookie is freed.
  902|       |         */
  903|      0|        return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  904|      0|      }
  905|      0|      if(replace_old)
  ------------------
  |  Branch (905:10): [True: 0, False: 0]
  ------------------
  906|      0|        replace_n = n;
  907|      0|    }
  908|      0|  }
  909|  1.14k|  if(replace_n) {
  ------------------
  |  Branch (909:6): [True: 0, False: 1.14k]
  ------------------
  910|      0|    struct Cookie *repl = Curl_node_elem(replace_n);
  911|       |
  912|       |    /* when replacing, creationtime is kept from old */
  913|      0|    co->creationtime = repl->creationtime;
  914|       |
  915|       |    /* unlink the old */
  916|      0|    Curl_node_remove(replace_n);
  917|       |
  918|       |    /* free the old cookie */
  919|      0|    freecookie(repl, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  920|      0|  }
  921|  1.14k|  *replacep = replace_old;
  922|       |  return TRUE;
  ------------------
  |  | 1055|  1.14k|#define TRUE true
  ------------------
  923|  1.14k|}
cookie.c:cookiehash:
  212|  2.28k|{
  213|  2.28k|  const char *top;
  214|  2.28k|  size_t len;
  215|       |
  216|  2.28k|  if(!domain || Curl_host_is_ipnum(domain))
  ------------------
  |  Branch (216:6): [True: 1.93k, False: 356]
  |  Branch (216:17): [True: 2, False: 354]
  ------------------
  217|  1.93k|    return 0;
  218|       |
  219|    354|  top = get_top_domain(domain, &len);
  220|    354|  return cookie_hash_domain(top, len);
  221|  2.28k|}
cookie.c:get_top_domain:
  162|    354|{
  163|    354|  size_t len = 0;
  164|    354|  const char *first = NULL, *last;
  165|       |
  166|    354|  if(domain) {
  ------------------
  |  Branch (166:6): [True: 354, False: 0]
  ------------------
  167|    354|    len = strlen(domain);
  168|    354|    last = memrchr(domain, '.', len);
  169|    354|    if(last) {
  ------------------
  |  Branch (169:8): [True: 8, False: 346]
  ------------------
  170|      8|      first = memrchr(domain, '.', (last - domain));
  171|      8|      if(first)
  ------------------
  |  Branch (171:10): [True: 2, False: 6]
  ------------------
  172|      2|        len -= (++first - domain);
  173|      8|    }
  174|    354|  }
  175|       |
  176|    354|  if(outlen)
  ------------------
  |  Branch (176:6): [True: 354, False: 0]
  ------------------
  177|    354|    *outlen = len;
  178|       |
  179|    354|  return first ? first : domain;
  ------------------
  |  Branch (179:10): [True: 2, False: 352]
  ------------------
  180|    354|}
cookie.c:cookie_hash_domain:
  191|    354|{
  192|    354|  const char *end = domain + len;
  193|    354|  size_t h = 5381;
  194|       |
  195|    824|  while(domain < end) {
  ------------------
  |  Branch (195:9): [True: 470, False: 354]
  ------------------
  196|    470|    size_t j = (size_t)Curl_raw_toupper(*domain++);
  197|    470|    h += h << 5;
  198|    470|    h ^= j;
  199|    470|  }
  200|       |
  201|    354|  return (h % COOKIE_HASH_SIZE);
  ------------------
  |  |   54|    354|#define COOKIE_HASH_SIZE 63
  ------------------
  202|    354|}
cookie.c:freecookie:
   64|  8.18k|{
   65|  8.18k|  curlx_free(co->domain);
  ------------------
  |  | 1483|  8.18k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   66|  8.18k|  curlx_free(co->path);
  ------------------
  |  | 1483|  8.18k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|  8.18k|  curlx_free(co->name);
  ------------------
  |  | 1483|  8.18k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   68|  8.18k|  curlx_free(co->value);
  ------------------
  |  | 1483|  8.18k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   69|  8.18k|  if(maintoo)
  ------------------
  |  Branch (69:6): [True: 1.14k, False: 7.04k]
  ------------------
   70|  1.14k|    curlx_free(co);
  ------------------
  |  | 1483|  1.14k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   71|  8.18k|}
cookie.c:cookie_load:
 1090|  6.78k|{
 1091|  6.78k|  FILE *handle = NULL;
 1092|  6.78k|  CURLcode result = CURLE_OK;
 1093|  6.78k|  FILE *fp = NULL;
 1094|  6.78k|  DEBUGASSERT(ci);
  ------------------
  |  | 1081|  6.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1094:3): [True: 0, False: 6.78k]
  |  Branch (1094:3): [True: 6.78k, False: 0]
  ------------------
 1095|  6.78k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  6.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1095:3): [True: 0, False: 6.78k]
  |  Branch (1095:3): [True: 6.78k, False: 0]
  ------------------
 1096|  6.78k|  DEBUGASSERT(file);
  ------------------
  |  | 1081|  6.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1096:3): [True: 0, False: 6.78k]
  |  Branch (1096:3): [True: 6.78k, False: 0]
  ------------------
 1097|       |
 1098|  6.78k|  ci->newsession = newsession; /* new session? */
 1099|  6.78k|  ci->running = FALSE; /* this is not running, this is init */
  ------------------
  |  | 1058|  6.78k|#define FALSE false
  ------------------
 1100|       |
 1101|  6.78k|  if(file && *file) {
  ------------------
  |  Branch (1101:6): [True: 6.78k, False: 0]
  |  Branch (1101:14): [True: 6.78k, False: 0]
  ------------------
 1102|  6.78k|    if(!strcmp(file, "-"))
  ------------------
  |  Branch (1102:8): [True: 0, False: 6.78k]
  ------------------
 1103|      0|      fp = stdin;
 1104|  6.78k|    else {
 1105|  6.78k|      fp = curlx_fopen(file, "rb");
  ------------------
  |  |   74|  6.78k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
 1106|  6.78k|      if(!fp)
  ------------------
  |  Branch (1106:10): [True: 0, False: 6.78k]
  ------------------
 1107|      0|        infof(data, "WARNING: failed to open cookie file \"%s\"", file);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1108|  6.78k|      else {
 1109|  6.78k|        curlx_struct_stat stat;
  ------------------
  |  |   63|  6.78k|#define curlx_struct_stat       struct stat
  ------------------
 1110|  6.78k|        if((curlx_fstat(fileno(fp), &stat) != -1) && S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  6.78k|#define curlx_fstat             fstat
  ------------------
  |  Branch (1110:12): [True: 6.78k, False: 0]
  |  Branch (1110:54): [True: 0, False: 6.78k]
  ------------------
 1111|      0|          curlx_fclose(fp);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1112|      0|          fp = NULL;
 1113|      0|          infof(data, "WARNING: cookie filename points to a directory: \"%s\"",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1114|      0|                file);
 1115|      0|        }
 1116|  6.78k|        else
 1117|  6.78k|          handle = fp;
 1118|  6.78k|      }
 1119|  6.78k|    }
 1120|  6.78k|  }
 1121|       |
 1122|  6.78k|  if(fp) {
  ------------------
  |  Branch (1122:6): [True: 6.78k, False: 0]
  ------------------
 1123|  6.78k|    struct dynbuf buf;
 1124|  6.78k|    bool eof = FALSE;
  ------------------
  |  | 1058|  6.78k|#define FALSE false
  ------------------
 1125|  6.78k|    curlx_dyn_init(&buf, MAX_COOKIE_LINE);
  ------------------
  |  |   81|  6.78k|#define MAX_COOKIE_LINE 5000
  ------------------
 1126|  6.78k|    do {
 1127|  6.78k|      result = Curl_get_line(&buf, fp, &eof);
 1128|  6.78k|      if(!result) {
  ------------------
  |  Branch (1128:10): [True: 6.78k, False: 0]
  ------------------
 1129|  6.78k|        const char *lineptr = curlx_dyn_ptr(&buf);
 1130|  6.78k|        bool headerline = FALSE;
  ------------------
  |  | 1058|  6.78k|#define FALSE false
  ------------------
 1131|  6.78k|        if(checkprefix("Set-Cookie:", lineptr)) {
  ------------------
  |  |   33|  6.78k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  6.78k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 6.78k]
  |  |  ------------------
  ------------------
 1132|       |          /* This is a cookie line, get it! */
 1133|      0|          lineptr += 11;
 1134|      0|          headerline = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1135|      0|          curlx_str_passblanks(&lineptr);
 1136|      0|        }
 1137|       |
 1138|  6.78k|        result = Curl_cookie_add(data, ci, headerline, TRUE, lineptr, NULL,
  ------------------
  |  | 1055|  6.78k|#define TRUE true
  ------------------
 1139|  6.78k|                                 NULL, TRUE);
  ------------------
  |  | 1055|  6.78k|#define TRUE true
  ------------------
 1140|       |        /* File reading cookie failures are not propagated back to the
 1141|       |           caller because there is no way to do that */
 1142|  6.78k|      }
 1143|  6.78k|    } while(!result && !eof);
  ------------------
  |  Branch (1143:13): [True: 6.78k, False: 0]
  |  Branch (1143:24): [True: 0, False: 6.78k]
  ------------------
 1144|  6.78k|    curlx_dyn_free(&buf); /* free the line buffer */
 1145|       |
 1146|       |    /*
 1147|       |     * Remove expired cookies from the hash. We must make sure to run this
 1148|       |     * after reading the file, and not on every cookie.
 1149|       |     */
 1150|  6.78k|    remove_expired(ci);
 1151|       |
 1152|  6.78k|    if(handle)
  ------------------
  |  Branch (1152:8): [True: 6.78k, False: 0]
  ------------------
 1153|  6.78k|      curlx_fclose(handle);
  ------------------
  |  |   79|  6.78k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1154|  6.78k|  }
 1155|  6.78k|  data->state.cookie_engine = TRUE;
  ------------------
  |  | 1055|  6.78k|#define TRUE true
  ------------------
 1156|  6.78k|  ci->running = TRUE; /* now, we are running */
  ------------------
  |  | 1055|  6.78k|#define TRUE true
  ------------------
 1157|       |
 1158|  6.78k|  return result;
 1159|  6.78k|}
cookie.c:get_netscape_format:
 1435|     94|{
 1436|     94|  return curl_maprintf(
 1437|     94|    "%s"               /* httponly preamble */
 1438|     94|    "%s%s\t"           /* domain */
 1439|     94|    "%s\t"             /* tailmatch */
 1440|     94|    "%s\t"             /* path */
 1441|     94|    "%s\t"             /* secure */
 1442|     94|    "%" FMT_OFF_T "\t" /* expires */
 1443|     94|    "%s\t"             /* name */
 1444|     94|    "%s",              /* value */
 1445|     94|    co->httponly ? "#HttpOnly_" : "",
  ------------------
  |  Branch (1445:5): [True: 0, False: 94]
  ------------------
 1446|       |    /*
 1447|       |     * Make sure all domains are prefixed with a dot if they allow
 1448|       |     * tailmatching. This is Mozilla-style.
 1449|       |     */
 1450|     94|    (co->tailmatch && co->domain && co->domain[0] != '.') ? "." : "",
  ------------------
  |  Branch (1450:6): [True: 91, False: 3]
  |  Branch (1450:23): [True: 91, False: 0]
  |  Branch (1450:37): [True: 91, False: 0]
  ------------------
 1451|     94|    co->domain ? co->domain : "unknown",
  ------------------
  |  Branch (1451:5): [True: 94, False: 0]
  ------------------
 1452|     94|    co->tailmatch ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1452:5): [True: 91, False: 3]
  ------------------
 1453|     94|    co->path ? co->path : "/",
  ------------------
  |  Branch (1453:5): [True: 94, False: 0]
  ------------------
 1454|     94|    co->secure ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1454:5): [True: 93, False: 1]
  ------------------
 1455|     94|    co->expires,
 1456|     94|    co->name,
 1457|     94|    co->value ? co->value : "");
  ------------------
  |  Branch (1457:5): [True: 94, False: 0]
  ------------------
 1458|     94|}
cookie.c:cookie_output:
 1471|  6.78k|{
 1472|  6.78k|  FILE *out = NULL;
 1473|  6.78k|  bool use_stdout = FALSE;
  ------------------
  |  | 1058|  6.78k|#define FALSE false
  ------------------
 1474|  6.78k|  char *tempstore = NULL;
 1475|  6.78k|  CURLcode result = CURLE_OK;
 1476|       |
 1477|  6.78k|  if(!ci)
  ------------------
  |  Branch (1477:6): [True: 0, False: 6.78k]
  ------------------
 1478|       |    /* no cookie engine alive */
 1479|      0|    return CURLE_OK;
 1480|       |
 1481|       |  /* at first, remove expired cookies */
 1482|  6.78k|  remove_expired(ci);
 1483|       |
 1484|  6.78k|  if(!strcmp("-", filename)) {
  ------------------
  |  Branch (1484:6): [True: 0, False: 6.78k]
  ------------------
 1485|       |    /* use stdout */
 1486|      0|    out = stdout;
 1487|      0|    use_stdout = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1488|      0|  }
 1489|  6.78k|  else {
 1490|  6.78k|    result = Curl_fopen(data, filename, &out, &tempstore);
 1491|  6.78k|    if(result)
  ------------------
  |  Branch (1491:8): [True: 0, False: 6.78k]
  ------------------
 1492|      0|      goto error;
 1493|  6.78k|  }
 1494|       |
 1495|  6.78k|  fputs("# Netscape HTTP Cookie File\n"
 1496|  6.78k|        "# https://curl.se/docs/http-cookies.html\n"
 1497|  6.78k|        "# This file was generated by libcurl! Edit at your own risk.\n\n",
 1498|  6.78k|        out);
 1499|       |
 1500|  6.78k|  if(ci->numcookies) {
  ------------------
  |  Branch (1500:6): [True: 98, False: 6.69k]
  ------------------
 1501|     98|    unsigned int i;
 1502|     98|    size_t nvalid = 0;
 1503|     98|    struct Cookie **array;
 1504|     98|    struct Curl_llist_node *n;
 1505|       |
 1506|     98|    array = curlx_calloc(1, sizeof(struct Cookie *) * ci->numcookies);
  ------------------
  |  | 1480|     98|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1507|     98|    if(!array) {
  ------------------
  |  Branch (1507:8): [True: 0, False: 98]
  ------------------
 1508|      0|      result = CURLE_OUT_OF_MEMORY;
 1509|      0|      goto error;
 1510|      0|    }
 1511|       |
 1512|       |    /* only sort the cookies with a domain property */
 1513|  6.27k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|  6.27k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1513:16): [True: 6.17k, False: 98]
  ------------------
 1514|  6.27k|      for(n = Curl_llist_head(&ci->cookielist[i]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (1514:52): [True: 98, False: 6.17k]
  ------------------
 1515|     98|        struct Cookie *co = Curl_node_elem(n);
 1516|     98|        if(!co->domain)
  ------------------
  |  Branch (1516:12): [True: 4, False: 94]
  ------------------
 1517|      4|          continue;
 1518|     94|        array[nvalid++] = co;
 1519|     94|      }
 1520|  6.17k|    }
 1521|       |
 1522|     98|    qsort(array, nvalid, sizeof(struct Cookie *), cookie_sort_ct);
 1523|       |
 1524|    192|    for(i = 0; i < nvalid; i++) {
  ------------------
  |  Branch (1524:16): [True: 94, False: 98]
  ------------------
 1525|     94|      char *format_ptr = get_netscape_format(array[i]);
 1526|     94|      if(!format_ptr) {
  ------------------
  |  Branch (1526:10): [True: 0, False: 94]
  ------------------
 1527|      0|        curlx_free(array);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1528|      0|        result = CURLE_OUT_OF_MEMORY;
 1529|      0|        goto error;
 1530|      0|      }
 1531|     94|      curl_mfprintf(out, "%s\n", format_ptr);
 1532|     94|      curlx_free(format_ptr);
  ------------------
  |  | 1483|     94|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1533|     94|    }
 1534|       |
 1535|     98|    curlx_free(array);
  ------------------
  |  | 1483|     98|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1536|     98|  }
 1537|       |
 1538|  6.78k|  if(!use_stdout) {
  ------------------
  |  Branch (1538:6): [True: 6.78k, False: 0]
  ------------------
 1539|  6.78k|    curlx_fclose(out);
  ------------------
  |  |   79|  6.78k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1540|  6.78k|    out = NULL;
 1541|  6.78k|    if(tempstore && curlx_rename(tempstore, filename)) {
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (1541:8): [True: 0, False: 6.78k]
  |  Branch (1541:21): [True: 0, False: 0]
  ------------------
 1542|      0|      result = CURLE_WRITE_ERROR;
 1543|      0|      goto error;
 1544|      0|    }
 1545|  6.78k|  }
 1546|       |
 1547|       |  /*
 1548|       |   * If we reach here we have successfully written a cookie file so there is
 1549|       |   * no need to inspect the error, any error case should have jumped into the
 1550|       |   * error block below.
 1551|       |   */
 1552|  6.78k|  curlx_free(tempstore);
  ------------------
  |  | 1483|  6.78k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1553|  6.78k|  return CURLE_OK;
 1554|       |
 1555|      0|error:
 1556|      0|  if(out && !use_stdout)
  ------------------
  |  Branch (1556:6): [True: 0, False: 0]
  |  Branch (1556:13): [True: 0, False: 0]
  ------------------
 1557|      0|    curlx_fclose(out);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1558|      0|  if(tempstore) {
  ------------------
  |  Branch (1558:6): [True: 0, False: 0]
  ------------------
 1559|      0|    unlink(tempstore);
 1560|      0|    curlx_free(tempstore);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1561|      0|  }
 1562|      0|  return result;
 1563|  6.78k|}

Curl_creds_create:
   41|  6.73k|{
   42|  6.73k|  struct Curl_creds *creds = NULL;
   43|  6.73k|  size_t ulen = user ? strlen(user) : 0;
  ------------------
  |  Branch (43:17): [True: 6.64k, False: 95]
  ------------------
   44|  6.73k|  size_t plen = passwd ? strlen(passwd) : 0;
  ------------------
  |  Branch (44:17): [True: 6.32k, False: 412]
  ------------------
   45|  6.73k|  size_t olen = oauth_bearer ? strlen(oauth_bearer) : 0;
  ------------------
  |  Branch (45:17): [True: 6.15k, False: 584]
  ------------------
   46|  6.73k|  size_t salen = sasl_authzid ? strlen(sasl_authzid) : 0;
  ------------------
  |  Branch (46:18): [True: 6.13k, False: 602]
  ------------------
   47|  6.73k|  size_t sslen = sasl_service ? strlen(sasl_service) : 0;
  ------------------
  |  Branch (47:18): [True: 6.15k, False: 583]
  ------------------
   48|  6.73k|  char *s, *buf;
   49|  6.73k|  CURLcode result = CURLE_OK;
   50|       |
   51|  6.73k|  Curl_creds_unlink(pcreds);
   52|       |
   53|       |  /* Everything empty/NULL, this is the NULL credential */
   54|  6.73k|  if(!ulen && !plen && !olen && !salen && !sslen)
  ------------------
  |  Branch (54:6): [True: 5.40k, False: 1.33k]
  |  Branch (54:15): [True: 5.36k, False: 40]
  |  Branch (54:24): [True: 5.33k, False: 27]
  |  Branch (54:33): [True: 5.32k, False: 11]
  |  Branch (54:43): [True: 5.30k, False: 24]
  ------------------
   55|  5.30k|    goto out;
   56|       |
   57|  1.43k|  if((ulen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  1.43k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (57:6): [True: 0, False: 1.43k]
  ------------------
   58|  1.43k|     (plen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  1.43k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (58:6): [True: 0, False: 1.43k]
  ------------------
   59|  1.43k|     (olen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  1.43k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (59:6): [True: 0, False: 1.43k]
  ------------------
   60|  1.43k|     (salen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  1.43k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (60:6): [True: 0, False: 1.43k]
  ------------------
   61|  1.43k|     (sslen > CURL_MAX_INPUT_LENGTH)) {
  ------------------
  |  |   45|  1.43k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (61:6): [True: 0, False: 1.43k]
  ------------------
   62|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
   63|      0|    goto out;
   64|      0|  }
   65|       |
   66|       |  /* null-terminator for user already part of struct */
   67|  1.43k|  creds = curlx_calloc(1, sizeof(*creds) +
  ------------------
  |  | 1480|  1.43k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   68|  1.43k|                       ulen + plen + 1 + olen + 1 + salen + 1 + sslen + 1);
   69|  1.43k|  if(!creds) {
  ------------------
  |  Branch (69:6): [True: 0, False: 1.43k]
  ------------------
   70|      0|    result = CURLE_OUT_OF_MEMORY;
   71|      0|    goto out;
   72|      0|  }
   73|       |
   74|  1.43k|  creds->refcount = 1;
   75|  1.43k|  creds->source = source;
   76|       |  /* Some compilers try to be too smart about our dynamic struct size */
   77|  1.43k|  buf = ((char *)creds) + offsetof(struct Curl_creds, buf);
   78|  1.43k|  creds->user = s = buf;
   79|  1.43k|  if(ulen)
  ------------------
  |  Branch (79:6): [True: 1.33k, False: 102]
  ------------------
   80|  1.33k|    memcpy(s, user, ulen + 1);
   81|  1.43k|  creds->passwd = s = buf + ulen + 1;
   82|  1.43k|  if(plen)
  ------------------
  |  Branch (82:6): [True: 247, False: 1.19k]
  ------------------
   83|    247|    memcpy(s, passwd, plen + 1);
   84|  1.43k|  creds->oauth_bearer = s = buf + ulen + 1 + plen + 1;
   85|  1.43k|  if(olen)
  ------------------
  |  Branch (85:6): [True: 29, False: 1.41k]
  ------------------
   86|     29|    memcpy(s, oauth_bearer, olen + 1);
   87|  1.43k|  creds->sasl_authzid = s = buf + ulen + 1 + plen + 1 + olen + 1;
   88|  1.43k|  if(salen)
  ------------------
  |  Branch (88:6): [True: 13, False: 1.42k]
  ------------------
   89|     13|    memcpy(s, sasl_authzid, salen + 1);
   90|  1.43k|  creds->sasl_service = s = buf + ulen + 1 + plen + 1 + olen + 1 + salen + 1;
   91|  1.43k|  if(sslen)
  ------------------
  |  Branch (91:6): [True: 25, False: 1.41k]
  ------------------
   92|     25|    memcpy(s, sasl_service, sslen + 1);
   93|       |
   94|  6.73k|out:
   95|  6.73k|  if(!result)
  ------------------
  |  Branch (95:6): [True: 6.73k, False: 0]
  ------------------
   96|  6.73k|    *pcreds = creds;
   97|      0|  else
   98|      0|    Curl_creds_unlink(&creds);
   99|  6.73k|  return result;
  100|  1.43k|}
Curl_creds_merge:
  107|  6.12k|{
  108|  6.12k|  struct Curl_creds *creds_out = NULL;
  109|  6.12k|  CURLcode result;
  110|       |
  111|  6.12k|  if(!user || !user[0])
  ------------------
  |  Branch (111:6): [True: 5.16k, False: 958]
  |  Branch (111:15): [True: 100, False: 858]
  ------------------
  112|  5.26k|    user = Curl_creds_user(creds_in);
  ------------------
  |  |   75|  5.26k|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 31, False: 5.23k]
  |  |  ------------------
  ------------------
  113|  6.12k|  if(!passwd || !passwd[0])
  ------------------
  |  Branch (113:6): [True: 5.92k, False: 203]
  |  Branch (113:17): [True: 46, False: 157]
  ------------------
  114|  5.97k|    passwd = Curl_creds_passwd(creds_in);
  ------------------
  |  |   76|  5.97k|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 35, False: 5.93k]
  |  |  ------------------
  ------------------
  115|  6.12k|  result = Curl_creds_create(user, passwd,
  116|  6.12k|                             Curl_creds_oauth_bearer(creds_in),
  ------------------
  |  |   77|  6.12k|#define Curl_creds_oauth_bearer(c)       ((c) ? (c)->oauth_bearer : "")
  |  |  ------------------
  |  |  |  Branch (77:43): [True: 35, False: 6.09k]
  |  |  ------------------
  ------------------
  117|  6.12k|                             Curl_creds_sasl_authzid(creds_in),
  ------------------
  |  |   78|  6.12k|#define Curl_creds_sasl_authzid(c)       ((c) ? (c)->sasl_authzid : "")
  |  |  ------------------
  |  |  |  Branch (78:43): [True: 35, False: 6.09k]
  |  |  ------------------
  ------------------
  118|  6.12k|                             Curl_creds_sasl_service(creds_in),
  ------------------
  |  |   79|  6.12k|#define Curl_creds_sasl_service(c)       ((c) ? (c)->sasl_service : "")
  |  |  ------------------
  |  |  |  Branch (79:43): [True: 35, False: 6.09k]
  |  |  ------------------
  ------------------
  119|  6.12k|                             source, &creds_out);
  120|  6.12k|  Curl_creds_link(pcreds_out, creds_out);
  121|  6.12k|  Curl_creds_unlink(&creds_out);
  122|  6.12k|  return result;
  123|  6.12k|}
Curl_creds_link:
  126|  11.9k|{
  127|  11.9k|  if(*pdest != src) {
  ------------------
  |  Branch (127:6): [True: 1.92k, False: 10.0k]
  ------------------
  128|  1.92k|    Curl_creds_unlink(pdest);
  129|  1.92k|    *pdest = src;
  130|  1.92k|    if(src) {
  ------------------
  |  Branch (130:8): [True: 1.92k, False: 0]
  ------------------
  131|  1.92k|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1081|  1.92k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (131:7): [True: 0, False: 1.92k]
  |  Branch (131:7): [True: 1.92k, False: 0]
  ------------------
  132|  1.92k|      src->refcount++;
  133|  1.92k|    }
  134|  1.92k|  }
  135|  11.9k|}
Curl_creds_unlink:
  138|  74.3k|{
  139|  74.3k|  if(*pcreds) {
  ------------------
  |  Branch (139:6): [True: 3.36k, False: 70.9k]
  ------------------
  140|  3.36k|    struct Curl_creds *creds = *pcreds;
  141|       |
  142|  3.36k|    DEBUGASSERT(creds->refcount);
  ------------------
  |  | 1081|  3.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (142:5): [True: 0, False: 3.36k]
  |  Branch (142:5): [True: 3.36k, False: 0]
  ------------------
  143|  3.36k|    *pcreds = NULL;
  144|  3.36k|    if(creds->refcount)
  ------------------
  |  Branch (144:8): [True: 3.36k, False: 0]
  ------------------
  145|  3.36k|      creds->refcount--;
  146|  3.36k|    if(!creds->refcount) {
  ------------------
  |  Branch (146:8): [True: 1.43k, False: 1.92k]
  ------------------
  147|  1.43k|      curlx_free(creds);
  ------------------
  |  | 1483|  1.43k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  148|  1.43k|    }
  149|  3.36k|  }
  150|  74.3k|}
Curl_creds_trace:
  166|  6.28k|{
  167|  6.28k|  if(creds) {
  ------------------
  |  Branch (167:6): [True: 1.06k, False: 5.22k]
  ------------------
  168|  1.06k|    CURL_TRC_M(data, "%s: user=%s, passwd=%s, "
  ------------------
  |  |  148|  1.06k|  do {                                   \
  |  |  149|  1.06k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  1.06k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  1.06k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  2.12k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 1.06k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  2.12k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  1.06k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  1.06k|      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|  1.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 1.06k]
  |  |  ------------------
  ------------------
  169|  1.06k|               "sasl_authzid=%s, oauth_bearer=%s, source=%d",
  170|  1.06k|               msg,
  171|  1.06k|               Curl_creds_user(creds),
  172|  1.06k|               Curl_creds_has_passwd(creds) ? "***" : "",
  173|  1.06k|               Curl_creds_sasl_authzid(creds),
  174|  1.06k|               Curl_creds_has_oauth_bearer(creds) ? "***" : "",
  175|  1.06k|               creds->source);
  176|  1.06k|  }
  177|  5.22k|  else
  178|  5.22k|    CURL_TRC_M(data, "%s: -", msg);
  ------------------
  |  |  148|  5.22k|  do {                                   \
  |  |  149|  5.22k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.22k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.22k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  10.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.22k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.22k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  10.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.22k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.22k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.22k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.22k]
  |  |  ------------------
  ------------------
  179|  6.28k|}

Curl_cshutdn_run_once:
  113|    450|{
  114|    450|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|    450|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (114:3): [True: 0, False: 450]
  |  Branch (114:3): [True: 450, False: 0]
  ------------------
  115|    450|  Curl_attach_connection(data, conn);
  116|    450|  cshutdn_run_once(data, conn, done);
  117|    450|  CURL_TRC_M(data, "[SHUTDOWN] shutdown, done=%d", *done);
  ------------------
  |  |  148|    450|  do {                                   \
  |  |  149|    450|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    450|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    450|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    900|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 450, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 450]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    900|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    450|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    450|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    450|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 450]
  |  |  ------------------
  ------------------
  118|    450|  Curl_detach_connection(data);
  119|    450|}
Curl_cshutdn_terminate:
  124|  6.06k|{
  125|  6.06k|  struct Curl_easy *admin = data;
  126|  6.06k|  bool done;
  127|       |
  128|       |  /* there must be a connection to close */
  129|  6.06k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (129:3): [True: 0, False: 6.06k]
  |  Branch (129:3): [True: 6.06k, False: 0]
  ------------------
  130|       |  /* it must be removed from the connection pool */
  131|  6.06k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (131:3): [True: 0, False: 6.06k]
  |  Branch (131:3): [True: 6.06k, False: 0]
  ------------------
  132|       |  /* the transfer must be detached from the connection */
  133|  6.06k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (133:3): [True: 0, False: 6.06k]
  |  Branch (133:3): [True: 0, False: 0]
  |  Branch (133:3): [True: 6.06k, False: 0]
  |  Branch (133:3): [True: 6.06k, 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.06k|  if(data->multi && data->multi->admin)
  ------------------
  |  Branch (139:6): [True: 6.06k, False: 0]
  |  Branch (139:21): [True: 6.06k, False: 0]
  ------------------
  140|  6.06k|    admin = data->multi->admin;
  141|       |
  142|  6.06k|  Curl_attach_connection(admin, conn);
  143|       |
  144|  6.06k|  cshutdn_run_conn_handler(admin, conn);
  145|  6.06k|  if(do_shutdown) {
  ------------------
  |  Branch (145:6): [True: 0, False: 6.06k]
  ------------------
  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.06k|  CURL_TRC_M(admin, "[SHUTDOWN] %sclosing connection #%" FMT_OFF_T,
  ------------------
  |  |  148|  6.06k|  do {                                   \
  |  |  149|  6.06k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.06k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  6.06k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  12.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 6.06k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  12.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  6.06k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.06k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  151|  6.06k|             conn->bits.shutdown_filters ? "" : "force ",
  152|  6.06k|             conn->connection_id);
  153|  6.06k|  Curl_conn_close(admin, SECONDARYSOCKET);
  ------------------
  |  |  304|  6.06k|#define SECONDARYSOCKET 1
  ------------------
  154|  6.06k|  Curl_conn_close(admin, FIRSTSOCKET);
  ------------------
  |  |  303|  6.06k|#define FIRSTSOCKET     0
  ------------------
  155|  6.06k|  Curl_detach_connection(admin);
  156|       |
  157|  6.06k|  if(data->multi)
  ------------------
  |  Branch (157:6): [True: 6.06k, False: 0]
  ------------------
  158|  6.06k|    Curl_multi_ev_conn_done(data->multi, data, conn);
  159|  6.06k|  Curl_conn_free(admin, conn);
  160|       |
  161|  6.06k|  if(data->multi) {
  ------------------
  |  Branch (161:6): [True: 6.06k, False: 0]
  ------------------
  162|  6.06k|    CURL_TRC_M(data, "[SHUTDOWN] trigger multi connchanged");
  ------------------
  |  |  148|  6.06k|  do {                                   \
  |  |  149|  6.06k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.06k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  6.06k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  12.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 6.06k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  12.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  6.06k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.06k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  163|  6.06k|    Curl_multi_connchanged(data->multi);
  164|  6.06k|  }
  165|  6.06k|}
Curl_cshutdn_init:
  321|  10.0k|{
  322|  10.0k|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (322:3): [True: 0, False: 10.0k]
  |  Branch (322:3): [True: 10.0k, False: 0]
  ------------------
  323|  10.0k|  cshutdn->multi = multi;
  324|  10.0k|  Curl_llist_init(&cshutdn->list, NULL);
  325|       |  cshutdn->initialized = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  326|  10.0k|  return 0; /* good */
  327|  10.0k|}
Curl_cshutdn_destroy:
  331|  10.0k|{
  332|  10.0k|  if(cshutdn->initialized && data) {
  ------------------
  |  Branch (332:6): [True: 10.0k, False: 0]
  |  Branch (332:30): [True: 10.0k, False: 0]
  ------------------
  333|  10.0k|    int timeout_ms = 0;
  334|       |    /* for testing, run graceful shutdown */
  335|  10.0k|#ifdef DEBUGBUILD
  336|  10.0k|    {
  337|  10.0k|      const char *p = getenv("CURL_GRACEFUL_SHUTDOWN");
  338|  10.0k|      if(p) {
  ------------------
  |  Branch (338:10): [True: 0, False: 10.0k]
  ------------------
  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|  10.0k|    }
  344|  10.0k|#endif
  345|       |
  346|  10.0k|    CURL_TRC_M(data, "[SHUTDOWN] destroy, %zu connections, timeout=%dms",
  ------------------
  |  |  148|  10.0k|  do {                                   \
  |  |  149|  10.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  20.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  20.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  347|  10.0k|               Curl_llist_count(&cshutdn->list), timeout_ms);
  348|  10.0k|    cshutdn_terminate_all(cshutdn, data, timeout_ms);
  349|  10.0k|  }
  350|       |  cshutdn->multi = NULL;
  351|  10.0k|}
Curl_cshutdn_perform:
  429|   212k|{
  430|   212k|  cshutdn_perform(cshutdn, data, sigpipe_ctx);
  431|   212k|}
Curl_cshutdn_setfds:
  438|   202k|{
  439|   202k|  if(Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (439:6): [True: 0, False: 202k]
  ------------------
  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))
  ------------------
  |  |  101|      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|   202k|}
cshutdn.c:cshutdn_run_once:
   72|    450|{
   73|    450|  CURLcode r1, r2;
   74|    450|  bool done1, done2;
   75|       |
   76|       |  /* We expect to be attached when called */
   77|    450|  DEBUGASSERT(data->conn == conn);
  ------------------
  |  | 1081|    450|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 450]
  |  Branch (77:3): [True: 450, False: 0]
  ------------------
   78|       |
   79|    450|  if(!Curl_shutdown_started(data, FIRSTSOCKET)) {
  ------------------
  |  |  303|    450|#define FIRSTSOCKET     0
  ------------------
  |  Branch (79:6): [True: 450, False: 0]
  ------------------
   80|    450|    Curl_shutdown_start(data, FIRSTSOCKET, 0);
  ------------------
  |  |  303|    450|#define FIRSTSOCKET     0
  ------------------
   81|    450|  }
   82|       |
   83|    450|  cshutdn_run_conn_handler(data, conn);
   84|       |
   85|    450|  if(conn->bits.shutdown_filters) {
  ------------------
  |  Branch (85:6): [True: 0, False: 450]
  ------------------
   86|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
   87|      0|    return;
   88|      0|  }
   89|       |
   90|    450|  if(!conn->bits.connect_only && Curl_conn_is_connected(conn, FIRSTSOCKET))
  ------------------
  |  |  303|    450|#define FIRSTSOCKET     0
  ------------------
  |  Branch (90:6): [True: 450, False: 0]
  |  Branch (90:34): [True: 450, False: 0]
  ------------------
   91|    450|    r1 = Curl_conn_shutdown(data, FIRSTSOCKET, &done1);
  ------------------
  |  |  303|    450|#define FIRSTSOCKET     0
  ------------------
   92|      0|  else {
   93|      0|    r1 = CURLE_OK;
   94|      0|    done1 = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
   95|      0|  }
   96|       |
   97|    450|  if(!conn->bits.connect_only && Curl_conn_is_connected(conn, SECONDARYSOCKET))
  ------------------
  |  |  304|    450|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (97:6): [True: 450, False: 0]
  |  Branch (97:34): [True: 0, False: 450]
  ------------------
   98|      0|    r2 = Curl_conn_shutdown(data, SECONDARYSOCKET, &done2);
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
   99|    450|  else {
  100|    450|    r2 = CURLE_OK;
  101|    450|    done2 = TRUE;
  ------------------
  |  | 1055|    450|#define TRUE true
  ------------------
  102|    450|  }
  103|       |
  104|       |  /* we are done when any failed or both report success */
  105|    450|  *done = (r1 || r2 || (done1 && done2));
  ------------------
  |  Branch (105:12): [True: 0, False: 450]
  |  Branch (105:18): [True: 0, False: 450]
  |  Branch (105:25): [True: 450, False: 0]
  |  Branch (105:34): [True: 450, False: 0]
  ------------------
  106|    450|  if(*done)
  ------------------
  |  Branch (106:6): [True: 450, False: 0]
  ------------------
  107|    450|    conn->bits.shutdown_filters = TRUE;
  ------------------
  |  | 1055|    450|#define TRUE true
  ------------------
  108|    450|}
cshutdn.c:cshutdn_run_conn_handler:
   43|  6.51k|{
   44|  6.51k|  if(!conn->bits.shutdown_handler) {
  ------------------
  |  Branch (44:6): [True: 6.06k, False: 450]
  ------------------
   45|       |
   46|  6.06k|    if(conn->scheme && conn->scheme->run->disconnect) {
  ------------------
  |  Branch (46:8): [True: 6.06k, False: 0]
  |  Branch (46:24): [True: 5.71k, False: 355]
  ------------------
   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|  5.71k|      if(data->state.internal) {
  ------------------
  |  Branch (51:10): [True: 5.71k, False: 0]
  ------------------
   52|  5.71k|        data->set.timeout = DEFAULT_SHUTDOWN_TIMEOUT_MS;
  ------------------
  |  |   45|  5.71k|#define DEFAULT_SHUTDOWN_TIMEOUT_MS   (2 * 1000)
  ------------------
   53|  5.71k|        Curl_pgrsTime(data, TIMER_STARTOP);
   54|  5.71k|      }
   55|       |
   56|       |      /* This is set if protocol-specific cleanups should be made */
   57|  5.71k|      DEBUGF(infof(data, "connection #%" FMT_OFF_T
  ------------------
  |  | 1067|  39.9k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 5.71k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 5.71k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
   58|  5.71k|                   ", shutdown protocol handler (aborted=%d)",
   59|  5.71k|                   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|  5.71k|      conn->scheme->run->disconnect(data, conn, (bool)conn->bits.aborted);
   63|  5.71k|    }
   64|       |
   65|       |    conn->bits.shutdown_handler = TRUE;
  ------------------
  |  | 1055|  6.06k|#define TRUE true
  ------------------
   66|  6.06k|  }
   67|  6.51k|}
cshutdn.c:cshutdn_terminate_all:
  269|  10.0k|{
  270|  10.0k|  struct curltime started = *Curl_pgrs_now(data);
  271|  10.0k|  struct Curl_llist_node *e;
  272|  10.0k|  struct Curl_sigpipe_ctx sigpipe_ctx;
  273|       |
  274|  10.0k|  DEBUGASSERT(cshutdn);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (274:3): [True: 0, False: 10.0k]
  |  Branch (274:3): [True: 10.0k, False: 0]
  ------------------
  275|  10.0k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:3): [True: 0, False: 10.0k]
  |  Branch (275:3): [True: 10.0k, False: 0]
  ------------------
  276|       |
  277|  10.0k|  CURL_TRC_M(data, "[SHUTDOWN] shutdown all");
  ------------------
  |  |  148|  10.0k|  do {                                   \
  |  |  149|  10.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  20.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  20.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  278|  10.0k|  sigpipe_init(&sigpipe_ctx);
  279|       |
  280|  10.0k|  while(Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (280:9): [True: 0, False: 10.0k]
  ------------------
  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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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|  10.0k|  e = Curl_llist_head(&cshutdn->list);
  308|  10.0k|  while(e) {
  ------------------
  |  Branch (308:9): [True: 0, False: 10.0k]
  ------------------
  309|      0|    struct connectdata *conn = Curl_node_elem(e);
  310|      0|    Curl_node_remove(e);
  311|      0|    Curl_cshutdn_terminate(data, conn, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  312|      0|    e = Curl_llist_head(&cshutdn->list);
  313|      0|  }
  314|  10.0k|  DEBUGASSERT(!Curl_llist_count(&cshutdn->list));
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (314:3): [True: 0, False: 10.0k]
  |  Branch (314:3): [True: 10.0k, False: 0]
  ------------------
  315|       |
  316|  10.0k|  sigpipe_restore(&sigpipe_ctx);
  317|  10.0k|}
cshutdn.c:cshutdn_perform:
  231|   212k|{
  232|   212k|  struct Curl_llist_node *e = Curl_llist_head(&cshutdn->list);
  233|   212k|  struct Curl_llist_node *enext;
  234|   212k|  struct connectdata *conn;
  235|   212k|  timediff_t next_expire_ms = 0, ms;
  236|   212k|  bool done;
  237|       |
  238|   212k|  if(!e)
  ------------------
  |  Branch (238:6): [True: 212k, False: 0]
  ------------------
  239|   212k|    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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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);
  ------------------
  |  | 1058|      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 && ms < next_expire_ms)
  ------------------
  |  Branch (256:10): [True: 0, False: 0]
  |  Branch (256:16): [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.93k|{
   73|  5.93k|  struct Curl_addrinfo *vqualifier canext;
   74|  5.93k|  struct Curl_addrinfo *ca;
   75|       |
   76|  11.5k|  for(ca = cahead; ca; ca = canext) {
  ------------------
  |  Branch (76:20): [True: 5.65k, False: 5.93k]
  ------------------
   77|  5.65k|    canext = ca->ai_next;
   78|  5.65k|    curlx_free(ca);
  ------------------
  |  | 1483|  5.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  5.65k|  }
   80|  5.93k|}
Curl_getaddrinfo_ex:
  100|    985|{
  101|    985|  const struct addrinfo *ai;
  102|    985|  struct addrinfo *aihead;
  103|    985|  struct Curl_addrinfo *cafirst = NULL;
  104|    985|  struct Curl_addrinfo *calast = NULL;
  105|    985|  struct Curl_addrinfo *ca;
  106|    985|  size_t ss_size;
  107|    985|  int error;
  108|       |
  109|    985|  *result = NULL; /* assume failure */
  110|       |
  111|    985|  error = CURL_GETADDRINFO(nodename, servname, hints, &aihead);
  ------------------
  |  | 1432|    985|  curl_dbg_getaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
  ------------------
  112|    985|  if(error)
  ------------------
  |  Branch (112:6): [True: 765, False: 220]
  ------------------
  113|    765|    return error;
  114|       |
  115|       |  /* traverse the addrinfo list */
  116|       |
  117|    440|  for(ai = aihead; ai != NULL; ai = ai->ai_next) {
  ------------------
  |  Branch (117:20): [True: 220, False: 220]
  ------------------
  118|    220|    size_t namelen = ai->ai_canonname ? strlen(ai->ai_canonname) + 1 : 0;
  ------------------
  |  Branch (118:22): [True: 0, False: 220]
  ------------------
  119|       |    /* ignore elements with unsupported address family,
  120|       |       settle family-specific sockaddr structure size. */
  121|    220|    if(ai->ai_family == AF_INET)
  ------------------
  |  Branch (121:8): [True: 218, False: 2]
  ------------------
  122|    218|      ss_size = sizeof(struct sockaddr_in);
  123|      2|#ifdef USE_IPV6
  124|      2|    else if(ai->ai_family == AF_INET6)
  ------------------
  |  Branch (124:13): [True: 2, False: 0]
  ------------------
  125|      2|      ss_size = sizeof(struct sockaddr_in6);
  126|      0|#endif
  127|      0|    else
  128|      0|      continue;
  129|       |
  130|       |    /* ignore elements without required address info */
  131|    220|    if(!ai->ai_addr || !(ai->ai_addrlen > 0))
  ------------------
  |  Branch (131:8): [True: 0, False: 220]
  |  Branch (131:24): [True: 0, False: 220]
  ------------------
  132|      0|      continue;
  133|       |
  134|       |    /* ignore elements with bogus address size */
  135|    220|    if((size_t)ai->ai_addrlen < ss_size)
  ------------------
  |  Branch (135:8): [True: 0, False: 220]
  ------------------
  136|      0|      continue;
  137|       |
  138|    220|    ca = curlx_malloc(sizeof(struct Curl_addrinfo) + ss_size + namelen);
  ------------------
  |  | 1478|    220|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  139|    220|    if(!ca) {
  ------------------
  |  Branch (139:8): [True: 0, False: 220]
  ------------------
  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|    220|    ca->ai_flags     = ai->ai_flags;
  148|    220|    ca->ai_family    = ai->ai_family;
  149|    220|    ca->ai_socktype  = ai->ai_socktype;
  150|    220|    ca->ai_protocol  = ai->ai_protocol;
  151|    220|    ca->ai_addrlen   = (curl_socklen_t)ss_size;
  152|    220|    ca->ai_addr      = NULL;
  153|    220|    ca->ai_canonname = NULL;
  154|    220|    ca->ai_next      = NULL;
  155|       |
  156|    220|    ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  157|    220|    memcpy(ca->ai_addr, ai->ai_addr, ss_size);
  158|       |
  159|    220|    if(namelen) {
  ------------------
  |  Branch (159:8): [True: 0, False: 220]
  ------------------
  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|    220|    if(!cafirst)
  ------------------
  |  Branch (165:8): [True: 220, False: 0]
  ------------------
  166|    220|      cafirst = ca;
  167|       |
  168|       |    /* add this element last in the return list */
  169|    220|    if(calast)
  ------------------
  |  Branch (169:8): [True: 0, False: 220]
  ------------------
  170|      0|      calast->ai_next = ca;
  171|    220|    calast = ca;
  172|    220|  }
  173|       |
  174|       |  /* destroy the addrinfo list */
  175|    220|  if(aihead)
  ------------------
  |  Branch (175:6): [True: 220, False: 0]
  ------------------
  176|    220|    CURL_FREEADDRINFO(aihead);
  ------------------
  |  | 1434|    220|  curl_dbg_freeaddrinfo(data, __LINE__, __FILE__)
  ------------------
  177|       |
  178|       |  /* if we failed, also destroy the Curl_addrinfo list */
  179|    220|  if(error) {
  ------------------
  |  Branch (179:6): [True: 0, False: 220]
  ------------------
  180|      0|    Curl_freeaddrinfo(cafirst);
  181|      0|    cafirst = NULL;
  182|      0|  }
  183|    220|  else if(!cafirst) {
  ------------------
  |  Branch (183:11): [True: 0, False: 220]
  ------------------
  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|    220|  *result = cafirst;
  197|       |
  198|       |  /* This is not a CURLcode */
  199|    220|  return error;
  200|    985|}
Curl_str2addr:
  410|  5.15k|{
  411|  5.15k|  struct in_addr in;
  412|  5.15k|  if(curlx_inet_pton(AF_INET, dotted, &in) > 0)
  ------------------
  |  |   43|  5.15k|  inet_pton(x, y, z)
  ------------------
  |  Branch (412:6): [True: 5.13k, False: 28]
  ------------------
  413|       |    /* This is a dotted IP address 123.123.123.123-style */
  414|  5.13k|    return ip2addr(addrp, AF_INET, &in, dotted, port);
  415|     28|#ifdef USE_IPV6
  416|     28|  {
  417|     28|    struct in6_addr in6;
  418|     28|    if(curlx_inet_pton(AF_INET6, dotted, &in6) > 0)
  ------------------
  |  |   43|     28|  inet_pton(x, y, z)
  ------------------
  |  Branch (418:8): [True: 28, False: 0]
  ------------------
  419|       |      /* This is a dotted IPv6 address ::1-style */
  420|     28|      return ip2addr(addrp, AF_INET6, &in6, dotted, port);
  421|     28|  }
  422|      0|#endif
  423|      0|  return CURLE_BAD_FUNCTION_ARGUMENT; /* bad input format */
  424|     28|}
Curl_is_ipv4addr:
  427|  14.2k|{
  428|  14.2k|  struct in_addr in;
  429|  14.2k|  return (curlx_inet_pton(AF_INET, address, &in) > 0);
  ------------------
  |  |   43|  14.2k|  inet_pton(x, y, z)
  ------------------
  430|  14.2k|}
Curl_is_ipaddr:
  433|  8.08k|{
  434|  8.08k|  if(Curl_is_ipv4addr(address))
  ------------------
  |  Branch (434:6): [True: 5.13k, False: 2.95k]
  ------------------
  435|  5.13k|    return TRUE;
  ------------------
  |  | 1055|  5.13k|#define TRUE true
  ------------------
  436|  2.95k|#ifdef USE_IPV6
  437|  2.95k|  {
  438|  2.95k|    struct in6_addr in6;
  439|  2.95k|    if(curlx_inet_pton(AF_INET6, address, &in6) > 0)
  ------------------
  |  |   43|  2.95k|  inet_pton(x, y, z)
  ------------------
  |  Branch (439:8): [True: 28, False: 2.92k]
  ------------------
  440|       |      /* This is a dotted IPv6 address ::1-style */
  441|     28|      return TRUE;
  ------------------
  |  | 1055|     28|#define TRUE true
  ------------------
  442|  2.95k|  }
  443|  2.92k|#endif
  444|  2.92k|  return FALSE;
  ------------------
  |  | 1058|  2.92k|#define FALSE false
  ------------------
  445|  2.95k|}
Curl_looks_like_ipv6:
  449|     59|{
  450|     59|  const char *zonep = NULL;
  451|     59|  size_t i = 0, hlen = 0, zlen = 0;
  452|       |
  453|     59|  if(host)
  ------------------
  |  Branch (453:6): [True: 59, False: 0]
  ------------------
  454|     59|    memset(host, 0, sizeof(*host));
  455|     59|  if(zone)
  ------------------
  |  Branch (455:6): [True: 59, False: 0]
  ------------------
  456|     59|    memset(zone, 0, sizeof(*zone));
  457|       |
  458|    321|  for(i = 0; i < len; ++i, ++hlen) {
  ------------------
  |  Branch (458:14): [True: 262, False: 59]
  ------------------
  459|    262|    if(!s[i] || !(ISXDIGIT(s[i]) || (s[i] == ':') || (s[i] == '.')))
  ------------------
  |  |   39|    524|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|    524|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 262, False: 0]
  |  |  |  |  |  Branch (44:38): [True: 48, False: 214]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|    476|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 65, False: 149]
  |  |  |  |  |  Branch (27:43): [True: 65, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|    149|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 20, False: 129]
  |  |  |  |  |  Branch (28:43): [True: 20, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (459:8): [True: 0, False: 262]
  |  Branch (459:37): [True: 129, False: 0]
  |  Branch (459:54): [True: 0, False: 0]
  ------------------
  460|      0|      break;
  461|    262|  }
  462|       |
  463|     59|  if((i < len) && (s[i] == '%')) { /* address followed by a zone? */
  ------------------
  |  Branch (463:6): [True: 0, False: 59]
  |  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] == '-') ||
  ------------------
  |  |   38|      0|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|      0|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (42:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if(!s[i] || !(ISALPHA(s[i]) || ISXDIGIT(s[i]) || (s[i] == '-') ||
  ------------------
  |  |   39|      0|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (44: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|     59|  if(i != len)
  ------------------
  |  Branch (476:6): [True: 0, False: 59]
  ------------------
  477|      0|    return FALSE; /* invalid chars in zone */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  478|     59|  if(host && hlen) {
  ------------------
  |  Branch (478:6): [True: 59, False: 0]
  |  Branch (478:14): [True: 59, False: 0]
  ------------------
  479|     59|    host->str = s;
  480|     59|    host->len = hlen;
  481|     59|  }
  482|     59|  if(zone && zlen) {
  ------------------
  |  Branch (482:6): [True: 59, False: 0]
  |  Branch (482:14): [True: 0, False: 59]
  ------------------
  483|      0|    zone->str = zonep;
  484|      0|    zone->len = zlen;
  485|      0|  }
  486|       |  return TRUE;
  ------------------
  |  | 1055|     59|#define TRUE true
  ------------------
  487|     59|}
Curl_unix2addr:
  497|     15|{
  498|     15|  struct Curl_addrinfo *ai;
  499|     15|  struct sockaddr_un *sa_un;
  500|     15|  size_t path_len;
  501|       |
  502|     15|  *paddr = NULL;
  503|       |
  504|       |  /* sun_path must be able to store the null-terminated path */
  505|     15|  path_len = strlen(path) + 1;
  506|     15|  if(path_len > sizeof(sa_un->sun_path))
  ------------------
  |  Branch (506:6): [True: 1, False: 14]
  ------------------
  507|      1|    return CURLE_TOO_LARGE;
  508|       |
  509|     14|  ai = curlx_calloc(1,
  ------------------
  |  | 1480|     14|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  510|     14|                    sizeof(struct Curl_addrinfo) + sizeof(struct sockaddr_un));
  511|     14|  if(!ai)
  ------------------
  |  Branch (511:6): [True: 0, False: 14]
  ------------------
  512|      0|    return CURLE_OUT_OF_MEMORY;
  513|       |
  514|     14|  ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  515|     14|  sa_un = (void *)ai->ai_addr;
  516|     14|  sa_un->sun_family = AF_UNIX;
  517|       |
  518|     14|  ai->ai_family = AF_UNIX;
  519|     14|  ai->ai_socktype = SOCK_STREAM; /* assume reliable transport for HTTP */
  520|     14|  ai->ai_addrlen = (curl_socklen_t)
  521|     14|    ((offsetof(struct sockaddr_un, sun_path) + path_len) & 0x7FFFFFFF);
  522|       |
  523|       |  /* Abstract Unix domain socket have NULL prefix instead of suffix */
  524|     14|  if(abstract)
  ------------------
  |  Branch (524:6): [True: 9, False: 5]
  ------------------
  525|      9|    memcpy(sa_un->sun_path + 1, path, path_len - 1);
  526|      5|  else
  527|      5|    memcpy(sa_un->sun_path, path, path_len); /* copy NUL byte */
  528|       |
  529|     14|  *paddr = ai;
  530|     14|  return CURLE_OK;
  531|     14|}
curl_dbg_freeaddrinfo:
  545|    220|{
  546|    220|  curl_dbg_log("ADDR %s:%d freeaddrinfo(%p)\n",
  547|    220|               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|    220|  freeaddrinfo(freethis);
  562|    220|#endif
  563|    220|}
curl_dbg_getaddrinfo:
  579|    985|{
  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|    985|  int res = getaddrinfo(hostname, service, hints, result);
  593|    985|#endif
  594|    985|  if(res == 0)
  ------------------
  |  Branch (594:6): [True: 220, False: 765]
  ------------------
  595|       |    /* success */
  596|    220|    curl_dbg_log("ADDR %s:%d getaddrinfo() = %p\n", source, line,
  597|    220|                 (void *)*result);
  598|    765|  else
  599|    765|    curl_dbg_log("ADDR %s:%d getaddrinfo() failed\n", source, line);
  600|    985|  return res;
  601|    985|}
curl_addrinfo.c:ip2addr:
  344|  5.15k|{
  345|  5.15k|  struct Curl_addrinfo *ai;
  346|  5.15k|  size_t addrsize;
  347|  5.15k|  size_t namelen;
  348|  5.15k|  struct sockaddr_in *addr;
  349|  5.15k|#ifdef USE_IPV6
  350|  5.15k|  struct sockaddr_in6 *addr6;
  351|  5.15k|#endif
  352|       |
  353|  5.15k|  DEBUGASSERT(inaddr && hostname);
  ------------------
  |  | 1081|  5.15k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (353:3): [True: 0, False: 5.15k]
  |  Branch (353:3): [True: 0, False: 0]
  |  Branch (353:3): [True: 5.15k, False: 0]
  |  Branch (353:3): [True: 5.15k, False: 0]
  ------------------
  354|       |
  355|  5.15k|  namelen = strlen(hostname) + 1;
  356|  5.15k|  *addrp = NULL;
  357|       |
  358|  5.15k|  if(af == AF_INET)
  ------------------
  |  Branch (358:6): [True: 5.13k, False: 28]
  ------------------
  359|  5.13k|    addrsize = sizeof(struct sockaddr_in);
  360|     28|#ifdef USE_IPV6
  361|     28|  else if(af == AF_INET6)
  ------------------
  |  Branch (361:11): [True: 28, False: 0]
  ------------------
  362|     28|    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.15k|  ai = curlx_calloc(1, sizeof(struct Curl_addrinfo) + addrsize + namelen);
  ------------------
  |  | 1480|  5.15k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  369|  5.15k|  if(!ai)
  ------------------
  |  Branch (369:6): [True: 0, False: 5.15k]
  ------------------
  370|      0|    return CURLE_OUT_OF_MEMORY;
  371|       |  /* put the address after the struct */
  372|  5.15k|  ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  373|       |  /* then put the name after the address */
  374|  5.15k|  ai->ai_canonname = (char *)ai->ai_addr + addrsize;
  375|  5.15k|  memcpy(ai->ai_canonname, hostname, namelen);
  376|  5.15k|  ai->ai_family = af;
  377|  5.15k|  ai->ai_socktype = SOCK_STREAM;
  378|  5.15k|  ai->ai_addrlen = (curl_socklen_t)addrsize;
  379|       |  /* leave the rest of the struct filled with zero */
  380|       |
  381|  5.15k|  switch(af) {
  ------------------
  |  Branch (381:10): [True: 5.15k, False: 0]
  ------------------
  382|  5.13k|  case AF_INET:
  ------------------
  |  Branch (382:3): [True: 5.13k, False: 28]
  ------------------
  383|  5.13k|    addr = (void *)ai->ai_addr; /* storage area for this info */
  384|       |
  385|  5.13k|    memcpy(&addr->sin_addr, inaddr, sizeof(struct in_addr));
  386|  5.13k|    addr->sin_family = (CURL_SA_FAMILY_T)af;
  387|  5.13k|    addr->sin_port = htons((unsigned short)port);
  388|  5.13k|    break;
  389|       |
  390|      0|#ifdef USE_IPV6
  391|     28|  case AF_INET6:
  ------------------
  |  Branch (391:3): [True: 28, False: 5.13k]
  ------------------
  392|     28|    addr6 = (void *)ai->ai_addr; /* storage area for this info */
  393|       |
  394|     28|    memcpy(&addr6->sin6_addr, inaddr, sizeof(struct in6_addr));
  395|     28|    addr6->sin6_family = (CURL_SA_FAMILY_T)af;
  396|     28|    addr6->sin6_port = htons((unsigned short)port);
  397|     28|    break;
  398|  5.15k|#endif
  399|  5.15k|  }
  400|  5.15k|  *addrp = ai;
  401|  5.15k|  return CURLE_OK;
  402|  5.15k|}

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

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

Curl_sasl_decode_mech:
   83|  31.9k|{
   84|  31.9k|  unsigned int i;
   85|  31.9k|  char c;
   86|       |
   87|   347k|  for(i = 0; mechtable[i].name; i++) {
  ------------------
  |  Branch (87:14): [True: 321k, False: 25.8k]
  ------------------
   88|   321k|    if(maxlen >= mechtable[i].len &&
  ------------------
  |  Branch (88:8): [True: 157k, False: 163k]
  ------------------
   89|   157k|       curl_strnequal(ptr, mechtable[i].name, mechtable[i].len)) {
  ------------------
  |  Branch (89:8): [True: 14.1k, False: 143k]
  ------------------
   90|  14.1k|      if(len)
  ------------------
  |  Branch (90:10): [True: 14.1k, False: 0]
  ------------------
   91|  14.1k|        *len = mechtable[i].len;
   92|       |
   93|  14.1k|      if(maxlen == mechtable[i].len)
  ------------------
  |  Branch (93:10): [True: 1.25k, False: 12.8k]
  ------------------
   94|  1.25k|        return mechtable[i].bit;
   95|       |
   96|  12.8k|      c = ptr[mechtable[i].len];
   97|  12.8k|      if(!ISUPPER(c) && !ISDIGIT(c) && c != '-' && c != '_')
  ------------------
  |  |   42|  25.7k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 7.24k, False: 5.65k]
  |  |  |  Branch (42:38): [True: 1.96k, False: 5.27k]
  |  |  ------------------
  ------------------
                    if(!ISUPPER(c) && !ISDIGIT(c) && c != '-' && c != '_')
  ------------------
  |  |   44|  23.8k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 7.73k, False: 3.19k]
  |  |  |  Branch (44:38): [True: 1.35k, False: 6.37k]
  |  |  ------------------
  ------------------
  |  Branch (97:40): [True: 8.07k, False: 1.49k]
  |  Branch (97:52): [True: 4.79k, False: 3.27k]
  ------------------
   98|  4.79k|        return mechtable[i].bit;
   99|  12.8k|    }
  100|   321k|  }
  101|       |
  102|  25.8k|  return 0;
  103|  31.9k|}
Curl_sasl_parse_url_auth_option:
  112|     70|{
  113|     70|  CURLcode result = CURLE_OK;
  114|     70|  size_t mechlen;
  115|       |
  116|     70|  if(!len)
  ------------------
  |  Branch (116:6): [True: 22, False: 48]
  ------------------
  117|     22|    return CURLE_URL_MALFORMAT;
  118|       |
  119|     48|  if(sasl->resetprefs) {
  ------------------
  |  Branch (119:6): [True: 31, False: 17]
  ------------------
  120|     31|    sasl->resetprefs = FALSE;
  ------------------
  |  | 1058|     31|#define FALSE false
  ------------------
  121|     31|    sasl->prefmech = SASL_AUTH_NONE;
  ------------------
  |  |   45|     31|#define SASL_AUTH_NONE          0
  ------------------
  122|     31|  }
  123|       |
  124|     48|  if(!strncmp(value, "*", len))
  ------------------
  |  Branch (124:6): [True: 6, False: 42]
  ------------------
  125|      6|    sasl->prefmech = SASL_AUTH_DEFAULT;
  ------------------
  |  |   47|      6|#define SASL_AUTH_DEFAULT       (SASL_AUTH_ANY & ~SASL_MECH_EXTERNAL)
  |  |  ------------------
  |  |  |  |   46|      6|#define SASL_AUTH_ANY           0xffff
  |  |  ------------------
  |  |               #define SASL_AUTH_DEFAULT       (SASL_AUTH_ANY & ~SASL_MECH_EXTERNAL)
  |  |  ------------------
  |  |  |  |   37|      6|#define SASL_MECH_EXTERNAL          (1 << 5)
  |  |  ------------------
  ------------------
  126|     42|  else {
  127|     42|    unsigned short mechbit = Curl_sasl_decode_mech(value, len, &mechlen);
  128|     42|    if(mechbit && mechlen == len)
  ------------------
  |  Branch (128:8): [True: 21, False: 21]
  |  Branch (128:19): [True: 15, False: 6]
  ------------------
  129|     15|      sasl->prefmech |= mechbit;
  130|     27|    else
  131|     27|      result = CURLE_URL_MALFORMAT;
  132|     42|  }
  133|       |
  134|     48|  return result;
  135|     70|}
Curl_sasl_init:
  144|  1.36k|{
  145|  1.36k|  unsigned long auth = data->set.httpauth;
  146|       |
  147|  1.36k|  sasl->params = params;           /* Set protocol dependent parameters */
  148|  1.36k|  sasl->state = SASL_STOP;         /* Not yet running */
  149|  1.36k|  sasl->curmech = NULL;            /* No mechanism yet. */
  150|  1.36k|  sasl->authmechs = SASL_AUTH_NONE; /* No known authentication mechanism yet */
  ------------------
  |  |   45|  1.36k|#define SASL_AUTH_NONE          0
  ------------------
  151|  1.36k|  sasl->prefmech = params->defmechs; /* Default preferred mechanisms */
  152|  1.36k|  sasl->authused = SASL_AUTH_NONE; /* The authentication mechanism used */
  ------------------
  |  |   45|  1.36k|#define SASL_AUTH_NONE          0
  ------------------
  153|  1.36k|  sasl->resetprefs = TRUE;         /* Reset prefmech upon AUTH parsing. */
  ------------------
  |  | 1055|  1.36k|#define TRUE true
  ------------------
  154|  1.36k|  sasl->mutual_auth = FALSE;       /* No mutual authentication (GSSAPI only) */
  ------------------
  |  | 1058|  1.36k|#define FALSE false
  ------------------
  155|  1.36k|  sasl->force_ir = FALSE;          /* Respect external option */
  ------------------
  |  | 1058|  1.36k|#define FALSE false
  ------------------
  156|       |
  157|  1.36k|  if(auth != CURLAUTH_BASIC) {
  ------------------
  |  |  831|  1.36k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (157:6): [True: 30, False: 1.33k]
  ------------------
  158|     30|    unsigned short mechs = SASL_AUTH_NONE;
  ------------------
  |  |   45|     30|#define SASL_AUTH_NONE          0
  ------------------
  159|       |
  160|       |    /* If some usable http authentication options have been set, determine
  161|       |       new defaults from them. */
  162|     30|    if(auth & CURLAUTH_BASIC)
  ------------------
  |  |  831|     30|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (162:8): [True: 13, False: 17]
  ------------------
  163|     13|      mechs |= SASL_MECH_PLAIN | SASL_MECH_LOGIN;
  ------------------
  |  |   33|     13|#define SASL_MECH_PLAIN             (1 << 1)
  ------------------
                    mechs |= SASL_MECH_PLAIN | SASL_MECH_LOGIN;
  ------------------
  |  |   32|     13|#define SASL_MECH_LOGIN             (1 << 0)
  ------------------
  164|     30|    if(auth & CURLAUTH_DIGEST)
  ------------------
  |  |  832|     30|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (164:8): [True: 22, False: 8]
  ------------------
  165|     22|      mechs |= SASL_MECH_DIGEST_MD5;
  ------------------
  |  |   35|     22|#define SASL_MECH_DIGEST_MD5        (1 << 3)
  ------------------
  166|     30|    if(auth & CURLAUTH_NTLM)
  ------------------
  |  |  838|     30|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (166:8): [True: 0, False: 30]
  ------------------
  167|      0|      mechs |= SASL_MECH_NTLM;
  ------------------
  |  |   38|      0|#define SASL_MECH_NTLM              (1 << 6)
  ------------------
  168|     30|    if(auth & CURLAUTH_BEARER)
  ------------------
  |  |  844|     30|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (168:8): [True: 17, False: 13]
  ------------------
  169|     17|      mechs |= SASL_MECH_OAUTHBEARER | SASL_MECH_XOAUTH2;
  ------------------
  |  |   40|     17|#define SASL_MECH_OAUTHBEARER       (1 << 8)
  ------------------
                    mechs |= SASL_MECH_OAUTHBEARER | SASL_MECH_XOAUTH2;
  ------------------
  |  |   39|     17|#define SASL_MECH_XOAUTH2           (1 << 7)
  ------------------
  170|     30|    if(auth & CURLAUTH_GSSAPI)
  ------------------
  |  |  837|     30|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|     30|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (170:8): [True: 0, False: 30]
  ------------------
  171|      0|      mechs |= SASL_MECH_GSSAPI;
  ------------------
  |  |   36|      0|#define SASL_MECH_GSSAPI            (1 << 4)
  ------------------
  172|       |
  173|     30|    if(mechs != SASL_AUTH_NONE)
  ------------------
  |  |   45|     30|#define SASL_AUTH_NONE          0
  ------------------
  |  Branch (173:8): [True: 25, False: 5]
  ------------------
  174|     25|      sasl->prefmech = mechs;
  175|     30|  }
  176|  1.36k|}
Curl_sasl_can_authenticate:
  277|    654|{
  278|       |  /* Have credentials been provided? */
  279|    654|  if(data->conn->creds)
  ------------------
  |  Branch (279:6): [True: 181, False: 473]
  ------------------
  280|    181|    return TRUE;
  ------------------
  |  | 1055|    181|#define TRUE true
  ------------------
  281|       |
  282|       |  /* EXTERNAL can authenticate without a username and/or password */
  283|    473|  if(sasl->authmechs & sasl->prefmech & SASL_MECH_EXTERNAL)
  ------------------
  |  |   37|    473|#define SASL_MECH_EXTERNAL          (1 << 5)
  ------------------
  |  Branch (283:6): [True: 0, False: 473]
  ------------------
  284|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  285|       |
  286|    473|  return FALSE;
  ------------------
  |  | 1058|    473|#define FALSE false
  ------------------
  287|    473|}
Curl_sasl_start:
  514|    177|{
  515|    177|  struct sasl_ctx sctx;
  516|       |
  517|    177|  sasl->force_ir = force_ir;    /* Latch for future use */
  518|    177|  sasl->authused = 0;           /* No mechanism used yet */
  519|    177|  *progress = SASL_IDLE;
  520|       |
  521|    177|  memset(&sctx, 0, sizeof(sctx));
  522|    177|  sctx.sasl = sasl;
  523|    177|  sctx.conn = data->conn;
  524|    177|  Curl_bufref_init(&sctx.resp);
  525|    177|  sctx.enabledmechs = sasl->authmechs & sasl->prefmech;
  526|    177|  sctx.state1 = SASL_STOP;
  527|    177|  sctx.state2 = SASL_FINAL;
  528|       |
  529|       |  /* Calculate the supported authentication mechanism, by decreasing order of
  530|       |     security, as well as the initial response where appropriate */
  531|    177|  if(sasl_choose_external(data, &sctx) ||
  ------------------
  |  Branch (531:6): [True: 0, False: 177]
  ------------------
  532|       |#ifdef USE_KERBEROS5
  533|       |     sasl_choose_krb5(data, &sctx) ||
  534|       |#endif
  535|       |#ifdef USE_GSASL
  536|       |     sasl_choose_gsasl(data, &sctx) ||
  537|       |#endif
  538|    177|#ifndef CURL_DISABLE_DIGEST_AUTH
  539|    177|     sasl_choose_digest(data, &sctx) ||
  ------------------
  |  Branch (539:6): [True: 117, False: 60]
  ------------------
  540|     60|#endif
  541|       |#ifdef USE_NTLM
  542|       |     sasl_choose_ntlm(data, &sctx) ||
  543|       |#endif
  544|     60|     sasl_choose_oauth(data, &sctx) ||
  ------------------
  |  Branch (544:6): [True: 0, False: 60]
  ------------------
  545|     60|     sasl_choose_oauth2(data, &sctx) ||
  ------------------
  |  Branch (545:6): [True: 0, False: 60]
  ------------------
  546|     60|     sasl_choose_plain(data, &sctx) ||
  ------------------
  |  Branch (546:6): [True: 7, False: 53]
  ------------------
  547|    141|     sasl_choose_login(data, &sctx)) {
  ------------------
  |  Branch (547:6): [True: 17, False: 36]
  ------------------
  548|       |    /* selected, either we have a mechanism or a failure */
  549|    141|    DEBUGASSERT(sctx.mech || sctx.result);
  ------------------
  |  | 1081|    141|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (549:5): [True: 141, False: 0]
  |  Branch (549:5): [True: 0, False: 0]
  |  Branch (549:5): [True: 141, False: 0]
  |  Branch (549:5): [True: 0, False: 0]
  ------------------
  550|    141|  }
  551|       |
  552|    177|  if(!sctx.result && sctx.mech) {
  ------------------
  |  Branch (552:6): [True: 177, False: 0]
  |  Branch (552:22): [True: 141, False: 36]
  ------------------
  553|    141|    sasl->curmech = sctx.mech;
  554|    141|    if(Curl_bufref_ptr(&sctx.resp))
  ------------------
  |  Branch (554:8): [True: 6, False: 135]
  ------------------
  555|      6|      sctx.result = build_message(sasl, &sctx.resp);
  556|       |
  557|    141|    if(sasl->params->maxirlen &&
  ------------------
  |  Branch (557:8): [True: 141, False: 0]
  ------------------
  558|    141|       strlen(sctx.mech) + Curl_bufref_len(&sctx.resp) >
  ------------------
  |  Branch (558:8): [True: 4, False: 137]
  ------------------
  559|    141|         sasl->params->maxirlen)
  560|      4|      Curl_bufref_free(&sctx.resp);
  561|       |
  562|    141|    if(!sctx.result)
  ------------------
  |  Branch (562:8): [True: 141, False: 0]
  ------------------
  563|    141|      sctx.result = sasl->params->sendauth(data, sctx.mech, &sctx.resp);
  564|       |
  565|    141|    if(!sctx.result) {
  ------------------
  |  Branch (565:8): [True: 141, False: 0]
  ------------------
  566|    141|      *progress = SASL_INPROGRESS;
  567|    141|      sasl_state(sasl, data, Curl_bufref_ptr(&sctx.resp) ?
  ------------------
  |  Branch (567:30): [True: 2, False: 139]
  ------------------
  568|    139|                 sctx.state2 : sctx.state1);
  569|    141|    }
  570|    141|  }
  571|       |
  572|    177|  Curl_bufref_free(&sctx.resp);
  573|    177|  return sctx.result;
  574|    177|}
Curl_sasl_continue:
  583|    200|{
  584|    200|  CURLcode result = CURLE_OK;
  585|    200|  struct connectdata *conn = data->conn;
  586|    200|  saslstate newstate = SASL_FINAL;
  587|    200|  struct bufref resp;
  588|    200|  const char *hostname;
  589|    200|  int port;
  590|    200|  struct bufref serverdata;
  591|       |
  592|    200|  Curl_conn_get_current_host(data, FIRSTSOCKET, &hostname, &port);
  ------------------
  |  |  303|    200|#define FIRSTSOCKET     0
  ------------------
  593|    200|  Curl_bufref_init(&serverdata);
  594|    200|  Curl_bufref_init(&resp);
  595|    200|  *progress = SASL_INPROGRESS;
  596|       |
  597|    200|  if(sasl->state == SASL_FINAL) {
  ------------------
  |  Branch (597:6): [True: 17, False: 183]
  ------------------
  598|     17|    if(code != sasl->params->finalcode)
  ------------------
  |  Branch (598:8): [True: 12, False: 5]
  ------------------
  599|     12|      result = CURLE_LOGIN_DENIED;
  600|     17|    *progress = SASL_DONE;
  601|     17|    sasl_state(sasl, data, SASL_STOP);
  602|     17|    return result;
  603|     17|  }
  604|       |
  605|    183|  if(sasl->state != SASL_CANCEL && sasl->state != SASL_OAUTH2_RESP &&
  ------------------
  |  Branch (605:6): [True: 149, False: 34]
  |  Branch (605:36): [True: 149, False: 0]
  ------------------
  606|    149|     code != sasl->params->contcode) {
  ------------------
  |  Branch (606:6): [True: 2, False: 147]
  ------------------
  607|      2|    *progress = SASL_DONE;
  608|      2|    sasl_state(sasl, data, SASL_STOP);
  609|      2|    return CURLE_LOGIN_DENIED;
  610|      2|  }
  611|       |
  612|    181|  switch(sasl->state) {
  613|      0|  case SASL_STOP:
  ------------------
  |  Branch (613:3): [True: 0, False: 181]
  ------------------
  614|      0|    *progress = SASL_DONE;
  615|      0|    return result;
  616|      7|  case SASL_PLAIN:
  ------------------
  |  Branch (616:3): [True: 7, False: 174]
  ------------------
  617|      7|    result = Curl_auth_create_plain_message(conn->creds, &resp);
  618|      7|    break;
  619|     13|  case SASL_LOGIN:
  ------------------
  |  Branch (619:3): [True: 13, False: 168]
  ------------------
  620|     13|    Curl_auth_create_login_message(Curl_creds_user(conn->creds), &resp);
  ------------------
  |  |   75|     13|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 13, False: 0]
  |  |  ------------------
  ------------------
  621|     13|    newstate = SASL_LOGIN_PASSWD;
  622|     13|    break;
  623|     13|  case SASL_LOGIN_PASSWD:
  ------------------
  |  Branch (623:3): [True: 13, False: 168]
  ------------------
  624|     13|    Curl_auth_create_login_message(Curl_creds_passwd(conn->creds), &resp);
  ------------------
  |  |   76|     13|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 13, False: 0]
  |  |  ------------------
  ------------------
  625|     13|    break;
  626|      0|  case SASL_EXTERNAL:
  ------------------
  |  Branch (626:3): [True: 0, False: 181]
  ------------------
  627|      0|    Curl_auth_create_external_message(Curl_creds_user(conn->creds), &resp);
  ------------------
  |  |   75|      0|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  628|      0|    break;
  629|       |#ifdef USE_GSASL
  630|       |  case SASL_GSASL:
  631|       |    result = get_server_message(sasl, data, &serverdata);
  632|       |    if(!result) {
  633|       |      struct gsasldata *gsasl = Curl_auth_gsasl_get(conn);
  634|       |      result = !gsasl ? CURLE_OUT_OF_MEMORY :
  635|       |        Curl_auth_gsasl_token(data, &serverdata, gsasl, &resp);
  636|       |    }
  637|       |    if(!result && Curl_bufref_len(&resp) > 0)
  638|       |      newstate = SASL_GSASL;
  639|       |    break;
  640|       |#endif
  641|      0|#ifndef CURL_DISABLE_DIGEST_AUTH
  642|     45|  case SASL_CRAMMD5:
  ------------------
  |  Branch (642:3): [True: 45, False: 136]
  ------------------
  643|     45|    result = get_server_message(sasl, data, &serverdata);
  644|     45|    if(!result)
  ------------------
  |  Branch (644:8): [True: 35, False: 10]
  ------------------
  645|     35|      result = Curl_auth_create_cram_md5_message(&serverdata, conn->creds,
  646|     35|                                                 &resp);
  647|     45|    break;
  648|     69|  case SASL_DIGESTMD5:
  ------------------
  |  Branch (648:3): [True: 69, False: 112]
  ------------------
  649|     69|    result = get_server_message(sasl, data, &serverdata);
  650|     69|    if(!result)
  ------------------
  |  Branch (650:8): [True: 32, False: 37]
  ------------------
  651|     32|      result = Curl_auth_create_digest_md5_message(data, &serverdata,
  652|     32|                                                   conn->creds,
  653|     32|                                                   sasl->params->service,
  654|     32|                                                   &resp);
  655|     69|    if(!result && (sasl->params->flags & SASL_FLAG_BASE64))
  ------------------
  |  |   63|      0|#define SASL_FLAG_BASE64        0x0001  /* Messages are base64-encoded */
  ------------------
  |  Branch (655:8): [True: 0, False: 69]
  |  Branch (655:19): [True: 0, False: 0]
  ------------------
  656|      0|      newstate = SASL_DIGESTMD5_RESP;
  657|     69|    break;
  658|      0|  case SASL_DIGESTMD5_RESP:
  ------------------
  |  Branch (658:3): [True: 0, False: 181]
  ------------------
  659|       |    /* Keep response NULL to output an empty line. */
  660|      0|    break;
  661|      0|#endif
  662|       |
  663|       |#ifdef USE_NTLM
  664|       |  case SASL_NTLM: {
  665|       |    /* Create the type-1 message */
  666|       |    struct ntlmdata *ntlm = Curl_auth_ntlm_get(conn, FALSE);
  667|       |    result = !ntlm ? CURLE_OUT_OF_MEMORY :
  668|       |      Curl_auth_create_ntlm_type1_message(data, conn->creds,
  669|       |                                          sasl->params->service, hostname,
  670|       |                                          ntlm, &resp);
  671|       |    newstate = SASL_NTLM_TYPE2MSG;
  672|       |    break;
  673|       |  }
  674|       |  case SASL_NTLM_TYPE2MSG: {
  675|       |    /* Decode the type-2 message */
  676|       |    struct ntlmdata *ntlm = Curl_auth_ntlm_get(conn, FALSE);
  677|       |    result = !ntlm ? CURLE_OUT_OF_MEMORY :
  678|       |      get_server_message(sasl, data, &serverdata);
  679|       |    if(!result)
  680|       |      result = Curl_auth_decode_ntlm_type2_message(data, &serverdata, ntlm);
  681|       |    if(!result)
  682|       |      result = Curl_auth_create_ntlm_type3_message(data, conn->creds,
  683|       |                                                   ntlm, &resp);
  684|       |    break;
  685|       |  }
  686|       |#endif
  687|       |
  688|       |#ifdef USE_KERBEROS5
  689|       |  case SASL_GSSAPI: {
  690|       |    struct kerberos5data *krb5 = Curl_auth_krb5_get(conn);
  691|       |    result = !krb5 ? CURLE_OUT_OF_MEMORY :
  692|       |      Curl_auth_create_gssapi_user_message(data, conn->creds,
  693|       |                                           sasl->params->service,
  694|       |                                           conn->origin->hostname,
  695|       |                                           (bool)sasl->mutual_auth, NULL,
  696|       |                                           krb5, &resp);
  697|       |    newstate = SASL_GSSAPI_TOKEN;
  698|       |    break;
  699|       |  }
  700|       |  case SASL_GSSAPI_TOKEN:
  701|       |    result = get_server_message(sasl, data, &serverdata);
  702|       |    if(!result) {
  703|       |      struct kerberos5data *krb5 = Curl_auth_krb5_get(conn);
  704|       |      if(!krb5)
  705|       |        result = CURLE_OUT_OF_MEMORY;
  706|       |      else if(sasl->mutual_auth) {
  707|       |        /* Decode the user token challenge and create the optional response
  708|       |           message */
  709|       |        result = Curl_auth_create_gssapi_user_message(data, NULL,
  710|       |                                                      NULL, NULL,
  711|       |                                                      (bool)sasl->mutual_auth,
  712|       |                                                      &serverdata,
  713|       |                                                      krb5, &resp);
  714|       |        newstate = SASL_GSSAPI_NO_DATA;
  715|       |      }
  716|       |      else
  717|       |        /* Decode the security challenge and create the response message */
  718|       |        result = Curl_auth_create_gssapi_security_message(
  719|       |          data, Curl_creds_sasl_authzid(conn->creds), &serverdata,
  720|       |          krb5, &resp);
  721|       |    }
  722|       |    break;
  723|       |  case SASL_GSSAPI_NO_DATA:
  724|       |    /* Decode the security challenge and create the response message */
  725|       |    result = get_server_message(sasl, data, &serverdata);
  726|       |    if(!result) {
  727|       |      struct kerberos5data *krb5 = Curl_auth_krb5_get(conn);
  728|       |      if(!krb5)
  729|       |        result = CURLE_OUT_OF_MEMORY;
  730|       |      else
  731|       |        result = Curl_auth_create_gssapi_security_message(
  732|       |          data, Curl_creds_sasl_authzid(conn->creds), &serverdata,
  733|       |          krb5, &resp);
  734|       |    }
  735|       |    break;
  736|       |#endif
  737|       |
  738|      0|  case SASL_OAUTH2:
  ------------------
  |  Branch (738:3): [True: 0, False: 181]
  ------------------
  739|       |    /* Create the authorization message */
  740|      0|    if(sasl->authused == SASL_MECH_OAUTHBEARER) {
  ------------------
  |  |   40|      0|#define SASL_MECH_OAUTHBEARER       (1 << 8)
  ------------------
  |  Branch (740:8): [True: 0, False: 0]
  ------------------
  741|      0|      result = Curl_auth_create_oauth_bearer_message(conn->creds,
  742|      0|                                                     hostname,
  743|      0|                                                     port,
  744|      0|                                                     &resp);
  745|       |
  746|       |      /* Failures maybe sent by the server as continuations for OAUTHBEARER */
  747|      0|      newstate = SASL_OAUTH2_RESP;
  748|      0|    }
  749|      0|    else
  750|      0|      result = Curl_auth_create_xoauth_bearer_message(conn->creds,
  751|      0|                                                      &resp);
  752|      0|    break;
  753|       |
  754|      0|  case SASL_OAUTH2_RESP:
  ------------------
  |  Branch (754:3): [True: 0, False: 181]
  ------------------
  755|       |    /* The continuation is optional so check the response code */
  756|      0|    if(code == sasl->params->finalcode) {
  ------------------
  |  Branch (756:8): [True: 0, False: 0]
  ------------------
  757|       |      /* Final response was received so we are done */
  758|      0|      *progress = SASL_DONE;
  759|      0|      sasl_state(sasl, data, SASL_STOP);
  760|      0|      return result;
  761|      0|    }
  762|      0|    else if(code == sasl->params->contcode) {
  ------------------
  |  Branch (762:13): [True: 0, False: 0]
  ------------------
  763|       |      /* Acknowledge the continuation by sending a 0x01 response. */
  764|      0|      Curl_bufref_set(&resp, "\x01", 1, NULL);
  765|      0|      break;
  766|      0|    }
  767|      0|    else {
  768|      0|      *progress = SASL_DONE;
  769|      0|      sasl_state(sasl, data, SASL_STOP);
  770|      0|      return CURLE_LOGIN_DENIED;
  771|      0|    }
  772|       |
  773|     34|  case SASL_CANCEL:
  ------------------
  |  Branch (773:3): [True: 34, False: 147]
  ------------------
  774|       |    /* Remove the offending mechanism from the supported list */
  775|     34|    sasl->authmechs &= (unsigned short)~sasl->authused;
  776|     34|    sasl->authused = SASL_AUTH_NONE;
  ------------------
  |  |   45|     34|#define SASL_AUTH_NONE          0
  ------------------
  777|     34|    sasl->curmech = NULL;
  778|       |
  779|       |    /* Start an alternative SASL authentication */
  780|     34|    return Curl_sasl_start(sasl, data, (bool)sasl->force_ir, progress);
  781|      0|  default:
  ------------------
  |  Branch (781:3): [True: 0, False: 181]
  ------------------
  782|      0|    failf(data, "Unsupported SASL authentication mechanism");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  783|      0|    result = CURLE_UNSUPPORTED_PROTOCOL;  /* Should not happen */
  784|      0|    break;
  785|    181|  }
  786|       |
  787|    147|  Curl_bufref_free(&serverdata);
  788|       |
  789|    147|  switch(result) {
  790|     79|  case CURLE_BAD_CONTENT_ENCODING:
  ------------------
  |  Branch (790:3): [True: 79, False: 68]
  ------------------
  791|       |    /* Cancel dialog */
  792|     79|    result = sasl->params->cancelauth(data, sasl->curmech);
  793|     79|    newstate = SASL_CANCEL;
  794|     79|    break;
  795|     68|  case CURLE_OK:
  ------------------
  |  Branch (795:3): [True: 68, False: 79]
  ------------------
  796|     68|    result = build_message(sasl, &resp);
  797|     68|    if(!result)
  ------------------
  |  Branch (797:8): [True: 68, False: 0]
  ------------------
  798|     68|      result = sasl->params->contauth(data, sasl->curmech, &resp);
  799|     68|    break;
  800|      0|  default:
  ------------------
  |  Branch (800:3): [True: 0, False: 147]
  ------------------
  801|      0|    newstate = SASL_STOP;    /* Stop on error */
  802|      0|    *progress = SASL_DONE;
  803|      0|    break;
  804|    147|  }
  805|       |
  806|    147|  Curl_bufref_free(&resp);
  807|       |
  808|    147|  sasl_state(sasl, data, newstate);
  809|       |
  810|    147|  return result;
  811|    147|}
Curl_sasl_is_blocked:
  847|      5|{
  848|      5|#ifdef CURLVERBOSE
  849|       |#ifdef USE_KERBEROS5
  850|       |#define CURL_SASL_KERBEROS5   TRUE
  851|       |#else
  852|      5|#define CURL_SASL_KERBEROS5   FALSE
  853|      5|#endif
  854|       |#ifdef USE_GSASL
  855|       |#define CURL_SASL_GASL        TRUE
  856|       |#else
  857|      5|#define CURL_SASL_GASL        FALSE
  858|      5|#endif
  859|       |#ifdef CURL_DISABLE_DIGEST_AUTH
  860|       |#define CURL_SASL_DIGEST      TRUE
  861|       |#else
  862|      5|#define CURL_SASL_DIGEST      FALSE
  863|      5|#endif
  864|      5|#ifndef USE_NTLM
  865|      5|#define CURL_SASL_NTLM        TRUE
  866|       |#else
  867|       |#define CURL_SASL_NTLM        FALSE
  868|       |#endif
  869|       |  /* Failing SASL authentication is a pain. Give a helping hand if
  870|       |   * we were unable to select an AUTH mechanism.
  871|       |   * `sasl->authmechs` are mechanisms offered by the peer
  872|       |   * `sasl->prefmech`  are mechanisms preferred by us */
  873|      5|  unsigned short enabledmechs = sasl->authmechs & sasl->prefmech;
  874|       |
  875|      5|  if(!sasl->authmechs)
  ------------------
  |  Branch (875:6): [True: 3, False: 2]
  ------------------
  876|      3|    infof(data, "SASL: no auth mechanism was offered or recognized");
  ------------------
  |  |  143|      3|  do {                               \
  |  |  144|      3|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      3|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 3, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  320|      3|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      3|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  877|      2|  else if(!enabledmechs)
  ------------------
  |  Branch (877:11): [True: 1, False: 1]
  ------------------
  878|      1|    infof(data, "SASL: no overlap between offered and configured "
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  320|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  879|      2|          "auth mechanisms");
  880|      1|  else {
  881|      1|    infof(data, "SASL: no auth mechanism offered could be selected");
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  320|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  882|      1|    if((enabledmechs & SASL_MECH_EXTERNAL) &&
  ------------------
  |  |   37|      1|#define SASL_MECH_EXTERNAL          (1 << 5)
  ------------------
  |  Branch (882:8): [True: 0, False: 1]
  ------------------
  883|      0|       Curl_creds_has_passwd(data->conn->creds))
  ------------------
  |  |   72|      0|#define Curl_creds_has_passwd(c)         ((c) && (c)->passwd[0])
  |  |  ------------------
  |  |  |  Branch (72:43): [True: 0, False: 0]
  |  |  |  Branch (72:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  884|      0|      infof(data, "SASL: auth EXTERNAL not chosen with password");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  885|      1|    sasl_unchosen(data, SASL_MECH_GSSAPI, enabledmechs,
  ------------------
  |  |   36|      1|#define SASL_MECH_GSSAPI            (1 << 4)
  ------------------
  886|      1|                  CURL_SASL_KERBEROS5, Curl_auth_is_gssapi_supported(), NULL);
  ------------------
  |  |  852|      1|#define CURL_SASL_KERBEROS5   FALSE
  |  |  ------------------
  |  |  |  | 1058|      1|#define FALSE false
  |  |  ------------------
  ------------------
                                CURL_SASL_KERBEROS5, Curl_auth_is_gssapi_supported(), NULL);
  ------------------
  |  |  276|      1|#define Curl_auth_is_gssapi_supported()       FALSE
  |  |  ------------------
  |  |  |  | 1058|      1|#define FALSE false
  |  |  ------------------
  ------------------
  887|      1|    sasl_unchosen(data, SASL_MECH_SCRAM_SHA_256, enabledmechs,
  ------------------
  |  |   42|      1|#define SASL_MECH_SCRAM_SHA_256     (1 << 10)
  ------------------
  888|      1|                  CURL_SASL_GASL, FALSE, NULL);
  ------------------
  |  |  857|      1|#define CURL_SASL_GASL        FALSE
  |  |  ------------------
  |  |  |  | 1058|      1|#define FALSE false
  |  |  ------------------
  ------------------
                                CURL_SASL_GASL, FALSE, NULL);
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
  889|      1|    sasl_unchosen(data, SASL_MECH_SCRAM_SHA_1, enabledmechs,
  ------------------
  |  |   41|      1|#define SASL_MECH_SCRAM_SHA_1       (1 << 9)
  ------------------
  890|      1|                  CURL_SASL_GASL, FALSE, NULL);
  ------------------
  |  |  857|      1|#define CURL_SASL_GASL        FALSE
  |  |  ------------------
  |  |  |  | 1058|      1|#define FALSE false
  |  |  ------------------
  ------------------
                                CURL_SASL_GASL, FALSE, NULL);
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
  891|      1|    sasl_unchosen(data, SASL_MECH_DIGEST_MD5, enabledmechs,
  ------------------
  |  |   35|      1|#define SASL_MECH_DIGEST_MD5        (1 << 3)
  ------------------
  892|      1|                  CURL_SASL_DIGEST, Curl_auth_is_digest_supported(), NULL);
  ------------------
  |  |  862|      1|#define CURL_SASL_DIGEST      FALSE
  |  |  ------------------
  |  |  |  | 1058|      1|#define FALSE false
  |  |  ------------------
  ------------------
  893|      1|    sasl_unchosen(data, SASL_MECH_CRAM_MD5, enabledmechs,
  ------------------
  |  |   34|      1|#define SASL_MECH_CRAM_MD5          (1 << 2)
  ------------------
  894|      1|                  CURL_SASL_DIGEST, TRUE, NULL);
  ------------------
  |  |  862|      1|#define CURL_SASL_DIGEST      FALSE
  |  |  ------------------
  |  |  |  | 1058|      1|#define FALSE false
  |  |  ------------------
  ------------------
                                CURL_SASL_DIGEST, TRUE, NULL);
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  895|      1|    sasl_unchosen(data, SASL_MECH_NTLM, enabledmechs,
  ------------------
  |  |   38|      1|#define SASL_MECH_NTLM              (1 << 6)
  ------------------
  896|      1|                  CURL_SASL_NTLM, Curl_auth_is_ntlm_supported(), NULL);
  ------------------
  |  |  865|      1|#define CURL_SASL_NTLM        TRUE
  |  |  ------------------
  |  |  |  | 1055|      1|#define TRUE true
  |  |  ------------------
  ------------------
                                CURL_SASL_NTLM, Curl_auth_is_ntlm_supported(), NULL);
  ------------------
  |  |  216|      1|#define Curl_auth_is_ntlm_supported()     FALSE
  |  |  ------------------
  |  |  |  | 1058|      1|#define FALSE false
  |  |  ------------------
  ------------------
  897|      1|    sasl_unchosen(data, SASL_MECH_OAUTHBEARER, enabledmechs, TRUE, TRUE,
  ------------------
  |  |   40|      1|#define SASL_MECH_OAUTHBEARER       (1 << 8)
  ------------------
                  sasl_unchosen(data, SASL_MECH_OAUTHBEARER, enabledmechs, TRUE, TRUE,
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
                  sasl_unchosen(data, SASL_MECH_OAUTHBEARER, enabledmechs, TRUE, TRUE,
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  898|      1|                  Curl_creds_has_oauth_bearer(data->conn->creds) ?
  ------------------
  |  |   73|      1|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (73:43): [True: 1, False: 0]
  |  |  |  Branch (73:50): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  899|      1|                  NULL : "CURLOPT_XOAUTH2_BEARER");
  900|      1|    sasl_unchosen(data, SASL_MECH_XOAUTH2, enabledmechs, TRUE, TRUE,
  ------------------
  |  |   39|      1|#define SASL_MECH_XOAUTH2           (1 << 7)
  ------------------
                  sasl_unchosen(data, SASL_MECH_XOAUTH2, enabledmechs, TRUE, TRUE,
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
                  sasl_unchosen(data, SASL_MECH_XOAUTH2, enabledmechs, TRUE, TRUE,
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  901|      1|                  Curl_creds_has_oauth_bearer(data->conn->creds) ?
  ------------------
  |  |   73|      1|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (73:43): [True: 1, False: 0]
  |  |  |  Branch (73:50): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  902|      1|                  NULL : "CURLOPT_XOAUTH2_BEARER");
  903|      1|  }
  904|      5|#endif /* CURLVERBOSE */
  905|      5|  (void)sasl;
  906|      5|  (void)data;
  907|      5|  return CURLE_LOGIN_DENIED;
  908|      5|}
curl_sasl.c:sasl_choose_external:
  301|    177|{
  302|    177|  if((sctx->enabledmechs & SASL_MECH_EXTERNAL) &&
  ------------------
  |  |   37|    177|#define SASL_MECH_EXTERNAL          (1 << 5)
  ------------------
  |  Branch (302:6): [True: 0, False: 177]
  ------------------
  303|      0|     !Curl_creds_has_passwd(sctx->conn->creds)) {
  ------------------
  |  |   72|      0|#define Curl_creds_has_passwd(c)         ((c) && (c)->passwd[0])
  |  |  ------------------
  |  |  |  Branch (72:43): [True: 0, False: 0]
  |  |  |  Branch (72:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  304|      0|    sctx->mech = SASL_MECH_STRING_EXTERNAL;
  ------------------
  |  |   55|      0|#define SASL_MECH_STRING_EXTERNAL       "EXTERNAL"
  ------------------
  305|      0|    sctx->state1 = SASL_EXTERNAL;
  306|      0|    sctx->sasl->authused = SASL_MECH_EXTERNAL;
  ------------------
  |  |   37|      0|#define SASL_MECH_EXTERNAL          (1 << 5)
  ------------------
  307|       |
  308|      0|    if(sctx->sasl->force_ir || data->set.sasl_ir)
  ------------------
  |  Branch (308:8): [True: 0, False: 0]
  |  Branch (308:32): [True: 0, False: 0]
  ------------------
  309|      0|      Curl_auth_create_external_message(
  310|      0|        Curl_creds_user(sctx->conn->creds), &sctx->resp);
  ------------------
  |  |   75|      0|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  311|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  312|      0|  }
  313|    177|  return FALSE;
  ------------------
  |  | 1058|    177|#define FALSE false
  ------------------
  314|    177|}
curl_sasl.c:sasl_choose_digest:
  390|    177|{
  391|    177|  (void)data;
  392|    177|  if((sctx->enabledmechs & SASL_MECH_DIGEST_MD5) &&
  ------------------
  |  |   35|    177|#define SASL_MECH_DIGEST_MD5        (1 << 3)
  ------------------
  |  Branch (392:6): [True: 71, False: 106]
  ------------------
  393|     71|     Curl_auth_is_digest_supported()) {
  ------------------
  |  Branch (393:6): [True: 71, False: 0]
  ------------------
  394|     71|    sctx->mech = SASL_MECH_STRING_DIGEST_MD5;
  ------------------
  |  |   53|     71|#define SASL_MECH_STRING_DIGEST_MD5     "DIGEST-MD5"
  ------------------
  395|     71|    sctx->state1 = SASL_DIGESTMD5;
  396|     71|    sctx->sasl->authused = SASL_MECH_DIGEST_MD5;
  ------------------
  |  |   35|     71|#define SASL_MECH_DIGEST_MD5        (1 << 3)
  ------------------
  397|     71|    return TRUE;
  ------------------
  |  | 1055|     71|#define TRUE true
  ------------------
  398|     71|  }
  399|    106|  else if(sctx->enabledmechs & SASL_MECH_CRAM_MD5) {
  ------------------
  |  |   34|    106|#define SASL_MECH_CRAM_MD5          (1 << 2)
  ------------------
  |  Branch (399:11): [True: 46, False: 60]
  ------------------
  400|     46|    sctx->mech = SASL_MECH_STRING_CRAM_MD5;
  ------------------
  |  |   52|     46|#define SASL_MECH_STRING_CRAM_MD5       "CRAM-MD5"
  ------------------
  401|     46|    sctx->state1 = SASL_CRAMMD5;
  402|     46|    sctx->sasl->authused = SASL_MECH_CRAM_MD5;
  ------------------
  |  |   34|     46|#define SASL_MECH_CRAM_MD5          (1 << 2)
  ------------------
  403|     46|    return TRUE;
  ------------------
  |  | 1055|     46|#define TRUE true
  ------------------
  404|     46|  }
  405|     60|  return FALSE;
  ------------------
  |  | 1058|     60|#define FALSE false
  ------------------
  406|    177|}
curl_sasl.c:sasl_choose_oauth:
  439|     60|{
  440|     60|  if(Curl_creds_has_oauth_bearer(data->state.creds) &&
  ------------------
  |  |   73|    120|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (73:43): [True: 60, False: 0]
  |  |  |  Branch (73:50): [True: 4, False: 56]
  |  |  ------------------
  ------------------
  441|      4|     (sctx->enabledmechs & SASL_MECH_OAUTHBEARER)) {
  ------------------
  |  |   40|      4|#define SASL_MECH_OAUTHBEARER       (1 << 8)
  ------------------
  |  Branch (441:6): [True: 0, False: 4]
  ------------------
  442|      0|    const char *hostname;
  443|      0|    int port;
  444|      0|    Curl_conn_get_current_host(data, FIRSTSOCKET, &hostname, &port);
  ------------------
  |  |  303|      0|#define FIRSTSOCKET     0
  ------------------
  445|       |
  446|      0|    sctx->mech = SASL_MECH_STRING_OAUTHBEARER;
  ------------------
  |  |   58|      0|#define SASL_MECH_STRING_OAUTHBEARER    "OAUTHBEARER"
  ------------------
  447|      0|    sctx->state1 = SASL_OAUTH2;
  448|      0|    sctx->state2 = SASL_OAUTH2_RESP;
  449|      0|    sctx->sasl->authused = SASL_MECH_OAUTHBEARER;
  ------------------
  |  |   40|      0|#define SASL_MECH_OAUTHBEARER       (1 << 8)
  ------------------
  450|       |
  451|      0|    if(sctx->sasl->force_ir || data->set.sasl_ir)
  ------------------
  |  Branch (451:8): [True: 0, False: 0]
  |  Branch (451:32): [True: 0, False: 0]
  ------------------
  452|      0|      sctx->result =
  453|      0|        Curl_auth_create_oauth_bearer_message(sctx->conn->creds,
  454|      0|                                              hostname, port, &sctx->resp);
  455|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  456|      0|  }
  457|     60|  return FALSE;
  ------------------
  |  | 1058|     60|#define FALSE false
  ------------------
  458|     60|}
curl_sasl.c:sasl_choose_oauth2:
  461|     60|{
  462|     60|  if(Curl_creds_has_oauth_bearer(sctx->conn->creds) &&
  ------------------
  |  |   73|    120|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (73:43): [True: 60, False: 0]
  |  |  |  Branch (73:50): [True: 4, False: 56]
  |  |  ------------------
  ------------------
  463|      4|     (sctx->enabledmechs & SASL_MECH_XOAUTH2)) {
  ------------------
  |  |   39|      4|#define SASL_MECH_XOAUTH2           (1 << 7)
  ------------------
  |  Branch (463:6): [True: 0, False: 4]
  ------------------
  464|      0|    sctx->mech = SASL_MECH_STRING_XOAUTH2;
  ------------------
  |  |   57|      0|#define SASL_MECH_STRING_XOAUTH2        "XOAUTH2"
  ------------------
  465|      0|    sctx->state1 = SASL_OAUTH2;
  466|      0|    sctx->sasl->authused = SASL_MECH_XOAUTH2;
  ------------------
  |  |   39|      0|#define SASL_MECH_XOAUTH2           (1 << 7)
  ------------------
  467|       |
  468|      0|    if(sctx->sasl->force_ir || data->set.sasl_ir)
  ------------------
  |  Branch (468:8): [True: 0, False: 0]
  |  Branch (468:32): [True: 0, False: 0]
  ------------------
  469|      0|      sctx->result = Curl_auth_create_xoauth_bearer_message(
  470|      0|        sctx->conn->creds, &sctx->resp);
  471|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  472|      0|  }
  473|     60|  return FALSE;
  ------------------
  |  | 1058|     60|#define FALSE false
  ------------------
  474|     60|}
curl_sasl.c:sasl_choose_plain:
  477|     60|{
  478|     60|  if(sctx->enabledmechs & SASL_MECH_PLAIN) {
  ------------------
  |  |   33|     60|#define SASL_MECH_PLAIN             (1 << 1)
  ------------------
  |  Branch (478:6): [True: 7, False: 53]
  ------------------
  479|      7|    sctx->mech = SASL_MECH_STRING_PLAIN;
  ------------------
  |  |   51|      7|#define SASL_MECH_STRING_PLAIN          "PLAIN"
  ------------------
  480|      7|    sctx->state1 = SASL_PLAIN;
  481|      7|    sctx->sasl->authused = SASL_MECH_PLAIN;
  ------------------
  |  |   33|      7|#define SASL_MECH_PLAIN             (1 << 1)
  ------------------
  482|       |
  483|      7|    if(sctx->sasl->force_ir || data->set.sasl_ir)
  ------------------
  |  Branch (483:8): [True: 0, False: 7]
  |  Branch (483:32): [True: 1, False: 6]
  ------------------
  484|      1|      sctx->result =
  485|      1|        Curl_auth_create_plain_message(sctx->conn->creds, &sctx->resp);
  486|      7|    return TRUE;
  ------------------
  |  | 1055|      7|#define TRUE true
  ------------------
  487|      7|  }
  488|     53|  return FALSE;
  ------------------
  |  | 1058|     53|#define FALSE false
  ------------------
  489|     60|}
curl_sasl.c:sasl_choose_login:
  492|     53|{
  493|     53|  if(sctx->enabledmechs & SASL_MECH_LOGIN) {
  ------------------
  |  |   32|     53|#define SASL_MECH_LOGIN             (1 << 0)
  ------------------
  |  Branch (493:6): [True: 17, False: 36]
  ------------------
  494|     17|    sctx->mech = SASL_MECH_STRING_LOGIN;
  ------------------
  |  |   50|     17|#define SASL_MECH_STRING_LOGIN          "LOGIN"
  ------------------
  495|     17|    sctx->state1 = SASL_LOGIN;
  496|     17|    sctx->state2 = SASL_LOGIN_PASSWD;
  497|     17|    sctx->sasl->authused = SASL_MECH_LOGIN;
  ------------------
  |  |   32|     17|#define SASL_MECH_LOGIN             (1 << 0)
  ------------------
  498|       |
  499|     17|    if(sctx->sasl->force_ir || data->set.sasl_ir)
  ------------------
  |  Branch (499:8): [True: 0, False: 17]
  |  Branch (499:32): [True: 5, False: 12]
  ------------------
  500|      5|      Curl_auth_create_login_message(
  501|      5|        Curl_creds_user(sctx->conn->creds), &sctx->resp);
  ------------------
  |  |   75|      5|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 5, False: 0]
  |  |  ------------------
  ------------------
  502|     17|    return TRUE;
  ------------------
  |  | 1055|     17|#define TRUE true
  ------------------
  503|     17|  }
  504|     36|  return FALSE;
  ------------------
  |  | 1058|     36|#define FALSE false
  ------------------
  505|     53|}
curl_sasl.c:build_message:
  249|     74|{
  250|     74|  CURLcode result = CURLE_OK;
  251|       |
  252|     74|  if(sasl->params->flags & SASL_FLAG_BASE64) {
  ------------------
  |  |   63|     74|#define SASL_FLAG_BASE64        0x0001  /* Messages are base64-encoded */
  ------------------
  |  Branch (252:6): [True: 74, False: 0]
  ------------------
  253|     74|    if(!Curl_bufref_ptr(msg))                   /* Empty message. */
  ------------------
  |  Branch (253:8): [True: 0, False: 74]
  ------------------
  254|      0|      Curl_bufref_set(msg, "", 0, NULL);
  255|     74|    else if(!Curl_bufref_len(msg))              /* Explicit empty response. */
  ------------------
  |  Branch (255:13): [True: 8, False: 66]
  ------------------
  256|      8|      Curl_bufref_set(msg, "=", 1, NULL);
  257|     66|    else {
  258|     66|      char *base64;
  259|     66|      size_t base64len;
  260|       |
  261|     66|      result = curlx_base64_encode(Curl_bufref_uptr(msg),
  262|     66|                                   Curl_bufref_len(msg), &base64, &base64len);
  263|     66|      if(!result)
  ------------------
  |  Branch (263:10): [True: 66, False: 0]
  ------------------
  264|     66|        Curl_bufref_set(msg, base64, base64len, curl_free);
  265|     66|    }
  266|     74|  }
  267|       |
  268|     74|  return result;
  269|     74|}
curl_sasl.c:sasl_state:
  185|    307|{
  186|    307|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  187|       |  /* for debug purposes */
  188|    307|  static const char * const names[] = {
  189|    307|    "STOP",
  190|    307|    "PLAIN",
  191|    307|    "LOGIN",
  192|    307|    "LOGIN_PASSWD",
  193|    307|    "EXTERNAL",
  194|    307|    "CRAMMD5",
  195|    307|    "DIGESTMD5",
  196|    307|    "DIGESTMD5_RESP",
  197|    307|    "NTLM",
  198|    307|    "NTLM_TYPE2MSG",
  199|    307|    "GSSAPI",
  200|    307|    "GSSAPI_TOKEN",
  201|    307|    "GSSAPI_NO_DATA",
  202|    307|    "OAUTH2",
  203|    307|    "OAUTH2_RESP",
  204|    307|    "GSASL",
  205|    307|    "CANCEL",
  206|    307|    "FINAL",
  207|       |    /* LAST */
  208|    307|  };
  209|       |
  210|    307|  if(sasl->state != newstate)
  ------------------
  |  Branch (210:6): [True: 307, False: 0]
  ------------------
  211|    307|    infof(data, "SASL %p state change from %s to %s",
  ------------------
  |  |  143|    307|  do {                               \
  |  |  144|    307|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    307|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 307, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 307]
  |  |  |  |  ------------------
  |  |  |  |  320|    307|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    307|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    307|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 307]
  |  |  ------------------
  ------------------
  212|    307|          (void *)sasl, names[sasl->state], names[newstate]);
  213|       |#else
  214|       |  (void)data;
  215|       |#endif
  216|       |
  217|    307|  sasl->state = newstate;
  218|    307|}
curl_sasl.c:get_server_message:
  225|    114|{
  226|    114|  CURLcode result = CURLE_OK;
  227|       |
  228|    114|  result = sasl->params->getmessage(data, out);
  229|    114|  if(!result && (sasl->params->flags & SASL_FLAG_BASE64)) {
  ------------------
  |  |   63|    114|#define SASL_FLAG_BASE64        0x0001  /* Messages are base64-encoded */
  ------------------
  |  Branch (229:6): [True: 114, False: 0]
  |  Branch (229:17): [True: 114, False: 0]
  ------------------
  230|    114|    const char *serverdata = Curl_bufref_ptr(out);
  231|       |
  232|    114|    if(!*serverdata || *serverdata == '=')
  ------------------
  |  Branch (232:8): [True: 44, False: 70]
  |  Branch (232:24): [True: 1, False: 69]
  ------------------
  233|     45|      Curl_bufref_set(out, NULL, 0, NULL);
  234|     69|    else {
  235|     69|      unsigned char *msg;
  236|     69|      size_t msglen;
  237|       |
  238|     69|      result = curlx_base64_decode(serverdata, &msg, &msglen);
  239|     69|      if(!result)
  ------------------
  |  Branch (239:10): [True: 22, False: 47]
  ------------------
  240|     22|        Curl_bufref_set(out, msg, msglen, curl_free);
  241|     69|    }
  242|    114|  }
  243|    114|  return result;
  244|    114|}
curl_sasl.c:sasl_unchosen:
  818|      8|{
  819|      8|  const char *mname = NULL;
  820|      8|  size_t i;
  821|       |
  822|      8|  if(!(enabledmechs & mech))
  ------------------
  |  Branch (822:6): [True: 7, False: 1]
  ------------------
  823|      7|    return;
  824|       |
  825|      7|  for(i = 0; mechtable[i].name; ++i) {
  ------------------
  |  Branch (825:14): [True: 7, False: 0]
  ------------------
  826|      7|    if(mechtable[i].bit == mech) {
  ------------------
  |  Branch (826:8): [True: 1, False: 6]
  ------------------
  827|      1|      mname = mechtable[i].name;
  828|      1|      break;
  829|      1|    }
  830|      7|  }
  831|      1|  if(!mname)  /* should not happen */
  ------------------
  |  Branch (831:6): [True: 0, False: 1]
  ------------------
  832|      0|    return;
  833|      1|  if(!built_in)
  ------------------
  |  Branch (833:6): [True: 0, False: 1]
  ------------------
  834|      0|    infof(data, "SASL: %s not builtin", mname);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  835|      1|  else if(!platform)
  ------------------
  |  Branch (835:11): [True: 1, False: 0]
  ------------------
  836|      1|    infof(data, "SASL: %s not supported by the platform/libraries", mname);
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  320|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  837|      0|  else {
  838|      0|    if(param_missing)
  ------------------
  |  Branch (838:8): [True: 0, False: 0]
  ------------------
  839|      0|      infof(data, "SASL: %s is missing %s", mname, param_missing);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  840|      0|    if(!Curl_creds_has_user(data->conn->creds))
  ------------------
  |  |   71|      0|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (71:43): [True: 0, False: 0]
  |  |  |  Branch (71:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  841|      0|      infof(data, "SASL: %s is missing username", mname);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  842|      0|  }
  843|      1|}

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

Curl_thread_create:
   52|    958|{
   53|    958|  curl_thread_t t = curlx_malloc(sizeof(pthread_t));
  ------------------
  |  |   33|    958|#  define curl_thread_t          pthread_t *
  ------------------
                curl_thread_t t = curlx_malloc(sizeof(pthread_t));
  ------------------
  |  | 1478|    958|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   54|    958|  struct Curl_actual_call *ac = NULL;
   55|    958|  int rc;
   56|       |
   57|    958|  if(t)
  ------------------
  |  Branch (57:6): [True: 958, False: 0]
  ------------------
   58|    958|    ac = curlx_malloc(sizeof(struct Curl_actual_call));
  ------------------
  |  | 1478|    958|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   59|    958|  if(!(ac && t))
  ------------------
  |  Branch (59:8): [True: 958, False: 0]
  |  Branch (59:14): [True: 958, False: 0]
  ------------------
   60|      0|    goto err;
   61|       |
   62|    958|  ac->func = func;
   63|    958|  ac->arg = arg;
   64|       |
   65|    958|  rc = pthread_create(t, NULL, curl_thread_create_thunk, ac);
   66|    958|  if(rc) {
  ------------------
  |  Branch (66:6): [True: 0, False: 958]
  ------------------
   67|      0|    errno = rc;
   68|      0|    goto err;
   69|      0|  }
   70|       |
   71|    958|  return t;
   72|       |
   73|      0|err:
   74|      0|  curlx_free(t);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|      0|  curlx_free(ac);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   76|      0|  return curl_thread_t_null;
  ------------------
  |  |   34|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
   77|    958|}
Curl_thread_join:
   89|    958|{
   90|    958|  int ret = (pthread_join(**hnd, NULL) == 0);
   91|       |
   92|    958|  curlx_free(*hnd);
  ------------------
  |  | 1483|    958|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   93|    958|  *hnd = curl_thread_t_null;
  ------------------
  |  |   34|    958|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
   94|       |
   95|    958|  return ret;
   96|    958|}
Curl_cond_signal:
  142|  3.05k|{
  143|       |  /* return code defined as always 0 */
  144|  3.05k|  (void)pthread_cond_signal(c);
  145|  3.05k|}
Curl_cond_wait:
  148|    807|{
  149|       |  /* return code defined as always 0 */
  150|    807|  (void)pthread_cond_wait(c, m);
  151|    807|}
Curl_cond_timedwait:
  155|    826|{
  156|    826|  struct curltime now;
  157|    826|  struct timespec ts;
  158|    826|  timediff_t usec;
  159|    826|  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|    826|#ifdef HAVE_GETTIMEOFDAY
  166|    826|  struct timeval tv;
  167|    826|  (void)gettimeofday(&tv, NULL);
  168|    826|  now.tv_sec = tv.tv_sec;
  169|    826|  now.tv_usec = (int)tv.tv_usec;
  170|       |#else
  171|       |  now.tv_sec = time(NULL);
  172|       |  now.tv_usec = 0;
  173|       |#endif
  174|       |
  175|    826|  ts.tv_sec = now.tv_sec + (timeout_ms / 1000);
  176|    826|  usec = now.tv_usec + ((timeout_ms % 1000) * 1000);
  177|    826|  if(usec >= 1000000) {
  ------------------
  |  Branch (177:6): [True: 0, False: 826]
  ------------------
  178|      0|    ++ts.tv_sec;
  179|      0|    usec %= 1000000;
  180|      0|  }
  181|    826|  ts.tv_nsec = (long)usec * 1000;
  182|       |
  183|    826|  rc = pthread_cond_timedwait(c, m, &ts);
  184|    826|  if(rc == SOCKETIMEDOUT)
  ------------------
  |  | 1135|    826|#define SOCKETIMEDOUT     ETIMEDOUT
  ------------------
  |  Branch (184:6): [True: 0, False: 826]
  ------------------
  185|      0|    return CURLE_OPERATION_TIMEDOUT;
  186|    826|  return rc ? CURLE_UNRECOVERABLE_POLL : CURLE_OK;
  ------------------
  |  Branch (186:10): [True: 0, False: 826]
  ------------------
  187|    826|}
curl_threads.c:curl_thread_create_thunk:
   38|    957|{
   39|    957|  struct Curl_actual_call *ac = arg;
   40|    957|  unsigned int (*func)(void *) = ac->func;
   41|    957|  void *real_arg = ac->arg;
   42|       |
   43|    957|  curlx_free(ac);
  ------------------
  |  | 1483|    957|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   44|       |
   45|    957|  (*func)(real_arg);
   46|       |
   47|    957|  return 0;
   48|    957|}

Curl_debug:
  129|  2.00M|{
  130|  2.00M|  if(data->set.verbose) {
  ------------------
  |  Branch (130:6): [True: 0, False: 2.00M]
  ------------------
  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|      bool inCallback = Curl_is_in_callback(data);
  137|       |
  138|      0|      if(CURL_TRC_IDS(data) && (size < TRC_LINE_MAX)) {
  ------------------
  |  |   90|      0|  (Curl_trc_is_verbose(data) && \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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 (138:32): [True: 0, False: 0]
  ------------------
  139|      0|        len = trc_print_ids(data, buf, TRC_LINE_MAX);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  140|      0|        len += curl_msnprintf(buf + len, TRC_LINE_MAX - len, "%.*s",
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  141|      0|                              (int)size, ptr);
  142|      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);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  143|      0|        Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  144|      0|        (void)(*data->set.fdebug)(data, type, buf, len, data->set.debugdata);
  145|      0|        Curl_set_in_callback(data, inCallback);
  146|      0|      }
  147|      0|      else {
  148|      0|        Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  149|      0|        (void)(*data->set.fdebug)(data, type, CURL_UNCONST(ptr),
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  150|      0|                                  size, data->set.debugdata);
  151|      0|        Curl_set_in_callback(data, inCallback);
  152|      0|      }
  153|      0|    }
  154|      0|    else {
  155|      0|      switch(type) {
  156|      0|      case CURLINFO_TEXT:
  ------------------
  |  Branch (156:7): [True: 0, False: 0]
  ------------------
  157|      0|      case CURLINFO_HEADER_OUT:
  ------------------
  |  Branch (157:7): [True: 0, False: 0]
  ------------------
  158|      0|      case CURLINFO_HEADER_IN:
  ------------------
  |  Branch (158:7): [True: 0, False: 0]
  ------------------
  159|      0|#ifndef CURL_DISABLE_VERBOSE_STRINGS
  160|      0|        if(CURL_TRC_IDS(data)) {
  ------------------
  |  |   90|      0|  (Curl_trc_is_verbose(data) && \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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]
  |  |  ------------------
  ------------------
  161|      0|          len = trc_print_ids(data, buf, TRC_LINE_MAX);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  162|      0|          fwrite(buf, len, 1, data->set.err);
  163|      0|        }
  164|      0|#endif
  165|      0|        fwrite(s_infotype[type], 2, 1, data->set.err);
  166|      0|        fwrite(ptr, size, 1, data->set.err);
  167|      0|        break;
  168|      0|      default: /* nada */
  ------------------
  |  Branch (168:7): [True: 0, False: 0]
  ------------------
  169|      0|        break;
  170|      0|      }
  171|      0|    }
  172|      0|  }
  173|  2.00M|}
Curl_failf:
  179|  13.2k|{
  180|  13.2k|  DEBUGASSERT(!strchr(fmt, '\n'));
  ------------------
  |  | 1081|  13.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (180:3): [True: 0, False: 13.2k]
  |  Branch (180:3): [True: 13.2k, False: 0]
  ------------------
  181|  13.2k|  if(data->set.verbose || data->set.errorbuffer) {
  ------------------
  |  Branch (181:6): [True: 0, False: 13.2k]
  |  Branch (181:27): [True: 0, False: 13.2k]
  ------------------
  182|      0|    va_list ap;
  183|      0|    size_t len;
  184|      0|    char error[CURL_ERROR_SIZE + 2];
  185|      0|    va_start(ap, fmt);
  186|      0|    len = curl_mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
  ------------------
  |  |  867|      0|#define CURL_ERROR_SIZE 256
  ------------------
  187|       |
  188|      0|    if(data->set.errorbuffer && !data->state.errorbuf) {
  ------------------
  |  Branch (188:8): [True: 0, False: 0]
  |  Branch (188:33): [True: 0, False: 0]
  ------------------
  189|      0|      curlx_strcopy(data->set.errorbuffer, CURL_ERROR_SIZE, error, len);
  ------------------
  |  |  867|      0|#define CURL_ERROR_SIZE 256
  ------------------
  190|      0|      data->state.errorbuf = TRUE; /* wrote error string */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  191|      0|    }
  192|      0|    error[len++] = '\n';
  193|      0|    error[len] = '\0';
  194|      0|    trc_write(data, CURLINFO_TEXT, error, len);
  195|       |    va_end(ap);
  196|      0|  }
  197|  13.2k|}
Curl_reset_fail:
  200|  80.1k|{
  201|  80.1k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (201:6): [True: 0, False: 80.1k]
  ------------------
  202|      0|    data->set.errorbuffer[0] = 0;
  203|       |  data->state.errorbuf = FALSE;
  ------------------
  |  | 1058|  80.1k|#define FALSE false
  ------------------
  204|  80.1k|}
Curl_trc_opt:
  667|      1|{
  668|      1|  CURLcode result = config ? trc_opt(config) : CURLE_OK;
  ------------------
  |  Branch (668:21): [True: 0, False: 1]
  ------------------
  669|      1|#ifdef DEBUGBUILD
  670|       |  /* CURL_DEBUG can override anything */
  671|      1|  if(!result) {
  ------------------
  |  Branch (671:6): [True: 1, False: 0]
  ------------------
  672|      1|    const char *dbg_config = getenv("CURL_DEBUG");
  673|      1|    if(dbg_config)
  ------------------
  |  Branch (673:8): [True: 0, False: 1]
  ------------------
  674|      0|      result = trc_opt(dbg_config);
  675|      1|  }
  676|      1|#endif /* DEBUGBUILD */
  677|      1|  return result;
  678|      1|}
Curl_trc_init:
  681|      1|{
  682|      1|#ifdef DEBUGBUILD
  683|      1|  return Curl_trc_opt(NULL);
  684|       |#else
  685|       |  return CURLE_OK;
  686|       |#endif
  687|      1|}

curlx_base64_decode:
   63|     69|{
   64|     69|  size_t srclen = 0;
   65|     69|  size_t padding = 0;
   66|     69|  size_t i;
   67|     69|  size_t numQuantums;
   68|     69|  size_t fullQuantums;
   69|     69|  size_t rawlen = 0;
   70|     69|  unsigned char *pos;
   71|     69|  unsigned char *newstr;
   72|     69|  unsigned char lookup[256];
   73|       |
   74|     69|  *outptr = NULL;
   75|     69|  *outlen = 0;
   76|     69|  srclen = strlen(src);
   77|       |
   78|       |  /* Check the length of the input string is valid */
   79|     69|  if(!srclen || srclen % 4)
  ------------------
  |  Branch (79:6): [True: 0, False: 69]
  |  Branch (79:17): [True: 27, False: 42]
  ------------------
   80|     27|    return CURLE_BAD_CONTENT_ENCODING;
   81|       |
   82|       |  /* srclen is at least 4 here */
   83|     54|  while(src[srclen - 1 - padding] == '=') {
  ------------------
  |  Branch (83:9): [True: 13, False: 41]
  ------------------
   84|       |    /* count padding characters */
   85|     13|    padding++;
   86|       |    /* A maximum of two = padding characters is allowed */
   87|     13|    if(padding > 2)
  ------------------
  |  Branch (87:8): [True: 1, False: 12]
  ------------------
   88|      1|      return CURLE_BAD_CONTENT_ENCODING;
   89|     13|  }
   90|       |
   91|       |  /* Calculate the number of quantums */
   92|     41|  numQuantums = srclen / 4;
   93|     41|  fullQuantums = numQuantums - (padding ? 1 : 0);
  ------------------
  |  Branch (93:33): [True: 8, False: 33]
  ------------------
   94|       |
   95|       |  /* Calculate the size of the decoded string */
   96|     41|  rawlen = (numQuantums * 3) - padding;
   97|       |
   98|       |  /* Allocate our buffer including room for a null-terminator */
   99|     41|  newstr = curlx_malloc(rawlen + 1);
  ------------------
  |  | 1478|     41|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  100|     41|  if(!newstr)
  ------------------
  |  Branch (100:6): [True: 0, False: 41]
  ------------------
  101|      0|    return CURLE_OUT_OF_MEMORY;
  102|       |
  103|     41|  pos = newstr;
  104|       |
  105|     41|  memset(lookup, 0xff, sizeof(lookup));
  106|     41|  memcpy(&lookup['+'], decodetable, sizeof(decodetable));
  107|       |
  108|       |  /* Decode the complete quantums first */
  109|    595|  for(i = 0; i < fullQuantums; i++) {
  ------------------
  |  Branch (109:14): [True: 569, False: 26]
  ------------------
  110|    569|    unsigned char val;
  111|    569|    unsigned int x = 0;
  112|    569|    int j;
  113|       |
  114|  2.80k|    for(j = 0; j < 4; j++) {
  ------------------
  |  Branch (114:16): [True: 2.24k, False: 554]
  ------------------
  115|  2.24k|      val = lookup[(unsigned char)*src++];
  116|  2.24k|      if(val == 0xff) /* bad symbol */
  ------------------
  |  Branch (116:10): [True: 15, False: 2.23k]
  ------------------
  117|     15|        goto bad;
  118|  2.23k|      x = (x << 6) | val;
  119|  2.23k|    }
  120|    554|    pos[2] = x & 0xff;
  121|    554|    pos[1] = (x >> 8) & 0xff;
  122|    554|    pos[0] = (x >> 16) & 0xff;
  123|    554|    pos += 3;
  124|    554|  }
  125|     26|  if(padding) {
  ------------------
  |  Branch (125:6): [True: 6, False: 20]
  ------------------
  126|       |    /* this means either 8 or 16 bits output */
  127|      6|    unsigned char val;
  128|      6|    unsigned int x = 0;
  129|      6|    int j;
  130|      6|    size_t padc = 0;
  131|     20|    for(j = 0; j < 4; j++) {
  ------------------
  |  Branch (131:16): [True: 18, False: 2]
  ------------------
  132|     18|      if(*src == '=') {
  ------------------
  |  Branch (132:10): [True: 7, False: 11]
  ------------------
  133|      7|        x <<= 6;
  134|      7|        src++;
  135|      7|        if(++padc > padding)
  ------------------
  |  Branch (135:12): [True: 1, False: 6]
  ------------------
  136|       |          /* this is a badly placed '=' symbol! */
  137|      1|          goto bad;
  138|      7|      }
  139|     11|      else {
  140|     11|        val = lookup[(unsigned char)*src++];
  141|     11|        if(val == 0xff) /* bad symbol */
  ------------------
  |  Branch (141:12): [True: 3, False: 8]
  ------------------
  142|      3|          goto bad;
  143|      8|        x = (x << 6) | val;
  144|      8|      }
  145|     18|    }
  146|      2|    if(padding == 1)
  ------------------
  |  Branch (146:8): [True: 1, False: 1]
  ------------------
  147|      1|      pos[1] = (x >> 8) & 0xff;
  148|      2|    pos[0] = (x >> 16) & 0xff;
  149|      2|    pos += 3 - padding;
  150|      2|  }
  151|       |
  152|       |  /* Null-terminate */
  153|     22|  *pos = '\0';
  154|       |
  155|       |  /* Return the decoded data */
  156|     22|  *outptr = newstr;
  157|     22|  *outlen = rawlen;
  158|       |
  159|     22|  return CURLE_OK;
  160|     19|bad:
  161|     19|  curlx_free(newstr);
  ------------------
  |  | 1483|     19|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  162|     19|  return CURLE_BAD_CONTENT_ENCODING;
  163|     26|}
curlx_base64_encode:
  243|    358|{
  244|    358|  return base64_encode(curlx_base64encdec, '=',
  245|    358|                       inputbuff, insize, outptr, outlen);
  246|    358|}
base64.c:base64_encode:
  169|    358|{
  170|    358|  char *output;
  171|    358|  char *base64data;
  172|    358|  const unsigned char *in = (const unsigned char *)inputbuff;
  173|       |
  174|    358|  *outptr = NULL;
  175|    358|  *outlen = 0;
  176|       |
  177|    358|  if(!insize)
  ------------------
  |  Branch (177:6): [True: 0, False: 358]
  ------------------
  178|      0|    return CURLE_OK;
  179|       |
  180|       |  /* safety precaution */
  181|    358|  DEBUGASSERT(insize <= CURL_MAX_BASE64_INPUT);
  ------------------
  |  | 1081|    358|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (181:3): [True: 0, False: 358]
  |  Branch (181:3): [True: 358, False: 0]
  ------------------
  182|    358|  if(insize > CURL_MAX_BASE64_INPUT)
  ------------------
  |  |   38|    358|#define CURL_MAX_BASE64_INPUT 16000000
  ------------------
  |  Branch (182:6): [True: 0, False: 358]
  ------------------
  183|      0|    return CURLE_TOO_LARGE;
  184|       |
  185|    358|  base64data = output = curlx_malloc(((insize + 2) / 3 * 4) + 1);
  ------------------
  |  | 1478|    358|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  186|    358|  if(!output)
  ------------------
  |  Branch (186:6): [True: 0, False: 358]
  ------------------
  187|      0|    return CURLE_OUT_OF_MEMORY;
  188|       |
  189|   115k|  while(insize >= 3) {
  ------------------
  |  Branch (189:9): [True: 114k, False: 358]
  ------------------
  190|   114k|    *output++ = table64[in[0] >> 2];
  191|   114k|    *output++ = table64[((in[0] & 0x03) << 4) | (in[1] >> 4)];
  192|   114k|    *output++ = table64[((in[1] & 0x0F) << 2) | ((in[2] & 0xC0) >> 6)];
  193|   114k|    *output++ = table64[in[2] & 0x3F];
  194|   114k|    insize -= 3;
  195|   114k|    in += 3;
  196|   114k|  }
  197|    358|  if(insize) {
  ------------------
  |  Branch (197:6): [True: 275, False: 83]
  ------------------
  198|       |    /* this is only one or two bytes now */
  199|    275|    *output++ = table64[in[0] >> 2];
  200|    275|    if(insize == 1) {
  ------------------
  |  Branch (200:8): [True: 53, False: 222]
  ------------------
  201|     53|      *output++ = table64[((in[0] & 0x03) << 4)];
  202|     53|      if(padbyte) {
  ------------------
  |  Branch (202:10): [True: 53, False: 0]
  ------------------
  203|     53|        *output++ = padbyte;
  204|     53|        *output++ = padbyte;
  205|     53|      }
  206|     53|    }
  207|    222|    else {
  208|       |      /* insize == 2 */
  209|    222|      *output++ = table64[((in[0] & 0x03) << 4) | ((in[1] & 0xF0) >> 4)];
  210|    222|      *output++ = table64[((in[1] & 0x0F) << 2)];
  211|    222|      if(padbyte)
  ------------------
  |  Branch (211:10): [True: 222, False: 0]
  ------------------
  212|    222|        *output++ = padbyte;
  213|    222|    }
  214|    275|  }
  215|       |
  216|       |  /* Null-terminate */
  217|    358|  *output = '\0';
  218|       |
  219|       |  /* Return the pointer to the new data (allocated memory) */
  220|    358|  *outptr = base64data;
  221|       |
  222|       |  /* Return the length of the new data */
  223|    358|  *outlen = (size_t)(output - base64data);
  224|       |
  225|    358|  return CURLE_OK;
  226|    358|}

curlx_dyn_init:
   39|   136k|{
   40|   136k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|   136k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (40:3): [True: 0, False: 136k]
  |  Branch (40:3): [True: 136k, False: 0]
  ------------------
   41|   136k|  DEBUGASSERT(toobig);
  ------------------
  |  | 1081|   136k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (41:3): [True: 0, False: 136k]
  |  Branch (41:3): [True: 136k, False: 0]
  ------------------
   42|   136k|  DEBUGASSERT(toobig <= MAX_DYNBUF_SIZE); /* catch crazy mistakes */
  ------------------
  |  | 1081|   136k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (42:3): [True: 0, False: 136k]
  |  Branch (42:3): [True: 136k, False: 0]
  ------------------
   43|   136k|  s->bufr = NULL;
   44|   136k|  s->leng = 0;
   45|   136k|  s->allc = 0;
   46|   136k|  s->toobig = toobig;
   47|   136k|#ifdef DEBUGBUILD
   48|   136k|  s->init = DYNINIT;
  ------------------
  |  |   32|   136k|#define DYNINIT 0xbee51da /* random pattern */
  ------------------
   49|   136k|#endif
   50|   136k|}
curlx_dyn_free:
   57|   102k|{
   58|   102k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|   102k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 0, False: 102k]
  |  Branch (58:3): [True: 102k, False: 0]
  ------------------
   59|   102k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|   102k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (59:3): [True: 0, False: 102k]
  |  Branch (59:3): [True: 102k, False: 0]
  ------------------
   60|   102k|  curlx_safefree(s->bufr);
  ------------------
  |  | 1327|   102k|  do {                      \
  |  | 1328|   102k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   102k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   102k|    (ptr) = NULL;           \
  |  | 1330|   102k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 102k]
  |  |  ------------------
  ------------------
   61|   102k|  s->leng = s->allc = 0;
   62|   102k|}
curlx_dyn_reset:
  126|  50.1k|{
  127|  50.1k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  50.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (127:3): [True: 0, False: 50.1k]
  |  Branch (127:3): [True: 50.1k, False: 0]
  ------------------
  128|  50.1k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  50.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (128:3): [True: 0, False: 50.1k]
  |  Branch (128:3): [True: 50.1k, False: 0]
  ------------------
  129|  50.1k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  50.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (129:3): [True: 50.1k, False: 0]
  |  Branch (129:3): [True: 0, False: 0]
  |  Branch (129:3): [True: 30.7k, False: 19.3k]
  |  Branch (129:3): [True: 19.3k, False: 0]
  ------------------
  130|  50.1k|  if(s->leng)
  ------------------
  |  Branch (130:6): [True: 19.3k, False: 30.7k]
  ------------------
  131|  19.3k|    s->bufr[0] = 0;
  132|  50.1k|  s->leng = 0;
  133|  50.1k|}
curlx_dyn_tail:
  140|  1.99M|{
  141|  1.99M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  1.99M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (141:3): [True: 0, False: 1.99M]
  |  Branch (141:3): [True: 1.99M, False: 0]
  ------------------
  142|  1.99M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  1.99M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (142:3): [True: 0, False: 1.99M]
  |  Branch (142:3): [True: 1.99M, False: 0]
  ------------------
  143|  1.99M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  1.99M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (143:3): [True: 1.99M, False: 0]
  |  Branch (143:3): [True: 0, False: 0]
  |  Branch (143:3): [True: 0, False: 1.99M]
  |  Branch (143:3): [True: 1.99M, False: 0]
  ------------------
  144|  1.99M|  if(trail > s->leng)
  ------------------
  |  Branch (144:6): [True: 0, False: 1.99M]
  ------------------
  145|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  146|  1.99M|  else if(trail == s->leng)
  ------------------
  |  Branch (146:11): [True: 0, False: 1.99M]
  ------------------
  147|      0|    return CURLE_OK;
  148|  1.99M|  else if(!trail) {
  ------------------
  |  Branch (148:11): [True: 2.00k, False: 1.98M]
  ------------------
  149|  2.00k|    curlx_dyn_reset(s);
  150|  2.00k|  }
  151|  1.98M|  else {
  152|  1.98M|    memmove(&s->bufr[0], &s->bufr[s->leng - trail], trail);
  153|  1.98M|    s->leng = trail;
  154|  1.98M|    s->bufr[s->leng] = 0;
  155|  1.98M|  }
  156|  1.99M|  return CURLE_OK;
  157|  1.99M|}
curlx_dyn_addn:
  163|  49.4M|{
  164|  49.4M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  49.4M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (164:3): [True: 0, False: 49.4M]
  |  Branch (164:3): [True: 49.4M, False: 0]
  ------------------
  165|  49.4M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  49.4M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (165:3): [True: 0, False: 49.4M]
  |  Branch (165:3): [True: 49.4M, False: 0]
  ------------------
  166|  49.4M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  49.4M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 49.4M, False: 0]
  |  Branch (166:3): [True: 0, False: 0]
  |  Branch (166:3): [True: 98.5k, False: 49.3M]
  |  Branch (166:3): [True: 49.3M, False: 0]
  ------------------
  167|  49.4M|  return dyn_nappend(s, mem, len);
  168|  49.4M|}
curlx_dyn_add:
  174|  6.88k|{
  175|  6.88k|  size_t n;
  176|  6.88k|  DEBUGASSERT(str);
  ------------------
  |  | 1081|  6.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (176:3): [True: 0, False: 6.88k]
  |  Branch (176:3): [True: 6.88k, False: 0]
  ------------------
  177|  6.88k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  6.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 6.88k]
  |  Branch (177:3): [True: 6.88k, False: 0]
  ------------------
  178|  6.88k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  6.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 6.88k]
  |  Branch (178:3): [True: 6.88k, False: 0]
  ------------------
  179|  6.88k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  6.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 6.88k, False: 0]
  |  Branch (179:3): [True: 0, False: 0]
  |  Branch (179:3): [True: 1.39k, False: 5.49k]
  |  Branch (179:3): [True: 5.49k, False: 0]
  ------------------
  180|  6.88k|  n = strlen(str);
  181|  6.88k|  return dyn_nappend(s, (const unsigned char *)str, n);
  182|  6.88k|}
curlx_dyn_vaddf:
  188|  1.26M|{
  189|  1.26M|#ifdef BUILDING_LIBCURL
  190|  1.26M|  int rc;
  191|  1.26M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  1.26M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 1.26M]
  |  Branch (191:3): [True: 1.26M, False: 0]
  ------------------
  192|  1.26M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  1.26M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 1.26M]
  |  Branch (192:3): [True: 1.26M, False: 0]
  ------------------
  193|  1.26M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  1.26M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 1.26M, False: 0]
  |  Branch (193:3): [True: 0, False: 0]
  |  Branch (193:3): [True: 13.0k, False: 1.24M]
  |  Branch (193:3): [True: 1.24M, False: 0]
  ------------------
  194|  1.26M|  DEBUGASSERT(fmt);
  ------------------
  |  | 1081|  1.26M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 1.26M]
  |  Branch (194:3): [True: 1.26M, False: 0]
  ------------------
  195|  1.26M|  rc = curlx_dyn_vprintf(s, fmt, ap);
  196|       |
  197|  1.26M|  if(!rc)
  ------------------
  |  Branch (197:6): [True: 1.26M, False: 33]
  ------------------
  198|  1.26M|    return CURLE_OK;
  199|     33|  else if(rc == MERR_TOO_LARGE)
  ------------------
  |  |   29|     33|#define MERR_TOO_LARGE 2
  ------------------
  |  Branch (199:11): [True: 33, False: 0]
  ------------------
  200|     33|    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|  1.26M|}
curlx_dyn_addf:
  221|  1.25M|{
  222|  1.25M|  CURLcode result;
  223|  1.25M|  va_list ap;
  224|  1.25M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  1.25M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (224:3): [True: 0, False: 1.25M]
  |  Branch (224:3): [True: 1.25M, False: 0]
  ------------------
  225|  1.25M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  1.25M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (225:3): [True: 0, False: 1.25M]
  |  Branch (225:3): [True: 1.25M, False: 0]
  ------------------
  226|  1.25M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  1.25M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (226:3): [True: 1.25M, False: 0]
  |  Branch (226:3): [True: 0, False: 0]
  |  Branch (226:3): [True: 10.8k, False: 1.24M]
  |  Branch (226:3): [True: 1.24M, False: 0]
  ------------------
  227|  1.25M|  DEBUGASSERT(strcmp(fmt, "%s")); /* use curlx_dyn_add instead */
  ------------------
  |  | 1081|  1.25M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (227:3): [True: 0, False: 1.25M]
  |  Branch (227:3): [True: 1.25M, False: 0]
  ------------------
  228|  1.25M|  va_start(ap, fmt);
  229|  1.25M|  result = curlx_dyn_vaddf(s, fmt, ap);
  230|       |  va_end(ap);
  231|  1.25M|  return result;
  232|  1.25M|}
curlx_dyn_ptr:
  238|  3.80M|{
  239|  3.80M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  3.80M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [True: 0, False: 3.80M]
  |  Branch (239:3): [True: 3.80M, False: 0]
  ------------------
  240|  3.80M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  3.80M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (240:3): [True: 0, False: 3.80M]
  |  Branch (240:3): [True: 3.80M, False: 0]
  ------------------
  241|  3.80M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  3.80M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 3.80M, False: 0]
  |  Branch (241:3): [True: 0, False: 0]
  |  Branch (241:3): [True: 25.2k, False: 3.78M]
  |  Branch (241:3): [True: 3.78M, False: 0]
  ------------------
  242|  3.80M|  return s->bufr;
  243|  3.80M|}
curlx_dyn_take:
  246|  2.78k|{
  247|  2.78k|  char *ptr = s->bufr;
  248|  2.78k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  2.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 2.78k]
  |  Branch (248:3): [True: 2.78k, False: 0]
  ------------------
  249|  2.78k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  2.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 2.78k]
  |  Branch (249:3): [True: 2.78k, False: 0]
  ------------------
  250|  2.78k|  *plen = s->leng;
  251|       |  s->bufr = NULL;
  252|  2.78k|  s->leng = 0;
  253|  2.78k|  s->allc = 0;
  254|  2.78k|  return ptr;
  255|  2.78k|}
curlx_dyn_uptr:
  261|    904|{
  262|    904|  DEBUGASSERT(s);
  ------------------
  |  | 1081|    904|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (262:3): [True: 0, False: 904]
  |  Branch (262:3): [True: 904, False: 0]
  ------------------
  263|    904|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|    904|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (263:3): [True: 0, False: 904]
  |  Branch (263:3): [True: 904, False: 0]
  ------------------
  264|    904|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|    904|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (264:3): [True: 904, False: 0]
  |  Branch (264:3): [True: 0, False: 0]
  |  Branch (264:3): [True: 0, False: 904]
  |  Branch (264:3): [True: 904, False: 0]
  ------------------
  265|    904|  return (unsigned char *)s->bufr;
  266|    904|}
curlx_dyn_len:
  272|  9.36M|{
  273|  9.36M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  9.36M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 9.36M]
  |  Branch (273:3): [True: 9.36M, False: 0]
  ------------------
  274|  9.36M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  9.36M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (274:3): [True: 0, False: 9.36M]
  |  Branch (274:3): [True: 9.36M, False: 0]
  ------------------
  275|  9.36M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  9.36M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:3): [True: 9.36M, False: 0]
  |  Branch (275:3): [True: 0, False: 0]
  |  Branch (275:3): [True: 32.2k, False: 9.33M]
  |  Branch (275:3): [True: 9.33M, False: 0]
  ------------------
  276|  9.36M|  return s->leng;
  277|  9.36M|}
curlx_dyn_setlen:
  283|  11.1k|{
  284|  11.1k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  11.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (284:3): [True: 0, False: 11.1k]
  |  Branch (284:3): [True: 11.1k, False: 0]
  ------------------
  285|  11.1k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  11.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (285:3): [True: 0, False: 11.1k]
  |  Branch (285:3): [True: 11.1k, False: 0]
  ------------------
  286|  11.1k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  11.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (286:3): [True: 11.1k, False: 0]
  |  Branch (286:3): [True: 0, False: 0]
  |  Branch (286:3): [True: 0, False: 11.1k]
  |  Branch (286:3): [True: 11.1k, False: 0]
  ------------------
  287|  11.1k|  if(set > s->leng)
  ------------------
  |  Branch (287:6): [True: 0, False: 11.1k]
  ------------------
  288|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  289|  11.1k|  s->leng = set;
  290|  11.1k|  s->bufr[s->leng] = 0;
  291|  11.1k|  return CURLE_OK;
  292|  11.1k|}
dynbuf.c:dyn_nappend:
   69|  49.4M|{
   70|  49.4M|  size_t idx = s->leng;
   71|  49.4M|  size_t a = s->allc;
   72|  49.4M|  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|  49.4M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  49.4M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (75:3): [True: 0, False: 49.4M]
  |  Branch (75:3): [True: 49.4M, False: 0]
  ------------------
   76|  49.4M|  DEBUGASSERT(s->toobig);
  ------------------
  |  | 1081|  49.4M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 49.4M]
  |  Branch (76:3): [True: 49.4M, False: 0]
  ------------------
   77|  49.4M|  DEBUGASSERT(idx < s->toobig);
  ------------------
  |  | 1081|  49.4M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 49.4M]
  |  Branch (77:3): [True: 49.4M, False: 0]
  ------------------
   78|  49.4M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  49.4M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (78:3): [True: 49.4M, False: 0]
  |  Branch (78:3): [True: 0, False: 0]
  |  Branch (78:3): [True: 99.9k, False: 49.3M]
  |  Branch (78:3): [True: 49.3M, False: 0]
  ------------------
   79|  49.4M|  DEBUGASSERT(a <= s->toobig);
  ------------------
  |  | 1081|  49.4M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 49.4M]
  |  Branch (79:3): [True: 49.4M, False: 0]
  ------------------
   80|  49.4M|  DEBUGASSERT(!len || mem);
  ------------------
  |  | 1081|  49.4M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (80:3): [True: 49.4M, False: 0]
  |  Branch (80:3): [True: 0, False: 0]
  |  Branch (80:3): [True: 18, False: 49.4M]
  |  Branch (80:3): [True: 49.4M, False: 0]
  ------------------
   81|       |
   82|  49.4M|  if(fit > s->toobig) {
  ------------------
  |  Branch (82:6): [True: 46, False: 49.4M]
  ------------------
   83|     46|    curlx_dyn_free(s);
   84|     46|    return CURLE_TOO_LARGE;
   85|     46|  }
   86|  49.4M|  else if(!a) {
  ------------------
  |  Branch (86:11): [True: 81.9k, False: 49.3M]
  ------------------
   87|  81.9k|    DEBUGASSERT(!idx);
  ------------------
  |  | 1081|  81.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (87:5): [True: 0, False: 81.9k]
  |  Branch (87:5): [True: 81.9k, False: 0]
  ------------------
   88|       |    /* first invoke */
   89|  81.9k|    if(MIN_FIRST_ALLOC > s->toobig)
  ------------------
  |  |   29|  81.9k|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (89:8): [True: 8.57k, False: 73.4k]
  ------------------
   90|  8.57k|      a = s->toobig;
   91|  73.4k|    else if(fit < MIN_FIRST_ALLOC)
  ------------------
  |  |   29|  73.4k|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (91:13): [True: 70.4k, False: 2.95k]
  ------------------
   92|  70.4k|      a = MIN_FIRST_ALLOC;
  ------------------
  |  |   29|  70.4k|#define MIN_FIRST_ALLOC 32
  ------------------
   93|  2.95k|    else
   94|  2.95k|      a = fit;
   95|  81.9k|  }
   96|  49.3M|  else {
   97|  49.3M|    while(a < fit)
  ------------------
  |  Branch (97:11): [True: 33.6k, False: 49.3M]
  ------------------
   98|  33.6k|      a *= 2;
   99|  49.3M|    if(a > s->toobig)
  ------------------
  |  Branch (99:8): [True: 1.61k, False: 49.3M]
  ------------------
  100|       |      /* no point in allocating a larger buffer than this is allowed to use */
  101|  1.61k|      a = s->toobig;
  102|  49.3M|  }
  103|       |
  104|  49.4M|  if(a != s->allc) {
  ------------------
  |  Branch (104:6): [True: 115k, False: 49.3M]
  ------------------
  105|   115k|    void *p = curlx_realloc(s->bufr, a);
  ------------------
  |  | 1482|   115k|  curl_dbg_realloc(ptr, size, __LINE__, __FILE__)
  ------------------
  106|   115k|    if(!p) {
  ------------------
  |  Branch (106:8): [True: 0, False: 115k]
  ------------------
  107|      0|      curlx_dyn_free(s);
  108|      0|      return CURLE_OUT_OF_MEMORY;
  109|      0|    }
  110|   115k|    s->bufr = p;
  111|   115k|    s->allc = a;
  112|   115k|  }
  113|       |
  114|  49.4M|  if(len)
  ------------------
  |  Branch (114:6): [True: 49.4M, False: 18]
  ------------------
  115|  49.4M|    memcpy(&s->bufr[idx], mem, len);
  116|  49.4M|  s->leng = idx + len;
  117|  49.4M|  s->bufr[s->leng] = 0;
  118|  49.4M|  return CURLE_OK;
  119|  49.4M|}

curlx_nonblock:
   47|  5.63k|{
   48|  5.63k|#ifdef HAVE_FCNTL_O_NONBLOCK
   49|       |  /* most recent Unix versions */
   50|  5.63k|  int flags;
   51|  5.63k|  flags = sfcntl(sockfd, F_GETFL, 0);
  ------------------
  |  | 1008|  5.63k|#  define sfcntl  fcntl
  ------------------
   52|  5.63k|  if(flags < 0)
  ------------------
  |  Branch (52:6): [True: 0, False: 5.63k]
  ------------------
   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.63k|  if(!!(flags & O_NONBLOCK) == !!nonblock)
  ------------------
  |  Branch (57:6): [True: 446, False: 5.18k]
  ------------------
   58|    446|    return 0;
   59|  5.18k|  if(nonblock)
  ------------------
  |  Branch (59:6): [True: 5.18k, False: 0]
  ------------------
   60|  5.18k|    flags |= O_NONBLOCK;
   61|      0|  else
   62|      0|    flags &= ~O_NONBLOCK;
   63|  5.18k|  return sfcntl(sockfd, F_SETFL, flags);
  ------------------
  |  | 1008|  5.18k|#  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.63k|}

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

curlx_memdup:
   65|  1.14k|{
   66|  1.14k|  void *buffer = curlx_malloc(length);
  ------------------
  |  | 1478|  1.14k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   67|  1.14k|  if(!buffer)
  ------------------
  |  Branch (67:6): [True: 0, False: 1.14k]
  ------------------
   68|      0|    return NULL; /* fail */
   69|       |
   70|  1.14k|  memcpy(buffer, src, length);
   71|       |
   72|  1.14k|  return buffer;
   73|  1.14k|}
curlx_memdup0:
   86|  45.5k|{
   87|  45.5k|  char *buf = (length < SIZE_MAX) ? curlx_malloc(length + 1) : NULL;
  ------------------
  |  | 1478|  45.5k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  |  Branch (87:15): [True: 45.5k, False: 0]
  ------------------
   88|  45.5k|  if(!buf)
  ------------------
  |  Branch (88:6): [True: 0, False: 45.5k]
  ------------------
   89|      0|    return NULL;
   90|  45.5k|  if(length) {
  ------------------
  |  Branch (90:6): [True: 36.5k, False: 8.92k]
  ------------------
   91|  36.5k|    DEBUGASSERT(src); /* must never be NULL */
  ------------------
  |  | 1081|  36.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:5): [True: 0, False: 36.5k]
  |  Branch (91:5): [True: 36.5k, False: 0]
  ------------------
   92|  36.5k|    memcpy(buf, src, length);
   93|  36.5k|  }
   94|  45.5k|  buf[length] = 0;
   95|  45.5k|  return buf;
   96|  45.5k|}

curlx_strerror:
  249|    155|{
  250|       |#ifdef _WIN32
  251|       |  DWORD old_win_err = GetLastError();
  252|       |#endif
  253|    155|  int old_errno = errno;
  254|    155|  char *p;
  255|       |
  256|    155|  if(!buflen)
  ------------------
  |  Branch (256:6): [True: 0, False: 155]
  ------------------
  257|      0|    return NULL;
  258|       |
  259|    155|#ifndef _WIN32
  260|    155|  DEBUGASSERT(err >= 0);
  ------------------
  |  | 1081|    155|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (260:3): [True: 0, False: 155]
  |  Branch (260:3): [True: 155, False: 0]
  ------------------
  261|    155|#endif
  262|       |
  263|    155|  *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, 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|    155|  {
  292|    155|    char buffer[256];
  293|    155|    const char *msg = strerror_r(err, buffer, sizeof(buffer));
  294|    155|    if(msg && buflen > 1)
  ------------------
  |  Branch (294:8): [True: 155, False: 0]
  |  Branch (294:15): [True: 155, False: 0]
  ------------------
  295|    155|      SNPRINTF(buf, buflen, "%s", msg);
  ------------------
  |  |   43|    155|#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|    155|  }
  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|    155|#endif /* _WIN32 */
  311|       |
  312|       |  /* strip trailing '\r\n' or '\n'. */
  313|    155|  p = strrchr(buf, '\n');
  314|    155|  if(p && (p - buf) >= 2)
  ------------------
  |  Branch (314:6): [True: 0, False: 155]
  |  Branch (314:11): [True: 0, False: 0]
  ------------------
  315|      0|    *p = '\0';
  316|    155|  p = strrchr(buf, '\r');
  317|    155|  if(p && (p - buf) >= 1)
  ------------------
  |  Branch (317:6): [True: 0, False: 155]
  |  Branch (317:11): [True: 0, False: 0]
  ------------------
  318|      0|    *p = '\0';
  319|       |
  320|    155|  if(errno != old_errno)
  ------------------
  |  Branch (320:6): [True: 0, False: 155]
  ------------------
  321|    155|    errno = old_errno;
  322|       |
  323|       |#ifdef _WIN32
  324|       |  if(old_win_err != GetLastError())
  325|       |    SetLastError(old_win_err);
  326|       |#endif
  327|       |
  328|    155|  return buf;
  329|    155|}

curlx_str_init:
   27|  21.6k|{
   28|       |  out->str = NULL;
   29|  21.6k|  out->len = 0;
   30|  21.6k|}
curlx_str_assign:
   33|    577|{
   34|    577|  out->str = str;
   35|    577|  out->len = len;
   36|    577|}
curlx_str_until:
   51|  13.3k|{
   52|  13.3k|  const char *s;
   53|  13.3k|  size_t len = 0;
   54|  13.3k|  DEBUGASSERT(linep);
  ------------------
  |  | 1081|  13.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 13.3k]
  |  Branch (54:3): [True: 13.3k, False: 0]
  ------------------
   55|  13.3k|  DEBUGASSERT(*linep);
  ------------------
  |  | 1081|  13.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (55:3): [True: 0, False: 13.3k]
  |  Branch (55:3): [True: 13.3k, False: 0]
  ------------------
   56|  13.3k|  DEBUGASSERT(out);
  ------------------
  |  | 1081|  13.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 13.3k]
  |  Branch (56:3): [True: 13.3k, False: 0]
  ------------------
   57|  13.3k|  DEBUGASSERT(delim);
  ------------------
  |  | 1081|  13.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 13.3k]
  |  Branch (57:3): [True: 13.3k, False: 0]
  ------------------
   58|  13.3k|  s = *linep;
   59|       |
   60|  13.3k|  curlx_str_init(out);
   61|  39.4k|  while(*s && (*s != delim)) {
  ------------------
  |  Branch (61:9): [True: 28.6k, False: 10.8k]
  |  Branch (61:15): [True: 26.0k, False: 2.54k]
  ------------------
   62|  26.0k|    s++;
   63|  26.0k|    if(++len > max) {
  ------------------
  |  Branch (63:8): [True: 35, False: 26.0k]
  ------------------
   64|     35|      return STRE_BIG;
  ------------------
  |  |   29|     35|#define STRE_BIG      1
  ------------------
   65|     35|    }
   66|  26.0k|  }
   67|  13.3k|  if(!len)
  ------------------
  |  Branch (67:6): [True: 19, False: 13.3k]
  ------------------
   68|     19|    return STRE_SHORT;
  ------------------
  |  |   30|     19|#define STRE_SHORT    2
  ------------------
   69|  13.3k|  out->str = *linep;
   70|  13.3k|  out->len = len;
   71|  13.3k|  *linep = s; /* point to the first byte after the word */
   72|  13.3k|  return STRE_OK;
  ------------------
  |  |   28|  13.3k|#define STRE_OK       0
  ------------------
   73|  13.3k|}
curlx_str_word:
   78|  10.0k|{
   79|  10.0k|  return curlx_str_until(linep, out, max, ' ');
   80|  10.0k|}
curlx_str_quotedword:
  109|     19|{
  110|     19|  const char *s = *linep;
  111|     19|  size_t len = 0;
  112|     19|  DEBUGASSERT(linep && *linep && out && max);
  ------------------
  |  | 1081|     19|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 0, False: 19]
  |  Branch (112:3): [True: 0, False: 0]
  |  Branch (112:3): [True: 0, False: 0]
  |  Branch (112:3): [True: 0, False: 0]
  |  Branch (112:3): [True: 19, False: 0]
  |  Branch (112:3): [True: 19, False: 0]
  |  Branch (112:3): [True: 19, False: 0]
  |  Branch (112:3): [True: 19, False: 0]
  ------------------
  113|       |
  114|     19|  curlx_str_init(out);
  115|     19|  if(*s != '\"')
  ------------------
  |  Branch (115:6): [True: 11, False: 8]
  ------------------
  116|     11|    return STRE_BEGQUOTE;
  ------------------
  |  |   31|     11|#define STRE_BEGQUOTE 3
  ------------------
  117|      8|  s++;
  118|    101|  while(*s && (*s != '\"')) {
  ------------------
  |  Branch (118:9): [True: 94, False: 7]
  |  Branch (118:15): [True: 93, False: 1]
  ------------------
  119|     93|    if(*s == '\\' && s[1]) {
  ------------------
  |  Branch (119:8): [True: 4, False: 89]
  |  Branch (119:22): [True: 3, False: 1]
  ------------------
  120|      3|      s++;
  121|      3|      if(++len > max)
  ------------------
  |  Branch (121:10): [True: 0, False: 3]
  ------------------
  122|      0|        return STRE_BIG;
  ------------------
  |  |   29|      0|#define STRE_BIG      1
  ------------------
  123|      3|    }
  124|     93|    s++;
  125|     93|    if(++len > max)
  ------------------
  |  Branch (125:8): [True: 0, False: 93]
  ------------------
  126|      0|      return STRE_BIG;
  ------------------
  |  |   29|      0|#define STRE_BIG      1
  ------------------
  127|     93|  }
  128|      8|  if(*s != '\"')
  ------------------
  |  Branch (128:6): [True: 7, False: 1]
  ------------------
  129|      7|    return STRE_ENDQUOTE;
  ------------------
  |  |   32|      7|#define STRE_ENDQUOTE 4
  ------------------
  130|      1|  out->str = (*linep) + 1;
  131|      1|  out->len = len;
  132|      1|  *linep = s + 1;
  133|      1|  return STRE_OK;
  ------------------
  |  |   28|      1|#define STRE_OK       0
  ------------------
  134|      8|}
curlx_str_single:
  139|  1.29M|{
  140|  1.29M|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1081|  1.29M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (140:3): [True: 0, False: 1.29M]
  |  Branch (140:3): [True: 0, False: 0]
  |  Branch (140:3): [True: 1.29M, False: 0]
  |  Branch (140:3): [True: 1.29M, False: 0]
  ------------------
  141|  1.29M|  if(**linep != byte)
  ------------------
  |  Branch (141:6): [True: 1.25M, False: 36.2k]
  ------------------
  142|  1.25M|    return STRE_BYTE;
  ------------------
  |  |   33|  1.25M|#define STRE_BYTE     5
  ------------------
  143|  36.2k|  (*linep)++; /* move over it */
  144|  36.2k|  return STRE_OK;
  ------------------
  |  |   28|  36.2k|#define STRE_OK       0
  ------------------
  145|  1.29M|}
curlx_str_singlespace:
  150|  10.0k|{
  151|  10.0k|  return curlx_str_single(linep, ' ');
  152|  10.0k|}
curlx_str_number:
  209|  2.90M|{
  210|  2.90M|  return str_num_base(linep, nump, max, 10);
  211|  2.90M|}
curlx_str_hex:
  216|     28|{
  217|     28|  return str_num_base(linep, nump, max, 16);
  218|     28|}
curlx_str_octal:
  223|  1.27k|{
  224|  1.27k|  return str_num_base(linep, nump, max, 8);
  225|  1.27k|}
curlx_str_casecompare:
  253|  62.6k|{
  254|  62.6k|  size_t clen = check ? strlen(check) : 0;
  ------------------
  |  Branch (254:17): [True: 62.6k, False: 0]
  ------------------
  255|  62.6k|  return ((str->len == clen) && curl_strnequal(str->str, check, clen));
  ------------------
  |  Branch (255:11): [True: 23.2k, False: 39.3k]
  |  Branch (255:33): [True: 11.5k, False: 11.7k]
  ------------------
  256|  62.6k|}
curlx_str_cmp:
  261|  1.73k|{
  262|  1.73k|  if(check) {
  ------------------
  |  Branch (262:6): [True: 1.73k, False: 0]
  ------------------
  263|  1.73k|    size_t clen = strlen(check);
  264|  1.73k|    return ((str->len == clen) && !strncmp(str->str, check, clen));
  ------------------
  |  Branch (264:13): [True: 40, False: 1.69k]
  |  Branch (264:35): [True: 6, False: 34]
  ------------------
  265|  1.73k|  }
  266|      0|  return !!(str->len);
  267|  1.73k|}
curlx_str_nudge:
  272|  2.49k|{
  273|  2.49k|  if(num <= str->len) {
  ------------------
  |  Branch (273:6): [True: 2.49k, False: 0]
  ------------------
  274|  2.49k|    str->str += num;
  275|  2.49k|    str->len -= num;
  276|  2.49k|    return STRE_OK;
  ------------------
  |  |   28|  2.49k|#define STRE_OK       0
  ------------------
  277|  2.49k|  }
  278|      0|  return STRE_OVERFLOW;
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  279|  2.49k|}
curlx_str_cspn:
  285|  34.8k|{
  286|  34.8k|  const char *s = *linep;
  287|  34.8k|  size_t len;
  288|  34.8k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1081|  34.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (288:3): [True: 0, False: 34.8k]
  |  Branch (288:3): [True: 0, False: 0]
  |  Branch (288:3): [True: 34.8k, False: 0]
  |  Branch (288:3): [True: 34.8k, False: 0]
  ------------------
  289|       |
  290|  34.8k|  len = strcspn(s, reject);
  291|  34.8k|  if(len) {
  ------------------
  |  Branch (291:6): [True: 31.5k, False: 3.34k]
  ------------------
  292|  31.5k|    out->str = s;
  293|  31.5k|    out->len = len;
  294|  31.5k|    *linep = &s[len];
  295|  31.5k|    return STRE_OK;
  ------------------
  |  |   28|  31.5k|#define STRE_OK       0
  ------------------
  296|  31.5k|  }
  297|  3.34k|  curlx_str_init(out);
  298|  3.34k|  return STRE_SHORT;
  ------------------
  |  |   30|  3.34k|#define STRE_SHORT    2
  ------------------
  299|  34.8k|}
curlx_str_trimblanks:
  303|  31.4k|{
  304|  33.9k|  while(out->len && ISBLANK(*out->str))
  ------------------
  |  |   45|  33.0k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 2.18k, False: 30.8k]
  |  |  |  Branch (45:38): [True: 311, False: 30.5k]
  |  |  ------------------
  ------------------
  |  Branch (304:9): [True: 33.0k, False: 839]
  ------------------
  305|  2.49k|    curlx_str_nudge(out, 1);
  306|       |
  307|       |  /* trim trailing spaces and tabs */
  308|  32.5k|  while(out->len && ISBLANK(out->str[out->len - 1]))
  ------------------
  |  |   45|  31.7k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 941, False: 30.7k]
  |  |  |  Branch (45:38): [True: 189, False: 30.5k]
  |  |  ------------------
  ------------------
  |  Branch (308:9): [True: 31.7k, False: 839]
  ------------------
  309|  1.13k|    out->len--;
  310|  31.4k|}
curlx_str_passblanks:
  314|  21.9k|{
  315|  22.8k|  while(ISBLANK(**linep))
  ------------------
  |  |   45|  22.8k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 618, False: 22.2k]
  |  |  |  Branch (45:38): [True: 284, False: 21.9k]
  |  |  ------------------
  ------------------
  316|    902|    (*linep)++; /* move over it */
  317|  21.9k|}
strparse.c:str_num_base:
  172|  2.90M|{
  173|  2.90M|  curl_off_t num = 0;
  174|  2.90M|  const char *p;
  175|  2.90M|  int m = (base == 10) ? '9' :   /* the largest digit possible */
  ------------------
  |  Branch (175:11): [True: 2.90M, False: 1.29k]
  ------------------
  176|  2.90M|    (base == 16) ? 'f' : '7';
  ------------------
  |  Branch (176:5): [True: 28, False: 1.27k]
  ------------------
  177|  2.90M|  DEBUGASSERT(linep && *linep && nump);
  ------------------
  |  | 1081|  2.90M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 2.90M]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 2.90M, False: 0]
  |  Branch (177:3): [True: 2.90M, False: 0]
  |  Branch (177:3): [True: 2.90M, False: 0]
  ------------------
  178|  2.90M|  DEBUGASSERT((base == 8) || (base == 10) || (base == 16));
  ------------------
  |  | 1081|  2.90M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 2.90M, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 1.27k, False: 2.90M]
  |  Branch (178:3): [True: 2.90M, False: 28]
  |  Branch (178:3): [True: 28, False: 0]
  ------------------
  179|  2.90M|  DEBUGASSERT(max >= 0); /* mostly to catch SIZE_MAX, which is too large */
  ------------------
  |  | 1081|  2.90M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 2.90M]
  |  Branch (179:3): [True: 2.90M, False: 0]
  ------------------
  180|  2.90M|  *nump = 0;
  181|  2.90M|  p = *linep;
  182|  2.90M|  if(!valid_digit(*p, m))
  ------------------
  |  |  156|  2.90M|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 2.89M, False: 6.94k]
  |  |  |  Branch (156:20): [True: 2.48M, False: 412k]
  |  |  |  Branch (156:36): [True: 2.48M, False: 9]
  |  |  ------------------
  ------------------
  183|   419k|    return STRE_NO_NUM;
  ------------------
  |  |   36|   419k|#define STRE_NO_NUM   8
  ------------------
  184|  2.48M|  if(max < base) {
  ------------------
  |  Branch (184:6): [True: 0, False: 2.48M]
  ------------------
  185|       |    /* special-case low max scenario because check needs to be different */
  186|      0|    do {
  187|      0|      int n = curlx_hexval(*p++);
  ------------------
  |  |  112|      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|  2.48M|  else {
  194|  4.97M|    do {
  195|  4.97M|      int n = curlx_hexval(*p++);
  ------------------
  |  |  112|  4.97M|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  196|  4.97M|      if(num > ((max - n) / base))
  ------------------
  |  Branch (196:10): [True: 134, False: 4.97M]
  ------------------
  197|    134|        return STRE_OVERFLOW;
  ------------------
  |  |   35|    134|#define STRE_OVERFLOW 7
  ------------------
  198|  4.97M|      num = (num * base) + n;
  199|  4.97M|    } while(valid_digit(*p, m));
  ------------------
  |  |  156|  4.97M|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 4.95M, False: 16.4k]
  |  |  |  Branch (156:20): [True: 2.49M, False: 2.46M]
  |  |  |  Branch (156:36): [True: 2.49M, False: 3]
  |  |  ------------------
  ------------------
  200|  2.48M|  }
  201|  2.48M|  *nump = num;
  202|  2.48M|  *linep = p;
  203|  2.48M|  return STRE_OK;
  ------------------
  |  |   28|  2.48M|#define STRE_OK       0
  ------------------
  204|  2.48M|}

curlx_mstotv:
   35|     50|{
   36|     50|  if(!tv)
  ------------------
  |  Branch (36:6): [True: 0, False: 50]
  ------------------
   37|      0|    return NULL;
   38|       |
   39|     50|  if(ms < 0)
  ------------------
  |  Branch (39:6): [True: 0, False: 50]
  ------------------
   40|      0|    return NULL;
   41|       |
   42|     50|  if(ms > 0) {
  ------------------
  |  Branch (42:6): [True: 50, False: 0]
  ------------------
   43|     50|    timediff_t tv_sec = ms / 1000;
   44|     50|    timediff_t tv_usec = (ms % 1000) * 1000; /* max=999000 */
   45|     50|#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|     50|    tv->tv_sec = (time_t)tv_sec;
   52|     50|    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|     50|  }
   71|      0|  else {
   72|      0|    tv->tv_sec = 0;
   73|      0|    tv->tv_usec = 0;
   74|      0|  }
   75|       |
   76|     50|  return tv;
   77|     50|}

curlx_pnow:
   54|  2.80M|{
   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|  2.80M|  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|  2.80M|#ifdef HAVE_CLOCK_GETTIME_MONOTONIC_RAW
   77|  2.80M|  if(
   78|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   79|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   80|       |    have_clock_gettime &&
   81|       |#endif
   82|  2.80M|    (clock_gettime(CLOCK_MONOTONIC_RAW, &tsnow) == 0)) {
  ------------------
  |  Branch (82:5): [True: 2.80M, False: 18.4E]
  ------------------
   83|  2.80M|    pnow->tv_sec = tsnow.tv_sec;
   84|  2.80M|    pnow->tv_usec = (int)(tsnow.tv_nsec / 1000);
   85|  2.80M|  }
   86|  18.4E|  else
   87|  18.4E|#endif
   88|       |
   89|  18.4E|  if(
   90|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   91|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   92|       |    have_clock_gettime &&
   93|       |#endif
   94|  18.4E|    (clock_gettime(CLOCK_MONOTONIC, &tsnow) == 0)) {
  ------------------
  |  Branch (94:5): [True: 0, False: 18.4E]
  ------------------
   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|  18.4E|#ifdef HAVE_GETTIMEOFDAY
  104|  18.4E|  else {
  105|  18.4E|    struct timeval now;
  106|  18.4E|    (void)gettimeofday(&now, NULL);
  107|  18.4E|    pnow->tv_sec = now.tv_sec;
  108|  18.4E|    pnow->tv_usec = (int)now.tv_usec;
  109|  18.4E|  }
  110|       |#else
  111|       |  else {
  112|       |    pnow->tv_sec = time(NULL);
  113|       |    pnow->tv_usec = 0;
  114|       |  }
  115|       |#endif
  116|  2.80M|}
curlx_now:
  176|  3.69k|{
  177|  3.69k|  struct curltime now;
  178|  3.69k|  curlx_pnow(&now);
  179|  3.69k|  return now;
  180|  3.69k|}
curlx_ptimediff_ms:
  190|  3.07M|{
  191|  3.07M|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  192|  3.07M|  if(diff >= (TIMEDIFF_T_MAX / 1000))
  ------------------
  |  |   33|  3.07M|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|  3.07M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (192:6): [True: 0, False: 3.07M]
  ------------------
  193|      0|    return TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  194|  3.07M|  else if(diff <= (TIMEDIFF_T_MIN / 1000))
  ------------------
  |  |   34|  3.07M|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  596|  3.07M|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|  3.07M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (194:11): [True: 0, False: 3.07M]
  ------------------
  195|      0|    return TIMEDIFF_T_MIN;
  ------------------
  |  |   34|      0|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  596|      0|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|  3.07M|  return (diff * 1000) + ((newer->tv_usec - older->tv_usec) / 1000);
  197|  3.07M|}
curlx_ptimediff_us:
  225|  2.19M|{
  226|  2.19M|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  227|  2.19M|  if(diff >= (TIMEDIFF_T_MAX / 1000000))
  ------------------
  |  |   33|  2.19M|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|  2.19M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (227:6): [True: 0, False: 2.19M]
  ------------------
  228|      0|    return TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  229|  2.19M|  else if(diff <= (TIMEDIFF_T_MIN / 1000000))
  ------------------
  |  |   34|  2.19M|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  596|  2.19M|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|  2.19M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (229:11): [True: 0, False: 2.19M]
  ------------------
  230|      0|    return TIMEDIFF_T_MIN;
  ------------------
  |  |   34|      0|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  596|      0|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  231|  2.19M|  return (diff * 1000000) + newer->tv_usec - older->tv_usec;
  232|  2.19M|}
curlx_gmtime:
  253|    592|{
  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|    592|  tm = gmtime_r(&intime, store); /* thread-safe */
  260|    592|  if(!tm)
  ------------------
  |  Branch (260:6): [True: 0, False: 592]
  ------------------
  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|    592|  return CURLE_OK;
  273|    592|}

curlx_wait_ms:
   59|   324k|{
   60|   324k|  int r = 0;
   61|       |
   62|   324k|  if(!timeout_ms)
  ------------------
  |  Branch (62:6): [True: 324k, False: 50]
  ------------------
   63|   324k|    return 0;
   64|     50|  if(timeout_ms < 0) {
  ------------------
  |  Branch (64:6): [True: 0, False: 50]
  ------------------
   65|      0|    SET_SOCKERRNO(SOCKEINVAL);
  ------------------
  |  | 1096|      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|     50|  {
   82|     50|    struct timeval pending_tv;
   83|     50|    r = select(0, NULL, NULL, NULL, curlx_mstotv(&pending_tv, timeout_ms));
   84|     50|  }
   85|     50|#endif /* _WIN32 */
   86|     50|  if(r) {
  ------------------
  |  Branch (86:6): [True: 0, False: 50]
  ------------------
   87|      0|    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
                  if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1129|      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|     50|  return r;
   94|     50|}

curlx_uztosi:
   73|  3.26k|{
   74|       |#ifdef __INTEL_COMPILER
   75|       |#pragma warning(push)
   76|       |#pragma warning(disable:810) /* conversion may lose significant bits */
   77|       |#endif
   78|       |
   79|  3.26k|  DEBUGASSERT(uznum <= (size_t)CURL_MASK_SINT);
  ------------------
  |  | 1081|  3.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 3.26k]
  |  Branch (79:3): [True: 3.26k, False: 0]
  ------------------
   80|  3.26k|  return (int)(uznum & (size_t)CURL_MASK_SINT);
  ------------------
  |  |   44|  3.26k|#define CURL_MASK_SINT    (CURL_MASK_UINT >> 1)
  |  |  ------------------
  |  |  |  |   43|  3.26k|#define CURL_MASK_UINT    ((unsigned int)~0)
  |  |  ------------------
  ------------------
   81|       |
   82|       |#ifdef __INTEL_COMPILER
   83|       |#pragma warning(pop)
   84|       |#endif
   85|  3.26k|}
curlx_uztoui:
  111|  2.90k|{
  112|       |#ifdef __INTEL_COMPILER
  113|       |#pragma warning(push)
  114|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  115|       |#endif
  116|       |
  117|  2.90k|#if UINT_MAX < SIZE_MAX
  118|  2.90k|  DEBUGASSERT(uznum <= (size_t)CURL_MASK_UINT);
  ------------------
  |  | 1081|  2.90k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (118:3): [True: 0, False: 2.90k]
  |  Branch (118:3): [True: 2.90k, False: 0]
  ------------------
  119|  2.90k|#endif
  120|  2.90k|  return (unsigned int)(uznum & (size_t)CURL_MASK_UINT);
  ------------------
  |  |   43|  2.90k|#define CURL_MASK_UINT    ((unsigned int)~0)
  ------------------
  121|       |
  122|       |#ifdef __INTEL_COMPILER
  123|       |#pragma warning(pop)
  124|       |#endif
  125|  2.90k|}
curlx_sltosi:
  131|     84|{
  132|       |#ifdef __INTEL_COMPILER
  133|       |#pragma warning(push)
  134|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  135|       |#endif
  136|       |
  137|     84|  DEBUGASSERT(slnum >= 0);
  ------------------
  |  | 1081|     84|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 0, False: 84]
  |  Branch (137:3): [True: 84, False: 0]
  ------------------
  138|     84|#if INT_MAX < LONG_MAX
  139|     84|  DEBUGASSERT((unsigned long)slnum <= (unsigned long)CURL_MASK_SINT);
  ------------------
  |  | 1081|     84|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (139:3): [True: 0, False: 84]
  |  Branch (139:3): [True: 84, False: 0]
  ------------------
  140|     84|#endif
  141|     84|  return (int)(slnum & (long)CURL_MASK_SINT);
  ------------------
  |  |   44|     84|#define CURL_MASK_SINT    (CURL_MASK_UINT >> 1)
  |  |  ------------------
  |  |  |  |   43|     84|#define CURL_MASK_UINT    ((unsigned int)~0)
  |  |  ------------------
  ------------------
  142|       |
  143|       |#ifdef __INTEL_COMPILER
  144|       |#pragma warning(pop)
  145|       |#endif
  146|     84|}
curlx_sltous:
  173|     62|{
  174|       |#ifdef __INTEL_COMPILER
  175|       |#pragma warning(push)
  176|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  177|       |#endif
  178|       |
  179|     62|  DEBUGASSERT(slnum >= 0);
  ------------------
  |  | 1081|     62|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 62]
  |  Branch (179:3): [True: 62, False: 0]
  ------------------
  180|     62|  DEBUGASSERT((unsigned long)slnum <= (unsigned long)CURL_MASK_USHORT);
  ------------------
  |  | 1081|     62|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (180:3): [True: 0, False: 62]
  |  Branch (180:3): [True: 62, False: 0]
  ------------------
  181|     62|  return (unsigned short)(slnum & (long)CURL_MASK_USHORT);
  ------------------
  |  |   41|     62|#define CURL_MASK_USHORT  ((unsigned short)~0)
  ------------------
  182|       |
  183|       |#ifdef __INTEL_COMPILER
  184|       |#pragma warning(pop)
  185|       |#endif
  186|     62|}
curlx_uitouz:
  282|  1.78k|{
  283|  1.78k|  return (size_t)uinum;
  284|  1.78k|}
curlx_sotouz_range:
  287|    794|{
  288|    794|  if(sonum < 0)
  ------------------
  |  Branch (288:6): [True: 0, False: 794]
  ------------------
  289|      0|    return uzmin;
  290|       |#if SIZEOF_CURL_OFF_T > SIZEOF_SIZE_T
  291|       |  if(sonum > SIZE_MAX)
  292|       |    return uzmax;
  293|       |#endif
  294|    794|  return CURLMIN(CURLMAX((size_t)sonum, uzmin), uzmax);
  ------------------
  |  | 1287|  1.58k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 794, False: 0]
  |  |  |  Branch (1287:25): [True: 791, False: 3]
  |  |  |  Branch (1287:37): [True: 791, False: 3]
  |  |  ------------------
  ------------------
  295|    794|}
curlx_sztouz:
  298|   448k|{
  299|   448k|  if(sznum < 0) {
  ------------------
  |  Branch (299:6): [True: 535, False: 447k]
  ------------------
  300|    535|    *puznum = 0;
  301|    535|    return FALSE;
  ------------------
  |  | 1058|    535|#define FALSE false
  ------------------
  302|    535|  }
  303|   447k|  *puznum = (size_t)sznum;
  304|       |  return TRUE;
  ------------------
  |  | 1055|   447k|#define TRUE true
  ------------------
  305|   448k|}

Curl_cw_out_is_paused:
  459|  2.21M|{
  460|  2.21M|  struct Curl_cwriter *cw_out;
  461|  2.21M|  struct cw_out_ctx *ctx;
  462|       |
  463|  2.21M|  cw_out = Curl_cwriter_get_by_type(data, &Curl_cwt_out);
  464|  2.21M|  if(!cw_out)
  ------------------
  |  Branch (464:6): [True: 0, False: 2.21M]
  ------------------
  465|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  466|       |
  467|  2.21M|  ctx = (struct cw_out_ctx *)cw_out;
  468|  2.21M|  return (bool)ctx->paused;
  469|  2.21M|}
Curl_cw_out_done:
  510|  6.06k|{
  511|  6.06k|  struct Curl_cwriter *cw_out;
  512|  6.06k|  CURLcode result = CURLE_OK;
  513|       |
  514|  6.06k|  cw_out = Curl_cwriter_get_by_type(data, &Curl_cwt_out);
  515|  6.06k|  if(cw_out) {
  ------------------
  |  Branch (515:6): [True: 1.42k, False: 4.63k]
  ------------------
  516|  1.42k|    CURL_TRC_WRITE(data, "[OUT] done");
  ------------------
  |  |  158|  1.42k|  do {                                                     \
  |  |  159|  1.42k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  1.42k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.85k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.42k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.42k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.85k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.42k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.42k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.42k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.42k]
  |  |  ------------------
  ------------------
  517|  1.42k|    result = Curl_cw_pause_flush(data);
  518|  1.42k|    if(!result)
  ------------------
  |  Branch (518:8): [True: 1.42k, False: 0]
  ------------------
  519|  1.42k|      result = cw_out_flush(data, cw_out, TRUE);
  ------------------
  |  | 1055|  1.42k|#define TRUE true
  ------------------
  520|  1.42k|  }
  521|  6.06k|  return result;
  522|  6.06k|}
cw-out.c:cw_out_init:
  106|  1.47k|{
  107|  1.47k|  struct cw_out_ctx *ctx = writer->ctx;
  108|  1.47k|  (void)data;
  109|       |  ctx->buf = NULL;
  110|  1.47k|  return CURLE_OK;
  111|  1.47k|}
cw-out.c:cw_out_write:
  426|  2.20M|{
  427|  2.20M|  struct cw_out_ctx *ctx = writer->ctx;
  428|  2.20M|  CURLcode result;
  429|  2.20M|  bool flush_all = !!(type & CLIENTWRITE_EOS);
  ------------------
  |  |   49|  2.20M|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  430|       |
  431|  2.20M|  if((type & CLIENTWRITE_BODY) ||
  ------------------
  |  |   42|  2.20M|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (431:6): [True: 209k, False: 2.00M]
  ------------------
  432|  2.00M|     ((type & CLIENTWRITE_HEADER) && data->set.include_header)) {
  ------------------
  |  |   44|  2.00M|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
  |  Branch (432:7): [True: 9.27k, False: 1.99M]
  |  Branch (432:38): [True: 1.33k, False: 7.93k]
  ------------------
  433|   211k|    cw_out_type otype = (!blen && (type & CLIENTWRITE_0LEN)) ?
  ------------------
  |  |   50|      0|#define CLIENTWRITE_0LEN    (1 << 8) /* write even 0-length buffers */
  ------------------
  |  Branch (433:26): [True: 0, False: 211k]
  |  Branch (433:35): [True: 0, False: 0]
  ------------------
  434|   211k|                        CW_OUT_BODY_0LEN : CW_OUT_BODY;
  435|   211k|    result = cw_out_do_write(ctx, data, otype, flush_all, buf, blen);
  436|   211k|    if(result)
  ------------------
  |  Branch (436:8): [True: 0, False: 211k]
  ------------------
  437|      0|      return result;
  438|   211k|  }
  439|       |
  440|  2.20M|  if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   44|  2.20M|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   43|  2.20M|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  |  Branch (440:6): [True: 2.00M, False: 209k]
  ------------------
  441|  2.00M|    result = cw_out_do_write(ctx, data, CW_OUT_HDS, flush_all, buf, blen);
  442|  2.00M|    if(result)
  ------------------
  |  Branch (442:8): [True: 0, False: 2.00M]
  ------------------
  443|      0|      return result;
  444|  2.00M|  }
  445|       |
  446|  2.20M|  return CURLE_OK;
  447|  2.20M|}
cw-out.c:cw_out_do_write:
  376|  2.21M|{
  377|  2.21M|  CURLcode result = CURLE_OK;
  378|       |
  379|       |  /* if we have buffered data and it is a different type than what
  380|       |   * we are writing now, try to flush all */
  381|  2.21M|  if(ctx->buf && ctx->buf->type != otype) {
  ------------------
  |  Branch (381:6): [True: 0, False: 2.21M]
  |  Branch (381:18): [True: 0, False: 0]
  ------------------
  382|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  383|      0|    if(result)
  ------------------
  |  Branch (383:8): [True: 0, False: 0]
  ------------------
  384|      0|      goto out;
  385|      0|  }
  386|       |
  387|  2.21M|  if(ctx->buf) {
  ------------------
  |  Branch (387:6): [True: 0, False: 2.21M]
  ------------------
  388|       |    /* still have buffered data, append and flush */
  389|      0|    result = cw_out_append(ctx, data, otype, buf, blen);
  390|      0|    if(result)
  ------------------
  |  Branch (390:8): [True: 0, False: 0]
  ------------------
  391|      0|      goto out;
  392|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
  393|      0|    if(result)
  ------------------
  |  Branch (393:8): [True: 0, False: 0]
  ------------------
  394|      0|      goto out;
  395|      0|  }
  396|  2.21M|  else {
  397|       |    /* nothing buffered, try direct write */
  398|  2.21M|    size_t consumed;
  399|  2.21M|    result = cw_out_ptr_flush(ctx, data, otype, flush_all,
  400|  2.21M|                              buf, blen, &consumed);
  401|  2.21M|    if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (401:8): [True: 0, False: 2.21M]
  |  Branch (401:18): [True: 0, False: 0]
  ------------------
  402|      0|      return result;
  403|  2.21M|    result = CURLE_OK;
  404|  2.21M|    if(consumed < blen) {
  ------------------
  |  Branch (404:8): [True: 0, False: 2.21M]
  ------------------
  405|       |      /* did not write all, append the rest */
  406|      0|      result = cw_out_append(ctx, data, otype,
  407|      0|                             buf + consumed, blen - consumed);
  408|      0|      if(result)
  ------------------
  |  Branch (408:10): [True: 0, False: 0]
  ------------------
  409|      0|        goto out;
  410|      0|    }
  411|  2.21M|  }
  412|       |
  413|  2.21M|out:
  414|  2.21M|  if(result) {
  ------------------
  |  Branch (414:6): [True: 0, False: 2.21M]
  ------------------
  415|       |    /* We do not want to invoked client callbacks a second time after
  416|       |     * encountering an error. See issue #13337 */
  417|       |    ctx->errored = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  418|      0|    cw_out_bufs_free(ctx);
  419|      0|  }
  420|  2.21M|  return result;
  421|  2.21M|}
cw-out.c:cw_out_flush_chain:
  311|  1.42k|{
  312|  1.42k|  struct cw_out_buf *cwbuf = *pcwbuf;
  313|  1.42k|  CURLcode result;
  314|       |
  315|  1.42k|  if(!cwbuf)
  ------------------
  |  Branch (315:6): [True: 1.42k, False: 0]
  ------------------
  316|  1.42k|    return CURLE_OK;
  317|      0|  if(ctx->paused)
  ------------------
  |  Branch (317:6): [True: 0, False: 0]
  ------------------
  318|      0|    return CURLE_OK;
  319|       |
  320|       |  /* write the end of the chain until it blocks or gets empty */
  321|      0|  while(cwbuf->next) {
  ------------------
  |  Branch (321:9): [True: 0, False: 0]
  ------------------
  322|      0|    struct cw_out_buf **plast = &cwbuf->next;
  323|      0|    while((*plast)->next)
  ------------------
  |  Branch (323:11): [True: 0, False: 0]
  ------------------
  324|      0|      plast = &(*plast)->next;
  325|      0|    result = cw_out_flush_chain(ctx, data, plast, flush_all);
  326|      0|    if(result)
  ------------------
  |  Branch (326:8): [True: 0, False: 0]
  ------------------
  327|      0|      return result;
  328|      0|    if(*plast) {
  ------------------
  |  Branch (328:8): [True: 0, False: 0]
  ------------------
  329|       |      /* could not write last, paused again? */
  330|      0|      DEBUGASSERT(ctx->paused);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (330:7): [True: 0, False: 0]
  |  Branch (330:7): [True: 0, False: 0]
  ------------------
  331|      0|      return CURLE_OK;
  332|      0|    }
  333|      0|  }
  334|       |
  335|      0|  result = cw_out_buf_flush(ctx, data, cwbuf, flush_all);
  336|      0|  if(result)
  ------------------
  |  Branch (336:6): [True: 0, False: 0]
  ------------------
  337|      0|    return result;
  338|      0|  if(!curlx_dyn_len(&cwbuf->b)) {
  ------------------
  |  Branch (338:6): [True: 0, False: 0]
  ------------------
  339|      0|    cw_out_buf_free(cwbuf);
  340|       |    *pcwbuf = NULL;
  341|      0|  }
  342|      0|  return CURLE_OK;
  343|      0|}
cw-out.c:cw_out_ptr_flush:
  227|  2.21M|{
  228|  2.21M|  curl_write_callback wcb = NULL;
  229|  2.21M|  void *wcb_data;
  230|  2.21M|  size_t max_write, min_write;
  231|  2.21M|  size_t wlen, nwritten = 0;
  232|  2.21M|  CURLcode result = CURLE_OK;
  233|       |
  234|       |  /* If we errored once, we do not invoke the client callback again */
  235|  2.21M|  if(ctx->errored)
  ------------------
  |  Branch (235:6): [True: 0, False: 2.21M]
  ------------------
  236|      0|    return CURLE_WRITE_ERROR;
  237|       |
  238|       |  /* write callbacks may get NULLed by the client between calls. */
  239|  2.21M|  cw_get_writefunc(data, otype, &wcb, &wcb_data, &max_write, &min_write);
  240|  2.21M|  if(!wcb) {
  ------------------
  |  Branch (240:6): [True: 2.00M, False: 211k]
  ------------------
  241|  2.00M|    *pconsumed = blen;
  242|  2.00M|    return CURLE_OK;
  243|  2.00M|  }
  244|       |
  245|   211k|  *pconsumed = 0;
  246|   211k|  if(otype == CW_OUT_BODY_0LEN) {
  ------------------
  |  Branch (246:6): [True: 0, False: 211k]
  ------------------
  247|      0|    DEBUGASSERT(!blen);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:5): [True: 0, False: 0]
  |  Branch (247:5): [True: 0, False: 0]
  ------------------
  248|      0|    return cw_out_cb_write(ctx, data, wcb, wcb_data, otype,
  249|      0|                           buf, blen, &nwritten);
  250|      0|  }
  251|   211k|  else {
  252|   422k|    while(blen && !ctx->paused) {
  ------------------
  |  Branch (252:11): [True: 211k, False: 211k]
  |  Branch (252:19): [True: 211k, False: 0]
  ------------------
  253|   211k|      if(!flush_all && blen < min_write)
  ------------------
  |  Branch (253:10): [True: 211k, False: 0]
  |  Branch (253:24): [True: 0, False: 211k]
  ------------------
  254|      0|        break;
  255|   211k|      wlen = max_write ? CURLMIN(blen, max_write) : blen;
  ------------------
  |  | 1287|   211k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 211k, False: 51]
  |  |  ------------------
  ------------------
  |  Branch (255:14): [True: 211k, False: 0]
  ------------------
  256|   211k|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (256:10): [True: 211k, False: 0]
  ------------------
  257|   211k|        result = Curl_pgrs_deliver_check(data, wlen);
  258|   211k|      if(!result)
  ------------------
  |  Branch (258:10): [True: 211k, False: 0]
  ------------------
  259|   211k|        result = cw_out_cb_write(ctx, data, wcb, wcb_data, otype,
  260|   211k|                                 buf, wlen, &nwritten);
  261|   211k|      if(result)
  ------------------
  |  Branch (261:10): [True: 0, False: 211k]
  ------------------
  262|      0|        return result;
  263|   211k|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (263:10): [True: 211k, False: 0]
  ------------------
  264|   211k|        Curl_pgrs_deliver_inc(data, nwritten);
  265|   211k|      *pconsumed += nwritten;
  266|   211k|      blen -= nwritten;
  267|   211k|      buf += nwritten;
  268|   211k|    }
  269|   211k|  }
  270|   211k|  return CURLE_OK;
  271|   211k|}
cw-out.c:cw_get_writefunc:
  147|  2.21M|{
  148|  2.21M|  switch(otype) {
  149|   211k|  case CW_OUT_BODY:
  ------------------
  |  Branch (149:3): [True: 211k, False: 2.00M]
  ------------------
  150|   211k|  case CW_OUT_BODY_0LEN:
  ------------------
  |  Branch (150:3): [True: 0, False: 2.21M]
  ------------------
  151|   211k|    *pwcb = data->set.fwrite_func;
  152|   211k|    *pwcb_data = data->set.out;
  153|   211k|    *pmax_write = CURL_MAX_WRITE_SIZE;
  ------------------
  |  |  265|   211k|#define CURL_MAX_WRITE_SIZE 16384
  ------------------
  154|       |    /* if we ever want buffering of BODY output, we can set `min_write`
  155|       |     * the preferred size. The default should always be to pass data
  156|       |     * to the client as it comes without delay */
  157|   211k|    *pmin_write = 0;
  158|   211k|    break;
  159|  2.00M|  case CW_OUT_HDS:
  ------------------
  |  Branch (159:3): [True: 2.00M, False: 211k]
  ------------------
  160|  2.00M|    *pwcb = data->set.fwrite_header ? data->set.fwrite_header :
  ------------------
  |  Branch (160:13): [True: 0, False: 2.00M]
  ------------------
  161|  2.00M|             (data->set.writeheader ? data->set.fwrite_func : NULL);
  ------------------
  |  Branch (161:15): [True: 0, False: 2.00M]
  ------------------
  162|  2.00M|    *pwcb_data = data->set.writeheader;
  163|  2.00M|    *pmax_write = 0; /* do not chunk-write headers, write them as they are */
  164|  2.00M|    *pmin_write = 0;
  165|  2.00M|    break;
  166|      0|  default:
  ------------------
  |  Branch (166:3): [True: 0, False: 2.21M]
  ------------------
  167|      0|    *pwcb = NULL;
  168|      0|    *pwcb_data = NULL;
  169|      0|    *pmax_write = CURL_MAX_WRITE_SIZE;
  ------------------
  |  |  265|      0|#define CURL_MAX_WRITE_SIZE 16384
  ------------------
  170|      0|    *pmin_write = 0;
  171|  2.21M|  }
  172|  2.21M|}
cw-out.c:cw_out_cb_write:
  181|   211k|{
  182|   211k|  size_t nwritten;
  183|   211k|  CURLcode result;
  184|       |
  185|   211k|  NOVERBOSE((void)otype);
  ------------------
  |  | 1619|   211k|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1180|   211k|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1180:35): [Folded, False: 211k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|       |
  187|   211k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|   211k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (187:3): [True: 0, False: 211k]
  |  Branch (187:3): [True: 211k, False: 0]
  ------------------
  188|   211k|  *pnwritten = 0;
  189|   211k|  Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|   211k|#define TRUE true
  ------------------
  190|   211k|  nwritten = wcb((char *)CURL_UNCONST(buf), 1, blen, wcb_data);
  ------------------
  |  |  866|   211k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  191|   211k|  Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|   211k|#define FALSE false
  ------------------
  192|   211k|  CURL_TRC_WRITE(data, "[OUT] wrote %zu %s bytes -> %zu",
  ------------------
  |  |  158|   211k|  do {                                                     \
  |  |  159|   211k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|   211k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   422k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 211k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 211k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   422k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|   211k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|   211k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (160:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  161|   211k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 211k]
  |  |  ------------------
  ------------------
  193|   211k|                 blen, (otype == CW_OUT_HDS) ? "header" : "body",
  194|   211k|                 nwritten);
  195|   211k|  if(nwritten == CURL_WRITEFUNC_PAUSE) {
  ------------------
  |  |  277|   211k|#define CURL_WRITEFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (195:6): [True: 0, False: 211k]
  ------------------
  196|      0|    if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (196:8): [True: 0, False: 0]
  ------------------
  197|       |      /* Protocols that work without network cannot be paused. This is
  198|       |         actually only file:// now, and it cannot pause since the transfer is
  199|       |         not done using the "normal" procedure. */
  200|      0|      failf(data, "Write callback asked for PAUSE when not supported");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  201|      0|      return CURLE_WRITE_ERROR;
  202|      0|    }
  203|      0|    ctx->paused = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  204|      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)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  205|      0|    result = Curl_xfer_pause_recv(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  206|      0|    return result ? result : CURLE_AGAIN;
  ------------------
  |  Branch (206:12): [True: 0, False: 0]
  ------------------
  207|      0|  }
  208|   211k|  else if(nwritten == CURL_WRITEFUNC_ERROR) {
  ------------------
  |  |  281|   211k|#define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
  ------------------
  |  Branch (208:11): [True: 0, False: 211k]
  ------------------
  209|      0|    failf(data, "client returned ERROR on write of %zu bytes", blen);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  210|      0|    return CURLE_WRITE_ERROR;
  211|      0|  }
  212|   211k|  else if(nwritten != blen) {
  ------------------
  |  Branch (212:11): [True: 0, False: 211k]
  ------------------
  213|      0|    failf(data, "Failure writing output to destination, "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  214|      0|          "passed %zu returned %zu", blen, nwritten);
  215|      0|    return CURLE_WRITE_ERROR;
  216|      0|  }
  217|   211k|  *pnwritten = nwritten;
  218|   211k|  return CURLE_OK;
  219|   211k|}
cw-out.c:cw_out_bufs_free:
  114|  1.47k|{
  115|  1.47k|  while(ctx->buf) {
  ------------------
  |  Branch (115:9): [True: 0, False: 1.47k]
  ------------------
  116|      0|    struct cw_out_buf *next = ctx->buf->next;
  117|      0|    cw_out_buf_free(ctx->buf);
  118|      0|    ctx->buf = next;
  119|      0|  }
  120|  1.47k|}
cw-out.c:cw_out_close:
  134|  1.47k|{
  135|  1.47k|  struct cw_out_ctx *ctx = writer->ctx;
  136|       |
  137|  1.47k|  (void)data;
  138|  1.47k|  cw_out_bufs_free(ctx);
  139|  1.47k|}
cw-out.c:cw_out_flush:
  474|  1.42k|{
  475|  1.42k|  struct cw_out_ctx *ctx = (struct cw_out_ctx *)cw_out;
  476|  1.42k|  CURLcode result = CURLE_OK;
  477|       |
  478|  1.42k|  if(ctx->errored)
  ------------------
  |  Branch (478:6): [True: 0, False: 1.42k]
  ------------------
  479|      0|    return CURLE_WRITE_ERROR;
  480|  1.42k|  if(ctx->paused)
  ------------------
  |  Branch (480:6): [True: 0, False: 1.42k]
  ------------------
  481|      0|    return CURLE_OK;  /* not doing it */
  482|       |
  483|  1.42k|  result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
  484|  1.42k|  if(result) {
  ------------------
  |  Branch (484:6): [True: 0, False: 1.42k]
  ------------------
  485|      0|    ctx->errored = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  486|      0|    cw_out_bufs_free(ctx);
  487|      0|    return result;
  488|      0|  }
  489|  1.42k|  return result;
  490|  1.42k|}

Curl_cw_pause_flush:
  216|  1.42k|{
  217|  1.42k|  struct Curl_cwriter *cw_pause;
  218|  1.42k|  CURLcode result = CURLE_OK;
  219|       |
  220|  1.42k|  cw_pause = Curl_cwriter_get_by_type(data, &Curl_cwt_pause);
  221|  1.42k|  if(cw_pause)
  ------------------
  |  Branch (221:6): [True: 1.42k, False: 0]
  ------------------
  222|  1.42k|    result = cw_pause_flush(data, cw_pause);
  223|       |
  224|  1.42k|  return result;
  225|  1.42k|}
cw-pause.c:cw_pause_init:
   75|  1.47k|{
   76|  1.47k|  struct cw_pause_ctx *ctx = writer->ctx;
   77|  1.47k|  (void)data;
   78|       |  ctx->buf = NULL;
   79|  1.47k|  return CURLE_OK;
   80|  1.47k|}
cw-pause.c:cw_pause_write:
  145|  2.20M|{
  146|  2.20M|  struct cw_pause_ctx *ctx = writer->ctx;
  147|  2.20M|  CURLcode result = CURLE_OK;
  148|  2.20M|  size_t wlen = 0;
  149|  2.20M|  bool decoding = Curl_cwriter_is_content_decoding(data);
  150|       |
  151|  2.20M|  if(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (151:6): [True: 0, False: 2.20M]
  |  Branch (151:18): [True: 0, False: 0]
  ------------------
  152|      0|    result = cw_pause_flush(data, writer);
  153|      0|    if(result)
  ------------------
  |  Branch (153:8): [True: 0, False: 0]
  ------------------
  154|      0|      return result;
  155|      0|  }
  156|       |
  157|  2.20M|  while(!ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (157:9): [True: 2.20M, False: 0]
  |  Branch (157:22): [True: 2.20M, False: 0]
  ------------------
  158|  2.20M|    int wtype = type;
  159|  2.20M|    DEBUGASSERT(!ctx->buf);
  ------------------
  |  | 1081|  2.20M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (159:5): [True: 0, False: 2.20M]
  |  Branch (159:5): [True: 2.20M, False: 0]
  ------------------
  160|       |    /* content decoding might blow up size considerably, write smaller
  161|       |     * chunks to make pausing need buffer less. */
  162|  2.20M|    wlen = (decoding && (type & CLIENTWRITE_BODY)) ?
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (162:13): [True: 0, False: 2.20M]
  |  Branch (162:25): [True: 0, False: 0]
  ------------------
  163|  2.20M|           CURLMIN(blen, CW_PAUSE_DEC_WRITE_CHUNK) : blen;
  ------------------
  |  | 1287|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  164|  2.20M|    if(wlen < blen)
  ------------------
  |  Branch (164:8): [True: 0, False: 2.20M]
  ------------------
  165|      0|      wtype &= ~CLIENTWRITE_EOS;
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  166|  2.20M|    result = Curl_cwriter_write(data, writer->next, wtype, buf, wlen);
  167|  2.20M|    CURL_TRC_WRITE(data, "[PAUSE] writing %zu/%zu bytes of type %x -> %d",
  ------------------
  |  |  158|  2.20M|  do {                                                     \
  |  |  159|  2.20M|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  2.20M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.41M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.20M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.20M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.41M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.20M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  2.20M|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  2.20M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 2.20M]
  |  |  ------------------
  ------------------
  168|  2.20M|                   wlen, blen, wtype, result);
  169|  2.20M|    if(result)
  ------------------
  |  Branch (169:8): [True: 0, False: 2.20M]
  ------------------
  170|      0|      return result;
  171|  2.20M|    buf += wlen;
  172|  2.20M|    blen -= wlen;
  173|  2.20M|    if(!blen)
  ------------------
  |  Branch (173:8): [True: 2.20M, False: 0]
  ------------------
  174|  2.20M|      return result;
  175|  2.20M|  }
  176|       |
  177|      0|  do {
  178|      0|    size_t nwritten = 0;
  179|      0|    if(ctx->buf && (ctx->buf->type == type) && (type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (179:8): [True: 0, False: 0]
  |  Branch (179:20): [True: 0, False: 0]
  |  Branch (179:48): [True: 0, False: 0]
  ------------------
  180|       |      /* same type and body, append to current buffer which has a soft
  181|       |       * limit and should take everything up to OOM. */
  182|      0|      result = Curl_bufq_cwrite(&ctx->buf->b, buf, blen, &nwritten);
  183|      0|    }
  184|      0|    else {
  185|       |      /* Need a new buf, type changed */
  186|      0|      struct cw_pause_buf *cwbuf = cw_pause_buf_create(type, blen);
  187|      0|      if(!cwbuf)
  ------------------
  |  Branch (187:10): [True: 0, False: 0]
  ------------------
  188|      0|        return CURLE_OUT_OF_MEMORY;
  189|      0|      cwbuf->next = ctx->buf;
  190|      0|      ctx->buf = cwbuf;
  191|      0|      result = Curl_bufq_cwrite(&ctx->buf->b, buf, blen, &nwritten);
  192|      0|    }
  193|      0|    CURL_TRC_WRITE(data, "[PAUSE] buffer %zu more bytes of type %x, "
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  194|      0|                   "total=%zu -> %d", nwritten, type, ctx->buf_total + wlen,
  195|      0|                   result);
  196|      0|    if(result)
  ------------------
  |  Branch (196:8): [True: 0, False: 0]
  ------------------
  197|      0|      return result;
  198|      0|    buf += nwritten;
  199|      0|    blen -= nwritten;
  200|      0|    ctx->buf_total += nwritten;
  201|      0|  } while(blen);
  ------------------
  |  Branch (201:11): [True: 0, False: 0]
  ------------------
  202|       |
  203|      0|  return result;
  204|      0|}
cw-pause.c:cw_pause_close:
   92|  1.47k|{
   93|  1.47k|  struct cw_pause_ctx *ctx = writer->ctx;
   94|       |
   95|  1.47k|  (void)data;
   96|  1.47k|  cw_pause_bufs_free(ctx);
   97|  1.47k|}
cw-pause.c:cw_pause_bufs_free:
   83|  1.47k|{
   84|  1.47k|  while(ctx->buf) {
  ------------------
  |  Branch (84:9): [True: 0, False: 1.47k]
  ------------------
   85|      0|    struct cw_pause_buf *next = ctx->buf->next;
   86|      0|    cw_pause_buf_free(ctx->buf);
   87|      0|    ctx->buf = next;
   88|      0|  }
   89|  1.47k|}
cw-pause.c:cw_pause_flush:
  101|  1.42k|{
  102|  1.42k|  struct cw_pause_ctx *ctx = (struct cw_pause_ctx *)cw_pause;
  103|  1.42k|  bool decoding = Curl_cwriter_is_content_decoding(data);
  104|  1.42k|  CURLcode result = CURLE_OK;
  105|       |
  106|       |  /* write the end of the chain until it blocks or gets empty */
  107|  1.42k|  while(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (107:9): [True: 0, False: 1.42k]
  |  Branch (107:21): [True: 0, False: 0]
  ------------------
  108|      0|    struct cw_pause_buf **plast = &ctx->buf;
  109|      0|    size_t blen, wlen = 0;
  110|      0|    const unsigned char *buf = NULL;
  111|       |
  112|      0|    while((*plast)->next) /* got to last in list */
  ------------------
  |  Branch (112:11): [True: 0, False: 0]
  ------------------
  113|      0|      plast = &(*plast)->next;
  114|      0|    if(Curl_bufq_peek(&(*plast)->b, &buf, &blen)) {
  ------------------
  |  Branch (114:8): [True: 0, False: 0]
  ------------------
  115|      0|      wlen = (decoding && ((*plast)->type & CLIENTWRITE_BODY)) ?
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (115:15): [True: 0, False: 0]
  |  Branch (115:27): [True: 0, False: 0]
  ------------------
  116|      0|             CURLMIN(blen, CW_PAUSE_DEC_WRITE_CHUNK) : blen;
  ------------------
  |  | 1287|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  117|      0|      result = Curl_cwriter_write(data, cw_pause->next, (*plast)->type,
  118|      0|                                  (const char *)buf, wlen);
  119|      0|      CURL_TRC_WRITE(data, "[PAUSE] flushed %zu/%zu bytes, type=%x -> %d",
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  120|      0|                     wlen, ctx->buf_total, (*plast)->type, result);
  121|      0|      Curl_bufq_skip(&(*plast)->b, wlen);
  122|      0|      DEBUGASSERT(ctx->buf_total >= wlen);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (122:7): [True: 0, False: 0]
  |  Branch (122:7): [True: 0, False: 0]
  ------------------
  123|      0|      ctx->buf_total -= wlen;
  124|      0|      if(result)
  ------------------
  |  Branch (124:10): [True: 0, False: 0]
  ------------------
  125|      0|        return result;
  126|      0|    }
  127|      0|    else if((*plast)->type & CLIENTWRITE_EOS) {
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (127:13): [True: 0, False: 0]
  ------------------
  128|      0|      result = Curl_cwriter_write(data, cw_pause->next, (*plast)->type,
  129|      0|                                  (const char *)buf, 0);
  130|      0|      CURL_TRC_WRITE(data, "[PAUSE] flushed 0/%zu bytes, type=%x -> %d",
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  131|      0|                     ctx->buf_total, (*plast)->type, result);
  132|      0|    }
  133|       |
  134|      0|    if(Curl_bufq_is_empty(&(*plast)->b)) {
  ------------------
  |  Branch (134:8): [True: 0, False: 0]
  ------------------
  135|      0|      cw_pause_buf_free(*plast);
  136|      0|      *plast = NULL;
  137|      0|    }
  138|      0|  }
  139|  1.42k|  return result;
  140|  1.42k|}

Curl_dnscache_prune:
  172|  6.06k|{
  173|  6.06k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  174|       |  /* the timeout may be set -1 (forever) */
  175|  6.06k|  timediff_t timeout_ms = data->set.dns_cache_timeout_ms;
  176|       |
  177|  6.06k|  if(!dnscache || (timeout_ms == -1))
  ------------------
  |  Branch (177:6): [True: 0, False: 6.06k]
  |  Branch (177:19): [True: 0, False: 6.06k]
  ------------------
  178|       |    /* NULL hostcache means we cannot do it */
  179|      0|    return;
  180|       |
  181|  6.06k|  dnscache_lock(data, dnscache);
  182|       |
  183|  6.06k|  do {
  184|       |    /* Remove outdated and unused entries from the hostcache */
  185|  6.06k|    timediff_t oldest_ms =
  186|  6.06k|      dnscache_prune(&dnscache->entries, timeout_ms, *Curl_pgrs_now(data));
  187|       |
  188|  6.06k|    if(Curl_hash_count(&dnscache->entries) > MAX_DNS_CACHE_SIZE)
  ------------------
  |  |   61|  6.06k|#define MAX_DNS_CACHE_SIZE 29999
  ------------------
  |  Branch (188:8): [True: 0, False: 6.06k]
  ------------------
  189|       |      /* prune the ones over half this age */
  190|      0|      timeout_ms = oldest_ms / 2;
  191|  6.06k|    else
  192|  6.06k|      break;
  193|       |
  194|       |    /* if the cache size is still too big, use the oldest age as new prune
  195|       |       limit */
  196|  6.06k|  } while(timeout_ms);
  ------------------
  |  Branch (196:11): [True: 0, False: 0]
  ------------------
  197|       |
  198|  6.06k|  dnscache_unlock(data, dnscache);
  199|  6.06k|}
Curl_dnscache_get:
  299|   331k|{
  300|   331k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  301|   331k|  struct Curl_dns_entry *dns = NULL;
  302|   331k|  CURLcode result = CURLE_OK;
  303|       |
  304|   331k|  dnscache_lock(data, dnscache);
  305|   331k|  result = fetch_addr(data, dnscache, dns_queries, hostname, port, &dns);
  306|   331k|  if(!result && dns)
  ------------------
  |  Branch (306:6): [True: 331k, False: 89]
  |  Branch (306:17): [True: 27, False: 331k]
  ------------------
  307|     27|    dns->refcount++; /* we pass out a reference */
  308|   331k|  else if(result) {
  ------------------
  |  Branch (308:11): [True: 89, False: 331k]
  ------------------
  309|     89|    DEBUGASSERT(!dns);
  ------------------
  |  | 1081|     89|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (309:5): [True: 0, False: 89]
  |  Branch (309:5): [True: 89, False: 0]
  ------------------
  310|     89|    dns = NULL;
  311|     89|  }
  312|   331k|  dnscache_unlock(data, dnscache);
  313|       |
  314|   331k|  *pentry = dns;
  315|   331k|  return result;
  316|   331k|}
dns_shuffle_addr:
  348|     55|{
  349|     55|  CURLcode result = CURLE_OK;
  350|     55|  const int num_addrs = num_addresses(*addr);
  351|       |
  352|     55|  if(num_addrs > 1) {
  ------------------
  |  Branch (352:6): [True: 48, False: 7]
  ------------------
  353|     48|    struct Curl_addrinfo **nodes;
  354|     48|    CURL_TRC_DNS(data, "Shuffling %i addresses", num_addrs);
  ------------------
  |  |  168|     48|  do {                                 \
  |  |  169|     48|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|     48|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     48|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|     96|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 48, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 48]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|     96|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|     48|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|     48|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|     48|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 48]
  |  |  ------------------
  ------------------
  355|       |
  356|     48|    nodes = curlx_malloc(num_addrs * sizeof(*nodes));
  ------------------
  |  | 1478|     48|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  357|     48|    if(nodes) {
  ------------------
  |  Branch (357:8): [True: 48, False: 0]
  ------------------
  358|     48|      int i;
  359|     48|      unsigned int *rnd;
  360|     48|      const size_t rnd_size = num_addrs * sizeof(*rnd);
  361|       |
  362|       |      /* build a plain array of Curl_addrinfo pointers */
  363|     48|      nodes[0] = *addr;
  364|     96|      for(i = 1; i < num_addrs; i++) {
  ------------------
  |  Branch (364:18): [True: 48, False: 48]
  ------------------
  365|     48|        nodes[i] = nodes[i - 1]->ai_next;
  366|     48|      }
  367|       |
  368|     48|      rnd = curlx_malloc(rnd_size);
  ------------------
  |  | 1478|     48|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  369|     48|      if(rnd) {
  ------------------
  |  Branch (369:10): [True: 48, False: 0]
  ------------------
  370|       |        /* Fisher-Yates shuffle */
  371|     48|        if(Curl_rand(data, (unsigned char *)rnd, rnd_size) == CURLE_OK) {
  ------------------
  |  |   33|     48|#define Curl_rand(a, b, c) Curl_rand_bytes(a, TRUE, b, c)
  |  |  ------------------
  |  |  |  | 1055|     48|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (371:12): [True: 48, False: 0]
  ------------------
  372|     48|          struct Curl_addrinfo *swap_tmp;
  373|     96|          for(i = num_addrs - 1; i > 0; i--) {
  ------------------
  |  Branch (373:34): [True: 48, False: 48]
  ------------------
  374|     48|            swap_tmp = nodes[rnd[i] % (unsigned int)(i + 1)];
  375|     48|            nodes[rnd[i] % (unsigned int)(i + 1)] = nodes[i];
  376|     48|            nodes[i] = swap_tmp;
  377|     48|          }
  378|       |
  379|       |          /* relink list in the new order */
  380|     96|          for(i = 1; i < num_addrs; i++) {
  ------------------
  |  Branch (380:22): [True: 48, False: 48]
  ------------------
  381|     48|            nodes[i - 1]->ai_next = nodes[i];
  382|     48|          }
  383|       |
  384|     48|          nodes[num_addrs - 1]->ai_next = NULL;
  385|     48|          *addr = nodes[0];
  386|     48|        }
  387|     48|        curlx_free(rnd);
  ------------------
  |  | 1483|     48|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  388|     48|      }
  389|      0|      else
  390|      0|        result = CURLE_OUT_OF_MEMORY;
  391|     48|      curlx_free(nodes);
  ------------------
  |  | 1483|     48|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  392|     48|    }
  393|      0|    else
  394|      0|      result = CURLE_OUT_OF_MEMORY;
  395|     48|  }
  396|     55|  return result;
  397|     55|}
Curl_dnscache_mk_entry:
  496|  5.30k|{
  497|  5.30k|  return dnscache_entry_create(data, dns_queries, paddr, NULL, hostname,
  498|  5.30k|                               hostname ? strlen(hostname) : 0,
  ------------------
  |  Branch (498:32): [True: 5.28k, False: 14]
  ------------------
  499|       |                               port, FALSE);
  ------------------
  |  | 1058|  5.30k|#define FALSE false
  ------------------
  500|  5.30k|}
Curl_dnscache_mk_entry2:
  508|    219|{
  509|    219|  return dnscache_entry_create(data, dns_queries, paddr1, paddr2, hostname,
  510|    219|                               hostname ? strlen(hostname) : 0,
  ------------------
  |  Branch (510:32): [True: 219, False: 0]
  ------------------
  511|       |                               port, FALSE);
  ------------------
  |  | 1058|    219|#define FALSE false
  ------------------
  512|    219|}
Curl_dnscache_add:
  569|  5.49k|{
  570|  5.49k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  571|  5.49k|  char id[MAX_HOSTCACHE_LEN];
  572|  5.49k|  size_t idlen;
  573|       |
  574|  5.49k|  if(!dnscache)
  ------------------
  |  Branch (574:6): [True: 0, False: 5.49k]
  ------------------
  575|      0|    return CURLE_FAILED_INIT;
  576|       |  /* Create an entry id, based upon the hostname and port */
  577|  5.49k|  idlen = create_dnscache_id(entry->hostname, 0, entry->port, id, sizeof(id));
  578|       |
  579|       |  /* Store the resolved data in our DNS cache and up ref count */
  580|  5.49k|  dnscache_lock(data, dnscache);
  581|  5.49k|  if(!Curl_hash_add(&dnscache->entries, id, idlen + 1, (void *)entry)) {
  ------------------
  |  Branch (581:6): [True: 0, False: 5.49k]
  ------------------
  582|      0|    dnscache_unlock(data, dnscache);
  583|      0|    return CURLE_OUT_OF_MEMORY;
  584|      0|  }
  585|  5.49k|  entry->refcount++;
  586|  5.49k|  dnscache_unlock(data, dnscache);
  587|  5.49k|  return CURLE_OK;
  588|  5.49k|}
Curl_dnscache_add_negative:
  594|    417|{
  595|    417|  struct Curl_dnscache *dnscache = dnscache_get(data);
  596|    417|  struct Curl_dns_entry *dns;
  597|    417|  DEBUGASSERT(dnscache);
  ------------------
  |  | 1081|    417|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (597:3): [True: 0, False: 417]
  |  Branch (597:3): [True: 417, False: 0]
  ------------------
  598|    417|  if(!dnscache)
  ------------------
  |  Branch (598:6): [True: 0, False: 417]
  ------------------
  599|      0|    return CURLE_FAILED_INIT;
  600|       |
  601|    417|  dnscache_lock(data, dnscache);
  602|       |
  603|       |  /* put this new host in the cache */
  604|    417|  dns = dnscache_add_addr(data, dnscache, dns_queries, NULL,
  605|    417|                          host, strlen(host), port, FALSE);
  ------------------
  |  | 1058|    417|#define FALSE false
  ------------------
  606|    417|  if(dns) {
  ------------------
  |  Branch (606:6): [True: 417, False: 0]
  ------------------
  607|       |    /* release the returned reference; the cache itself will keep the
  608|       |     * entry alive: */
  609|    417|    dns->refcount--;
  610|    417|    dnscache_unlock(data, dnscache);
  611|    417|    CURL_TRC_DNS(data, "cache negative name resolve for %s:%d type=%s",
  ------------------
  |  |  168|    417|  do {                                 \
  |  |  169|    417|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    417|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    417|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    834|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 417, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 417]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    834|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    417|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    417|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    417|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 417]
  |  |  ------------------
  ------------------
  612|    417|                 host, port, Curl_resolv_query_str(dns_queries));
  613|    417|    return CURLE_OK;
  614|    417|  }
  615|      0|  dnscache_unlock(data, dnscache);
  616|      0|  return CURLE_OUT_OF_MEMORY;
  617|    417|}
Curl_dns_entry_unlink:
  628|  10.9k|{
  629|  10.9k|  if(*pdns) {
  ------------------
  |  Branch (629:6): [True: 5.54k, False: 5.35k]
  ------------------
  630|  5.54k|    struct Curl_dnscache *dnscache = dnscache_get(data);
  631|  5.54k|    struct Curl_dns_entry *dns = *pdns;
  632|  5.54k|    *pdns = NULL;
  633|  5.54k|    dnscache_lock(data, dnscache);
  634|  5.54k|    dns->refcount--;
  635|  5.54k|    if(dns->refcount == 0)
  ------------------
  |  Branch (635:8): [True: 30, False: 5.51k]
  ------------------
  636|     30|      dnscache_entry_free(dns);
  637|  5.54k|    dnscache_unlock(data, dnscache);
  638|  5.54k|  }
  639|  10.9k|}
Curl_dnscache_init:
  654|  10.0k|{
  655|  10.0k|  Curl_hash_init(&dns->entries, size, Curl_hash_str, curlx_str_key_compare,
  656|  10.0k|                 dnscache_entry_dtor);
  657|  10.0k|}
Curl_dnscache_destroy:
  660|  10.0k|{
  661|  10.0k|  Curl_hash_destroy(&dns->entries);
  662|  10.0k|}
dnscache.c:dnscache_get:
  145|   349k|{
  146|   349k|  if(data->share && data->share->specifier & (1 << CURL_LOCK_DATA_DNS))
  ------------------
  |  Branch (146:6): [True: 0, False: 349k]
  |  Branch (146:21): [True: 0, False: 0]
  ------------------
  147|      0|    return &data->share->dnscache;
  148|   349k|  if(data->multi)
  ------------------
  |  Branch (148:6): [True: 349k, False: 0]
  ------------------
  149|   349k|    return &data->multi->dnscache;
  150|      0|  return NULL;
  151|   349k|}
dnscache.c:dnscache_lock:
  155|   349k|{
  156|   349k|  if(data->share && dnscache == &data->share->dnscache)
  ------------------
  |  Branch (156:6): [True: 0, False: 349k]
  |  Branch (156:21): [True: 0, False: 0]
  ------------------
  157|      0|    Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
  158|   349k|}
dnscache.c:dnscache_prune:
  130|  6.06k|{
  131|  6.06k|  struct dnscache_prune_data user;
  132|       |
  133|  6.06k|  user.max_age_ms = cache_timeout_ms;
  134|  6.06k|  user.now = now;
  135|  6.06k|  user.oldest_ms = 0;
  136|       |
  137|  6.06k|  Curl_hash_clean_with_criterium(hostcache,
  138|  6.06k|                                 (void *)&user,
  139|  6.06k|                                 dnscache_entry_is_stale);
  140|       |
  141|  6.06k|  return user.oldest_ms;
  142|  6.06k|}
dnscache.c:dnscache_entry_is_stale:
  106|  6.31k|{
  107|  6.31k|  struct dnscache_prune_data *prune = (struct dnscache_prune_data *)datap;
  108|  6.31k|  struct Curl_dns_entry *dns = (struct Curl_dns_entry *)hc;
  109|       |
  110|  6.31k|  if(dns->timestamp.tv_sec || dns->timestamp.tv_usec) {
  ------------------
  |  Branch (110:6): [True: 6.31k, False: 0]
  |  Branch (110:31): [True: 0, False: 0]
  ------------------
  111|       |    /* get age in milliseconds */
  112|  6.31k|    timediff_t age = curlx_ptimediff_ms(&prune->now, &dns->timestamp);
  113|  6.31k|    if(!dns->addr)
  ------------------
  |  Branch (113:8): [True: 707, False: 5.60k]
  ------------------
  114|    707|      age *= 2; /* negative entries age twice as fast */
  115|  6.31k|    if(age >= prune->max_age_ms)
  ------------------
  |  Branch (115:8): [True: 7, False: 6.30k]
  ------------------
  116|      7|      return TRUE;
  ------------------
  |  | 1055|      7|#define TRUE true
  ------------------
  117|  6.30k|    if(age > prune->oldest_ms)
  ------------------
  |  Branch (117:8): [True: 2.53k, False: 3.77k]
  ------------------
  118|  2.53k|      prune->oldest_ms = age;
  119|  6.30k|  }
  120|  6.30k|  return FALSE;
  ------------------
  |  | 1058|  6.30k|#define FALSE false
  ------------------
  121|  6.31k|}
dnscache.c:dnscache_unlock:
  162|   349k|{
  163|   349k|  if(data->share && dnscache == &data->share->dnscache)
  ------------------
  |  Branch (163:6): [True: 0, False: 349k]
  |  Branch (163:21): [True: 0, False: 0]
  ------------------
  164|      0|    Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
  165|   349k|}
dnscache.c:fetch_addr:
  218|   331k|{
  219|   331k|  struct Curl_dns_entry *dns = NULL;
  220|   331k|  char entry_id[MAX_HOSTCACHE_LEN];
  221|   331k|  size_t entry_len;
  222|   331k|  CURLcode result = CURLE_OK;
  223|       |
  224|   331k|  *pdns = NULL;
  225|   331k|  if(!dnscache)
  ------------------
  |  Branch (225:6): [True: 0, False: 331k]
  ------------------
  226|      0|    return CURLE_OK;
  227|       |
  228|       |  /* Create an entry id, based upon the hostname and port */
  229|   331k|  entry_len = create_dnscache_id(hostname, 0, port,
  230|   331k|                                 entry_id, sizeof(entry_id));
  231|       |
  232|       |  /* See if it is already in our dns cache */
  233|   331k|  dns = Curl_hash_pick(&dnscache->entries, entry_id, entry_len + 1);
  234|       |
  235|       |  /* No entry found in cache, check if we might have a wildcard entry */
  236|   331k|  if(!dns && data->state.wildcard_resolve) {
  ------------------
  |  Branch (236:6): [True: 331k, False: 149]
  |  Branch (236:14): [True: 0, False: 331k]
  ------------------
  237|      0|    entry_len = create_dnscache_id("*", 1, port, entry_id, sizeof(entry_id));
  238|       |
  239|       |    /* See if it is already in our dns cache */
  240|      0|    dns = Curl_hash_pick(&dnscache->entries, entry_id, entry_len + 1);
  241|      0|  }
  242|       |
  243|   331k|  if(dns && (data->set.dns_cache_timeout_ms != -1)) {
  ------------------
  |  Branch (243:6): [True: 149, False: 331k]
  |  Branch (243:13): [True: 149, False: 0]
  ------------------
  244|       |    /* See whether the returned entry is stale. Done before we release lock */
  245|    149|    struct dnscache_prune_data user;
  246|       |
  247|    149|    user.now = *Curl_pgrs_now(data);
  248|    149|    user.max_age_ms = data->set.dns_cache_timeout_ms;
  249|    149|    user.oldest_ms = 0;
  250|       |
  251|    149|    if(dnscache_entry_is_stale(&user, dns)) {
  ------------------
  |  Branch (251:8): [True: 1, False: 148]
  ------------------
  252|      1|      infof(data, "Hostname in DNS cache was stale, zapped");
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  320|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  253|      1|      dns = NULL; /* the memory deallocation is being handled by the hash */
  254|      1|      Curl_hash_delete(&dnscache->entries, entry_id, entry_len + 1);
  255|      1|    }
  256|    149|  }
  257|       |
  258|   331k|  if(dns) {
  ------------------
  |  Branch (258:6): [True: 148, False: 331k]
  ------------------
  259|    148|    if((dns->dns_queries & dns_queries) != dns_queries) {
  ------------------
  |  Branch (259:8): [True: 32, False: 116]
  ------------------
  260|       |      /* The entry does not cover all wanted DNS queries, a miss. */
  261|     32|      dns = NULL;
  262|     32|    }
  263|    116|    else if(!(dns->dns_responses & dns_queries)) {
  ------------------
  |  Branch (263:13): [True: 89, False: 27]
  ------------------
  264|       |      /* The entry has no responses for the wanted DNS queries. */
  265|     89|      CURL_TRC_DNS(data, "cache entry does not have type=%s addresses",
  ------------------
  |  |  168|     89|  do {                                 \
  |  |  169|     89|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|     89|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     89|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    178|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 89, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 89]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    178|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|     89|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|     89|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|     89|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 89]
  |  |  ------------------
  ------------------
  266|     89|                   Curl_resolv_query_str(dns_queries));
  267|     89|      dns = NULL;
  268|     89|      result = CURLE_COULDNT_RESOLVE_HOST;
  269|     89|    }
  270|    148|  }
  271|       |
  272|   331k|  if(dns && !dns->addr) { /* negative entry */
  ------------------
  |  Branch (272:6): [True: 27, False: 331k]
  |  Branch (272:13): [True: 0, False: 27]
  ------------------
  273|       |    dns = NULL;
  274|      0|    result = CURLE_COULDNT_RESOLVE_HOST;
  275|      0|  }
  276|   331k|  *pdns = dns;
  277|   331k|  return result;
  278|   331k|}
dnscache.c:num_addresses:
  323|     55|{
  324|     55|  int i = 0;
  325|    158|  while(addr) {
  ------------------
  |  Branch (325:9): [True: 103, False: 55]
  ------------------
  326|    103|    addr = addr->ai_next;
  327|    103|    i++;
  328|    103|  }
  329|     55|  return i;
  330|     55|}
dnscache.c:dnscache_entry_create:
  419|  5.93k|{
  420|  5.93k|  struct Curl_dns_entry *dns = NULL;
  421|       |
  422|       |  /* Create a new cache entry, struct already has the hostname NUL */
  423|  5.93k|  dns = curlx_calloc(1, sizeof(struct Curl_dns_entry) + hostlen);
  ------------------
  |  | 1480|  5.93k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  424|  5.93k|  if(!dns)
  ------------------
  |  Branch (424:6): [True: 0, False: 5.93k]
  ------------------
  425|      0|    goto out;
  426|       |
  427|  5.93k|  dns->refcount = 1; /* the cache has the first reference */
  428|  5.93k|  dns->dns_queries = dns_queries;
  429|  5.93k|  dns->port = port;
  430|  5.93k|  if(hostlen)
  ------------------
  |  Branch (430:6): [True: 5.92k, False: 14]
  ------------------
  431|  5.92k|    memcpy(dns->hostname, hostname, hostlen);
  432|       |
  433|  5.93k|  if(permanent) {
  ------------------
  |  Branch (433:6): [True: 0, False: 5.93k]
  ------------------
  434|      0|    dns->timestamp.tv_sec = 0; /* an entry that never goes stale */
  435|      0|    dns->timestamp.tv_usec = 0; /* an entry that never goes stale */
  436|      0|  }
  437|  5.93k|  else {
  438|  5.93k|    dns->timestamp = *Curl_pgrs_now(data);
  439|  5.93k|  }
  440|       |
  441|       |  /* Take the given address lists into the entry */
  442|  5.93k|  if(paddr1 && *paddr1) {
  ------------------
  |  Branch (442:6): [True: 5.51k, False: 419]
  |  Branch (442:16): [True: 5.51k, False: 0]
  ------------------
  443|  5.51k|    dns->addr = *paddr1;
  444|  5.51k|    *paddr1 = NULL;
  445|  5.51k|  }
  446|  5.93k|  if(paddr2 && *paddr2) {
  ------------------
  |  Branch (446:6): [True: 198, False: 5.74k]
  |  Branch (446:16): [True: 2, False: 196]
  ------------------
  447|      2|    struct Curl_addrinfo **phead = &dns->addr;
  448|      2|    while(*phead)
  ------------------
  |  Branch (448:11): [True: 0, False: 2]
  ------------------
  449|      0|      phead = &(*phead)->ai_next;
  450|      2|    *phead = *paddr2;
  451|      2|    *paddr2 = NULL;
  452|      2|  }
  453|       |
  454|  5.93k|  if((dns_queries & CURL_DNSQ_A) &&
  ------------------
  |  |   51|  5.93k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (454:6): [True: 5.88k, False: 51]
  ------------------
  455|  5.88k|     dnscache_ai_has_family(dns->addr, PF_INET))
  ------------------
  |  Branch (455:6): [True: 5.44k, False: 443]
  ------------------
  456|  5.44k|    dns->dns_responses |= CURL_DNSQ_A;
  ------------------
  |  |   51|  5.44k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  457|       |
  458|  5.93k|#ifdef USE_IPV6
  459|  5.93k|  if((dns_queries & CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  5.93k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (459:6): [True: 5.76k, False: 178]
  ------------------
  460|  5.76k|     dnscache_ai_has_family(dns->addr, PF_INET6))
  ------------------
  |  Branch (460:6): [True: 119, False: 5.64k]
  ------------------
  461|    119|    dns->dns_responses |= CURL_DNSQ_AAAA;
  ------------------
  |  |   52|    119|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  462|  5.93k|#endif /* USE_IPV6 */
  463|       |
  464|  5.93k|#ifndef CURL_DISABLE_SHUFFLE_DNS
  465|       |  /* shuffle addresses if requested */
  466|  5.93k|  if(data->set.dns_shuffle_addresses && dns->addr) {
  ------------------
  |  Branch (466:6): [True: 55, False: 5.88k]
  |  Branch (466:41): [True: 55, False: 0]
  ------------------
  467|     55|    CURLcode result = dns_shuffle_addr(data, &dns->addr);
  468|     55|    if(result) {
  ------------------
  |  Branch (468:8): [True: 0, False: 55]
  ------------------
  469|       |      /* free without lock, we are the sole owner */
  470|      0|      dnscache_entry_free(dns);
  471|      0|      dns = NULL;
  472|      0|      goto out;
  473|      0|    }
  474|     55|  }
  475|       |#else
  476|       |  (void)data;
  477|       |#endif
  478|       |
  479|  5.93k|out:
  480|  5.93k|  if(paddr1 && *paddr1) {
  ------------------
  |  Branch (480:6): [True: 5.51k, False: 419]
  |  Branch (480:16): [True: 0, False: 5.51k]
  ------------------
  481|      0|    Curl_freeaddrinfo(*paddr1);
  482|      0|    *paddr1 = NULL;
  483|      0|  }
  484|  5.93k|  if(paddr2 && *paddr2) {
  ------------------
  |  Branch (484:6): [True: 198, False: 5.74k]
  |  Branch (484:16): [True: 0, False: 198]
  ------------------
  485|      0|    Curl_freeaddrinfo(*paddr2);
  486|       |    *paddr2 = NULL;
  487|      0|  }
  488|  5.93k|  return dns;
  489|  5.93k|}
dnscache.c:dnscache_ai_has_family:
  402|  11.6k|{
  403|  17.0k|  for(; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (403:9): [True: 10.9k, False: 6.08k]
  ------------------
  404|  10.9k|    if(ai->ai_family == ai_family)
  ------------------
  |  Branch (404:8): [True: 5.56k, False: 5.39k]
  ------------------
  405|  5.56k|      return TRUE;
  ------------------
  |  | 1055|  5.56k|#define TRUE true
  ------------------
  406|  10.9k|  }
  407|  6.08k|  return FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
  408|  11.6k|}
dnscache.c:create_dnscache_id:
   82|   337k|{
   83|   337k|  size_t len = nlen ? nlen : strlen(name);
  ------------------
  |  Branch (83:16): [True: 417, False: 337k]
  ------------------
   84|   337k|  DEBUGASSERT(buflen >= MAX_HOSTCACHE_LEN);
  ------------------
  |  | 1081|   337k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (84:3): [True: 0, False: 337k]
  |  Branch (84:3): [True: 337k, False: 0]
  ------------------
   85|   337k|  if(len > (buflen - 7))
  ------------------
  |  Branch (85:6): [True: 6, False: 337k]
  ------------------
   86|      6|    len = buflen - 7;
   87|       |  /* store and lower case the name */
   88|   337k|  Curl_strntolower(ptr, name, len);
   89|   337k|  return curl_msnprintf(&ptr[len], 7, ":%u", port) + len;
   90|   337k|}
dnscache.c:dnscache_add_addr:
  539|    417|{
  540|    417|  char entry_id[MAX_HOSTCACHE_LEN];
  541|    417|  size_t entry_len;
  542|    417|  struct Curl_dns_entry *dns;
  543|    417|  struct Curl_dns_entry *dns2;
  544|       |
  545|    417|  dns = dnscache_entry_create(data, dns_queries, paddr, NULL,
  546|    417|                              hostname, hlen, port, permanent);
  547|    417|  if(!dns)
  ------------------
  |  Branch (547:6): [True: 0, False: 417]
  ------------------
  548|      0|    return NULL;
  549|       |
  550|       |  /* Create an entry id, based upon the hostname and port */
  551|    417|  entry_len = create_dnscache_id(hostname, hlen, port,
  552|    417|                                 entry_id, sizeof(entry_id));
  553|       |
  554|       |  /* Store the resolved data in our DNS cache. */
  555|    417|  dns2 = Curl_hash_add(&dnscache->entries, entry_id, entry_len + 1,
  556|    417|                       (void *)dns);
  557|    417|  if(!dns2) {
  ------------------
  |  Branch (557:6): [True: 0, False: 417]
  ------------------
  558|      0|    dnscache_entry_free(dns);
  559|      0|    return NULL;
  560|      0|  }
  561|       |
  562|    417|  dns = dns2;
  563|    417|  dns->refcount++;         /* mark entry as in-use */
  564|    417|  return dns;
  565|    417|}
dnscache.c:dnscache_entry_free:
   64|  5.93k|{
   65|  5.93k|  Curl_freeaddrinfo(dns->addr);
   66|       |#ifdef USE_HTTPSRR
   67|       |  if(dns->hinfo) {
   68|       |    Curl_httpsrr_cleanup(dns->hinfo);
   69|       |    curlx_free(dns->hinfo);
   70|       |  }
   71|       |#endif
   72|  5.93k|  curlx_free(dns);
  ------------------
  |  | 1483|  5.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   73|  5.93k|}
dnscache.c:dnscache_entry_dtor:
  642|  5.90k|{
  643|  5.90k|  struct Curl_dns_entry *dns = (struct Curl_dns_entry *)entry;
  644|  5.90k|  DEBUGASSERT(dns && (dns->refcount > 0));
  ------------------
  |  | 1081|  5.90k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (644:3): [True: 0, False: 5.90k]
  |  Branch (644:3): [True: 0, False: 0]
  |  Branch (644:3): [True: 5.90k, False: 0]
  |  Branch (644:3): [True: 5.90k, False: 0]
  ------------------
  645|  5.90k|  dns->refcount--;
  646|  5.90k|  if(dns->refcount == 0)
  ------------------
  |  Branch (646:6): [True: 5.90k, False: 0]
  ------------------
  647|  5.90k|    dnscache_entry_free(dns);
  648|  5.90k|}

doh_req_encode:
   85|    718|{
   86|    718|  const size_t hostlen = strlen(host);
   87|    718|  unsigned char *orig = dnsp;
   88|    718|  const char *hostp = host;
   89|       |
   90|       |  /* The expected output length is 16 bytes more than the length of
   91|       |   * the QNAME-encoding of the hostname.
   92|       |   *
   93|       |   * A valid DNS name may not contain a zero-length label, except at
   94|       |   * the end. For this reason, a name beginning with a dot, or
   95|       |   * containing a sequence of two or more consecutive dots, is invalid
   96|       |   * and cannot be encoded as a QNAME.
   97|       |   *
   98|       |   * If the hostname ends with a trailing dot, the corresponding
   99|       |   * QNAME-encoding is one byte longer than the hostname. If (as is
  100|       |   * also valid) the hostname is shortened by the omission of the
  101|       |   * trailing dot, then its QNAME-encoding will be two bytes longer
  102|       |   * than the hostname.
  103|       |   *
  104|       |   * Each [ label, dot ] pair is encoded as [ length, label ],
  105|       |   * preserving overall length. A final [ label ] without a dot is
  106|       |   * also encoded as [ length, label ], increasing overall length
  107|       |   * by one. The encoding is completed by appending a zero byte,
  108|       |   * representing the zero-length root label, again increasing
  109|       |   * the overall length by one.
  110|       |   */
  111|       |
  112|    718|  size_t expected_len;
  113|    718|  DEBUGASSERT(hostlen);
  ------------------
  |  | 1081|    718|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 718]
  |  Branch (113:3): [True: 718, False: 0]
  ------------------
  114|    718|  expected_len = 12 + 1 + hostlen + 4;
  115|    718|  if(host[hostlen - 1] != '.')
  ------------------
  |  Branch (115:6): [True: 681, False: 37]
  ------------------
  116|    681|    expected_len++;
  117|       |
  118|    718|  if(expected_len > DOH_MAX_DNSREQ_SIZE)
  ------------------
  |  |   87|    718|#define DOH_MAX_DNSREQ_SIZE (256 + 16)
  ------------------
  |  Branch (118:6): [True: 0, False: 718]
  ------------------
  119|      0|    return DOH_DNS_NAME_TOO_LONG;
  120|       |
  121|    718|  if(len < expected_len)
  ------------------
  |  Branch (121:6): [True: 0, False: 718]
  ------------------
  122|      0|    return DOH_TOO_SMALL_BUFFER;
  123|       |
  124|    718|  *dnsp++ = 0; /* 16-bit id */
  125|    718|  *dnsp++ = 0;
  126|    718|  *dnsp++ = 0x01; /* |QR|   Opcode  |AA|TC|RD| Set the RD bit */
  127|    718|  *dnsp++ = '\0'; /* |RA|   Z    |   RCODE   |                */
  128|    718|  *dnsp++ = '\0';
  129|    718|  *dnsp++ = 1;    /* QDCOUNT (number of entries in the question section) */
  130|    718|  *dnsp++ = '\0';
  131|    718|  *dnsp++ = '\0'; /* ANCOUNT */
  132|    718|  *dnsp++ = '\0';
  133|    718|  *dnsp++ = '\0'; /* NSCOUNT */
  134|    718|  *dnsp++ = '\0';
  135|    718|  *dnsp++ = '\0'; /* ARCOUNT */
  136|       |
  137|       |  /* encode each label and store it in the QNAME */
  138|  1.58k|  while(*hostp) {
  ------------------
  |  Branch (138:9): [True: 878, False: 710]
  ------------------
  139|    878|    size_t labellen;
  140|    878|    const char *dot = strchr(hostp, '.');
  141|    878|    if(dot)
  ------------------
  |  Branch (141:8): [True: 203, False: 675]
  ------------------
  142|    203|      labellen = dot - hostp;
  143|    675|    else
  144|    675|      labellen = strlen(hostp);
  145|    878|    if((labellen > 63) || (!labellen)) {
  ------------------
  |  Branch (145:8): [True: 2, False: 876]
  |  Branch (145:27): [True: 6, False: 870]
  ------------------
  146|       |      /* label is too long or too short, error out */
  147|      8|      *olen = 0;
  148|      8|      return DOH_DNS_BAD_LABEL;
  149|      8|    }
  150|       |    /* label is non-empty, process it */
  151|    870|    *dnsp++ = (unsigned char)labellen;
  152|    870|    memcpy(dnsp, hostp, labellen);
  153|    870|    dnsp += labellen;
  154|    870|    hostp += labellen;
  155|       |    /* advance past dot, but only if there is one */
  156|    870|    if(dot)
  ------------------
  |  Branch (156:8): [True: 197, False: 673]
  ------------------
  157|    197|      hostp++;
  158|    870|  } /* next label */
  159|       |
  160|    710|  *dnsp++ = 0; /* append zero-length label for root */
  161|       |
  162|       |  /* There are assigned TYPE codes beyond 255: use range [1..65535] */
  163|    710|  *dnsp++ = (unsigned char)(255 & (dnstype >> 8)); /* upper 8-bit TYPE */
  164|    710|  *dnsp++ = (unsigned char)(255 & dnstype);        /* lower 8-bit TYPE */
  165|       |
  166|    710|  *dnsp++ = '\0'; /* upper 8-bit CLASS */
  167|    710|  *dnsp++ = DNS_CLASS_IN; /* IN - "the Internet" */
  ------------------
  |  |   41|    710|#define DNS_CLASS_IN 0x01
  ------------------
  168|       |
  169|    710|  *olen = dnsp - orig;
  170|       |
  171|       |  /* verify that our estimation of length is valid, since
  172|       |   * this has led to buffer overflows in this function */
  173|    710|  DEBUGASSERT(*olen == expected_len);
  ------------------
  |  | 1081|    710|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (173:3): [True: 0, False: 710]
  |  Branch (173:3): [True: 710, False: 0]
  ------------------
  174|    710|  return DOH_OK;
  175|    710|}
Curl_doh:
  457|    381|{
  458|    381|  CURLcode result = CURLE_OK;
  459|    381|  struct doh_probes *dohp = NULL;
  460|    381|  size_t i;
  461|       |
  462|    381|  DEBUGASSERT(!async->doh);
  ------------------
  |  | 1081|    381|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (462:3): [True: 0, False: 381]
  |  Branch (462:3): [True: 381, False: 0]
  ------------------
  463|    381|  DEBUGASSERT(async->hostname[0]);
  ------------------
  |  | 1081|    381|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (463:3): [True: 0, False: 381]
  |  Branch (463:3): [True: 381, False: 0]
  ------------------
  464|    381|  if(async->doh) {
  ------------------
  |  Branch (464:6): [True: 0, False: 381]
  ------------------
  465|      0|    DEBUGASSERT(0); /* should not happen */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (465:5): [Folded, False: 0]
  |  Branch (465:5): [Folded, False: 0]
  ------------------
  466|      0|    Curl_doh_cleanup(data, async);
  467|      0|  }
  468|       |
  469|       |  /* start clean, consider allocating this struct on demand */
  470|    381|  async->doh = dohp = curlx_calloc(1, sizeof(struct doh_probes));
  ------------------
  |  | 1480|    381|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  471|    381|  if(!dohp)
  ------------------
  |  Branch (471:6): [True: 0, False: 381]
  ------------------
  472|      0|    return CURLE_OUT_OF_MEMORY;
  473|       |
  474|  1.14k|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (474:14): [True: 762, False: 381]
  ------------------
  475|    762|    dohp->probe_resp[i].probe_mid = UINT32_MAX;
  476|    762|    curlx_dyn_init(&dohp->probe_resp[i].body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    762|#define DYN_DOH_RESPONSE    3000
  ------------------
  477|    762|  }
  478|       |
  479|    381|  dohp->host = async->hostname;
  480|    381|  dohp->port = async->port;
  481|       |  /* We are making sub easy handles and want to be called back when
  482|       |   * one is done. */
  483|    381|  data->sub_xfer_done = doh_probe_done;
  484|       |
  485|       |  /* create IPv4 DoH request */
  486|    381|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    381|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (486:6): [True: 376, False: 5]
  ------------------
  487|    376|    result = doh_probe_run(data, CURL_DNS_TYPE_A,
  488|    376|                           async->hostname, data->set.str[STRING_DOH],
  489|    376|                           data->multi, async->id,
  490|    376|                           &dohp->probe_resp[DOH_SLOT_IPV4].probe_mid);
  491|    376|    if(result)
  ------------------
  |  Branch (491:8): [True: 7, False: 369]
  ------------------
  492|      7|      goto error;
  493|    369|    dohp->pending++;
  494|    369|  }
  495|       |
  496|    374|#ifdef USE_IPV6
  497|    374|  if(async->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    374|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (497:6): [True: 342, False: 32]
  ------------------
  498|       |    /* create IPv6 DoH request */
  499|    342|    result = doh_probe_run(data, CURL_DNS_TYPE_AAAA,
  500|    342|                           async->hostname, data->set.str[STRING_DOH],
  501|    342|                           data->multi, async->id,
  502|    342|                           &dohp->probe_resp[DOH_SLOT_IPV6].probe_mid);
  503|    342|    if(result)
  ------------------
  |  Branch (503:8): [True: 1, False: 341]
  ------------------
  504|      1|      goto error;
  505|    341|    dohp->pending++;
  506|    341|  }
  507|    373|#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|    373|  return CURLE_OK;
  529|       |
  530|      8|error:
  531|      8|  Curl_doh_cleanup(data, async);
  532|      8|  return result;
  533|    374|}
de_init:
  719|    255|{
  720|    255|  int i;
  721|    255|  memset(de, 0, sizeof(*de));
  722|    255|  de->ttl = INT_MAX;
  723|  1.27k|  for(i = 0; i < DOH_MAX_CNAME; i++)
  ------------------
  |  |  128|  1.27k|#define DOH_MAX_CNAME 4
  ------------------
  |  Branch (723:14): [True: 1.02k, False: 255]
  ------------------
  724|  1.02k|    curlx_dyn_init(&de->cname[i], DYN_DOH_CNAME);
  ------------------
  |  |   66|  1.02k|#define DYN_DOH_CNAME       256
  ------------------
  725|    255|}
de_cleanup:
 1052|    255|{
 1053|    255|  int i = 0;
 1054|    255|  for(i = 0; i < d->numcname; i++) {
  ------------------
  |  Branch (1054:14): [True: 0, False: 255]
  ------------------
 1055|      0|    curlx_dyn_free(&d->cname[i]);
 1056|      0|  }
 1057|       |#ifdef USE_HTTPSRR
 1058|       |  for(i = 0; i < d->numhttps_rrs; i++)
 1059|       |    curlx_safefree(d->https_rrs[i].val);
 1060|       |#endif
 1061|    255|}
Curl_doh_take_result:
 1221|   152k|{
 1222|   152k|  struct doh_probes *dohp = async->doh;
 1223|   152k|  CURLcode result = CURLE_OK;
 1224|   152k|  struct dohentry de;
 1225|       |
 1226|   152k|  *pdns = NULL; /* defaults to no response */
 1227|   152k|  if(!dohp)
  ------------------
  |  Branch (1227:6): [True: 0, False: 152k]
  ------------------
 1228|      0|    return CURLE_OUT_OF_MEMORY;
 1229|       |
 1230|   152k|  if(dohp->probe_resp[DOH_SLOT_IPV4].probe_mid == UINT32_MAX &&
  ------------------
  |  Branch (1230:6): [True: 8, False: 152k]
  ------------------
 1231|      8|     dohp->probe_resp[DOH_SLOT_IPV6].probe_mid == UINT32_MAX) {
  ------------------
  |  Branch (1231:6): [True: 0, False: 8]
  ------------------
 1232|      0|    failf(data, "Could not DoH-resolve: %s", dohp->host);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1233|      0|    return async->for_proxy ?
  ------------------
  |  Branch (1233:12): [True: 0, False: 0]
  ------------------
 1234|      0|      CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST;
 1235|      0|  }
 1236|   152k|  else if(!dohp->pending) {
  ------------------
  |  Branch (1236:11): [True: 255, False: 152k]
  ------------------
 1237|    255|    DOHcode rc[DOH_SLOT_COUNT];
 1238|    255|    int slot;
 1239|       |
 1240|    255|    memset(rc, 0, sizeof(rc));
 1241|       |    /* remove DoH handles from multi handle and close them */
 1242|    255|    doh_close(data, async);
 1243|       |    /* parse the responses, create the struct and return it! */
 1244|    255|    de_init(&de);
 1245|    765|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1245:19): [True: 510, False: 255]
  ------------------
 1246|    510|      struct doh_response *p = &dohp->probe_resp[slot];
 1247|    510|      if(!p->dnstype)
  ------------------
  |  Branch (1247:10): [True: 510, False: 0]
  ------------------
 1248|    510|        continue;
 1249|      0|      rc[slot] = doh_resp_decode(curlx_dyn_uptr(&p->body),
 1250|      0|                                 curlx_dyn_len(&p->body),
 1251|      0|                                 p->dnstype, &de);
 1252|      0|      if(rc[slot]) {
  ------------------
  |  Branch (1252:10): [True: 0, False: 0]
  ------------------
 1253|      0|        CURL_TRC_DNS(data, "DoH: %s type %s for %s", doh_strerror(rc[slot]),
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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_type2name(p->dnstype), dohp->host);
 1255|      0|      }
 1256|      0|    } /* next slot */
 1257|       |
 1258|    255|    if(!rc[DOH_SLOT_IPV4] || !rc[DOH_SLOT_IPV6]) {
  ------------------
  |  Branch (1258:8): [True: 255, False: 0]
  |  Branch (1258:30): [True: 0, False: 0]
  ------------------
 1259|       |      /* we have an address, of one kind or other */
 1260|    255|      struct Curl_dns_entry *dns;
 1261|    255|      struct Curl_addrinfo *ai;
 1262|       |
 1263|    255|      if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)) {
  ------------------
  |  |  326|    255|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|    510|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 255, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 255]
  |  |  |  |  ------------------
  |  |  |  |  320|    510|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|    255|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1264|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1265|      0|        doh_show(data, &de);
 1266|      0|      }
 1267|       |
 1268|    255|      result = doh2ai(&de, dohp->host, dohp->port, &ai);
 1269|    255|      if(result)
  ------------------
  |  Branch (1269:10): [True: 255, False: 0]
  ------------------
 1270|    255|        goto error;
 1271|       |
 1272|       |      /* we got a response, create a dns entry. */
 1273|      0|      dns = Curl_dnscache_mk_entry(data, async->dns_queries,
 1274|      0|                                   &ai, dohp->host, dohp->port);
 1275|      0|      if(!dns) {
  ------------------
  |  Branch (1275:10): [True: 0, False: 0]
  ------------------
 1276|      0|        result = CURLE_OUT_OF_MEMORY;
 1277|      0|        goto error;
 1278|      0|      }
 1279|       |
 1280|       |      /* Now add and HTTPSRR information if we have */
 1281|       |#ifdef USE_HTTPSRR
 1282|       |      if(de.numhttps_rrs > 0 && result == CURLE_OK) {
 1283|       |        struct Curl_https_rrinfo *hrr = NULL;
 1284|       |        result = doh_resp_decode_httpsrr(data, de.https_rrs->val,
 1285|       |                                         de.https_rrs->len, &hrr);
 1286|       |        if(result) {
 1287|       |          infof(data, "Failed to decode HTTPS RR");
 1288|       |          Curl_dns_entry_unlink(data, &dns);
 1289|       |          goto error;
 1290|       |        }
 1291|       |        infof(data, "Some HTTPS RR to process");
 1292|       |#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
 1293|       |        doh_print_httpsrr(data, hrr);
 1294|       |#endif
 1295|       |        Curl_dns_entry_set_https_rr(dns, hrr);
 1296|       |      }
 1297|       |#endif /* USE_HTTPSRR */
 1298|       |
 1299|       |      /* and add the entry to the cache */
 1300|      0|      result = Curl_dnscache_add(data, dns);
 1301|      0|      *pdns = dns;
 1302|      0|    } /* address processing done */
 1303|      0|    else {
 1304|      0|      result = async->for_proxy ?
  ------------------
  |  Branch (1304:16): [True: 0, False: 0]
  ------------------
 1305|      0|        CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST;
 1306|      0|    }
 1307|       |
 1308|    255|  } /* !dohp->pending */
 1309|   152k|  else
 1310|       |    /* wait for pending DoH transactions to complete */
 1311|   152k|    return CURLE_AGAIN;
 1312|       |
 1313|    255|error:
 1314|    255|  de_cleanup(&de);
 1315|    255|  Curl_doh_cleanup(data, async);
 1316|    255|  return result;
 1317|   152k|}
Curl_doh_cleanup:
 1350|  2.02k|{
 1351|  2.02k|  struct doh_probes *dohp = async->doh;
 1352|  2.02k|  if(dohp) {
  ------------------
  |  Branch (1352:6): [True: 381, False: 1.64k]
  ------------------
 1353|    381|    int i;
 1354|    381|    doh_close(data, async);
 1355|  1.14k|    for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (1355:16): [True: 762, False: 381]
  ------------------
 1356|    762|      curlx_dyn_free(&dohp->probe_resp[i].body);
 1357|    762|    }
 1358|       |    curlx_safefree(async->doh);
  ------------------
  |  | 1327|    381|  do {                      \
  |  | 1328|    381|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    381|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    381|    (ptr) = NULL;           \
  |  | 1330|    381|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 381]
  |  |  ------------------
  ------------------
 1359|    381|  }
 1360|  2.02k|}
doh.c:doh_probe_done:
  221|    489|{
  222|    489|  struct Curl_resolv_async *async = NULL;
  223|    489|  struct doh_probes *dohp = NULL;
  224|    489|  struct doh_request *doh_req = NULL;
  225|    489|  int i;
  226|       |
  227|    489|  doh_req = Curl_meta_get(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   84|    489|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  228|    489|  if(!doh_req) {
  ------------------
  |  Branch (228:6): [True: 0, False: 489]
  ------------------
  229|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (229:5): [Folded, False: 0]
  |  Branch (229:5): [Folded, False: 0]
  ------------------
  230|      0|    return;
  231|      0|  }
  232|       |
  233|    489|  async = Curl_async_get(data, doh_req->resolv_id);
  234|    489|  if(!async) {
  ------------------
  |  Branch (234:6): [True: 0, False: 489]
  ------------------
  235|      0|    CURL_TRC_DNS(data, "[%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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  236|      0|                 doh_req->resolv_id);
  237|      0|    return;
  238|      0|  }
  239|    489|  dohp = async->doh;
  240|       |
  241|    722|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (241:14): [True: 722, False: 0]
  ------------------
  242|    722|    if(dohp->probe_resp[i].probe_mid == doh->mid)
  ------------------
  |  Branch (242:8): [True: 489, False: 233]
  ------------------
  243|    489|      break;
  244|    722|  }
  245|       |  /* We really should have found the slot where to store the response */
  246|    489|  if(i >= DOH_SLOT_COUNT) {
  ------------------
  |  Branch (246:6): [True: 0, False: 489]
  ------------------
  247|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:5): [Folded, False: 0]
  |  Branch (247:5): [Folded, False: 0]
  ------------------
  248|      0|    failf(data, "DoH: unknown sub request done");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  249|      0|    return;
  250|      0|  }
  251|       |
  252|    489|  dohp->pending--;
  253|    489|  infof(doh, "a DoH request is completed, %u to go", dohp->pending);
  ------------------
  |  |  143|    489|  do {                               \
  |  |  144|    489|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    489|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 489, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 489]
  |  |  |  |  ------------------
  |  |  |  |  320|    489|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    489|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    489|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 489]
  |  |  ------------------
  ------------------
  254|    489|  dohp->probe_resp[i].result = result;
  255|       |  /* We expect either the meta data still to exist or the sub request
  256|       |   * to have already failed. */
  257|    489|  if(!result) {
  ------------------
  |  Branch (257:6): [True: 0, False: 489]
  ------------------
  258|      0|    dohp->probe_resp[i].dnstype = doh_req->dnstype;
  259|      0|    result = curlx_dyn_addn(&dohp->probe_resp[i].body,
  260|      0|                            curlx_dyn_ptr(&doh_req->resp_body),
  261|      0|                            curlx_dyn_len(&doh_req->resp_body));
  262|      0|    curlx_dyn_free(&doh_req->resp_body);
  263|      0|  }
  264|    489|  Curl_meta_remove(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   84|    489|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  265|       |
  266|    489|  if(result)
  ------------------
  |  Branch (266:6): [True: 489, False: 0]
  ------------------
  267|    489|    infof(doh, "DoH request %s", curl_easy_strerror(result));
  ------------------
  |  |  143|    489|  do {                               \
  |  |  144|    489|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    489|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 489, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 489]
  |  |  |  |  ------------------
  |  |  |  |  320|    489|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    489|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    489|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 489]
  |  |  ------------------
  ------------------
  268|       |
  269|    489|  if(!dohp->pending) {
  ------------------
  |  Branch (269:6): [True: 257, False: 232]
  ------------------
  270|       |    /* DoH completed, run the transfer picking up the results */
  271|    257|    Curl_multi_mark_dirty(data);
  272|    257|  }
  273|    489|}
doh.c:doh_probe_run:
  302|    718|{
  303|    718|  struct Curl_easy *doh = NULL;
  304|    718|  CURLcode result = CURLE_OK;
  305|    718|  timediff_t timeout_ms;
  306|    718|  struct doh_request *doh_req;
  307|    718|  DOHcode d;
  308|       |
  309|    718|  *pmid = UINT32_MAX;
  310|       |
  311|    718|  doh_req = curlx_calloc(1, sizeof(*doh_req));
  ------------------
  |  | 1480|    718|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  312|    718|  if(!doh_req)
  ------------------
  |  Branch (312:6): [True: 0, False: 718]
  ------------------
  313|      0|    return CURLE_OUT_OF_MEMORY;
  314|    718|  doh_req->resolv_id = resolv_id;
  315|    718|  doh_req->dnstype = dnstype;
  316|    718|  curlx_dyn_init(&doh_req->resp_body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    718|#define DYN_DOH_RESPONSE    3000
  ------------------
  317|       |
  318|    718|  d = doh_req_encode(host, dnstype, doh_req->req_body,
  319|    718|                     sizeof(doh_req->req_body),
  320|    718|                     &doh_req->req_body_len);
  321|    718|  if(d) {
  ------------------
  |  Branch (321:6): [True: 8, False: 710]
  ------------------
  322|      8|    failf(data, "Failed to encode DoH packet [%d]", d);
  ------------------
  |  |   62|      8|#define failf Curl_failf
  ------------------
  323|      8|    result = CURLE_OUT_OF_MEMORY;
  324|      8|    goto error;
  325|      8|  }
  326|       |
  327|    710|  timeout_ms = Curl_timeleft_ms(data);
  328|    710|  if(timeout_ms < 0) {
  ------------------
  |  Branch (328:6): [True: 0, False: 710]
  ------------------
  329|      0|    result = CURLE_OPERATION_TIMEDOUT;
  330|      0|    goto error;
  331|      0|  }
  332|       |
  333|    710|  doh_req->req_hds =
  334|    710|    curl_slist_append(NULL, "Content-Type: application/dns-message");
  335|    710|  if(!doh_req->req_hds) {
  ------------------
  |  Branch (335:6): [True: 0, False: 710]
  ------------------
  336|      0|    result = CURLE_OUT_OF_MEMORY;
  337|      0|    goto error;
  338|      0|  }
  339|       |
  340|       |  /* Curl_open() is the internal version of curl_easy_init() */
  341|    710|  result = Curl_open(&doh);
  342|    710|  if(result)
  ------------------
  |  Branch (342:6): [True: 0, False: 710]
  ------------------
  343|      0|    goto error;
  344|       |
  345|       |  /* pass in the struct pointer via a local variable to please coverity and
  346|       |     the gcc typecheck helpers */
  347|    710|  VERBOSE(doh->state.feat = &Curl_trc_feat_dns);
  ------------------
  |  | 1618|    710|#define VERBOSE(x) x
  ------------------
  348|    710|  ERROR_CHECK_SETOPT(CURLOPT_URL, url);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   125k|#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: 710]
  |  |  |  |  |  |  |  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): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  349|    710|  ERROR_CHECK_SETOPT(CURLOPT_DEFAULT_PROTOCOL, "https");
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   125k|#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: 710]
  |  |  |  |  |  |  |  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): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  350|    710|  ERROR_CHECK_SETOPT(CURLOPT_WRITEFUNCTION, doh_probe_write_cb);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   133k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  351|    710|  ERROR_CHECK_SETOPT(CURLOPT_WRITEDATA, doh);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   122k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  352|    710|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDS, doh_req->req_body);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   124k|#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: 710]
  |  |  |  |  |  |  |  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): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [True: 710, 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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  353|    710|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDSIZE, (long)doh_req->req_body_len);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  354|    710|  ERROR_CHECK_SETOPT(CURLOPT_HTTPHEADER, doh_req->req_hds);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   124k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  355|    710|#ifdef USE_HTTP2
  356|    710|  ERROR_CHECK_SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  357|    710|  ERROR_CHECK_SETOPT(CURLOPT_PIPEWAIT, 1L);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  358|    710|#endif
  359|       |#ifndef DEBUGBUILD
  360|       |  /* enforce HTTPS if not debug */
  361|       |  ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
  362|       |#else
  363|       |  /* in debug mode, also allow http */
  364|    710|  ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  365|    710|#endif
  366|    710|  ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  367|    710|  ERROR_CHECK_SETOPT(CURLOPT_SHARE, (CURLSH *)data->share);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  |  |  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): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 710, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  368|    710|  if(data->set.err && data->set.err != stderr)
  ------------------
  |  Branch (368:6): [True: 710, False: 0]
  |  Branch (368:23): [True: 0, False: 710]
  ------------------
  369|      0|    ERROR_CHECK_SETOPT(CURLOPT_STDERR, data->set.err);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      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): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  370|    710|  if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns))
  ------------------
  |  |  326|    710|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|  1.42k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 710, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 710]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.42k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|    710|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  371|      0|    ERROR_CHECK_SETOPT(CURLOPT_VERBOSE, 1L);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      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): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  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|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  372|    710|  if(data->set.no_signal)
  ------------------
  |  Branch (372:6): [True: 3, False: 707]
  ------------------
  373|      3|    ERROR_CHECK_SETOPT(CURLOPT_NOSIGNAL, 1L);
  ------------------
  |  |  288|      3|  do {                                                  \
  |  |  289|      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|    522|#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: 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): [Folded, False: 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|  })
  |  |  ------------------
  |  |  290|      3|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 3]
  |  |  ------------------
  |  |  291|      3|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      3|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      3|      goto error;                                       \
  |  |  294|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  374|       |
  375|    710|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYHOST,
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|  1.42k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 710, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  376|    710|                     data->set.doh_verifyhost ? 2L : 0L);
  377|    710|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYPEER,
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|  1.42k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 710, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  378|    710|                     data->set.doh_verifypeer ? 1L : 0L);
  379|    710|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYSTATUS,
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  |  |  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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|  1.42k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 2, False: 708]
  |  |  |  |  ------------------
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  380|    710|                     data->set.doh_verifystatus ? 1L : 0L);
  381|       |
  382|       |  /* Inherit *some* SSL options from the user's transfer. This is a
  383|       |     best-guess as to which options are needed for compatibility. #3661
  384|       |
  385|       |     Note DoH does not inherit the user's proxy server so proxy SSL settings
  386|       |     have no effect and are not inherited. If that changes then two new
  387|       |     options should be added to check doh proxy insecure separately,
  388|       |     CURLOPT_DOH_PROXY_SSL_VERIFYHOST and CURLOPT_DOH_PROXY_SSL_VERIFYPEER.
  389|       |     */
  390|    710|  doh->set.ssl.custom_cafile = data->set.ssl.custom_cafile;
  391|    710|  doh->set.ssl.custom_capath = data->set.ssl.custom_capath;
  392|    710|  doh->set.ssl.custom_cablob = data->set.ssl.custom_cablob;
  393|    710|  if(data->set.str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (393:6): [True: 710, False: 0]
  ------------------
  394|    710|    ERROR_CHECK_SETOPT(CURLOPT_CAINFO, data->set.str[STRING_SSL_CAFILE]);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   125k|#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: 710]
  |  |  |  |  |  |  |  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): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  395|    710|  }
  396|    710|  if(data->set.blobs[BLOB_CAINFO]) {
  ------------------
  |  Branch (396:6): [True: 0, False: 710]
  ------------------
  397|      0|    ERROR_CHECK_SETOPT(CURLOPT_CAINFO_BLOB, data->set.blobs[BLOB_CAINFO]);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      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): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  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|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  398|      0|  }
  399|    710|  if(data->set.str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (399:6): [True: 710, False: 0]
  ------------------
  400|    710|    ERROR_CHECK_SETOPT(CURLOPT_CAPATH, data->set.str[STRING_SSL_CAPATH]);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   125k|#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: 710]
  |  |  |  |  |  |  |  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): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  401|    710|  }
  402|    710|  if(data->set.str[STRING_SSL_CRLFILE]) {
  ------------------
  |  Branch (402:6): [True: 710, False: 0]
  ------------------
  403|    710|    ERROR_CHECK_SETOPT(CURLOPT_CRLFILE, data->set.str[STRING_SSL_CRLFILE]);
  ------------------
  |  |  288|    710|  do {                                                  \
  |  |  289|    710|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    710|  __extension__({                                                       \
  |  |  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   125k|#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: 710]
  |  |  |  |  |  |  |  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): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    710|      )                                                                 \
  |  |  |  |  158|    710|    }                                                                   \
  |  |  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    710|  })
  |  |  ------------------
  |  |  290|    710|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 710]
  |  |  ------------------
  |  |  291|    710|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    710|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    710|      goto error;                                       \
  |  |  294|    710|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 710]
  |  |  ------------------
  ------------------
  404|    710|  }
  405|    710|  if(data->set.ssl.certinfo)
  ------------------
  |  Branch (405:6): [True: 3, False: 707]
  ------------------
  406|      3|    ERROR_CHECK_SETOPT(CURLOPT_CERTINFO, 1L);
  ------------------
  |  |  288|      3|  do {                                                  \
  |  |  289|      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|    522|#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: 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): [Folded, False: 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|  })
  |  |  ------------------
  |  |  290|      3|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 3]
  |  |  ------------------
  |  |  291|      3|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      3|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      3|      goto error;                                       \
  |  |  294|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  407|    710|  if(data->set.ssl.fsslctx)
  ------------------
  |  Branch (407:6): [True: 0, False: 710]
  ------------------
  408|      0|    ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_FUNCTION, data->set.ssl.fsslctx);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      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): [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): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  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|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  409|    710|  if(data->set.ssl.fsslctxp)
  ------------------
  |  Branch (409:6): [True: 0, False: 710]
  ------------------
  410|      0|    ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_DATA, data->set.ssl.fsslctxp);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      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): [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): [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|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  411|    710|  if(data->set.fdebug)
  ------------------
  |  Branch (411:6): [True: 0, False: 710]
  ------------------
  412|      0|    ERROR_CHECK_SETOPT(CURLOPT_DEBUGFUNCTION, data->set.fdebug);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      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): [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): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  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|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  413|    710|  if(data->set.debugdata)
  ------------------
  |  Branch (413:6): [True: 0, False: 710]
  ------------------
  414|      0|    ERROR_CHECK_SETOPT(CURLOPT_DEBUGDATA, data->set.debugdata);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      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): [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): [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|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  415|    710|  if(data->set.str[STRING_SSL_EC_CURVES]) {
  ------------------
  |  Branch (415:6): [True: 9, False: 701]
  ------------------
  416|      9|    ERROR_CHECK_SETOPT(CURLOPT_SSL_EC_CURVES,
  ------------------
  |  |  288|      9|  do {                                                  \
  |  |  289|      9|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      9|  __extension__({                                                       \
  |  |  |  |   46|      9|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 9, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      9|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  1.59k|#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: 9]
  |  |  |  |  |  |  |  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): [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: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      9|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      9|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      9|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      9|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      9|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      9|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      9|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      9|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      9|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      9|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      9|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      9|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      9|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      9|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      9|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      9|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      9|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      9|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      9|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      9|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      9|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      9|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      9|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      9|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      9|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      9|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      9|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      9|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      9|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      9|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      9|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      9|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      9|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      9|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      9|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      9|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      9|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      9|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      9|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      9|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      9|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      9|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      9|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      9|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      9|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      9|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      9|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      9|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      9|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      9|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      9|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      9|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      9|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      9|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      9|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      9|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      9|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      9|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      9|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      9|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      9|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      9|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      9|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      9|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      9|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      9|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      9|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      9|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      9|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      9|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      9|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      9|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      9|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      9|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      9|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      9|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      9|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      9|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      9|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      9|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      9|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      9|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      9|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      9|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      9|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      9|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      9|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      9|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      9|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      9|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      9|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      9|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      9|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      9|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      9|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      9|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      9|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      9|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      9|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      9|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      9|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      9|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      9|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      9|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      9|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      9|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      9|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      9|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      9|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      9|      )                                                                 \
  |  |  |  |  158|      9|    }                                                                   \
  |  |  |  |  159|      9|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      9|  })
  |  |  ------------------
  |  |  290|      9|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 9]
  |  |  ------------------
  |  |  291|      9|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      9|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      9|      goto error;                                       \
  |  |  294|      9|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 9]
  |  |  ------------------
  ------------------
  417|      9|                       data->set.str[STRING_SSL_EC_CURVES]);
  418|      9|  }
  419|       |
  420|    710|  (void)curl_easy_setopt(doh, CURLOPT_SSL_OPTIONS,
  ------------------
  |  |   45|    710|  __extension__({                                                       \
  |  |   46|    710|    if(__builtin_constant_p(option)) {                                  \
  |  |  ------------------
  |  |  |  Branch (46:8): [True: 710, Folded]
  |  |  ------------------
  |  |   47|    710|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  ------------------
  |  |  |  |   59|   123k|#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: 710]
  |  |  |  |  |  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: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 710]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   48|    710|        if(curlcheck_long_option(option))                               \
  |  |   49|    710|          if(!curlcheck_long(value))                                    \
  |  |   50|    710|            Wcurl_easy_setopt_err_long();                               \
  |  |   51|    710|        if(curlcheck_off_t_option(option))                              \
  |  |   52|    710|          if(!curlcheck_off_t(value))                                   \
  |  |   53|    710|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |   54|    710|        if(curlcheck_string_option(option))                             \
  |  |   55|    710|          if(!curlcheck_string(value))                                  \
  |  |   56|    710|            Wcurl_easy_setopt_err_string();                             \
  |  |   57|    710|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |   58|    710|        if(curlcheck_write_cb_option(option))                           \
  |  |   59|    710|          if(!curlcheck_write_cb(value))                                \
  |  |   60|    710|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |   61|    710|        if(curlcheck_curl_option(option))                               \
  |  |   62|    710|          if(!curlcheck_curl(value))                                    \
  |  |   63|    710|            Wcurl_easy_setopt_err_curl();                               \
  |  |   64|    710|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |   65|    710|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |   66|    710|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |   67|    710|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |   68|    710|          if(!curlcheck_read_cb(value))                                 \
  |  |   69|    710|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |   70|    710|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |   71|    710|          if(!curlcheck_ioctl_cb(value))                                \
  |  |   72|    710|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |   73|    710|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |   74|    710|          if(!curlcheck_sockopt_cb(value))                              \
  |  |   75|    710|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |   76|    710|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |   77|    710|          if(!curlcheck_opensocket_cb(value))                           \
  |  |   78|    710|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |   79|    710|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |   80|    710|          if(!curlcheck_progress_cb(value))                             \
  |  |   81|    710|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |   82|    710|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |   83|    710|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |   84|    710|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |   85|    710|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |   86|    710|          if(!curlcheck_debug_cb(value))                                \
  |  |   87|    710|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |   88|    710|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |   89|    710|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |   90|    710|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |   91|    710|        if(curlcheck_conv_cb_option(option))                            \
  |  |   92|    710|          if(!curlcheck_conv_cb(value))                                 \
  |  |   93|    710|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |   94|    710|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |   95|    710|          if(!curlcheck_seek_cb(value))                                 \
  |  |   96|    710|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |   97|    710|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |   98|    710|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |   99|    710|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  100|    710|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  101|    710|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  102|    710|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  103|    710|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  104|    710|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  105|    710|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  106|    710|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  107|    710|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  108|    710|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  109|    710|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  110|    710|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  111|    710|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  112|    710|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  113|    710|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  114|    710|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  115|    710|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  116|    710|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  117|    710|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  118|    710|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  119|    710|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  120|    710|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  121|    710|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  122|    710|          if(!curlcheck_interleave_cb(value))                           \
  |  |  123|    710|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  124|    710|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  125|    710|          if(!curlcheck_prereq_cb(value))                               \
  |  |  126|    710|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  127|    710|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  128|    710|          if(!curlcheck_trailer_cb(value))                              \
  |  |  129|    710|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  130|    710|        if(curlcheck_cb_data_option(option))                            \
  |  |  131|    710|          if(!curlcheck_cb_data(value))                                 \
  |  |  132|    710|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  133|    710|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  134|    710|          if(!curlcheck_error_buffer(value))                            \
  |  |  135|    710|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  136|    710|        if((option) == CURLOPT_CURLU)                                   \
  |  |  137|    710|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  138|    710|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  139|    710|        if((option) == CURLOPT_STDERR)                                  \
  |  |  140|    710|          if(!curlcheck_FILE(value))                                    \
  |  |  141|    710|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  142|    710|        if(curlcheck_postfields_option(option))                         \
  |  |  143|    710|          if(!curlcheck_postfields(value))                              \
  |  |  144|    710|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  145|    710|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  146|    710|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  147|    710|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  148|    710|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  149|    710|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  150|    710|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  151|    710|        if(curlcheck_slist_option(option))                              \
  |  |  152|    710|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  153|    710|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  154|    710|        if((option) == CURLOPT_SHARE)                                   \
  |  |  155|    710|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  156|    710|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  157|    710|      )                                                                 \
  |  |  158|    710|    }                                                                   \
  |  |  159|    710|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  160|    710|  })
  ------------------
  421|    710|                         (long)data->set.ssl.primary.ssl_options);
  422|       |
  423|    710|  doh->state.internal = TRUE;
  ------------------
  |  | 1055|    710|#define TRUE true
  ------------------
  424|    710|  doh->master_mid = data->mid; /* master transfer of this one */
  425|       |
  426|    710|  result = Curl_meta_set(doh, CURL_EZM_DOH_PROBE, doh_req, doh_probe_dtor);
  ------------------
  |  |   84|    710|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  427|    710|  doh_req = NULL; /* call took ownership */
  428|    710|  if(result)
  ------------------
  |  Branch (428:6): [True: 0, False: 710]
  ------------------
  429|      0|    goto error;
  430|       |
  431|       |  /* DoH handles must not inherit private_data. The handles may be passed to
  432|       |     the user via callbacks and the user will be able to identify them as
  433|       |     internal handles because private data is not set. The user can then set
  434|       |     private_data via CURLOPT_PRIVATE if they so choose. */
  435|    710|  DEBUGASSERT(!doh->set.private_data);
  ------------------
  |  | 1081|    710|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (435:3): [True: 0, False: 710]
  |  Branch (435:3): [True: 710, False: 0]
  ------------------
  436|       |
  437|    710|  if(curl_multi_add_handle(multi, doh))
  ------------------
  |  Branch (437:6): [True: 0, False: 710]
  ------------------
  438|      0|    goto error;
  439|       |
  440|    710|  *pmid = doh->mid;
  441|    710|  return CURLE_OK;
  442|       |
  443|      8|error:
  444|      8|  Curl_close(&doh);
  445|      8|  if(doh_req)
  ------------------
  |  Branch (445:6): [True: 8, False: 0]
  ------------------
  446|      8|    doh_probe_dtor(NULL, 0, doh_req);
  447|      8|  return result;
  448|    710|}
doh.c:doh_probe_dtor:
  276|    718|{
  277|    718|  (void)key;
  278|    718|  (void)klen;
  279|    718|  if(e) {
  ------------------
  |  Branch (279:6): [True: 718, False: 0]
  ------------------
  280|    718|    struct doh_request *doh_req = e;
  281|    718|    curl_slist_free_all(doh_req->req_hds);
  282|    718|    curlx_dyn_free(&doh_req->resp_body);
  283|    718|    curlx_free(e);
  ------------------
  |  | 1483|    718|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  284|    718|  }
  285|    718|}
doh.c:doh2ai:
  938|    255|{
  939|    255|  struct Curl_addrinfo *ai;
  940|    255|  struct Curl_addrinfo *prevai = NULL;
  941|    255|  struct Curl_addrinfo *firstai = NULL;
  942|    255|  struct sockaddr_in *addr;
  943|    255|#ifdef USE_IPV6
  944|    255|  struct sockaddr_in6 *addr6;
  945|    255|#endif
  946|    255|  CURLcode result = CURLE_OK;
  947|    255|  int i;
  948|    255|  size_t hostlen = strlen(hostname) + 1; /* include null-terminator */
  949|       |
  950|    255|  DEBUGASSERT(de);
  ------------------
  |  | 1081|    255|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (950:3): [True: 0, False: 255]
  |  Branch (950:3): [True: 255, False: 0]
  ------------------
  951|       |
  952|    255|  if(!de->numaddr)
  ------------------
  |  Branch (952:6): [True: 255, False: 0]
  ------------------
  953|    255|    return CURLE_COULDNT_RESOLVE_HOST;
  954|       |
  955|      0|  for(i = 0; i < de->numaddr; i++) {
  ------------------
  |  Branch (955:14): [True: 0, False: 0]
  ------------------
  956|      0|    size_t ss_size;
  957|      0|    CURL_SA_FAMILY_T addrtype;
  ------------------
  |  | 1275|      0|#    define CURL_SA_FAMILY_T sa_family_t
  ------------------
  958|      0|    if(de->addr[i].type == CURL_DNS_TYPE_AAAA) {
  ------------------
  |  Branch (958:8): [True: 0, False: 0]
  ------------------
  959|       |#ifndef USE_IPV6
  960|       |      /* we cannot handle IPv6 addresses */
  961|       |      continue;
  962|       |#else
  963|      0|      ss_size = sizeof(struct sockaddr_in6);
  964|      0|      addrtype = AF_INET6;
  965|      0|#endif
  966|      0|    }
  967|      0|    else {
  968|      0|      ss_size = sizeof(struct sockaddr_in);
  969|      0|      addrtype = AF_INET;
  970|      0|    }
  971|       |
  972|      0|    ai = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen);
  ------------------
  |  | 1480|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  973|      0|    if(!ai) {
  ------------------
  |  Branch (973:8): [True: 0, False: 0]
  ------------------
  974|      0|      result = CURLE_OUT_OF_MEMORY;
  975|      0|      break;
  976|      0|    }
  977|      0|    ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  978|      0|    ai->ai_canonname = (void *)((char *)ai->ai_addr + ss_size);
  979|      0|    memcpy(ai->ai_canonname, hostname, hostlen);
  980|       |
  981|      0|    if(!firstai)
  ------------------
  |  Branch (981:8): [True: 0, False: 0]
  ------------------
  982|       |      /* store the pointer we want to return from this function */
  983|      0|      firstai = ai;
  984|       |
  985|      0|    if(prevai)
  ------------------
  |  Branch (985:8): [True: 0, False: 0]
  ------------------
  986|       |      /* make the previous entry point to this */
  987|      0|      prevai->ai_next = ai;
  988|       |
  989|      0|    ai->ai_family = addrtype;
  990|       |
  991|       |    /* we return all names as STREAM, so when using this address for TFTP
  992|       |       the type must be ignored and conn->socktype be used instead! */
  993|      0|    ai->ai_socktype = SOCK_STREAM;
  994|       |
  995|      0|    ai->ai_addrlen = (curl_socklen_t)ss_size;
  996|       |
  997|       |    /* leave the rest of the struct filled with zero */
  998|       |
  999|      0|    switch(ai->ai_family) {
  ------------------
  |  Branch (999:12): [True: 0, False: 0]
  ------------------
 1000|      0|    case AF_INET:
  ------------------
  |  Branch (1000:5): [True: 0, False: 0]
  ------------------
 1001|      0|      addr = (void *)ai->ai_addr; /* storage area for this info */
 1002|      0|      DEBUGASSERT(sizeof(struct in_addr) == sizeof(de->addr[i].ip.v4));
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1002:7): [True: 0, Folded]
  |  Branch (1002:7): [True: 0, Folded]
  ------------------
 1003|      0|      memcpy(&addr->sin_addr, &de->addr[i].ip.v4, sizeof(struct in_addr));
 1004|      0|      addr->sin_family = addrtype;
 1005|      0|      addr->sin_port = htons((unsigned short)port);
 1006|      0|      break;
 1007|       |
 1008|      0|#ifdef USE_IPV6
 1009|      0|    case AF_INET6:
  ------------------
  |  Branch (1009:5): [True: 0, False: 0]
  ------------------
 1010|      0|      addr6 = (void *)ai->ai_addr; /* storage area for this info */
 1011|      0|      DEBUGASSERT(sizeof(struct in6_addr) == sizeof(de->addr[i].ip.v6));
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1011:7): [True: 0, Folded]
  |  Branch (1011:7): [True: 0, Folded]
  ------------------
 1012|      0|      memcpy(&addr6->sin6_addr, &de->addr[i].ip.v6, sizeof(struct in6_addr));
 1013|      0|      addr6->sin6_family = addrtype;
 1014|      0|      addr6->sin6_port = htons((unsigned short)port);
 1015|      0|      break;
 1016|      0|#endif
 1017|      0|    }
 1018|       |
 1019|      0|    prevai = ai;
 1020|      0|  }
 1021|       |
 1022|      0|  if(result) {
  ------------------
  |  Branch (1022:6): [True: 0, False: 0]
  ------------------
 1023|      0|    Curl_freeaddrinfo(firstai);
 1024|      0|    firstai = NULL;
 1025|      0|  }
 1026|      0|  *aip = firstai;
 1027|       |
 1028|      0|  return result;
 1029|      0|}
doh.c:doh_close:
 1321|    636|{
 1322|    636|  struct doh_probes *doh = async ? async->doh : NULL;
  ------------------
  |  Branch (1322:28): [True: 636, False: 0]
  ------------------
 1323|    636|  if(doh && data->multi) {
  ------------------
  |  Branch (1323:6): [True: 636, False: 0]
  |  Branch (1323:13): [True: 636, False: 0]
  ------------------
 1324|    636|    struct Curl_easy *probe_data;
 1325|    636|    uint32_t mid;
 1326|    636|    size_t slot;
 1327|  1.90k|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1327:19): [True: 1.27k, False: 636]
  ------------------
 1328|  1.27k|      mid = doh->probe_resp[slot].probe_mid;
 1329|  1.27k|      if(mid == UINT32_MAX)
  ------------------
  |  Branch (1329:10): [True: 562, False: 710]
  ------------------
 1330|    562|        continue;
 1331|    710|      doh->probe_resp[slot].probe_mid = UINT32_MAX;
 1332|       |      /* should have been called before data is removed from multi handle */
 1333|    710|      DEBUGASSERT(data->multi);
  ------------------
  |  | 1081|    710|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1333:7): [True: 0, False: 710]
  |  Branch (1333:7): [True: 710, False: 0]
  ------------------
 1334|    710|      probe_data = data->multi ? Curl_multi_get_easy(data->multi, mid) : NULL;
  ------------------
  |  Branch (1334:20): [True: 710, False: 0]
  ------------------
 1335|    710|      if(!probe_data) {
  ------------------
  |  Branch (1335:10): [True: 0, False: 710]
  ------------------
 1336|      0|        DEBUGF(infof(data, "Curl_doh_close: xfer for mid=%u not found!",
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1337|      0|                     doh->probe_resp[slot].probe_mid));
 1338|      0|        continue;
 1339|      0|      }
 1340|       |      /* data->multi might already be reset at this time */
 1341|    710|      curl_multi_remove_handle(data->multi, probe_data);
 1342|    710|      Curl_close(&probe_data);
 1343|    710|    }
 1344|    636|    data->sub_xfer_done = NULL;
 1345|    636|  }
 1346|    636|}

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

curl_easy_init:
  331|  21.7k|{
  332|  21.7k|  CURLcode result;
  333|  21.7k|  struct Curl_easy *data;
  334|       |
  335|       |  /* Make sure we inited the global SSL stuff */
  336|  21.7k|  global_init_lock();
  ------------------
  |  |   87|  21.7k|#define global_init_lock()   curl_simple_lock_lock(&s_lock)
  ------------------
  337|       |
  338|  21.7k|  if(!initialized) {
  ------------------
  |  Branch (338:6): [True: 1, False: 21.7k]
  ------------------
  339|      1|    result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 3022|      1|#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
  |  |  ------------------
  |  |  |  | 3020|      1|#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3018|      1|#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3019|      1|#define CURL_GLOBAL_WIN32 (1 << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  340|      1|    if(result) {
  ------------------
  |  Branch (340:8): [True: 0, False: 1]
  ------------------
  341|       |      /* something in the global init failed, return nothing */
  342|      0|      DEBUGF(curl_mfprintf(stderr, "Error: curl_global_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  343|      0|      global_init_unlock();
  ------------------
  |  |   88|      0|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  344|      0|      return NULL;
  345|      0|    }
  346|      1|  }
  347|  21.7k|  global_init_unlock();
  ------------------
  |  |   88|  21.7k|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  348|       |
  349|       |  /* We use Curl_open() with undefined URL so far */
  350|  21.7k|  result = Curl_open(&data);
  351|  21.7k|  if(result) {
  ------------------
  |  Branch (351:6): [True: 0, False: 21.7k]
  ------------------
  352|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_open failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  353|      0|    return NULL;
  354|      0|  }
  355|       |
  356|  21.7k|  return data;
  357|  21.7k|}
curl_easy_cleanup:
  839|  11.6k|{
  840|  11.6k|  struct Curl_easy *data = curl;
  841|  11.6k|  if(GOOD_EASY_HANDLE(data)) {
  ------------------
  |  |  136|  11.6k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  11.6k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  11.6k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:3): [True: 11.6k, False: 0]
  |  |  |  Branch (136:5): [True: 11.6k, False: 0]
  |  |  |  Branch (136:12): [True: 11.6k, False: 0]
  |  |  ------------------
  |  |  137|  11.6k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (841:6): [True: 0, False: 0]
  |  Branch (841:6): [True: 0, False: 0]
  ------------------
  842|  11.6k|    struct Curl_sigpipe_ctx sigpipe_ctx;
  843|  11.6k|    sigpipe_ignore(data, &sigpipe_ctx);
  844|  11.6k|    Curl_close(&data);
  845|  11.6k|    sigpipe_restore(&sigpipe_ctx);
  846|  11.6k|  }
  847|  11.6k|}
Curl_meta_set:
 1378|  6.42k|{
 1379|  6.42k|  DEBUGASSERT(meta_data); /* never set to NULL */
  ------------------
  |  | 1081|  6.42k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1379:3): [True: 0, False: 6.42k]
  |  Branch (1379:3): [True: 6.42k, False: 0]
  ------------------
 1380|  6.42k|  if(!Curl_hash_add2(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1,
  ------------------
  |  |  866|  6.42k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (1380:6): [True: 0, False: 6.42k]
  ------------------
 1381|  6.42k|                     meta_data, meta_dtor)) {
 1382|      0|    meta_dtor(CURL_UNCONST(key), strlen(key) + 1, meta_data);
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1383|      0|    return CURLE_OUT_OF_MEMORY;
 1384|      0|  }
 1385|  6.42k|  return CURLE_OK;
 1386|  6.42k|}
Curl_meta_remove:
 1389|  11.2k|{
 1390|  11.2k|  Curl_hash_delete(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  866|  11.2k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1391|  11.2k|}
Curl_meta_get:
 1394|  4.36k|{
 1395|  4.36k|  return Curl_hash_pick(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  866|  4.36k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1396|  4.36k|}
easy.c:global_init:
  125|      1|{
  126|      1|  if(initialized++)
  ------------------
  |  Branch (126:6): [True: 0, False: 1]
  ------------------
  127|      0|    return CURLE_OK;
  128|       |
  129|      1|  if(memoryfuncs) {
  ------------------
  |  Branch (129:6): [True: 1, False: 0]
  ------------------
  130|       |    /* Setup the default memory functions here (again) */
  131|      1|    Curl_cmalloc = (curl_malloc_callback)malloc;
  132|      1|    Curl_cfree = (curl_free_callback)free;
  133|      1|    Curl_crealloc = (curl_realloc_callback)realloc;
  134|      1|    Curl_cstrdup = (curl_strdup_callback)CURLX_STRDUP_LOW;
  ------------------
  |  | 1472|      1|#define CURLX_STRDUP_LOW strdup
  ------------------
  135|      1|    Curl_ccalloc = (curl_calloc_callback)calloc;
  136|      1|  }
  137|       |
  138|      1|  if(Curl_trc_init()) {
  ------------------
  |  Branch (138:6): [True: 0, False: 1]
  ------------------
  139|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_trc_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  140|      0|    goto fail;
  141|      0|  }
  142|       |
  143|      1|  if(!Curl_ssl_init()) {
  ------------------
  |  Branch (143:6): [True: 0, False: 1]
  ------------------
  144|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssl_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  145|      0|    goto fail;
  146|      0|  }
  147|       |
  148|      1|  if(!Curl_vquic_init()) {
  ------------------
  |  |   54|      1|#define Curl_vquic_init() 1
  ------------------
  |  Branch (148:6): [Folded, False: 1]
  ------------------
  149|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_vquic_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  150|      0|    goto fail;
  151|      0|  }
  152|       |
  153|      1|  if(Curl_win32_init(flags)) {
  ------------------
  |  |   34|      1|#define Curl_win32_init(x) CURLE_OK
  |  |  ------------------
  |  |  |  Branch (34:28): [Folded, False: 1]
  |  |  ------------------
  ------------------
  154|      0|    DEBUGF(curl_mfprintf(stderr, "Error: win32_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  155|      0|    goto fail;
  156|      0|  }
  157|       |
  158|      1|  if(Curl_amiga_init()) {
  ------------------
  |  |   36|      1|#define Curl_amiga_init()    CURLE_OK
  |  |  ------------------
  |  |  |  Branch (36:30): [Folded, False: 1]
  |  |  ------------------
  ------------------
  159|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_amiga_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  160|      0|    goto fail;
  161|      0|  }
  162|       |
  163|      1|  if(Curl_macos_init()) {
  ------------------
  |  |   31|      1|#define Curl_macos_init() CURLE_OK
  |  |  ------------------
  |  |  |  Branch (31:27): [Folded, False: 1]
  |  |  ------------------
  ------------------
  164|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_macos_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  165|      0|    goto fail;
  166|      0|  }
  167|       |
  168|      1|  if(Curl_async_global_init()) {
  ------------------
  |  Branch (168:6): [True: 0, False: 1]
  ------------------
  169|      0|    DEBUGF(curl_mfprintf(stderr, "Error: resolver_global_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  170|      0|    goto fail;
  171|      0|  }
  172|       |
  173|      1|  if(Curl_ssh_init()) {
  ------------------
  |  |  259|      1|#define Curl_ssh_init() 0
  |  |  ------------------
  |  |  |  Branch (259:25): [Folded, False: 1]
  |  |  ------------------
  ------------------
  174|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssh_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  175|      0|    goto fail;
  176|      0|  }
  177|       |
  178|      1|  easy_init_flags = flags;
  179|       |
  180|      1|#ifdef DEBUGBUILD
  181|      1|  if(getenv("CURL_GLOBAL_INIT"))
  ------------------
  |  Branch (181:6): [True: 0, False: 1]
  ------------------
  182|       |    /* alloc data that will leak if *cleanup() is not called! */
  183|      0|    leakpointer = curlx_malloc(1);
  ------------------
  |  | 1478|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  184|      1|#endif
  185|       |
  186|      1|  return CURLE_OK;
  187|       |
  188|      0|fail:
  189|      0|  initialized--; /* undo the increase */
  190|      0|  return CURLE_FAILED_INIT;
  191|      1|}

easy.c:curl_simple_lock_lock:
   64|  21.7k|{
   65|  21.7k|  for(;;) {
   66|  21.7k|    if(!atomic_exchange_explicit(lock, true, memory_order_acquire))
  ------------------
  |  Branch (66:8): [True: 21.7k, False: 0]
  ------------------
   67|  21.7k|      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|  21.7k|}
easy.c:curl_simple_lock_unlock:
   83|  21.7k|{
   84|  21.7k|  atomic_store_explicit(lock, false, memory_order_release);
   85|  21.7k|}

Curl_urldecode:
  108|  4.53k|{
  109|  4.53k|  size_t alloc;
  110|  4.53k|  char *ns;
  111|       |
  112|  4.53k|  DEBUGASSERT(string);
  ------------------
  |  | 1081|  4.53k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 0, False: 4.53k]
  |  Branch (112:3): [True: 4.53k, False: 0]
  ------------------
  113|  4.53k|  DEBUGASSERT(ctrl >= REJECT_NADA); /* crash on TRUE/FALSE */
  ------------------
  |  | 1081|  4.53k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 4.53k]
  |  Branch (113:3): [True: 4.53k, False: 0]
  ------------------
  114|       |
  115|  4.53k|  alloc = (length ? length : strlen(string));
  ------------------
  |  Branch (115:12): [True: 2.24k, False: 2.29k]
  ------------------
  116|  4.53k|  ns = curlx_malloc(alloc + 1);
  ------------------
  |  | 1478|  4.53k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  117|       |
  118|  4.53k|  if(!ns)
  ------------------
  |  Branch (118:6): [True: 0, False: 4.53k]
  ------------------
  119|      0|    return CURLE_OUT_OF_MEMORY;
  120|       |
  121|       |  /* store output string */
  122|  4.53k|  *ostring = ns;
  123|       |
  124|  8.41M|  while(alloc) {
  ------------------
  |  Branch (124:9): [True: 8.41M, False: 4.50k]
  ------------------
  125|  8.41M|    unsigned char in = (unsigned char)*string;
  126|  8.41M|    if(('%' == in) && (alloc > 2) &&
  ------------------
  |  Branch (126:8): [True: 2.08M, False: 6.33M]
  |  Branch (126:23): [True: 2.08M, False: 206]
  ------------------
  127|  2.08M|       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  10.4M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  4.16M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 53.7k, False: 2.02M]
  |  |  |  |  |  Branch (44:38): [True: 11.7k, False: 41.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  4.14M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 24.6k, False: 2.04M]
  |  |  |  |  |  Branch (27:43): [True: 10.5k, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  2.05M|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 29.8k, False: 2.02M]
  |  |  |  |  |  Branch (28:43): [True: 14.1k, False: 15.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                     ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  36.5k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  73.0k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 21.9k, False: 14.5k]
  |  |  |  |  |  Branch (44:38): [True: 2.87k, False: 19.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  70.1k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 13.6k, False: 19.9k]
  |  |  |  |  |  Branch (27:43): [True: 5.36k, False: 8.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  28.2k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 13.5k, False: 14.7k]
  |  |  |  |  |  Branch (28:43): [True: 3.67k, False: 9.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|       |      /* this is two hexadecimal digits following a '%' */
  129|  11.9k|      in = (unsigned char)((curlx_hexval(string[1]) << 4) |
  ------------------
  |  |  112|  11.9k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  130|  11.9k|                           curlx_hexval(string[2]));
  ------------------
  |  |  112|  11.9k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  131|  11.9k|      string += 3;
  132|  11.9k|      alloc -= 3;
  133|  11.9k|    }
  134|  8.39M|    else {
  135|  8.39M|      string++;
  136|  8.39M|      alloc--;
  137|  8.39M|    }
  138|       |
  139|  8.41M|    if(((ctrl == REJECT_CTRL) && (in < 0x20)) ||
  ------------------
  |  Branch (139:9): [True: 8.33M, False: 73.6k]
  |  Branch (139:34): [True: 14, False: 8.33M]
  ------------------
  140|  8.41M|       ((ctrl == REJECT_ZERO) && (in == 0))) {
  ------------------
  |  Branch (140:9): [True: 73.6k, False: 8.33M]
  |  Branch (140:34): [True: 23, False: 73.6k]
  ------------------
  141|     37|      curlx_safefree(*ostring);
  ------------------
  |  | 1327|     37|  do {                      \
  |  | 1328|     37|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|     37|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|     37|    (ptr) = NULL;           \
  |  | 1330|     37|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 37]
  |  |  ------------------
  ------------------
  142|     37|      return CURLE_URL_MALFORMAT;
  143|     37|    }
  144|       |
  145|  8.41M|    *ns++ = (char)in;
  146|  8.41M|  }
  147|  4.50k|  *ns = 0; /* terminate it */
  148|       |
  149|  4.50k|  if(olen)
  ------------------
  |  Branch (149:6): [True: 2.67k, False: 1.82k]
  ------------------
  150|       |    /* store output size */
  151|  2.67k|    *olen = ns - *ostring;
  152|       |
  153|  4.50k|  return CURLE_OK;
  154|  4.53k|}
curl_free:
  191|  7.76k|{
  192|  7.76k|  curlx_free(p);
  ------------------
  |  | 1483|  7.76k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  193|  7.76k|}
Curl_hexencode:
  203|  1.72k|{
  204|  1.72k|  DEBUGASSERT(src && len && (olen >= 3));
  ------------------
  |  | 1081|  1.72k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (204:3): [True: 0, False: 1.72k]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 1.72k, False: 0]
  |  Branch (204:3): [True: 1.72k, False: 0]
  |  Branch (204:3): [True: 1.72k, False: 0]
  ------------------
  205|  1.72k|  if(src && len && (olen >= 3)) {
  ------------------
  |  Branch (205:6): [True: 1.72k, False: 0]
  |  Branch (205:13): [True: 1.72k, False: 0]
  |  Branch (205:20): [True: 1.72k, False: 0]
  ------------------
  206|  56.9k|    while(len-- && (olen >= 3)) {
  ------------------
  |  Branch (206:11): [True: 55.2k, False: 1.72k]
  |  Branch (206:20): [True: 55.2k, False: 0]
  ------------------
  207|  55.2k|      out[0] = Curl_ldigits[*src >> 4];
  208|  55.2k|      out[1] = Curl_ldigits[*src & 0x0F];
  209|  55.2k|      ++src;
  210|  55.2k|      out += 2;
  211|  55.2k|      olen -= 2;
  212|  55.2k|    }
  213|  1.72k|    *out = 0;
  214|  1.72k|  }
  215|      0|  else if(olen)
  ------------------
  |  Branch (215:11): [True: 0, False: 0]
  ------------------
  216|      0|    *out = 0;
  217|  1.72k|}
Curl_hexbyte:
  225|  7.73M|{
  226|  7.73M|  dest[0] = Curl_udigits[val >> 4];
  227|  7.73M|  dest[1] = Curl_udigits[val & 0x0F];
  228|  7.73M|}

curl_formadd:
  610|     27|{
  611|     27|  va_list arg;
  612|     27|  CURLFORMcode form;
  613|     27|  va_start(arg, last_post);
  614|     27|  form = FormAdd(httppost, last_post, arg);
  615|       |  va_end(arg);
  616|     27|  return form;
  617|     27|}
curl_formfree:
  665|     54|{
  666|     54|  struct curl_httppost *next;
  667|       |
  668|     54|  if(!form)
  ------------------
  |  Branch (668:6): [True: 27, False: 27]
  ------------------
  669|       |    /* no form to free, get out of this */
  670|     27|    return;
  671|       |
  672|     27|  do {
  673|     27|    next = form->next;  /* the following form line */
  674|       |
  675|       |    /* recurse to sub-contents */
  676|     27|    curl_formfree(form->more);
  677|       |
  678|     27|    if(!(form->flags & HTTPPOST_PTRNAME))
  ------------------
  |  |   39|     27|#define HTTPPOST_PTRNAME     CURL_HTTPPOST_PTRNAME
  |  |  ------------------
  |  |  |  |  209|     27|#define CURL_HTTPPOST_PTRNAME (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (678:8): [True: 27, False: 0]
  ------------------
  679|     27|      curlx_free(form->name); /* free the name */
  ------------------
  |  | 1483|     27|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  680|     27|    if(!(form->flags &
  ------------------
  |  Branch (680:8): [True: 0, False: 27]
  ------------------
  681|     27|         (HTTPPOST_PTRCONTENTS | HTTPPOST_BUFFER | HTTPPOST_CALLBACK)))
  ------------------
  |  |   41|     27|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|     27|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
                       (HTTPPOST_PTRCONTENTS | HTTPPOST_BUFFER | HTTPPOST_CALLBACK)))
  ------------------
  |  |   45|     27|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|     27|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
                       (HTTPPOST_PTRCONTENTS | HTTPPOST_BUFFER | HTTPPOST_CALLBACK)))
  ------------------
  |  |   44|     27|#define HTTPPOST_CALLBACK    CURL_HTTPPOST_CALLBACK
  |  |  ------------------
  |  |  |  |  218|     27|#define CURL_HTTPPOST_CALLBACK (1 << 6)
  |  |  ------------------
  ------------------
  682|      0|      curlx_free(form->contents); /* free the contents */
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  683|     27|    curlx_free(form->contenttype); /* free the content type */
  ------------------
  |  | 1483|     27|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  684|     27|    curlx_free(form->showfilename); /* free the faked filename */
  ------------------
  |  | 1483|     27|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  685|     27|    curlx_free(form);       /* free the struct */
  ------------------
  |  | 1483|     27|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  686|     27|    form = next;
  687|     27|  } while(form); /* continue */
  ------------------
  |  Branch (687:11): [True: 0, False: 27]
  ------------------
  688|     27|}
formdata.c:FormAdd:
  302|     27|{
  303|     27|  struct FormInfo *first_form, *curr, *form = NULL;
  304|     27|  CURLFORMcode retval = CURL_FORMADD_OK;
  305|     27|  CURLformoption option;
  306|     27|  const struct curl_forms *forms = NULL;
  307|     27|  char *avalue = NULL;
  308|     27|  struct curl_httppost *newchain = NULL;
  309|     27|  struct curl_httppost *lastnode = NULL;
  310|       |
  311|     27|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  312|     27|#ifdef HAVE_UINTPTR_T
  313|     27|#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|     27|  first_form = NewFormInfo();
  322|     27|  if(!first_form)
  ------------------
  |  Branch (322:6): [True: 0, False: 27]
  ------------------
  323|      0|    return CURL_FORMADD_MEMORY;
  324|       |
  325|     27|  curr = first_form;
  326|       |
  327|       |  /*
  328|       |   * Loop through all the options set. Break if we have an error to report.
  329|       |   */
  330|    108|  while(retval == CURL_FORMADD_OK) {
  ------------------
  |  Branch (330:9): [True: 108, False: 0]
  ------------------
  331|       |
  332|       |    /* first see if we have more parts of the array param */
  333|    108|    if(forms) {
  ------------------
  |  Branch (333:8): [True: 0, False: 108]
  ------------------
  334|       |      /* get the upcoming option from the given array */
  335|      0|      option = forms->option;
  336|      0|      avalue = (char *)CURL_UNCONST(forms->value);
  ------------------
  |  |  866|      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|    108|    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|    108|      option = (CURLformoption)va_arg(params, int);
  350|    108|      if(CURLFORM_END == option)
  ------------------
  |  Branch (350:10): [True: 27, False: 81]
  ------------------
  351|     27|        break;
  352|    108|    }
  353|       |
  354|     81|    switch(option) {
  355|      0|    case CURLFORM_ARRAY:
  ------------------
  |  Branch (355:5): [True: 0, False: 81]
  ------------------
  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: 81]
  ------------------
  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();
  ------------------
  |  |  821|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  372|     27|    case CURLFORM_COPYNAME:
  ------------------
  |  Branch (372:5): [True: 27, False: 54]
  ------------------
  373|     27|      if(Curl_bufref_ptr(&curr->name))
  ------------------
  |  Branch (373:10): [True: 0, False: 27]
  ------------------
  374|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  375|     27|      else {
  376|     27|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|     27|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 27]
  |  |  ------------------
  ------------------
  377|     27|        if(avalue)
  ------------------
  |  Branch (377:12): [True: 27, False: 0]
  ------------------
  378|     27|          Curl_bufref_set(&curr->name, avalue, 0, NULL); /* No copy yet. */
  379|      0|        else
  380|      0|          retval = CURL_FORMADD_NULL;
  381|     27|      }
  382|     27|      break;
  383|      0|    case CURLFORM_NAMELENGTH:
  ------------------
  |  Branch (383:5): [True: 0, False: 81]
  ------------------
  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|     27|    case CURLFORM_PTRCONTENTS:
  ------------------
  |  Branch (393:5): [True: 27, False: 54]
  ------------------
  394|     27|      curr->flags |= HTTPPOST_PTRCONTENTS;
  ------------------
  |  |   41|     27|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|     27|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
  395|     27|      FALLTHROUGH();
  ------------------
  |  |  821|     27|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  396|     27|    case CURLFORM_COPYCONTENTS:
  ------------------
  |  Branch (396:5): [True: 0, False: 81]
  ------------------
  397|     27|      if(Curl_bufref_ptr(&curr->value))
  ------------------
  |  Branch (397:10): [True: 0, False: 27]
  ------------------
  398|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  399|     27|      else {
  400|     27|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|     27|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 27]
  |  |  ------------------
  ------------------
  401|     27|        if(avalue)
  ------------------
  |  Branch (401:12): [True: 27, False: 0]
  ------------------
  402|     27|          Curl_bufref_set(&curr->value, avalue, 0, NULL); /* No copy yet. */
  403|      0|        else
  404|      0|          retval = CURL_FORMADD_NULL;
  405|     27|      }
  406|     27|      break;
  407|      0|    case CURLFORM_CONTENTSLENGTH:
  ------------------
  |  Branch (407:5): [True: 0, False: 81]
  ------------------
  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|     27|    case CURLFORM_CONTENTLEN:
  ------------------
  |  Branch (411:5): [True: 27, False: 54]
  ------------------
  412|     27|      curr->flags |= CURL_HTTPPOST_LARGE;
  ------------------
  |  |  220|     27|#define CURL_HTTPPOST_LARGE (1 << 7)
  ------------------
  413|     27|      curr->contentslength = form_int_arg(curl_off_t);
  ------------------
  |  |  313|     27|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (313:26): [True: 0, False: 27]
  |  |  ------------------
  ------------------
  414|     27|      break;
  415|       |
  416|       |      /* Get contents from a given filename */
  417|      0|    case CURLFORM_FILECONTENT:
  ------------------
  |  Branch (417:5): [True: 0, False: 81]
  ------------------
  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: 81]
  ------------------
  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 = NewFormInfo();
  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);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  443|      0|              retval = CURL_FORMADD_MEMORY;
  444|      0|            }
  445|      0|            else {
  446|      0|              AddFormInfo(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: 81]
  ------------------
  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: 81]
  ------------------
  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: 81]
  ------------------
  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: 81]
  ------------------
  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 = NewFormInfo();
  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);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  519|      0|              retval = CURL_FORMADD_MEMORY;
  520|      0|            }
  521|      0|            else {
  522|      0|              AddFormInfo(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: 81]
  ------------------
  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|     27|    }
  553|      0|    case CURLFORM_FILENAME:
  ------------------
  |  Branch (553:5): [True: 0, False: 81]
  ------------------
  554|      0|    case CURLFORM_BUFFER:
  ------------------
  |  Branch (554:5): [True: 0, False: 81]
  ------------------
  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: 81]
  ------------------
  563|      0|      retval = CURL_FORMADD_UNKNOWN_OPTION;
  564|      0|      break;
  565|     81|    }
  566|     81|  }
  567|       |
  568|     27|  if(!retval)
  ------------------
  |  Branch (568:6): [True: 27, False: 0]
  ------------------
  569|     27|    retval = FormAddCheck(first_form, &newchain, &lastnode);
  570|       |
  571|     27|  if(retval)
  ------------------
  |  Branch (571:6): [True: 0, False: 27]
  ------------------
  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|     54|  while(first_form) {
  ------------------
  |  Branch (579:9): [True: 27, False: 27]
  ------------------
  580|     27|    struct FormInfo *ptr = first_form->more;
  581|     27|    curlx_free(first_form);
  ------------------
  |  | 1483|     27|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  582|     27|    first_form = ptr;
  583|     27|  }
  584|       |
  585|     27|  if(!retval) {
  ------------------
  |  Branch (585:6): [True: 27, False: 0]
  ------------------
  586|       |    /* Only if all is fine, link the new chain into the provided list */
  587|     27|    if(*last_post)
  ------------------
  |  Branch (587:8): [True: 0, False: 27]
  ------------------
  588|      0|      (*last_post)->next = newchain;
  589|     27|    else
  590|     27|      (*httppost) = newchain;
  591|       |
  592|     27|    (*last_post) = lastnode;
  593|     27|  }
  594|      0|  else
  595|      0|    free_chain(newchain);
  596|       |
  597|     27|  return retval;
  598|     27|#undef form_ptr_arg
  599|     27|#undef form_int_arg
  600|     27|}
formdata.c:NewFormInfo:
  107|     27|{
  108|     27|  struct FormInfo *form_info = curlx_calloc(1, sizeof(struct FormInfo));
  ------------------
  |  | 1480|     27|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  109|       |
  110|     27|  if(form_info) {
  ------------------
  |  Branch (110:6): [True: 27, False: 0]
  ------------------
  111|     27|    Curl_bufref_init(&form_info->name);
  112|     27|    Curl_bufref_init(&form_info->value);
  113|     27|    Curl_bufref_init(&form_info->contenttype);
  114|     27|    Curl_bufref_init(&form_info->showfilename);
  115|     27|  }
  116|       |
  117|     27|  return form_info;
  118|     27|}
formdata.c:FormAddCheck:
  218|     27|{
  219|     27|  const char *prevtype = NULL;
  220|     27|  struct FormInfo *form = NULL;
  221|     27|  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|     54|  for(form = first_form; form != NULL; form = form->more) {
  ------------------
  |  Branch (226:26): [True: 27, False: 27]
  ------------------
  227|     27|    const char *name = Curl_bufref_ptr(&form->name);
  228|       |
  229|     27|    if(((!name || !Curl_bufref_ptr(&form->value)) && !post) ||
  ------------------
  |  Branch (229:10): [True: 0, False: 27]
  |  Branch (229:19): [True: 0, False: 27]
  |  Branch (229:54): [True: 0, False: 0]
  ------------------
  230|     27|       (form->contentslength &&
  ------------------
  |  Branch (230:9): [True: 9, False: 18]
  ------------------
  231|      9|        (form->flags & HTTPPOST_FILENAME)) ||
  ------------------
  |  |   40|      9|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|      9|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (231:9): [True: 0, False: 9]
  ------------------
  232|     27|       ((form->flags & HTTPPOST_FILENAME) &&
  ------------------
  |  |   40|     27|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|     27|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (232:9): [True: 0, False: 27]
  ------------------
  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|     27|       (!form->buffer &&
  ------------------
  |  Branch (235:9): [True: 27, False: 0]
  ------------------
  236|     27|        (form->flags & HTTPPOST_BUFFER) &&
  ------------------
  |  |   45|     27|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|     27|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  |  Branch (236:9): [True: 0, False: 27]
  ------------------
  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|     27|       ((form->flags & HTTPPOST_READFILE) &&
  ------------------
  |  |   42|     27|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|     27|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (239:9): [True: 0, False: 27]
  ------------------
  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|     27|      ) {
  242|      0|      return CURL_FORMADD_INCOMPLETE;
  243|      0|    }
  244|     27|    if(((form->flags & HTTPPOST_FILENAME) ||
  ------------------
  |  |   40|     27|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|     27|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (244:9): [True: 0, False: 27]
  ------------------
  245|     27|        (form->flags & HTTPPOST_BUFFER)) &&
  ------------------
  |  |   45|     27|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|     27|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  |  Branch (245:9): [True: 0, False: 27]
  ------------------
  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|     27|    if(name && form->namelength) {
  ------------------
  |  Branch (259:8): [True: 27, False: 0]
  |  Branch (259:16): [True: 0, False: 27]
  ------------------
  260|      0|      if(memchr(name, 0, form->namelength))
  ------------------
  |  Branch (260:10): [True: 0, False: 0]
  ------------------
  261|      0|        return CURL_FORMADD_NULL;
  262|      0|    }
  263|     27|    if(!(form->flags & HTTPPOST_PTRNAME)) {
  ------------------
  |  |   39|     27|#define HTTPPOST_PTRNAME     CURL_HTTPPOST_PTRNAME
  |  |  ------------------
  |  |  |  |  209|     27|#define CURL_HTTPPOST_PTRNAME (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (263:8): [True: 27, 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|     27|      if(FormInfoCopyField(&form->name, form->namelength))
  ------------------
  |  Branch (266:10): [True: 0, False: 27]
  ------------------
  267|      0|        return CURL_FORMADD_MEMORY;
  268|     27|    }
  269|     27|    if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
  ------------------
  |  |   40|     27|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|     27|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
                  if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
  ------------------
  |  |   42|     27|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|     27|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (269:8): [True: 0, False: 27]
  ------------------
  270|     27|                        HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
  ------------------
  |  |   41|     27|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|     27|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
                                      HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
  ------------------
  |  |   43|     27|#define HTTPPOST_PTRBUFFER   CURL_HTTPPOST_PTRBUFFER
  |  |  ------------------
  |  |  |  |  215|     27|#define CURL_HTTPPOST_PTRBUFFER (1 << 5)
  |  |  ------------------
  ------------------
  271|     27|                        HTTPPOST_CALLBACK))) {
  ------------------
  |  |   44|     27|#define HTTPPOST_CALLBACK    CURL_HTTPPOST_CALLBACK
  |  |  ------------------
  |  |  |  |  218|     27|#define CURL_HTTPPOST_CALLBACK (1 << 6)
  |  |  ------------------
  ------------------
  272|      0|      if(FormInfoCopyField(&form->value, (size_t)form->contentslength))
  ------------------
  |  Branch (272:10): [True: 0, False: 0]
  ------------------
  273|      0|        return CURL_FORMADD_MEMORY;
  274|      0|    }
  275|     27|    post = AddHttpPost(form, post, httppost, last_post);
  276|       |
  277|     27|    if(!post)
  ------------------
  |  Branch (277:8): [True: 0, False: 27]
  ------------------
  278|      0|      return CURL_FORMADD_MEMORY;
  279|       |
  280|     27|    if(Curl_bufref_ptr(&form->contenttype))
  ------------------
  |  Branch (280:8): [True: 0, False: 27]
  ------------------
  281|      0|      prevtype = Curl_bufref_ptr(&form->contenttype);
  282|     27|  }
  283|       |
  284|     27|  return CURL_FORMADD_OK;
  285|     27|}
formdata.c:FormInfoCopyField:
  122|     27|{
  123|     27|  const char *value = Curl_bufref_ptr(field);
  124|     27|  CURLcode result = CURLE_OK;
  125|       |
  126|     27|  if(value) {
  ------------------
  |  Branch (126:6): [True: 27, False: 0]
  ------------------
  127|     27|    if(!len)
  ------------------
  |  Branch (127:8): [True: 27, False: 0]
  ------------------
  128|     27|      len = strlen(value);
  129|     27|    result = Curl_bufref_memdup0(field, value, len);
  130|     27|  }
  131|       |
  132|     27|  return result;
  133|     27|}
formdata.c:AddHttpPost:
   61|     27|{
   62|     27|  struct curl_httppost *post;
   63|     27|  size_t namelength = src->namelength;
   64|     27|  if(!namelength && Curl_bufref_ptr(&src->name))
  ------------------
  |  Branch (64:6): [True: 27, False: 0]
  |  Branch (64:21): [True: 27, False: 0]
  ------------------
   65|     27|    namelength = strlen(Curl_bufref_ptr(&src->name));
   66|     27|  if((src->bufferlength > LONG_MAX) || (namelength > LONG_MAX))
  ------------------
  |  Branch (66:6): [True: 0, False: 27]
  |  Branch (66:40): [True: 0, False: 27]
  ------------------
   67|       |    /* avoid overflow in typecasts below */
   68|      0|    return NULL;
   69|     27|  post = curlx_calloc(1, sizeof(struct curl_httppost));
  ------------------
  |  | 1480|     27|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   70|     27|  if(post) {
  ------------------
  |  Branch (70:6): [True: 27, False: 0]
  ------------------
   71|     27|    post->name = CURL_UNCONST(Curl_bufref_ptr(&src->name));
  ------------------
  |  |  866|     27|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   72|     27|    post->namelength = (long)namelength;
   73|     27|    post->contents = CURL_UNCONST(Curl_bufref_ptr(&src->value));
  ------------------
  |  |  866|     27|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   74|     27|    post->contentlen = src->contentslength;
   75|     27|    post->buffer = src->buffer;
   76|     27|    post->bufferlength = (long)src->bufferlength;
   77|     27|    post->contenttype = CURL_UNCONST(Curl_bufref_ptr(&src->contenttype));
  ------------------
  |  |  866|     27|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   78|     27|    post->flags = src->flags | CURL_HTTPPOST_LARGE;
  ------------------
  |  |  220|     27|#define CURL_HTTPPOST_LARGE (1 << 7)
  ------------------
   79|     27|    post->contentheader = src->contentheader;
   80|     27|    post->showfilename = CURL_UNCONST(Curl_bufref_ptr(&src->showfilename));
  ------------------
  |  |  866|     27|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   81|     27|    post->userp = src->userp;
   82|     27|  }
   83|      0|  else
   84|      0|    return NULL;
   85|       |
   86|     27|  if(parent_post) {
  ------------------
  |  Branch (86:6): [True: 0, False: 27]
  ------------------
   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|     27|  else {
   94|       |    /* make the previous point to this */
   95|     27|    if(*last_post)
  ------------------
  |  Branch (95:8): [True: 0, False: 27]
  ------------------
   96|      0|      (*last_post)->next = post;
   97|     27|    else
   98|     27|      (*httppost) = post;
   99|       |
  100|     27|    (*last_post) = post;
  101|     27|  }
  102|     27|  return post;
  103|     27|}

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

curl_getenv:
   27|  30.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|  30.0k|  char *env = getenv(variable);
   67|  30.0k|  return (env && env[0]) ? curlx_strdup(env) : NULL;
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  |  Branch (67:11): [True: 0, False: 30.0k]
  |  Branch (67:18): [True: 0, False: 0]
  ------------------
   68|  30.0k|#endif
   69|  30.0k|}

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

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

Curl_headers_init:
  325|  6.06k|{
  326|  6.06k|  struct Curl_cwriter *writer;
  327|  6.06k|  CURLcode result;
  328|       |
  329|  6.06k|  if(data->conn && (data->conn->scheme->protocol & PROTO_FAMILY_HTTP)) {
  ------------------
  |  |   84|  6.06k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  6.06k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  6.06k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  6.06k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  6.06k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  6.06k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (329:6): [True: 6.06k, False: 0]
  |  Branch (329:20): [True: 355, False: 5.71k]
  ------------------
  330|       |    /* avoid installing it twice */
  331|    355|    if(Curl_cwriter_get_by_name(data, hds_cw_collect.name))
  ------------------
  |  Branch (331:8): [True: 0, False: 355]
  ------------------
  332|      0|      return CURLE_OK;
  333|       |
  334|    355|    result = Curl_cwriter_create(&writer, data, &hds_cw_collect,
  335|    355|                                 CURL_CW_PROTOCOL);
  336|    355|    if(result)
  ------------------
  |  Branch (336:8): [True: 0, False: 355]
  ------------------
  337|      0|      return result;
  338|       |
  339|    355|    result = Curl_cwriter_add(data, writer);
  340|    355|    if(result) {
  ------------------
  |  Branch (340:8): [True: 0, False: 355]
  ------------------
  341|      0|      Curl_cwriter_free(data, writer);
  342|      0|      return result;
  343|      0|    }
  344|    355|  }
  345|  6.06k|  return CURLE_OK;
  346|  6.06k|}
Curl_headers_cleanup:
  352|  29.9k|{
  353|  29.9k|  struct Curl_llist_node *e;
  354|  29.9k|  struct Curl_llist_node *n;
  355|       |
  356|  29.9k|  for(e = Curl_llist_head(&data->state.httphdrs); e; e = n) {
  ------------------
  |  Branch (356:51): [True: 0, False: 29.9k]
  ------------------
  357|      0|    struct Curl_header_store *hs = Curl_node_elem(e);
  358|      0|    n = Curl_node_next(e);
  359|      0|    curlx_free(hs);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  360|      0|  }
  361|  29.9k|  headers_reset(data);
  362|  29.9k|  return CURLE_OK;
  363|  29.9k|}
headers.c:headers_reset:
  287|  29.9k|{
  288|  29.9k|  Curl_llist_init(&data->state.httphdrs, NULL);
  289|       |  data->state.prevhead = NULL;
  290|  29.9k|}

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

Curl_resolv_dns_queries:
  126|  6.17k|{
  127|  6.17k|  (void)data;
  128|  6.17k|  switch(ip_version) {
  129|      6|  case CURL_IPRESOLVE_V6:
  ------------------
  |  | 2306|      6|#define CURL_IPRESOLVE_V6       2L /* uses only IPv6 addresses/connections */
  ------------------
  |  Branch (129:3): [True: 6, False: 6.17k]
  ------------------
  130|      6|    return CURL_DNSQ_AAAA;
  ------------------
  |  |   52|      6|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  131|    118|  case CURL_IPRESOLVE_V4:
  ------------------
  |  | 2305|    118|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  |  Branch (131:3): [True: 118, False: 6.06k]
  ------------------
  132|    118|    return CURL_DNSQ_A;
  ------------------
  |  |   51|    118|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  133|  6.05k|  default:
  ------------------
  |  Branch (133:3): [True: 6.05k, False: 124]
  ------------------
  134|  6.05k|    if(ipv6works(data))
  ------------------
  |  Branch (134:8): [True: 6.05k, False: 0]
  ------------------
  135|  6.05k|      return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|  6.05k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|  6.05k|#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.17k|  }
  139|  6.17k|}
Curl_resolv_query_str:
  143|    985|{
  144|    985|  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: 985]
  ------------------
  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: 985]
  ------------------
  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: 985]
  ------------------
  150|      0|    return "AAAA+HTTPS";
  151|    449|  case (CURL_DNSQ_AAAA):
  ------------------
  |  |   52|    449|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (151:3): [True: 449, False: 536]
  ------------------
  152|    449|    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: 985]
  ------------------
  154|      0|    return "A+HTTPS";
  155|    536|  case (CURL_DNSQ_A):
  ------------------
  |  |   51|    536|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (155:3): [True: 536, False: 449]
  ------------------
  156|    536|    return "A";
  157|      0|  case (CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (157:3): [True: 0, False: 985]
  ------------------
  158|      0|    return "HTTPS";
  159|      0|  case 0:
  ------------------
  |  Branch (159:3): [True: 0, False: 985]
  ------------------
  160|      0|    return "-";
  161|      0|  default:
  ------------------
  |  Branch (161:3): [True: 0, False: 985]
  ------------------
  162|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (162:5): [Folded, False: 0]
  |  Branch (162:5): [Folded, False: 0]
  ------------------
  163|      0|    return "???";
  164|    985|  }
  165|    985|}
Curl_printable_address:
  177|    160|{
  178|    160|  DEBUGASSERT(bufsize);
  ------------------
  |  | 1081|    160|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 160]
  |  Branch (178:3): [True: 160, False: 0]
  ------------------
  179|    160|  buf[0] = 0;
  180|       |
  181|    160|  switch(ai->ai_family) {
  182|     97|  case AF_INET: {
  ------------------
  |  Branch (182:3): [True: 97, False: 63]
  ------------------
  183|     97|    const struct sockaddr_in *sa4 = (const void *)ai->ai_addr;
  184|     97|    const struct in_addr *ipaddr4 = &sa4->sin_addr;
  185|     97|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr4, buf, bufsize);
  ------------------
  |  |   44|     97|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  ------------------
  186|     97|    break;
  187|      0|  }
  188|      0|#ifdef USE_IPV6
  189|     63|  case AF_INET6: {
  ------------------
  |  Branch (189:3): [True: 63, False: 97]
  ------------------
  190|     63|    const struct sockaddr_in6 *sa6 = (const void *)ai->ai_addr;
  191|     63|    const struct in6_addr *ipaddr6 = &sa6->sin6_addr;
  192|     63|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr6, buf, bufsize);
  ------------------
  |  |   44|     63|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  ------------------
  193|     63|    break;
  194|      0|  }
  195|      0|#endif
  196|      0|  default:
  ------------------
  |  Branch (196:3): [True: 0, False: 160]
  ------------------
  197|      0|    break;
  198|    160|  }
  199|    160|}
Curl_probeipv6:
  290|  10.0k|{
  291|       |  /* probe to see if we have a working IPv6 stack */
  292|  10.0k|  curl_socket_t s = CURL_SOCKET(PF_INET6, SOCK_DGRAM, 0);
  ------------------
  |  | 1436|  10.0k|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  293|  10.0k|  multi->ipv6_works = FALSE;
  ------------------
  |  | 1058|  10.0k|#define FALSE false
  ------------------
  294|  10.0k|  if(s == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  10.0k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (294:6): [True: 0, False: 10.0k]
  ------------------
  295|      0|    if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
                  if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1133|      0|#define SOCKENOMEM        ENOMEM
  ------------------
  |  Branch (295:8): [True: 0, False: 0]
  ------------------
  296|      0|      return CURLE_OUT_OF_MEMORY;
  297|      0|  }
  298|  10.0k|  else {
  299|  10.0k|    multi->ipv6_works = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  300|  10.0k|    sclose(s);
  ------------------
  |  | 1428|  10.0k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  301|  10.0k|  }
  302|  10.0k|  return CURLE_OK;
  303|  10.0k|}
Curl_host_is_ipnum:
  321|    356|{
  322|    356|  struct in_addr in;
  323|    356|#ifdef USE_IPV6
  324|    356|  struct in6_addr in6;
  325|    356|#endif
  326|    356|  if(curlx_inet_pton(AF_INET, hostname, &in) > 0
  ------------------
  |  |   43|    356|  inet_pton(x, y, z)
  ------------------
  |  Branch (326:6): [True: 0, False: 356]
  ------------------
  327|    356|#ifdef USE_IPV6
  328|    356|     || curlx_inet_pton(AF_INET6, hostname, &in6) > 0
  ------------------
  |  |   43|    356|  inet_pton(x, y, z)
  ------------------
  |  Branch (328:9): [True: 2, False: 354]
  ------------------
  329|    356|#endif
  330|    356|    )
  331|      2|    return TRUE;
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
  332|    354|  return FALSE;
  ------------------
  |  | 1058|    354|#define FALSE false
  ------------------
  333|    356|}
Curl_resolv_announce_start:
  364|  6.21k|{
  365|  6.21k|  if(data->set.resolver_start) {
  ------------------
  |  Branch (365:6): [True: 0, False: 6.21k]
  ------------------
  366|      0|    int rc;
  367|       |
  368|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  369|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  370|      0|    rc = data->set.resolver_start(resolver, NULL,
  371|      0|                                  data->set.resolver_start_client);
  372|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  373|      0|    if(rc) {
  ------------------
  |  Branch (373:8): [True: 0, False: 0]
  ------------------
  374|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  375|      0|      return CURLE_ABORTED_BY_CALLBACK;
  376|      0|    }
  377|      0|  }
  378|  6.21k|  return CURLE_OK;
  379|  6.21k|}
Curl_resolv_elapsed_ms:
  469|  78.7k|{
  470|  78.7k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  471|  78.7k|  if(!async)
  ------------------
  |  Branch (471:6): [True: 0, False: 78.7k]
  ------------------
  472|      0|    return CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
  473|  78.7k|  return curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  474|  78.7k|}
Curl_resolv_has_answers:
  478|   324k|{
  479|   324k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  480|   324k|  uint8_t check_queries;
  481|       |  /* a no longer existing/running resolve has all answers. */
  482|   324k|  if(!async || async->done)
  ------------------
  |  Branch (482:6): [True: 0, False: 324k]
  |  Branch (482:16): [True: 0, False: 324k]
  ------------------
  483|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  484|       |  /* Relevant are only queries undertaken. Others are considered answered. */
  485|   324k|  check_queries = (dns_queries & async->dns_queries);
  486|   324k|  if((check_queries & async->dns_responses) != check_queries) {
  ------------------
  |  Branch (486:6): [True: 78.7k, False: 245k]
  ------------------
  487|  78.7k|    return FALSE;
  ------------------
  |  | 1058|  78.7k|#define FALSE false
  ------------------
  488|  78.7k|  }
  489|   245k|  return TRUE;
  ------------------
  |  | 1055|   245k|#define TRUE true
  ------------------
  490|   324k|}
Curl_resolv_get_ai:
  496|   277k|{
  497|   277k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  498|   277k|  (void)index;
  499|   277k|  if(!async)
  ------------------
  |  Branch (499:6): [True: 0, False: 277k]
  ------------------
  500|      0|    return NULL;
  501|   277k|  if((ai_family == AF_INET) && !(async->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|   138k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (501:6): [True: 138k, False: 138k]
  |  Branch (501:32): [True: 0, False: 138k]
  ------------------
  502|      0|    return NULL;
  503|   277k|#ifdef USE_IPV6
  504|   277k|  if((ai_family == AF_INET6) && !(async->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|   138k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (504:6): [True: 138k, False: 138k]
  |  Branch (504:33): [True: 30, False: 138k]
  ------------------
  505|     30|    return NULL;
  506|   277k|#endif
  507|   277k|  return Curl_async_get_ai(data, async, ai_family, index);
  508|   277k|}
Curl_resolv_blocking:
  755|    165|{
  756|    165|  CURLcode result;
  757|    165|  uint32_t resolv_id;
  758|    165|  DEBUGASSERT(hostname && *hostname);
  ------------------
  |  | 1081|    165|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (758:3): [True: 0, False: 165]
  |  Branch (758:3): [True: 0, False: 0]
  |  Branch (758:3): [True: 165, False: 0]
  |  Branch (758:3): [True: 165, False: 0]
  ------------------
  759|    165|  *pdns = NULL;
  760|       |  /* We cannot do a blocking resolve using DoH currently */
  761|    165|  result = hostip_resolv(data, dns_queries,
  762|    165|                         hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1058|    165|#define FALSE false
  ------------------
                                       hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1058|    165|#define FALSE false
  ------------------
  763|    165|                         &resolv_id, pdns);
  764|    165|  switch(result) {
  765|     77|  case CURLE_OK:
  ------------------
  |  Branch (765:3): [True: 77, False: 88]
  ------------------
  766|     77|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1081|     77|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (766:5): [True: 0, False: 77]
  |  Branch (766:5): [True: 77, False: 0]
  ------------------
  767|     77|    break;
  768|     77|#ifdef USE_CURL_ASYNC
  769|     88|  case CURLE_AGAIN:
  ------------------
  |  Branch (769:3): [True: 88, False: 77]
  ------------------
  770|     88|    DEBUGASSERT(!*pdns);
  ------------------
  |  | 1081|     88|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (770:5): [True: 0, False: 88]
  |  Branch (770:5): [True: 88, False: 0]
  ------------------
  771|     88|    result = Curl_async_await(data, resolv_id, pdns);
  772|     88|    Curl_resolv_destroy(data, resolv_id);
  773|     88|    break;
  774|      0|#endif
  775|      0|  default:
  ------------------
  |  Branch (775:3): [True: 0, False: 165]
  ------------------
  776|      0|    break;
  777|    165|  }
  778|    165|  return result;
  779|    165|}
Curl_resolv:
  984|  6.17k|{
  985|  6.17k|  *presolv_id = 0;
  986|  6.17k|  *pdns = NULL;
  987|       |
  988|  6.17k|  if(timeout_ms < 0)
  ------------------
  |  Branch (988:6): [True: 0, False: 6.17k]
  ------------------
  989|       |    /* got an already expired timeout */
  990|      0|    return CURLE_OPERATION_TIMEDOUT;
  991|  6.17k|  else if(!timeout_ms)
  ------------------
  |  Branch (991:11): [True: 0, False: 6.17k]
  ------------------
  992|      0|    timeout_ms = CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
  993|       |
  994|  6.17k|#ifdef USE_UNIX_SOCKETS
  995|  6.17k|  if(peer->unix_socket)
  ------------------
  |  Branch (995:6): [True: 15, False: 6.16k]
  ------------------
  996|     15|    return resolv_unix(data, peer->hostname, (bool)peer->abstract_uds, pdns);
  997|       |#else
  998|       |  if(peer->unix_socket)
  999|       |    return hostip_resolv_failed(data, peer->hostname, for_proxy);
 1000|       |#endif
 1001|       |
 1002|       |#ifdef USE_ALARM_TIMEOUT
 1003|       |  if(timeout_ms && data->set.no_signal) {
 1004|       |    /* Cannot use ALARM when signals are disabled */
 1005|       |    timeout_ms = 0;
 1006|       |  }
 1007|       |  if(timeout_ms && !Curl_doh_wanted(data)) {
 1008|       |    return resolv_alarm_timeout(data, dns_queries, peer->hostname, peer->port,
 1009|       |                                transport, for_proxy, timeout_ms, presolv_id,
 1010|       |                                pdns);
 1011|       |  }
 1012|       |#endif /* !USE_ALARM_TIMEOUT */
 1013|       |
 1014|       |#ifndef CURLRES_ASYNCH
 1015|       |  if(timeout_ms)
 1016|       |    infof(data, "timeout on name lookup is not supported");
 1017|       |#endif
 1018|       |
 1019|  6.16k|  return hostip_resolv(data, dns_queries, peer->hostname, peer->port,
 1020|       |                       transport, for_proxy, timeout_ms, TRUE, presolv_id,
  ------------------
  |  | 1055|  6.16k|#define TRUE true
  ------------------
 1021|  6.16k|                       pdns);
 1022|  6.17k|}
Curl_async_get:
 1028|  1.00M|{
 1029|  1.00M|  struct Curl_resolv_async *async = data->state.async;
 1030|  1.00M|  for(; async; async = async->next) {
  ------------------
  |  Branch (1030:9): [True: 1.00M, False: 0]
  ------------------
 1031|  1.00M|    if(async->id == resolv_id)
  ------------------
  |  Branch (1031:8): [True: 1.00M, False: 0]
  ------------------
 1032|  1.00M|      return async;
 1033|  1.00M|  }
 1034|      0|  return NULL;
 1035|  1.00M|}
Curl_resolv_take_result:
 1039|   325k|{
 1040|   325k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
 1041|   325k|  CURLcode result;
 1042|       |
 1043|       |  /* If async resolving is ongoing, this must be set */
 1044|   325k|  if(!async)
  ------------------
  |  Branch (1044:6): [True: 0, False: 325k]
  ------------------
 1045|      0|    return CURLE_FAILED_INIT;
 1046|       |
 1047|       |  /* check if we have the name resolved by now (from someone else) */
 1048|   325k|  result = Curl_dnscache_get(data, async->dns_queries,
 1049|   325k|                             async->hostname, async->port, pdns);
 1050|   325k|  if(*pdns) {
  ------------------
  |  Branch (1050:6): [True: 7, False: 325k]
  ------------------
 1051|       |    /* Tell a possibly async resolver we no longer need the results. */
 1052|      7|    infof(data, "Hostname '%s' was found in DNS cache", async->hostname);
  ------------------
  |  |  143|      7|  do {                               \
  |  |  144|      7|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      7|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 7, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  320|      7|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      7|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
 1053|      7|    Curl_async_shutdown(data, async);
 1054|      7|    return CURLE_OK;
 1055|      7|  }
 1056|   325k|  else if(result) {
  ------------------
  |  Branch (1056:11): [True: 0, False: 325k]
  ------------------
 1057|      0|    Curl_async_shutdown(data, async);
 1058|      0|    return Curl_async_failed(data, async, NULL);
 1059|      0|  }
 1060|       |
 1061|   325k|  result = hostip_resolv_take_result(data, async, pdns);
 1062|       |
 1063|   325k|  if(*pdns) {
  ------------------
  |  Branch (1063:6): [True: 203, False: 325k]
  ------------------
 1064|       |    /* Add to cache */
 1065|    203|    result = Curl_dnscache_add(data, *pdns);
 1066|    203|    if(result)
  ------------------
  |  Branch (1066:8): [True: 0, False: 203]
  ------------------
 1067|      0|      Curl_dns_entry_unlink(data, pdns);
 1068|    203|  }
 1069|   325k|  else if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|   325k|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 152, False: 324k]
  |  |  ------------------
  |  |   78|   325k|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 265, False: 324k]
  |  |  ------------------
  ------------------
 1070|    417|    Curl_dnscache_add_negative(data, async->dns_queries,
 1071|    417|                               async->hostname, async->port);
 1072|    417|    failf(data, "Could not resolve: %s:%u", async->hostname, async->port);
  ------------------
  |  |   62|    417|#define failf Curl_failf
  ------------------
 1073|    417|  }
 1074|   324k|  else if(result) {
  ------------------
  |  Branch (1074:11): [True: 0, False: 324k]
  ------------------
 1075|      0|    failf(data, "Error %d resolving %s:%u",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1076|      0|          result, async->hostname, async->port);
 1077|      0|  }
 1078|   325k|  return result;
 1079|   325k|}
Curl_resolv_pollset:
 1083|   324k|{
 1084|   324k|  struct Curl_resolv_async *async = data->state.async;
 1085|   324k|  CURLcode result = CURLE_OK;
 1086|       |
 1087|   324k|  (void)ps;
 1088|   655k|  for(; async && !result; async = async->next) {
  ------------------
  |  Branch (1088:9): [True: 330k, False: 324k]
  |  Branch (1088:18): [True: 330k, False: 0]
  ------------------
 1089|   330k|#ifndef CURL_DISABLE_DOH
 1090|   330k|    if(async->doh) /* DoH has nothing for the pollset */
  ------------------
  |  Branch (1090:8): [True: 152k, False: 178k]
  ------------------
 1091|   152k|      continue;
 1092|   178k|#endif
 1093|   178k|    result = Curl_async_pollset(data, async, ps);
 1094|   178k|  }
 1095|   324k|  return result;
 1096|   324k|}
Curl_resolv_destroy:
 1099|  1.52k|{
 1100|  1.52k|  struct Curl_resolv_async **panchor = &data->state.async;
 1101|       |
 1102|  1.52k|  for(; *panchor; panchor = &(*panchor)->next) {
  ------------------
  |  Branch (1102:9): [True: 100, False: 1.42k]
  ------------------
 1103|    100|    struct Curl_resolv_async *async = *panchor;
 1104|    100|    if(async->id == resolv_id) {
  ------------------
  |  Branch (1104:8): [True: 97, False: 3]
  ------------------
 1105|     97|      *panchor = async->next;
 1106|     97|      Curl_async_destroy(data, async);
 1107|     97|      break;
 1108|     97|    }
 1109|    100|  }
 1110|  1.52k|}
Curl_resolv_shutdown_all:
 1113|  6.06k|{
 1114|  6.06k|  struct Curl_resolv_async *async = data->state.async;
 1115|  6.89k|  for(; async; async = async->next) {
  ------------------
  |  Branch (1115:9): [True: 826, False: 6.06k]
  ------------------
 1116|    826|    Curl_async_shutdown(data, async);
 1117|    826|  }
 1118|  6.06k|}
Curl_resolv_destroy_all:
 1121|  30.0k|{
 1122|  30.8k|  while(data->state.async) {
  ------------------
  |  Branch (1122:9): [True: 826, False: 30.0k]
  ------------------
 1123|    826|    struct Curl_resolv_async *async = data->state.async;
 1124|    826|    data->state.async = async->next;
 1125|    826|    Curl_async_destroy(data, async);
 1126|    826|  }
 1127|  30.0k|}
hostip.c:ipv6works:
  309|  6.06k|{
  310|  6.06k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (310:3): [True: 0, False: 6.06k]
  |  Branch (310:3): [True: 6.06k, False: 0]
  ------------------
  311|  6.06k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:3): [True: 0, False: 6.06k]
  |  Branch (311:3): [True: 6.06k, False: 0]
  ------------------
  312|  6.06k|  return data ? data->multi->ipv6_works : FALSE;
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
  |  Branch (312:10): [True: 6.06k, False: 0]
  ------------------
  313|  6.06k|}
hostip.c:hostip_resolv:
  677|  6.32k|{
  678|  6.32k|  size_t hostname_len;
  679|  6.32k|  CURLcode result = RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|  6.32k|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 1.79k, False: 4.53k]
  |  |  ------------------
  ------------------
  680|  6.32k|  bool cache_dns = FALSE;
  ------------------
  |  | 1058|  6.32k|#define FALSE false
  ------------------
  681|       |
  682|  6.32k|  (void)timeout_ms; /* not used in all ifdefs */
  683|  6.32k|  *presolv_id = 0;
  684|  6.32k|  *pdns = NULL;
  685|       |
  686|       |#ifdef CURL_DISABLE_DOH
  687|       |  (void)allowDOH;
  688|       |#endif
  689|       |
  690|       |  /* We should intentionally error and not resolve .onion TLDs */
  691|  6.32k|  hostname_len = strlen(hostname);
  692|  6.32k|  DEBUGASSERT(hostname_len);
  ------------------
  |  | 1081|  6.32k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (692:3): [True: 0, False: 6.32k]
  |  Branch (692:3): [True: 6.32k, False: 0]
  ------------------
  693|  6.32k|  if(hostname_len >= 7 &&
  ------------------
  |  Branch (693:6): [True: 5.39k, False: 933]
  ------------------
  694|  5.39k|     (curl_strequal(&hostname[hostname_len - 6], ".onion") ||
  ------------------
  |  Branch (694:7): [True: 0, False: 5.39k]
  ------------------
  695|  5.39k|      curl_strequal(&hostname[hostname_len - 7], ".onion."))) {
  ------------------
  |  Branch (695:7): [True: 0, False: 5.39k]
  ------------------
  696|      0|    failf(data, "Not resolving .onion address (RFC 7686)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  697|      0|    goto out;
  698|      0|  }
  699|       |
  700|  6.32k|#ifdef DEBUGBUILD
  701|  6.32k|  CURL_TRC_DNS(data, "hostip_resolv(%s:%u, queries=%s)",
  ------------------
  |  |  168|  6.32k|  do {                                 \
  |  |  169|  6.32k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  6.32k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  6.32k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  12.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 6.32k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.32k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  12.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  6.32k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  6.32k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  6.32k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 6.32k]
  |  |  ------------------
  ------------------
  702|  6.32k|               hostname, port, Curl_resolv_query_str(dns_queries));
  703|  6.32k|  if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   56|  6.32k|#define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   51|  6.32k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   52|  6.32k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  6.32k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (703:6): [True: 53, False: 6.27k]
  ------------------
  704|     53|     getenv("CURL_DBG_RESOLV_FAIL_IPV6")) {
  ------------------
  |  Branch (704:6): [True: 0, False: 53]
  ------------------
  705|      0|    infof(data, "DEBUG fail ipv6 resolve");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  706|      0|    result = hostip_resolv_failed(data, hostname, for_proxy);
  707|      0|    goto out;
  708|      0|  }
  709|  6.32k|#endif
  710|       |  /* Let's check our DNS cache first */
  711|  6.32k|  result = Curl_dnscache_get(data, dns_queries, hostname, port, pdns);
  712|  6.32k|  if(*pdns) {
  ------------------
  |  Branch (712:6): [True: 20, False: 6.30k]
  ------------------
  713|     20|    infof(data, "Hostname %s was found in DNS cache", hostname);
  ------------------
  |  |  143|     20|  do {                               \
  |  |  144|     20|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     20|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 20, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 20]
  |  |  |  |  ------------------
  |  |  |  |  320|     20|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     20|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     20|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 20]
  |  |  ------------------
  ------------------
  714|     20|    result = CURLE_OK;
  715|     20|  }
  716|  6.30k|  else if(result) {
  ------------------
  |  Branch (716:11): [True: 89, False: 6.21k]
  ------------------
  717|     89|    infof(data, "Negative DNS entry");
  ------------------
  |  |  143|     89|  do {                               \
  |  |  144|     89|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     89|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 89, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 89]
  |  |  |  |  ------------------
  |  |  |  |  320|     89|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     89|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     89|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 89]
  |  |  ------------------
  ------------------
  718|     89|    result = hostip_resolv_failed(data, hostname, for_proxy);
  719|     89|  }
  720|  6.21k|  else {
  721|       |    /* No luck, we need to start resolving. */
  722|  6.21k|    cache_dns = TRUE;
  ------------------
  |  | 1055|  6.21k|#define TRUE true
  ------------------
  723|  6.21k|    result = hostip_resolv_start(data, dns_queries, hostname, port,
  724|  6.21k|                                 transport, for_proxy, timeout_ms, allowDOH,
  725|  6.21k|                                 presolv_id, pdns);
  726|  6.21k|  }
  727|       |
  728|  6.32k|out:
  729|  6.32k|  if(result && (result != CURLE_AGAIN)) {
  ------------------
  |  Branch (729:6): [True: 1.02k, False: 5.30k]
  |  Branch (729:16): [True: 97, False: 923]
  ------------------
  730|     97|    Curl_dns_entry_unlink(data, pdns);
  731|     97|    if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|     97|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 89, False: 8]
  |  |  ------------------
  |  |   78|     97|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 0, False: 8]
  |  |  ------------------
  ------------------
  732|     89|      if(cache_dns)
  ------------------
  |  Branch (732:10): [True: 0, False: 89]
  ------------------
  733|      0|        Curl_dnscache_add_negative(data, dns_queries, hostname, port);
  734|     89|      failf(data, "Could not resolve: %s:%u", hostname, port);
  ------------------
  |  |   62|     89|#define failf Curl_failf
  ------------------
  735|     89|    }
  736|      8|    else {
  737|      8|      failf(data, "Error %d resolving %s:%u", result, hostname, port);
  ------------------
  |  |   62|      8|#define failf Curl_failf
  ------------------
  738|      8|    }
  739|     97|  }
  740|  6.23k|  else if(cache_dns && *pdns) {
  ------------------
  |  Branch (740:11): [True: 6.21k, False: 20]
  |  Branch (740:24): [True: 5.28k, False: 923]
  ------------------
  741|  5.28k|    result = Curl_dnscache_add(data, *pdns);
  742|  5.28k|    if(result)
  ------------------
  |  Branch (742:8): [True: 0, False: 5.28k]
  ------------------
  743|      0|      Curl_dns_entry_unlink(data, pdns);
  744|  5.28k|  }
  745|       |
  746|  6.32k|  return result;
  747|  6.32k|}
hostip.c:hostip_resolv_failed:
  347|     89|{
  348|     89|  failf(data, "Could not resolve %s: %s",
  ------------------
  |  |   62|     89|#define failf Curl_failf
  ------------------
  349|     89|        for_proxy ? "proxy" : "host", hostname);
  ------------------
  |  Branch (349:9): [True: 0, False: 89]
  ------------------
  350|     89|  return RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|     89|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 0, False: 89]
  |  |  ------------------
  ------------------
  351|     89|}
hostip.c:hostip_resolv_start:
  541|  6.21k|{
  542|  6.21k|#ifdef USE_CURL_ASYNC
  543|  6.21k|  struct Curl_resolv_async *async = NULL;
  544|  6.21k|#endif
  545|  6.21k|  struct Curl_addrinfo *addr = NULL;
  546|  6.21k|  size_t hostname_len;
  547|  6.21k|  CURLcode result = CURLE_OK;
  548|       |
  549|  6.21k|  (void)timeout_ms; /* not in all ifdefs */
  550|  6.21k|  *presolv_id = 0;
  551|  6.21k|  *pdns = NULL;
  552|       |
  553|       |  /* Check for "known" things to resolve ourselves. */
  554|  6.21k|#ifndef USE_RESOLVE_ON_IPS
  555|  6.21k|  if(Curl_is_ipaddr(hostname)) {
  ------------------
  |  Branch (555:6): [True: 5.15k, False: 1.06k]
  ------------------
  556|       |    /* test655 verifies that the announce is done, even though there
  557|       |     * is no real resolving. So, keep doing this. */
  558|  5.15k|    result = Curl_resolv_announce_start(data, NULL);
  559|  5.15k|    if(result)
  ------------------
  |  Branch (559:8): [True: 0, False: 5.15k]
  ------------------
  560|      0|      goto out;
  561|       |    /* shortcut literal IP addresses, if we are not told to resolve them. */
  562|  5.15k|    result = Curl_str2addr(hostname, port, &addr);
  563|  5.15k|    goto out;
  564|  5.15k|  }
  565|  1.06k|#endif
  566|       |
  567|  1.06k|  hostname_len = strlen(hostname);
  568|  1.06k|  if(curl_strequal(hostname, "localhost") ||
  ------------------
  |  Branch (568:6): [True: 35, False: 1.02k]
  ------------------
  569|  1.02k|     curl_strequal(hostname, "localhost.") ||
  ------------------
  |  Branch (569:6): [True: 17, False: 1.00k]
  ------------------
  570|  1.00k|     tailmatch(hostname, hostname_len, STRCONST(".localhost")) ||
  ------------------
  |  | 1292|  1.00k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (570:6): [True: 45, False: 964]
  ------------------
  571|    964|     tailmatch(hostname, hostname_len, STRCONST(".localhost."))) {
  ------------------
  |  | 1292|    964|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (571:6): [True: 33, False: 931]
  ------------------
  572|    130|    result = Curl_resolv_announce_start(data, NULL);
  573|    130|    if(result)
  ------------------
  |  Branch (573:8): [True: 0, False: 130]
  ------------------
  574|      0|      goto out;
  575|    130|    addr = get_localhost(port, hostname);
  576|    130|    if(!addr)
  ------------------
  |  Branch (576:8): [True: 0, False: 130]
  ------------------
  577|      0|      result = CURLE_OUT_OF_MEMORY;
  578|    130|    goto out;
  579|    130|  }
  580|       |
  581|    931|#ifndef CURL_DISABLE_DOH
  582|    931|  if(!Curl_is_ipaddr(hostname) && allowDOH && data->set.doh) {
  ------------------
  |  Branch (582:6): [True: 931, False: 0]
  |  Branch (582:35): [True: 843, False: 88]
  |  Branch (582:47): [True: 381, False: 462]
  ------------------
  583|    381|    result = Curl_resolv_announce_start(data, NULL);
  584|    381|    if(result)
  ------------------
  |  Branch (584:8): [True: 0, False: 381]
  ------------------
  585|      0|      goto out;
  586|    381|    if(!async) {
  ------------------
  |  Branch (586:8): [True: 381, False: 0]
  ------------------
  587|    381|      async = hostip_async_new(data, dns_queries, hostname, port,
  588|    381|                               transport, for_proxy, timeout_ms);
  589|    381|      if(!async) {
  ------------------
  |  Branch (589:10): [True: 0, False: 381]
  ------------------
  590|      0|        result = CURLE_OUT_OF_MEMORY;
  591|      0|        goto out;
  592|      0|      }
  593|    381|    }
  594|    381|    result = Curl_doh(data, async);
  595|    381|    goto out;
  596|    381|  }
  597|       |#else
  598|       |  (void)allowDOH;
  599|       |#endif
  600|       |
  601|       |  /* Can we provide the requested IP specifics in resolving? */
  602|    550|  if(!can_resolve_dns_queries(data, dns_queries)) {
  ------------------
  |  Branch (602:6): [True: 0, False: 550]
  ------------------
  603|      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]
  |  |  ------------------
  ------------------
  604|      0|    goto out;
  605|      0|  }
  606|       |
  607|    550|#ifdef CURLRES_ASYNCH
  608|    550|  (void)addr;
  609|    550|  if(!async) {
  ------------------
  |  Branch (609:6): [True: 550, False: 0]
  ------------------
  610|    550|    async = hostip_async_new(data, dns_queries, hostname, port,
  611|    550|                             transport, for_proxy, timeout_ms);
  612|    550|    if(!async) {
  ------------------
  |  Branch (612:8): [True: 0, False: 550]
  ------------------
  613|      0|      result = CURLE_OUT_OF_MEMORY;
  614|      0|      goto out;
  615|      0|    }
  616|    550|  }
  617|    550|  result = Curl_async_getaddrinfo(data, async);
  618|    550|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (618:6): [True: 0, False: 550]
  ------------------
  619|       |    /* the answer might be there already. Check. */
  620|      0|    CURLcode r2 = hostip_resolv_take_result(data, async, pdns);
  621|      0|    if(r2)
  ------------------
  |  Branch (621:8): [True: 0, False: 0]
  ------------------
  622|      0|      result = r2;
  623|      0|    else if(*pdns)
  ------------------
  |  Branch (623:13): [True: 0, False: 0]
  ------------------
  624|      0|      result = CURLE_OK;
  625|      0|  }
  626|       |#else
  627|       |  result = Curl_resolv_announce_start(data, NULL);
  628|       |  if(result)
  629|       |    goto out;
  630|       |  addr = Curl_sync_getaddrinfo(data, dns_queries, hostname, port, transport);
  631|       |  if(!addr)
  632|       |    result = RESOLV_FAIL(for_proxy);
  633|       |#endif
  634|       |
  635|  6.21k|out:
  636|  6.21k|  if(!result) {
  ------------------
  |  Branch (636:6): [True: 6.21k, False: 8]
  ------------------
  637|  6.21k|    if(addr) {
  ------------------
  |  Branch (637:8): [True: 5.28k, False: 923]
  ------------------
  638|       |      /* we got a response, create a dns entry, add to cache, return */
  639|  5.28k|      DEBUGASSERT(!*pdns);
  ------------------
  |  | 1081|  5.28k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (639:7): [True: 0, False: 5.28k]
  |  Branch (639:7): [True: 5.28k, False: 0]
  ------------------
  640|  5.28k|      *pdns = Curl_dnscache_mk_entry(data, dns_queries, &addr, hostname, port);
  641|  5.28k|      if(!*pdns)
  ------------------
  |  Branch (641:10): [True: 0, False: 5.28k]
  ------------------
  642|      0|        result = CURLE_OUT_OF_MEMORY;
  643|  5.28k|    }
  644|    923|    else if(!*pdns)
  ------------------
  |  Branch (644:13): [True: 923, False: 0]
  ------------------
  645|    923|      result = CURLE_AGAIN;
  646|  6.21k|  }
  647|      8|  else if(*pdns)
  ------------------
  |  Branch (647:11): [True: 0, False: 8]
  ------------------
  648|      0|    Curl_dns_entry_unlink(data, pdns);
  649|      8|  else if(addr)
  ------------------
  |  Branch (649:11): [True: 0, False: 8]
  ------------------
  650|      0|    Curl_freeaddrinfo(addr);
  651|       |
  652|  6.21k|#ifdef USE_CURL_ASYNC
  653|  6.21k|  if(async) {
  ------------------
  |  Branch (653:6): [True: 931, False: 5.28k]
  ------------------
  654|    931|    if(result == CURLE_AGAIN) { /* still need it, link, return id. */
  ------------------
  |  Branch (654:8): [True: 923, False: 8]
  ------------------
  655|    923|      *presolv_id = async->id;
  656|    923|      async->next = data->state.async;
  657|    923|      data->state.async = async;
  658|    923|    }
  659|      8|    else {
  660|      8|      Curl_async_destroy(data, async);
  661|      8|    }
  662|    931|  }
  663|  6.21k|#endif
  664|  6.21k|  return result;
  665|  6.21k|}
hostip.c:tailmatch:
  338|  1.97k|{
  339|  1.97k|  if(plen > flen)
  ------------------
  |  Branch (339:6): [True: 1.69k, False: 280]
  ------------------
  340|  1.69k|    return FALSE;
  ------------------
  |  | 1058|  1.69k|#define FALSE false
  ------------------
  341|    280|  return curl_strnequal(part, &full[flen - plen], plen);
  342|  1.97k|}
hostip.c:get_localhost:
  248|    130|{
  249|    130|  struct Curl_addrinfo *ca;
  250|    130|  struct Curl_addrinfo *ca6;
  251|    130|  const size_t ss_size = sizeof(struct sockaddr_in);
  252|    130|  const size_t hostlen = strlen(name);
  253|    130|  struct sockaddr_in sa;
  254|    130|  unsigned int ipv4;
  255|    130|  unsigned short port16 = (unsigned short)(port & 0xffff);
  256|       |
  257|       |  /* memset to clear the sa.sin_zero field */
  258|    130|  memset(&sa, 0, sizeof(sa));
  259|    130|  sa.sin_family = AF_INET;
  260|    130|  sa.sin_port = htons(port16);
  261|    130|  if(curlx_inet_pton(AF_INET, "127.0.0.1", (char *)&ipv4) < 1)
  ------------------
  |  |   43|    130|  inet_pton(x, y, z)
  ------------------
  |  Branch (261:6): [True: 0, False: 130]
  ------------------
  262|      0|    return NULL;
  263|    130|  memcpy(&sa.sin_addr, &ipv4, sizeof(ipv4));
  264|       |
  265|    130|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1480|    130|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  266|    130|  if(!ca)
  ------------------
  |  Branch (266:6): [True: 0, False: 130]
  ------------------
  267|      0|    return NULL;
  268|    130|  ca->ai_flags     = 0;
  269|    130|  ca->ai_family    = AF_INET;
  270|    130|  ca->ai_socktype  = SOCK_STREAM;
  271|    130|  ca->ai_protocol  = IPPROTO_TCP;
  272|    130|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  273|    130|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  274|    130|  memcpy(ca->ai_addr, &sa, ss_size);
  275|    130|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  276|    130|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  277|       |
  278|    130|  ca6 = get_localhost6(port, name);
  279|    130|  if(!ca6)
  ------------------
  |  Branch (279:6): [True: 0, False: 130]
  ------------------
  280|      0|    return ca;
  281|    130|  ca6->ai_next = ca;
  282|    130|  return ca6;
  283|    130|}
hostip.c:get_localhost6:
  212|    130|{
  213|    130|  struct Curl_addrinfo *ca;
  214|    130|  const size_t ss_size = sizeof(struct sockaddr_in6);
  215|    130|  const size_t hostlen = strlen(name);
  216|    130|  struct sockaddr_in6 sa6;
  217|    130|  unsigned char ipv6[16];
  218|    130|  unsigned short port16 = (unsigned short)(port & 0xffff);
  219|    130|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1480|    130|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  220|    130|  if(!ca)
  ------------------
  |  Branch (220:6): [True: 0, False: 130]
  ------------------
  221|      0|    return NULL;
  222|       |
  223|    130|  memset(&sa6, 0, sizeof(sa6));
  224|    130|  sa6.sin6_family = AF_INET6;
  225|    130|  sa6.sin6_port = htons(port16);
  226|       |
  227|    130|  (void)curlx_inet_pton(AF_INET6, "::1", ipv6);
  ------------------
  |  |   43|    130|  inet_pton(x, y, z)
  ------------------
  228|    130|  memcpy(&sa6.sin6_addr, ipv6, sizeof(ipv6));
  229|       |
  230|    130|  ca->ai_flags     = 0;
  231|    130|  ca->ai_family    = AF_INET6;
  232|    130|  ca->ai_socktype  = SOCK_STREAM;
  233|    130|  ca->ai_protocol  = IPPROTO_TCP;
  234|    130|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  235|       |  ca->ai_next      = NULL;
  236|    130|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  237|    130|  memcpy(ca->ai_addr, &sa6, ss_size);
  238|    130|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  239|    130|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  240|    130|  return ca;
  241|    130|}
hostip.c:hostip_async_new:
  390|    931|{
  391|    931|  struct Curl_resolv_async *async;
  392|    931|  size_t hostlen = strlen(hostname);
  393|       |
  394|    931|  if(!data->multi) {
  ------------------
  |  Branch (394:6): [True: 0, False: 931]
  ------------------
  395|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (395:5): [Folded, False: 0]
  |  Branch (395:5): [Folded, False: 0]
  ------------------
  396|      0|    return NULL;
  397|      0|  }
  398|       |
  399|       |  /* struct size already includes the NUL for hostname */
  400|    931|  async = curlx_calloc(1, sizeof(*async) + hostlen);
  ------------------
  |  | 1480|    931|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  401|    931|  if(!async)
  ------------------
  |  Branch (401:6): [True: 0, False: 931]
  ------------------
  402|      0|    return NULL;
  403|       |
  404|       |  /* Give every async resolve operation a "unique" id. This may
  405|       |   * wrap around after a long time, making collisions highly unlikely.
  406|       |   * As we keep the async structs at the easy handle, chances of
  407|       |   * easy `mid plus resolv->id` colliding should be astronomical.
  408|       |   * `resolv_id == 0` is never used. */
  409|    931|  if(data->multi->last_resolv_id == UINT32_MAX)
  ------------------
  |  Branch (409:6): [True: 0, False: 931]
  ------------------
  410|      0|    data->multi->last_resolv_id = 1; /* wrap around */
  411|    931|  else
  412|    931|    data->multi->last_resolv_id++;
  413|    931|  async->id = data->multi->last_resolv_id;
  414|    931|  async->dns_queries = dns_queries;
  415|    931|  async->port = port;
  416|    931|  async->transport = transport;
  417|    931|  async->for_proxy = for_proxy;
  418|    931|  async->start = *Curl_pgrs_now(data);
  419|    931|  async->timeout_ms = timeout_ms;
  420|    931|  if(hostlen) {
  ------------------
  |  Branch (420:6): [True: 931, False: 0]
  ------------------
  421|    931|    memcpy(async->hostname, hostname, hostlen);
  422|    931|    async->is_ipaddr = Curl_is_ipaddr(async->hostname);
  423|    931|    if(async->is_ipaddr)
  ------------------
  |  Branch (423:8): [True: 0, False: 931]
  ------------------
  424|      0|      async->is_ipv4addr = Curl_is_ipv4addr(async->hostname);
  425|    931|  }
  426|       |
  427|    931|  return async;
  428|    931|}
hostip.c:can_resolve_dns_queries:
  355|    550|{
  356|    550|  (void)data;
  357|    550|  if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   56|    550|#define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   51|    550|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   52|    550|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   52|    550|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (357:6): [True: 14, False: 536]
  |  Branch (357:55): [True: 0, False: 14]
  ------------------
  358|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  359|    550|  return TRUE;
  ------------------
  |  | 1055|    550|#define TRUE true
  ------------------
  360|    550|}
hostip.c:resolv_unix:
  934|     15|{
  935|     15|  struct Curl_addrinfo *addr;
  936|     15|  CURLcode result;
  937|       |
  938|     15|  DEBUGASSERT(unix_path);
  ------------------
  |  | 1081|     15|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (938:3): [True: 0, False: 15]
  |  Branch (938:3): [True: 15, False: 0]
  ------------------
  939|     15|  *pdns = NULL;
  940|       |
  941|     15|  result = Curl_unix2addr(unix_path, abstract_path, &addr);
  942|     15|  if(result) {
  ------------------
  |  Branch (942:6): [True: 1, False: 14]
  ------------------
  943|      1|    if(result == CURLE_TOO_LARGE) {
  ------------------
  |  Branch (943:8): [True: 1, False: 0]
  ------------------
  944|       |      /* Long paths are not supported for now */
  945|      1|      failf(data, "Unix socket path too long: '%s'", unix_path);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  946|      1|      result = CURLE_COULDNT_RESOLVE_HOST;
  947|      1|    }
  948|      1|    return result;
  949|      1|  }
  950|       |
  951|     14|  *pdns = Curl_dnscache_mk_entry(data, 0, &addr, NULL, 0);
  952|     14|  return *pdns ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (952:10): [True: 14, False: 0]
  ------------------
  953|     15|}
hostip.c:hostip_resolv_take_result:
  433|   325k|{
  434|   325k|  CURLcode result;
  435|       |
  436|       |  /* If async resolving is ongoing, this must be set */
  437|   325k|  if(!async)
  ------------------
  |  Branch (437:6): [True: 0, False: 325k]
  ------------------
  438|      0|    return CURLE_FAILED_INIT;
  439|       |
  440|   325k|#ifndef CURL_DISABLE_DOH
  441|   325k|  if(async->doh)
  ------------------
  |  Branch (441:6): [True: 152k, False: 172k]
  ------------------
  442|   152k|    result = Curl_doh_take_result(data, async, pdns);
  443|   172k|  else
  444|   172k|#endif
  445|   172k|  result = Curl_async_take_result(data, async, pdns);
  446|       |
  447|   325k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (447:6): [True: 324k, False: 620]
  ------------------
  448|   324k|    CURL_TRC_DNS(data, "resolve incomplete, queries=%s, responses=%s, "
  ------------------
  |  |  168|   324k|  do {                                 \
  |  |  169|   324k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|   324k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   324k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|   649k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 324k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 324k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|   649k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   324k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|   324k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|   324k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 324k]
  |  |  ------------------
  ------------------
  449|   324k|                 "ongoing=%d for %s:%d",
  450|   324k|                 Curl_resolv_query_str(async->dns_queries),
  451|   324k|                 Curl_resolv_query_str(async->dns_responses),
  452|   324k|                 async->queries_ongoing, async->hostname, async->port);
  453|   324k|    result = CURLE_OK;
  454|   324k|  }
  455|    620|  else if(result) {
  ------------------
  |  Branch (455:11): [True: 417, False: 203]
  ------------------
  456|    417|    result = Curl_async_failed(data, async, NULL);
  457|    417|  }
  458|    203|  else {
  459|    203|    CURL_TRC_DNS(data, "resolve complete for %s:%u",
  ------------------
  |  |  168|    203|  do {                                 \
  |  |  169|    203|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    203|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    203|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    406|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 203, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 203]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    406|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    203|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    203|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    203|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 203]
  |  |  ------------------
  ------------------
  460|    203|                 async->hostname, async->port);
  461|    203|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1081|    203|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (461:5): [True: 0, False: 203]
  |  Branch (461:5): [True: 203, False: 0]
  ------------------
  462|    203|  }
  463|       |
  464|   325k|  return result;
  465|   325k|}

Curl_hsts_init:
   67|  10.0k|{
   68|  10.0k|  struct hsts *h = curlx_calloc(1, sizeof(struct hsts));
  ------------------
  |  | 1480|  10.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   69|  10.0k|  if(h) {
  ------------------
  |  Branch (69:6): [True: 10.0k, False: 0]
  ------------------
   70|       |    Curl_llist_init(&h->list, NULL);
   71|  10.0k|  }
   72|  10.0k|  return h;
   73|  10.0k|}
Curl_hsts_cleanup:
   78|  22.4k|{
   79|  22.4k|  struct hsts *h = *hp;
   80|  22.4k|  if(h) {
  ------------------
  |  Branch (80:6): [True: 10.0k, False: 12.3k]
  ------------------
   81|  10.0k|    struct Curl_llist_node *e;
   82|  10.0k|    struct Curl_llist_node *n;
   83|  10.0k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (83:40): [True: 0, False: 10.0k]
  ------------------
   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)
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
   87|      0|    }
   88|  10.0k|    curlx_free(h->filename);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   89|  10.0k|    curlx_free(h);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   90|       |    *hp = NULL;
   91|  10.0k|  }
   92|  22.4k|}
hsts_check:
  146|    431|{
  147|    431|  struct stsentry *bestsub = NULL;
  148|    431|  if(h) {
  ------------------
  |  Branch (148:6): [True: 431, False: 0]
  ------------------
  149|    431|    time_t now = time(NULL);
  ------------------
  |  |   63|    431|#define time(x) hsts_debugtime(x)
  ------------------
  150|    431|    struct Curl_llist_node *e;
  151|    431|    struct Curl_llist_node *n;
  152|    431|    size_t blen = 0;
  153|       |
  154|    431|    if((hlen > MAX_HSTS_HOSTLEN) || !hlen)
  ------------------
  |  |   42|    431|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  |  Branch (154:8): [True: 1, False: 430]
  |  Branch (154:37): [True: 0, False: 430]
  ------------------
  155|      1|      return NULL;
  156|    430|    if(hostname[hlen - 1] == '.')
  ------------------
  |  Branch (156:8): [True: 13, False: 417]
  ------------------
  157|       |      /* remove the trailing dot */
  158|     13|      --hlen;
  159|       |
  160|    430|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (160:40): [True: 0, False: 430]
  ------------------
  161|      0|      struct stsentry *sts = Curl_node_elem(e);
  162|      0|      size_t ntail;
  163|      0|      n = Curl_node_next(e);
  164|      0|      if(sts->expires <= now) {
  ------------------
  |  Branch (164:10): [True: 0, False: 0]
  ------------------
  165|       |        /* remove expired entries */
  166|      0|        Curl_node_remove(&sts->node);
  167|      0|        hsts_free(sts);
  ------------------
  |  |   75|      0|#define hsts_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  168|      0|        continue;
  169|      0|      }
  170|      0|      ntail = strlen(sts->host);
  171|      0|      if((subdomain && sts->includeSubDomains) && (ntail < hlen)) {
  ------------------
  |  Branch (171:11): [True: 0, False: 0]
  |  Branch (171:24): [True: 0, False: 0]
  |  Branch (171:51): [True: 0, False: 0]
  ------------------
  172|      0|        size_t offs = hlen - ntail;
  173|      0|        if((hostname[offs - 1] == '.') &&
  ------------------
  |  Branch (173:12): [True: 0, False: 0]
  ------------------
  174|      0|           curl_strnequal(&hostname[offs], sts->host, ntail) &&
  ------------------
  |  Branch (174:12): [True: 0, False: 0]
  ------------------
  175|      0|           (ntail > blen)) {
  ------------------
  |  Branch (175:12): [True: 0, False: 0]
  ------------------
  176|       |          /* save the tail match with the longest tail */
  177|      0|          bestsub = sts;
  178|      0|          blen = ntail;
  179|      0|        }
  180|      0|      }
  181|       |      /* avoid curl_strequal because the hostname is not null-terminated */
  182|      0|      if((hlen == ntail) && curl_strnequal(hostname, sts->host, hlen))
  ------------------
  |  Branch (182:10): [True: 0, False: 0]
  |  Branch (182:29): [True: 0, False: 0]
  ------------------
  183|      0|        return sts;
  184|      0|    }
  185|    430|  }
  186|    430|  return bestsub;
  187|    431|}
Curl_hsts_save:
  349|  22.4k|{
  350|  22.4k|  struct Curl_llist_node *e;
  351|  22.4k|  struct Curl_llist_node *n;
  352|  22.4k|  CURLcode result = CURLE_OK;
  353|  22.4k|  FILE *out;
  354|  22.4k|  char *tempstore = NULL;
  355|       |
  356|  22.4k|  if(!h)
  ------------------
  |  Branch (356:6): [True: 12.3k, False: 10.0k]
  ------------------
  357|       |    /* no cache activated */
  358|  12.3k|    return CURLE_OK;
  359|       |
  360|       |  /* if no new name is given, use the one we stored from the load */
  361|  10.0k|  if(!file && h->filename)
  ------------------
  |  Branch (361:6): [True: 3, False: 10.0k]
  |  Branch (361:15): [True: 0, False: 3]
  ------------------
  362|      0|    file = h->filename;
  363|       |
  364|  10.0k|  if((h->flags & CURLHSTS_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1074|  10.0k|#define CURLHSTS_READONLYFILE (1L << 1)
  ------------------
  |  Branch (364:6): [True: 0, False: 10.0k]
  |  Branch (364:44): [True: 3, False: 10.0k]
  |  Branch (364:53): [True: 0, False: 10.0k]
  ------------------
  365|       |    /* marked as read-only, no file or zero length filename */
  366|      3|    goto skipsave;
  367|       |
  368|  10.0k|  result = Curl_fopen(data, file, &out, &tempstore);
  369|  10.0k|  if(!result) {
  ------------------
  |  Branch (369:6): [True: 10.0k, False: 0]
  ------------------
  370|  10.0k|    fputs("# Your HSTS cache. https://curl.se/docs/hsts.html\n"
  371|  10.0k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  372|  10.0k|          out);
  373|  10.0k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (373:40): [True: 0, False: 10.0k]
  ------------------
  374|      0|      struct stsentry *sts = Curl_node_elem(e);
  375|      0|      n = Curl_node_next(e);
  376|      0|      result = hsts_out(sts, out);
  377|      0|      if(result)
  ------------------
  |  Branch (377:10): [True: 0, False: 0]
  ------------------
  378|      0|        break;
  379|      0|    }
  380|  10.0k|    curlx_fclose(out);
  ------------------
  |  |   79|  10.0k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  381|  10.0k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (381:8): [True: 10.0k, False: 0]
  |  Branch (381:19): [True: 0, False: 10.0k]
  |  Branch (381:32): [True: 0, False: 0]
  ------------------
  382|      0|      result = CURLE_WRITE_ERROR;
  383|       |
  384|  10.0k|    if(result && tempstore)
  ------------------
  |  Branch (384:8): [True: 0, False: 10.0k]
  |  Branch (384:18): [True: 0, False: 0]
  ------------------
  385|      0|      unlink(tempstore);
  386|  10.0k|  }
  387|  10.0k|  curlx_free(tempstore);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  388|  10.0k|skipsave:
  389|  10.0k|  if(data->set.hsts_write) {
  ------------------
  |  Branch (389:6): [True: 0, False: 10.0k]
  ------------------
  390|       |    /* if there is a write callback */
  391|      0|    struct curl_index i; /* count */
  392|      0|    i.total = Curl_llist_count(&h->list);
  393|      0|    i.index = 0;
  394|      0|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (394:40): [True: 0, False: 0]
  ------------------
  395|      0|      struct stsentry *sts = Curl_node_elem(e);
  396|      0|      bool stop;
  397|      0|      n = Curl_node_next(e);
  398|      0|      result = hsts_push(data, &i, sts, &stop);
  399|      0|      if(result || stop)
  ------------------
  |  Branch (399:10): [True: 0, False: 0]
  |  Branch (399:20): [True: 0, False: 0]
  ------------------
  400|      0|        break;
  401|      0|      i.index++;
  402|      0|    }
  403|      0|  }
  404|  10.0k|  return result;
  405|  10.0k|}
Curl_hsts_loadfile:
  584|  6.78k|{
  585|  6.78k|  DEBUGASSERT(h);
  ------------------
  |  | 1081|  6.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (585:3): [True: 0, False: 6.78k]
  |  Branch (585:3): [True: 6.78k, False: 0]
  ------------------
  586|  6.78k|  (void)data;
  587|  6.78k|  return hsts_load(h, file);
  588|  6.78k|}
Curl_hsts_loadcb:
  594|  7.49k|{
  595|  7.49k|  if(h)
  ------------------
  |  Branch (595:6): [True: 6.78k, False: 710]
  ------------------
  596|  6.78k|    return hsts_pull(data, h);
  597|    710|  return CURLE_OK;
  598|  7.49k|}
Curl_hsts_loadfiles:
  601|  7.49k|{
  602|  7.49k|  CURLcode result = CURLE_OK;
  603|  7.49k|  struct curl_slist *l = data->state.hstslist;
  604|  7.49k|  if(l) {
  ------------------
  |  Branch (604:6): [True: 6.78k, False: 710]
  ------------------
  605|  6.78k|    Curl_share_lock(data, CURL_LOCK_DATA_HSTS, CURL_LOCK_ACCESS_SINGLE);
  606|       |
  607|  13.5k|    while(l) {
  ------------------
  |  Branch (607:11): [True: 6.78k, False: 6.78k]
  ------------------
  608|  6.78k|      result = Curl_hsts_loadfile(data, data->hsts, l->data);
  609|  6.78k|      if(result)
  ------------------
  |  Branch (609:10): [True: 0, False: 6.78k]
  ------------------
  610|      0|        break;
  611|  6.78k|      l = l->next;
  612|  6.78k|    }
  613|  6.78k|    Curl_share_unlock(data, CURL_LOCK_DATA_HSTS);
  614|  6.78k|  }
  615|  7.49k|  return result;
  616|  7.49k|}
Curl_hsts_applies:
  619|    431|{
  620|       |  return !!hsts_check(h, dest->hostname, strlen(dest->hostname), TRUE);
  ------------------
  |  | 1055|    431|#define TRUE true
  ------------------
  621|    431|}
hsts.c:hsts_debugtime:
   51|    431|{
   52|    431|  const char *timestr = getenv("CURL_TIME");
   53|    431|  (void)unused;
   54|    431|  if(timestr) {
  ------------------
  |  Branch (54:6): [True: 0, False: 431]
  ------------------
   55|      0|    curl_off_t val;
   56|      0|    if(!curlx_str_number(&timestr, &val, TIME_T_MAX))
  ------------------
  |  |  614|      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|    431|  return time(NULL);
   61|    431|}
hsts.c:hsts_load:
  539|  6.78k|{
  540|  6.78k|  CURLcode result = CURLE_OK;
  541|  6.78k|  FILE *fp;
  542|       |
  543|       |  /* we need a private copy of the filename so that the hsts cache file
  544|       |     name survives an easy handle reset */
  545|  6.78k|  curlx_free(h->filename);
  ------------------
  |  | 1483|  6.78k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  546|  6.78k|  h->filename = curlx_strdup(file);
  ------------------
  |  | 1477|  6.78k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  547|  6.78k|  if(!h->filename)
  ------------------
  |  Branch (547:6): [True: 0, False: 6.78k]
  ------------------
  548|      0|    return CURLE_OUT_OF_MEMORY;
  549|       |
  550|  6.78k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   74|  6.78k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  551|  6.78k|  if(fp) {
  ------------------
  |  Branch (551:6): [True: 6.78k, False: 0]
  ------------------
  552|  6.78k|    curlx_struct_stat stat;
  ------------------
  |  |   63|  6.78k|#define curlx_struct_stat       struct stat
  ------------------
  553|  6.78k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  6.78k|#define curlx_fstat             fstat
  ------------------
  |  Branch (553:8): [True: 0, False: 6.78k]
  |  Branch (553:50): [True: 6.78k, False: 0]
  ------------------
  554|  6.78k|      struct dynbuf buf;
  555|  6.78k|      bool eof = FALSE;
  ------------------
  |  | 1058|  6.78k|#define FALSE false
  ------------------
  556|  6.78k|      curlx_dyn_init(&buf, MAX_HSTS_LINE);
  ------------------
  |  |   41|  6.78k|#define MAX_HSTS_LINE    4095
  ------------------
  557|  6.78k|      do {
  558|  6.78k|        result = Curl_get_line(&buf, fp, &eof);
  559|  6.78k|        if(!result) {
  ------------------
  |  Branch (559:12): [True: 6.78k, False: 0]
  ------------------
  560|  6.78k|          const char *lineptr = curlx_dyn_ptr(&buf);
  561|  6.78k|          curlx_str_passblanks(&lineptr);
  562|       |
  563|       |          /* Skip empty or commented lines, since we know the line will have
  564|       |             a trailing newline from Curl_get_line we can treat length 1 as
  565|       |             empty. */
  566|  6.78k|          if((*lineptr == '#') || strlen(lineptr) <= 1)
  ------------------
  |  Branch (566:14): [True: 0, False: 6.78k]
  |  Branch (566:35): [True: 6.78k, False: 0]
  ------------------
  567|  6.78k|            continue;
  568|       |
  569|      0|          hsts_add(h, lineptr);
  570|      0|        }
  571|  6.78k|      } while(!result && !eof);
  ------------------
  |  Branch (571:15): [True: 6.78k, False: 0]
  |  Branch (571:26): [True: 0, False: 6.78k]
  ------------------
  572|  6.78k|      curlx_dyn_free(&buf); /* free the line buffer */
  573|  6.78k|    }
  574|  6.78k|    curlx_fclose(fp);
  ------------------
  |  |   79|  6.78k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  575|  6.78k|  }
  576|  6.78k|  return result;
  577|  6.78k|}
hsts.c:hsts_pull:
  491|  6.78k|{
  492|       |  /* if the HSTS read callback is set, use it */
  493|  6.78k|  if(data->set.hsts_read) {
  ------------------
  |  Branch (493:6): [True: 0, False: 6.78k]
  ------------------
  494|      0|    CURLSTScode sc;
  495|      0|    DEBUGASSERT(h);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (495:5): [True: 0, False: 0]
  |  Branch (495:5): [True: 0, False: 0]
  ------------------
  496|      0|    do {
  497|      0|      char buffer[MAX_HSTS_HOSTLEN + 1];
  498|      0|      struct curl_hstsentry e;
  499|      0|      e.name = buffer;
  500|      0|      e.namelen = sizeof(buffer) - 1;
  501|      0|      e.includeSubDomains = FALSE; /* default */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  502|      0|      e.expire[0] = 0;
  503|      0|      e.expire[MAX_HSTS_DATELEN] = 0;
  ------------------
  |  |   43|      0|#define MAX_HSTS_DATELEN 17
  ------------------
  504|      0|      e.name[0] = 0; /* to make it clean */
  505|      0|      e.name[MAX_HSTS_HOSTLEN] = 0;
  ------------------
  |  |   42|      0|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  506|      0|      sc = data->set.hsts_read(data, &e, data->set.hsts_read_userp);
  507|      0|      if(sc == CURLSTS_OK) {
  ------------------
  |  Branch (507:10): [True: 0, False: 0]
  ------------------
  508|      0|        CURLcode result;
  509|      0|        const char *date = e.expire;
  510|      0|        if(!e.name[0] || e.expire[MAX_HSTS_DATELEN] ||
  ------------------
  |  |   43|      0|#define MAX_HSTS_DATELEN 17
  ------------------
  |  Branch (510:12): [True: 0, False: 0]
  |  Branch (510:26): [True: 0, False: 0]
  ------------------
  511|      0|           e.name[MAX_HSTS_HOSTLEN])
  ------------------
  |  |   42|      0|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  |  Branch (511:12): [True: 0, False: 0]
  ------------------
  512|       |          /* bail out if no name was stored or if a null-terminator is gone */
  513|      0|          return CURLE_BAD_FUNCTION_ARGUMENT;
  514|      0|        if(!date[0])
  ------------------
  |  Branch (514:12): [True: 0, False: 0]
  ------------------
  515|      0|          date = UNLIMITED;
  ------------------
  |  |   44|      0|#define UNLIMITED        "unlimited"
  ------------------
  516|      0|        result = hsts_add_host_expire(h, e.name, strlen(e.name),
  517|      0|                                      date, strlen(date),
  518|       |                                      /* bitfield to bool conversion: */
  519|      0|                                      e.includeSubDomains ? TRUE : FALSE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
                                                    e.includeSubDomains ? TRUE : FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  |  Branch (519:39): [True: 0, False: 0]
  ------------------
  520|      0|        if(result)
  ------------------
  |  Branch (520:12): [True: 0, False: 0]
  ------------------
  521|      0|          return result;
  522|      0|      }
  523|      0|      else if(sc == CURLSTS_FAIL)
  ------------------
  |  Branch (523:15): [True: 0, False: 0]
  ------------------
  524|      0|        return CURLE_ABORTED_BY_CALLBACK;
  525|      0|    } while(sc == CURLSTS_OK);
  ------------------
  |  Branch (525:13): [True: 0, False: 0]
  ------------------
  526|      0|  }
  527|  6.78k|  return CURLE_OK;
  528|  6.78k|}

Curl_http_neg_init:
   89|  7.49k|{
   90|  7.49k|  memset(neg, 0, sizeof(*neg));
   91|  7.49k|  neg->accept_09 = data->set.http09_allowed;
   92|  7.49k|  switch(data->set.httpwant) {
   93|      1|  case CURL_HTTP_VERSION_1_0:
  ------------------
  |  | 2315|      1|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  |  Branch (93:3): [True: 1, False: 7.49k]
  ------------------
   94|      1|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   95|      1|    neg->only_10 = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
   96|      1|    break;
   97|      1|  case CURL_HTTP_VERSION_1_1:
  ------------------
  |  | 2316|      1|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  |  Branch (97:3): [True: 1, False: 7.49k]
  ------------------
   98|      1|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   99|      1|    break;
  100|      1|  case CURL_HTTP_VERSION_2_0:
  ------------------
  |  | 2317|      1|#define CURL_HTTP_VERSION_2_0   3L /* please use HTTP 2 in the request */
  ------------------
  |  Branch (100:3): [True: 1, False: 7.49k]
  ------------------
  101|      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)
  ------------------
  102|      1|    neg->h2_upgrade = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  103|      1|    break;
  104|    711|  case CURL_HTTP_VERSION_2TLS:
  ------------------
  |  | 2318|    711|#define CURL_HTTP_VERSION_2TLS  4L /* use version 2 for HTTPS, version 1.1 for
  ------------------
  |  Branch (104:3): [True: 711, False: 6.78k]
  ------------------
  105|    711|    neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|    711|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|    711|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  106|    711|    break;
  107|      1|  case CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:
  ------------------
  |  | 2320|      1|#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
  ------------------
  |  Branch (107:3): [True: 1, False: 7.49k]
  ------------------
  108|      1|    neg->wanted = neg->allowed = (CURL_HTTP_V2x);
  ------------------
  |  |   41|      1|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  109|      1|    data->state.http_neg.h2_prior_knowledge = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  110|      1|    break;
  111|      0|  case CURL_HTTP_VERSION_3:
  ------------------
  |  | 2322|      0|#define CURL_HTTP_VERSION_3     30L /* Use HTTP/3, fallback to HTTP/2 or
  ------------------
  |  Branch (111:3): [True: 0, False: 7.49k]
  ------------------
  112|      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)
  ------------------
  113|      0|    neg->allowed = neg->wanted;
  114|      0|    break;
  115|      0|  case CURL_HTTP_VERSION_3ONLY:
  ------------------
  |  | 2326|      0|#define CURL_HTTP_VERSION_3ONLY 31L /* Use HTTP/3 without fallback. For
  ------------------
  |  Branch (115:3): [True: 0, False: 7.49k]
  ------------------
  116|      0|    neg->wanted = neg->allowed = (CURL_HTTP_V3x);
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  117|      0|    break;
  118|  6.78k|  case CURL_HTTP_VERSION_NONE:
  ------------------
  |  | 2312|  6.78k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (118:3): [True: 6.78k, False: 715]
  ------------------
  119|  6.78k|  default:
  ------------------
  |  Branch (119:3): [True: 0, False: 7.49k]
  ------------------
  120|  6.78k|    neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|  6.78k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|  6.78k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  121|  6.78k|    neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   40|  6.78k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   41|  6.78k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   42|  6.78k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  122|  6.78k|    break;
  123|  7.49k|  }
  124|  7.49k|}
Curl_http_setup_conn:
  128|    558|{
  129|       |  /* allocate the HTTP-specific struct for the Curl_easy, only to survive
  130|       |     during this request */
  131|    558|  if(data->state.http_neg.wanted == CURL_HTTP_V3x) {
  ------------------
  |  |   42|    558|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (131:6): [True: 0, False: 558]
  ------------------
  132|       |    /* only HTTP/3, needs to work */
  133|      0|    CURLcode result = Curl_conn_may_http3(data, conn, conn->transport_wanted);
  134|      0|    if(result)
  ------------------
  |  Branch (134:8): [True: 0, False: 0]
  ------------------
  135|      0|      return result;
  136|      0|  }
  137|    558|  return CURLE_OK;
  138|    558|}
Curl_checkProxyheaders:
  154|  2.90k|{
  155|  2.90k|  struct curl_slist *head;
  156|       |
  157|  2.90k|  for(head = (conn->bits.proxy && data->set.sep_headers) ?
  ------------------
  |  Branch (157:15): [True: 2.90k, False: 0]
  |  Branch (157:35): [True: 2.75k, False: 153]
  ------------------
  158|  2.75k|        data->set.proxyheaders : data->set.headers;
  159|  3.53k|      head; head = head->next) {
  ------------------
  |  Branch (159:7): [True: 635, False: 2.90k]
  ------------------
  160|    635|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (160:8): [True: 0, False: 635]
  ------------------
  161|      0|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|      0|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 0, False: 0]
  |  |  |  Branch (26:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  162|      0|      return head->data;
  163|    635|  }
  164|       |
  165|  2.90k|  return NULL;
  166|  2.90k|}
Curl_http_auth_act:
  551|     55|{
  552|     55|  struct connectdata *conn = data->conn;
  553|     55|  bool pickhost = FALSE;
  ------------------
  |  | 1058|     55|#define FALSE false
  ------------------
  554|     55|  bool pickproxy = FALSE;
  ------------------
  |  | 1058|     55|#define FALSE false
  ------------------
  555|     55|  CURLcode result = CURLE_OK;
  556|     55|  unsigned long authmask = ~0UL;
  557|       |
  558|     55|  if(!Curl_creds_has_oauth_bearer(data->state.creds))
  ------------------
  |  |   73|     55|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (73:43): [True: 5, False: 50]
  |  |  |  Branch (73:50): [True: 3, False: 2]
  |  |  ------------------
  ------------------
  559|     52|    authmask &= (unsigned long)~CURLAUTH_BEARER;
  ------------------
  |  |  844|     52|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  560|       |
  561|     55|  if(100 <= data->req.httpcode && data->req.httpcode <= 199)
  ------------------
  |  Branch (561:6): [True: 21, False: 34]
  |  Branch (561:35): [True: 3, False: 18]
  ------------------
  562|       |    /* this is a transient response code, ignore */
  563|      3|    return CURLE_OK;
  564|       |
  565|     52|  if(data->state.authproblem)
  ------------------
  |  Branch (565:6): [True: 0, False: 52]
  ------------------
  566|      0|    return data->set.http_fail_on_error ? CURLE_HTTP_RETURNED_ERROR : CURLE_OK;
  ------------------
  |  Branch (566:12): [True: 0, False: 0]
  ------------------
  567|       |
  568|     52|  if(data->state.creds &&
  ------------------
  |  Branch (568:6): [True: 5, False: 47]
  ------------------
  569|      5|     ((data->req.httpcode == 401) ||
  ------------------
  |  Branch (569:7): [True: 1, False: 4]
  ------------------
  570|      4|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (570:8): [True: 0, False: 4]
  |  Branch (570:29): [True: 0, False: 0]
  ------------------
  571|      1|    pickhost = pickoneauth(&data->state.authhost, authmask);
  572|      1|    if(!pickhost)
  ------------------
  |  Branch (572:8): [True: 1, False: 0]
  ------------------
  573|      1|      data->state.authproblem = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  574|      0|    else
  575|      0|      data->info.httpauthpicked = data->state.authhost.picked;
  576|      1|    if(data->state.authhost.picked == CURLAUTH_NTLM &&
  ------------------
  |  |  838|      2|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (576:8): [True: 0, False: 1]
  ------------------
  577|      0|       (data->req.httpversion_sent > 11)) {
  ------------------
  |  Branch (577:8): [True: 0, False: 0]
  ------------------
  578|      0|      infof(data, "Forcing HTTP/1.1 for NTLM");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  579|      0|      connclose(conn, "Force HTTP/1.1 connection");
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  580|      0|      data->state.http_neg.wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  581|      0|      data->state.http_neg.allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  582|      0|    }
  583|      1|  }
  584|     52|#ifndef CURL_DISABLE_PROXY
  585|     52|  if(conn->http_proxy.creds &&
  ------------------
  |  Branch (585:6): [True: 37, False: 15]
  ------------------
  586|     37|     ((data->req.httpcode == 407) ||
  ------------------
  |  Branch (586:7): [True: 1, False: 36]
  ------------------
  587|     36|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (587:8): [True: 0, False: 36]
  |  Branch (587:29): [True: 0, False: 0]
  ------------------
  588|      1|    pickproxy = pickoneauth(&data->state.authproxy,
  589|      1|                            authmask & ~CURLAUTH_BEARER);
  ------------------
  |  |  844|      1|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  590|      1|    if(!pickproxy)
  ------------------
  |  Branch (590:8): [True: 1, False: 0]
  ------------------
  591|      1|      data->state.authproblem = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  592|      0|    else
  593|      0|      data->info.proxyauthpicked = data->state.authproxy.picked;
  594|      1|  }
  595|     52|#endif
  596|       |
  597|     52|  if(pickhost || pickproxy) {
  ------------------
  |  Branch (597:6): [True: 0, False: 52]
  |  Branch (597:18): [True: 0, False: 52]
  ------------------
  598|      0|    result = http_perhapsrewind(data, conn);
  599|      0|    if(result)
  ------------------
  |  Branch (599:8): [True: 0, False: 0]
  ------------------
  600|      0|      return result;
  601|       |
  602|       |    /* In case this is GSS auth, the newurl field is already allocated so
  603|       |       we must make sure to free it before allocating a new one. As figured
  604|       |       out in bug #2284386 */
  605|      0|    curlx_free(data->req.newurl);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  606|       |    /* clone URL */
  607|      0|    data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  608|      0|    if(!data->req.newurl)
  ------------------
  |  Branch (608:8): [True: 0, False: 0]
  ------------------
  609|      0|      return CURLE_OUT_OF_MEMORY;
  610|      0|  }
  611|     52|  else if((data->req.httpcode < 300) &&
  ------------------
  |  Branch (611:11): [True: 34, False: 18]
  ------------------
  612|     34|          !data->state.authhost.done &&
  ------------------
  |  Branch (612:11): [True: 1, False: 33]
  ------------------
  613|      1|          data->req.authneg) {
  ------------------
  |  Branch (613:11): [True: 0, False: 1]
  ------------------
  614|       |    /* no (known) authentication available,
  615|       |       authentication is not "done" yet and
  616|       |       no authentication seems to be required and
  617|       |       we did not try HEAD or GET */
  618|      0|    if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (618:8): [True: 0, False: 0]
  ------------------
  619|      0|       (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (619:8): [True: 0, False: 0]
  ------------------
  620|       |      /* clone URL */
  621|      0|      data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  622|      0|      if(!data->req.newurl)
  ------------------
  |  Branch (622:10): [True: 0, False: 0]
  ------------------
  623|      0|        return CURLE_OUT_OF_MEMORY;
  624|      0|      data->state.authhost.done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  625|      0|    }
  626|      0|  }
  627|     52|  if(http_should_fail(data, data->req.httpcode)) {
  ------------------
  |  Branch (627:6): [True: 7, False: 45]
  ------------------
  628|      7|    failf(data, "The requested URL returned error: %d",
  ------------------
  |  |   62|      7|#define failf Curl_failf
  ------------------
  629|      7|          data->req.httpcode);
  630|      7|    result = CURLE_HTTP_RETURNED_ERROR;
  631|      7|  }
  632|       |
  633|     52|  return result;
  634|     52|}
Curl_http_output_auth:
  773|    921|{
  774|    921|  CURLcode result = CURLE_OK;
  775|    921|  struct auth *authhost;
  776|    921|  struct auth *authproxy;
  777|    921|  const char *path_and_query = path;
  778|    921|  char *tmp_str = NULL;
  779|       |
  780|    921|  DEBUGASSERT(data);
  ------------------
  |  | 1081|    921|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (780:3): [True: 0, False: 921]
  |  Branch (780:3): [True: 921, False: 0]
  ------------------
  781|    921|  authhost = &data->state.authhost;
  782|    921|  authproxy = &data->state.authproxy;
  783|       |
  784|    921|  if(
  785|    921|#ifndef CURL_DISABLE_PROXY
  786|    921|    (!conn->bits.httpproxy || !conn->http_proxy.creds) &&
  ------------------
  |  Branch (786:6): [True: 0, False: 921]
  |  Branch (786:31): [True: 677, False: 244]
  ------------------
  787|    677|#endif
  788|       |#ifdef USE_SPNEGO
  789|       |    !(authhost->want & CURLAUTH_NEGOTIATE) &&
  790|       |    !(authproxy->want & CURLAUTH_NEGOTIATE) &&
  791|       |#endif
  792|    677|    !data->state.creds) {
  ------------------
  |  Branch (792:5): [True: 133, False: 544]
  ------------------
  793|       |    /* no authentication with no user or password */
  794|    133|    authhost->done = TRUE;
  ------------------
  |  | 1055|    133|#define TRUE true
  ------------------
  795|    133|    authproxy->done = TRUE;
  ------------------
  |  | 1055|    133|#define TRUE true
  ------------------
  796|    133|    result = CURLE_OK;
  797|    133|    goto out;
  798|    133|  }
  799|       |
  800|    788|  if(query) {
  ------------------
  |  Branch (800:6): [True: 0, False: 788]
  ------------------
  801|      0|    tmp_str = curl_maprintf("%s?%s", path, query);
  802|      0|    if(!tmp_str) {
  ------------------
  |  Branch (802:8): [True: 0, False: 0]
  ------------------
  803|      0|      result = CURLE_OUT_OF_MEMORY;
  804|      0|      goto out;
  805|      0|    }
  806|      0|    path_and_query = tmp_str;
  807|      0|  }
  808|       |
  809|    788|  if(authhost->want && !authhost->picked)
  ------------------
  |  Branch (809:6): [True: 787, False: 1]
  |  Branch (809:24): [True: 787, False: 0]
  ------------------
  810|       |    /* The app has selected one or more methods, but none has been picked
  811|       |       so far by a server round-trip. Then we set the picked one to the
  812|       |       want one, and if this is one single bit it will be used instantly. */
  813|    787|    authhost->picked = authhost->want;
  814|       |
  815|    788|  if(authproxy->want && !authproxy->picked)
  ------------------
  |  Branch (815:6): [True: 787, False: 1]
  |  Branch (815:25): [True: 787, False: 0]
  ------------------
  816|       |    /* The app has selected one or more methods, but none has been picked so
  817|       |       far by a proxy round-trip. Then we set the picked one to the want one,
  818|       |       and if this is one single bit it will be used instantly. */
  819|    787|    authproxy->picked = authproxy->want;
  820|       |
  821|    788|#ifndef CURL_DISABLE_PROXY
  822|       |  /* Send proxy authentication header if needed */
  823|    788|  if(conn->bits.httpproxy && (!conn->bits.tunnel_proxy || is_connect)) {
  ------------------
  |  Branch (823:6): [True: 788, False: 0]
  |  Branch (823:31): [True: 0, False: 788]
  |  Branch (823:59): [True: 788, False: 0]
  ------------------
  824|    788|    result = output_auth_headers(data, conn, authproxy, request,
  825|    788|                                 path_and_query, TRUE);
  ------------------
  |  | 1055|    788|#define TRUE true
  ------------------
  826|    788|    if(result)
  ------------------
  |  Branch (826:8): [True: 0, False: 788]
  ------------------
  827|      0|      goto out;
  828|    788|  }
  829|      0|  else
  830|       |#else
  831|       |  (void)is_connect;
  832|       |#endif /* CURL_DISABLE_PROXY */
  833|       |    /* we have no proxy so let's pretend we are done authenticating
  834|       |       with it */
  835|      0|    authproxy->done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  836|       |
  837|       |  /* Either we have credentials for the origin we talk to or
  838|       |     performing authentication is allowed here */
  839|    788|  if(data->state.creds || Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (839:6): [True: 626, False: 162]
  |  Branch (839:27): [True: 162, False: 0]
  ------------------
  840|    788|    result = output_auth_headers(data, conn, authhost, request,
  841|    788|                                 path_and_query, FALSE);
  ------------------
  |  | 1058|    788|#define FALSE false
  ------------------
  842|      0|  else
  843|      0|    authhost->done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  844|       |
  845|    788|  if(((authhost->multipass && !authhost->done) ||
  ------------------
  |  Branch (845:8): [True: 1, False: 787]
  |  Branch (845:31): [True: 1, False: 0]
  ------------------
  846|    787|      (authproxy->multipass && !authproxy->done)) &&
  ------------------
  |  Branch (846:8): [True: 1, False: 786]
  |  Branch (846:32): [True: 1, False: 0]
  ------------------
  847|      2|     (httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (847:6): [True: 0, False: 2]
  ------------------
  848|      0|     (httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (848:6): [True: 0, False: 0]
  ------------------
  849|       |    /* Auth is required and we are not authenticated yet. Make a PUT or POST
  850|       |       with content-length zero as a "probe". */
  851|      0|    data->req.authneg = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  852|      0|  }
  853|    788|  else
  854|    788|    data->req.authneg = FALSE;
  ------------------
  |  | 1058|    788|#define FALSE false
  ------------------
  855|       |
  856|    921|out:
  857|    921|  curlx_free(tmp_str);
  ------------------
  |  | 1483|    921|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  858|    921|  return result;
  859|    788|}
Curl_compareheader:
 1394|  22.3k|{
 1395|       |  /* RFC2616, section 4.2 says: "Each header field consists of a name followed
 1396|       |   * by a colon (":") and the field value. Field names are case-insensitive.
 1397|       |   * The field value MAY be preceded by any amount of LWS, though a single SP
 1398|       |   * is preferred." */
 1399|       |
 1400|  22.3k|  const char *p;
 1401|  22.3k|  struct Curl_str val;
 1402|  22.3k|  DEBUGASSERT(hlen);
  ------------------
  |  | 1081|  22.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1402:3): [True: 0, False: 22.3k]
  |  Branch (1402:3): [True: 22.3k, False: 0]
  ------------------
 1403|  22.3k|  DEBUGASSERT(clen);
  ------------------
  |  | 1081|  22.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1403:3): [True: 0, False: 22.3k]
  |  Branch (1403:3): [True: 22.3k, False: 0]
  ------------------
 1404|  22.3k|  DEBUGASSERT(header);
  ------------------
  |  | 1081|  22.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1404:3): [True: 0, False: 22.3k]
  |  Branch (1404:3): [True: 22.3k, False: 0]
  ------------------
 1405|  22.3k|  DEBUGASSERT(content);
  ------------------
  |  | 1081|  22.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1405:3): [True: 0, False: 22.3k]
  |  Branch (1405:3): [True: 22.3k, False: 0]
  ------------------
 1406|       |
 1407|  22.3k|  if(!curl_strnequal(headerline, header, hlen))
  ------------------
  |  Branch (1407:6): [True: 22.3k, False: 0]
  ------------------
 1408|  22.3k|    return FALSE; /* does not start with header */
  ------------------
  |  | 1058|  22.3k|#define FALSE false
  ------------------
 1409|       |
 1410|       |  /* pass the header */
 1411|      0|  p = &headerline[hlen];
 1412|       |
 1413|      0|  if(curlx_str_untilnl(&p, &val, MAX_HTTP_RESP_HEADER_SIZE))
  ------------------
  |  |  153|      0|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1413:6): [True: 0, False: 0]
  ------------------
 1414|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1415|      0|  curlx_str_trimblanks(&val);
 1416|       |
 1417|       |  /* find the content string in the rest of the line */
 1418|      0|  if(curlx_strlen(&val) >= clen) {
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1418:6): [True: 0, False: 0]
  ------------------
 1419|      0|    size_t len;
 1420|      0|    p = curlx_str(&val);
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
 1421|      0|    for(len = curlx_strlen(&val); len >= clen;) {
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1421:35): [True: 0, False: 0]
  ------------------
 1422|      0|      struct Curl_str next;
 1423|      0|      const char *o = p;
 1424|       |      /* after a match there must be a comma, space, newline or null byte */
 1425|      0|      if(curl_strnequal(p, content, clen) &&
  ------------------
  |  Branch (1425:10): [True: 0, False: 0]
  ------------------
 1426|      0|         ((p[clen] == ',') || ISBLANK(p[clen]) || ISNEWLINE(p[clen]) ||
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                       ((p[clen] == ',') || ISBLANK(p[clen]) || ISNEWLINE(p[clen]) ||
  ------------------
  |  |   50|      0|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 0, False: 0]
  |  |  |  Branch (50:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1426:11): [True: 0, False: 0]
  ------------------
 1427|      0|          !p[clen]))
  ------------------
  |  Branch (1427:11): [True: 0, False: 0]
  ------------------
 1428|      0|        return TRUE; /* match! */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1429|       |      /* advance to the next comma */
 1430|      0|      if(curlx_str_until(&p, &next, MAX_HTTP_RESP_HEADER_SIZE, ',') ||
  ------------------
  |  |  153|      0|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1430:10): [True: 0, False: 0]
  ------------------
 1431|      0|         curlx_str_single(&p, ','))
  ------------------
  |  Branch (1431:10): [True: 0, False: 0]
  ------------------
 1432|      0|        break; /* no comma, get out */
 1433|       |
 1434|       |      /* if there are more dummy commas, move over them as well */
 1435|      0|      do
 1436|      0|        curlx_str_passblanks(&p);
 1437|      0|      while(!curlx_str_single(&p, ','));
  ------------------
  |  Branch (1437:13): [True: 0, False: 0]
  ------------------
 1438|      0|      len -= (p - o);
 1439|      0|    }
 1440|      0|  }
 1441|      0|  return FALSE; /* no match */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1442|      0|}
Curl_http_method:
 1933|    592|{
 1934|    592|  Curl_HttpReq httpreq = (Curl_HttpReq)data->state.httpreq;
 1935|    592|  const char *request;
 1936|    592|#ifndef CURL_DISABLE_WEBSOCKETS
 1937|    592|  if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   63|    592|#define CURLPROTO_WS     (1L << 30)
  ------------------
                if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   64|    592|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  ------------------
  |  Branch (1937:6): [True: 0, False: 592]
  ------------------
 1938|      0|    httpreq = HTTPREQ_GET;
 1939|    592|  else
 1940|    592|#endif
 1941|    592|  if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  |   84|    592|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|    592|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|    592|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|    592|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|    592|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|    592|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
                if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  | 1080|    592|#define CURLPROTO_FTP     (1L << 2)
  ------------------
  |  Branch (1941:6): [True: 0, False: 592]
  ------------------
 1942|      0|     data->state.upload)
  ------------------
  |  Branch (1942:6): [True: 0, False: 0]
  ------------------
 1943|      0|    httpreq = HTTPREQ_PUT;
 1944|       |
 1945|       |  /* Now set the 'request' pointer to the proper request string */
 1946|    592|  if(data->set.str[STRING_CUSTOMREQUEST] &&
  ------------------
  |  Branch (1946:6): [True: 2, False: 590]
  ------------------
 1947|      2|     !data->state.http_ignorecustom) {
  ------------------
  |  Branch (1947:6): [True: 2, False: 0]
  ------------------
 1948|      2|    request = data->set.str[STRING_CUSTOMREQUEST];
 1949|      2|  }
 1950|    590|  else {
 1951|    590|    if(data->req.no_body)
  ------------------
  |  Branch (1951:8): [True: 1, False: 589]
  ------------------
 1952|      1|      request = "HEAD";
 1953|    589|    else {
 1954|    589|      DEBUGASSERT((httpreq >= HTTPREQ_GET) && (httpreq <= HTTPREQ_HEAD));
  ------------------
  |  | 1081|    589|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1954:7): [True: 0, False: 589]
  |  Branch (1954:7): [True: 0, False: 0]
  |  Branch (1954:7): [True: 589, False: 0]
  |  Branch (1954:7): [True: 589, False: 0]
  ------------------
 1955|    589|      switch(httpreq) {
 1956|      2|      case HTTPREQ_POST:
  ------------------
  |  Branch (1956:7): [True: 2, False: 587]
  ------------------
 1957|      3|      case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (1957:7): [True: 1, False: 588]
  ------------------
 1958|      4|      case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (1958:7): [True: 1, False: 588]
  ------------------
 1959|      4|        request = "POST";
 1960|      4|        break;
 1961|      3|      case HTTPREQ_PUT:
  ------------------
  |  Branch (1961:7): [True: 3, False: 586]
  ------------------
 1962|      3|        request = "PUT";
 1963|      3|        break;
 1964|      0|      default: /* this should never happen */
  ------------------
  |  Branch (1964:7): [True: 0, False: 589]
  ------------------
 1965|    582|      case HTTPREQ_GET:
  ------------------
  |  Branch (1965:7): [True: 582, False: 7]
  ------------------
 1966|    582|        request = "GET";
 1967|    582|        break;
 1968|      0|      case HTTPREQ_HEAD:
  ------------------
  |  Branch (1968:7): [True: 0, False: 589]
  ------------------
 1969|      0|        request = "HEAD";
 1970|      0|        break;
 1971|    589|      }
 1972|    589|    }
 1973|    590|  }
 1974|    592|  *method = request;
 1975|    592|  *reqp = httpreq;
 1976|    592|}
Curl_bump_headersize:
 3841|  11.2k|{
 3842|  11.2k|  size_t bad = 0;
 3843|  11.2k|  unsigned int max = MAX_HTTP_RESP_HEADER_SIZE;
  ------------------
  |  |  153|  11.2k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
 3844|  11.2k|  if(delta < MAX_HTTP_RESP_HEADER_SIZE) {
  ------------------
  |  |  153|  11.2k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (3844:6): [True: 11.2k, False: 0]
  ------------------
 3845|  11.2k|    data->info.header_size += (unsigned int)delta;
 3846|  11.2k|    data->req.allheadercount += (unsigned int)delta;
 3847|  11.2k|    if(!connect_only)
  ------------------
  |  Branch (3847:8): [True: 0, False: 11.2k]
  ------------------
 3848|      0|      data->req.headerbytecount += (unsigned int)delta;
 3849|  11.2k|    if(data->req.allheadercount > max)
  ------------------
  |  Branch (3849:8): [True: 0, False: 11.2k]
  ------------------
 3850|      0|      bad = data->req.allheadercount;
 3851|  11.2k|    else if(data->info.header_size > (max * 20)) {
  ------------------
  |  Branch (3851:13): [True: 0, False: 11.2k]
  ------------------
 3852|      0|      bad = data->info.header_size;
 3853|      0|      max *= 20;
 3854|      0|    }
 3855|  11.2k|  }
 3856|      0|  else
 3857|      0|    bad = data->req.allheadercount + delta;
 3858|  11.2k|  if(bad) {
  ------------------
  |  Branch (3858:6): [True: 0, False: 11.2k]
  ------------------
 3859|      0|    failf(data, "Too large response headers: %zu > %u", bad, max);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3860|      0|    return CURLE_RECV_ERROR;
 3861|      0|  }
 3862|  11.2k|  return CURLE_OK;
 3863|  11.2k|}
Curl_http_to_fold:
 4379|    494|{
 4380|    494|  size_t len = curlx_dyn_len(bf);
 4381|    494|  const char *hd = curlx_dyn_ptr(bf);
 4382|    494|  if(len && (hd[len - 1] == '\n'))
  ------------------
  |  Branch (4382:6): [True: 494, False: 0]
  |  Branch (4382:13): [True: 494, False: 0]
  ------------------
 4383|    494|    len--;
 4384|    494|  if(len && (hd[len - 1] == '\r'))
  ------------------
  |  Branch (4384:6): [True: 494, False: 0]
  |  Branch (4384:13): [True: 41, False: 453]
  ------------------
 4385|     41|    len--;
 4386|  2.31k|  while(len && ISBLANK(hd[len - 1])) /* strip off trailing whitespace */
  ------------------
  |  |   45|  2.29k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 444, False: 1.85k]
  |  |  |  Branch (45:38): [True: 1.37k, False: 476]
  |  |  ------------------
  ------------------
  |  Branch (4386:9): [True: 2.29k, False: 18]
  ------------------
 4387|  1.82k|    len--;
 4388|    494|  curlx_dyn_setlen(bf, len);
 4389|    494|}
Curl_http_req_make:
 4676|    921|{
 4677|    921|  struct httpreq *req;
 4678|    921|  CURLcode result = CURLE_OUT_OF_MEMORY;
 4679|       |
 4680|    921|  DEBUGASSERT(method && m_len);
  ------------------
  |  | 1081|    921|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4680:3): [True: 0, False: 921]
  |  Branch (4680:3): [True: 0, False: 0]
  |  Branch (4680:3): [True: 921, False: 0]
  |  Branch (4680:3): [True: 921, False: 0]
  ------------------
 4681|       |
 4682|    921|  req = curlx_calloc(1, sizeof(*req) + m_len);
  ------------------
  |  | 1480|    921|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 4683|    921|  if(!req)
  ------------------
  |  Branch (4683:6): [True: 0, False: 921]
  ------------------
 4684|      0|    goto out;
 4685|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4686|       |#pragma GCC diagnostic push
 4687|       |/* error: 'memcpy' offset [137, 142] from the object at 'req' is out of
 4688|       |   the bounds of referenced subobject 'method' with type 'char[1]' at
 4689|       |   offset 136 */
 4690|       |#pragma GCC diagnostic ignored "-Warray-bounds"
 4691|       |#endif
 4692|    921|  memcpy(req->method, method, m_len);
 4693|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4694|       |#pragma GCC diagnostic pop
 4695|       |#endif
 4696|    921|  if(scheme) {
  ------------------
  |  Branch (4696:6): [True: 0, False: 921]
  ------------------
 4697|      0|    req->scheme = curlx_memdup0(scheme, s_len);
 4698|      0|    if(!req->scheme)
  ------------------
  |  Branch (4698:8): [True: 0, False: 0]
  ------------------
 4699|      0|      goto out;
 4700|      0|  }
 4701|    921|  if(authority) {
  ------------------
  |  Branch (4701:6): [True: 921, False: 0]
  ------------------
 4702|    921|    req->authority = curlx_memdup0(authority, a_len);
 4703|    921|    if(!req->authority)
  ------------------
  |  Branch (4703:8): [True: 0, False: 921]
  ------------------
 4704|      0|      goto out;
 4705|    921|  }
 4706|    921|  if(path) {
  ------------------
  |  Branch (4706:6): [True: 0, False: 921]
  ------------------
 4707|      0|    req->path = curlx_memdup0(path, p_len);
 4708|      0|    if(!req->path)
  ------------------
  |  Branch (4708:8): [True: 0, False: 0]
  ------------------
 4709|      0|      goto out;
 4710|      0|  }
 4711|    921|  Curl_dynhds_init(&req->headers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|    921|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4712|    921|  Curl_dynhds_init(&req->trailers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|    921|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4713|    921|  result = CURLE_OK;
 4714|       |
 4715|    921|out:
 4716|    921|  if(result && req)
  ------------------
  |  Branch (4716:6): [True: 0, False: 921]
  |  Branch (4716:16): [True: 0, False: 0]
  ------------------
 4717|      0|    Curl_http_req_free(req);
 4718|    921|  *preq = result ? NULL : req;
  ------------------
  |  Branch (4718:11): [True: 0, False: 921]
  ------------------
 4719|    921|  return result;
 4720|    921|}
Curl_http_req_free:
 4844|    921|{
 4845|    921|  if(req) {
  ------------------
  |  Branch (4845:6): [True: 921, False: 0]
  ------------------
 4846|    921|    curlx_free(req->scheme);
  ------------------
  |  | 1483|    921|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4847|    921|    curlx_free(req->authority);
  ------------------
  |  | 1483|    921|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4848|    921|    curlx_free(req->path);
  ------------------
  |  | 1483|    921|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4849|    921|    Curl_dynhds_free(&req->headers);
 4850|    921|    Curl_dynhds_free(&req->trailers);
 4851|    921|    curlx_free(req);
  ------------------
  |  | 1483|    921|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4852|    921|  }
 4853|    921|}
http.c:pickoneauth:
  351|      2|{
  352|      2|  bool picked;
  353|       |  /* only deal with authentication we want */
  354|      2|  unsigned long avail = pick->avail & pick->want & mask;
  355|      2|  picked = TRUE;
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
  356|       |
  357|       |  /* The order of these checks is highly relevant, as this will be the order
  358|       |     of preference in case of the existence of multiple accepted types. */
  359|      2|  if(avail & CURLAUTH_NEGOTIATE)
  ------------------
  |  |  833|      2|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  |  Branch (359:6): [True: 0, False: 2]
  ------------------
  360|      0|    pick->picked = CURLAUTH_NEGOTIATE;
  ------------------
  |  |  833|      0|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  361|      2|#ifndef CURL_DISABLE_BEARER_AUTH
  362|      2|  else if(avail & CURLAUTH_BEARER)
  ------------------
  |  |  844|      2|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (362:11): [True: 0, False: 2]
  ------------------
  363|      0|    pick->picked = CURLAUTH_BEARER;
  ------------------
  |  |  844|      0|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  364|      2|#endif
  365|      2|#ifndef CURL_DISABLE_DIGEST_AUTH
  366|      2|  else if(avail & CURLAUTH_DIGEST)
  ------------------
  |  |  832|      2|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (366:11): [True: 0, False: 2]
  ------------------
  367|      0|    pick->picked = CURLAUTH_DIGEST;
  ------------------
  |  |  832|      0|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  368|      2|#endif
  369|      2|  else if(avail & CURLAUTH_NTLM)
  ------------------
  |  |  838|      2|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (369:11): [True: 0, False: 2]
  ------------------
  370|      0|    pick->picked = CURLAUTH_NTLM;
  ------------------
  |  |  838|      0|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  371|      2|#ifndef CURL_DISABLE_BASIC_AUTH
  372|      2|  else if(avail & CURLAUTH_BASIC)
  ------------------
  |  |  831|      2|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (372:11): [True: 0, False: 2]
  ------------------
  373|      0|    pick->picked = CURLAUTH_BASIC;
  ------------------
  |  |  831|      0|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  374|      2|#endif
  375|      2|#ifndef CURL_DISABLE_AWS
  376|      2|  else if(avail & CURLAUTH_AWS_SIGV4)
  ------------------
  |  |  845|      2|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (376:11): [True: 0, False: 2]
  ------------------
  377|      0|    pick->picked = CURLAUTH_AWS_SIGV4;
  ------------------
  |  |  845|      0|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  378|      2|#endif
  379|      2|  else {
  380|      2|    pick->picked = CURLAUTH_PICKNONE; /* we select to use nothing */
  ------------------
  |  |  123|      2|#define CURLAUTH_PICKNONE (1 << 30) /* do not use auth */
  ------------------
  381|      2|    picked = FALSE;
  ------------------
  |  | 1058|      2|#define FALSE false
  ------------------
  382|      2|  }
  383|      2|  pick->avail = CURLAUTH_NONE; /* clear it here */
  ------------------
  |  |  830|      2|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
  384|       |
  385|      2|  return picked;
  386|      2|}
http.c:http_should_fail:
  482|     52|{
  483|     52|  DEBUGASSERT(data);
  ------------------
  |  | 1081|     52|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (483:3): [True: 0, False: 52]
  |  Branch (483:3): [True: 52, False: 0]
  ------------------
  484|     52|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|     52|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (484:3): [True: 0, False: 52]
  |  Branch (484:3): [True: 52, False: 0]
  ------------------
  485|       |
  486|       |  /*
  487|       |   * If we have not been asked to fail on error,
  488|       |   * do not fail.
  489|       |   */
  490|     52|  if(!data->set.http_fail_on_error)
  ------------------
  |  Branch (490:6): [True: 40, False: 12]
  ------------------
  491|     40|    return FALSE;
  ------------------
  |  | 1058|     40|#define FALSE false
  ------------------
  492|       |
  493|       |  /*
  494|       |   * Any code < 400 is never terminal.
  495|       |   */
  496|     12|  if(httpcode < 400)
  ------------------
  |  Branch (496:6): [True: 5, False: 7]
  ------------------
  497|      5|    return FALSE;
  ------------------
  |  | 1058|      5|#define FALSE false
  ------------------
  498|       |
  499|       |  /*
  500|       |   * A 416 response to a resume request is presumably because the file is
  501|       |   * already completely downloaded and thus not actually a fail.
  502|       |   */
  503|      7|  if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
  ------------------
  |  Branch (503:6): [True: 3, False: 4]
  |  Branch (503:33): [True: 2, False: 1]
  ------------------
  504|      2|     httpcode == 416)
  ------------------
  |  Branch (504:6): [True: 0, False: 2]
  ------------------
  505|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  506|       |
  507|       |  /*
  508|       |   * Any code >= 400 that is not 401 or 407 is always
  509|       |   * a terminal error
  510|       |   */
  511|      7|  if((httpcode != 401) && (httpcode != 407))
  ------------------
  |  Branch (511:6): [True: 6, False: 1]
  |  Branch (511:27): [True: 4, False: 2]
  ------------------
  512|      4|    return TRUE;
  ------------------
  |  | 1055|      4|#define TRUE true
  ------------------
  513|       |
  514|       |  /*
  515|       |   * All we have left to deal with is 401 and 407
  516|       |   */
  517|      3|  DEBUGASSERT((httpcode == 401) || (httpcode == 407));
  ------------------
  |  | 1081|      3|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (517:3): [True: 3, False: 0]
  |  Branch (517:3): [True: 0, False: 0]
  |  Branch (517:3): [True: 1, False: 2]
  |  Branch (517:3): [True: 2, False: 0]
  ------------------
  518|       |
  519|       |  /*
  520|       |   * Examine the current authentication state to see if this is an error. The
  521|       |   * idea is for this function to get called after processing all the headers
  522|       |   * in a response message. If we have been to asked to authenticate
  523|       |   * a particular stage, and we have done it, we are OK. If we are already
  524|       |   * completely authenticated, it is not OK to get another 401 or 407.
  525|       |   *
  526|       |   * It is possible for authentication to go stale such that the client needs
  527|       |   * to reauthenticate. Once that info is available, use it here.
  528|       |   */
  529|       |
  530|       |  /*
  531|       |   * Either we are not authenticating, or we are supposed to be authenticating
  532|       |   * something else. This is an error.
  533|       |   */
  534|      3|  if((httpcode == 401) && !data->state.creds)
  ------------------
  |  Branch (534:6): [True: 1, False: 2]
  |  Branch (534:27): [True: 1, False: 0]
  ------------------
  535|      1|    return TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  536|      2|#ifndef CURL_DISABLE_PROXY
  537|      2|  if((httpcode == 407) && !data->conn->http_proxy.creds)
  ------------------
  |  Branch (537:6): [True: 2, False: 0]
  |  Branch (537:27): [True: 1, False: 1]
  ------------------
  538|      1|    return TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  539|      1|#endif
  540|       |
  541|      1|  return (bool)data->state.authproblem;
  542|      2|}
http.c:output_auth_headers:
  647|  1.57k|{
  648|  1.57k|  const char *auth = NULL;
  649|  1.57k|  CURLcode result = CURLE_OK;
  650|  1.57k|  (void)conn;
  651|       |
  652|       |#ifdef CURL_DISABLE_DIGEST_AUTH
  653|       |  (void)request;
  654|       |  (void)path;
  655|       |#endif
  656|  1.57k|#ifndef CURL_DISABLE_AWS
  657|  1.57k|  if((authstatus->picked == CURLAUTH_AWS_SIGV4) && !proxy) {
  ------------------
  |  |  845|  1.57k|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (657:6): [True: 602, False: 974]
  |  Branch (657:52): [True: 601, False: 1]
  ------------------
  658|       |    /* this method is never for proxy */
  659|    601|    auth = "AWS_SIGV4";
  660|    601|    result = Curl_output_aws_sigv4(data);
  661|    601|    if(result)
  ------------------
  |  Branch (661:8): [True: 34, False: 567]
  ------------------
  662|     34|      return result;
  663|    601|  }
  664|    975|  else
  665|    975|#endif
  666|       |#ifdef USE_SPNEGO
  667|       |  if(authstatus->picked == CURLAUTH_NEGOTIATE) {
  668|       |    auth = "Negotiate";
  669|       |    result = Curl_output_negotiate(data, conn, proxy);
  670|       |    if(result)
  671|       |      return result;
  672|       |  }
  673|       |  else
  674|       |#endif
  675|       |#ifdef USE_NTLM
  676|       |  if(authstatus->picked == CURLAUTH_NTLM) {
  677|       |    auth = "NTLM";
  678|       |    result = Curl_output_ntlm(data, proxy);
  679|       |    if(result)
  680|       |      return result;
  681|       |  }
  682|       |  else
  683|       |#endif
  684|    975|#ifndef CURL_DISABLE_DIGEST_AUTH
  685|    975|  if(authstatus->picked == CURLAUTH_DIGEST) {
  ------------------
  |  |  832|    975|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (685:6): [True: 2, False: 973]
  ------------------
  686|      2|    auth = "Digest";
  687|      2|    result = Curl_output_digest(data,
  688|      2|                                proxy,
  689|      2|                                (const unsigned char *)request,
  690|      2|                                (const unsigned char *)path);
  691|      2|    if(result)
  ------------------
  |  Branch (691:8): [True: 0, False: 2]
  ------------------
  692|      0|      return result;
  693|      2|  }
  694|    973|  else
  695|    973|#endif
  696|    973|#ifndef CURL_DISABLE_BASIC_AUTH
  697|    973|  if(authstatus->picked == CURLAUTH_BASIC) {
  ------------------
  |  |  831|    973|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (697:6): [True: 911, False: 62]
  ------------------
  698|       |    /* Basic */
  699|    911|    if(
  700|    911|#ifndef CURL_DISABLE_PROXY
  701|    911|       (proxy && conn->http_proxy.creds &&
  ------------------
  |  Branch (701:9): [True: 760, False: 151]
  |  Branch (701:18): [True: 242, False: 518]
  ------------------
  702|    242|        !Curl_checkProxyheaders(data, conn,
  ------------------
  |  Branch (702:9): [True: 242, False: 0]
  ------------------
  703|    242|                                STRCONST("Proxy-authorization"))) ||
  ------------------
  |  | 1292|    242|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  704|    669|#endif
  705|    669|       (!proxy && data->state.creds &&
  ------------------
  |  Branch (705:9): [True: 151, False: 518]
  |  Branch (705:19): [True: 50, False: 101]
  ------------------
  706|    292|        !Curl_checkheaders(data, STRCONST("Authorization")))) {
  ------------------
  |  | 1292|     50|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (706:9): [True: 50, False: 0]
  ------------------
  707|    292|      auth = "Basic";
  708|    292|      result = http_output_basic(data, conn, proxy);
  709|    292|      if(result)
  ------------------
  |  Branch (709:10): [True: 0, False: 292]
  ------------------
  710|      0|        return result;
  711|    292|    }
  712|       |
  713|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  714|       |       functions work that way */
  715|    911|    authstatus->done = TRUE;
  ------------------
  |  | 1055|    911|#define TRUE true
  ------------------
  716|    911|  }
  717|  1.54k|#endif
  718|  1.54k|#ifndef CURL_DISABLE_BEARER_AUTH
  719|  1.54k|  if(authstatus->picked == CURLAUTH_BEARER) {
  ------------------
  |  |  844|  1.54k|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (719:6): [True: 3, False: 1.53k]
  ------------------
  720|       |    /* Bearer */
  721|      3|    if(!proxy && Curl_creds_has_oauth_bearer(data->state.creds) &&
  ------------------
  |  |   73|      5|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (73:43): [True: 1, False: 1]
  |  |  |  Branch (73:50): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (721:8): [True: 2, False: 1]
  ------------------
  722|      0|       !Curl_checkheaders(data, STRCONST("Authorization"))) {
  ------------------
  |  | 1292|      0|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (722:8): [True: 0, False: 0]
  ------------------
  723|      0|      auth = "Bearer";
  724|      0|      result = http_output_bearer(data);
  725|      0|      if(result)
  ------------------
  |  Branch (725:10): [True: 0, False: 0]
  ------------------
  726|      0|        return result;
  727|      0|    }
  728|       |
  729|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  730|       |       functions work that way */
  731|      3|    authstatus->done = TRUE;
  ------------------
  |  | 1055|      3|#define TRUE true
  ------------------
  732|      3|  }
  733|  1.54k|#endif
  734|       |
  735|  1.54k|  if(auth) {
  ------------------
  |  Branch (735:6): [True: 861, False: 681]
  ------------------
  736|    861|#ifndef CURL_DISABLE_PROXY
  737|    861|    if(proxy)
  ------------------
  |  Branch (737:8): [True: 243, False: 618]
  ------------------
  738|    243|      data->info.proxyauthpicked = authstatus->picked;
  739|    618|    else
  740|    618|      data->info.httpauthpicked = authstatus->picked;
  741|    861|    infof(data, "%s auth using %s with user '%s'",
  ------------------
  |  |  143|    861|  do {                               \
  |  |  144|    861|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    861|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 861, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 861]
  |  |  |  |  ------------------
  |  |  |  |  320|    861|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    861|      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|    861|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 861]
  |  |  ------------------
  ------------------
  742|    861|          proxy ? "Proxy" : "Server", auth,
  743|    861|          proxy ? (conn->http_proxy.creds ?
  744|    861|                   conn->http_proxy.creds->user : "") :
  745|    861|          (data->state.creds ?
  746|    861|           data->state.creds->user : ""));
  747|       |#else
  748|       |    (void)proxy;
  749|       |    infof(data, "Server auth using %s with user '%s'",
  750|       |          auth, data->state.creds ?
  751|       |          data->state.creds->user : "");
  752|       |#endif
  753|    861|    authstatus->multipass = !authstatus->done;
  754|    861|  }
  755|    681|  else {
  756|    681|    authstatus->multipass = FALSE;
  ------------------
  |  | 1058|    681|#define FALSE false
  ------------------
  757|    681|    if(proxy)
  ------------------
  |  Branch (757:8): [True: 545, False: 136]
  ------------------
  758|    545|      data->info.proxyauthpicked = 0;
  759|    136|    else
  760|    136|      data->info.httpauthpicked = 0;
  761|    681|  }
  762|       |
  763|  1.54k|  return result;
  764|  1.54k|}
http.c:http_output_basic:
  255|    292|{
  256|    292|  size_t size = 0;
  257|    292|  char *authorization = NULL;
  258|    292|  char **p_hd;
  259|    292|  CURLcode result;
  260|    292|  struct Curl_creds *creds = NULL;
  261|    292|  char *out;
  262|       |
  263|       |  /* credentials are unique per transfer for HTTP, do not use the ones for the
  264|       |     connection */
  265|    292|  if(proxy) {
  ------------------
  |  Branch (265:6): [True: 242, False: 50]
  ------------------
  266|    242|#ifndef CURL_DISABLE_PROXY
  267|    242|    p_hd = &data->req.hd_proxy_auth;
  268|    242|    creds = conn->http_proxy.creds;
  269|       |#else
  270|       |    (void)conn;
  271|       |    return CURLE_NOT_BUILT_IN;
  272|       |#endif
  273|    242|  }
  274|     50|  else {
  275|     50|    p_hd = &data->req.hd_auth;
  276|     50|    creds = data->state.creds;
  277|     50|  }
  278|       |
  279|    292|  if(!creds) {
  ------------------
  |  Branch (279:6): [True: 0, False: 292]
  ------------------
  280|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      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|    292|  out = curl_maprintf("%s:%s", creds->user, creds->passwd);
  285|    292|  if(!out)
  ------------------
  |  Branch (285:6): [True: 0, False: 292]
  ------------------
  286|      0|    return CURLE_OUT_OF_MEMORY;
  287|       |
  288|    292|  result = curlx_base64_encode((uint8_t *)out, strlen(out),
  289|    292|                               &authorization, &size);
  290|    292|  if(result)
  ------------------
  |  Branch (290:6): [True: 0, False: 292]
  ------------------
  291|      0|    goto fail;
  292|       |
  293|    292|  if(!authorization) {
  ------------------
  |  Branch (293:6): [True: 0, False: 292]
  ------------------
  294|      0|    result = CURLE_REMOTE_ACCESS_DENIED;
  295|      0|    goto fail;
  296|      0|  }
  297|       |
  298|    292|  curlx_free(*p_hd);
  ------------------
  |  | 1483|    292|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  299|    292|  *p_hd = curl_maprintf("%sAuthorization: Basic %s\r\n",
  300|    292|                        proxy ? "Proxy-" : "",
  ------------------
  |  Branch (300:25): [True: 242, False: 50]
  ------------------
  301|    292|                        authorization);
  302|    292|  curlx_free(authorization);
  ------------------
  |  | 1483|    292|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  303|    292|  if(!*p_hd) {
  ------------------
  |  Branch (303:6): [True: 0, False: 292]
  ------------------
  304|      0|    result = CURLE_OUT_OF_MEMORY;
  305|      0|    goto fail;
  306|      0|  }
  307|       |
  308|    292|fail:
  309|    292|  curlx_free(out);
  ------------------
  |  | 1483|    292|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  310|    292|  return result;
  311|    292|}

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

canon_path:
  689|    577|{
  690|    577|  CURLcode result = CURLE_OK;
  691|       |
  692|    577|  struct Curl_str original_path;
  693|       |
  694|    577|  curlx_str_assign(&original_path, q, len);
  695|       |
  696|       |  /* Normalized path will be either the same or shorter than the original
  697|       |   * path, plus trailing slash */
  698|       |
  699|    577|  if(do_uri_encode)
  ------------------
  |  Branch (699:6): [True: 571, False: 6]
  ------------------
  700|    571|    result = uri_encode_path(&original_path, new_path);
  701|      6|  else
  702|      6|    result = curlx_dyn_addn(new_path, q, len);
  703|       |
  704|    577|  if(!result) {
  ------------------
  |  Branch (704:6): [True: 567, False: 10]
  ------------------
  705|    567|    if(curlx_dyn_len(new_path) == 0)
  ------------------
  |  Branch (705:8): [True: 0, False: 567]
  ------------------
  706|      0|      result = curlx_dyn_add(new_path, "/");
  707|    567|  }
  708|       |
  709|    577|  return result;
  710|    577|}
canon_query:
  715|    592|{
  716|    592|  CURLcode result = CURLE_OK;
  717|       |
  718|    592|  struct dynbuf query_array[MAX_QUERY_COMPONENTS];
  719|    592|  struct pair encoded_query_array[MAX_QUERY_COMPONENTS];
  720|    592|  size_t num_query_components;
  721|    592|  size_t counted_query_components = 0;
  722|    592|  size_t index;
  723|       |
  724|    592|  if(!query)
  ------------------
  |  Branch (724:6): [True: 182, False: 410]
  ------------------
  725|    182|    return result;
  726|       |
  727|    410|  result = split_to_dyn_array(query, &query_array[0], &num_query_components);
  728|    410|  if(result) {
  ------------------
  |  Branch (728:6): [True: 3, False: 407]
  ------------------
  729|      3|    goto fail;
  730|      3|  }
  731|       |
  732|       |  /* Create list of pairs, each pair containing an encoded query
  733|       |   * component */
  734|       |
  735|  5.22k|  for(index = 0; index < num_query_components; index++) {
  ------------------
  |  Branch (735:18): [True: 4.82k, False: 407]
  ------------------
  736|  4.82k|    const char *in_key;
  737|  4.82k|    size_t in_key_len;
  738|  4.82k|    const char *offset;
  739|  4.82k|    size_t query_part_len = curlx_dyn_len(&query_array[index]);
  740|  4.82k|    const char *query_part = curlx_dyn_ptr(&query_array[index]);
  741|       |
  742|  4.82k|    in_key = query_part;
  743|       |
  744|  4.82k|    offset = strchr(query_part, '=');
  745|       |    /* If there is no equals, this key has no value */
  746|  4.82k|    if(!offset) {
  ------------------
  |  Branch (746:8): [True: 2.79k, False: 2.02k]
  ------------------
  747|  2.79k|      in_key_len = strlen(in_key);
  748|  2.79k|    }
  749|  2.02k|    else {
  750|  2.02k|      in_key_len = offset - in_key;
  751|  2.02k|    }
  752|       |
  753|  4.82k|    curlx_dyn_init(&encoded_query_array[index].key,
  754|  4.82k|      (query_part_len * 3) + 1);
  755|  4.82k|    curlx_dyn_init(&encoded_query_array[index].value,
  756|  4.82k|      (query_part_len * 3) + 1);
  757|  4.82k|    counted_query_components++;
  758|       |
  759|       |    /* Decode/encode the key */
  760|  4.82k|    result = normalize_query(in_key, in_key_len,
  761|  4.82k|                             &encoded_query_array[index].key);
  762|  4.82k|    if(result) {
  ------------------
  |  Branch (762:8): [True: 0, False: 4.82k]
  ------------------
  763|      0|      goto fail;
  764|      0|    }
  765|       |
  766|       |    /* Decode/encode the value if it exists */
  767|  4.82k|    if(offset && offset != (query_part + query_part_len - 1)) {
  ------------------
  |  Branch (767:8): [True: 2.02k, False: 2.79k]
  |  Branch (767:18): [True: 1.72k, False: 299]
  ------------------
  768|  1.72k|      size_t in_value_len;
  769|  1.72k|      const char *in_value = offset + 1;
  770|  1.72k|      in_value_len = query_part + query_part_len - (offset + 1);
  771|  1.72k|      result = normalize_query(in_value, in_value_len,
  772|  1.72k|                               &encoded_query_array[index].value);
  773|  1.72k|      if(result) {
  ------------------
  |  Branch (773:10): [True: 0, False: 1.72k]
  ------------------
  774|      0|        goto fail;
  775|      0|      }
  776|  1.72k|    }
  777|  3.09k|    else {
  778|       |      /* If there is no value, the value is an empty string */
  779|  3.09k|      curlx_dyn_init(&encoded_query_array[index].value, 2);
  780|  3.09k|      result = curlx_dyn_addn(&encoded_query_array[index].value, "", 1);
  781|  3.09k|    }
  782|       |
  783|  4.82k|    if(result) {
  ------------------
  |  Branch (783:8): [True: 0, False: 4.82k]
  ------------------
  784|      0|      goto fail;
  785|      0|    }
  786|  4.82k|  }
  787|       |
  788|       |  /* Sort the encoded query components by key and value */
  789|    407|  qsort(&encoded_query_array, num_query_components,
  790|    407|        sizeof(struct pair), compare_func);
  791|       |
  792|       |  /* Append the query components together to make a full query string */
  793|  5.11k|  for(index = 0; index < num_query_components; index++) {
  ------------------
  |  Branch (793:18): [True: 4.71k, False: 395]
  ------------------
  794|       |
  795|  4.71k|    if(index)
  ------------------
  |  Branch (795:8): [True: 4.31k, False: 404]
  ------------------
  796|  4.31k|      result = curlx_dyn_addn(dq, "&", 1);
  797|  4.71k|    if(!result) {
  ------------------
  |  Branch (797:8): [True: 4.71k, False: 1]
  ------------------
  798|  4.71k|      const char *key_ptr = curlx_dyn_ptr(&encoded_query_array[index].key);
  799|  4.71k|      const char *value_ptr = curlx_dyn_ptr(&encoded_query_array[index].value);
  800|  4.71k|      size_t vlen = curlx_dyn_len(&encoded_query_array[index].value);
  801|  4.71k|      if(value_ptr && vlen) {
  ------------------
  |  Branch (801:10): [True: 4.71k, False: 0]
  |  Branch (801:23): [True: 4.71k, False: 0]
  ------------------
  802|  4.71k|        result = curlx_dyn_addf(dq, "%s=%s", key_ptr, value_ptr);
  803|  4.71k|      }
  804|      0|      else {
  805|       |        /* Empty value is always encoded to key= */
  806|      0|        result = curlx_dyn_addf(dq, "%s=", key_ptr);
  807|      0|      }
  808|  4.71k|    }
  809|  4.71k|    if(result)
  ------------------
  |  Branch (809:8): [True: 12, False: 4.70k]
  ------------------
  810|     12|      break;
  811|  4.71k|  }
  812|       |
  813|    410|fail:
  814|    410|  if(counted_query_components)
  ------------------
  |  Branch (814:6): [True: 404, False: 6]
  ------------------
  815|       |    /* the encoded_query_array might not be initialized yet */
  816|    404|    pair_array_free(&encoded_query_array[0], counted_query_components);
  817|    410|  dyn_array_free(&query_array[0], num_query_components);
  818|    410|  return result;
  819|    407|}
Curl_output_aws_sigv4:
  822|    601|{
  823|    601|  CURLcode result = CURLE_OUT_OF_MEMORY;
  824|    601|  struct connectdata *conn = data->conn;
  825|    601|  const char *line;
  826|    601|  struct Curl_str provider0;
  827|    601|  struct Curl_str provider1;
  828|    601|  struct Curl_str region = { NULL, 0 };
  829|    601|  struct Curl_str service = { NULL, 0 };
  830|    601|  const char *hostname = conn->origin->hostname;
  831|    601|  time_t clock;
  832|    601|  struct tm tm;
  833|    601|  char timestamp[TIMESTAMP_SIZE];
  834|    601|  char date[9];
  835|    601|  struct dynbuf canonical_headers;
  836|    601|  struct dynbuf signed_headers;
  837|    601|  struct dynbuf canonical_query;
  838|    601|  struct dynbuf canonical_path;
  839|    601|  char *date_header = NULL;
  840|    601|  Curl_HttpReq httpreq;
  841|    601|  const char *method = NULL;
  842|    601|  const char *payload_hash = NULL;
  843|    601|  size_t payload_hash_len = 0;
  844|    601|  unsigned char sha_hash[CURL_SHA256_DIGEST_LENGTH];
  845|    601|  char sha_hex[SHA256_HEX_LENGTH];
  846|    601|  char content_sha256_hdr[CONTENT_SHA256_HDR_LEN + 2] = ""; /* add \r\n */
  847|    601|  char *canonical_request = NULL;
  848|    601|  char *request_type = NULL;
  849|    601|  char *credential_scope = NULL;
  850|    601|  char *str_to_sign = NULL;
  851|    601|  const char *user = Curl_creds_user(data->state.creds);
  ------------------
  |  |   75|    601|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 546, False: 55]
  |  |  ------------------
  ------------------
  852|    601|  const char *passwd = Curl_creds_passwd(data->state.creds);
  ------------------
  |  |   76|    601|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 546, False: 55]
  |  |  ------------------
  ------------------
  853|    601|  char *secret = NULL;
  854|    601|  unsigned char sign0[CURL_SHA256_DIGEST_LENGTH] = { 0 };
  855|    601|  unsigned char sign1[CURL_SHA256_DIGEST_LENGTH] = { 0 };
  856|    601|  char *auth_headers = NULL;
  857|       |
  858|    601|  if(data->set.path_as_is) {
  ------------------
  |  Branch (858:6): [True: 1, False: 600]
  ------------------
  859|      1|    failf(data, "Cannot use sigv4 authentication with path-as-is flag");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  860|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  861|      1|  }
  862|       |
  863|    600|  if(Curl_checkheaders(data, STRCONST("Authorization"))) {
  ------------------
  |  | 1292|    600|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (863:6): [True: 0, False: 600]
  ------------------
  864|       |    /* Authorization already present, Bailing out */
  865|      0|    return CURLE_OK;
  866|      0|  }
  867|       |
  868|       |  /* we init those buffers here, so goto fail will free initialized dynbuf */
  869|    600|  curlx_dyn_init(&canonical_headers, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|    600|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  870|    600|  curlx_dyn_init(&canonical_query, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|    600|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  871|    600|  curlx_dyn_init(&signed_headers, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|    600|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  872|    600|  curlx_dyn_init(&canonical_path, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|    600|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  873|       |
  874|       |  /*
  875|       |   * Parameters parsing
  876|       |   * Google and Outscale use the same OSC or GOOG,
  877|       |   * but Amazon uses AWS and AMZ for header arguments.
  878|       |   * AWS is the default because most of non-amazon providers
  879|       |   * are still using aws:amz as a prefix.
  880|       |   */
  881|    600|  line = data->set.str[STRING_AWS_SIGV4];
  882|    600|  if(!line || !*line)
  ------------------
  |  Branch (882:6): [True: 429, False: 171]
  |  Branch (882:15): [True: 124, False: 47]
  ------------------
  883|    553|    line = "aws:amz";
  884|       |
  885|       |  /* provider0[:provider1[:region[:service]]]
  886|       |
  887|       |     No string can be longer than N bytes of non-whitespace
  888|       |  */
  889|    600|  if(curlx_str_until(&line, &provider0, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  284|    600|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (889:6): [True: 1, False: 599]
  ------------------
  890|      1|    failf(data, "first aws-sigv4 provider cannot be empty");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  891|      1|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  892|      1|    goto fail;
  893|      1|  }
  894|    599|  if(curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (894:6): [True: 8, False: 591]
  ------------------
  895|    591|     curlx_str_until(&line, &provider1, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  284|    591|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (895:6): [True: 1, False: 590]
  ------------------
  896|      9|    provider1 = provider0;
  897|      9|  }
  898|    590|  else if(curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (898:11): [True: 553, False: 37]
  ------------------
  899|     37|          curlx_str_until(&line, &region, MAX_SIGV4_LEN, ':') ||
  ------------------
  |  |  284|     37|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (899:11): [True: 1, False: 36]
  ------------------
  900|     36|          curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (900:11): [True: 1, False: 35]
  ------------------
  901|    555|          curlx_str_until(&line, &service, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  284|     35|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (901:11): [True: 0, False: 35]
  ------------------
  902|       |    /* nothing to do */
  903|    555|  }
  904|       |
  905|    599|  if(!curlx_strlen(&service)) {
  ------------------
  |  |   50|    599|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (905:6): [True: 564, False: 35]
  ------------------
  906|    564|    const char *p = hostname;
  907|    564|    if(curlx_str_until(&p, &service, MAX_SIGV4_LEN, '.') ||
  ------------------
  |  |  284|    564|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (907:8): [True: 1, False: 563]
  ------------------
  908|    563|       curlx_str_single(&p, '.')) {
  ------------------
  |  Branch (908:8): [True: 1, False: 562]
  ------------------
  909|      2|      failf(data, "aws-sigv4: service missing in parameters and hostname");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  910|      2|      result = CURLE_URL_MALFORMAT;
  911|      2|      goto fail;
  912|      2|    }
  913|       |
  914|    562|    infof(data, "aws_sigv4: picked service %.*s from host",
  ------------------
  |  |  143|    562|  do {                               \
  |  |  144|    562|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    562|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 562, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 562]
  |  |  |  |  ------------------
  |  |  |  |  320|    562|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    562|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    562|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 562]
  |  |  ------------------
  ------------------
  915|    562|          (int)curlx_strlen(&service), curlx_str(&service));
  916|       |
  917|    562|    if(!curlx_strlen(&region)) {
  ------------------
  |  |   50|    562|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (917:8): [True: 561, False: 1]
  ------------------
  918|    561|      if(curlx_str_until(&p, &region, MAX_SIGV4_LEN, '.') ||
  ------------------
  |  |  284|    561|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (918:10): [True: 4, False: 557]
  ------------------
  919|    557|         curlx_str_single(&p, '.')) {
  ------------------
  |  Branch (919:10): [True: 1, False: 556]
  ------------------
  920|      5|        failf(data, "aws-sigv4: region missing in parameters and hostname");
  ------------------
  |  |   62|      5|#define failf Curl_failf
  ------------------
  921|      5|        result = CURLE_URL_MALFORMAT;
  922|      5|        goto fail;
  923|      5|      }
  924|    556|      infof(data, "aws_sigv4: picked region %.*s from host",
  ------------------
  |  |  143|    556|  do {                               \
  |  |  144|    556|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    556|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 556, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 556]
  |  |  |  |  ------------------
  |  |  |  |  320|    556|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    556|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    556|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 556]
  |  |  ------------------
  ------------------
  925|    556|            (int)curlx_strlen(&region), curlx_str(&region));
  926|    556|    }
  927|    562|  }
  928|       |
  929|    592|  Curl_http_method(data, &method, &httpreq);
  930|       |
  931|    592|  payload_hash =
  932|    592|    parse_content_sha_hdr(data, curlx_str(&provider1),
  ------------------
  |  |   49|    592|#define curlx_str(x)    ((x)->str)
  ------------------
  933|    592|                          curlx_strlen(&provider1), &payload_hash_len);
  ------------------
  |  |   50|    592|#define curlx_strlen(x) ((x)->len)
  ------------------
  934|       |
  935|    592|  if(!payload_hash) {
  ------------------
  |  Branch (935:6): [True: 592, False: 0]
  ------------------
  936|       |    /* AWS S3 requires a x-amz-content-sha256 header, and supports special
  937|       |     * values like UNSIGNED-PAYLOAD */
  938|    592|    bool sign_as_s3 = curlx_str_casecompare(&provider0, "aws") &&
  ------------------
  |  Branch (938:23): [True: 547, False: 45]
  ------------------
  939|    547|                      curlx_str_casecompare(&service, "s3");
  ------------------
  |  Branch (939:23): [True: 4, False: 543]
  ------------------
  940|       |
  941|    592|    if(sign_as_s3)
  ------------------
  |  Branch (941:8): [True: 4, False: 588]
  ------------------
  942|      4|      result = calc_s3_payload_hash(data, httpreq, curlx_str(&provider1),
  ------------------
  |  |   49|      4|#define curlx_str(x)    ((x)->str)
  ------------------
  943|      4|                                    curlx_strlen(&provider1), sha_hash,
  ------------------
  |  |   50|      4|#define curlx_strlen(x) ((x)->len)
  ------------------
  944|      4|                                    sha_hex, content_sha256_hdr);
  945|    588|    else
  946|    588|      result = calc_payload_hash(data, sha_hash, sha_hex);
  947|    592|    if(result)
  ------------------
  |  Branch (947:8): [True: 0, False: 592]
  ------------------
  948|      0|      goto fail;
  949|       |
  950|    592|    payload_hash = sha_hex;
  951|       |    /* may be shorter than SHA256_HEX_LENGTH, like S3_UNSIGNED_PAYLOAD */
  952|    592|    payload_hash_len = strlen(sha_hex);
  953|    592|  }
  954|       |
  955|    592|#ifdef DEBUGBUILD
  956|    592|  {
  957|    592|    char *force_timestamp = getenv("CURL_FORCETIME");
  958|    592|    if(force_timestamp)
  ------------------
  |  Branch (958:8): [True: 0, False: 592]
  ------------------
  959|      0|      clock = 0;
  960|    592|    else
  961|    592|      clock = time(NULL);
  962|    592|  }
  963|       |#else
  964|       |  clock = time(NULL);
  965|       |#endif
  966|    592|  result = curlx_gmtime(clock, &tm);
  967|    592|  if(result) {
  ------------------
  |  Branch (967:6): [True: 0, False: 592]
  ------------------
  968|      0|    goto fail;
  969|      0|  }
  970|    592|  if(!strftime(timestamp, sizeof(timestamp), "%Y%m%dT%H%M%SZ", &tm)) {
  ------------------
  |  Branch (970:6): [True: 0, False: 592]
  ------------------
  971|      0|    result = CURLE_OUT_OF_MEMORY;
  972|      0|    goto fail;
  973|      0|  }
  974|       |
  975|    592|  result = make_headers(data, hostname, timestamp,
  976|    592|                        curlx_str(&provider1), curlx_strlen(&provider1),
  ------------------
  |  |   49|    592|#define curlx_str(x)    ((x)->str)
  ------------------
                                      curlx_str(&provider1), curlx_strlen(&provider1),
  ------------------
  |  |   50|    592|#define curlx_strlen(x) ((x)->len)
  ------------------
  977|    592|                        &date_header, content_sha256_hdr,
  978|    592|                        &canonical_headers, &signed_headers);
  979|    592|  if(result)
  ------------------
  |  Branch (979:6): [True: 0, False: 592]
  ------------------
  980|      0|    goto fail;
  981|       |
  982|    592|  if(*content_sha256_hdr) {
  ------------------
  |  Branch (982:6): [True: 4, False: 588]
  ------------------
  983|       |    /* make_headers() needed this without the \r\n for canonicalization */
  984|      4|    size_t hdrlen = strlen(content_sha256_hdr);
  985|      4|    DEBUGASSERT(hdrlen + 3 < sizeof(content_sha256_hdr));
  ------------------
  |  | 1081|      4|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (985:5): [True: 0, False: 4]
  |  Branch (985:5): [True: 4, False: 0]
  ------------------
  986|      4|    memcpy(content_sha256_hdr + hdrlen, "\r\n", 3);
  987|      4|  }
  988|       |
  989|    592|  memcpy(date, timestamp, sizeof(date));
  990|    592|  date[sizeof(date) - 1] = 0;
  991|       |
  992|    592|  result = canon_query(data->state.up.query, &canonical_query);
  993|    592|  if(result)
  ------------------
  |  Branch (993:6): [True: 15, False: 577]
  ------------------
  994|     15|    goto fail;
  995|       |
  996|    577|  result = canon_path(data->state.up.path, strlen(data->state.up.path),
  997|    577|                      &canonical_path,
  998|    577|                      should_urlencode(&service));
  999|    577|  if(result)
  ------------------
  |  Branch (999:6): [True: 10, False: 567]
  ------------------
 1000|     10|    goto fail;
 1001|    567|  result = CURLE_OUT_OF_MEMORY;
 1002|       |
 1003|    567|  canonical_request =
 1004|    567|    curl_maprintf("%s\n" /* HTTPRequestMethod */
 1005|    567|                  "%s\n" /* CanonicalURI */
 1006|    567|                  "%s\n" /* CanonicalQueryString */
 1007|    567|                  "%s\n" /* CanonicalHeaders */
 1008|    567|                  "%s\n" /* SignedHeaders */
 1009|    567|                  "%.*s",  /* HashedRequestPayload in hex */
 1010|    567|                  method,
 1011|    567|                  curlx_dyn_ptr(&canonical_path),
 1012|    567|                  curlx_dyn_ptr(&canonical_query) ?
  ------------------
  |  Branch (1012:19): [True: 388, False: 179]
  ------------------
 1013|    388|                  curlx_dyn_ptr(&canonical_query) : "",
 1014|    567|                  curlx_dyn_ptr(&canonical_headers),
 1015|    567|                  curlx_dyn_ptr(&signed_headers),
 1016|    567|                  (int)payload_hash_len, payload_hash);
 1017|    567|  if(!canonical_request)
  ------------------
  |  Branch (1017:6): [True: 0, False: 567]
  ------------------
 1018|      0|    goto fail;
 1019|       |
 1020|    567|  infof(data, "aws_sigv4: Canonical request (enclosed in []) - [%s]",
  ------------------
  |  |  143|    567|  do {                               \
  |  |  144|    567|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    567|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 567, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 567]
  |  |  |  |  ------------------
  |  |  |  |  320|    567|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    567|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    567|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 567]
  |  |  ------------------
  ------------------
 1021|    567|        canonical_request);
 1022|       |
 1023|    567|  request_type = curl_maprintf("%.*s4_request",
 1024|    567|                               (int)curlx_strlen(&provider0),
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1025|    567|                               curlx_str(&provider0));
  ------------------
  |  |   49|    567|#define curlx_str(x)    ((x)->str)
  ------------------
 1026|    567|  if(!request_type)
  ------------------
  |  Branch (1026:6): [True: 0, False: 567]
  ------------------
 1027|      0|    goto fail;
 1028|       |
 1029|       |  /* provider0 is lowercased *after* curl_maprintf() so that the buffer
 1030|       |     can be written to */
 1031|    567|  Curl_strntolower(request_type, request_type, curlx_strlen(&provider0));
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1032|       |
 1033|    567|  credential_scope = curl_maprintf("%s/%.*s/%.*s/%s", date,
 1034|    567|                                   (int)curlx_strlen(&region),
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1035|    567|                                   curlx_str(&region),
  ------------------
  |  |   49|    567|#define curlx_str(x)    ((x)->str)
  ------------------
 1036|    567|                                   (int)curlx_strlen(&service),
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1037|    567|                                   curlx_str(&service),
  ------------------
  |  |   49|    567|#define curlx_str(x)    ((x)->str)
  ------------------
 1038|    567|                                   request_type);
 1039|    567|  if(!credential_scope)
  ------------------
  |  Branch (1039:6): [True: 0, False: 567]
  ------------------
 1040|      0|    goto fail;
 1041|       |
 1042|    567|  if(Curl_sha256it(sha_hash, (unsigned char *)canonical_request,
  ------------------
  |  Branch (1042:6): [True: 0, False: 567]
  ------------------
 1043|    567|                   strlen(canonical_request)))
 1044|      0|    goto fail;
 1045|       |
 1046|    567|  sha256_to_hex(sha_hex, sha_hash);
 1047|       |
 1048|       |  /*
 1049|       |   * Google allows using RSA key instead of HMAC, so this code might change
 1050|       |   * in the future. For now we only support HMAC.
 1051|       |   */
 1052|    567|  str_to_sign = curl_maprintf("%.*s4-HMAC-SHA256\n" /* Algorithm */
 1053|    567|                              "%s\n" /* RequestDateTime */
 1054|    567|                              "%s\n" /* CredentialScope */
 1055|    567|                              "%s",  /* HashedCanonicalRequest in hex */
 1056|    567|                              (int)curlx_strlen(&provider0),
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1057|    567|                              curlx_str(&provider0),
  ------------------
  |  |   49|    567|#define curlx_str(x)    ((x)->str)
  ------------------
 1058|    567|                              timestamp,
 1059|    567|                              credential_scope,
 1060|    567|                              sha_hex);
 1061|    567|  if(!str_to_sign)
  ------------------
  |  Branch (1061:6): [True: 0, False: 567]
  ------------------
 1062|      0|    goto fail;
 1063|       |
 1064|       |  /* make provider0 part done uppercase */
 1065|    567|  Curl_strntoupper(str_to_sign, curlx_str(&provider0),
  ------------------
  |  |   49|    567|#define curlx_str(x)    ((x)->str)
  ------------------
 1066|    567|                   curlx_strlen(&provider0));
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1067|       |
 1068|    567|  infof(data, "aws_sigv4: String to sign (enclosed in []) - [%s]",
  ------------------
  |  |  143|    567|  do {                               \
  |  |  144|    567|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    567|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 567, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 567]
  |  |  |  |  ------------------
  |  |  |  |  320|    567|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    567|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    567|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 567]
  |  |  ------------------
  ------------------
 1069|    567|        str_to_sign);
 1070|       |
 1071|    567|  secret = curl_maprintf("%.*s4%s", (int)curlx_strlen(&provider0),
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1072|    567|                         curlx_str(&provider0), passwd);
  ------------------
  |  |   49|    567|#define curlx_str(x)    ((x)->str)
  ------------------
 1073|    567|  if(!secret)
  ------------------
  |  Branch (1073:6): [True: 0, False: 567]
  ------------------
 1074|      0|    goto fail;
 1075|       |  /* make provider0 part done uppercase */
 1076|    567|  Curl_strntoupper(secret, curlx_str(&provider0), curlx_strlen(&provider0));
  ------------------
  |  |   49|    567|#define curlx_str(x)    ((x)->str)
  ------------------
                Curl_strntoupper(secret, curlx_str(&provider0), curlx_strlen(&provider0));
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1077|       |
 1078|    567|  HMAC_SHA256(secret, strlen(secret), date, strlen(date), sign0);
  ------------------
  |  |   42|    567|  do {                                               \
  |  |   43|    567|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|    567|                         (const unsigned char *)(k), \
  |  |   45|    567|                         kl,                         \
  |  |   46|    567|                         (const unsigned char *)(d), \
  |  |   47|    567|                         dl, o);                     \
  |  |   48|    567|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 567]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|    567|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 567]
  |  |  ------------------
  ------------------
 1079|    567|  HMAC_SHA256(sign0, sizeof(sign0),
  ------------------
  |  |   42|    567|  do {                                               \
  |  |   43|    567|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|    567|                         (const unsigned char *)(k), \
  |  |   45|    567|                         kl,                         \
  |  |   46|    567|                         (const unsigned char *)(d), \
  |  |   47|    567|                         dl, o);                     \
  |  |   48|    567|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 567]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|    567|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 567]
  |  |  ------------------
  ------------------
 1080|    567|              curlx_str(&region), curlx_strlen(&region), sign1);
 1081|    567|  HMAC_SHA256(sign1, sizeof(sign1),
  ------------------
  |  |   42|    567|  do {                                               \
  |  |   43|    567|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|    567|                         (const unsigned char *)(k), \
  |  |   45|    567|                         kl,                         \
  |  |   46|    567|                         (const unsigned char *)(d), \
  |  |   47|    567|                         dl, o);                     \
  |  |   48|    567|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 567]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|    567|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 567]
  |  |  ------------------
  ------------------
 1082|    567|              curlx_str(&service), curlx_strlen(&service), sign0);
 1083|    567|  HMAC_SHA256(sign0, sizeof(sign0), request_type, strlen(request_type), sign1);
  ------------------
  |  |   42|    567|  do {                                               \
  |  |   43|    567|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|    567|                         (const unsigned char *)(k), \
  |  |   45|    567|                         kl,                         \
  |  |   46|    567|                         (const unsigned char *)(d), \
  |  |   47|    567|                         dl, o);                     \
  |  |   48|    567|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 567]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|    567|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 567]
  |  |  ------------------
  ------------------
 1084|    567|  HMAC_SHA256(sign1, sizeof(sign1), str_to_sign, strlen(str_to_sign), sign0);
  ------------------
  |  |   42|    567|  do {                                               \
  |  |   43|    567|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|    567|                         (const unsigned char *)(k), \
  |  |   45|    567|                         kl,                         \
  |  |   46|    567|                         (const unsigned char *)(d), \
  |  |   47|    567|                         dl, o);                     \
  |  |   48|    567|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 567]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|    567|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 567]
  |  |  ------------------
  ------------------
 1085|       |
 1086|    567|  sha256_to_hex(sha_hex, sign0);
 1087|       |
 1088|    567|  infof(data, "aws_sigv4: Signature - %s", sha_hex);
  ------------------
  |  |  143|    567|  do {                               \
  |  |  144|    567|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    567|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 567, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 567]
  |  |  |  |  ------------------
  |  |  |  |  320|    567|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    567|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    567|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 567]
  |  |  ------------------
  ------------------
 1089|       |
 1090|    567|  auth_headers = curl_maprintf("Authorization: %.*s4-HMAC-SHA256 "
 1091|    567|                               "Credential=%s/%s, "
 1092|    567|                               "SignedHeaders=%s, "
 1093|    567|                               "Signature=%s\r\n"
 1094|       |                               /*
 1095|       |                                * date_header is added here, only if it was not
 1096|       |                                * user-specified (using CURLOPT_HTTPHEADER).
 1097|       |                                * date_header includes \r\n
 1098|       |                                */
 1099|    567|                               "%s"
 1100|    567|                               "%s", /* optional sha256 header includes \r\n */
 1101|    567|                               (int)curlx_strlen(&provider0),
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1102|    567|                               curlx_str(&provider0),
  ------------------
  |  |   49|    567|#define curlx_str(x)    ((x)->str)
  ------------------
 1103|    567|                               user,
 1104|    567|                               credential_scope,
 1105|    567|                               curlx_dyn_ptr(&signed_headers),
 1106|    567|                               sha_hex,
 1107|    567|                               date_header ? date_header : "",
  ------------------
  |  Branch (1107:32): [True: 567, False: 0]
  ------------------
 1108|    567|                               content_sha256_hdr);
 1109|    567|  if(!auth_headers) {
  ------------------
  |  Branch (1109:6): [True: 0, False: 567]
  ------------------
 1110|      0|    goto fail;
 1111|      0|  }
 1112|       |  /* provider 0 uppercase */
 1113|    567|  Curl_strntoupper(&auth_headers[sizeof("Authorization: ") - 1],
 1114|    567|                   curlx_str(&provider0), curlx_strlen(&provider0));
  ------------------
  |  |   49|    567|#define curlx_str(x)    ((x)->str)
  ------------------
                                 curlx_str(&provider0), curlx_strlen(&provider0));
  ------------------
  |  |   50|    567|#define curlx_strlen(x) ((x)->len)
  ------------------
 1115|       |
 1116|    567|  curlx_free(data->req.hd_auth);
  ------------------
  |  | 1483|    567|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1117|    567|  data->req.hd_auth = auth_headers;
 1118|    567|  data->state.authhost.done = TRUE;
  ------------------
  |  | 1055|    567|#define TRUE true
  ------------------
 1119|    567|  result = CURLE_OK;
 1120|       |
 1121|    600|fail:
 1122|    600|  curlx_dyn_free(&canonical_query);
 1123|    600|  curlx_dyn_free(&canonical_path);
 1124|    600|  curlx_dyn_free(&canonical_headers);
 1125|    600|  curlx_dyn_free(&signed_headers);
 1126|    600|  curlx_free(canonical_request);
  ------------------
  |  | 1483|    600|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1127|    600|  curlx_free(request_type);
  ------------------
  |  | 1483|    600|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1128|    600|  curlx_free(credential_scope);
  ------------------
  |  | 1483|    600|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1129|    600|  curlx_free(str_to_sign);
  ------------------
  |  | 1483|    600|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1130|    600|  curlx_free(secret);
  ------------------
  |  | 1483|    600|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1131|    600|  curlx_free(date_header);
  ------------------
  |  | 1483|    600|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1132|    600|  return result;
 1133|    567|}
http_aws_sigv4.c:uri_encode_path:
  206|    571|{
  207|    571|  const char *p = curlx_str(original_path);
  ------------------
  |  |   49|    571|#define curlx_str(x)    ((x)->str)
  ------------------
  208|    571|  size_t i;
  209|       |
  210|   906k|  for(i = 0; i < curlx_strlen(original_path); i++) {
  ------------------
  |  |   50|   906k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (210:14): [True: 905k, False: 561]
  ------------------
  211|       |    /* Do not encode slashes or unreserved chars from RFC 3986 */
  212|   905k|    CURLcode result = CURLE_OK;
  213|   905k|    unsigned char c = p[i];
  214|   905k|    if(is_reserved_char(c) || c == '/')
  ------------------
  |  Branch (214:8): [True: 460k, False: 444k]
  |  Branch (214:31): [True: 20.9k, False: 423k]
  ------------------
  215|   481k|      result = curlx_dyn_addn(new_path, &c, 1);
  216|   423k|    else
  217|   423k|      result = curlx_dyn_addf(new_path, "%%%02X", c);
  218|   905k|    if(result)
  ------------------
  |  Branch (218:8): [True: 10, False: 905k]
  ------------------
  219|     10|      return result;
  220|   905k|  }
  221|       |
  222|    561|  return CURLE_OK;
  223|    571|}
http_aws_sigv4.c:is_reserved_char:
  200|  1.88M|{
  201|  1.88M|  return (ISALNUM(c) || ISURLPUNTCS(c));
  ------------------
  |  |   41|  3.77M|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|  3.77M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 564k, False: 1.32M]
  |  |  |  |  |  Branch (44:38): [True: 246k, False: 317k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  3.53M|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 85.8k, False: 1.55M]
  |  |  |  |  |  Branch (43:38): [True: 80.9k, False: 4.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  1.56M|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 231k, False: 1.33M]
  |  |  |  |  |  Branch (42:38): [True: 221k, False: 10.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                return (ISALNUM(c) || ISURLPUNTCS(c));
  ------------------
  |  |   48|  1.34M|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 2.92k, False: 1.33M]
  |  |  |  Branch (48:20): [True: 80.8k, False: 1.25M]
  |  |  |  Branch (48:36): [True: 3.08k, False: 1.25M]
  |  |  |  Branch (48:52): [True: 4.42k, False: 1.25M]
  |  |  ------------------
  ------------------
  202|  1.88M|}
http_aws_sigv4.c:split_to_dyn_array:
  153|    410|{
  154|    410|  CURLcode result = CURLE_OK;
  155|    410|  size_t len = strlen(source);
  156|    410|  size_t pos;         /* Position in result buffer */
  157|    410|  size_t start = 0;   /* Start of current segment */
  158|    410|  size_t segment_length = 0;
  159|    410|  size_t index = 0;
  160|    410|  size_t num_splits = 0;
  161|       |
  162|       |  /* Split source_ptr on SPLIT_BY and store the segment offsets and length in
  163|       |   * array */
  164|  1.06M|  for(pos = 0; pos < len; pos++) {
  ------------------
  |  Branch (164:16): [True: 1.06M, False: 408]
  ------------------
  165|  1.06M|    if(source[pos] == SPLIT_BY) {
  ------------------
  |  |  148|  1.06M|#define SPLIT_BY '&'
  ------------------
  |  Branch (165:8): [True: 5.61k, False: 1.05M]
  ------------------
  166|  5.61k|      if(segment_length) {
  ------------------
  |  Branch (166:10): [True: 4.82k, False: 795]
  ------------------
  167|  4.82k|        curlx_dyn_init(&db[index], segment_length + 1);
  168|  4.82k|        result = curlx_dyn_addn(&db[index], &source[start], segment_length);
  169|  4.82k|        if(result)
  ------------------
  |  Branch (169:12): [True: 0, False: 4.82k]
  ------------------
  170|      0|          goto fail;
  171|       |
  172|  4.82k|        segment_length = 0;
  173|  4.82k|        index++;
  174|  4.82k|        if(++num_splits == MAX_QUERY_COMPONENTS) {
  ------------------
  |  |   58|  4.82k|#define MAX_QUERY_COMPONENTS 128
  ------------------
  |  Branch (174:12): [True: 2, False: 4.81k]
  ------------------
  175|      2|          result = CURLE_TOO_LARGE;
  176|      2|          goto fail;
  177|      2|        }
  178|  4.82k|      }
  179|  5.61k|      start = pos + 1;
  180|  5.61k|    }
  181|  1.05M|    else {
  182|  1.05M|      segment_length++;
  183|  1.05M|    }
  184|  1.06M|  }
  185|       |
  186|    408|  if(segment_length) {
  ------------------
  |  Branch (186:6): [True: 385, False: 23]
  ------------------
  187|    385|    curlx_dyn_init(&db[index], segment_length + 1);
  188|    385|    result = curlx_dyn_addn(&db[index], &source[start], segment_length);
  189|    385|    if(!result) {
  ------------------
  |  Branch (189:8): [True: 385, False: 0]
  ------------------
  190|    385|      if(++num_splits == MAX_QUERY_COMPONENTS)
  ------------------
  |  |   58|    385|#define MAX_QUERY_COMPONENTS 128
  ------------------
  |  Branch (190:10): [True: 1, False: 384]
  ------------------
  191|      1|        result = CURLE_TOO_LARGE;
  192|    385|    }
  193|    385|  }
  194|    410|fail:
  195|    410|  *num_splits_out = num_splits;
  196|    410|  return result;
  197|    408|}
http_aws_sigv4.c:normalize_query:
  230|  6.55k|{
  231|  6.55k|  CURLcode result = CURLE_OK;
  232|       |
  233|   990k|  while(len && !result) {
  ------------------
  |  Branch (233:9): [True: 984k, False: 6.55k]
  |  Branch (233:16): [True: 984k, False: 0]
  ------------------
  234|   984k|    unsigned char in = (unsigned char)*string;
  235|   984k|    if(('%' == in) && (len > 2) &&
  ------------------
  |  Branch (235:8): [True: 259k, False: 724k]
  |  Branch (235:23): [True: 257k, False: 1.79k]
  ------------------
  236|   257k|       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  1.24M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|   515k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 20.0k, False: 237k]
  |  |  |  |  |  Branch (44:38): [True: 7.68k, False: 12.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|   508k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 8.57k, False: 241k]
  |  |  |  |  |  Branch (27:43): [True: 2.97k, False: 5.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|   247k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 8.88k, False: 238k]
  |  |  |  |  |  Branch (28:43): [True: 2.68k, False: 6.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                     ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  13.3k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  26.6k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 7.72k, False: 5.62k]
  |  |  |  |  |  Branch (44:38): [True: 3.46k, False: 4.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  23.2k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 1.66k, False: 8.21k]
  |  |  |  |  |  Branch (27:43): [True: 812, False: 855]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  9.06k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 3.42k, False: 5.64k]
  |  |  |  |  |  Branch (28:43): [True: 2.14k, False: 1.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  237|       |      /* this is two hexadecimal digits following a '%' */
  238|  6.42k|      in = (unsigned char)((curlx_hexval(string[1]) << 4) |
  ------------------
  |  |  112|  6.42k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  239|  6.42k|                           curlx_hexval(string[2]));
  ------------------
  |  |  112|  6.42k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  240|  6.42k|      string += 3;
  241|  6.42k|      len -= 3;
  242|  6.42k|      if(in == '+') {
  ------------------
  |  Branch (242:10): [True: 149, False: 6.27k]
  ------------------
  243|       |        /* decodes to plus, so leave this encoded */
  244|    149|        result = curlx_dyn_addn(db, "%2B", 3);
  245|    149|        continue;
  246|    149|      }
  247|  6.42k|    }
  248|   978k|    else {
  249|   978k|      string++;
  250|   978k|      len--;
  251|   978k|    }
  252|       |
  253|   984k|    if(is_reserved_char(in))
  ------------------
  |  Branch (253:8): [True: 178k, False: 805k]
  ------------------
  254|       |      /* Escape unreserved chars from RFC 3986 */
  255|   178k|      result = curlx_dyn_addn(db, &in, 1);
  256|   805k|    else if(in == '+')
  ------------------
  |  Branch (256:13): [True: 1.78k, False: 803k]
  ------------------
  257|       |      /* Encode '+' as space */
  258|  1.78k|      result = curlx_dyn_add(db, "%20");
  259|   803k|    else
  260|   803k|      result = curlx_dyn_addf(db, "%%%02X", in);
  261|   984k|  }
  262|       |
  263|  6.55k|  return result;
  264|  6.55k|}
http_aws_sigv4.c:compare_func:
  647|  19.4k|{
  648|  19.4k|  const struct pair *aa = a;
  649|  19.4k|  const struct pair *bb = b;
  650|  19.4k|  const size_t aa_key_len = curlx_dyn_len(&aa->key);
  651|  19.4k|  const size_t bb_key_len = curlx_dyn_len(&bb->key);
  652|  19.4k|  const size_t aa_value_len = curlx_dyn_len(&aa->value);
  653|  19.4k|  const size_t bb_value_len = curlx_dyn_len(&bb->value);
  654|  19.4k|  int compare;
  655|       |
  656|       |  /* If one element is empty, the other is always sorted higher */
  657|       |
  658|       |  /* Compare keys */
  659|  19.4k|  if((aa_key_len == 0) && (bb_key_len == 0))
  ------------------
  |  Branch (659:6): [True: 2.80k, False: 16.6k]
  |  Branch (659:27): [True: 2.44k, False: 357]
  ------------------
  660|  2.44k|    return 0;
  661|  17.0k|  if(aa_key_len == 0)
  ------------------
  |  Branch (661:6): [True: 357, False: 16.6k]
  ------------------
  662|    357|    return -1;
  663|  16.6k|  if(bb_key_len == 0)
  ------------------
  |  Branch (663:6): [True: 2.38k, False: 14.2k]
  ------------------
  664|  2.38k|    return 1;
  665|  14.2k|  compare = strcmp(curlx_dyn_ptr(&aa->key), curlx_dyn_ptr(&bb->key));
  666|  14.2k|  if(compare) {
  ------------------
  |  Branch (666:6): [True: 11.5k, False: 2.77k]
  ------------------
  667|  11.5k|    return compare;
  668|  11.5k|  }
  669|       |
  670|       |  /* Compare values */
  671|  2.77k|  if((aa_value_len == 0) && (bb_value_len == 0))
  ------------------
  |  Branch (671:6): [True: 0, False: 2.77k]
  |  Branch (671:29): [True: 0, False: 0]
  ------------------
  672|      0|    return 0;
  673|  2.77k|  if(aa_value_len == 0)
  ------------------
  |  Branch (673:6): [True: 0, False: 2.77k]
  ------------------
  674|      0|    return -1;
  675|  2.77k|  if(bb_value_len == 0)
  ------------------
  |  Branch (675:6): [True: 0, False: 2.77k]
  ------------------
  676|      0|    return 1;
  677|  2.77k|  compare = strcmp(curlx_dyn_ptr(&aa->value), curlx_dyn_ptr(&bb->value));
  678|       |
  679|  2.77k|  return compare;
  680|  2.77k|}
http_aws_sigv4.c:pair_array_free:
  122|    404|{
  123|    404|  size_t index;
  124|       |
  125|  5.22k|  for(index = 0; index != num_elements; index++) {
  ------------------
  |  Branch (125:18): [True: 4.82k, False: 404]
  ------------------
  126|  4.82k|    curlx_dyn_free(&pair_array[index].key);
  127|  4.82k|    curlx_dyn_free(&pair_array[index].value);
  128|  4.82k|  }
  129|    404|}
http_aws_sigv4.c:dyn_array_free:
  135|    410|{
  136|    410|  size_t index;
  137|       |
  138|  5.61k|  for(index = 0; index < num_elements; index++)
  ------------------
  |  Branch (138:18): [True: 5.20k, False: 410]
  ------------------
  139|  5.20k|    curlx_dyn_free((&db[index]));
  140|    410|}
http_aws_sigv4.c:parse_content_sha_hdr:
  559|    592|{
  560|    592|  char key[CONTENT_SHA256_KEY_LEN];
  561|    592|  size_t key_len;
  562|    592|  const char *value;
  563|    592|  size_t len;
  564|       |
  565|    592|  key_len = curl_msnprintf(key, sizeof(key), "x-%.*s-content-sha256",
  566|    592|                           (int)plen, provider1);
  567|       |
  568|    592|  value = Curl_checkheaders(data, key, key_len);
  569|    592|  if(!value)
  ------------------
  |  Branch (569:6): [True: 592, False: 0]
  ------------------
  570|    592|    return NULL;
  571|       |
  572|      0|  value = strchr(value, ':');
  573|      0|  if(!value)
  ------------------
  |  Branch (573:6): [True: 0, False: 0]
  ------------------
  574|      0|    return NULL;
  575|      0|  ++value;
  576|       |
  577|      0|  curlx_str_passblanks(&value);
  578|       |
  579|      0|  len = strlen(value);
  580|      0|  while(len > 0 && ISBLANK(value[len - 1]))
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (580:9): [True: 0, False: 0]
  ------------------
  581|      0|    --len;
  582|       |
  583|      0|  *value_len = len;
  584|      0|  return value;
  585|      0|}
http_aws_sigv4.c:calc_s3_payload_hash:
  615|      4|{
  616|      4|  bool empty_method = (httpreq == HTTPREQ_GET || httpreq == HTTPREQ_HEAD);
  ------------------
  |  Branch (616:24): [True: 1, False: 3]
  |  Branch (616:50): [True: 1, False: 2]
  ------------------
  617|       |  /* The request method or filesize indicate no request payload */
  618|      4|  bool empty_payload = (empty_method || data->set.filesize == 0);
  ------------------
  |  Branch (618:25): [True: 2, False: 2]
  |  Branch (618:41): [True: 0, False: 2]
  ------------------
  619|       |  /* The POST payload is in memory */
  620|      4|  bool post_payload = (httpreq == HTTPREQ_POST && data->set.postfields);
  ------------------
  |  Branch (620:24): [True: 1, False: 3]
  |  Branch (620:51): [True: 1, False: 0]
  ------------------
  621|      4|  CURLcode result = CURLE_OUT_OF_MEMORY;
  622|       |
  623|      4|  if(empty_payload || post_payload) {
  ------------------
  |  Branch (623:6): [True: 2, False: 2]
  |  Branch (623:23): [True: 1, False: 1]
  ------------------
  624|       |    /* Calculate a real hash when we know the request payload */
  625|      3|    result = calc_payload_hash(data, sha_hash, sha_hex);
  626|      3|    if(result)
  ------------------
  |  Branch (626:8): [True: 0, False: 3]
  ------------------
  627|      0|      goto fail;
  628|      3|  }
  629|      1|  else {
  630|       |    /* Fall back to s3's UNSIGNED-PAYLOAD */
  631|      1|    size_t len = sizeof(S3_UNSIGNED_PAYLOAD) - 1;
  ------------------
  |  |  607|      1|#define S3_UNSIGNED_PAYLOAD "UNSIGNED-PAYLOAD"
  ------------------
  632|      1|    DEBUGASSERT(len < SHA256_HEX_LENGTH); /* 16 < 65 */
  ------------------
  |  | 1081|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (632:5): [True: 0, False: 1]
  |  Branch (632:5): [True: 1, False: 0]
  ------------------
  633|      1|    memcpy(sha_hex, S3_UNSIGNED_PAYLOAD, len);
  ------------------
  |  |  607|      1|#define S3_UNSIGNED_PAYLOAD "UNSIGNED-PAYLOAD"
  ------------------
  634|      1|    sha_hex[len] = 0;
  635|      1|  }
  636|       |
  637|       |  /* format the required content-sha256 header */
  638|      4|  curl_msnprintf(header, CONTENT_SHA256_HDR_LEN,
  ------------------
  |  |  552|      4|#define CONTENT_SHA256_HDR_LEN (CONTENT_SHA256_KEY_LEN + 2 + SHA256_HEX_LENGTH)
  |  |  ------------------
  |  |  |  |  550|      4|#define CONTENT_SHA256_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Content-Sha256"))
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      4|#define MAX_SIGV4_LEN    64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CONTENT_SHA256_HDR_LEN (CONTENT_SHA256_KEY_LEN + 2 + SHA256_HEX_LENGTH)
  |  |  ------------------
  |  |  |  |   56|      4|#define SHA256_HEX_LENGTH ((2 * CURL_SHA256_DIGEST_LENGTH) + 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|      4|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  639|      4|                 "x-%.*s-content-sha256: %s", (int)plen, provider1, sha_hex);
  640|       |
  641|      4|  result = CURLE_OK;
  642|      4|fail:
  643|      4|  return result;
  644|      4|}
http_aws_sigv4.c:calc_payload_hash:
  589|    591|{
  590|    591|  const char *post_data = data->set.postfields;
  591|    591|  size_t post_data_len = 0;
  592|    591|  CURLcode result;
  593|       |
  594|    591|  if(post_data) {
  ------------------
  |  Branch (594:6): [True: 2, False: 589]
  ------------------
  595|      2|    if(data->set.postfieldsize < 0)
  ------------------
  |  Branch (595:8): [True: 2, False: 0]
  ------------------
  596|      2|      post_data_len = strlen(post_data);
  597|      0|    else
  598|      0|      post_data_len = (size_t)data->set.postfieldsize;
  599|      2|  }
  600|    591|  result = Curl_sha256it(sha_hash, (const unsigned char *)post_data,
  601|    591|                         post_data_len);
  602|    591|  if(!result)
  ------------------
  |  Branch (602:6): [True: 591, False: 0]
  ------------------
  603|    591|    sha256_to_hex(sha_hex, sha_hash);
  604|    591|  return result;
  605|    591|}
http_aws_sigv4.c:make_headers:
  382|    592|{
  383|    592|  char date_hdr_key[DATE_HDR_KEY_LEN];
  384|    592|  char date_full_hdr[DATE_FULL_HDR_LEN];
  385|    592|  struct curl_slist *head = NULL;
  386|    592|  struct curl_slist *tmp_head = NULL;
  387|    592|  CURLcode result = CURLE_OUT_OF_MEMORY;
  388|    592|  struct curl_slist *l;
  389|    592|  bool again = TRUE;
  ------------------
  |  | 1055|    592|#define TRUE true
  ------------------
  390|       |
  391|    592|  curl_msnprintf(date_hdr_key, DATE_HDR_KEY_LEN, "X-%.*s-Date",
  ------------------
  |  |  285|    592|#define DATE_HDR_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Date"))
  |  |  ------------------
  |  |  |  |  284|    592|#define MAX_SIGV4_LEN    64
  |  |  ------------------
  ------------------
  392|    592|                 (int)plen, provider1);
  393|       |  /* provider1 ucfirst */
  394|    592|  Curl_strntolower(&date_hdr_key[2], provider1, plen);
  395|    592|  date_hdr_key[2] = Curl_raw_toupper(provider1[0]);
  396|       |
  397|    592|  curl_msnprintf(date_full_hdr, DATE_FULL_HDR_LEN,
  ------------------
  |  |  288|    592|#define DATE_FULL_HDR_LEN (DATE_HDR_KEY_LEN + TIMESTAMP_SIZE + 1)
  |  |  ------------------
  |  |  |  |  285|    592|#define DATE_HDR_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Date"))
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|    592|#define MAX_SIGV4_LEN    64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DATE_FULL_HDR_LEN (DATE_HDR_KEY_LEN + TIMESTAMP_SIZE + 1)
  |  |  ------------------
  |  |  |  |   53|    592|#define TIMESTAMP_SIZE 17
  |  |  ------------------
  ------------------
  398|    592|                 "x-%.*s-date:%s", (int)plen, provider1, timestamp);
  399|       |  /* provider1 lowercase */
  400|    592|  Curl_strntolower(&date_full_hdr[2], provider1, plen);
  401|       |
  402|    592|  if(!Curl_checkheaders(data, STRCONST("Host"))) {
  ------------------
  |  | 1292|    592|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (402:6): [True: 588, False: 4]
  ------------------
  403|    588|    char *fullhost;
  404|       |
  405|    588|    if(data->state.aptr.host) {
  ------------------
  |  Branch (405:8): [True: 0, False: 588]
  ------------------
  406|       |      /* remove /r/n as the separator for canonical request must be '\n' */
  407|      0|      size_t pos = strcspn(data->state.aptr.host, "\n\r");
  408|      0|      fullhost = curlx_memdup0(data->state.aptr.host, pos);
  409|      0|    }
  410|    588|    else
  411|    588|      fullhost = curl_maprintf("host:%s", hostname);
  412|       |
  413|    588|    if(fullhost)
  ------------------
  |  Branch (413:8): [True: 588, False: 0]
  ------------------
  414|    588|      head = Curl_slist_append_nodup(NULL, fullhost);
  415|    588|    if(!head) {
  ------------------
  |  Branch (415:8): [True: 0, False: 588]
  ------------------
  416|      0|      curlx_free(fullhost);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  417|      0|      goto fail;
  418|      0|    }
  419|    588|  }
  420|       |
  421|    592|  if(*content_sha256_header) {
  ------------------
  |  Branch (421:6): [True: 4, False: 588]
  ------------------
  422|      4|    tmp_head = curl_slist_append(head, content_sha256_header);
  423|      4|    if(!tmp_head)
  ------------------
  |  Branch (423:8): [True: 0, False: 4]
  ------------------
  424|      0|      goto fail;
  425|      4|    head = tmp_head;
  426|      4|  }
  427|       |
  428|       |  /* copy user headers to our header list. the logic is based on how http.c
  429|       |     handles user headers.
  430|       |
  431|       |     user headers in format 'name:' with no value are used to signal that an
  432|       |     internal header of that name should be removed. those user headers are not
  433|       |     added to this list.
  434|       |
  435|       |     user headers in format 'name;' with no value are used to signal that a
  436|       |     header of that name with no value should be sent. those user headers are
  437|       |     added to this list but in the format that they will be sent, ie the
  438|       |     semi-colon is changed to a colon for format 'name:'.
  439|       |
  440|       |     user headers with a value of whitespace only, or without a colon or
  441|       |     semi-colon, are not added to this list.
  442|       |     */
  443|  1.10k|  for(l = data->set.headers; l; l = l->next) {
  ------------------
  |  Branch (443:30): [True: 515, False: 592]
  ------------------
  444|    515|    char *dupdata;
  445|    515|    const char *ptr;
  446|    515|    const char *sep = strchr(l->data, ':');
  447|    515|    if(!sep)
  ------------------
  |  Branch (447:8): [True: 332, False: 183]
  ------------------
  448|    332|      sep = strchr(l->data, ';');
  449|    515|    if(!sep || (*sep == ':' && !*(sep + 1)))
  ------------------
  |  Branch (449:8): [True: 275, False: 240]
  |  Branch (449:17): [True: 183, False: 57]
  |  Branch (449:32): [True: 14, False: 169]
  ------------------
  450|    289|      continue;
  451|    707|    for(ptr = sep + 1; ISBLANK(*ptr); ++ptr)
  ------------------
  |  |   45|    707|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 397, False: 310]
  |  |  |  Branch (45:38): [True: 84, False: 226]
  |  |  ------------------
  ------------------
  452|    481|      ;
  453|    226|    if(!*ptr && ptr != sep + 1) /* a value of whitespace only */
  ------------------
  |  Branch (453:8): [True: 30, False: 196]
  |  Branch (453:17): [True: 11, False: 19]
  ------------------
  454|     11|      continue;
  455|    215|    dupdata = curlx_strdup(l->data);
  ------------------
  |  | 1477|    215|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  456|    215|    if(!dupdata)
  ------------------
  |  Branch (456:8): [True: 0, False: 215]
  ------------------
  457|      0|      goto fail;
  458|    215|    dupdata[sep - l->data] = ':';
  459|    215|    tmp_head = Curl_slist_append_nodup(head, dupdata);
  460|    215|    if(!tmp_head) {
  ------------------
  |  Branch (460:8): [True: 0, False: 215]
  ------------------
  461|      0|      curlx_free(dupdata);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  462|      0|      goto fail;
  463|      0|    }
  464|    215|    head = tmp_head;
  465|    215|  }
  466|       |
  467|    592|  trim_headers(head);
  468|       |
  469|    592|  *date_header = find_date_hdr(data, date_hdr_key);
  470|    592|  if(!*date_header) {
  ------------------
  |  Branch (470:6): [True: 592, False: 0]
  ------------------
  471|    592|    tmp_head = curl_slist_append(head, date_full_hdr);
  472|    592|    if(!tmp_head)
  ------------------
  |  Branch (472:8): [True: 0, False: 592]
  ------------------
  473|      0|      goto fail;
  474|    592|    head = tmp_head;
  475|    592|    *date_header = curl_maprintf("%s: %s\r\n", date_hdr_key, timestamp);
  476|    592|    if(!*date_header)
  ------------------
  |  Branch (476:8): [True: 0, False: 592]
  ------------------
  477|      0|      goto fail;
  478|    592|  }
  479|      0|  else {
  480|      0|    const char *value;
  481|      0|    const char *endp;
  482|      0|    value = strchr(*date_header, ':');
  483|      0|    if(!value) {
  ------------------
  |  Branch (483:8): [True: 0, False: 0]
  ------------------
  484|      0|      *date_header = NULL;
  485|      0|      goto fail;
  486|      0|    }
  487|      0|    ++value;
  488|      0|    curlx_str_passblanks(&value);
  489|      0|    endp = value;
  490|      0|    while(*endp && ISALNUM(*endp))
  ------------------
  |  |   41|      0|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|      0|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (42:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (490:11): [True: 0, False: 0]
  ------------------
  491|      0|      ++endp;
  492|       |    /* 16 bytes => "19700101T000000Z" */
  493|      0|    if((endp - value) == TIMESTAMP_SIZE - 1) {
  ------------------
  |  |   53|      0|#define TIMESTAMP_SIZE 17
  ------------------
  |  Branch (493:8): [True: 0, False: 0]
  ------------------
  494|      0|      memcpy(timestamp, value, TIMESTAMP_SIZE - 1);
  ------------------
  |  |   53|      0|#define TIMESTAMP_SIZE 17
  ------------------
  495|      0|      timestamp[TIMESTAMP_SIZE - 1] = 0;
  ------------------
  |  |   53|      0|#define TIMESTAMP_SIZE 17
  ------------------
  496|      0|    }
  497|      0|    else
  498|       |      /* bad timestamp length */
  499|      0|      timestamp[0] = 0;
  500|      0|    *date_header = NULL;
  501|      0|  }
  502|       |
  503|       |  /* alpha-sort by header name in a case sensitive manner */
  504|    779|  do {
  505|    779|    again = FALSE;
  ------------------
  |  | 1058|    779|#define FALSE false
  ------------------
  506|  3.72k|    for(l = head; l; l = l->next) {
  ------------------
  |  Branch (506:19): [True: 2.94k, False: 779]
  ------------------
  507|  2.94k|      struct curl_slist *next = l->next;
  508|       |
  509|  2.94k|      if(next && compare_header_names(l->data, next->data) > 0) {
  ------------------
  |  Branch (509:10): [True: 2.16k, False: 779]
  |  Branch (509:18): [True: 434, False: 1.72k]
  ------------------
  510|    434|        char *tmp = l->data;
  511|       |
  512|    434|        l->data = next->data;
  513|    434|        next->data = tmp;
  514|    434|        again = TRUE;
  ------------------
  |  | 1055|    434|#define TRUE true
  ------------------
  515|    434|      }
  516|  2.94k|    }
  517|    779|  } while(again);
  ------------------
  |  Branch (517:11): [True: 187, False: 592]
  ------------------
  518|       |
  519|    592|  result = merge_duplicate_headers(head);
  520|    592|  if(result)
  ------------------
  |  Branch (520:6): [True: 0, False: 592]
  ------------------
  521|      0|    goto fail;
  522|       |
  523|  1.93k|  for(l = head; l; l = l->next) {
  ------------------
  |  Branch (523:17): [True: 1.34k, False: 592]
  ------------------
  524|  1.34k|    char *tmp;
  525|       |
  526|  1.34k|    if(curlx_dyn_add(canonical_headers, l->data))
  ------------------
  |  Branch (526:8): [True: 0, False: 1.34k]
  ------------------
  527|      0|      goto fail;
  528|  1.34k|    if(curlx_dyn_add(canonical_headers, "\n"))
  ------------------
  |  Branch (528:8): [True: 0, False: 1.34k]
  ------------------
  529|      0|      goto fail;
  530|       |
  531|  1.34k|    tmp = strchr(l->data, ':');
  532|  1.34k|    if(tmp)
  ------------------
  |  Branch (532:8): [True: 1.34k, False: 0]
  ------------------
  533|  1.34k|      *tmp = 0;
  534|       |
  535|  1.34k|    if(l != head) {
  ------------------
  |  Branch (535:8): [True: 753, False: 592]
  ------------------
  536|    753|      if(curlx_dyn_add(signed_headers, ";"))
  ------------------
  |  Branch (536:10): [True: 0, False: 753]
  ------------------
  537|      0|        goto fail;
  538|    753|    }
  539|  1.34k|    if(curlx_dyn_add(signed_headers, l->data))
  ------------------
  |  Branch (539:8): [True: 0, False: 1.34k]
  ------------------
  540|      0|      goto fail;
  541|  1.34k|  }
  542|       |
  543|    592|  result = CURLE_OK;
  544|    592|fail:
  545|    592|  curl_slist_free_all(head);
  546|       |
  547|    592|  return result;
  548|    592|}
http_aws_sigv4.c:trim_headers:
   82|    592|{
   83|    592|  struct curl_slist *l;
   84|  1.39k|  for(l = head; l; l = l->next) {
  ------------------
  |  Branch (84:17): [True: 807, False: 592]
  ------------------
   85|    807|    const char *value; /* to read from */
   86|    807|    char *store;
   87|    807|    size_t colon = strcspn(l->data, ":");
   88|    807|    Curl_strntolower(l->data, l->data, colon);
   89|       |
   90|    807|    value = &l->data[colon];
   91|    807|    if(!*value)
  ------------------
  |  Branch (91:8): [True: 0, False: 807]
  ------------------
   92|      0|      continue;
   93|    807|    ++value;
   94|    807|    store = (char *)CURL_UNCONST(value);
  ------------------
  |  |  866|    807|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   95|       |
   96|       |    /* skip leading whitespace */
   97|    807|    curlx_str_passblanks(&value);
   98|       |
   99|  8.03k|    while(*value) {
  ------------------
  |  Branch (99:11): [True: 7.22k, False: 807]
  ------------------
  100|  7.22k|      int space = 0;
  101|  8.28k|      while(ISBLANK(*value)) {
  ------------------
  |  |   45|  8.28k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 287, False: 7.99k]
  |  |  |  Branch (45:38): [True: 770, False: 7.22k]
  |  |  ------------------
  ------------------
  102|  1.05k|        value++;
  103|  1.05k|        space++;
  104|  1.05k|      }
  105|  7.22k|      if(space) {
  ------------------
  |  Branch (105:10): [True: 316, False: 6.91k]
  ------------------
  106|       |        /* replace any number of consecutive whitespace with a single space,
  107|       |           unless at the end of the string, then nothing */
  108|    316|        if(*value)
  ------------------
  |  Branch (108:12): [True: 192, False: 124]
  ------------------
  109|    192|          *store++ = ' ';
  110|    316|      }
  111|  6.91k|      else
  112|  6.91k|        *store++ = *value++;
  113|  7.22k|    }
  114|    807|    *store = 0; /* null-terminate */
  115|    807|  }
  116|    592|}
http_aws_sigv4.c:find_date_hdr:
   72|    592|{
   73|    592|  char *tmp = Curl_checkheaders(data, sig_hdr, strlen(sig_hdr));
   74|       |
   75|    592|  if(tmp)
  ------------------
  |  Branch (75:6): [True: 0, False: 592]
  ------------------
   76|      0|    return tmp;
   77|    592|  return Curl_checkheaders(data, STRCONST("Date"));
  ------------------
  |  | 1292|    592|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   78|    592|}
http_aws_sigv4.c:compare_header_names:
  293|  2.97k|{
  294|  2.97k|  const char *colon_a;
  295|  2.97k|  const char *colon_b;
  296|  2.97k|  size_t len_a;
  297|  2.97k|  size_t len_b;
  298|  2.97k|  size_t min_len;
  299|  2.97k|  int cmp;
  300|       |
  301|  2.97k|  colon_a = strchr(a, ':');
  302|  2.97k|  colon_b = strchr(b, ':');
  303|       |
  304|  2.97k|  DEBUGASSERT(colon_a);
  ------------------
  |  | 1081|  2.97k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (304:3): [True: 0, False: 2.97k]
  |  Branch (304:3): [True: 2.97k, False: 0]
  ------------------
  305|  2.97k|  DEBUGASSERT(colon_b);
  ------------------
  |  | 1081|  2.97k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (305:3): [True: 0, False: 2.97k]
  |  Branch (305:3): [True: 2.97k, False: 0]
  ------------------
  306|       |
  307|  2.97k|  len_a = colon_a ? (size_t)(colon_a - a) : strlen(a);
  ------------------
  |  Branch (307:11): [True: 2.97k, False: 0]
  ------------------
  308|  2.97k|  len_b = colon_b ? (size_t)(colon_b - b) : strlen(b);
  ------------------
  |  Branch (308:11): [True: 2.97k, False: 0]
  ------------------
  309|       |
  310|  2.97k|  min_len = (len_a < len_b) ? len_a : len_b;
  ------------------
  |  Branch (310:13): [True: 1.62k, False: 1.34k]
  ------------------
  311|       |
  312|  2.97k|  cmp = strncmp(a, b, min_len);
  313|       |
  314|       |  /* return the shorter of the two if one is shorter */
  315|  2.97k|  if(!cmp)
  ------------------
  |  Branch (315:6): [True: 584, False: 2.38k]
  ------------------
  316|    584|    return (int)(len_a - len_b);
  317|       |
  318|  2.38k|  return cmp;
  319|  2.97k|}
http_aws_sigv4.c:merge_duplicate_headers:
  325|    592|{
  326|    592|  struct curl_slist *curr = head;
  327|    592|  CURLcode result = CURLE_OK;
  328|       |
  329|  1.39k|  while(curr) {
  ------------------
  |  Branch (329:9): [True: 1.39k, False: 0]
  ------------------
  330|  1.39k|    struct curl_slist *next = curr->next;
  331|  1.39k|    if(!next)
  ------------------
  |  Branch (331:8): [True: 592, False: 807]
  ------------------
  332|    592|      break;
  333|       |
  334|    807|    if(compare_header_names(curr->data, next->data) == 0) {
  ------------------
  |  Branch (334:8): [True: 54, False: 753]
  ------------------
  335|     54|      struct dynbuf buf;
  336|     54|      const char *colon_next;
  337|     54|      const char *val_next;
  338|       |
  339|     54|      curlx_dyn_init(&buf, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|     54|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  340|       |
  341|     54|      result = curlx_dyn_add(&buf, curr->data);
  342|     54|      if(result)
  ------------------
  |  Branch (342:10): [True: 0, False: 54]
  ------------------
  343|      0|        return result;
  344|       |
  345|     54|      colon_next = strchr(next->data, ':');
  346|     54|      DEBUGASSERT(colon_next);
  ------------------
  |  | 1081|     54|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (346:7): [True: 0, False: 54]
  |  Branch (346:7): [True: 54, False: 0]
  ------------------
  347|     54|      val_next = colon_next + 1;
  348|       |
  349|     54|      result = curlx_dyn_addn(&buf, ",", 1);
  350|     54|      if(result)
  ------------------
  |  Branch (350:10): [True: 0, False: 54]
  ------------------
  351|      0|        return result;
  352|       |
  353|     54|      result = curlx_dyn_add(&buf, val_next);
  354|     54|      if(result)
  ------------------
  |  Branch (354:10): [True: 0, False: 54]
  ------------------
  355|      0|        return result;
  356|       |
  357|     54|      curlx_free(curr->data);
  ------------------
  |  | 1483|     54|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  358|     54|      curr->data = curlx_dyn_ptr(&buf);
  359|       |
  360|     54|      curr->next = next->next;
  361|     54|      curlx_free(next->data);
  ------------------
  |  | 1483|     54|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  362|     54|      curlx_free(next);
  ------------------
  |  | 1483|     54|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  363|     54|    }
  364|    753|    else {
  365|    753|      curr = curr->next;
  366|    753|    }
  367|    807|  }
  368|       |
  369|    592|  return CURLE_OK;
  370|    592|}
http_aws_sigv4.c:should_urlencode:
  267|    577|{
  268|       |  /*
  269|       |   * These services require unmodified (not additionally URL-encoded) URL
  270|       |   * paths.
  271|       |   * should_urlencode == true is equivalent to should_urlencode_uri_path
  272|       |   * from the AWS SDK. Urls are already normalized by the curl URL parser
  273|       |   */
  274|       |
  275|    577|  if(curlx_str_cmp(service_name, "s3") ||
  ------------------
  |  Branch (275:6): [True: 4, False: 573]
  ------------------
  276|    573|     curlx_str_cmp(service_name, "s3-express") ||
  ------------------
  |  Branch (276:6): [True: 1, False: 572]
  ------------------
  277|    572|     curlx_str_cmp(service_name, "s3-outposts")) {
  ------------------
  |  Branch (277:6): [True: 1, False: 571]
  ------------------
  278|      6|    return false;
  279|      6|  }
  280|    571|  return true;
  281|    577|}
http_aws_sigv4.c:sha256_to_hex:
   66|  1.72k|{
   67|  1.72k|  Curl_hexencode(sha, CURL_SHA256_DIGEST_LENGTH,
  ------------------
  |  |   37|  1.72k|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  ------------------
   68|  1.72k|                 (unsigned char *)dst, SHA256_HEX_LENGTH);
  ------------------
  |  |   56|  1.72k|#define SHA256_HEX_LENGTH ((2 * CURL_SHA256_DIGEST_LENGTH) + 1)
  |  |  ------------------
  |  |  |  |   37|  1.72k|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  |  |  ------------------
  ------------------
   69|  1.72k|}

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

Curl_output_digest:
   69|      2|{
   70|      2|  CURLcode result;
   71|      2|  char *response;
   72|      2|  size_t len;
   73|      2|  bool have_chlg;
   74|       |
   75|       |  /* Point to the address of the pointer that holds the string to send to the
   76|       |     server, which is for a plain host or for an HTTP proxy */
   77|      2|  char **allocuserpwd;
   78|       |
   79|       |  /* Point to the name and password for this */
   80|      2|  struct Curl_creds *creds = NULL;
   81|       |
   82|       |  /* Point to the correct struct with this */
   83|      2|  struct digestdata *digest;
   84|      2|  struct auth *authp;
   85|       |
   86|      2|  if(proxy) {
  ------------------
  |  Branch (86:6): [True: 1, False: 1]
  ------------------
   87|       |#ifdef CURL_DISABLE_PROXY
   88|       |    return CURLE_NOT_BUILT_IN;
   89|       |#else
   90|      1|    digest = &data->state.proxydigest;
   91|      1|    allocuserpwd = &data->req.hd_proxy_auth;
   92|      1|    creds = data->conn->http_proxy.creds;
   93|      1|    authp = &data->state.authproxy;
   94|      1|#endif
   95|      1|  }
   96|      1|  else {
   97|      1|    digest = &data->state.digest;
   98|      1|    allocuserpwd = &data->req.hd_auth;
   99|      1|    creds = data->state.creds;
  100|      1|    authp = &data->state.authhost;
  101|      1|  }
  102|       |
  103|      2|  curlx_safefree(*allocuserpwd);
  ------------------
  |  | 1327|      2|  do {                      \
  |  | 1328|      2|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      2|    (ptr) = NULL;           \
  |  | 1330|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  104|       |
  105|       |#ifdef USE_WINDOWS_SSPI
  106|       |  have_chlg = !!digest->input_token;
  107|       |#else
  108|      2|  have_chlg = !!digest->nonce;
  109|      2|#endif
  110|       |
  111|      2|  if(!have_chlg) {
  ------------------
  |  Branch (111:6): [True: 2, False: 0]
  ------------------
  112|      2|    authp->done = FALSE;
  ------------------
  |  | 1058|      2|#define FALSE false
  ------------------
  113|      2|    return CURLE_OK;
  114|      2|  }
  115|       |
  116|      0|  result = Curl_auth_create_digest_http_message(data, creds, request,
  117|      0|                                                uripath, digest,
  118|      0|                                                &response, &len);
  119|      0|  if(result)
  ------------------
  |  Branch (119:6): [True: 0, False: 0]
  ------------------
  120|      0|    return result;
  121|       |
  122|      0|  *allocuserpwd = curl_maprintf("%sAuthorization: Digest %s\r\n",
  123|      0|                                proxy ? "Proxy-" : "", response);
  ------------------
  |  Branch (123:33): [True: 0, False: 0]
  ------------------
  124|      0|  curlx_free(response);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  125|      0|  if(!*allocuserpwd)
  ------------------
  |  Branch (125:6): [True: 0, False: 0]
  ------------------
  126|      0|    return CURLE_OUT_OF_MEMORY;
  127|       |
  128|      0|  authp->done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  129|       |
  130|      0|  return CURLE_OK;
  131|      0|}
Curl_http_auth_cleanup_digest:
  134|  22.4k|{
  135|  22.4k|  Curl_auth_digest_cleanup(&data->state.digest);
  136|  22.4k|  Curl_auth_digest_cleanup(&data->state.proxydigest);
  137|  22.4k|}

Curl_http_proxy_create_tunnel_request:
  442|    921|{
  443|    921|  CURLcode result;
  444|       |
  445|    921|  if(udp_tunnel)
  ------------------
  |  Branch (445:6): [True: 0, False: 921]
  ------------------
  446|      0|    result = http_proxy_create_CONNECTUDP(preq, cf, data, dest, ver);
  447|    921|  else
  448|    921|    result = http_proxy_create_CONNECT(preq, cf, data, dest, ver);
  449|    921|  if(result)
  ------------------
  |  Branch (449:6): [True: 34, False: 887]
  ------------------
  450|     34|    return result;
  451|       |
  452|    887|  if(udp_tunnel)
  ------------------
  |  Branch (452:6): [True: 0, False: 887]
  ------------------
  453|      0|    infof(data, "Establishing %s proxy UDP tunnel to %s:%s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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]
  |  |  ------------------
  ------------------
  454|    887|          (ver == PROXY_HTTP_V2) ? "HTTP/2" :
  455|    887|          (ver == PROXY_HTTP_V3) ? "HTTP/3" : "HTTP",
  456|    887|          data->state.up.hostname, data->state.up.port);
  457|    887|  else
  458|    887|    infof(data, "Establishing %s proxy tunnel to %s",
  ------------------
  |  |  143|    887|  do {                               \
  |  |  144|    887|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    887|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 887, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 887]
  |  |  |  |  ------------------
  |  |  |  |  320|    887|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    887|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|    887|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 887]
  |  |  ------------------
  ------------------
  459|    887|          (ver == PROXY_HTTP_V2) ? "HTTP/2" :
  460|    887|          (ver == PROXY_HTTP_V3) ? "HTTP/3" : "HTTP",
  461|    887|          (*preq)->authority);
  462|    887|  return CURLE_OK;
  463|    921|}
Curl_cf_http_proxy_insert_after:
  758|  1.21k|{
  759|  1.21k|  struct Curl_cfilter *cf;
  760|  1.21k|  struct cf_proxy_ctx *ctx = NULL;
  761|  1.21k|  CURLcode result;
  762|       |
  763|  1.21k|  (void)data;
  764|  1.21k|  if(!dest)
  ------------------
  |  Branch (764:6): [True: 0, False: 1.21k]
  ------------------
  765|      0|    return CURLE_FAILED_INIT;
  766|       |
  767|  1.21k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  1.21k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  768|  1.21k|  if(!ctx) {
  ------------------
  |  Branch (768:6): [True: 0, False: 1.21k]
  ------------------
  769|      0|    result = CURLE_OUT_OF_MEMORY;
  770|      0|    goto out;
  771|      0|  }
  772|  1.21k|  Curl_peer_link(&ctx->dest, dest);
  773|  1.21k|  ctx->proxytype = proxytype;
  774|  1.21k|  ctx->udp_tunnel = (transport == TRNSPRT_QUIC);
  ------------------
  |  |  309|  1.21k|#define TRNSPRT_QUIC 5
  ------------------
  775|       |
  776|  1.21k|  result = Curl_cf_create(&cf, &Curl_cft_http_proxy, ctx);
  777|  1.21k|  if(result)
  ------------------
  |  Branch (777:6): [True: 0, False: 1.21k]
  ------------------
  778|      0|    goto out;
  779|  1.21k|  ctx = NULL;
  780|  1.21k|  Curl_conn_cf_insert_after(cf_at, cf);
  781|       |
  782|  1.21k|out:
  783|  1.21k|  cf_https_proxy_ctx_free(ctx);
  784|  1.21k|  return result;
  785|  1.21k|}
Curl_http_proxy_transport:
  788|  1.29k|{
  789|  1.29k|  switch(proxytype) {
  790|      0|  case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|      0|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (790:3): [True: 0, False: 1.29k]
  ------------------
  791|      0|    return TRNSPRT_QUIC;
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  792|  1.29k|  default:
  ------------------
  |  Branch (792:3): [True: 1.29k, False: 0]
  ------------------
  793|  1.29k|    return TRNSPRT_TCP;
  ------------------
  |  |  307|  1.29k|#define TRNSPRT_TCP  3
  ------------------
  794|  1.29k|  }
  795|  1.29k|}
http_proxy.c:proxy_http_ver_major:
  183|    921|{
  184|    921|  switch(ver) {
  ------------------
  |  Branch (184:10): [True: 921, False: 0]
  ------------------
  185|    921|  case PROXY_HTTP_V1:
  ------------------
  |  Branch (185:3): [True: 921, False: 0]
  ------------------
  186|    921|    return 11;
  187|      0|  case PROXY_HTTP_V2:
  ------------------
  |  Branch (187:3): [True: 0, False: 921]
  ------------------
  188|      0|    return 20;
  189|      0|  case PROXY_HTTP_V3:
  ------------------
  |  Branch (189:3): [True: 0, False: 921]
  ------------------
  190|      0|    return 30;
  191|    921|  }
  192|      0|  return 0;
  193|    921|}
http_proxy.c:dynhds_add_custom:
   45|    887|{
   46|    887|  struct connectdata *conn = data->conn;
   47|    887|  struct curl_slist *h[2];
   48|    887|  struct curl_slist *headers;
   49|    887|  int numlists = 1; /* by default */
   50|    887|  int i;
   51|       |
   52|    887|  enum Curl_proxy_use proxy;
   53|       |
   54|    887|  if(is_connect && !is_udp)
  ------------------
  |  Branch (54:6): [True: 887, False: 0]
  |  Branch (54:20): [True: 887, False: 0]
  ------------------
   55|    887|    proxy = HEADER_CONNECT;
   56|      0|  else if(is_connect && is_udp)
  ------------------
  |  Branch (56:11): [True: 0, False: 0]
  |  Branch (56:25): [True: 0, False: 0]
  ------------------
   57|      0|    proxy = HEADER_CONNECT_UDP;
   58|      0|  else
   59|      0|    proxy = (conn->bits.httpproxy && !conn->bits.tunnel_proxy) ?
  ------------------
  |  Branch (59:14): [True: 0, False: 0]
  |  Branch (59:38): [True: 0, False: 0]
  ------------------
   60|      0|      HEADER_PROXY : HEADER_SERVER;
   61|       |
   62|    887|  switch(proxy) {
  ------------------
  |  Branch (62:10): [True: 887, False: 0]
  ------------------
   63|      0|  case HEADER_SERVER:
  ------------------
  |  Branch (63:3): [True: 0, False: 887]
  ------------------
   64|      0|    h[0] = data->set.headers;
   65|      0|    break;
   66|      0|  case HEADER_PROXY:
  ------------------
  |  Branch (66:3): [True: 0, False: 887]
  ------------------
   67|      0|    h[0] = data->set.headers;
   68|      0|    if(data->set.sep_headers) {
  ------------------
  |  Branch (68:8): [True: 0, False: 0]
  ------------------
   69|      0|      h[1] = data->set.proxyheaders;
   70|      0|      numlists++;
   71|      0|    }
   72|      0|    break;
   73|    887|  case HEADER_CONNECT:
  ------------------
  |  Branch (73:3): [True: 887, False: 0]
  ------------------
   74|    887|    if(data->set.sep_headers)
  ------------------
  |  Branch (74:8): [True: 839, False: 48]
  ------------------
   75|    839|      h[0] = data->set.proxyheaders;
   76|     48|    else
   77|     48|      h[0] = data->set.headers;
   78|    887|    break;
   79|      0|  case HEADER_CONNECT_UDP:
  ------------------
  |  Branch (79:3): [True: 0, False: 887]
  ------------------
   80|      0|    if(data->set.sep_headers)
  ------------------
  |  Branch (80:8): [True: 0, False: 0]
  ------------------
   81|      0|      h[0] = data->set.proxyheaders;
   82|      0|    else
   83|      0|      h[0] = data->set.headers;
   84|      0|    break;
   85|    887|  }
   86|       |
   87|       |  /* loop through one or two lists */
   88|  1.77k|  for(i = 0; i < numlists; i++) {
  ------------------
  |  Branch (88:14): [True: 887, False: 887]
  ------------------
   89|  1.08k|    for(headers = h[i]; headers; headers = headers->next) {
  ------------------
  |  Branch (89:25): [True: 197, False: 887]
  ------------------
   90|    197|      struct Curl_str name;
   91|    197|      const char *value = NULL;
   92|    197|      size_t valuelen = 0;
   93|    197|      const char *ptr = headers->data;
   94|       |
   95|       |      /* There are 2 quirks in place for custom headers:
   96|       |       * 1. setting only 'name:' to suppress a header from being sent
   97|       |       * 2. setting only 'name;' to send an empty (illegal) header
   98|       |       */
   99|    197|      if(!curlx_str_cspn(&ptr, &name, ";:")) {
  ------------------
  |  Branch (99:10): [True: 128, False: 69]
  ------------------
  100|    128|        if(!curlx_str_single(&ptr, ':')) {
  ------------------
  |  Branch (100:12): [True: 38, False: 90]
  ------------------
  101|     38|          curlx_str_passblanks(&ptr);
  102|     38|          if(*ptr) {
  ------------------
  |  Branch (102:14): [True: 25, False: 13]
  ------------------
  103|     25|            value = ptr;
  104|     25|            valuelen = strlen(value);
  105|     25|          }
  106|     13|          else {
  107|       |            /* quirk #1, suppress this header */
  108|     13|            continue;
  109|     13|          }
  110|     38|        }
  111|     90|        else if(!curlx_str_single(&ptr, ';')) {
  ------------------
  |  Branch (111:17): [True: 73, False: 17]
  ------------------
  112|     73|          curlx_str_passblanks(&ptr);
  113|     73|          if(!*ptr) {
  ------------------
  |  Branch (113:14): [True: 63, False: 10]
  ------------------
  114|       |            /* quirk #2, send an empty header */
  115|     63|            value = "";
  116|     63|            valuelen = 0;
  117|     63|          }
  118|     10|          else {
  119|       |            /* this may be used for something else in the future,
  120|       |             * ignore this for now */
  121|     10|            continue;
  122|     10|          }
  123|     73|        }
  124|     17|        else
  125|       |          /* neither : nor ; in provided header value. We ignore this
  126|       |           * silently */
  127|     17|          continue;
  128|    128|      }
  129|     69|      else
  130|       |        /* no name, move on */
  131|     69|        continue;
  132|       |
  133|     88|      DEBUGASSERT(curlx_strlen(&name) && value);
  ------------------
  |  | 1081|     88|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (133:7): [True: 0, False: 88]
  |  Branch (133:7): [True: 0, False: 0]
  |  Branch (133:7): [True: 88, False: 0]
  |  Branch (133:7): [True: 88, False: 0]
  ------------------
  134|     88|      if(data->state.aptr.host &&
  ------------------
  |  Branch (134:10): [True: 0, False: 88]
  ------------------
  135|       |         /* a Host: header was sent already, do not pass on any custom Host:
  136|       |            header as that will produce *two* in the same request! */
  137|      0|         curlx_str_casecompare(&name, "Host"))
  ------------------
  |  Branch (137:10): [True: 0, False: 0]
  ------------------
  138|      0|        ;
  139|     88|      else if(data->state.httpreq == HTTPREQ_POST_FORM &&
  ------------------
  |  Branch (139:15): [True: 22, False: 66]
  ------------------
  140|       |              /* this header (extended by formdata.c) is sent later */
  141|     22|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (141:15): [True: 0, False: 22]
  ------------------
  142|      0|        ;
  143|     88|      else if(data->state.httpreq == HTTPREQ_POST_MIME &&
  ------------------
  |  Branch (143:15): [True: 31, False: 57]
  ------------------
  144|       |              /* this header is sent later */
  145|     31|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (145:15): [True: 0, False: 31]
  ------------------
  146|      0|        ;
  147|     88|      else if(data->req.authneg &&
  ------------------
  |  Branch (147:15): [True: 0, False: 88]
  ------------------
  148|       |              /* while doing auth neg, do not allow the custom length since
  149|       |                 we will force length zero then */
  150|      0|              curlx_str_casecompare(&name, "Content-Length"))
  ------------------
  |  Branch (150:15): [True: 0, False: 0]
  ------------------
  151|      0|        ;
  152|     88|      else if((httpversion >= 20) &&
  ------------------
  |  Branch (152:15): [True: 0, False: 88]
  ------------------
  153|      0|              curlx_str_casecompare(&name, "Transfer-Encoding"))
  ------------------
  |  Branch (153:15): [True: 0, False: 0]
  ------------------
  154|      0|        ;
  155|       |      /* HTTP/2 and HTTP/3 do not support chunked requests */
  156|     88|      else if((curlx_str_casecompare(&name, "Authorization") ||
  ------------------
  |  Branch (156:16): [True: 0, False: 88]
  ------------------
  157|     88|               curlx_str_casecompare(&name, "Cookie")) &&
  ------------------
  |  Branch (157:16): [True: 0, False: 88]
  ------------------
  158|       |              /* be careful of sending this potentially sensitive header to
  159|       |                 other hosts */
  160|      0|              !Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (160:15): [True: 0, False: 0]
  ------------------
  161|      0|        ;
  162|     88|      else {
  163|     88|        CURLcode result =
  164|     88|          Curl_dynhds_add(hds, curlx_str(&name), curlx_strlen(&name),
  ------------------
  |  |   49|     88|#define curlx_str(x)    ((x)->str)
  ------------------
                        Curl_dynhds_add(hds, curlx_str(&name), curlx_strlen(&name),
  ------------------
  |  |   50|     88|#define curlx_strlen(x) ((x)->len)
  ------------------
  165|     88|                          value, valuelen);
  166|     88|        if(result)
  ------------------
  |  Branch (166:12): [True: 0, False: 88]
  ------------------
  167|      0|          return result;
  168|     88|      }
  169|     88|    }
  170|    887|  }
  171|       |
  172|    887|  return CURLE_OK;
  173|    887|}
http_proxy.c:http_proxy_create_CONNECT:
  200|    921|{
  201|    921|  char *authority = NULL;
  202|    921|  int httpversion = proxy_http_ver_major(ver);
  203|    921|  CURLcode result;
  204|    921|  struct httpreq *req = NULL;
  205|       |
  206|    921|  authority = curl_maprintf("%s%s%s:%u",
  207|    921|                            dest->ipv6 ? "[" : "",
  ------------------
  |  Branch (207:29): [True: 0, False: 921]
  ------------------
  208|    921|                            dest->hostname,
  209|    921|                            dest->ipv6 ? "]" : "",
  ------------------
  |  Branch (209:29): [True: 0, False: 921]
  ------------------
  210|    921|                            dest->port);
  211|    921|  if(!authority) {
  ------------------
  |  Branch (211:6): [True: 0, False: 921]
  ------------------
  212|      0|    result = CURLE_OUT_OF_MEMORY;
  213|      0|    goto out;
  214|      0|  }
  215|       |
  216|    921|  result = Curl_http_req_make(&req, "CONNECT", sizeof("CONNECT") - 1,
  217|    921|                              NULL, 0, authority, strlen(authority),
  218|    921|                              NULL, 0);
  219|    921|  if(result)
  ------------------
  |  Branch (219:6): [True: 0, False: 921]
  ------------------
  220|      0|    goto out;
  221|       |
  222|       |  /* Setup the proxy-authorization header, if any */
  223|    921|  result = Curl_http_output_auth(data, cf->conn, req->method, HTTPREQ_GET,
  224|    921|                                 req->authority, NULL, TRUE);
  ------------------
  |  | 1055|    921|#define TRUE true
  ------------------
  225|    921|  if(result)
  ------------------
  |  Branch (225:6): [True: 34, False: 887]
  ------------------
  226|     34|    goto out;
  227|       |
  228|       |  /* If user is not overriding Host: header, we add for HTTP/1.x */
  229|    887|  if(ver == PROXY_HTTP_V1 &&
  ------------------
  |  Branch (229:6): [True: 887, False: 0]
  ------------------
  230|    887|     !Curl_checkProxyheaders(data, cf->conn, STRCONST("Host"))) {
  ------------------
  |  | 1292|    887|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (230:6): [True: 887, False: 0]
  ------------------
  231|    887|    result = Curl_dynhds_cadd(&req->headers, "Host", authority);
  232|    887|    if(result)
  ------------------
  |  Branch (232:8): [True: 0, False: 887]
  ------------------
  233|      0|      goto out;
  234|    887|  }
  235|       |
  236|    887|  if(data->req.hd_proxy_auth) {
  ------------------
  |  Branch (236:6): [True: 235, False: 652]
  ------------------
  237|    235|    result = Curl_dynhds_h1_cadd_line(&req->headers,
  238|    235|                                      data->req.hd_proxy_auth);
  239|    235|    if(result)
  ------------------
  |  Branch (239:8): [True: 0, False: 235]
  ------------------
  240|      0|      goto out;
  241|    235|  }
  242|       |
  243|    887|  if(!Curl_checkProxyheaders(data, cf->conn, STRCONST("User-Agent")) &&
  ------------------
  |  | 1292|    887|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (243:6): [True: 887, False: 0]
  ------------------
  244|    887|     data->set.str[STRING_USERAGENT] && *data->set.str[STRING_USERAGENT]) {
  ------------------
  |  Branch (244:6): [True: 3, False: 884]
  |  Branch (244:41): [True: 2, False: 1]
  ------------------
  245|      2|    result = Curl_dynhds_cadd(&req->headers, "User-Agent",
  246|      2|                              data->set.str[STRING_USERAGENT]);
  247|      2|    if(result)
  ------------------
  |  Branch (247:8): [True: 0, False: 2]
  ------------------
  248|      0|      goto out;
  249|      2|  }
  250|       |
  251|    887|  if(ver == PROXY_HTTP_V1 &&
  ------------------
  |  Branch (251:6): [True: 887, False: 0]
  ------------------
  252|    887|     !Curl_checkProxyheaders(data, cf->conn, STRCONST("Proxy-Connection"))) {
  ------------------
  |  | 1292|    887|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (252:6): [True: 887, False: 0]
  ------------------
  253|    887|    result = Curl_dynhds_cadd(&req->headers, "Proxy-Connection", "Keep-Alive");
  254|    887|    if(result)
  ------------------
  |  Branch (254:8): [True: 0, False: 887]
  ------------------
  255|      0|      goto out;
  256|    887|  }
  257|       |
  258|    887|  result = dynhds_add_custom(data, TRUE, httpversion,
  ------------------
  |  | 1055|    887|#define TRUE true
  ------------------
  259|    887|                             FALSE, &req->headers);
  ------------------
  |  | 1058|    887|#define FALSE false
  ------------------
  260|       |
  261|    921|out:
  262|    921|  if(result && req) {
  ------------------
  |  Branch (262:6): [True: 34, False: 887]
  |  Branch (262:16): [True: 34, False: 0]
  ------------------
  263|     34|    Curl_http_req_free(req);
  264|     34|    req = NULL;
  265|     34|  }
  266|    921|  curlx_free(authority);
  ------------------
  |  | 1483|    921|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  267|    921|  *preq = req;
  268|    921|  return result;
  269|    887|}
http_proxy.c:http_proxy_cf_destroy:
  718|  1.21k|{
  719|  1.21k|  struct cf_proxy_ctx *ctx = cf->ctx;
  720|  1.21k|  if(ctx) {
  ------------------
  |  Branch (720:6): [True: 1.21k, False: 0]
  ------------------
  721|  1.21k|    CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  1.21k|  do {                                          \
  |  |  154|  1.21k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.21k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.43k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.21k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.21k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.43k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.21k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.21k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.21k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.21k]
  |  |  ------------------
  ------------------
  722|  1.21k|    cf_https_proxy_ctx_free(ctx);
  723|  1.21k|  }
  724|  1.21k|}
http_proxy.c:http_proxy_cf_connect:
  557|  1.48k|{
  558|  1.48k|  struct cf_proxy_ctx *ctx = cf->ctx;
  559|  1.48k|  CURLcode result;
  560|  1.48k|  const char *tunnel_type; /* Determine tunnel type once and reuse */
  561|       |
  562|  1.48k|  tunnel_type = ctx->udp_tunnel ? "CONNECT-UDP" : "CONNECT";
  ------------------
  |  Branch (562:17): [True: 0, False: 1.48k]
  ------------------
  563|       |
  564|  1.48k|  if(cf->connected) {
  ------------------
  |  Branch (564:6): [True: 0, False: 1.48k]
  ------------------
  565|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  566|      0|    return CURLE_OK;
  567|      0|  }
  568|       |
  569|  1.48k|  CURL_TRC_CF(data, cf, "%s", tunnel_type);
  ------------------
  |  |  153|  1.48k|  do {                                          \
  |  |  154|  1.48k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.48k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.97k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.48k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.97k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.48k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.48k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.48k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
  570|  2.40k|connect_sub:
  571|       |  /* in case of h3_proxy, cf->next will be NULL initially */
  572|  2.40k|  if(cf->next) {
  ------------------
  |  Branch (572:6): [True: 2.40k, False: 0]
  ------------------
  573|  2.40k|    result = cf->next->cft->do_connect(cf->next, data, done);
  574|  2.40k|    if(result || !*done)
  ------------------
  |  Branch (574:8): [True: 1.19k, False: 1.21k]
  |  Branch (574:18): [True: 280, False: 936]
  ------------------
  575|  1.47k|      return result;
  576|  2.40k|  }
  577|       |
  578|    936|  *done = FALSE;
  ------------------
  |  | 1058|    936|#define FALSE false
  ------------------
  579|    936|  if(!ctx->sub_filter_installed) {
  ------------------
  |  Branch (579:6): [True: 921, False: 15]
  ------------------
  580|    921|    const char *alpn = NULL;
  581|       |
  582|       |    /* in case of h3_proxy, cf->next will be NULL initially */
  583|    921|    if(cf->next) {
  ------------------
  |  Branch (583:8): [True: 921, False: 0]
  ------------------
  584|    921|      alpn = Curl_conn_cf_get_alpn_negotiated(cf->next, data);
  585|    921|    }
  586|       |
  587|    921|    if(alpn)
  ------------------
  |  Branch (587:8): [True: 0, False: 921]
  ------------------
  588|      0|      infof(data, "%s: '%s' negotiated", tunnel_type, alpn);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  589|    921|    else if(!alpn) {
  ------------------
  |  Branch (589:13): [True: 921, False: 0]
  ------------------
  590|       |      /* No ALPN, proxytype rules. Fake ALPN */
  591|    921|      infof(data, "%s: no ALPN negotiated", tunnel_type);
  ------------------
  |  |  143|    921|  do {                               \
  |  |  144|    921|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    921|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 921, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 921]
  |  |  |  |  ------------------
  |  |  |  |  320|    921|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    921|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    921|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 921]
  |  |  ------------------
  ------------------
  592|    921|      switch(ctx->proxytype) {
  593|      1|      case CURLPROXY_HTTP_1_0:
  ------------------
  |  |  792|      1|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (593:7): [True: 1, False: 920]
  ------------------
  594|      1|        alpn = "http/1.0";
  595|      1|        break;
  596|      0|      case CURLPROXY_HTTPS2:
  ------------------
  |  |  796|      0|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (596:7): [True: 0, False: 921]
  ------------------
  597|      0|        alpn = "h2";
  598|      0|        break;
  599|      0|      case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|      0|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (599:7): [True: 0, False: 921]
  ------------------
  600|      0|        alpn = "h3";
  601|      0|        break;
  602|    920|      default:
  ------------------
  |  Branch (602:7): [True: 920, False: 1]
  ------------------
  603|    920|        alpn = "http/1.1";
  604|    920|        break;
  605|    921|      }
  606|    921|    }
  607|       |
  608|    921|    if(!strcmp(alpn, "http/1.0")) {
  ------------------
  |  Branch (608:8): [True: 1, False: 920]
  ------------------
  609|      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))        \
  |  |  ------------------
  |  |  |  |  323|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  610|      1|      result = Curl_cf_h1_proxy_insert_after(cf, data, ctx->dest, 10,
  611|      1|                                             (bool)ctx->udp_tunnel);
  612|      1|      if(result)
  ------------------
  |  Branch (612:10): [True: 0, False: 1]
  ------------------
  613|      0|        goto out;
  614|      1|    }
  615|    920|    else if(!strcmp(alpn, "http/1.1")) {
  ------------------
  |  Branch (615:13): [True: 920, False: 0]
  ------------------
  616|    920|      int httpversion = (ctx->proxytype == CURLPROXY_HTTP_1_0) ? 10 : 11;
  ------------------
  |  |  792|    920|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (616:25): [True: 0, False: 920]
  ------------------
  617|    920|      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/1.%d",
  ------------------
  |  |  153|    920|  do {                                          \
  |  |  154|    920|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    920|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.84k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 920, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 920]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.84k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    920|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    920|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    920|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 920]
  |  |  ------------------
  ------------------
  618|    920|                  httpversion % 10);
  619|    920|      result = Curl_cf_h1_proxy_insert_after(cf, data, ctx->dest, httpversion,
  620|    920|                                             (bool)ctx->udp_tunnel);
  621|    920|      if(result)
  ------------------
  |  Branch (621:10): [True: 0, False: 920]
  ------------------
  622|      0|        goto out;
  623|    920|    }
  624|      0|#ifdef USE_NGHTTP2
  625|      0|    else if(!strcmp(alpn, "h2")) {
  ------------------
  |  Branch (625:13): [True: 0, False: 0]
  ------------------
  626|      0|      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/2");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  627|      0|      result = Curl_cf_h2_proxy_insert_after(cf, data, ctx->dest,
  628|      0|                                             (bool)ctx->udp_tunnel);
  629|      0|      if(result)
  ------------------
  |  Branch (629:10): [True: 0, False: 0]
  ------------------
  630|      0|        goto out;
  631|      0|    }
  632|      0|#endif /* USE_NGHTTP2 */
  633|       |#if defined(USE_PROXY_HTTP3) && defined(USE_NGHTTP3) && \
  634|       |  defined(USE_NGTCP2) && defined(USE_OPENSSL)
  635|       |    else if(!strcmp(alpn, "h3")) {
  636|       |      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/3");
  637|       |      result = Curl_cf_h3_proxy_insert_after(cf, data, ctx->dest,
  638|       |                                             (bool)ctx->udp_tunnel);
  639|       |      if(result)
  640|       |        goto out;
  641|       |    }
  642|       |#endif /* USE_PROXY_HTTP3 && USE_NGHTTP3 && USE_NGTCP2 && USE_OPENSSL */
  643|      0|    else {
  644|      0|      failf(data, "%s: negotiated ALPN '%s' not supported", tunnel_type, alpn);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  645|      0|      result = CURLE_COULDNT_CONNECT;
  646|      0|      goto out;
  647|      0|    }
  648|       |
  649|    921|    ctx->sub_filter_installed = TRUE;
  ------------------
  |  | 1055|    921|#define TRUE true
  ------------------
  650|       |    /* after we installed the filter "below" us, we call connect
  651|       |     * on out sub-chain again.
  652|       |     */
  653|    921|    goto connect_sub;
  654|    921|  }
  655|     15|  else {
  656|       |    /* subchain connected and we had already installed the protocol filter.
  657|       |     * This means the protocol tunnel is established, we are done.
  658|       |     */
  659|     15|    DEBUGASSERT(ctx->sub_filter_installed);
  ------------------
  |  | 1081|     15|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (659:5): [True: 0, False: 15]
  |  Branch (659:5): [True: 15, False: 0]
  ------------------
  660|     15|    if(ctx->udp_tunnel) {
  ------------------
  |  Branch (660:8): [True: 0, False: 15]
  ------------------
  661|       |#ifdef USE_PROXY_HTTP3
  662|       |      /* Insert capsule filter between us and the protocol sub-filter.
  663|       |       * This handles encap/decap of UDP datagrams in capsule format. */
  664|       |      result = Curl_cf_capsule_insert_after(cf, data);
  665|       |      if(result)
  666|       |        goto out;
  667|       |      CURL_TRC_CF(data, cf, "installed capsule filter for UDP tunnel");
  668|       |#else
  669|      0|      result = CURLE_NOT_BUILT_IN;
  670|      0|      goto out;
  671|      0|#endif /* USE_PROXY_HTTP3 */
  672|      0|    }
  673|     15|    result = CURLE_OK;
  674|     15|  }
  675|       |
  676|     15|out:
  677|     15|  if(!result) {
  ------------------
  |  Branch (677:6): [True: 15, False: 0]
  ------------------
  678|     15|    cf->connected = TRUE;
  ------------------
  |  | 1055|     15|#define TRUE true
  ------------------
  679|       |    *done = TRUE;
  ------------------
  |  | 1055|     15|#define TRUE true
  ------------------
  680|     15|  }
  681|     15|  return result;
  682|    936|}
http_proxy.c:http_proxy_cf_close:
  728|  1.20k|{
  729|  1.20k|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|  1.20k|  do {                                          \
  |  |  154|  1.20k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.20k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.40k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.20k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.40k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.20k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.20k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.20k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.20k]
  |  |  ------------------
  ------------------
  730|  1.20k|  cf->connected = FALSE;
  ------------------
  |  | 1058|  1.20k|#define FALSE false
  ------------------
  731|  1.20k|  if(cf->next)
  ------------------
  |  Branch (731:6): [True: 1.20k, False: 0]
  ------------------
  732|  1.20k|    cf->next->cft->do_close(cf->next, data);
  733|  1.20k|}
http_proxy.c:cf_http_proxy_query:
  687|  2.96k|{
  688|  2.96k|  struct cf_proxy_ctx *ctx = cf->ctx;
  689|  2.96k|  switch(query) {
  690|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  177|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (690:3): [True: 0, False: 2.96k]
  ------------------
  691|      0|    *pres1 = (int)ctx->dest->port;
  692|      0|    *((const char **)pres2) = ctx->dest->hostname;
  693|      0|    return CURLE_OK;
  694|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  181|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (694:3): [True: 0, False: 2.96k]
  ------------------
  695|      0|    const char **palpn = pres2;
  696|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (696:5): [True: 0, False: 0]
  |  Branch (696:5): [True: 0, False: 0]
  ------------------
  697|      0|    *palpn = NULL;
  698|      0|    return CURLE_OK;
  699|      0|  }
  700|  2.96k|  default:
  ------------------
  |  Branch (700:3): [True: 2.96k, False: 0]
  ------------------
  701|  2.96k|    break;
  702|  2.96k|  }
  703|  2.96k|  return cf->next ?
  ------------------
  |  Branch (703:10): [True: 2.96k, False: 0]
  ------------------
  704|  2.96k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  705|  2.96k|    CURLE_UNKNOWN_OPTION;
  706|  2.96k|}
http_proxy.c:cf_https_proxy_ctx_free:
  709|  2.43k|{
  710|  2.43k|  if(ctx) {
  ------------------
  |  Branch (710:6): [True: 1.21k, False: 1.21k]
  ------------------
  711|  1.21k|    Curl_peer_unlink(&ctx->dest);
  712|  1.21k|    curlx_free(ctx);
  ------------------
  |  | 1483|  1.21k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  713|  1.21k|  }
  714|  2.43k|}

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

Curl_ipv6_scope:
   62|  5.42k|{
   63|  5.42k|  if(sa->sa_family == AF_INET6) {
  ------------------
  |  Branch (63:6): [True: 96, False: 5.32k]
  ------------------
   64|     96|    const struct sockaddr_in6 *sa6 =
   65|     96|      (const struct sockaddr_in6 *)(const void *)sa;
   66|     96|    const unsigned char *b = sa6->sin6_addr.s6_addr;
   67|     96|    unsigned short w = (unsigned short)((b[0] << 8) | b[1]);
   68|       |
   69|     96|    if((b[0] & 0xFE) == 0xFC) /* Handle ULAs */
  ------------------
  |  Branch (69:8): [True: 1, False: 95]
  ------------------
   70|      1|      return IPV6_SCOPE_UNIQUELOCAL;
  ------------------
  |  |   32|      1|#define IPV6_SCOPE_UNIQUELOCAL  3       /* Unique local */
  ------------------
   71|     95|    switch(w & 0xFFC0) {
   72|      1|    case 0xFE80:
  ------------------
  |  Branch (72:5): [True: 1, False: 94]
  ------------------
   73|      1|      return IPV6_SCOPE_LINKLOCAL;
  ------------------
  |  |   30|      1|#define IPV6_SCOPE_LINKLOCAL    1       /* Link-local scope. */
  ------------------
   74|      1|    case 0xFEC0:
  ------------------
  |  Branch (74:5): [True: 1, False: 94]
  ------------------
   75|      1|      return IPV6_SCOPE_SITELOCAL;
  ------------------
  |  |   31|      1|#define IPV6_SCOPE_SITELOCAL    2       /* Site-local scope (deprecated). */
  ------------------
   76|     83|    case 0x0000:
  ------------------
  |  Branch (76:5): [True: 83, False: 12]
  ------------------
   77|     83|      w = b[1] | b[2] | b[3] | b[4] | b[5] | b[6] | b[7] | b[8] | b[9] |
   78|     83|          b[10] | b[11] | b[12] | b[13] | b[14];
   79|     83|      if(w || b[15] != 0x01)
  ------------------
  |  Branch (79:10): [True: 11, False: 72]
  |  Branch (79:15): [True: 12, False: 60]
  ------------------
   80|     23|        break;
   81|     60|      return IPV6_SCOPE_NODELOCAL;
  ------------------
  |  |   33|     60|#define IPV6_SCOPE_NODELOCAL    4       /* Loopback. */
  ------------------
   82|     10|    default:
  ------------------
  |  Branch (82:5): [True: 10, False: 85]
  ------------------
   83|     10|      break;
   84|     95|    }
   85|     95|  }
   86|  5.36k|  return IPV6_SCOPE_GLOBAL;
  ------------------
  |  |   29|  5.36k|#define IPV6_SCOPE_GLOBAL       0       /* Global scope. */
  ------------------
   87|  5.42k|}
Curl_if2ip:
  101|    160|{
  102|    160|  struct ifaddrs *iface, *head;
  103|    160|  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|    160|  if(getifaddrs(&head) >= 0) {
  ------------------
  |  Branch (109:6): [True: 160, False: 0]
  ------------------
  110|    796|    for(iface = head; iface != NULL; iface = iface->ifa_next) {
  ------------------
  |  Branch (110:23): [True: 638, False: 158]
  ------------------
  111|    638|      if(iface->ifa_addr) {
  ------------------
  |  Branch (111:10): [True: 638, False: 0]
  ------------------
  112|    638|        if(iface->ifa_addr->sa_family == af) {
  ------------------
  |  Branch (112:12): [True: 224, False: 414]
  ------------------
  113|    224|          if(curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (113:14): [True: 2, False: 222]
  ------------------
  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));
  ------------------
  |  |   44|      2|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  ------------------
  159|      2|            curl_msnprintf(buf, buf_size, "%s%s", ip, scope);
  160|      2|            break;
  161|      2|          }
  162|    224|        }
  163|    414|        else if((res == IF2IP_NOT_FOUND) &&
  ------------------
  |  Branch (163:17): [True: 409, False: 5]
  ------------------
  164|    409|                curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (164:17): [True: 3, False: 406]
  ------------------
  165|      3|          res = IF2IP_AF_NOT_SUPPORTED;
  166|      3|        }
  167|    638|      }
  168|    638|    }
  169|       |
  170|    160|    freeifaddrs(head);
  171|    160|  }
  172|       |
  173|    160|  return res;
  174|    160|}

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

Curl_MD5_init:
  567|     17|{
  568|     17|  struct MD5_context *ctxt;
  569|       |
  570|       |  /* Create MD5 context */
  571|     17|  ctxt = curlx_malloc(sizeof(*ctxt));
  ------------------
  |  | 1478|     17|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  572|       |
  573|     17|  if(!ctxt)
  ------------------
  |  Branch (573:6): [True: 0, False: 17]
  ------------------
  574|      0|    return ctxt;
  575|       |
  576|     17|  ctxt->md5_hashctx = curlx_malloc(md5params->md5_ctxtsize);
  ------------------
  |  | 1478|     17|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  577|       |
  578|     17|  if(!ctxt->md5_hashctx) {
  ------------------
  |  Branch (578:6): [True: 0, False: 17]
  ------------------
  579|      0|    curlx_free(ctxt);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  580|      0|    return NULL;
  581|      0|  }
  582|       |
  583|     17|  ctxt->md5_hash = md5params;
  584|       |
  585|     17|  if((*md5params->md5_init_func)(ctxt->md5_hashctx)) {
  ------------------
  |  Branch (585:6): [True: 0, False: 17]
  ------------------
  586|      0|    curlx_free(ctxt->md5_hashctx);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  587|      0|    curlx_free(ctxt);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  588|      0|    return NULL;
  589|      0|  }
  590|       |
  591|     17|  return ctxt;
  592|     17|}
Curl_MD5_update:
  596|     34|{
  597|     34|  (*context->md5_hash->md5_update_func)(context->md5_hashctx, input, len);
  598|       |
  599|     34|  return CURLE_OK;
  600|     34|}
Curl_MD5_final:
  603|     17|{
  604|     17|  (*context->md5_hash->md5_final_func)(result, context->md5_hashctx);
  605|       |
  606|     17|  curlx_free(context->md5_hashctx);
  ------------------
  |  | 1483|     17|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  607|     17|  curlx_free(context);
  ------------------
  |  | 1483|     17|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  608|       |
  609|     17|  return CURLE_OK;
  610|     17|}
md5.c:my_md5_init:
   82|    102|{
   83|    102|  if(!MD5_Init(ctx))
  ------------------
  |  Branch (83:6): [True: 0, False: 102]
  ------------------
   84|      0|    return CURLE_OUT_OF_MEMORY;
   85|       |
   86|    102|  return CURLE_OK;
   87|    102|}
md5.c:my_md5_update:
   91|  4.56k|{
   92|  4.56k|  (void)MD5_Update(ctx, input, len);
   93|  4.56k|}
md5.c:my_md5_final:
   96|    102|{
   97|    102|  (void)MD5_Final(digest, ctx);
   98|    102|}

curl_dbg_malloc:
  212|   342k|{
  213|   342k|  struct memdebug *mem;
  214|   342k|  size_t size;
  215|       |
  216|   342k|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1081|   342k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 0, False: 342k]
  |  Branch (216:3): [True: 342k, False: 0]
  ------------------
  217|       |
  218|   342k|  if(countcheck("malloc", line, source))
  ------------------
  |  Branch (218:6): [True: 0, False: 342k]
  ------------------
  219|      0|    return NULL;
  220|       |
  221|       |  /* alloc at least 64 bytes */
  222|   342k|  size = sizeof(struct memdebug) + wantedsize;
  223|       |
  224|   342k|  mem = Curl_cmalloc(size);
  225|   342k|  if(mem) {
  ------------------
  |  Branch (225:6): [True: 342k, False: 1]
  ------------------
  226|   342k|    mem->size = wantedsize;
  227|   342k|  }
  228|       |
  229|   342k|  if(source)
  ------------------
  |  Branch (229:6): [True: 126k, False: 215k]
  ------------------
  230|   126k|    curl_dbg_log("MEM %s:%d malloc(%zu) = %p\n",
  231|   126k|                 source, line, wantedsize,
  232|   126k|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (232:18): [True: 126k, False: 0]
  ------------------
  233|       |
  234|   342k|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (234:10): [True: 342k, False: 1]
  ------------------
  235|   342k|}
curl_dbg_calloc:
  240|   332k|{
  241|   332k|  struct memdebug *mem;
  242|   332k|  size_t size, user_size;
  243|       |
  244|   332k|  DEBUGASSERT(wanted_elements != 0);
  ------------------
  |  | 1081|   332k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:3): [True: 0, False: 332k]
  |  Branch (244:3): [True: 332k, False: 0]
  ------------------
  245|   332k|  DEBUGASSERT(wanted_size != 0);
  ------------------
  |  | 1081|   332k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (245:3): [True: 0, False: 332k]
  |  Branch (245:3): [True: 332k, False: 0]
  ------------------
  246|       |
  247|   332k|  if(countcheck("calloc", line, source))
  ------------------
  |  Branch (247:6): [True: 0, False: 332k]
  ------------------
  248|      0|    return NULL;
  249|       |
  250|       |  /* alloc at least 64 bytes */
  251|   332k|  user_size = wanted_size * wanted_elements;
  252|   332k|  size = sizeof(struct memdebug) + user_size;
  253|       |
  254|   332k|  mem = Curl_ccalloc(1, size);
  255|   332k|  if(mem)
  ------------------
  |  Branch (255:6): [True: 332k, False: 0]
  ------------------
  256|   332k|    mem->size = user_size;
  257|       |
  258|   332k|  if(source)
  ------------------
  |  Branch (258:6): [True: 332k, False: 0]
  ------------------
  259|   332k|    curl_dbg_log("MEM %s:%d calloc(%zu,%zu) = %p\n",
  260|   332k|                 source, line, wanted_elements, wanted_size,
  261|   332k|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (261:18): [True: 332k, False: 0]
  ------------------
  262|       |
  263|   332k|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (263:10): [True: 332k, False: 0]
  ------------------
  264|   332k|}
curl_dbg_strdup:
  268|   215k|{
  269|   215k|  char *mem;
  270|   215k|  size_t len;
  271|       |
  272|   215k|  DEBUGASSERT(str != NULL);
  ------------------
  |  | 1081|   215k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (272:3): [True: 0, False: 215k]
  |  Branch (272:3): [True: 215k, False: 0]
  ------------------
  273|       |
  274|   215k|  if(countcheck("strdup", line, source))
  ------------------
  |  Branch (274:6): [True: 0, False: 215k]
  ------------------
  275|      0|    return NULL;
  276|       |
  277|   215k|  len = strlen(str) + 1;
  278|       |
  279|   215k|  mem = curl_dbg_malloc(len, 0, NULL); /* NULL prevents logging */
  280|   215k|  if(mem)
  ------------------
  |  Branch (280:6): [True: 215k, False: 0]
  ------------------
  281|   215k|    memcpy(mem, str, len);
  282|       |
  283|   215k|  if(source)
  ------------------
  |  Branch (283:6): [True: 215k, False: 0]
  ------------------
  284|   215k|    curl_dbg_log("MEM %s:%d strdup(%p) (%zu) = %p\n",
  285|   215k|                 source, line, (const void *)str, len, (const void *)mem);
  286|       |
  287|   215k|  return mem;
  288|   215k|}
curl_dbg_realloc:
  321|   115k|{
  322|   115k|  struct memdebug *mem = NULL;
  323|   115k|  bool was_locked;
  324|       |
  325|   115k|  size_t size = sizeof(struct memdebug) + wantedsize;
  326|       |
  327|   115k|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1081|   115k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (327:3): [True: 0, False: 115k]
  |  Branch (327:3): [True: 115k, False: 0]
  ------------------
  328|       |
  329|   115k|  if(countcheck("realloc", line, source))
  ------------------
  |  Branch (329:6): [True: 0, False: 115k]
  ------------------
  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|   115k|  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|   115k|  if(ptr)
  ------------------
  |  Branch (342:6): [True: 33.5k, False: 81.9k]
  ------------------
  343|  33.5k|    mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
  344|       |
  345|       |#ifdef __INTEL_COMPILER
  346|       |#  pragma warning(pop)
  347|       |#endif
  348|       |
  349|   115k|  mem = Curl_crealloc(mem, size);
  350|   115k|  if(source)
  ------------------
  |  Branch (350:6): [True: 115k, False: 0]
  ------------------
  351|   115k|    curl_dbg_log_locked("MEM %s:%d realloc(%p, %zu) = %p\n",
  352|   115k|                        source, line, (void *)ptr, wantedsize,
  353|   115k|                        mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (353:25): [True: 115k, False: 0]
  ------------------
  354|       |
  355|   115k|  curl_dbg_unlock(was_locked);
  356|   115k|  if(mem) {
  ------------------
  |  Branch (356:6): [True: 115k, False: 0]
  ------------------
  357|   115k|    mem->size = wantedsize;
  358|   115k|    return mem->mem;
  359|   115k|  }
  360|       |
  361|      0|  return NULL;
  362|   115k|}
curl_dbg_free:
  365|  5.68M|{
  366|  5.68M|  if(ptr) {
  ------------------
  |  Branch (366:6): [True: 756k, False: 4.92M]
  ------------------
  367|   756k|    struct memdebug *mem;
  368|       |
  369|   756k|    if(source)
  ------------------
  |  Branch (369:8): [True: 756k, False: 0]
  ------------------
  370|   756k|      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|   756k|    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|   756k|    Curl_cfree(mem);
  386|   756k|  }
  387|  5.68M|}
curl_dbg_socket:
  391|  10.1k|{
  392|  10.1k|  curl_socket_t sockfd;
  393|       |
  394|  10.1k|  if(countcheck("socket", line, source))
  ------------------
  |  Branch (394:6): [True: 0, False: 10.1k]
  ------------------
  395|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  396|       |
  397|       |  /* !checksrc! disable BANNEDFUNC 1 */
  398|  10.1k|  sockfd = socket(domain, type, protocol);
  399|       |
  400|  10.1k|  if(source && (sockfd != CURL_SOCKET_BAD))
  ------------------
  |  |  145|  10.1k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (400:6): [True: 10.1k, False: 0]
  |  Branch (400:16): [True: 10.1k, False: 0]
  ------------------
  401|  10.1k|    curl_dbg_log("FD %s:%d socket() = %" FMT_SOCKET_T "\n",
  402|  10.1k|                 source, line, sockfd);
  403|       |
  404|  10.1k|  return sockfd;
  405|  10.1k|}
curl_dbg_mark_sclose:
  461|  15.5k|{
  462|  15.5k|  if(source)
  ------------------
  |  Branch (462:6): [True: 15.5k, False: 0]
  ------------------
  463|  15.5k|    curl_dbg_log("FD %s:%d sclose(%" FMT_SOCKET_T ")\n",
  464|  15.5k|                 source, line, sockfd);
  465|  15.5k|}
curl_dbg_sclose:
  469|  15.5k|{
  470|  15.5k|  curl_dbg_mark_sclose(sockfd, line, source);
  471|  15.5k|  return CURL_SCLOSE(sockfd);
  ------------------
  |  |  999|  15.5k|#  define CURL_SCLOSE(x)  close(x)
  ------------------
  472|  15.5k|}
curl_dbg_fopen:
  477|  50.5k|{
  478|  50.5k|  FILE *res = CURLX_FOPEN_LOW(file, mode);
  ------------------
  |  |   64|  50.5k|#define CURLX_FOPEN_LOW         fopen
  ------------------
  479|  50.5k|  if(source)
  ------------------
  |  Branch (479:6): [True: 50.5k, False: 0]
  ------------------
  480|  50.5k|    curl_dbg_log("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n",
  481|  50.5k|                 source, line, file, mode, (void *)res);
  482|       |
  483|  50.5k|  return res;
  484|  50.5k|}
curl_dbg_fclose:
  510|  50.5k|{
  511|  50.5k|  int res;
  512|       |
  513|  50.5k|  DEBUGASSERT(file != NULL);
  ------------------
  |  | 1081|  50.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (513:3): [True: 0, False: 50.5k]
  |  Branch (513:3): [True: 50.5k, False: 0]
  ------------------
  514|       |
  515|  50.5k|  if(source)
  ------------------
  |  Branch (515:6): [True: 50.5k, False: 0]
  ------------------
  516|  50.5k|    curl_dbg_log("FILE %s:%d fclose(%p)\n", source, line, (void *)file);
  517|       |
  518|       |  /* !checksrc! disable BANNEDFUNC 1 */
  519|  50.5k|  res = fclose(file);
  520|       |
  521|  50.5k|  return res;
  522|  50.5k|}
curl_dbg_log:
  565|  1.55M|{
  566|  1.55M|  bool was_locked;
  567|  1.55M|  va_list ap;
  568|       |
  569|  1.55M|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (569:6): [True: 1.55M, False: 18.4E]
  ------------------
  570|  1.55M|    return;
  571|       |
  572|  18.4E|  was_locked = curl_dbg_lock();
  573|  18.4E|  va_start(ap, format);
  574|  18.4E|  curl_dbg_vlog(format, ap);
  575|       |  va_end(ap);
  576|  18.4E|  curl_dbg_unlock(was_locked);
  577|  18.4E|}
memdebug.c:countcheck:
  187|  1.01M|{
  188|       |  /* if source is NULL, then the call is made internally and this check
  189|       |     should not be made */
  190|  1.01M|  if(memlimit && source) {
  ------------------
  |  Branch (190:6): [True: 0, False: 1.01M]
  |  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! */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  202|      0|    }
  203|      0|    else
  204|      0|      memsize--; /* countdown */
  205|      0|  }
  206|       |
  207|  1.01M|  return FALSE; /* allow this */
  ------------------
  |  | 1058|  1.01M|#define FALSE false
  ------------------
  208|  1.01M|}
memdebug.c:curl_dbg_lock:
   74|   115k|{
   75|   115k|#ifdef USE_MUTEX
   76|   115k|  if(dbg_mutex_init) {
  ------------------
  |  Branch (76:6): [True: 0, False: 115k]
  ------------------
   77|      0|    Curl_mutex_acquire(&dbg_mutex);
  ------------------
  |  |   36|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
   78|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
   79|      0|  }
   80|   115k|#endif
   81|   115k|  return FALSE;
  ------------------
  |  | 1058|   115k|#define FALSE false
  ------------------
   82|   115k|}
memdebug.c:curl_dbg_unlock:
   85|   115k|{
   86|   115k|#ifdef USE_MUTEX
   87|   115k|  if(was_locked)
  ------------------
  |  Branch (87:6): [True: 0, False: 115k]
  ------------------
   88|      0|    Curl_mutex_release(&dbg_mutex);
  ------------------
  |  |   37|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
   89|       |#else
   90|       |  (void)was_locked;
   91|       |#endif
   92|   115k|}
memdebug.c:curl_dbg_log_locked:
  552|   115k|{
  553|   115k|  va_list ap;
  554|       |
  555|   115k|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (555:6): [True: 115k, False: 0]
  ------------------
  556|   115k|    return;
  557|       |
  558|   115k|  va_start(ap, format);
  559|      0|  curl_dbg_vlog(format, ap);
  560|       |  va_end(ap);
  561|      0|}

Curl_mime_cleanpart:
 1090|  47.6k|{
 1091|  47.6k|  if(part) {
  ------------------
  |  Branch (1091:6): [True: 2.69k, False: 44.9k]
  ------------------
 1092|  2.69k|    cleanup_part_content(part);
 1093|  2.69k|    curl_slist_free_all(part->curlheaders);
 1094|  2.69k|    if(part->flags & MIME_USERHEADERS_OWNER)
  ------------------
  |  |   34|  2.69k|#define MIME_USERHEADERS_OWNER  (1 << 0)
  ------------------
  |  Branch (1094:8): [True: 0, False: 2.69k]
  ------------------
 1095|      0|      curl_slist_free_all(part->userheaders);
 1096|  2.69k|    curlx_safefree(part->mimetype);
  ------------------
  |  | 1327|  2.69k|  do {                      \
  |  | 1328|  2.69k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  2.69k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  2.69k|    (ptr) = NULL;           \
  |  | 1330|  2.69k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 2.69k]
  |  |  ------------------
  ------------------
 1097|  2.69k|    curlx_safefree(part->name);
  ------------------
  |  | 1327|  2.69k|  do {                      \
  |  | 1328|  2.69k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  2.69k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  2.69k|    (ptr) = NULL;           \
  |  | 1330|  2.69k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 2.69k]
  |  |  ------------------
  ------------------
 1098|       |    curlx_safefree(part->filename);
  ------------------
  |  | 1327|  2.69k|  do {                      \
  |  | 1328|  2.69k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  2.69k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  2.69k|    (ptr) = NULL;           \
  |  | 1330|  2.69k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 2.69k]
  |  |  ------------------
  ------------------
 1099|  2.69k|    Curl_mime_initpart(part);
 1100|  2.69k|  }
 1101|  47.6k|}
curl_mime_free:
 1105|    144|{
 1106|    144|  curl_mimepart *part;
 1107|       |
 1108|    144|  if(mime) {
  ------------------
  |  Branch (1108:6): [True: 144, False: 0]
  ------------------
 1109|    144|    mime_subparts_unbind(mime);  /* Be sure it is not referenced anymore. */
 1110|  2.71k|    while(mime->firstpart) {
  ------------------
  |  Branch (1110:11): [True: 2.56k, False: 144]
  ------------------
 1111|  2.56k|      part = mime->firstpart;
 1112|  2.56k|      mime->firstpart = part->nextpart;
 1113|  2.56k|      Curl_mime_cleanpart(part);
 1114|  2.56k|      curlx_free(part);
  ------------------
  |  | 1483|  2.56k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1115|  2.56k|    }
 1116|    144|    curlx_free(mime);
  ------------------
  |  | 1483|    144|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1117|    144|  }
 1118|    144|}
curl_mime_init:
 1204|    144|{
 1205|    144|  curl_mime *mime;
 1206|       |
 1207|    144|  mime = (curl_mime *)curlx_malloc(sizeof(*mime));
  ------------------
  |  | 1478|    144|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1208|       |
 1209|    144|  if(mime) {
  ------------------
  |  Branch (1209:6): [True: 144, False: 0]
  ------------------
 1210|    144|    mime->parent = NULL;
 1211|    144|    mime->firstpart = NULL;
 1212|    144|    mime->lastpart = NULL;
 1213|       |
 1214|    144|    memset(mime->boundary, '-', MIME_BOUNDARY_DASHES);
  ------------------
  |  |   28|    144|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1215|    144|    if(Curl_rand_alnum(easy,
  ------------------
  |  Branch (1215:8): [True: 0, False: 144]
  ------------------
 1216|    144|                       (unsigned char *)&mime->boundary[MIME_BOUNDARY_DASHES],
  ------------------
  |  |   28|    144|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1217|    144|                       MIME_RAND_BOUNDARY_CHARS + 1)) {
  ------------------
  |  |   29|    144|#define MIME_RAND_BOUNDARY_CHARS        22  /* Nb. of random boundary chars. */
  ------------------
 1218|       |      /* failed to get random separator, bail out */
 1219|      0|      curlx_free(mime);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1220|      0|      return NULL;
 1221|      0|    }
 1222|    144|    mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
 1223|    144|  }
 1224|       |
 1225|    144|  return mime;
 1226|    144|}
Curl_mime_initpart:
 1230|  5.39k|{
 1231|  5.39k|  memset(part, 0, sizeof(*part));
 1232|  5.39k|  part->lastreadstatus = 1; /* Successful read status. */
 1233|       |  mimesetstate(&part->state, MIMESTATE_BEGIN, NULL);
 1234|  5.39k|}
curl_mime_addpart:
 1238|  2.56k|{
 1239|  2.56k|  curl_mimepart *part;
 1240|       |
 1241|  2.56k|  if(!mime)
  ------------------
  |  Branch (1241:6): [True: 0, False: 2.56k]
  ------------------
 1242|      0|    return NULL;
 1243|       |
 1244|  2.56k|  part = (curl_mimepart *)curlx_malloc(sizeof(*part));
  ------------------
  |  | 1478|  2.56k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1245|       |
 1246|  2.56k|  if(part) {
  ------------------
  |  Branch (1246:6): [True: 2.56k, False: 0]
  ------------------
 1247|  2.56k|    Curl_mime_initpart(part);
 1248|  2.56k|    part->parent = mime;
 1249|       |
 1250|  2.56k|    if(mime->lastpart)
  ------------------
  |  Branch (1250:8): [True: 2.42k, False: 144]
  ------------------
 1251|  2.42k|      mime->lastpart->nextpart = part;
 1252|    144|    else
 1253|    144|      mime->firstpart = part;
 1254|       |
 1255|  2.56k|    mime->lastpart = part;
 1256|  2.56k|  }
 1257|       |
 1258|  2.56k|  return part;
 1259|  2.56k|}
curl_mime_name:
 1263|    257|{
 1264|    257|  if(!part)
  ------------------
  |  Branch (1264:6): [True: 0, False: 257]
  ------------------
 1265|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1266|       |
 1267|    257|  curlx_safefree(part->name);
  ------------------
  |  | 1327|    257|  do {                      \
  |  | 1328|    257|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    257|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    257|    (ptr) = NULL;           \
  |  | 1330|    257|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 257]
  |  |  ------------------
  ------------------
 1268|       |
 1269|    257|  if(name) {
  ------------------
  |  Branch (1269:6): [True: 257, False: 0]
  ------------------
 1270|    257|    part->name = curlx_strdup(name);
  ------------------
  |  | 1477|    257|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1271|    257|    if(!part->name)
  ------------------
  |  Branch (1271:8): [True: 0, False: 257]
  ------------------
 1272|      0|      return CURLE_OUT_OF_MEMORY;
 1273|    257|  }
 1274|       |
 1275|    257|  return CURLE_OK;
 1276|    257|}
curl_mime_data:
 1297|    474|{
 1298|    474|  if(!part)
  ------------------
  |  Branch (1298:6): [True: 0, False: 474]
  ------------------
 1299|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1300|       |
 1301|    474|  cleanup_part_content(part);
 1302|       |
 1303|    474|  if(data) {
  ------------------
  |  Branch (1303:6): [True: 474, False: 0]
  ------------------
 1304|    474|    if(datasize == CURL_ZERO_TERMINATED)
  ------------------
  |  | 2423|    474|#define CURL_ZERO_TERMINATED ((size_t)-1)
  ------------------
  |  Branch (1304:8): [True: 0, False: 474]
  ------------------
 1305|      0|      datasize = strlen(data);
 1306|       |
 1307|    474|    part->data = curlx_memdup0(data, datasize);
 1308|    474|    if(!part->data)
  ------------------
  |  Branch (1308:8): [True: 0, False: 474]
  ------------------
 1309|      0|      return CURLE_OUT_OF_MEMORY;
 1310|       |
 1311|    474|    part->datasize = datasize;
 1312|    474|    part->readfunc = mime_mem_read;
 1313|    474|    part->seekfunc = mime_mem_seek;
 1314|    474|    part->freefunc = mime_mem_free;
 1315|    474|    part->flags |= MIME_FAST_READ;
  ------------------
  |  |   36|    474|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1316|    474|    part->kind = MIMEKIND_DATA;
 1317|    474|  }
 1318|       |
 1319|    474|  return CURLE_OK;
 1320|    474|}
Curl_mime_set_subparts:
 1463|    127|{
 1464|    127|  curl_mime *root;
 1465|       |
 1466|    127|  if(!part)
  ------------------
  |  Branch (1466:6): [True: 0, False: 127]
  ------------------
 1467|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1468|       |
 1469|       |  /* Accept setting twice the same subparts. */
 1470|    127|  if(part->kind == MIMEKIND_MULTIPART && part->arg == subparts)
  ------------------
  |  Branch (1470:6): [True: 0, False: 127]
  |  Branch (1470:42): [True: 0, False: 0]
  ------------------
 1471|      0|    return CURLE_OK;
 1472|       |
 1473|    127|  cleanup_part_content(part);
 1474|       |
 1475|    127|  if(subparts) {
  ------------------
  |  Branch (1475:6): [True: 127, False: 0]
  ------------------
 1476|       |    /* Should not have been attached already. */
 1477|    127|    if(subparts->parent)
  ------------------
  |  Branch (1477:8): [True: 0, False: 127]
  ------------------
 1478|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1479|       |
 1480|       |    /* Should not be the part's root. */
 1481|    127|    root = part->parent;
 1482|    127|    if(root) {
  ------------------
  |  Branch (1482:8): [True: 0, False: 127]
  ------------------
 1483|      0|      while(root->parent && root->parent->parent)
  ------------------
  |  Branch (1483:13): [True: 0, False: 0]
  |  Branch (1483:29): [True: 0, False: 0]
  ------------------
 1484|      0|        root = root->parent->parent;
 1485|      0|      if(subparts == root) {
  ------------------
  |  Branch (1485:10): [True: 0, False: 0]
  ------------------
 1486|       |        /* cannot add as a subpart of itself. */
 1487|      0|        return CURLE_BAD_FUNCTION_ARGUMENT;
 1488|      0|      }
 1489|      0|    }
 1490|       |
 1491|       |    /* If subparts have already been used as a top-level MIMEPOST,
 1492|       |       they might not be positioned at start. Rewind them now, as
 1493|       |       a future check while rewinding the parent may cause this
 1494|       |       content to be skipped. */
 1495|    127|    if(mime_subparts_seek(subparts, (curl_off_t)0, SEEK_SET) !=
  ------------------
  |  Branch (1495:8): [True: 0, False: 127]
  ------------------
 1496|    127|       CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|    127|#define CURL_SEEKFUNC_OK       0
  ------------------
 1497|      0|      return CURLE_SEND_FAIL_REWIND;
 1498|       |
 1499|    127|    subparts->parent = part;
 1500|       |    /* Subparts are processed internally: no read callback. */
 1501|    127|    part->seekfunc = mime_subparts_seek;
 1502|    127|    part->freefunc = take_ownership ? mime_subparts_free :
  ------------------
  |  Branch (1502:22): [True: 0, False: 127]
  ------------------
 1503|    127|      mime_subparts_unbind;
 1504|    127|    part->arg = subparts;
 1505|    127|    part->datasize = -1;
 1506|    127|    part->kind = MIMEKIND_MULTIPART;
 1507|    127|  }
 1508|       |
 1509|    127|  return CURLE_OK;
 1510|    127|}
mime.c:cleanup_part_content:
 1048|  3.42k|{
 1049|  3.42k|  if(part->freefunc)
  ------------------
  |  Branch (1049:6): [True: 474, False: 2.94k]
  ------------------
 1050|    474|    part->freefunc(part->arg);
 1051|       |
 1052|  3.42k|  part->readfunc = NULL;
 1053|  3.42k|  part->seekfunc = NULL;
 1054|  3.42k|  part->freefunc = NULL;
 1055|  3.42k|  part->arg = (void *)part;           /* Defaults to part itself. */
 1056|  3.42k|  part->data = NULL;
 1057|  3.42k|  part->fp = NULL;
 1058|  3.42k|  part->datasize = (curl_off_t)0;     /* No size yet. */
 1059|  3.42k|  cleanup_encoder_state(&part->encstate);
 1060|  3.42k|  part->kind = MIMEKIND_NONE;
 1061|  3.42k|  part->flags &= ~(unsigned int)MIME_FAST_READ;
  ------------------
  |  |   36|  3.42k|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1062|  3.42k|  part->lastreadstatus = 1; /* Successful read status. */
 1063|  3.42k|  part->state.state = MIMESTATE_BEGIN;
 1064|  3.42k|}
mime.c:cleanup_encoder_state:
  284|  3.42k|{
  285|  3.42k|  p->pos = 0;
  286|  3.42k|  p->bufbeg = 0;
  287|  3.42k|  p->bufend = 0;
  288|  3.42k|}
mime.c:mime_subparts_unbind:
 1079|    144|{
 1080|    144|  curl_mime *mime = (curl_mime *)ptr;
 1081|       |
 1082|    144|  if(mime && mime->parent) {
  ------------------
  |  Branch (1082:6): [True: 144, False: 0]
  |  Branch (1082:14): [True: 127, False: 17]
  ------------------
 1083|    127|    mime->parent->freefunc = NULL;  /* Be sure we will not be called again. */
 1084|    127|    cleanup_part_content(mime->parent);  /* Avoid dangling pointer in part. */
 1085|       |    mime->parent = NULL;
 1086|    127|  }
 1087|    144|}
mime.c:mimesetstate:
  190|  5.53k|{
  191|  5.53k|  state->state = tok;
  192|  5.53k|  state->ptr = ptr;
  193|  5.53k|  state->offset = 0;
  194|  5.53k|}
mime.c:mime_mem_free:
  605|    474|{
  606|       |  curlx_safefree(((curl_mimepart *)ptr)->data);
  ------------------
  |  | 1327|    474|  do {                      \
  |  | 1328|    474|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    474|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    474|    (ptr) = NULL;           \
  |  | 1330|    474|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 474]
  |  |  ------------------
  ------------------
  607|    474|}
mime.c:mime_subparts_seek:
 1023|    127|{
 1024|    127|  curl_mime *mime = (curl_mime *)instream;
 1025|    127|  curl_mimepart *part;
 1026|    127|  int rc = CURL_SEEKFUNC_OK;
  ------------------
  |  |  380|    127|#define CURL_SEEKFUNC_OK       0
  ------------------
 1027|       |
 1028|    127|  if(whence != SEEK_SET || offset)
  ------------------
  |  Branch (1028:6): [True: 0, False: 127]
  |  Branch (1028:28): [True: 0, False: 127]
  ------------------
 1029|      0|    return CURL_SEEKFUNC_CANTSEEK;    /* Only support full rewind. */
  ------------------
  |  |  382|      0|#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking cannot be done, so
  ------------------
 1030|       |
 1031|    127|  if(mime->state.state == MIMESTATE_BEGIN)
  ------------------
  |  Branch (1031:6): [True: 127, False: 0]
  ------------------
 1032|    127|    return CURL_SEEKFUNC_OK;           /* Already rewound. */
  ------------------
  |  |  380|    127|#define CURL_SEEKFUNC_OK       0
  ------------------
 1033|       |
 1034|      0|  for(part = mime->firstpart; part; part = part->nextpart) {
  ------------------
  |  Branch (1034:31): [True: 0, False: 0]
  ------------------
 1035|      0|    int res = mime_part_rewind(part);
 1036|      0|    if(res != CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|      0|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1036:8): [True: 0, False: 0]
  ------------------
 1037|      0|      rc = res;
 1038|      0|  }
 1039|       |
 1040|      0|  if(rc == CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|      0|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1040:6): [True: 0, False: 0]
  ------------------
 1041|      0|    mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
 1042|       |
 1043|      0|  return rc;
 1044|    127|}

curl_mvsnprintf:
 1106|   364k|{
 1107|   364k|  int retcode;
 1108|   364k|  struct nsprintf info;
 1109|       |
 1110|   364k|  info.buffer = buffer;
 1111|   364k|  info.length = 0;
 1112|   364k|  info.max = maxlength;
 1113|       |
 1114|   364k|  retcode = formatf(&info, addbyter, format, args);
 1115|   364k|  if(info.max) {
  ------------------
  |  Branch (1115:6): [True: 364k, False: 12]
  ------------------
 1116|       |    /* we terminate this with a zero byte */
 1117|   364k|    if(info.max == info.length) {
  ------------------
  |  Branch (1117:8): [True: 18, False: 364k]
  ------------------
 1118|       |      /* we are at maximum, scrap the last letter */
 1119|     18|      info.buffer[-1] = 0;
 1120|     18|      DEBUGASSERT(retcode);
  ------------------
  |  | 1081|     18|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1120:7): [True: 0, False: 18]
  |  Branch (1120:7): [True: 18, False: 0]
  ------------------
 1121|     18|      retcode--; /* do not count the nul byte */
 1122|     18|    }
 1123|   364k|    else
 1124|   364k|      info.buffer[0] = 0;
 1125|   364k|  }
 1126|   364k|  return retcode;
 1127|   364k|}
curl_msnprintf:
 1130|   364k|{
 1131|   364k|  int retcode;
 1132|   364k|  va_list args; /* argument pointer */
 1133|   364k|  va_start(args, format);
 1134|   364k|  retcode = curl_mvsnprintf(buffer, maxlength, format, args);
 1135|       |  va_end(args);
 1136|   364k|  return retcode;
 1137|   364k|}
curlx_dyn_vprintf:
 1153|  1.26M|{
 1154|  1.26M|  struct asprintf info;
 1155|  1.26M|  info.b = dyn;
 1156|  1.26M|  info.merr = MERR_OK;
  ------------------
  |  |   27|  1.26M|#define MERR_OK        0
  ------------------
 1157|       |
 1158|  1.26M|  (void)formatf(&info, alloc_addbyter, format, args);
 1159|  1.26M|  if(info.merr) {
  ------------------
  |  Branch (1159:6): [True: 33, False: 1.26M]
  ------------------
 1160|     33|    curlx_dyn_free(info.b);
 1161|     33|    return info.merr;
 1162|     33|  }
 1163|  1.26M|  return 0;
 1164|  1.26M|}
curl_mvaprintf:
 1167|  20.3k|{
 1168|  20.3k|  struct asprintf info;
 1169|  20.3k|  struct dynbuf dyn;
 1170|  20.3k|  info.b = &dyn;
 1171|  20.3k|  curlx_dyn_init(info.b, DYN_APRINTF);
  ------------------
  |  |   70|  20.3k|#define DYN_APRINTF         8000000
  ------------------
 1172|  20.3k|  info.merr = MERR_OK;
  ------------------
  |  |   27|  20.3k|#define MERR_OK        0
  ------------------
 1173|       |
 1174|  20.3k|  (void)formatf(&info, alloc_addbyter, format, args);
 1175|  20.3k|  if(info.merr) {
  ------------------
  |  Branch (1175:6): [True: 0, False: 20.3k]
  ------------------
 1176|      0|    curlx_dyn_free(info.b);
 1177|      0|    return NULL;
 1178|      0|  }
 1179|  20.3k|  if(curlx_dyn_len(info.b))
  ------------------
  |  Branch (1179:6): [True: 20.3k, False: 0]
  ------------------
 1180|  20.3k|    return curlx_dyn_ptr(info.b);
 1181|      0|  return curlx_strdup("");
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1182|  20.3k|}
curl_maprintf:
 1185|  20.3k|{
 1186|  20.3k|  va_list args;
 1187|  20.3k|  char *s;
 1188|  20.3k|  va_start(args, format);
 1189|  20.3k|  s = curl_mvaprintf(format, args);
 1190|       |  va_end(args);
 1191|  20.3k|  return s;
 1192|  20.3k|}
curl_mfprintf:
 1232|    560|{
 1233|    560|  int retcode;
 1234|    560|  va_list args; /* argument pointer */
 1235|    560|  va_start(args, format);
 1236|    560|  retcode = formatf(fd, fputc_wrapper, format, args);
 1237|       |  va_end(args);
 1238|    560|  return retcode;
 1239|    560|}
mprintf.c:formatf:
  976|  1.64M|{
  977|  1.64M|  int done = 0;   /* number of characters written */
  978|  1.64M|  int i;
  979|  1.64M|  int ocount = 0; /* number of output segments */
  980|  1.64M|  int icount = 0; /* number of input arguments */
  981|       |
  982|  1.64M|  struct outsegment output[MAX_SEGMENTS];
  983|  1.64M|  struct va_input input[MAX_PARAMETERS];
  984|  1.64M|  char work[BUFFSIZE + 2];
  985|       |
  986|       |  /* Parse the format string */
  987|  1.64M|  if(parsefmt(format, output, input, &ocount, &icount, ap_save))
  ------------------
  |  Branch (987:6): [True: 0, False: 1.64M]
  ------------------
  988|      0|    return 0;
  989|       |
  990|  3.47M|  for(i = 0; i < ocount; i++) {
  ------------------
  |  Branch (990:14): [True: 1.82M, False: 1.64M]
  ------------------
  991|  1.82M|    struct outsegment *optr = &output[i];
  992|  1.82M|    struct va_input *iptr = &input[optr->input];
  993|  1.82M|    struct mproperty p;
  994|  1.82M|    size_t outlen = optr->outlen;
  995|       |
  996|  1.82M|    if(outlen) {
  ------------------
  |  Branch (996:8): [True: 1.66M, False: 161k]
  ------------------
  997|  1.66M|      const char *str = optr->start;
  998|  3.51M|      for(; outlen && *str; outlen--) {
  ------------------
  |  Branch (998:13): [True: 1.85M, False: 1.66M]
  |  Branch (998:23): [True: 1.85M, False: 0]
  ------------------
  999|  1.85M|        if(stream(*str++, userp))
  ------------------
  |  Branch (999:12): [True: 6, False: 1.85M]
  ------------------
 1000|      6|          return done;
 1001|  1.85M|        done++;
 1002|  1.85M|      }
 1003|  1.66M|      if(optr->flags & FLAGS_SUBSTR)
  ------------------
  |  Branch (1003:10): [True: 20.4k, False: 1.64M]
  ------------------
 1004|       |        /* this is a substring */
 1005|  20.4k|        continue;
 1006|  1.66M|    }
 1007|       |
 1008|  1.80M|    p.flags = optr->flags;
 1009|       |
 1010|       |    /* pick up the specified width */
 1011|  1.80M|    if(p.flags & FLAGS_WIDTHPARAM) {
  ------------------
  |  Branch (1011:8): [True: 0, False: 1.80M]
  ------------------
 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|  1.80M|    else
 1025|  1.80M|      p.width = optr->width;
 1026|       |
 1027|       |    /* pick up the specified precision */
 1028|  1.80M|    if(p.flags & FLAGS_PRECPARAM) {
  ------------------
  |  Branch (1028:8): [True: 9.96k, False: 1.79M]
  ------------------
 1029|  9.96k|      p.prec = (int)input[optr->precision].val.nums;
 1030|  9.96k|      if(p.prec < 0)
  ------------------
  |  Branch (1030:10): [True: 0, False: 9.96k]
  ------------------
 1031|       |        /* "A negative precision is taken as if the precision were
 1032|       |           omitted." */
 1033|      0|        p.prec = -1;
 1034|  9.96k|    }
 1035|  1.79M|    else if(p.flags & FLAGS_PREC)
  ------------------
  |  Branch (1035:13): [True: 0, False: 1.79M]
  ------------------
 1036|      0|      p.prec = optr->precision;
 1037|  1.79M|    else
 1038|  1.79M|      p.prec = -1;
 1039|       |
 1040|  1.80M|    switch(iptr->type) {
 1041|  1.59M|    case MTYPE_INTU:
  ------------------
  |  Branch (1041:5): [True: 1.59M, False: 210k]
  ------------------
 1042|  1.59M|    case MTYPE_LONGU:
  ------------------
  |  Branch (1042:5): [True: 0, False: 1.80M]
  ------------------
 1043|  1.59M|    case MTYPE_LONGLONGU:
  ------------------
  |  Branch (1043:5): [True: 0, False: 1.80M]
  ------------------
 1044|  1.59M|      p.flags |= FLAGS_UNSIGNED;
 1045|  1.59M|      if(out_number(userp, stream, &p, iptr->val.numu, 0, work, &done))
  ------------------
  |  Branch (1045:10): [True: 8, False: 1.59M]
  ------------------
 1046|      8|        return done;
 1047|  1.59M|      break;
 1048|       |
 1049|  1.59M|    case MTYPE_INT:
  ------------------
  |  Branch (1049:5): [True: 6.73k, False: 1.79M]
  ------------------
 1050|  10.7k|    case MTYPE_LONG:
  ------------------
  |  Branch (1050:5): [True: 4.03k, False: 1.80M]
  ------------------
 1051|  10.7k|    case MTYPE_LONGLONG:
  ------------------
  |  Branch (1051:5): [True: 0, False: 1.80M]
  ------------------
 1052|  10.7k|      if(out_number(userp, stream, &p, iptr->val.numu,
  ------------------
  |  Branch (1052:10): [True: 0, False: 10.7k]
  ------------------
 1053|  10.7k|                    iptr->val.nums, work, &done))
 1054|      0|        return done;
 1055|  10.7k|      break;
 1056|       |
 1057|   199k|    case MTYPE_STRING:
  ------------------
  |  Branch (1057:5): [True: 199k, False: 1.60M]
  ------------------
 1058|   199k|      if(out_string(userp, stream, &p, iptr->val.str, &done))
  ------------------
  |  Branch (1058:10): [True: 37, False: 199k]
  ------------------
 1059|     37|        return done;
 1060|   199k|      break;
 1061|       |
 1062|   199k|    case MTYPE_PTR:
  ------------------
  |  Branch (1062:5): [True: 0, False: 1.80M]
  ------------------
 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: 1.80M]
  ------------------
 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: 1.80M]
  ------------------
 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: 1.80M]
  ------------------
 1085|      0|      break;
 1086|  1.80M|    }
 1087|  1.80M|  }
 1088|  1.64M|  return done;
 1089|  1.64M|}
mprintf.c:parsefmt:
  431|  1.64M|{
  432|  1.64M|  const char *fmt = format;
  433|  1.64M|  int param_num = 0;
  434|  1.64M|  int max_param = -1;
  435|  1.64M|  int i;
  436|  1.64M|  int ocount = 0;
  437|  1.64M|  unsigned char usedinput[MAX_PARAMETERS / 8];
  438|  1.64M|  size_t outlen = 0;
  439|  1.64M|  struct outsegment *optr;
  440|  1.64M|  int use_dollar = DOLLAR_UNKNOWN;
  441|  1.64M|  const char *start = fmt;
  442|       |
  443|       |  /* clear, set a bit for each used input */
  444|  1.64M|  memset(usedinput, 0, sizeof(usedinput));
  445|       |
  446|  5.30M|  while(*fmt) {
  ------------------
  |  Branch (446:9): [True: 3.66M, False: 1.64M]
  ------------------
  447|  3.66M|    if(*fmt == '%') {
  ------------------
  |  Branch (447:8): [True: 3.03M, False: 626k]
  ------------------
  448|  3.03M|      struct va_input *iptr;
  449|  3.03M|      FormatType type;
  450|  3.03M|      unsigned int flags = 0;
  451|  3.03M|      int width = 0;
  452|  3.03M|      int precision = 0;
  453|  3.03M|      int param = -1;
  454|  3.03M|      int rc;
  455|  3.03M|      fmt++;
  456|  3.03M|      outlen = (size_t)(fmt - start - 1);
  457|  3.03M|      if(*fmt == '%') {
  ------------------
  |  Branch (457:10): [True: 1.22M, False: 1.80M]
  ------------------
  458|       |        /* this means a %% that should be output only as %. Create an output
  459|       |           segment. */
  460|  1.22M|        if(outlen) {
  ------------------
  |  Branch (460:12): [True: 255, False: 1.22M]
  ------------------
  461|    255|          optr = &out[ocount++];
  462|    255|          if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|    255|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (462:14): [True: 0, False: 255]
  ------------------
  463|      0|            return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  464|    255|          optr->input = 0;
  465|    255|          optr->flags = FLAGS_SUBSTR;
  466|    255|          optr->start = start;
  467|    255|          optr->outlen = outlen;
  468|    255|        }
  469|  1.22M|        start = fmt;
  470|  1.22M|        fmt++;
  471|  1.22M|        continue; /* while */
  472|  1.22M|      }
  473|       |
  474|  1.80M|      if(use_dollar != DOLLAR_NOPE) {
  ------------------
  |  Branch (474:10): [True: 1.64M, False: 163k]
  ------------------
  475|  1.64M|        param = dollarstring(fmt, &fmt);
  476|  1.64M|        if(param < 0) {
  ------------------
  |  Branch (476:12): [True: 1.64M, False: 10]
  ------------------
  477|  1.64M|          if(use_dollar == DOLLAR_USE)
  ------------------
  |  Branch (477:14): [True: 0, False: 1.64M]
  ------------------
  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|  1.64M|          param = -1;
  483|  1.64M|          use_dollar = DOLLAR_NOPE;
  484|  1.64M|        }
  485|     10|        else
  486|     10|          use_dollar = DOLLAR_USE;
  487|  1.64M|      }
  488|       |
  489|  1.80M|      rc = parse_flags(&fmt, &flags, use_dollar, &precision, &width);
  490|  1.80M|      if(rc)
  ------------------
  |  Branch (490:10): [True: 0, False: 1.80M]
  ------------------
  491|      0|        return rc;
  492|       |
  493|  1.80M|      if(parse_conversion(*fmt, &flags, &type))
  ------------------
  |  Branch (493:10): [True: 0, False: 1.80M]
  ------------------
  494|      0|        continue;
  495|       |
  496|  1.80M|      if(flags & FLAGS_WIDTHPARAM) {
  ------------------
  |  Branch (496:10): [True: 0, False: 1.80M]
  ------------------
  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|  1.80M|      if(flags & FLAGS_PRECPARAM) {
  ------------------
  |  Branch (514:10): [True: 9.96k, False: 1.79M]
  ------------------
  515|  9.96k|        if(precision < 0)
  ------------------
  |  Branch (515:12): [True: 9.96k, False: 0]
  ------------------
  516|  9.96k|          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|  9.96k|        if(precision >= MAX_PARAMETERS)
  ------------------
  |  |   33|  9.96k|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (522:12): [True: 0, False: 9.96k]
  ------------------
  523|      0|          return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  524|  9.96k|        if(precision >= max_param)
  ------------------
  |  Branch (524:12): [True: 9.96k, False: 0]
  ------------------
  525|  9.96k|          max_param = precision;
  526|       |
  527|  9.96k|        in[precision].type = MTYPE_PRECISION;
  528|  9.96k|        mark_arg_used(usedinput, precision);
  ------------------
  |  |  149|  9.96k|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  529|  9.96k|      }
  530|       |
  531|       |      /* Handle the specifier */
  532|  1.80M|      if(param < 0)
  ------------------
  |  Branch (532:10): [True: 1.80M, False: 18]
  ------------------
  533|  1.80M|        param = param_num++;
  534|  1.80M|      if(param >= MAX_PARAMETERS)
  ------------------
  |  |   33|  1.80M|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (534:10): [True: 0, False: 1.80M]
  ------------------
  535|      0|        return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  536|  1.80M|      if(param >= max_param)
  ------------------
  |  Branch (536:10): [True: 1.80M, False: 18]
  ------------------
  537|  1.80M|        max_param = param;
  538|       |
  539|  1.80M|      iptr = &in[param];
  540|  1.80M|      iptr->type = type;
  541|       |
  542|       |      /* mark this input as used */
  543|  1.80M|      mark_arg_used(usedinput, param);
  ------------------
  |  |  149|  1.80M|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  544|       |
  545|  1.80M|      fmt++;
  546|  1.80M|      optr = &out[ocount++];
  547|  1.80M|      if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|  1.80M|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (547:10): [True: 0, False: 1.80M]
  ------------------
  548|      0|        return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  549|  1.80M|      optr->input = (unsigned int)param;
  550|  1.80M|      optr->flags = flags;
  551|  1.80M|      optr->width = width;
  552|  1.80M|      optr->precision = precision;
  553|  1.80M|      optr->start = start;
  554|  1.80M|      optr->outlen = outlen;
  555|  1.80M|      start = fmt;
  556|  1.80M|    }
  557|   626k|    else
  558|   626k|      fmt++;
  559|  3.66M|  }
  560|       |
  561|       |  /* is there a trailing piece */
  562|  1.64M|  outlen = (size_t)(fmt - start);
  563|  1.64M|  if(outlen) {
  ------------------
  |  Branch (563:6): [True: 20.2k, False: 1.62M]
  ------------------
  564|  20.2k|    optr = &out[ocount++];
  565|  20.2k|    if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|  20.2k|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (565:8): [True: 0, False: 20.2k]
  ------------------
  566|      0|      return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  567|  20.2k|    optr->input = 0;
  568|  20.2k|    optr->flags = FLAGS_SUBSTR;
  569|  20.2k|    optr->start = start;
  570|  20.2k|    optr->outlen = outlen;
  571|  20.2k|  }
  572|       |
  573|       |  /* Read the arg list parameters into our data list */
  574|  3.46M|  for(i = 0; i < max_param + 1; i++) {
  ------------------
  |  Branch (574:14): [True: 1.81M, False: 1.64M]
  ------------------
  575|  1.81M|    struct va_input *iptr = &in[i];
  576|  1.81M|    if(!is_arg_used(usedinput, i))
  ------------------
  |  |  148|  1.81M|#define is_arg_used(x, y)   ((x)[(y) / 8] & (1 << ((y) & 7)))
  ------------------
  |  Branch (576:8): [True: 0, False: 1.81M]
  ------------------
  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|  1.81M|    switch(iptr->type) {
  582|   199k|    case MTYPE_STRING:
  ------------------
  |  Branch (582:5): [True: 199k, False: 1.61M]
  ------------------
  583|   199k|      iptr->val.str = va_arg(arglist, const char *);
  584|   199k|      break;
  585|       |
  586|      0|    case MTYPE_INTPTR:
  ------------------
  |  Branch (586:5): [True: 0, False: 1.81M]
  ------------------
  587|      0|    case MTYPE_PTR:
  ------------------
  |  Branch (587:5): [True: 0, False: 1.81M]
  ------------------
  588|      0|      iptr->val.ptr = va_arg(arglist, void *);
  589|      0|      break;
  590|       |
  591|      0|    case MTYPE_LONGLONGU:
  ------------------
  |  Branch (591:5): [True: 0, False: 1.81M]
  ------------------
  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: 1.81M]
  ------------------
  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: 1.81M]
  ------------------
  600|      0|      iptr->val.numu = va_arg(arglist, unsigned long);
  601|      0|      break;
  602|       |
  603|  4.03k|    case MTYPE_LONG:
  ------------------
  |  Branch (603:5): [True: 4.03k, False: 1.81M]
  ------------------
  604|  4.03k|      iptr->val.nums = va_arg(arglist, long);
  605|  4.03k|      break;
  606|       |
  607|  1.59M|    case MTYPE_INTU:
  ------------------
  |  Branch (607:5): [True: 1.59M, False: 220k]
  ------------------
  608|  1.59M|      iptr->val.numu = va_arg(arglist, unsigned int);
  609|  1.59M|      break;
  610|       |
  611|  6.73k|    case MTYPE_INT:
  ------------------
  |  Branch (611:5): [True: 6.73k, False: 1.80M]
  ------------------
  612|  6.73k|    case MTYPE_WIDTH:
  ------------------
  |  Branch (612:5): [True: 0, False: 1.81M]
  ------------------
  613|  16.6k|    case MTYPE_PRECISION:
  ------------------
  |  Branch (613:5): [True: 9.96k, False: 1.80M]
  ------------------
  614|  16.6k|      iptr->val.nums = va_arg(arglist, int);
  615|  16.6k|      break;
  616|       |
  617|      0|    case MTYPE_DOUBLE:
  ------------------
  |  Branch (617:5): [True: 0, False: 1.81M]
  ------------------
  618|      0|      iptr->val.dnum = va_arg(arglist, double);
  619|      0|      break;
  620|       |
  621|      0|    default:
  ------------------
  |  Branch (621:5): [True: 0, False: 1.81M]
  ------------------
  622|      0|      DEBUGASSERT(NULL); /* unexpected */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (622:7): [True: 0, False: 0]
  |  Branch (622:7): [True: 0, False: 0]
  ------------------
  623|      0|      break;
  624|  1.81M|    }
  625|  1.81M|  }
  626|  1.64M|  *ipieces = max_param + 1;
  627|  1.64M|  *opieces = ocount;
  628|       |
  629|  1.64M|  return PFMT_OK;
  ------------------
  |  |  159|  1.64M|#define PFMT_OK          0
  ------------------
  630|  1.64M|}
mprintf.c:dollarstring:
  139|  1.64M|{
  140|  1.64M|  curl_off_t num;
  141|  1.64M|  if(curlx_str_number(&p, &num, MAX_PARAMETERS) ||
  ------------------
  |  |   33|  1.64M|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (141:6): [True: 413k, False: 1.22M]
  ------------------
  142|  1.22M|     curlx_str_single(&p, '$') || !num)
  ------------------
  |  Branch (142:6): [True: 1.22M, False: 0]
  |  Branch (142:35): [True: 0, False: 0]
  ------------------
  143|  1.64M|    return -1;
  144|      6|  *end = p;
  145|      6|  return (int)num - 1;
  146|  1.64M|}
mprintf.c:parse_flags:
  174|  1.80M|{
  175|  1.80M|  const char *fmt = *fmtp;
  176|  1.80M|  bool loopit = TRUE;
  ------------------
  |  | 1055|  1.80M|#define TRUE true
  ------------------
  177|  1.80M|  unsigned int flags = 0;
  178|  1.80M|  int width = 0;
  179|  1.80M|  int precision = 0;
  180|       |
  181|       |  /* Handle the flags */
  182|  3.05M|  do {
  183|  3.05M|    switch(*fmt++) {
  184|      0|    case ' ':
  ------------------
  |  Branch (184:5): [True: 0, False: 3.05M]
  ------------------
  185|      0|      flags |= FLAGS_SPACE;
  186|      0|      break;
  187|      0|    case '+':
  ------------------
  |  Branch (187:5): [True: 0, False: 3.05M]
  ------------------
  188|      0|      flags |= FLAGS_SHOWSIGN;
  189|      0|      break;
  190|      0|    case '-':
  ------------------
  |  Branch (190:5): [True: 0, False: 3.05M]
  ------------------
  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: 3.05M]
  ------------------
  195|      0|      flags |= FLAGS_ALT;
  196|      0|      break;
  197|  9.96k|    case '.':
  ------------------
  |  Branch (197:5): [True: 9.96k, False: 3.04M]
  ------------------
  198|  9.96k|      if('*' == *fmt) {
  ------------------
  |  Branch (198:10): [True: 9.96k, False: 0]
  ------------------
  199|       |        /* The precision is picked from a specified parameter */
  200|  9.96k|        flags |= FLAGS_PRECPARAM;
  201|  9.96k|        fmt++;
  202|       |
  203|  9.96k|        if(use_dollar == DOLLAR_USE) {
  ------------------
  |  Branch (203:12): [True: 0, False: 9.96k]
  ------------------
  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|  9.96k|        else
  210|       |          /* get it from the next argument */
  211|  9.96k|          precision = -1;
  212|  9.96k|      }
  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|  9.96k|      if((flags & (FLAGS_PREC | FLAGS_PRECPARAM)) ==
  ------------------
  |  Branch (226:10): [True: 0, False: 9.96k]
  ------------------
  227|  9.96k|         (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|  9.96k|      break;
  232|  9.96k|    case 'h':
  ------------------
  |  Branch (232:5): [True: 0, False: 3.05M]
  ------------------
  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|  4.03k|    case 'l':
  ------------------
  |  Branch (255:5): [True: 4.03k, False: 3.04M]
  ------------------
  256|  4.03k|      if(flags & FLAGS_LONG)
  ------------------
  |  Branch (256:10): [True: 0, False: 4.03k]
  ------------------
  257|      0|        flags |= FLAGS_LONGLONG;
  258|  4.03k|      else
  259|  4.03k|        flags |= FLAGS_LONG;
  260|  4.03k|      break;
  261|      0|    case 'L':
  ------------------
  |  Branch (261:5): [True: 0, False: 3.05M]
  ------------------
  262|      0|      flags |= FLAGS_LONGDOUBLE;
  263|      0|      break;
  264|      0|    case 'q':
  ------------------
  |  Branch (264:5): [True: 0, False: 3.05M]
  ------------------
  265|      0|      flags |= FLAGS_LONGLONG;
  266|      0|      break;
  267|      0|    case 'z':
  ------------------
  |  Branch (267:5): [True: 0, False: 3.05M]
  ------------------
  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: 3.05M]
  ------------------
  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|  1.22M|    case '0':
  ------------------
  |  Branch (283:5): [True: 1.22M, False: 1.82M]
  ------------------
  284|  1.22M|      if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (284:10): [True: 1.22M, False: 0]
  ------------------
  285|  1.22M|        flags |= FLAGS_PAD_NIL;
  286|  1.22M|      FALLTHROUGH();
  ------------------
  |  |  821|  1.22M|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  287|  1.22M|    case '1':
  ------------------
  |  Branch (287:5): [True: 0, False: 3.05M]
  ------------------
  288|  1.22M|    case '2':
  ------------------
  |  Branch (288:5): [True: 96, False: 3.05M]
  ------------------
  289|  1.22M|    case '3':
  ------------------
  |  Branch (289:5): [True: 943, False: 3.05M]
  ------------------
  290|  1.22M|    case '4':
  ------------------
  |  Branch (290:5): [True: 0, False: 3.05M]
  ------------------
  291|  1.22M|    case '5':
  ------------------
  |  Branch (291:5): [True: 0, False: 3.05M]
  ------------------
  292|  1.23M|    case '6':
  ------------------
  |  Branch (292:5): [True: 1.49k, False: 3.04M]
  ------------------
  293|  1.23M|    case '7':
  ------------------
  |  Branch (293:5): [True: 0, False: 3.05M]
  ------------------
  294|  1.23M|    case '8':
  ------------------
  |  Branch (294:5): [True: 0, False: 3.05M]
  ------------------
  295|  1.23M|    case '9': {
  ------------------
  |  Branch (295:5): [True: 0, False: 3.05M]
  ------------------
  296|  1.23M|      curl_off_t num;
  297|  1.23M|      flags |= FLAGS_WIDTH;
  298|  1.23M|      fmt--;
  299|  1.23M|      if(curlx_str_number(&fmt, &num, INT_MAX))
  ------------------
  |  Branch (299:10): [True: 0, False: 1.23M]
  ------------------
  300|      0|        return PFMT_WIDTH;
  ------------------
  |  |  166|      0|#define PFMT_WIDTH       7 /* width overflow */
  ------------------
  301|  1.23M|      width = (int)num;
  302|  1.23M|      break;
  303|  1.23M|    }
  304|      0|    case '*':  /* read width from argument list */
  ------------------
  |  Branch (304:5): [True: 0, False: 3.05M]
  ------------------
  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|  1.80M|    default:
  ------------------
  |  Branch (316:5): [True: 1.80M, False: 1.24M]
  ------------------
  317|  1.80M|      loopit = FALSE;
  ------------------
  |  | 1058|  1.80M|#define FALSE false
  ------------------
  318|  1.80M|      fmt--;
  319|  1.80M|      break;
  320|  3.05M|    } /* switch */
  321|  3.05M|  } while(loopit); /* do */
  ------------------
  |  Branch (321:11): [True: 1.24M, False: 1.80M]
  ------------------
  322|  1.80M|  *flagsp = flags;
  323|  1.80M|  *precp = precision;
  324|  1.80M|  *widthp = width;
  325|  1.80M|  *fmtp = fmt;
  326|  1.80M|  return PFMT_OK;
  ------------------
  |  |  159|  1.80M|#define PFMT_OK          0
  ------------------
  327|  1.80M|}
mprintf.c:parse_conversion:
  331|  1.80M|{
  332|  1.80M|  unsigned int flags = *flagp;
  333|  1.80M|  FormatType type;
  334|  1.80M|  switch(f) {
  335|      0|  case 'S':
  ------------------
  |  Branch (335:3): [True: 0, False: 1.80M]
  ------------------
  336|      0|    flags |= FLAGS_ALT;
  337|      0|    type = MTYPE_STRING;
  338|      0|    break;
  339|   199k|  case 's':
  ------------------
  |  Branch (339:3): [True: 199k, False: 1.60M]
  ------------------
  340|   199k|    type = MTYPE_STRING;
  341|   199k|    break;
  342|      0|  case 'n':
  ------------------
  |  Branch (342:3): [True: 0, False: 1.80M]
  ------------------
  343|      0|    type = MTYPE_INTPTR;
  344|      0|    break;
  345|      0|  case 'p':
  ------------------
  |  Branch (345:3): [True: 0, False: 1.80M]
  ------------------
  346|      0|    type = MTYPE_PTR;
  347|      0|    break;
  348|  10.5k|  case 'd':
  ------------------
  |  Branch (348:3): [True: 10.5k, False: 1.79M]
  ------------------
  349|  10.5k|  case 'i':
  ------------------
  |  Branch (349:3): [True: 34, False: 1.80M]
  ------------------
  350|  10.5k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (350:8): [True: 0, False: 10.5k]
  ------------------
  351|      0|      type = MTYPE_LONGLONG;
  352|  10.5k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (352:13): [True: 4.03k, False: 6.52k]
  ------------------
  353|  4.03k|      type = MTYPE_LONG;
  354|  6.52k|    else
  355|  6.52k|      type = MTYPE_INT;
  356|  10.5k|    break;
  357|   367k|  case 'u':
  ------------------
  |  Branch (357:3): [True: 367k, False: 1.43M]
  ------------------
  358|   367k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (358:8): [True: 0, False: 367k]
  ------------------
  359|      0|      type = MTYPE_LONGLONGU;
  360|   367k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (360:13): [True: 0, False: 367k]
  ------------------
  361|      0|      type = MTYPE_LONGU;
  362|   367k|    else
  363|   367k|      type = MTYPE_INTU;
  364|   367k|    flags |= FLAGS_UNSIGNED;
  365|   367k|    break;
  366|      0|  case 'o':
  ------------------
  |  Branch (366:3): [True: 0, False: 1.80M]
  ------------------
  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|    836|  case 'x':
  ------------------
  |  Branch (375:3): [True: 836, False: 1.80M]
  ------------------
  376|    836|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (376:8): [True: 0, False: 836]
  ------------------
  377|      0|      type = MTYPE_LONGLONGU;
  378|    836|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (378:13): [True: 0, False: 836]
  ------------------
  379|      0|      type = MTYPE_LONGU;
  380|    836|    else
  381|    836|      type = MTYPE_INTU;
  382|    836|    flags |= FLAGS_HEX | FLAGS_UNSIGNED;
  383|    836|    break;
  384|  1.22M|  case 'X':
  ------------------
  |  Branch (384:3): [True: 1.22M, False: 579k]
  ------------------
  385|  1.22M|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (385:8): [True: 0, False: 1.22M]
  ------------------
  386|      0|      type = MTYPE_LONGLONGU;
  387|  1.22M|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (387:13): [True: 0, False: 1.22M]
  ------------------
  388|      0|      type = MTYPE_LONGU;
  389|  1.22M|    else
  390|  1.22M|      type = MTYPE_INTU;
  391|  1.22M|    flags |= FLAGS_HEX | FLAGS_UPPER | FLAGS_UNSIGNED;
  392|  1.22M|    break;
  393|    212|  case 'c':
  ------------------
  |  Branch (393:3): [True: 212, False: 1.80M]
  ------------------
  394|    212|    type = MTYPE_INT;
  395|    212|    flags |= FLAGS_CHAR;
  396|    212|    break;
  397|      0|  case 'f':
  ------------------
  |  Branch (397:3): [True: 0, False: 1.80M]
  ------------------
  398|      0|    type = MTYPE_DOUBLE;
  399|      0|    break;
  400|      0|  case 'e':
  ------------------
  |  Branch (400:3): [True: 0, False: 1.80M]
  ------------------
  401|      0|    type = MTYPE_DOUBLE;
  402|      0|    flags |= FLAGS_FLOATE;
  403|      0|    break;
  404|      0|  case 'E':
  ------------------
  |  Branch (404:3): [True: 0, False: 1.80M]
  ------------------
  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: 1.80M]
  ------------------
  409|      0|    type = MTYPE_DOUBLE;
  410|      0|    flags |= FLAGS_FLOATG;
  411|      0|    break;
  412|      0|  case 'G':
  ------------------
  |  Branch (412:3): [True: 0, False: 1.80M]
  ------------------
  413|      0|    type = MTYPE_DOUBLE;
  414|      0|    flags |= FLAGS_FLOATG | FLAGS_UPPER;
  415|      0|    break;
  416|      0|  default:
  ------------------
  |  Branch (416:3): [True: 0, False: 1.80M]
  ------------------
  417|       |    /* invalid instruction, disregard and continue */
  418|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  419|  1.80M|  } /* switch */
  420|       |
  421|  1.80M|  *flagp |= flags;
  422|  1.80M|  *typep = type;
  423|       |  return FALSE;
  ------------------
  |  | 1058|  1.80M|#define FALSE false
  ------------------
  424|  1.80M|}
mprintf.c:out_number:
  738|  1.60M|{
  739|  1.60M|  const unsigned char *digits = Curl_ldigits;
  740|  1.60M|  int flags = p->flags;
  741|  1.60M|  int width = p->width;
  742|  1.60M|  int prec = p->prec;
  743|  1.60M|  bool is_alt = flags & FLAGS_ALT;
  744|  1.60M|  bool is_neg = FALSE;
  ------------------
  |  | 1058|  1.60M|#define FALSE false
  ------------------
  745|  1.60M|  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|  1.60M|  char *workend = &work[BUFFSIZE - 2];
  ------------------
  |  |   31|  1.60M|#define BUFFSIZE 326 /* buffer for long-to-str and float-to-str calcs, should
  ------------------
  751|  1.60M|  char *w;
  752|       |
  753|  1.60M|  if(flags & FLAGS_CHAR) {
  ------------------
  |  Branch (753:6): [True: 212, False: 1.60M]
  ------------------
  754|       |    /* Character. */
  755|    212|    if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (755:8): [True: 212, False: 0]
  ------------------
  756|    212|      while(--width > 0)
  ------------------
  |  Branch (756:13): [True: 0, False: 212]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  758|    212|    OUTCHAR((char)num);
  ------------------
  |  |   43|    212|  do {                                    \
  |  |   44|    212|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 212]
  |  |  ------------------
  |  |   45|    212|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|    212|    (*donep)++;                           \
  |  |   47|    212|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 212]
  |  |  ------------------
  ------------------
  759|    212|    if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (759:8): [True: 0, False: 212]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  762|    212|    return FALSE;
  ------------------
  |  | 1058|    212|#define FALSE false
  ------------------
  763|    212|  }
  764|  1.60M|  if(flags & FLAGS_OCTAL)
  ------------------
  |  Branch (764:6): [True: 0, False: 1.60M]
  ------------------
  765|       |    /* Octal unsigned integer */
  766|      0|    base = 8;
  767|       |
  768|  1.60M|  else if(flags & FLAGS_HEX) {
  ------------------
  |  Branch (768:11): [True: 1.22M, False: 378k]
  ------------------
  769|       |    /* Hexadecimal unsigned integer */
  770|  1.22M|    digits = (flags & FLAGS_UPPER) ? Curl_udigits : Curl_ldigits;
  ------------------
  |  Branch (770:14): [True: 1.22M, False: 836]
  ------------------
  771|  1.22M|    base = 16;
  772|  1.22M|  }
  773|   378k|  else if(flags & FLAGS_UNSIGNED)
  ------------------
  |  Branch (773:11): [True: 367k, False: 10.5k]
  ------------------
  774|       |    /* Decimal unsigned integer */
  775|   367k|    ;
  776|       |
  777|  10.5k|  else {
  778|       |    /* Decimal integer. */
  779|  10.5k|    is_neg = (nums < 0);
  780|  10.5k|    if(is_neg) {
  ------------------
  |  Branch (780:8): [True: 0, False: 10.5k]
  ------------------
  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|  10.5k|  }
  789|       |
  790|       |  /* Supply a default precision if none was given. */
  791|  1.60M|  if(prec == -1)
  ------------------
  |  Branch (791:6): [True: 1.60M, False: 0]
  ------------------
  792|  1.60M|    prec = 1;
  793|       |
  794|       |  /* Put the number in WORK. */
  795|  1.60M|  w = workend;
  796|  1.60M|  DEBUGASSERT(base <= 16);
  ------------------
  |  | 1081|  1.60M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (796:3): [True: 0, False: 1.60M]
  |  Branch (796:3): [True: 1.60M, False: 0]
  ------------------
  797|  1.60M|  switch(base) {
  798|   378k|  case 10:
  ------------------
  |  Branch (798:3): [True: 378k, False: 1.22M]
  ------------------
  799|  1.26M|    while(num > 0) {
  ------------------
  |  Branch (799:11): [True: 882k, False: 378k]
  ------------------
  800|   882k|      *w-- = (char)('0' + (num % 10));
  801|   882k|      num /= 10;
  802|   882k|    }
  803|   378k|    break;
  804|  1.22M|  default:
  ------------------
  |  Branch (804:3): [True: 1.22M, False: 378k]
  ------------------
  805|  3.68M|    while(num > 0) {
  ------------------
  |  Branch (805:11): [True: 2.45M, False: 1.22M]
  ------------------
  806|  2.45M|      *w-- = digits[num % base];
  807|  2.45M|      num /= base;
  808|  2.45M|    }
  809|  1.22M|    break;
  810|  1.60M|  }
  811|  1.60M|  width -= (int)(workend - w);
  812|  1.60M|  prec -= (int)(workend - w);
  813|       |
  814|  1.60M|  if(is_alt && base == 8 && prec <= 0) {
  ------------------
  |  Branch (814:6): [True: 0, False: 1.60M]
  |  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|  1.60M|  if(prec > 0) {
  ------------------
  |  Branch (819:6): [True: 14.2k, False: 1.59M]
  ------------------
  820|  14.2k|    width -= prec;
  821|  28.5k|    while(prec-- > 0 && w >= work)
  ------------------
  |  Branch (821:11): [True: 14.2k, False: 14.2k]
  |  Branch (821:25): [True: 14.2k, False: 0]
  ------------------
  822|  14.2k|      *w-- = '0';
  823|  14.2k|  }
  824|       |
  825|  1.60M|  if(is_alt && base == 16)
  ------------------
  |  Branch (825:6): [True: 0, False: 1.60M]
  |  Branch (825:16): [True: 0, False: 0]
  ------------------
  826|      0|    width -= 2;
  827|       |
  828|  1.60M|  if(is_neg || (flags & FLAGS_SHOWSIGN) || (flags & FLAGS_SPACE))
  ------------------
  |  Branch (828:6): [True: 0, False: 1.60M]
  |  Branch (828:16): [True: 0, False: 1.60M]
  |  Branch (828:44): [True: 0, False: 1.60M]
  ------------------
  829|      0|    --width;
  830|       |
  831|  1.60M|  if(!(flags & FLAGS_LEFT) && !(flags & FLAGS_PAD_NIL))
  ------------------
  |  Branch (831:6): [True: 1.60M, False: 18.4E]
  |  Branch (831:31): [True: 378k, False: 1.22M]
  ------------------
  832|   386k|    while(width-- > 0)
  ------------------
  |  Branch (832:11): [True: 7.92k, False: 378k]
  ------------------
  833|  7.92k|      OUTCHAR(' ');
  ------------------
  |  |   43|  7.92k|  do {                                    \
  |  |   44|  7.92k|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 7.92k]
  |  |  ------------------
  |  |   45|  7.92k|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|  7.92k|    (*donep)++;                           \
  |  |   47|  7.92k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 7.92k]
  |  |  ------------------
  ------------------
  834|       |
  835|  1.60M|  if(is_neg)
  ------------------
  |  Branch (835:6): [True: 0, False: 1.60M]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  837|  1.60M|  else if(flags & FLAGS_SHOWSIGN)
  ------------------
  |  Branch (837:11): [True: 0, False: 1.60M]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  839|  1.60M|  else if(flags & FLAGS_SPACE)
  ------------------
  |  Branch (839:11): [True: 0, False: 1.60M]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  841|       |
  842|  1.60M|  if(is_alt && base == 16) {
  ------------------
  |  Branch (842:6): [True: 0, False: 1.60M]
  |  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      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;                        \
  |  |  ------------------
  |  |  |  | 1055|      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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  848|      0|  }
  849|       |
  850|  1.60M|  if(!(flags & FLAGS_LEFT) && (flags & FLAGS_PAD_NIL))
  ------------------
  |  Branch (850:6): [True: 1.60M, False: 0]
  |  Branch (850:31): [True: 1.22M, False: 378k]
  ------------------
  851|  1.22M|    while(width-- > 0)
  ------------------
  |  Branch (851:11): [True: 781, False: 1.22M]
  ------------------
  852|    781|      OUTCHAR('0');
  ------------------
  |  |   43|    781|  do {                                    \
  |  |   44|    781|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 781]
  |  |  ------------------
  |  |   45|    781|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|    781|    (*donep)++;                           \
  |  |   47|    781|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 781]
  |  |  ------------------
  ------------------
  853|       |
  854|       |  /* Write the number. */
  855|  4.95M|  while(++w <= workend) {
  ------------------
  |  Branch (855:9): [True: 3.35M, False: 1.60M]
  ------------------
  856|  3.35M|    OUTCHAR(*w);
  ------------------
  |  |   43|  3.35M|  do {                                    \
  |  |   44|  3.35M|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 8, False: 3.35M]
  |  |  ------------------
  |  |   45|  3.35M|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      8|#define TRUE true
  |  |  ------------------
  |  |   46|  3.35M|    (*donep)++;                           \
  |  |   47|  3.35M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 3.35M]
  |  |  ------------------
  ------------------
  857|  3.35M|  }
  858|       |
  859|  1.60M|  if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (859:6): [True: 0, False: 1.60M]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  862|       |
  863|  1.60M|  return FALSE;
  ------------------
  |  | 1058|  1.60M|#define FALSE false
  ------------------
  864|  1.60M|}
mprintf.c:out_string:
  873|   199k|{
  874|   199k|  int flags = p->flags;
  875|   199k|  int width = p->width;
  876|   199k|  int prec = p->prec;
  877|   199k|  size_t len;
  878|       |
  879|   199k|  if(!str) {
  ------------------
  |  Branch (879:6): [True: 939, False: 198k]
  ------------------
  880|       |    /* Write null string if there is space. */
  881|    939|    if(prec == -1 || prec >= (int)sizeof(nilstr) - 1) {
  ------------------
  |  Branch (881:8): [True: 939, False: 0]
  |  Branch (881:22): [True: 0, False: 0]
  ------------------
  882|    939|      str = nilstr;
  883|    939|      len = sizeof(nilstr) - 1;
  884|       |      /* Disable quotes around (nil) */
  885|    939|      flags &= ~(unsigned int)FLAGS_ALT;
  886|    939|    }
  887|      0|    else {
  888|      0|      str = "";
  889|      0|      len = 0;
  890|      0|    }
  891|    939|  }
  892|   198k|  else if(prec != -1)
  ------------------
  |  Branch (892:11): [True: 9.96k, False: 188k]
  ------------------
  893|  9.96k|    len = (size_t)prec;
  894|   188k|  else if(*str == '\0')
  ------------------
  |  Branch (894:11): [True: 88.9k, False: 99.8k]
  ------------------
  895|  88.9k|    len = 0;
  896|  99.8k|  else
  897|  99.8k|    len = strlen(str);
  898|       |
  899|   199k|  width -= (len > INT_MAX) ? INT_MAX : (int)len;
  ------------------
  |  Branch (899:12): [True: 0, False: 199k]
  ------------------
  900|       |
  901|   199k|  if(flags & FLAGS_ALT)
  ------------------
  |  Branch (901:6): [True: 0, False: 199k]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  903|       |
  904|   199k|  if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (904:6): [True: 199k, False: 0]
  ------------------
  905|   199k|    while(width-- > 0)
  ------------------
  |  Branch (905:11): [True: 0, False: 199k]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  907|       |
  908|  23.1M|  for(; len && *str; len--)
  ------------------
  |  Branch (908:9): [True: 22.9M, False: 199k]
  |  Branch (908:16): [True: 22.9M, False: 0]
  ------------------
  909|  22.9M|    OUTCHAR(*str++);
  ------------------
  |  |   43|  23.1M|  do {                                    \
  |  |   44|  22.9M|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 37, False: 22.9M]
  |  |  ------------------
  |  |   45|  22.9M|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|     37|#define TRUE true
  |  |  ------------------
  |  |   46|  22.9M|    (*donep)++;                           \
  |  |   47|  22.9M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 22.9M]
  |  |  ------------------
  ------------------
  910|   199k|  if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (910:6): [True: 0, False: 199k]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  913|       |
  914|   199k|  if(flags & FLAGS_ALT)
  ------------------
  |  Branch (914:6): [True: 0, False: 199k]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  916|       |
  917|   199k|  return FALSE;
  ------------------
  |  | 1058|   199k|#define FALSE false
  ------------------
  918|   199k|}
mprintf.c:addbyter:
 1093|  1.38M|{
 1094|  1.38M|  struct nsprintf *infop = f;
 1095|  1.38M|  if(infop->length < infop->max) {
  ------------------
  |  Branch (1095:6): [True: 1.38M, False: 18]
  ------------------
 1096|       |    /* only do this if we have not reached max length yet */
 1097|  1.38M|    *infop->buffer++ = (char)outc; /* store */
 1098|  1.38M|    infop->length++; /* we are now one byte larger */
 1099|  1.38M|    return 0;     /* fputc() returns like this on success */
 1100|  1.38M|  }
 1101|     18|  return 1;
 1102|  1.38M|}
mprintf.c:alloc_addbyter:
 1141|  26.7M|{
 1142|  26.7M|  struct asprintf *infop = f;
 1143|  26.7M|  CURLcode result = curlx_dyn_addn(infop->b, &outc, 1);
 1144|  26.7M|  if(result) {
  ------------------
  |  Branch (1144:6): [True: 33, False: 26.7M]
  ------------------
 1145|     33|    infop->merr = result == CURLE_TOO_LARGE ? MERR_TOO_LARGE : MERR_MEM;
  ------------------
  |  |   29|     33|#define MERR_TOO_LARGE 2
  ------------------
                  infop->merr = result == CURLE_TOO_LARGE ? MERR_TOO_LARGE : MERR_MEM;
  ------------------
  |  |   28|     33|#define MERR_MEM       1
  ------------------
  |  Branch (1145:19): [True: 33, False: 0]
  ------------------
 1146|     33|    return 1; /* fail */
 1147|     33|  }
 1148|  26.7M|  return 0;
 1149|  26.7M|}
mprintf.c:fputc_wrapper:
 1214|  39.3k|{
 1215|  39.3k|  int out = outc;
 1216|  39.3k|  FILE *s = f;
 1217|  39.3k|  int rc = fputc(out, s);
 1218|       |  return rc == EOF;
 1219|  39.3k|}

Curl_multi_handle:
  232|  10.0k|{
  233|  10.0k|  struct Curl_multi *multi = curlx_calloc(1, sizeof(struct Curl_multi));
  ------------------
  |  | 1480|  10.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  234|       |
  235|  10.0k|  if(!multi)
  ------------------
  |  Branch (235:6): [True: 0, False: 10.0k]
  ------------------
  236|      0|    return NULL;
  237|       |
  238|  10.0k|  multi->magic = CURL_MULTI_HANDLE;
  ------------------
  |  |   75|  10.0k|#define CURL_MULTI_HANDLE 0x000bab1e
  ------------------
  239|       |
  240|  10.0k|  Curl_dnscache_init(&multi->dnscache, dnssize);
  241|  10.0k|  Curl_mntfy_init(multi);
  242|  10.0k|  Curl_multi_ev_init(multi, ev_hashsize);
  243|  10.0k|  Curl_uint32_tbl_init(&multi->xfers, NULL);
  244|  10.0k|  Curl_uint32_bset_init(&multi->process);
  245|  10.0k|  Curl_uint32_bset_init(&multi->dirty);
  246|  10.0k|  Curl_uint32_bset_init(&multi->pending);
  247|  10.0k|  Curl_uint32_bset_init(&multi->msgsent);
  248|  10.0k|  Curl_hash_init(&multi->proto_hash, 23,
  249|  10.0k|                 Curl_hash_str, curlx_str_key_compare, ph_freeentry);
  250|  10.0k|  Curl_llist_init(&multi->msglist, NULL);
  251|       |
  252|  10.0k|  multi->multiplexing = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  253|  10.0k|  multi->max_concurrent_streams = 100;
  254|  10.0k|  multi->last_timeout_ms = -1;
  255|  10.0k|#ifdef ENABLE_WAKEUP
  256|  10.0k|  multi->wakeup_pair[0] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  10.0k|#define CURL_SOCKET_BAD (-1)
  ------------------
  257|  10.0k|  multi->wakeup_pair[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  10.0k|#define CURL_SOCKET_BAD (-1)
  ------------------
  258|  10.0k|#endif
  259|       |
  260|  10.0k|  if(Curl_mntfy_resize(multi) ||
  ------------------
  |  Branch (260:6): [True: 0, False: 10.0k]
  ------------------
  261|  10.0k|     Curl_uint32_bset_resize(&multi->process, xfer_table_size) ||
  ------------------
  |  Branch (261:6): [True: 0, False: 10.0k]
  ------------------
  262|  10.0k|     Curl_uint32_bset_resize(&multi->pending, xfer_table_size) ||
  ------------------
  |  Branch (262:6): [True: 0, False: 10.0k]
  ------------------
  263|  10.0k|     Curl_uint32_bset_resize(&multi->dirty, xfer_table_size) ||
  ------------------
  |  Branch (263:6): [True: 0, False: 10.0k]
  ------------------
  264|  10.0k|     Curl_uint32_bset_resize(&multi->msgsent, xfer_table_size) ||
  ------------------
  |  Branch (264:6): [True: 0, False: 10.0k]
  ------------------
  265|  10.0k|     Curl_uint32_tbl_resize(&multi->xfers, xfer_table_size))
  ------------------
  |  Branch (265:6): [True: 0, False: 10.0k]
  ------------------
  266|      0|    goto error;
  267|       |
  268|  10.0k|  multi->admin = curl_easy_init();
  269|  10.0k|  if(!multi->admin)
  ------------------
  |  Branch (269:6): [True: 0, False: 10.0k]
  ------------------
  270|      0|    goto error;
  271|       |  /* Initialize admin handle to operate inside this multi */
  272|  10.0k|  multi->admin->multi = multi;
  273|  10.0k|  multi->admin->state.internal = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  274|  10.0k|  Curl_llist_init(&multi->admin->state.timeoutlist, NULL);
  275|       |
  276|  10.0k|#ifdef DEBUGBUILD
  277|  10.0k|  if(getenv("CURL_DEBUG"))
  ------------------
  |  Branch (277:6): [True: 0, False: 10.0k]
  ------------------
  278|      0|    multi->admin->set.verbose = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  279|  10.0k|#endif
  280|  10.0k|  Curl_uint32_tbl_add(&multi->xfers, multi->admin, &multi->admin->mid);
  281|  10.0k|  Curl_uint32_bset_add(&multi->process, multi->admin->mid);
  282|       |
  283|  10.0k|  if(Curl_cshutdn_init(&multi->cshutdn, multi))
  ------------------
  |  Branch (283:6): [True: 0, False: 10.0k]
  ------------------
  284|      0|    goto error;
  285|       |
  286|  10.0k|  Curl_cpool_init(&multi->cpool, multi->admin, NULL, chashsize);
  287|       |
  288|  10.0k|#ifdef USE_SSL
  289|  10.0k|  if(Curl_ssl_scache_create(sesssize, 2, &multi->ssl_scache))
  ------------------
  |  Branch (289:6): [True: 0, False: 10.0k]
  ------------------
  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|  10.0k|#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|  10.0k|  if(Curl_wakeup_init(multi->wakeup_pair, TRUE) < 0)
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  |  Branch (303:6): [True: 0, False: 10.0k]
  ------------------
  304|      0|    goto error;
  305|  10.0k|#endif
  306|       |
  307|  10.0k|  if(Curl_probeipv6(multi))
  ------------------
  |  Branch (307:6): [True: 0, False: 10.0k]
  ------------------
  308|      0|    goto error;
  309|       |
  310|  10.0k|#ifdef USE_RESOLV_THREADED
  311|  10.0k|  if(xfer_table_size < CURL_XFER_TABLE_SIZE) { /* easy multi */
  ------------------
  |  |   52|  10.0k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  |  Branch (311:6): [True: 0, False: 10.0k]
  ------------------
  312|      0|    if(Curl_async_thrdd_multi_init(multi, 0, 2, 10))
  ------------------
  |  Branch (312:8): [True: 0, False: 0]
  ------------------
  313|      0|      goto error;
  314|      0|  }
  315|  10.0k|  else { /* real multi handle */
  316|  10.0k|    if(Curl_async_thrdd_multi_init(multi, 0, 20, 2000))
  ------------------
  |  Branch (316:8): [True: 0, False: 10.0k]
  ------------------
  317|      0|      goto error;
  318|  10.0k|  }
  319|  10.0k|#endif
  320|       |
  321|  10.0k|  return multi;
  322|       |
  323|      0|error:
  324|       |
  325|      0|#ifdef USE_RESOLV_THREADED
  326|      0|  Curl_async_thrdd_multi_destroy(multi, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  327|      0|#endif
  328|      0|  Curl_multi_ev_cleanup(multi);
  329|      0|  Curl_hash_destroy(&multi->proto_hash);
  330|      0|  Curl_dnscache_destroy(&multi->dnscache);
  331|      0|  Curl_cpool_destroy(&multi->cpool);
  332|      0|  Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
  333|      0|#ifdef USE_SSL
  334|      0|  Curl_ssl_scache_destroy(multi->ssl_scache);
  335|      0|#endif
  336|      0|  if(multi->admin) {
  ------------------
  |  Branch (336:6): [True: 0, False: 0]
  ------------------
  337|      0|    Curl_multi_ev_xfer_done(multi, multi->admin);
  338|      0|    multi->admin->multi = NULL;
  339|      0|    Curl_close(&multi->admin);
  340|      0|  }
  341|      0|  Curl_mntfy_cleanup(multi);
  342|       |
  343|      0|  Curl_uint32_bset_destroy(&multi->process);
  344|      0|  Curl_uint32_bset_destroy(&multi->dirty);
  345|      0|  Curl_uint32_bset_destroy(&multi->pending);
  346|      0|  Curl_uint32_bset_destroy(&multi->msgsent);
  347|      0|  Curl_uint32_tbl_destroy(&multi->xfers);
  348|      0|#ifdef ENABLE_WAKEUP
  349|      0|  Curl_wakeup_destroy(multi->wakeup_pair);
  350|      0|#endif
  351|       |
  352|      0|  curlx_free(multi);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  353|       |  return NULL;
  354|  10.0k|}
curl_multi_init:
  357|  10.0k|{
  358|  10.0k|  return Curl_multi_handle(CURL_XFER_TABLE_SIZE,
  ------------------
  |  |   52|  10.0k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  359|  10.0k|                           CURL_SOCKET_HASH_TABLE_SIZE,
  ------------------
  |  |   60|  10.0k|#define CURL_SOCKET_HASH_TABLE_SIZE 911
  ------------------
  360|  10.0k|                           CURL_CONNECTION_HASH_SIZE,
  ------------------
  |  |   64|  10.0k|#define CURL_CONNECTION_HASH_SIZE 97
  ------------------
  361|  10.0k|                           CURL_DNS_HASH_SIZE,
  ------------------
  |  |   68|  10.0k|#define CURL_DNS_HASH_SIZE 71
  ------------------
  362|  10.0k|                           CURL_TLS_SESSION_SIZE);
  ------------------
  |  |   72|  10.0k|#define CURL_TLS_SESSION_SIZE 25
  ------------------
  363|  10.0k|}
Curl_is_connecting:
  380|   842k|{
  381|   842k|  return data->mstate < MSTATE_DO;
  382|   842k|}
curl_multi_add_handle:
  455|  10.7k|{
  456|  10.7k|  CURLMcode mresult;
  457|  10.7k|  struct Curl_multi *multi = m;
  458|  10.7k|  struct Curl_easy *data = curl;
  459|       |
  460|       |  /* First, make some basic checks that the CURLM handle is a good handle */
  461|  10.7k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  10.7k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  10.7k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  10.7k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 10.7k, False: 0]
  |  |  |  Branch (82:12): [True: 10.7k, False: 0]
  |  |  ------------------
  |  |   83|  10.7k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (461:6): [True: 0, False: 10.7k]
  |  Branch (461:7): [True: 0, False: 0]
  |  Branch (461:7): [True: 0, False: 0]
  ------------------
  462|      0|    return CURLM_BAD_HANDLE;
  463|       |
  464|       |  /* Verify that we got a somewhat good easy handle too */
  465|  10.7k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|  10.7k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  10.7k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  10.7k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:5): [True: 10.7k, False: 0]
  |  |  |  Branch (136:12): [True: 10.7k, False: 0]
  |  |  ------------------
  |  |  137|  10.7k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (465:6): [True: 0, False: 10.7k]
  |  Branch (465:7): [True: 0, False: 0]
  |  Branch (465:7): [True: 0, False: 0]
  ------------------
  466|      0|    return CURLM_BAD_EASY_HANDLE;
  467|       |
  468|       |  /* Prevent users from adding same easy handle more than once and prevent
  469|       |     adding to more than one multi stack */
  470|  10.7k|  if(data->multi)
  ------------------
  |  Branch (470:6): [True: 0, False: 10.7k]
  ------------------
  471|      0|    return CURLM_ADDED_ALREADY;
  472|       |
  473|  10.7k|  if(multi->in_callback)
  ------------------
  |  Branch (473:6): [True: 0, False: 10.7k]
  ------------------
  474|      0|    return CURLM_RECURSIVE_API_CALL;
  475|       |
  476|  10.7k|  if(multi->dead) {
  ------------------
  |  Branch (476:6): [True: 0, False: 10.7k]
  ------------------
  477|       |    /* a "dead" handle cannot get added transfers while any existing easy
  478|       |       handles are still alive - but if there are none alive anymore, it is
  479|       |       fine to start over and unmark the "deadness" of this handle.
  480|       |       This means only the admin handle MUST be present. */
  481|      0|    if((Curl_uint32_tbl_count(&multi->xfers) != 1) ||
  ------------------
  |  Branch (481:8): [True: 0, False: 0]
  ------------------
  482|      0|       !Curl_uint32_tbl_contains(&multi->xfers, 0))
  ------------------
  |  Branch (482:8): [True: 0, False: 0]
  ------------------
  483|      0|      return CURLM_ABORTED_BY_CALLBACK;
  484|      0|    multi->dead = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  485|      0|    Curl_uint32_bset_clear(&multi->process);
  486|      0|    Curl_uint32_bset_clear(&multi->dirty);
  487|      0|    Curl_uint32_bset_clear(&multi->pending);
  488|      0|    Curl_uint32_bset_clear(&multi->msgsent);
  489|      0|  }
  490|       |
  491|  10.7k|  if(data->multi_easy) {
  ------------------
  |  Branch (491:6): [True: 0, False: 10.7k]
  ------------------
  492|       |    /* if this easy handle was previously used for curl_easy_perform(), there
  493|       |       is a private multi handle here that we can kill */
  494|      0|    curl_multi_cleanup(data->multi_easy);
  495|      0|    data->multi_easy = NULL;
  496|      0|  }
  497|       |
  498|       |  /* Insert the easy into the multi->xfers table, assigning it a `mid`. */
  499|  10.7k|  if(multi_xfers_add(multi, data))
  ------------------
  |  Branch (499:6): [True: 0, False: 10.7k]
  ------------------
  500|      0|    return CURLM_OUT_OF_MEMORY;
  501|       |
  502|       |  /* Initialize timeout list for this handle */
  503|  10.7k|  Curl_llist_init(&data->state.timeoutlist, NULL);
  504|       |
  505|       |  /*
  506|       |   * No failure allowed in this function beyond this point. No modification of
  507|       |   * easy nor multi handle allowed before this except for potential multi's
  508|       |   * connection pool growing which will not be undone in this function no
  509|       |   * matter what.
  510|       |   */
  511|  10.7k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (511:6): [True: 0, False: 10.7k]
  ------------------
  512|      0|    data->set.errorbuffer[0] = 0;
  513|       |
  514|  10.7k|  data->state.os_errno = 0;
  515|       |
  516|       |  /* make the Curl_easy refer back to this multi handle - before Curl_expire()
  517|       |     is called. */
  518|  10.7k|  data->multi = multi;
  519|       |
  520|       |  /* set the easy handle */
  521|  10.7k|  multistate(data, MSTATE_INIT);
  ------------------
  |  |  200|  10.7k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
  522|       |
  523|       |#ifdef USE_LIBPSL
  524|       |  /* Do the same for PSL. */
  525|       |  if(data->share && (data->share->specifier & (1 << CURL_LOCK_DATA_PSL)))
  526|       |    data->psl = &data->share->psl;
  527|       |  else
  528|       |    data->psl = &multi->psl;
  529|       |#endif
  530|       |
  531|       |  /* add the easy handle to the process set */
  532|  10.7k|  Curl_uint32_bset_add(&multi->process, data->mid);
  533|  10.7k|  ++multi->xfers_alive;
  534|  10.7k|  ++multi->xfers_total_ever;
  535|       |
  536|  10.7k|  Curl_cpool_xfer_init(data);
  537|  10.7k|  multi_warn_debug(multi, data);
  538|       |
  539|       |  /* Make sure the new handle will run */
  540|  10.7k|  Curl_multi_mark_dirty(data);
  541|       |
  542|       |  /* Necessary in event based processing, where dirty handles trigger
  543|       |   * a timeout callback invocation. */
  544|  10.7k|  mresult = Curl_update_timer(multi);
  545|  10.7k|  if(mresult) {
  ------------------
  |  Branch (545:6): [True: 0, False: 10.7k]
  ------------------
  546|      0|    data->multi = NULL; /* not anymore */
  547|      0|    Curl_uint32_tbl_remove(&multi->xfers, data->mid);
  548|      0|    data->mid = UINT32_MAX;
  549|      0|    return mresult;
  550|      0|  }
  551|       |
  552|       |  /* The admin handle only ever has default timeouts set. To improve the
  553|       |     state somewhat we clone the timeouts from each added handle so that the
  554|       |     admin handle always has the same timeouts as the most recently added
  555|       |     easy handle. */
  556|  10.7k|  multi->admin->set.timeout = data->set.timeout;
  557|  10.7k|  multi->admin->set.server_response_timeout =
  558|  10.7k|    data->set.server_response_timeout;
  559|  10.7k|  multi->admin->set.no_signal = data->set.no_signal;
  560|       |
  561|  10.7k|  mresult = multi_assess_wakeup(multi);
  562|  10.7k|  if(mresult) {
  ------------------
  |  Branch (562:6): [True: 0, False: 10.7k]
  ------------------
  563|      0|    failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  564|      0|    return mresult;
  565|      0|  }
  566|       |
  567|  10.7k|  CURL_TRC_M(data, "added to multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  10.7k|  do {                                   \
  |  |  149|  10.7k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.7k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  21.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.7k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  21.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.7k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.7k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
  568|  10.7k|             data->mid, Curl_multi_xfers_running(multi),
  569|  10.7k|             Curl_uint32_tbl_count(&multi->xfers));
  570|  10.7k|  return CURLM_OK;
  571|  10.7k|}
curl_multi_remove_handle:
  777|  10.7k|{
  778|  10.7k|  struct Curl_multi *multi = m;
  779|  10.7k|  struct Curl_easy *data = curl;
  780|  10.7k|  bool premature;
  781|  10.7k|  struct Curl_llist_node *e;
  782|  10.7k|  CURLMcode mresult;
  783|  10.7k|  uint32_t mid;
  784|       |
  785|       |  /* First, make some basic checks that the CURLM handle is a good handle */
  786|  10.7k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  10.7k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  10.7k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  10.7k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 10.7k, False: 0]
  |  |  |  Branch (82:12): [True: 10.7k, False: 0]
  |  |  ------------------
  |  |   83|  10.7k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (786:6): [True: 0, False: 10.7k]
  |  Branch (786:7): [True: 0, False: 0]
  |  Branch (786:7): [True: 0, False: 0]
  ------------------
  787|      0|    return CURLM_BAD_HANDLE;
  788|       |
  789|       |  /* Verify that we got a somewhat good easy handle too */
  790|  10.7k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|  10.7k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  10.7k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  10.7k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:5): [True: 10.7k, False: 0]
  |  |  |  Branch (136:12): [True: 10.7k, False: 0]
  |  |  ------------------
  |  |  137|  10.7k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (790:6): [True: 0, False: 10.7k]
  |  Branch (790:7): [True: 0, False: 0]
  |  Branch (790:7): [True: 0, False: 0]
  ------------------
  791|      0|    return CURLM_BAD_EASY_HANDLE;
  792|       |
  793|       |  /* Prevent users from trying to remove same easy handle more than once */
  794|  10.7k|  if(!data->multi)
  ------------------
  |  Branch (794:6): [True: 0, False: 10.7k]
  ------------------
  795|      0|    return CURLM_OK; /* it is already removed so let's say it is fine! */
  796|       |
  797|       |  /* Prevent users from trying to remove an easy handle from the wrong multi */
  798|  10.7k|  if(data->multi != multi)
  ------------------
  |  Branch (798:6): [True: 0, False: 10.7k]
  ------------------
  799|      0|    return CURLM_BAD_EASY_HANDLE;
  800|       |
  801|  10.7k|  if(data->mid == UINT32_MAX) {
  ------------------
  |  Branch (801:6): [True: 0, False: 10.7k]
  ------------------
  802|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (802:5): [Folded, False: 0]
  |  Branch (802:5): [Folded, False: 0]
  ------------------
  803|      0|    return CURLM_INTERNAL_ERROR;
  804|      0|  }
  805|  10.7k|  if(Curl_uint32_tbl_get(&multi->xfers, data->mid) != data) {
  ------------------
  |  Branch (805:6): [True: 0, False: 10.7k]
  ------------------
  806|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (806:5): [Folded, False: 0]
  |  Branch (806:5): [Folded, False: 0]
  ------------------
  807|      0|    return CURLM_INTERNAL_ERROR;
  808|      0|  }
  809|       |
  810|  10.7k|  if(multi->in_callback)
  ------------------
  |  Branch (810:6): [True: 0, False: 10.7k]
  ------------------
  811|      0|    return CURLM_RECURSIVE_API_CALL;
  812|       |
  813|  10.7k|  premature = (data->mstate < MSTATE_COMPLETED);
  814|       |
  815|       |  /* If the 'state' is not INIT or COMPLETED, we might need to do something
  816|       |     nice to put the easy_handle in a good known state when this returns. */
  817|  10.7k|  if(data->conn &&
  ------------------
  |  Branch (817:6): [True: 346, False: 10.4k]
  ------------------
  818|    346|     data->mstate > MSTATE_DO &&
  ------------------
  |  Branch (818:6): [True: 56, False: 290]
  ------------------
  819|     56|     data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (819:6): [True: 56, False: 0]
  ------------------
  820|       |    /* Set connection owner so that the DONE function closes it. We can
  821|       |       safely do this here since connection is killed. */
  822|     56|    streamclose(data->conn, "Removed with partial response");
  ------------------
  |  |  102|     56|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|     56|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
  823|     56|  }
  824|       |
  825|  10.7k|  if(data->conn) {
  ------------------
  |  Branch (825:6): [True: 346, False: 10.4k]
  ------------------
  826|       |    /* multi_done() clears the association between the easy handle and the
  827|       |       connection.
  828|       |
  829|       |       Note that this ignores the return code because there is
  830|       |       nothing really useful to do with it anyway! */
  831|    346|    (void)multi_done(data, data->result, premature);
  832|    346|  }
  833|       |
  834|       |  /* The timer must be shut down before data->multi is set to NULL, else the
  835|       |     timenode will remain in the splay tree after curl_easy_cleanup is
  836|       |     called. Do it after multi_done() in case that sets another time! */
  837|  10.7k|  Curl_expire_clear(data);
  838|       |
  839|       |  /* If in `msgsent`, it was deducted from `multi->xfers_alive` already. */
  840|  10.7k|  if(!Curl_uint32_bset_contains(&multi->msgsent, data->mid))
  ------------------
  |  Branch (840:6): [True: 451, False: 10.3k]
  ------------------
  841|    451|    --multi->xfers_alive;
  842|       |
  843|  10.7k|  Curl_wildcard_dtor(&data->wildcard);
  844|       |
  845|  10.7k|  data->mstate = MSTATE_COMPLETED;
  846|       |
  847|       |  /* Remove the association between the connection and the handle */
  848|  10.7k|  Curl_detach_connection(data);
  849|       |
  850|       |  /* Tell event handling that this transfer is definitely going away */
  851|  10.7k|  Curl_multi_ev_xfer_done(multi, data);
  852|       |
  853|  10.7k|  if(data->set.connect_only && !data->multi_easy) {
  ------------------
  |  Branch (853:6): [True: 6, False: 10.7k]
  |  Branch (853:32): [True: 6, False: 0]
  ------------------
  854|       |    /* This removes a handle that was part the multi interface that used
  855|       |       CONNECT_ONLY, that connection is now left alive but since this handle
  856|       |       has bits.close set nothing can use that transfer anymore and it is
  857|       |       forbidden from reuse. This easy handle cannot find the connection
  858|       |       anymore once removed from the multi handle
  859|       |
  860|       |       Better close the connection here, at once.
  861|       |    */
  862|      6|    struct connectdata *c;
  863|      6|    curl_socket_t s;
  864|      6|    s = Curl_getconnectinfo(data, &c);
  865|      6|    if((s != CURL_SOCKET_BAD) && c) {
  ------------------
  |  |  145|      6|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (865:8): [True: 1, False: 5]
  |  Branch (865:34): [True: 1, False: 0]
  ------------------
  866|      1|      Curl_conn_terminate(data, c, TRUE);
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  867|      1|    }
  868|      6|  }
  869|       |
  870|  10.7k|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (870:6): [True: 370, False: 10.4k]
  ------------------
  871|       |    /* Mark any connect-only connection for closure */
  872|    370|    Curl_cpool_do_by_id(data, data->state.lastconnect_id,
  873|    370|                        close_connect_only, NULL);
  874|    370|  }
  875|       |
  876|       |#ifdef USE_LIBPSL
  877|       |  /* Remove the PSL association. */
  878|       |  if(data->psl == &multi->psl)
  879|       |    data->psl = NULL;
  880|       |#endif
  881|       |
  882|       |  /* make sure there is no pending message in the queue sent from this easy
  883|       |     handle */
  884|  10.7k|  for(e = Curl_llist_head(&multi->msglist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (884:45): [True: 9.84k, False: 940]
  ------------------
  885|  9.84k|    struct Curl_message *msg = Curl_node_elem(e);
  886|       |
  887|  9.84k|    if(msg->extmsg.easy_handle == data) {
  ------------------
  |  Branch (887:8): [True: 9.84k, False: 0]
  ------------------
  888|  9.84k|      Curl_node_remove(e);
  889|       |      /* there can only be one from this specific handle */
  890|  9.84k|      break;
  891|  9.84k|    }
  892|  9.84k|  }
  893|       |
  894|       |  /* clear the association to this multi handle */
  895|  10.7k|  mid = data->mid;
  896|  10.7k|  DEBUGASSERT(Curl_uint32_tbl_contains(&multi->xfers, mid));
  ------------------
  |  | 1081|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (896:3): [True: 0, False: 10.7k]
  |  Branch (896:3): [True: 10.7k, False: 0]
  ------------------
  897|  10.7k|  Curl_uint32_tbl_remove(&multi->xfers, mid);
  898|  10.7k|  Curl_uint32_bset_remove(&multi->process, mid);
  899|  10.7k|  Curl_uint32_bset_remove(&multi->dirty, mid);
  900|  10.7k|  Curl_uint32_bset_remove(&multi->pending, mid);
  901|  10.7k|  Curl_uint32_bset_remove(&multi->msgsent, mid);
  902|  10.7k|  data->multi = NULL;
  903|  10.7k|  data->mid = UINT32_MAX;
  904|  10.7k|  data->master_mid = UINT32_MAX;
  905|       |
  906|       |  /* NOTE NOTE NOTE
  907|       |     We do not touch the easy handle here! */
  908|  10.7k|  process_pending_handles(multi);
  909|       |
  910|  10.7k|  mresult = Curl_update_timer(multi);
  911|  10.7k|  if(mresult)
  ------------------
  |  Branch (911:6): [True: 0, False: 10.7k]
  ------------------
  912|      0|    return mresult;
  913|       |
  914|  10.7k|  mresult = multi_assess_wakeup(multi);
  915|  10.7k|  if(mresult) {
  ------------------
  |  Branch (915:6): [True: 0, False: 10.7k]
  ------------------
  916|      0|    failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  917|      0|    return mresult;
  918|      0|  }
  919|       |
  920|  10.7k|  CURL_TRC_M(data, "removed from multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  10.7k|  do {                                   \
  |  |  149|  10.7k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.7k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  21.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.7k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  21.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.7k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.7k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
  921|  10.7k|             mid, Curl_multi_xfers_running(multi),
  922|  10.7k|             Curl_uint32_tbl_count(&multi->xfers));
  923|  10.7k|  return CURLM_OK;
  924|  10.7k|}
Curl_multiplex_wanted:
  928|    558|{
  929|    558|  return multi && multi->multiplexing;
  ------------------
  |  Branch (929:10): [True: 558, False: 0]
  |  Branch (929:19): [True: 558, False: 0]
  ------------------
  930|    558|}
Curl_detach_connection:
  939|  56.1k|{
  940|  56.1k|  struct connectdata *conn = data->conn;
  941|  56.1k|  if(conn) {
  ------------------
  |  Branch (941:6): [True: 12.5k, False: 43.5k]
  ------------------
  942|       |    /* this should never happen, prevent underflow */
  943|  12.5k|    DEBUGASSERT(conn->attached_xfers);
  ------------------
  |  | 1081|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (943:5): [True: 0, False: 12.5k]
  |  Branch (943:5): [True: 12.5k, False: 0]
  ------------------
  944|  12.5k|    if(conn->attached_xfers) {
  ------------------
  |  Branch (944:8): [True: 12.5k, False: 0]
  ------------------
  945|  12.5k|      conn->attached_xfers--;
  946|  12.5k|      if(!conn->attached_xfers)
  ------------------
  |  Branch (946:10): [True: 12.5k, False: 0]
  ------------------
  947|  12.5k|        conn->attached_multi = NULL;
  948|  12.5k|    }
  949|  12.5k|  }
  950|  56.1k|  data->conn = NULL;
  951|  56.1k|}
Curl_attach_connection:
  960|  12.5k|{
  961|  12.5k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (961:3): [True: 0, False: 12.5k]
  |  Branch (961:3): [True: 12.5k, False: 0]
  ------------------
  962|  12.5k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (962:3): [True: 0, False: 12.5k]
  |  Branch (962:3): [True: 12.5k, False: 0]
  ------------------
  963|  12.5k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (963:3): [True: 0, False: 12.5k]
  |  Branch (963:3): [True: 12.5k, False: 0]
  ------------------
  964|  12.5k|  DEBUGASSERT(conn->attached_xfers < UINT32_MAX);
  ------------------
  |  | 1081|  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|  data->conn = conn;
  966|  12.5k|  conn->attached_xfers++;
  967|       |  /* all attached transfers must be from the same multi */
  968|  12.5k|  if(!conn->attached_multi)
  ------------------
  |  Branch (968:6): [True: 12.5k, False: 0]
  ------------------
  969|  12.5k|    conn->attached_multi = data->multi;
  970|  12.5k|  DEBUGASSERT(conn->attached_multi == data->multi);
  ------------------
  |  | 1081|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (970:3): [True: 0, False: 12.5k]
  |  Branch (970:3): [True: 12.5k, False: 0]
  ------------------
  971|       |
  972|  12.5k|  if(conn->scheme && conn->scheme->run->attach)
  ------------------
  |  Branch (972:6): [True: 12.5k, False: 0]
  |  Branch (972:22): [True: 0, False: 12.5k]
  ------------------
  973|      0|    conn->scheme->run->attach(data, conn);
  974|  12.5k|}
Curl_multi_pollset:
 1134|   557k|{
 1135|   557k|  CURLcode result = CURLE_OK;
 1136|       |
 1137|   557k|  Curl_pollset_reset(ps);
 1138|   557k|#ifdef ENABLE_WAKEUP
 1139|       |  /* The admin handle always listens on the wakeup socket when there
 1140|       |   * are transfers alive. */
 1141|   557k|  if(data->multi && (data == data->multi->admin) &&
  ------------------
  |  Branch (1141:6): [True: 557k, False: 0]
  |  Branch (1141:21): [True: 202k, False: 354k]
  ------------------
 1142|   202k|     data->multi->xfers_alive) {
  ------------------
  |  Branch (1142:6): [True: 202k, False: 0]
  ------------------
 1143|   202k|    result = Curl_pollset_add_in(data, ps, data->multi->wakeup_pair[0]);
  ------------------
  |  |  162|   202k|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|   202k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1144|   202k|  }
 1145|   557k|#endif
 1146|       |  /* If the transfer has no connection, this is fine. Happens when
 1147|       |     called via curl_multi_remove_handle() => Curl_multi_ev_assess() =>
 1148|       |     Curl_multi_pollset(). */
 1149|   557k|  if(!result && data->conn) {
  ------------------
  |  Branch (1149:6): [True: 557k, False: 0]
  |  Branch (1149:17): [True: 354k, False: 202k]
  ------------------
 1150|   354k|    switch(data->mstate) {
 1151|      0|    case MSTATE_INIT:
  ------------------
  |  Branch (1151:5): [True: 0, False: 354k]
  ------------------
 1152|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (1152:5): [True: 0, False: 354k]
  ------------------
 1153|      0|    case MSTATE_SETUP:
  ------------------
  |  Branch (1153:5): [True: 0, False: 354k]
  ------------------
 1154|      0|    case MSTATE_CONNECT:
  ------------------
  |  Branch (1154:5): [True: 0, False: 354k]
  ------------------
 1155|       |      /* nothing to poll for yet */
 1156|      0|      break;
 1157|       |
 1158|   350k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (1158:5): [True: 350k, False: 4.30k]
  ------------------
 1159|   350k|      if(data->conn && !data->conn->bits.dns_resolved)
  ------------------
  |  Branch (1159:10): [True: 350k, False: 0]
  |  Branch (1159:24): [True: 127k, False: 222k]
  ------------------
 1160|   127k|        result = Curl_resolv_pollset(data, ps);
 1161|   350k|      if(!result)
  ------------------
  |  Branch (1161:10): [True: 350k, False: 0]
  ------------------
 1162|   350k|        result = mstate_connecting_pollset(data, ps);
 1163|   350k|      break;
 1164|       |
 1165|      0|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (1165:5): [True: 0, False: 354k]
  ------------------
 1166|  4.04k|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (1166:5): [True: 4.04k, False: 350k]
  ------------------
 1167|  4.04k|      result = mstate_protocol_pollset(data, ps);
 1168|  4.04k|      break;
 1169|       |
 1170|      0|    case MSTATE_DO:
  ------------------
  |  Branch (1170:5): [True: 0, False: 354k]
  ------------------
 1171|     38|    case MSTATE_DOING:
  ------------------
  |  Branch (1171:5): [True: 38, False: 354k]
  ------------------
 1172|     38|      result = mstate_do_pollset(data, ps);
 1173|     38|      break;
 1174|       |
 1175|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (1175:5): [True: 0, False: 354k]
  ------------------
 1176|      0|      result = mstate_domore_pollset(data, ps);
 1177|      0|      break;
 1178|       |
 1179|      0|    case MSTATE_DID: /* same as PERFORMING in regard to polling */
  ------------------
  |  Branch (1179:5): [True: 0, False: 354k]
  ------------------
 1180|    143|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (1180:5): [True: 143, False: 354k]
  ------------------
 1181|    143|      result = mstate_perform_pollset(data, ps);
 1182|    143|      break;
 1183|       |
 1184|     86|    case MSTATE_RATELIMITING:
  ------------------
  |  Branch (1184:5): [True: 86, False: 354k]
  ------------------
 1185|       |      /* we need to let time pass, ignore socket(s) */
 1186|     86|      break;
 1187|       |
 1188|      0|    case MSTATE_DONE:
  ------------------
  |  Branch (1188:5): [True: 0, False: 354k]
  ------------------
 1189|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (1189:5): [True: 0, False: 354k]
  ------------------
 1190|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (1190:5): [True: 0, False: 354k]
  ------------------
 1191|       |      /* nothing more to poll for */
 1192|      0|      break;
 1193|       |
 1194|      0|    default:
  ------------------
  |  Branch (1194:5): [True: 0, False: 354k]
  ------------------
 1195|      0|      failf(data, "multi_getsock: unexpected multi state %d", data->mstate);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1196|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1196:7): [Folded, False: 0]
  |  Branch (1196:7): [Folded, False: 0]
  ------------------
 1197|      0|      break;
 1198|   354k|    }
 1199|   354k|  }
 1200|       |
 1201|   557k|  if(result) {
  ------------------
  |  Branch (1201:6): [True: 0, False: 557k]
  ------------------
 1202|      0|    if(result == CURLE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1202:8): [True: 0, False: 0]
  ------------------
 1203|      0|      return CURLM_OUT_OF_MEMORY;
 1204|      0|    failf(data, "error determining pollset: %d", result);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1205|      0|    return CURLM_INTERNAL_ERROR;
 1206|      0|  }
 1207|       |
 1208|   557k|#ifdef CURLVERBOSE
 1209|   557k|  if(CURL_TRC_M_is_verbose(data)) {
  ------------------
  |  |  135|   557k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  326|   557k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.11M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 557k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 557k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.11M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|   557k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1210|      0|    size_t timeout_count = Curl_llist_count(&data->state.timeoutlist);
 1211|      0|    switch(ps->n) {
 1212|      0|    case 0:
  ------------------
  |  Branch (1212:5): [True: 0, False: 0]
  ------------------
 1213|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1214|      0|                 timeout_count,
 1215|      0|                 Curl_xfer_send_is_paused(data),
 1216|      0|                 Curl_xfer_recv_is_paused(data));
 1217|      0|      break;
 1218|      0|    case 1:
  ------------------
  |  Branch (1218:5): [True: 0, False: 0]
  ------------------
 1219|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1220|      0|                 ps->sockets[0],
 1221|      0|                 (ps->actions[0] & CURL_POLL_IN) ? "IN" : "",
 1222|      0|                 (ps->actions[0] & CURL_POLL_OUT) ? "OUT" : "",
 1223|      0|                 timeout_count);
 1224|      0|      break;
 1225|      0|    case 2:
  ------------------
  |  Branch (1225:5): [True: 0, False: 0]
  ------------------
 1226|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1227|      0|                 "fd=%" FMT_SOCKET_T " %s%s], timeouts=%zu",
 1228|      0|                 ps->sockets[0],
 1229|      0|                 (ps->actions[0] & CURL_POLL_IN) ? "IN" : "",
 1230|      0|                 (ps->actions[0] & CURL_POLL_OUT) ? "OUT" : "",
 1231|      0|                 ps->sockets[1],
 1232|      0|                 (ps->actions[1] & CURL_POLL_IN) ? "IN" : "",
 1233|      0|                 (ps->actions[1] & CURL_POLL_OUT) ? "OUT" : "",
 1234|      0|                 timeout_count);
 1235|      0|      break;
 1236|      0|    default:
  ------------------
  |  Branch (1236:5): [True: 0, False: 0]
  ------------------
 1237|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1238|      0|      break;
 1239|      0|    }
 1240|      0|    CURL_TRC_EASY_TIMERS(data);
  ------------------
  |  |  330|      0|  do {                                  \
  |  |  331|      0|    if(CURL_TRC_TIMER_is_verbose(data)) \
  |  |  ------------------
  |  |  |  |  139|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  332|      0|      Curl_trc_easy_timers(data);       \
  |  |  333|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (333:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1241|      0|  }
 1242|   557k|#endif
 1243|       |
 1244|   557k|  return CURLM_OK;
 1245|   557k|}
curl_multi_fdset:
 1250|   202k|{
 1251|       |  /* Scan through all the easy handles to get the file descriptors set.
 1252|       |     Some easy handles may not have connected to the remote host yet,
 1253|       |     and then we must make sure that is done. */
 1254|   202k|  int this_max_fd = -1;
 1255|   202k|  struct Curl_multi *multi = m;
 1256|   202k|  struct easy_pollset ps;
 1257|   202k|  unsigned int i;
 1258|   202k|  uint32_t mid;
 1259|   202k|  (void)exc_fd_set;
 1260|       |
 1261|   202k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|   202k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|   202k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|   202k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 202k, False: 0]
  |  |  |  Branch (82:12): [True: 202k, False: 0]
  |  |  ------------------
  |  |   83|   202k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1261:6): [True: 0, False: 202k]
  |  Branch (1261:7): [True: 0, False: 0]
  |  Branch (1261:7): [True: 0, False: 0]
  ------------------
 1262|      0|    return CURLM_BAD_HANDLE;
 1263|       |
 1264|   202k|  if(multi->in_callback)
  ------------------
  |  Branch (1264:6): [True: 0, False: 202k]
  ------------------
 1265|      0|    return CURLM_RECURSIVE_API_CALL;
 1266|       |
 1267|   202k|  Curl_pollset_init(&ps);
 1268|   202k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (1268:6): [True: 202k, False: 0]
  ------------------
 1269|   557k|    do {
 1270|   557k|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 1271|       |
 1272|   557k|      if(!data) {
  ------------------
  |  Branch (1272:10): [True: 0, False: 557k]
  ------------------
 1273|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1273:9): [Folded, False: 0]
  |  Branch (1273:9): [Folded, False: 0]
  ------------------
 1274|      0|        continue;
 1275|      0|      }
 1276|       |
 1277|   557k|      Curl_multi_pollset(data, &ps);
 1278|   987k|      for(i = 0; i < ps.n; i++) {
  ------------------
  |  Branch (1278:18): [True: 429k, False: 557k]
  ------------------
 1279|   429k|        if(!FDSET_SOCK(ps.sockets[i]))
  ------------------
  |  |  101|   429k|#define FDSET_SOCK(s) ((s) < FD_SETSIZE)
  ------------------
  |  Branch (1279:12): [True: 0, False: 429k]
  ------------------
 1280|       |          /* pretend it does not exist */
 1281|      0|          continue;
 1282|   429k|        if(ps.actions[i] & CURL_POLL_IN)
  ------------------
  |  |  283|   429k|#define CURL_POLL_IN     1
  ------------------
  |  Branch (1282:12): [True: 404k, False: 25.4k]
  ------------------
 1283|   429k|          FD_SET(ps.sockets[i], read_fd_set);
 1284|   429k|        if(ps.actions[i] & CURL_POLL_OUT)
  ------------------
  |  |  284|   429k|#define CURL_POLL_OUT    2
  ------------------
  |  Branch (1284:12): [True: 25.4k, False: 404k]
  ------------------
 1285|   429k|          FD_SET(ps.sockets[i], write_fd_set);
 1286|   429k|        if((int)ps.sockets[i] > this_max_fd)
  ------------------
  |  Branch (1286:12): [True: 429k, False: 0]
  ------------------
 1287|   429k|          this_max_fd = (int)ps.sockets[i];
 1288|   429k|      }
 1289|   557k|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (1289:13): [True: 354k, False: 202k]
  ------------------
 1290|   202k|  }
 1291|       |
 1292|   202k|  Curl_cshutdn_setfds(&multi->cshutdn, multi->admin,
 1293|   202k|                      read_fd_set, write_fd_set, &this_max_fd);
 1294|       |
 1295|   202k|  *max_fd = this_max_fd;
 1296|   202k|  Curl_pollset_cleanup(&ps);
 1297|       |
 1298|   202k|  return CURLM_OK;
 1299|   202k|}
curl_multi_wakeup:
 1675|    826|{
 1676|       |  /* this function is usually called from another thread,
 1677|       |     it has to be careful only to access parts of the
 1678|       |     Curl_multi struct that are constant */
 1679|    826|  struct Curl_multi *multi = m;
 1680|    826|  CURLMcode mresult = CURLM_WAKEUP_FAILURE;
 1681|       |
 1682|       |  /* GOOD_MULTI_HANDLE can be safely called */
 1683|    826|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|    826|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|    826|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|    826|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 826, False: 0]
  |  |  |  Branch (82:12): [True: 826, False: 0]
  |  |  ------------------
  |  |   83|    826|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1683:6): [True: 0, False: 826]
  |  Branch (1683:7): [True: 0, False: 0]
  |  Branch (1683:7): [True: 0, False: 0]
  ------------------
 1684|      0|    return CURLM_BAD_HANDLE;
 1685|       |
 1686|    826|#ifdef ENABLE_WAKEUP
 1687|       |  /* the wakeup_pair variable is only written during init and cleanup,
 1688|       |     making it safe to access from another thread after the init part
 1689|       |     and before cleanup */
 1690|    826|  if(!Curl_wakeup_signal(multi->wakeup_pair))
  ------------------
  |  Branch (1690:6): [True: 826, False: 0]
  ------------------
 1691|    826|    mresult = CURLM_OK;
 1692|    826|#endif
 1693|       |#ifdef USE_WINSOCK
 1694|       |  if(WSASetEvent(multi->wsa_event))
 1695|       |    mresult = CURLM_OK;
 1696|       |#endif
 1697|    826|  return mresult;
 1698|    826|}
Curl_multi_connchanged:
 1728|  6.06k|{
 1729|       |  multi->recheckstate = TRUE;
  ------------------
  |  | 1055|  6.06k|#define TRUE true
  ------------------
 1730|  6.06k|}
curl_multi_perform:
 2937|   212k|{
 2938|   212k|  struct Curl_multi *multi = m;
 2939|       |
 2940|   212k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|   212k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|   212k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|   212k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 212k, False: 0]
  |  |  |  Branch (82:12): [True: 212k, False: 0]
  |  |  ------------------
  |  |   83|   212k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2940:6): [True: 0, False: 212k]
  |  Branch (2940:7): [True: 0, False: 0]
  |  Branch (2940:7): [True: 0, False: 0]
  ------------------
 2941|      0|    return CURLM_BAD_HANDLE;
 2942|       |
 2943|   212k|  return multi_perform(multi, running_handles);
 2944|   212k|}
curl_multi_cleanup:
 2947|  10.0k|{
 2948|  10.0k|  struct Curl_multi *multi = m;
 2949|  10.0k|  if(GOOD_MULTI_HANDLE(multi)) {
  ------------------
  |  |   82|  10.0k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  10.0k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  10.0k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:3): [True: 10.0k, False: 0]
  |  |  |  Branch (82:5): [True: 10.0k, False: 0]
  |  |  |  Branch (82:12): [True: 10.0k, False: 0]
  |  |  ------------------
  |  |   83|  10.0k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2949:6): [True: 0, False: 0]
  |  Branch (2949:6): [True: 0, False: 0]
  ------------------
 2950|  10.0k|    void *entry;
 2951|  10.0k|    uint32_t mid;
 2952|  10.0k|    if(multi->in_callback)
  ------------------
  |  Branch (2952:8): [True: 0, False: 10.0k]
  ------------------
 2953|      0|      return CURLM_RECURSIVE_API_CALL;
 2954|  10.0k|    if(multi->in_ntfy_callback)
  ------------------
  |  Branch (2954:8): [True: 0, False: 10.0k]
  ------------------
 2955|      0|      return CURLM_RECURSIVE_API_CALL;
 2956|       |
 2957|       |    /* First remove all remaining easy handles,
 2958|       |     * close internal ones. admin handle is special */
 2959|  10.0k|    if(Curl_uint32_tbl_first(&multi->xfers, &mid, &entry)) {
  ------------------
  |  Branch (2959:8): [True: 10.0k, False: 0]
  ------------------
 2960|  10.0k|      do {
 2961|  10.0k|        struct Curl_easy *data = entry;
 2962|  10.0k|        if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|  10.0k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  10.0k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  10.0k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:5): [True: 10.0k, False: 0]
  |  |  |  Branch (136:12): [True: 10.0k, False: 0]
  |  |  ------------------
  |  |  137|  10.0k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2962:12): [True: 0, False: 10.0k]
  |  Branch (2962:13): [True: 0, False: 0]
  |  Branch (2962:13): [True: 0, False: 0]
  ------------------
 2963|      0|          return CURLM_BAD_HANDLE;
 2964|       |
 2965|  10.0k|#ifdef DEBUGBUILD
 2966|  10.0k|        if(mid != data->mid) {
  ------------------
  |  Branch (2966:12): [True: 0, False: 10.0k]
  ------------------
 2967|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2968|      0|                     "but unexpected data->mid=%u\n", mid, data->mid);
 2969|      0|          DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2969:11): [Folded, False: 0]
  |  Branch (2969:11): [Folded, False: 0]
  ------------------
 2970|      0|        }
 2971|  10.0k|#endif
 2972|       |
 2973|  10.0k|        if(data == multi->admin)
  ------------------
  |  Branch (2973:12): [True: 10.0k, False: 0]
  ------------------
 2974|  10.0k|          continue;
 2975|       |
 2976|      0|        if(!data->state.done && data->conn)
  ------------------
  |  Branch (2976:12): [True: 0, False: 0]
  |  Branch (2976:33): [True: 0, False: 0]
  ------------------
 2977|       |          /* if DONE was never called for this handle */
 2978|      0|          (void)multi_done(data, CURLE_OK, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2979|       |
 2980|      0|        data->multi = NULL; /* clear the association */
 2981|      0|        Curl_uint32_tbl_remove(&multi->xfers, mid);
 2982|      0|        data->mid = UINT32_MAX;
 2983|       |
 2984|       |#ifdef USE_LIBPSL
 2985|       |        if(data->psl == &multi->psl)
 2986|       |          data->psl = NULL;
 2987|       |#endif
 2988|      0|        if(data->state.internal)
  ------------------
  |  Branch (2988:12): [True: 0, False: 0]
  ------------------
 2989|      0|          Curl_close(&data);
 2990|  10.0k|      } while(Curl_uint32_tbl_next(&multi->xfers, mid, &mid, &entry));
  ------------------
  |  Branch (2990:15): [True: 0, False: 10.0k]
  ------------------
 2991|  10.0k|    }
 2992|       |
 2993|  10.0k|#ifdef USE_RESOLV_THREADED
 2994|  10.0k|    Curl_async_thrdd_multi_destroy(multi, !multi->quick_exit);
 2995|  10.0k|#endif
 2996|  10.0k|    Curl_cpool_destroy(&multi->cpool);
 2997|  10.0k|    Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
 2998|  10.0k|    if(multi->admin) {
  ------------------
  |  Branch (2998:8): [True: 10.0k, False: 0]
  ------------------
 2999|  10.0k|      CURL_TRC_M(multi->admin, "multi_cleanup, closing admin handle, done");
  ------------------
  |  |  148|  10.0k|  do {                                   \
  |  |  149|  10.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  20.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  20.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
 3000|  10.0k|      multi->admin->multi = NULL;
 3001|  10.0k|      Curl_uint32_tbl_remove(&multi->xfers, multi->admin->mid);
 3002|  10.0k|      Curl_close(&multi->admin);
 3003|  10.0k|    }
 3004|       |
 3005|  10.0k|    multi->magic = 0; /* not good anymore */
 3006|       |
 3007|  10.0k|    Curl_multi_ev_cleanup(multi);
 3008|  10.0k|    Curl_hash_destroy(&multi->proto_hash);
 3009|  10.0k|    Curl_dnscache_destroy(&multi->dnscache);
 3010|  10.0k|    Curl_psl_destroy(&multi->psl);
 3011|  10.0k|#ifdef USE_SSL
 3012|  10.0k|    Curl_ssl_scache_destroy(multi->ssl_scache);
 3013|  10.0k|#endif
 3014|       |
 3015|       |#ifdef USE_WINSOCK
 3016|       |    WSACloseEvent(multi->wsa_event);
 3017|       |#endif
 3018|  10.0k|#ifdef ENABLE_WAKEUP
 3019|  10.0k|  Curl_wakeup_destroy(multi->wakeup_pair);
 3020|  10.0k|#endif
 3021|       |
 3022|  10.0k|    multi_xfer_bufs_free(multi);
 3023|  10.0k|    Curl_mntfy_cleanup(multi);
 3024|  10.0k|#ifdef DEBUGBUILD
 3025|  10.0k|    if(Curl_uint32_tbl_count(&multi->xfers)) {
  ------------------
  |  Branch (3025:8): [True: 0, False: 10.0k]
  ------------------
 3026|      0|      multi_xfer_tbl_dump(multi);
 3027|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3027:7): [Folded, False: 0]
  |  Branch (3027:7): [Folded, False: 0]
  ------------------
 3028|      0|    }
 3029|  10.0k|#endif
 3030|  10.0k|    Curl_uint32_bset_destroy(&multi->process);
 3031|  10.0k|    Curl_uint32_bset_destroy(&multi->dirty);
 3032|  10.0k|    Curl_uint32_bset_destroy(&multi->pending);
 3033|  10.0k|    Curl_uint32_bset_destroy(&multi->msgsent);
 3034|  10.0k|    Curl_uint32_tbl_destroy(&multi->xfers);
 3035|  10.0k|    curlx_free(multi);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3036|       |
 3037|  10.0k|    return CURLM_OK;
 3038|  10.0k|  }
 3039|      0|  return CURLM_BAD_HANDLE;
 3040|  10.0k|}
Curl_multi_will_close:
 3081|  5.43k|{
 3082|  5.43k|  if(data) {
  ------------------
  |  Branch (3082:6): [True: 5.43k, False: 0]
  ------------------
 3083|  5.43k|    struct Curl_multi *multi = data->multi;
 3084|  5.43k|    if(multi) {
  ------------------
  |  Branch (3084:8): [True: 5.43k, False: 0]
  ------------------
 3085|  5.43k|      CURL_TRC_M(data, "Curl_multi_will_close fd=%" FMT_SOCKET_T, s);
  ------------------
  |  |  148|  5.43k|  do {                                   \
  |  |  149|  5.43k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.43k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.43k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  10.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.43k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.43k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  10.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.43k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.43k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.43k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.43k]
  |  |  ------------------
  ------------------
 3086|  5.43k|      Curl_multi_ev_socket_done(multi, data, s);
 3087|  5.43k|    }
 3088|  5.43k|  }
 3089|  5.43k|}
Curl_update_timer:
 3566|   234k|{
 3567|   234k|  struct curltime expire_ts;
 3568|   234k|  long timeout_ms;
 3569|   234k|  int rc;
 3570|   234k|  bool set_value = FALSE;
  ------------------
  |  | 1058|   234k|#define FALSE false
  ------------------
 3571|       |
 3572|   234k|  if(!multi->timer_cb || multi->dead)
  ------------------
  |  Branch (3572:6): [True: 234k, False: 0]
  |  Branch (3572:26): [True: 0, False: 0]
  ------------------
 3573|   234k|    return CURLM_OK;
 3574|      0|  multi_timeout(multi, &expire_ts, &timeout_ms);
 3575|       |
 3576|      0|  if(timeout_ms < 0 && multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3576:6): [True: 0, False: 0]
  |  Branch (3576:24): [True: 0, False: 0]
  ------------------
 3577|       |    /* nothing to do */
 3578|      0|  }
 3579|      0|  else if(timeout_ms < 0) {
  ------------------
  |  Branch (3579:11): [True: 0, False: 0]
  ------------------
 3580|       |    /* there is no timeout now but there was one previously */
 3581|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3582|      0|    timeout_ms = -1; /* normalize */
 3583|      0|    set_value = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3584|      0|  }
 3585|      0|  else if(multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3585:11): [True: 0, False: 0]
  ------------------
 3586|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3587|      0|    set_value = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3588|      0|  }
 3589|      0|  else if(curlx_ptimediff_us(&multi->last_expire_ts, &expire_ts)) {
  ------------------
  |  Branch (3589:11): [True: 0, False: 0]
  ------------------
 3590|       |    /* We had a timeout before and have one now, the absolute timestamp
 3591|       |     * differs. The relative timeout_ms may be the same, but the starting
 3592|       |     * point differs. Let the application restart its timer. */
 3593|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3594|      0|               timeout_ms);
 3595|      0|    set_value = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3596|      0|  }
 3597|      0|  else {
 3598|       |    /* We have same expire time as previously. Our relative 'timeout_ms'
 3599|       |     * may be different now, but the application has the timer running
 3600|       |     * and we do not to tell it to start this again. */
 3601|      0|  }
 3602|       |
 3603|      0|  if(set_value) {
  ------------------
  |  Branch (3603:6): [True: 0, False: 0]
  ------------------
 3604|      0|    multi->last_expire_ts = expire_ts;
 3605|      0|    multi->last_timeout_ms = timeout_ms;
 3606|      0|    set_in_callback(multi, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3607|      0|    rc = multi->timer_cb(multi, timeout_ms, multi->timer_userp);
 3608|      0|    set_in_callback(multi, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 3609|      0|    if(rc == -1) {
  ------------------
  |  Branch (3609:8): [True: 0, False: 0]
  ------------------
 3610|      0|      multi->dead = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3611|      0|      return CURLM_ABORTED_BY_CALLBACK;
 3612|      0|    }
 3613|      0|  }
 3614|      0|  return CURLM_OK;
 3615|      0|}
Curl_expire_ex:
 3681|   180k|{
 3682|   180k|  struct Curl_multi *multi = data->multi;
 3683|   180k|  struct curltime *curr_expire = &data->state.expiretime;
 3684|   180k|  struct curltime set;
 3685|       |
 3686|       |  /* this is only interesting while there is still an associated multi struct
 3687|       |     remaining! */
 3688|   180k|  if(!multi)
  ------------------
  |  Branch (3688:6): [True: 0, False: 180k]
  ------------------
 3689|      0|    return;
 3690|       |
 3691|   180k|  DEBUGASSERT(id < EXPIRE_LAST);
  ------------------
  |  | 1081|   180k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3691:3): [True: 0, False: 180k]
  |  Branch (3691:3): [True: 180k, False: 0]
  ------------------
 3692|       |
 3693|   180k|  set = *Curl_pgrs_now(data);
 3694|   180k|  set.tv_sec += (time_t)(milli / 1000); /* may be a 64 to 32-bit conversion */
 3695|   180k|  set.tv_usec += (int)(milli % 1000) * 1000;
 3696|       |
 3697|   180k|  if(set.tv_usec >= 1000000) {
  ------------------
  |  Branch (3697:6): [True: 12.1k, False: 168k]
  ------------------
 3698|  12.1k|    set.tv_sec++;
 3699|  12.1k|    set.tv_usec -= 1000000;
 3700|  12.1k|  }
 3701|       |
 3702|       |  /* Remove any timer with the same id */
 3703|   180k|  multi_deltimeout(data, id);
 3704|       |
 3705|       |  /* Add it to the timer list. It must stay in the list until it has expired
 3706|       |     in case we need to recompute the minimum timer later. */
 3707|   180k|  multi_addtimeout(data, &set, id);
 3708|       |
 3709|   180k|  if(curr_expire->tv_sec || curr_expire->tv_usec) {
  ------------------
  |  Branch (3709:6): [True: 172k, False: 7.49k]
  |  Branch (3709:29): [True: 0, False: 7.49k]
  ------------------
 3710|       |    /* This means that the struct is added as a node in the splay tree.
 3711|       |       Compare if the new time is earlier, and only remove-old/add-new if it
 3712|       |       is. */
 3713|   172k|    timediff_t diff = curlx_ptimediff_ms(&set, curr_expire);
 3714|   172k|    int rc;
 3715|       |
 3716|   172k|    if(diff > 0) {
  ------------------
  |  Branch (3716:8): [True: 505, False: 172k]
  ------------------
 3717|       |      /* The current splay tree entry is sooner than this new expiry time.
 3718|       |         We do not need to update our splay tree entry. */
 3719|    505|      return;
 3720|    505|    }
 3721|       |
 3722|       |    /* Since this is an updated time, we must remove the previous entry from
 3723|       |       the splay tree first and then re-add the new value */
 3724|   172k|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3725|   172k|                          &multi->timetree);
 3726|   172k|    if(rc)
  ------------------
  |  Branch (3726:8): [True: 0, False: 172k]
  ------------------
 3727|      0|      infof(data, "Internal error removing splay node = %d", rc);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3728|   172k|  }
 3729|       |
 3730|       |  /* Indicate that we are in the splay tree and insert the new timer expiry
 3731|       |     value since it is our local minimum. */
 3732|   179k|  *curr_expire = set;
 3733|   179k|  Curl_splayset(&data->state.timenode, data);
 3734|   179k|  multi->timetree = Curl_splayinsert(curr_expire, multi->timetree,
 3735|   179k|                                     &data->state.timenode);
 3736|   179k|}
Curl_expire:
 3750|   180k|{
 3751|   180k|  Curl_expire_ex(data, milli, id);
 3752|   180k|}
Curl_expire_done:
 3761|  5.63k|{
 3762|       |  /* remove the timer, if there */
 3763|  5.63k|  multi_deltimeout(data, id);
 3764|  5.63k|  CURL_TRC_TIMER(data, id, "cleared");
  ------------------
  |  |  173|  5.63k|  do {                                        \
  |  |  174|  5.63k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  5.63k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.63k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.63k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.63k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.63k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  5.63k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  5.63k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 5.63k]
  |  |  ------------------
  ------------------
 3765|  5.63k|}
Curl_expire_clear:
 3773|  43.5k|{
 3774|  43.5k|  struct Curl_multi *multi = data->multi;
 3775|  43.5k|  struct curltime *nowp = &data->state.expiretime;
 3776|       |
 3777|       |  /* this is only interesting while there is still an associated multi struct
 3778|       |     remaining! */
 3779|  43.5k|  if(!multi)
  ------------------
  |  Branch (3779:6): [True: 22.4k, False: 21.1k]
  ------------------
 3780|  22.4k|    return;
 3781|       |
 3782|  21.1k|  if(nowp->tv_sec || nowp->tv_usec) {
  ------------------
  |  Branch (3782:6): [True: 7.49k, False: 13.6k]
  |  Branch (3782:22): [True: 0, False: 13.6k]
  ------------------
 3783|       |    /* Since this is an cleared time, we must remove the previous entry from
 3784|       |       the splay tree */
 3785|  7.49k|    struct Curl_llist *list = &data->state.timeoutlist;
 3786|  7.49k|    int rc;
 3787|       |
 3788|  7.49k|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3789|  7.49k|                          &multi->timetree);
 3790|  7.49k|    if(rc)
  ------------------
  |  Branch (3790:8): [True: 0, False: 7.49k]
  ------------------
 3791|      0|      infof(data, "Internal error clearing splay node = %d", rc);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3792|       |
 3793|       |    /* clear the timeout list too */
 3794|  7.49k|    Curl_llist_destroy(list, NULL);
 3795|       |
 3796|  7.49k|    if(data->id >= 0)
  ------------------
  |  Branch (3796:8): [True: 7.49k, False: 0]
  ------------------
 3797|  7.49k|      CURL_TRC_M(data, "[TIMEOUT] all cleared");
  ------------------
  |  |  148|  7.49k|  do {                                   \
  |  |  149|  7.49k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  7.49k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  7.49k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  14.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 7.49k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.49k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  14.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  7.49k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  7.49k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  7.49k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7.49k]
  |  |  ------------------
  ------------------
 3798|  7.49k|    nowp->tv_sec = 0;
 3799|  7.49k|    nowp->tv_usec = 0;
 3800|  7.49k|  }
 3801|  21.1k|}
Curl_set_in_callback:
 3877|   443k|{
 3878|   443k|  if(data && data->multi)
  ------------------
  |  Branch (3878:6): [True: 443k, False: 0]
  |  Branch (3878:14): [True: 443k, False: 0]
  ------------------
 3879|   443k|    data->multi->in_callback = value;
 3880|   443k|}
Curl_multi_xfer_buf_borrow:
 3958|    523|{
 3959|    523|  DEBUGASSERT(data);
  ------------------
  |  | 1081|    523|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3959:3): [True: 0, False: 523]
  |  Branch (3959:3): [True: 523, False: 0]
  ------------------
 3960|    523|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1081|    523|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3960:3): [True: 0, False: 523]
  |  Branch (3960:3): [True: 523, False: 0]
  ------------------
 3961|    523|  *pbuf = NULL;
 3962|    523|  *pbuflen = 0;
 3963|    523|  if(!data->multi) {
  ------------------
  |  Branch (3963:6): [True: 0, False: 523]
  ------------------
 3964|      0|    failf(data, "transfer has no multi handle");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3965|      0|    return CURLE_FAILED_INIT;
 3966|      0|  }
 3967|    523|  if(!data->set.buffer_size) {
  ------------------
  |  Branch (3967:6): [True: 0, False: 523]
  ------------------
 3968|      0|    failf(data, "transfer buffer size is 0");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3969|      0|    return CURLE_FAILED_INIT;
 3970|      0|  }
 3971|    523|  if(data->multi->xfer_buf_borrowed) {
  ------------------
  |  Branch (3971:6): [True: 0, False: 523]
  ------------------
 3972|      0|    failf(data, "attempt to borrow xfer_buf when already borrowed");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3973|      0|    return CURLE_AGAIN;
 3974|      0|  }
 3975|       |
 3976|    523|  if(data->multi->xfer_buf &&
  ------------------
  |  Branch (3976:6): [True: 130, False: 393]
  ------------------
 3977|    130|     data->set.buffer_size > data->multi->xfer_buf_len) {
  ------------------
  |  Branch (3977:6): [True: 0, False: 130]
  ------------------
 3978|       |    /* not large enough, get a new one */
 3979|      0|    curlx_safefree(data->multi->xfer_buf);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3980|      0|    data->multi->xfer_buf_len = 0;
 3981|      0|  }
 3982|       |
 3983|    523|  if(!data->multi->xfer_buf) {
  ------------------
  |  Branch (3983:6): [True: 393, False: 130]
  ------------------
 3984|    393|    data->multi->xfer_buf = curlx_malloc(curlx_uitouz(data->set.buffer_size));
  ------------------
  |  | 1478|    393|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 3985|    393|    if(!data->multi->xfer_buf) {
  ------------------
  |  Branch (3985:8): [True: 0, False: 393]
  ------------------
 3986|      0|      failf(data, "could not allocate xfer_buf of %u bytes",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3987|      0|            data->set.buffer_size);
 3988|      0|      return CURLE_OUT_OF_MEMORY;
 3989|      0|    }
 3990|    393|    data->multi->xfer_buf_len = data->set.buffer_size;
 3991|    393|  }
 3992|       |
 3993|    523|  data->multi->xfer_buf_borrowed = TRUE;
  ------------------
  |  | 1055|    523|#define TRUE true
  ------------------
 3994|    523|  *pbuf = data->multi->xfer_buf;
 3995|    523|  *pbuflen = data->multi->xfer_buf_len;
 3996|    523|  return CURLE_OK;
 3997|    523|}
Curl_multi_xfer_buf_release:
 4000|    523|{
 4001|    523|  (void)buf;
 4002|    523|  DEBUGASSERT(data);
  ------------------
  |  | 1081|    523|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4002:3): [True: 0, False: 523]
  |  Branch (4002:3): [True: 523, False: 0]
  ------------------
 4003|    523|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1081|    523|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4003:3): [True: 0, False: 523]
  |  Branch (4003:3): [True: 523, False: 0]
  ------------------
 4004|    523|  DEBUGASSERT(!buf || data->multi->xfer_buf == buf);
  ------------------
  |  | 1081|    523|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4004:3): [True: 523, False: 0]
  |  Branch (4004:3): [True: 0, False: 0]
  |  Branch (4004:3): [True: 0, False: 523]
  |  Branch (4004:3): [True: 523, False: 0]
  ------------------
 4005|    523|  data->multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1058|    523|#define FALSE false
  ------------------
 4006|    523|}
Curl_multi_get_easy:
 4121|  1.13M|{
 4122|  1.13M|  struct Curl_easy *data = Curl_uint32_tbl_get(&multi->xfers, mid);
 4123|  1.13M|  if(GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|  1.13M|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  1.13M|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  1.13M|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:3): [True: 1.13M, False: 0]
  |  |  |  Branch (136:5): [True: 1.13M, False: 0]
  |  |  |  Branch (136:12): [True: 1.13M, False: 0]
  |  |  ------------------
  |  |  137|  1.13M|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (4123:6): [True: 0, False: 0]
  |  Branch (4123:6): [True: 0, False: 0]
  ------------------
 4124|  1.13M|    return data;
 4125|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4126|      0|             mid);
 4127|      0|  Curl_uint32_tbl_remove(&multi->xfers, mid);
 4128|       |  return NULL;
 4129|  1.13M|}
Curl_multi_xfers_running:
 4132|   212k|{
 4133|   212k|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|   212k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4133:3): [True: 0, False: 212k]
  |  Branch (4133:3): [True: 212k, False: 0]
  ------------------
 4134|   212k|  if(!multi)
  ------------------
  |  Branch (4134:6): [True: 0, False: 212k]
  ------------------
 4135|      0|    return 0;
 4136|   212k|  return multi->xfers_alive;
 4137|   212k|}
Curl_multi_mark_dirty:
 4140|  12.1k|{
 4141|  12.1k|  if(data->multi && data->mid != UINT32_MAX)
  ------------------
  |  Branch (4141:6): [True: 12.1k, False: 0]
  |  Branch (4141:21): [True: 12.1k, False: 0]
  ------------------
 4142|  12.1k|    Curl_uint32_bset_add(&data->multi->dirty, data->mid);
 4143|  12.1k|}
Curl_multi_clear_dirty:
 4146|     86|{
 4147|     86|  if(data->multi && data->mid != UINT32_MAX)
  ------------------
  |  Branch (4147:6): [True: 86, False: 0]
  |  Branch (4147:21): [True: 86, False: 0]
  ------------------
 4148|     86|    Curl_uint32_bset_remove(&data->multi->dirty, data->mid);
 4149|     86|}
multi.c:multi_xfers_add:
  397|  10.7k|{
  398|  10.7k|  uint32_t capacity = Curl_uint32_tbl_capacity(&multi->xfers);
  399|  10.7k|  uint32_t new_size = 0;
  400|       |  /* Prepare to make this into a CURLMOPT_MAX_TRANSFERS, because some
  401|       |   * applications may want to prevent a run-away of their memory use. */
  402|       |  /* UINT_MAX is our "invalid" id, do not let the table grow up to that. */
  403|  10.7k|  const uint32_t max_capacity = UINT_MAX - 1;
  404|       |
  405|  10.7k|  if(capacity < max_capacity) {
  ------------------
  |  Branch (405:6): [True: 10.7k, False: 0]
  ------------------
  406|       |    /* We want `multi->xfers` to have "sufficient" free rows, so that we do
  407|       |     * not have to reuse the `mid` from a removed easy right away.
  408|       |     * Since uint_tbl and uint_bset are memory efficient,
  409|       |     * regard less than 25% free as insufficient.
  410|       |     * (for low capacities, e.g. multi_easy, 4 or less). */
  411|  10.7k|    uint32_t used = Curl_uint32_tbl_count(&multi->xfers);
  412|  10.7k|    uint32_t unused = capacity - used;
  413|  10.7k|    uint32_t min_unused = CURLMAX(capacity >> 2, 4);
  ------------------
  |  | 1286|  10.7k|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 10.7k, False: 0]
  |  |  ------------------
  ------------------
  414|  10.7k|    if(unused <= min_unused) {
  ------------------
  |  Branch (414:8): [True: 0, False: 10.7k]
  ------------------
  415|       |      /* Make sure the uint arithmetic here works on the corner
  416|       |       * cases where we are close to max_capacity or UINT_MAX */
  417|      0|      if((min_unused >= max_capacity) ||
  ------------------
  |  Branch (417:10): [True: 0, False: 0]
  ------------------
  418|      0|         ((max_capacity - min_unused) <= capacity) ||
  ------------------
  |  Branch (418:10): [True: 0, False: 0]
  ------------------
  419|      0|         ((UINT_MAX - min_unused - 63) <= capacity)) {
  ------------------
  |  Branch (419:10): [True: 0, False: 0]
  ------------------
  420|      0|        new_size = max_capacity; /* can not be larger than this */
  421|      0|      }
  422|      0|      else {
  423|       |        /* make it a 64 multiple, since our bitsets grow by that and
  424|       |         * small (easy_multi) grows to at least 64 on first resize. */
  425|      0|        new_size = (((used + min_unused) + 63) / 64) * 64;
  426|      0|      }
  427|      0|    }
  428|  10.7k|  }
  429|       |
  430|  10.7k|  if(new_size > capacity) {
  ------------------
  |  Branch (430:6): [True: 0, False: 10.7k]
  ------------------
  431|       |    /* Grow the bitsets first. Should one fail, we do not need
  432|       |     * to downsize the already resized ones. The sets continue
  433|       |     * to work properly when larger than the table, but not
  434|       |     * the other way around. */
  435|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  436|      0|    if(Curl_uint32_bset_resize(&multi->process, new_size) ||
  ------------------
  |  Branch (436:8): [True: 0, False: 0]
  ------------------
  437|      0|       Curl_uint32_bset_resize(&multi->dirty, new_size) ||
  ------------------
  |  Branch (437:8): [True: 0, False: 0]
  ------------------
  438|      0|       Curl_uint32_bset_resize(&multi->pending, new_size) ||
  ------------------
  |  Branch (438:8): [True: 0, False: 0]
  ------------------
  439|      0|       Curl_uint32_bset_resize(&multi->msgsent, new_size) ||
  ------------------
  |  Branch (439:8): [True: 0, False: 0]
  ------------------
  440|      0|       Curl_uint32_tbl_resize(&multi->xfers, new_size))
  ------------------
  |  Branch (440:8): [True: 0, False: 0]
  ------------------
  441|      0|      return CURLM_OUT_OF_MEMORY;
  442|      0|  }
  443|       |
  444|       |  /* Insert the easy into the table now */
  445|  10.7k|  if(!Curl_uint32_tbl_add(&multi->xfers, data, &data->mid)) {
  ------------------
  |  Branch (445:6): [True: 0, False: 10.7k]
  ------------------
  446|       |    /* MUST only happen when table is full */
  447|      0|    DEBUGASSERT(Curl_uint32_tbl_capacity(&multi->xfers) <=
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (447:5): [True: 0, False: 0]
  |  Branch (447:5): [True: 0, False: 0]
  ------------------
  448|      0|                Curl_uint32_tbl_count(&multi->xfers));
  449|      0|    return CURLM_OUT_OF_MEMORY;
  450|      0|  }
  451|  10.7k|  return CURLM_OK;
  452|  10.7k|}
multi.c:mstate:
  135|  56.6k|{
  136|  56.6k|  CURLMstate oldstate = data->mstate;
  137|  56.6k|  static const init_multistate_func finit[MSTATE_LAST] = {
  138|  56.6k|    NULL,              /* INIT */
  139|  56.6k|    NULL,              /* PENDING */
  140|  56.6k|    NULL,              /* SETUP */
  141|  56.6k|    Curl_init_CONNECT, /* CONNECT */
  142|  56.6k|    NULL,              /* CONNECTING */
  143|  56.6k|    NULL,              /* PROTOCONNECT */
  144|  56.6k|    NULL,              /* PROTOCONNECTING */
  145|  56.6k|    NULL,              /* DO */
  146|  56.6k|    NULL,              /* DOING */
  147|  56.6k|    NULL,              /* DOING_MORE */
  148|  56.6k|    before_perform,    /* DID */
  149|  56.6k|    NULL,              /* PERFORMING */
  150|  56.6k|    NULL,              /* RATELIMITING */
  151|  56.6k|    NULL,              /* DONE */
  152|  56.6k|    init_completed,    /* COMPLETED */
  153|       |    NULL               /* MSGSENT */
  154|  56.6k|  };
  155|       |
  156|  56.6k|  if(oldstate == state)
  ------------------
  |  Branch (156:6): [True: 10.7k, False: 45.8k]
  ------------------
  157|       |    /* do not bother when the new state is the same as the old state */
  158|  10.7k|    return;
  159|       |
  160|  45.8k|#ifdef DEBUGBUILD
  161|  45.8k|  NOVERBOSE((void)lineno);
  ------------------
  |  | 1619|  45.8k|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1180|  45.8k|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1180:35): [Folded, False: 45.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  162|  45.8k|  CURL_TRC_M(data, "-> [%s] (line %d)", CURL_MSTATE_NAME(state), lineno);
  ------------------
  |  |  148|  45.8k|  do {                                   \
  |  |  149|  45.8k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  45.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  45.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  91.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 45.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 45.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  91.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  45.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  45.8k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  45.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 45.8k]
  |  |  ------------------
  ------------------
  163|       |#else
  164|       |  CURL_TRC_M(data, "-> [%s]", CURL_MSTATE_NAME(state));
  165|       |#endif
  166|       |
  167|       |  /* really switching state */
  168|  45.8k|  data->mstate = state;
  169|  45.8k|  switch(state) {
  170|    371|  case MSTATE_DONE:
  ------------------
  |  Branch (170:3): [True: 371, False: 45.5k]
  ------------------
  171|    371|    CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|    371|  do {                                                \
  |  |   52|    371|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 371, False: 0]
  |  |  |  Branch (52:15): [True: 371, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 371]
  |  |  ------------------
  |  |   53|    371|      Curl_mntfy_add((d), (t));                       \
  |  |   54|    371|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 371]
  |  |  ------------------
  ------------------
  172|    371|    break;
  173|  10.3k|  case MSTATE_COMPLETED:
  ------------------
  |  Branch (173:3): [True: 10.3k, False: 35.5k]
  ------------------
  174|       |    /* we sometimes directly jump to COMPLETED, trigger also a notification
  175|       |     * in that case. */
  176|  10.3k|    if(oldstate < MSTATE_DONE)
  ------------------
  |  Branch (176:8): [True: 9.96k, False: 371]
  ------------------
  177|  9.96k|      CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|  9.96k|  do {                                                \
  |  |   52|  9.96k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 9.96k, False: 0]
  |  |  |  Branch (52:15): [True: 9.96k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 9.96k]
  |  |  ------------------
  |  |   53|  9.96k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  9.96k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 9.96k]
  |  |  ------------------
  ------------------
  178|       |    /* changing to COMPLETED means it is in process and needs to go */
  179|  10.3k|    DEBUGASSERT(Curl_uint32_bset_contains(&data->multi->process, data->mid));
  ------------------
  |  | 1081|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:5): [True: 0, False: 10.3k]
  |  Branch (179:5): [True: 10.3k, False: 0]
  ------------------
  180|  10.3k|    Curl_uint32_bset_remove(&data->multi->process, data->mid);
  181|  10.3k|    Curl_uint32_bset_remove(&data->multi->pending, data->mid); /* to be sure */
  182|       |
  183|  10.3k|    if(Curl_uint32_bset_empty(&data->multi->process)) {
  ------------------
  |  Branch (183:8): [True: 0, False: 10.3k]
  ------------------
  184|       |      /* free the transfer buffer when we have no more active transfers */
  185|      0|      multi_xfer_bufs_free(data->multi);
  186|      0|    }
  187|  10.3k|    break;
  188|  35.1k|  default:
  ------------------
  |  Branch (188:3): [True: 35.1k, False: 10.7k]
  ------------------
  189|  35.1k|    break;
  190|  45.8k|  }
  191|       |
  192|       |  /* if this state has an init-function, run it */
  193|  45.8k|  if(finit[state])
  ------------------
  |  Branch (193:6): [True: 18.4k, False: 27.4k]
  ------------------
  194|  18.4k|    finit[state](data);
  195|  45.8k|}
multi.c:before_perform:
  114|    427|{
  115|       |  data->req.chunk = FALSE;
  ------------------
  |  | 1058|    427|#define FALSE false
  ------------------
  116|    427|  Curl_pgrsTime(data, TIMER_PRETRANSFER);
  117|    427|}
multi.c:init_completed:
  120|  10.3k|{
  121|       |  /* this is a completed transfer */
  122|       |
  123|       |  /* Important: reset the conn pointer so that we do not point to memory
  124|       |     that could be freed anytime */
  125|  10.3k|  Curl_detach_connection(data);
  126|  10.3k|  Curl_expire_clear(data); /* stop all timers */
  127|  10.3k|}
multi.c:multi_warn_debug:
  367|   588k|{
  368|   588k|  if(!multi->warned) {
  ------------------
  |  Branch (368:6): [True: 10.0k, False: 578k]
  ------------------
  369|  10.0k|    infof(data, "!!! WARNING !!!");
  ------------------
  |  |  143|  10.0k|  do {                               \
  |  |  144|  10.0k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  10.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  10.0k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  370|  10.0k|    infof(data, "This is a debug build of libcurl, "
  ------------------
  |  |  143|  10.0k|  do {                               \
  |  |  144|  10.0k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  10.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  10.0k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  371|  10.0k|                "do not use in production.");
  372|       |    multi->warned = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  373|  10.0k|  }
  374|   588k|}
multi.c:multi_assess_wakeup:
  385|  31.4k|{
  386|  31.4k|#ifdef ENABLE_WAKEUP
  387|  31.4k|  if(multi->socket_cb)
  ------------------
  |  Branch (387:6): [True: 0, False: 31.4k]
  ------------------
  388|      0|    return Curl_multi_ev_assess_xfer(multi, multi->admin);
  389|       |#else
  390|       |  (void)multi;
  391|       |#endif
  392|  31.4k|  return CURLM_OK;
  393|  31.4k|}
multi.c:multi_done:
  690|  6.06k|{
  691|  6.06k|  CURLcode result;
  692|  6.06k|  struct connectdata *conn = data->conn;
  693|       |
  694|  6.06k|  CURL_TRC_M(data, "multi_done: status: %d prem: %d done: %d",
  ------------------
  |  |  148|  6.06k|  do {                                   \
  |  |  149|  6.06k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.06k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  6.06k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  12.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 6.06k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  12.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  6.06k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.06k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  695|  6.06k|             (int)status, (int)premature, data->state.done);
  696|       |
  697|  6.06k|  if(data->state.done)
  ------------------
  |  Branch (697:6): [True: 0, False: 6.06k]
  ------------------
  698|       |    /* Stop if multi_done() has already been called */
  699|      0|    return CURLE_OK;
  700|       |
  701|       |  /* Shut down any ongoing async resolver operation. */
  702|  6.06k|  Curl_resolv_shutdown_all(data);
  703|       |
  704|       |  /* Cleanup possible redirect junk */
  705|  6.06k|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1327|  6.06k|  do {                      \
  |  | 1328|  6.06k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  6.06k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  6.06k|    (ptr) = NULL;           \
  |  | 1330|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  706|  6.06k|  curlx_safefree(data->req.location);
  ------------------
  |  | 1327|  6.06k|  do {                      \
  |  | 1328|  6.06k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  6.06k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  6.06k|    (ptr) = NULL;           \
  |  | 1330|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  707|       |
  708|  6.06k|  switch(status) {
  709|      0|  case CURLE_ABORTED_BY_CALLBACK:
  ------------------
  |  Branch (709:3): [True: 0, False: 6.06k]
  ------------------
  710|      0|  case CURLE_READ_ERROR:
  ------------------
  |  Branch (710:3): [True: 0, False: 6.06k]
  ------------------
  711|      0|  case CURLE_WRITE_ERROR:
  ------------------
  |  Branch (711:3): [True: 0, False: 6.06k]
  ------------------
  712|       |    /* When we are aborted due to a callback return code it has to be counted
  713|       |       as premature as there is trouble ahead if we do not. We have many
  714|       |       callbacks and protocols work differently, we could potentially do this
  715|       |       more fine-grained in the future. */
  716|      0|    premature = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  717|      0|    FALLTHROUGH();
  ------------------
  |  |  821|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  718|  6.06k|  default:
  ------------------
  |  Branch (718:3): [True: 6.06k, False: 0]
  ------------------
  719|  6.06k|    break;
  720|  6.06k|  }
  721|       |
  722|       |  /* this calls the protocol-specific function pointer previously set */
  723|  6.06k|  if(conn && conn->scheme->run->done && (data->mstate >= MSTATE_PROTOCONNECT))
  ------------------
  |  Branch (723:6): [True: 6.06k, False: 0]
  |  Branch (723:14): [True: 6.06k, False: 0]
  |  Branch (723:41): [True: 1.36k, False: 4.70k]
  ------------------
  724|  1.36k|    result = conn->scheme->run->done(data, status, premature);
  725|  4.70k|  else
  726|  4.70k|    result = status;
  727|       |
  728|  6.06k|  if(data->mstate > MSTATE_CONNECTING &&
  ------------------
  |  Branch (728:6): [True: 1.36k, False: 4.70k]
  ------------------
  729|  1.36k|     (result != CURLE_ABORTED_BY_CALLBACK)) {
  ------------------
  |  Branch (729:6): [True: 1.36k, False: 0]
  ------------------
  730|       |    /* avoid this if
  731|       |     * - the transfer has not connected
  732|       |     * - we already aborted by callback to avoid this calling another callback
  733|       |     */
  734|  1.36k|    int rc = Curl_pgrsDone(data);
  735|  1.36k|    if(!result && rc)
  ------------------
  |  Branch (735:8): [True: 471, False: 894]
  |  Branch (735:19): [True: 0, False: 471]
  ------------------
  736|      0|      result = CURLE_ABORTED_BY_CALLBACK;
  737|  1.36k|  }
  738|       |
  739|       |  /* Make sure that transfer client writes are really done now. */
  740|  6.06k|  result = Curl_1st_fatal(result, Curl_xfer_write_done(data, premature));
  741|       |
  742|       |  /* Inform connection filters that this transfer is done */
  743|  6.06k|  if(conn)
  ------------------
  |  Branch (743:6): [True: 6.06k, False: 0]
  ------------------
  744|  6.06k|    Curl_conn_ev_data_done(data, premature);
  745|       |
  746|  6.06k|  process_pending_handles(data->multi); /* connection / multiplex */
  747|       |
  748|  6.06k|  if(!result)
  ------------------
  |  Branch (748:6): [True: 717, False: 5.34k]
  ------------------
  749|    717|    result = Curl_req_done(&data->req, data, premature);
  750|       |
  751|  6.06k|  if(conn) {
  ------------------
  |  Branch (751:6): [True: 6.06k, False: 0]
  ------------------
  752|       |    /* Under the potential connection pool's share lock, decide what to
  753|       |     * do with the transfer's connection. */
  754|  6.06k|    struct multi_done_ctx mdctx;
  755|       |
  756|  6.06k|    memset(&mdctx, 0, sizeof(mdctx));
  757|  6.06k|    mdctx.premature = premature;
  758|  6.06k|    Curl_cpool_do_locked(data, data->conn, multi_done_locked, &mdctx);
  759|  6.06k|  }
  760|       |
  761|       |  /* flush the netrc cache */
  762|  6.06k|  Curl_netrc_cleanup(&data->state.netrc);
  763|  6.06k|  return result;
  764|  6.06k|}
multi.c:multi_done_locked:
  637|  6.06k|{
  638|  6.06k|  struct multi_done_ctx *mdctx = userdata;
  639|       |
  640|  6.06k|  Curl_detach_connection(data);
  641|       |
  642|  6.06k|  CURL_TRC_M(data, "multi_done_locked, in use=%u", conn->attached_xfers);
  ------------------
  |  |  148|  6.06k|  do {                                   \
  |  |  149|  6.06k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.06k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  6.06k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  12.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 6.06k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  12.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  6.06k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.06k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  643|  6.06k|  if(CONN_INUSE(conn)) {
  ------------------
  |  |  346|  6.06k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (346:23): [True: 0, False: 6.06k]
  |  |  ------------------
  ------------------
  644|       |    /* Stop if still used. */
  645|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  646|      0|               conn->attached_xfers);
  647|      0|    return;
  648|      0|  }
  649|       |
  650|  6.06k|  data->state.done = TRUE; /* called now! */
  ------------------
  |  | 1055|  6.06k|#define TRUE true
  ------------------
  651|  6.06k|  data->state.recent_conn_id = conn->connection_id;
  652|       |
  653|  6.06k|  Curl_dnscache_prune(data);
  654|       |
  655|  6.06k|  if(multi_conn_should_close(conn, data, (bool)mdctx->premature)) {
  ------------------
  |  Branch (655:6): [True: 5.69k, False: 370]
  ------------------
  656|  5.69k|    CURL_TRC_M(data, "multi_done, terminating conn #%" FMT_OFF_T " to %s, "
  ------------------
  |  |  148|  5.69k|  do {                                   \
  |  |  149|  5.69k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.69k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.69k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.69k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.69k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.69k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.69k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.69k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.69k]
  |  |  ------------------
  ------------------
  657|  5.69k|               "forbid=%d, close=%d, premature=%d, conn_multiplex=%d",
  658|  5.69k|               conn->connection_id, conn->destination,
  659|  5.69k|               data->set.reuse_forbid, conn->bits.close, mdctx->premature,
  660|  5.69k|               Curl_conn_is_multiplex(conn, FIRSTSOCKET));
  661|  5.69k|    connclose(conn, "disconnecting");
  ------------------
  |  |  103|  5.69k|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|  5.69k|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  662|  5.69k|    Curl_conn_terminate(data, conn, (bool)mdctx->premature);
  663|  5.69k|  }
  664|    370|  else if(!Curl_conn_get_max_concurrent(data, conn, FIRSTSOCKET)) {
  ------------------
  |  |  303|    370|#define FIRSTSOCKET     0
  ------------------
  |  Branch (664:11): [True: 0, False: 370]
  ------------------
  665|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  666|      0|               " by server, not reusing", conn->connection_id,
  667|      0|               conn->destination);
  668|      0|    connclose(conn, "server shutdown");
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  669|      0|    Curl_conn_terminate(data, conn, (bool)mdctx->premature);
  670|      0|  }
  671|    370|  else {
  672|       |    /* the connection is no longer in use by any transfer */
  673|    370|    if(Curl_cpool_conn_now_idle(data, conn)) {
  ------------------
  |  Branch (673:8): [True: 370, False: 0]
  ------------------
  674|       |      /* connection kept in the cpool */
  675|    370|      data->state.lastconnect_id = conn->connection_id;
  676|    370|      infof(data, "Connection #%" FMT_OFF_T " to host %s left intact",
  ------------------
  |  |  143|    370|  do {                               \
  |  |  144|    370|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    370|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 370, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 370]
  |  |  |  |  ------------------
  |  |  |  |  320|    370|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    370|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    370|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 370]
  |  |  ------------------
  ------------------
  677|    370|            conn->connection_id, conn->destination);
  678|    370|    }
  679|      0|    else {
  680|       |      /* connection was removed from the cpool and destroyed. */
  681|      0|      data->state.lastconnect_id = -1;
  682|      0|    }
  683|    370|  }
  684|  6.06k|}
multi.c:multi_conn_should_close:
  596|  6.06k|{
  597|       |  /* if conn->bits.close is TRUE, it means that the connection should be
  598|       |     closed in spite of everything else. */
  599|  6.06k|  if(conn->bits.close)
  ------------------
  |  Branch (599:6): [True: 950, False: 5.11k]
  ------------------
  600|    950|    return TRUE;
  ------------------
  |  | 1055|    950|#define TRUE true
  ------------------
  601|       |
  602|       |  /* if data->set.reuse_forbid is TRUE, it means the libcurl client has
  603|       |     forced us to close this connection. This is ignored for requests taking
  604|       |     place in a NTLM/NEGOTIATE authentication handshake. */
  605|  5.11k|  if(data->set.reuse_forbid
  ------------------
  |  Branch (605:6): [True: 4, False: 5.11k]
  ------------------
  606|       |#ifdef USE_NTLM
  607|       |     && !(conn->http_ntlm_state == NTLMSTATE_TYPE2 ||
  608|       |          conn->proxy_ntlm_state == NTLMSTATE_TYPE2)
  609|       |#endif
  610|       |#ifdef USE_SPNEGO
  611|       |     && !(conn->http_negotiate_state == GSS_AUTHRECV ||
  612|       |          conn->proxy_negotiate_state == GSS_AUTHRECV)
  613|       |#endif
  614|  5.11k|    )
  615|      4|    return TRUE;
  ------------------
  |  | 1055|      4|#define TRUE true
  ------------------
  616|       |
  617|       |  /* Unless this connection is for a "connect-only" transfer, it
  618|       |   * needs to be closed if the protocol handler does not support reuse. */
  619|  5.11k|  if(!data->set.connect_only && conn->scheme &&
  ------------------
  |  Branch (619:6): [True: 5.10k, False: 2]
  |  Branch (619:33): [True: 5.10k, False: 0]
  ------------------
  620|  5.10k|     !(conn->scheme->flags & PROTOPT_CONN_REUSE))
  ------------------
  |  |  238|  5.10k|#define PROTOPT_CONN_REUSE (1 << 16)  /* this protocol can reuse connections */
  ------------------
  |  Branch (620:6): [True: 0, False: 5.10k]
  ------------------
  621|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  622|       |
  623|       |  /* if premature is TRUE, it means this connection was said to be DONE before
  624|       |     the entire request operation is complete and thus we cannot know in what
  625|       |     state it is for reusing, so we are forced to close it. In a perfect world
  626|       |     we can add code that keep track of if we really must close it here or not,
  627|       |     but currently we have no such detail knowledge. */
  628|  5.11k|  if(premature && !Curl_conn_is_multiplex(conn, FIRSTSOCKET))
  ------------------
  |  |  303|  4.74k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (628:6): [True: 4.74k, False: 370]
  |  Branch (628:19): [True: 4.74k, False: 0]
  ------------------
  629|  4.74k|    return TRUE;
  ------------------
  |  | 1055|  4.74k|#define TRUE true
  ------------------
  630|       |
  631|    370|  return FALSE;
  ------------------
  |  | 1058|    370|#define FALSE false
  ------------------
  632|  5.11k|}
multi.c:close_connect_only:
  769|    369|{
  770|    369|  (void)userdata;
  771|    369|  (void)data;
  772|    369|  if(conn->bits.connect_only)
  ------------------
  |  Branch (772:6): [True: 0, False: 369]
  ------------------
  773|      0|    connclose(conn, "Removing connect-only easy handle");
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  774|    369|}
multi.c:mstate_connecting_pollset:
 1024|   350k|{
 1025|   350k|  struct connectdata *conn = data->conn;
 1026|   350k|  curl_socket_t sockfd;
 1027|   350k|  CURLcode result = CURLE_OK;
 1028|       |
 1029|   350k|  if(Curl_xfer_recv_is_paused(data))
  ------------------
  |  Branch (1029:6): [True: 0, False: 350k]
  ------------------
 1030|      0|    return CURLE_OK;
 1031|       |  /* If a socket is set, receiving is default. If the socket
 1032|       |   * has not been determined yet (eyeballing), always ask the
 1033|       |   * connection filters for what to monitor. */
 1034|   350k|  sockfd = Curl_conn_get_first_socket(data);
 1035|   350k|  if(sockfd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|   350k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1035:6): [True: 197k, False: 153k]
  ------------------
 1036|   197k|    result = Curl_pollset_change(data, ps, sockfd, CURL_POLL_IN, 0);
  ------------------
  |  |  283|   197k|#define CURL_POLL_IN     1
  ------------------
 1037|   197k|    if(!result)
  ------------------
  |  Branch (1037:8): [True: 197k, False: 0]
  ------------------
 1038|   197k|      result = multi_adjust_pollset(data, ps);
 1039|   197k|  }
 1040|   350k|  if(!result)
  ------------------
  |  Branch (1040:6): [True: 350k, False: 0]
  ------------------
 1041|   350k|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1042|   350k|  return result;
 1043|   350k|}
multi.c:multi_adjust_pollset:
  979|   201k|{
  980|   201k|  CURLcode result = CURLE_OK;
  981|       |
  982|   201k|  if(ps->n) {
  ------------------
  |  Branch (982:6): [True: 201k, False: 0]
  ------------------
  983|   201k|    const struct curltime *pnow = Curl_pgrs_now(data);
  984|   201k|    bool send_blocked, recv_blocked;
  985|       |
  986|   201k|    recv_blocked = (Curl_rlimit_avail(&data->progress.dl.rlimit, pnow) <= 0);
  987|   201k|    send_blocked = (Curl_rlimit_avail(&data->progress.ul.rlimit, pnow) <= 0);
  988|   201k|    if(send_blocked || recv_blocked) {
  ------------------
  |  Branch (988:8): [True: 0, False: 201k]
  |  Branch (988:24): [True: 0, False: 201k]
  ------------------
  989|      0|      int i;
  990|      0|      for(i = 0; i <= SECONDARYSOCKET; ++i) {
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (990:18): [True: 0, False: 0]
  ------------------
  991|      0|        curl_socket_t sock = data->conn->sock[i];
  992|      0|        if(sock == CURL_SOCKET_BAD)
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (992:12): [True: 0, False: 0]
  ------------------
  993|      0|          continue;
  994|      0|        if(recv_blocked && Curl_pollset_want_recv(data, ps, sock)) {
  ------------------
  |  Branch (994:12): [True: 0, False: 0]
  |  Branch (994:28): [True: 0, False: 0]
  ------------------
  995|      0|          result = Curl_pollset_remove_in(data, ps, sock);
  ------------------
  |  |  164|      0|  Curl_pollset_change(data, ps, sock, 0, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  996|      0|          if(result)
  ------------------
  |  Branch (996:14): [True: 0, False: 0]
  ------------------
  997|      0|            break;
  998|      0|        }
  999|      0|        if(send_blocked && Curl_pollset_want_send(data, ps, sock)) {
  ------------------
  |  Branch (999:12): [True: 0, False: 0]
  |  Branch (999:28): [True: 0, False: 0]
  ------------------
 1000|      0|          result = Curl_pollset_remove_out(data, ps, sock);
  ------------------
  |  |  168|      0|  Curl_pollset_change(data, ps, sock, 0, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1001|      0|          if(result)
  ------------------
  |  Branch (1001:14): [True: 0, False: 0]
  ------------------
 1002|      0|            break;
 1003|      0|        }
 1004|      0|      }
 1005|      0|    }
 1006|       |
 1007|       |    /* Not blocked and wanting to receive. If there is data pending
 1008|       |     * in the connection filters, make transfer run again. */
 1009|   201k|    if(!recv_blocked &&
  ------------------
  |  Branch (1009:8): [True: 201k, False: 0]
  ------------------
 1010|   201k|       ((Curl_pollset_want_recv(data, ps, data->conn->sock[FIRSTSOCKET]) &&
  ------------------
  |  |  303|   201k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1010:10): [True: 4.22k, False: 197k]
  ------------------
 1011|  4.22k|         Curl_conn_data_pending(data, FIRSTSOCKET)) ||
  ------------------
  |  |  303|  4.22k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1011:10): [True: 0, False: 4.22k]
  ------------------
 1012|   201k|        (Curl_pollset_want_recv(data, ps, data->conn->sock[SECONDARYSOCKET]) &&
  ------------------
  |  |  304|   201k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1012:10): [True: 0, False: 201k]
  ------------------
 1013|      0|         Curl_conn_data_pending(data, SECONDARYSOCKET)))) {
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1013:10): [True: 0, False: 0]
  ------------------
 1014|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1015|      0|                 "buffered input -> mark as dirty");
 1016|      0|      Curl_multi_mark_dirty(data);
 1017|      0|    }
 1018|   201k|  }
 1019|   201k|  return result;
 1020|   201k|}
multi.c:mstate_protocol_pollset:
 1047|  4.04k|{
 1048|  4.04k|  struct connectdata *conn = data->conn;
 1049|  4.04k|  CURLcode result = CURLE_OK;
 1050|       |
 1051|  4.04k|  if(conn->scheme->run->proto_pollset)
  ------------------
  |  Branch (1051:6): [True: 4.04k, False: 0]
  ------------------
 1052|  4.04k|    result = conn->scheme->run->proto_pollset(data, ps);
 1053|      0|  else {
 1054|      0|    curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
  ------------------
  |  |  303|      0|#define FIRSTSOCKET     0
  ------------------
 1055|      0|    if(sockfd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1055:8): [True: 0, False: 0]
  ------------------
 1056|       |      /* Default is to wait to something from the server */
 1057|      0|      result = Curl_pollset_change(data, ps, sockfd, CURL_POLL_IN, 0);
  ------------------
  |  |  283|      0|#define CURL_POLL_IN     1
  ------------------
 1058|      0|    }
 1059|      0|  }
 1060|  4.04k|  if(!result)
  ------------------
  |  Branch (1060:6): [True: 4.04k, False: 0]
  ------------------
 1061|  4.04k|    result = multi_adjust_pollset(data, ps);
 1062|  4.04k|  if(!result)
  ------------------
  |  Branch (1062:6): [True: 4.04k, False: 0]
  ------------------
 1063|  4.04k|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1064|  4.04k|  return result;
 1065|  4.04k|}
multi.c:mstate_do_pollset:
 1069|     38|{
 1070|     38|  struct connectdata *conn = data->conn;
 1071|     38|  CURLcode result = CURLE_OK;
 1072|       |
 1073|     38|  if(conn->scheme->run->doing_pollset)
  ------------------
  |  Branch (1073:6): [True: 38, False: 0]
  ------------------
 1074|     38|    result = conn->scheme->run->doing_pollset(data, ps);
 1075|      0|  else if(CONN_SOCK_IDX_VALID(conn->send_idx)) {
  ------------------
  |  |  382|      0|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 0, False: 0]
  |  |  |  Branch (382:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1076|       |    /* Default is that we want to send something to the server */
 1077|      0|    result = Curl_pollset_add_out(data, ps, conn->sock[conn->send_idx]);
  ------------------
  |  |  166|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, 0)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1078|      0|  }
 1079|     38|  if(!result)
  ------------------
  |  Branch (1079:6): [True: 38, False: 0]
  ------------------
 1080|     38|    result = multi_adjust_pollset(data, ps);
 1081|     38|  if(!result)
  ------------------
  |  Branch (1081:6): [True: 38, False: 0]
  ------------------
 1082|     38|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1083|     38|  return result;
 1084|     38|}
multi.c:mstate_perform_pollset:
 1107|    143|{
 1108|    143|  struct connectdata *conn = data->conn;
 1109|    143|  CURLcode result = CURLE_OK;
 1110|       |
 1111|    143|  if(conn->scheme->run->perform_pollset)
  ------------------
  |  Branch (1111:6): [True: 0, False: 143]
  ------------------
 1112|      0|    result = conn->scheme->run->perform_pollset(data, ps);
 1113|    143|  else {
 1114|       |    /* Default is to obey the request flags for send/recv */
 1115|    143|    if(Curl_req_want_recv(data) && CONN_SOCK_IDX_VALID(conn->recv_idx)) {
  ------------------
  |  |  382|    143|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 143, False: 0]
  |  |  |  Branch (382:50): [True: 143, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1115:8): [True: 143, False: 0]
  ------------------
 1116|    143|      result = Curl_pollset_add_in(data, ps, conn->sock[conn->recv_idx]);
  ------------------
  |  |  162|    143|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|    143|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1117|    143|    }
 1118|    143|    if(!result && Curl_req_want_send(data) &&
  ------------------
  |  Branch (1118:8): [True: 143, False: 0]
  |  Branch (1118:19): [True: 0, False: 143]
  ------------------
 1119|      0|       CONN_SOCK_IDX_VALID(conn->send_idx)) {
  ------------------
  |  |  382|      0|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 0, False: 0]
  |  |  |  Branch (382:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1120|      0|      result = Curl_pollset_add_out(data, ps, conn->sock[conn->send_idx]);
  ------------------
  |  |  166|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, 0)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1121|      0|    }
 1122|    143|  }
 1123|    143|  if(!result)
  ------------------
  |  Branch (1123:6): [True: 143, False: 0]
  ------------------
 1124|    143|    result = multi_adjust_pollset(data, ps);
 1125|    143|  if(!result)
  ------------------
  |  Branch (1125:6): [True: 143, False: 0]
  ------------------
 1126|    143|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1127|    143|  return result;
 1128|    143|}
multi.c:multi_perform:
 2856|   212k|{
 2857|   212k|  CURLMcode returncode = CURLM_OK;
 2858|   212k|  struct curltime start = *multi_now(multi);
 2859|   212k|  uint32_t mid;
 2860|   212k|  struct Curl_sigpipe_ctx sigpipe_ctx;
 2861|       |
 2862|   212k|  if(multi->in_callback)
  ------------------
  |  Branch (2862:6): [True: 0, False: 212k]
  ------------------
 2863|      0|    return CURLM_RECURSIVE_API_CALL;
 2864|       |
 2865|   212k|  if(multi->in_ntfy_callback)
  ------------------
  |  Branch (2865:6): [True: 0, False: 212k]
  ------------------
 2866|      0|    return CURLM_RECURSIVE_API_CALL;
 2867|       |
 2868|   212k|  sigpipe_init(&sigpipe_ctx);
 2869|       |
 2870|   212k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (2870:6): [True: 212k, False: 0]
  ------------------
 2871|   212k|    CURL_TRC_M(multi->admin, "multi_perform(running=%u)",
  ------------------
  |  |  148|   212k|  do {                                   \
  |  |  149|   212k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|   212k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   212k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|   424k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 212k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 212k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|   424k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   212k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|   212k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|   212k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 212k]
  |  |  ------------------
  ------------------
 2872|   212k|               Curl_multi_xfers_running(multi));
 2873|   577k|    do {
 2874|   577k|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 2875|   577k|      CURLMcode mresult;
 2876|   577k|      if(!data) {
  ------------------
  |  Branch (2876:10): [True: 0, False: 577k]
  ------------------
 2877|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2877:9): [Folded, False: 0]
  |  Branch (2877:9): [Folded, False: 0]
  ------------------
 2878|      0|        Curl_uint32_bset_remove(&multi->process, mid);
 2879|      0|        Curl_uint32_bset_remove(&multi->dirty, mid);
 2880|      0|        continue;
 2881|      0|      }
 2882|   577k|      mresult = multi_runsingle(multi, data, &sigpipe_ctx);
 2883|   577k|      if(mresult)
  ------------------
  |  Branch (2883:10): [True: 0, False: 577k]
  ------------------
 2884|      0|        returncode = mresult;
 2885|   577k|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (2885:13): [True: 365k, False: 212k]
  ------------------
 2886|   212k|  }
 2887|   212k|  sigpipe_restore(&sigpipe_ctx);
 2888|       |
 2889|   212k|  if(multi_ischanged(multi, TRUE))
  ------------------
  |  | 1055|   212k|#define TRUE true
  ------------------
  |  Branch (2889:6): [True: 5.23k, False: 207k]
  ------------------
 2890|  5.23k|    process_pending_handles(multi);
 2891|       |
 2892|   212k|  if(!returncode && CURL_MNTFY_HAS_ENTRIES(multi))
  ------------------
  |  |   56|   212k|#define CURL_MNTFY_HAS_ENTRIES(m)       ((m)->ntfy.has_entries)
  |  |  ------------------
  |  |  |  Branch (56:41): [True: 0, False: 212k]
  |  |  ------------------
  ------------------
  |  Branch (2892:6): [True: 212k, False: 0]
  ------------------
 2893|      0|    returncode = Curl_mntfy_dispatch_all(multi);
 2894|       |
 2895|       |  /*
 2896|       |   * Remove all expired timers from the splay since handles are dealt
 2897|       |   * with unconditionally by this function and curl_multi_timeout() requires
 2898|       |   * that already passed/handled expire times are removed from the splay.
 2899|       |   *
 2900|       |   * It is important that the 'now' value is set at the entry of this function
 2901|       |   * and not for the current time as it may have ticked a little while since
 2902|       |   * then and then we risk this loop to remove timers that actually have not
 2903|       |   * been handled!
 2904|       |   */
 2905|   212k|  if(multi->timetree) {
  ------------------
  |  Branch (2905:6): [True: 202k, False: 9.84k]
  ------------------
 2906|   202k|    struct Curl_tree *t = NULL;
 2907|   202k|    do {
 2908|   202k|      multi->timetree = Curl_splaygetbest(&start, multi->timetree, &t);
 2909|   202k|      if(t) {
  ------------------
  |  Branch (2909:10): [True: 6, False: 202k]
  ------------------
 2910|       |        /* the removed may have another timeout in queue */
 2911|      6|        struct Curl_easy *data = Curl_splayget(t);
 2912|      6|        (void)add_next_timeout(&start, multi, data);
 2913|      6|        if(data->mstate == MSTATE_PENDING) {
  ------------------
  |  Branch (2913:12): [True: 0, False: 6]
  ------------------
 2914|      0|          bool stream_unused;
 2915|      0|          CURLcode result_unused;
 2916|      0|          if(multi_handle_timeout(data, &stream_unused, &result_unused)) {
  ------------------
  |  Branch (2916:14): [True: 0, False: 0]
  ------------------
 2917|      0|            infof(data, "PENDING handle timeout");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2918|      0|            move_pending_to_connect(multi, data);
 2919|      0|          }
 2920|      0|        }
 2921|      6|      }
 2922|   202k|    } while(t);
  ------------------
  |  Branch (2922:13): [True: 6, False: 202k]
  ------------------
 2923|   202k|  }
 2924|       |
 2925|   212k|  if(running_handles) {
  ------------------
  |  Branch (2925:6): [True: 212k, False: 0]
  ------------------
 2926|   212k|    unsigned int running = Curl_multi_xfers_running(multi);
 2927|   212k|    *running_handles = (running < INT_MAX) ? (int)running : INT_MAX;
  ------------------
  |  Branch (2927:24): [True: 212k, False: 0]
  ------------------
 2928|   212k|  }
 2929|       |
 2930|   212k|  if(CURLM_OK >= returncode)
  ------------------
  |  Branch (2930:6): [True: 212k, False: 0]
  ------------------
 2931|   212k|    returncode = Curl_update_timer(multi);
 2932|       |
 2933|   212k|  return returncode;
 2934|   212k|}
multi.c:multi_now:
  104|   212k|{
  105|   212k|  curlx_pnow(&multi->now);
  106|   212k|  return &multi->now;
  107|   212k|}
multi.c:multi_runsingle:
 2687|   577k|{
 2688|   577k|  CURLMcode mresult;
 2689|   577k|  CURLcode result = CURLE_OK;
 2690|       |
 2691|   577k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|   577k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|   577k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|   577k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:5): [True: 577k, False: 0]
  |  |  |  Branch (136:12): [True: 577k, False: 0]
  |  |  ------------------
  |  |  137|   577k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2691:6): [True: 0, False: 577k]
  |  Branch (2691:7): [True: 0, False: 0]
  |  Branch (2691:7): [True: 0, False: 0]
  ------------------
 2692|      0|    return CURLM_BAD_EASY_HANDLE;
 2693|       |
 2694|   577k|  if(multi->dead) {
  ------------------
  |  Branch (2694:6): [True: 0, False: 577k]
  ------------------
 2695|       |    /* a multi-level callback returned error before, meaning every individual
 2696|       |     transfer now has failed */
 2697|      0|    result = CURLE_ABORTED_BY_CALLBACK;
 2698|      0|    multi_posttransfer(data);
 2699|      0|    multi_done(data, result, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2700|      0|    multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2701|      0|  }
 2702|       |
 2703|   577k|  multi_warn_debug(multi, data);
 2704|       |
 2705|       |  /* transfer runs now, clear the dirty bit. This may be set
 2706|       |   * again during processing, triggering a re-run later. */
 2707|   577k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2708|       |
 2709|   577k|  if(data == multi->admin) {
  ------------------
  |  Branch (2709:6): [True: 212k, False: 365k]
  ------------------
 2710|   212k|#ifdef ENABLE_WAKEUP
 2711|       |    /* Consume any pending wakeup signals before processing.
 2712|       |     * This is necessary for event based processing. See #21547 */
 2713|   212k|    (void)Curl_wakeup_consume(multi->wakeup_pair, TRUE);
  ------------------
  |  | 1055|   212k|#define TRUE true
  ------------------
 2714|   212k|#endif
 2715|   212k|#ifdef USE_RESOLV_THREADED
 2716|   212k|    Curl_async_thrdd_multi_process(multi);
 2717|   212k|#endif
 2718|   212k|    Curl_cshutdn_perform(&multi->cshutdn, multi->admin, sigpipe_ctx);
 2719|   212k|    return CURLM_OK;
 2720|   212k|  }
 2721|       |
 2722|   365k|  sigpipe_apply(data, sigpipe_ctx);
 2723|   390k|  do {
 2724|       |    /* A "stream" here is a logical stream if the protocol can handle that
 2725|       |       (HTTP/2), or the full connection for older protocols */
 2726|   390k|    bool stream_error = FALSE;
  ------------------
  |  | 1058|   390k|#define FALSE false
  ------------------
 2727|   390k|    mresult = CURLM_OK;
 2728|       |
 2729|   390k|    if(multi_ischanged(multi, TRUE)) {
  ------------------
  |  | 1055|   390k|#define TRUE true
  ------------------
  |  Branch (2729:8): [True: 110, False: 390k]
  ------------------
 2730|    110|      CURL_TRC_M(data, "multi changed, check CONNECT_PEND queue");
  ------------------
  |  |  148|    110|  do {                                   \
  |  |  149|    110|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    110|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    110|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    220|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 110, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 110]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    220|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    110|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    110|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    110|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 110]
  |  |  ------------------
  ------------------
 2731|    110|      process_pending_handles(multi); /* multiplexed */
 2732|    110|    }
 2733|       |
 2734|   390k|    if(data->mstate > MSTATE_CONNECT &&
  ------------------
  |  Branch (2734:8): [True: 364k, False: 25.8k]
  ------------------
 2735|   364k|       data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2735:8): [True: 364k, False: 0]
  ------------------
 2736|       |      /* Make sure we set the connection's current owner */
 2737|   364k|      DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|   364k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2737:7): [True: 0, False: 364k]
  |  Branch (2737:7): [True: 364k, False: 0]
  ------------------
 2738|   364k|      if(!data->conn)
  ------------------
  |  Branch (2738:10): [True: 0, False: 364k]
  ------------------
 2739|      0|        return CURLM_INTERNAL_ERROR;
 2740|   364k|    }
 2741|       |
 2742|       |    /* Wait for the connect state as only then is the start time stored, but
 2743|       |       we must not check already completed handles */
 2744|   390k|    if((data->mstate >= MSTATE_CONNECT) && (data->mstate < MSTATE_COMPLETED) &&
  ------------------
  |  Branch (2744:8): [True: 371k, False: 18.2k]
  |  Branch (2744:44): [True: 371k, False: 0]
  ------------------
 2745|   371k|       multi_handle_timeout(data, &stream_error, &result))
  ------------------
  |  Branch (2745:8): [True: 12, False: 371k]
  ------------------
 2746|       |      /* Skip the statemachine and go directly to error handling section. */
 2747|     12|      goto statemachine_end;
 2748|       |
 2749|   390k|    switch(data->mstate) {
 2750|  10.7k|    case MSTATE_INIT:
  ------------------
  |  Branch (2750:5): [True: 10.7k, False: 379k]
  ------------------
 2751|       |      /* Transitional state. init this transfer. A handle never comes back to
 2752|       |         this state. */
 2753|  10.7k|      mresult = multistate_init(data, &result);
 2754|  10.7k|      break;
 2755|       |
 2756|  7.49k|    case MSTATE_SETUP:
  ------------------
  |  Branch (2756:5): [True: 7.49k, False: 382k]
  ------------------
 2757|       |      /* Transitional state. Setup things for a new transfer. The handle
 2758|       |         can come back to this state on a redirect. */
 2759|  7.49k|      mresult = multistate_setup(data);
 2760|  7.49k|      break;
 2761|       |
 2762|  7.59k|    case MSTATE_CONNECT:
  ------------------
  |  Branch (2762:5): [True: 7.59k, False: 382k]
  ------------------
 2763|  7.59k|      mresult = multistate_connect(multi, data, &result);
 2764|  7.59k|      break;
 2765|       |
 2766|   356k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (2766:5): [True: 356k, False: 33.7k]
  ------------------
 2767|       |      /* awaiting a completion of an asynch TCP connect */
 2768|   356k|      mresult = multistate_connecting(data, &stream_error, &result);
 2769|   356k|      break;
 2770|       |
 2771|  1.36k|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (2771:5): [True: 1.36k, False: 388k]
  ------------------
 2772|  1.36k|      mresult = multistate_protoconnect(data, &stream_error, &result);
 2773|  1.36k|      break;
 2774|       |
 2775|  4.49k|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (2775:5): [True: 4.49k, False: 385k]
  ------------------
 2776|       |      /* protocol-specific connect phase */
 2777|  4.49k|      mresult = multistate_protoconnecting(data, &stream_error, &result);
 2778|  4.49k|      break;
 2779|       |
 2780|    514|    case MSTATE_DO:
  ------------------
  |  Branch (2780:5): [True: 514, False: 389k]
  ------------------
 2781|    514|      mresult = multistate_do(data, &stream_error, &result);
 2782|    514|      break;
 2783|       |
 2784|    130|    case MSTATE_DOING:
  ------------------
  |  Branch (2784:5): [True: 130, False: 389k]
  ------------------
 2785|       |      /* we continue DOING until the DO phase is complete */
 2786|    130|      mresult = multistate_doing(data, &stream_error, &result);
 2787|    130|      break;
 2788|       |
 2789|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (2789:5): [True: 0, False: 390k]
  ------------------
 2790|       |      /*
 2791|       |       * When we are connected, DOING MORE and then go DID
 2792|       |       */
 2793|      0|      mresult = multistate_doing_more(data, &stream_error, &result);
 2794|      0|      break;
 2795|       |
 2796|    427|    case MSTATE_DID:
  ------------------
  |  Branch (2796:5): [True: 427, False: 389k]
  ------------------
 2797|    427|      mresult = multistate_did(multi, data);
 2798|    427|      break;
 2799|       |
 2800|     47|    case MSTATE_RATELIMITING: /* limit-rate exceeded in either direction */
  ------------------
  |  Branch (2800:5): [True: 47, False: 390k]
  ------------------
 2801|     47|      mresult = multistate_ratelimiting(data, &result);
 2802|     47|      break;
 2803|       |
 2804|    557|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (2804:5): [True: 557, False: 389k]
  ------------------
 2805|    557|      mresult = multistate_performing(data, &stream_error, &result);
 2806|    557|      break;
 2807|       |
 2808|    371|    case MSTATE_DONE:
  ------------------
  |  Branch (2808:5): [True: 371, False: 389k]
  ------------------
 2809|    371|      mresult = multistate_done(data, &result);
 2810|    371|      break;
 2811|       |
 2812|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (2812:5): [True: 0, False: 390k]
  ------------------
 2813|      0|      break;
 2814|       |
 2815|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (2815:5): [True: 0, False: 390k]
  ------------------
 2816|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (2816:5): [True: 0, False: 390k]
  ------------------
 2817|       |      /* handles in these states should NOT be in this list */
 2818|      0|      break;
 2819|       |
 2820|      0|    default:
  ------------------
  |  Branch (2820:5): [True: 0, False: 390k]
  ------------------
 2821|      0|      return CURLM_INTERNAL_ERROR;
 2822|   390k|    }
 2823|       |
 2824|   390k|    if(data->mstate >= MSTATE_CONNECT &&
  ------------------
  |  Branch (2824:8): [True: 379k, False: 10.9k]
  ------------------
 2825|   379k|       data->mstate < MSTATE_DO &&
  ------------------
  |  Branch (2825:8): [True: 376k, False: 2.56k]
  ------------------
 2826|   376k|       mresult != CURLM_CALL_MULTI_PERFORM &&
  ------------------
  |  Branch (2826:8): [True: 361k, False: 15.4k]
  ------------------
 2827|   361k|       !multi_ischanged(multi, FALSE)) {
  ------------------
  |  | 1058|   361k|#define FALSE false
  ------------------
  |  Branch (2827:8): [True: 355k, False: 5.24k]
  ------------------
 2828|       |      /* We now handle stream timeouts if and only if this will be the last
 2829|       |       * loop iteration. We only check this on the last iteration to ensure
 2830|       |       * that if we know we have additional work to do immediately
 2831|       |       * (i.e. CURLM_CALL_MULTI_PERFORM == TRUE) then we should do that before
 2832|       |       * declaring the connection timed out as we may almost have a completed
 2833|       |       * connection. */
 2834|   355k|      multi_handle_timeout(data, &stream_error, &result);
 2835|   355k|    }
 2836|       |
 2837|   390k|statemachine_end:
 2838|       |
 2839|   390k|    result = is_finished(multi, data, stream_error, result);
 2840|   390k|    if(result)
  ------------------
  |  Branch (2840:8): [True: 9.96k, False: 380k]
  ------------------
 2841|  9.96k|      mresult = CURLM_CALL_MULTI_PERFORM;
 2842|       |
 2843|   390k|    if(MSTATE_COMPLETED == data->mstate) {
  ------------------
  |  Branch (2843:8): [True: 10.3k, False: 379k]
  ------------------
 2844|  10.3k|      handle_completed(multi, data, result);
 2845|  10.3k|      return CURLM_OK;
 2846|  10.3k|    }
 2847|   390k|  } while((mresult == CURLM_CALL_MULTI_PERFORM) ||
  ------------------
  |  Branch (2847:11): [True: 24.7k, False: 355k]
  ------------------
 2848|   355k|          multi_ischanged(multi, FALSE));
  ------------------
  |  | 1058|   355k|#define FALSE false
  ------------------
  |  Branch (2848:11): [True: 0, False: 355k]
  ------------------
 2849|       |
 2850|   355k|  data->result = result;
 2851|   355k|  return mresult;
 2852|   365k|}
multi.c:multi_posttransfer:
 1931|  7.03k|{
 1932|       |#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL)
 1933|       |  /* restore the signal handler for SIGPIPE before we get back */
 1934|       |  if(!data->set.no_signal)
 1935|       |    signal(SIGPIPE, data->state.prev_signal);
 1936|       |#else
 1937|  7.03k|  (void)data;
 1938|  7.03k|#endif
 1939|  7.03k|}
multi.c:multistate_init:
 2457|  10.7k|{
 2458|  10.7k|  *result = Curl_pretransfer(data);
 2459|  10.7k|  if(*result)
  ------------------
  |  Branch (2459:6): [True: 3.28k, False: 7.49k]
  ------------------
 2460|  3.28k|    return CURLM_OK;
 2461|       |
 2462|       |  /* after init, go SETUP */
 2463|  7.49k|  multistate(data, MSTATE_SETUP);
  ------------------
  |  |  200|  7.49k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2464|  7.49k|  Curl_pgrsTime(data, TIMER_STARTOP);
 2465|  7.49k|  return CURLM_CALL_MULTI_PERFORM;
 2466|  10.7k|}
multi.c:multistate_setup:
 2469|  7.49k|{
 2470|  7.49k|  Curl_pgrsTime(data, TIMER_STARTSINGLE);
 2471|  7.49k|  if(data->set.timeout)
  ------------------
  |  Branch (2471:6): [True: 7.49k, False: 0]
  ------------------
 2472|  7.49k|    Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT);
 2473|  7.49k|  if(data->set.connecttimeout)
  ------------------
  |  Branch (2473:6): [True: 147, False: 7.35k]
  ------------------
 2474|       |    /* Since a connection might go to pending and back to CONNECT several
 2475|       |       times before it actually takes off, we need to set the timeout once
 2476|       |       in SETUP before we enter CONNECT the first time. */
 2477|    147|    Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT);
 2478|       |
 2479|  7.49k|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  200|  7.49k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2480|  7.49k|  return CURLM_CALL_MULTI_PERFORM;
 2481|  7.49k|}
multi.c:multistate_connect:
 2311|  7.59k|{
 2312|       |  /* Connect. We want to get a connection identifier filled in. This state can
 2313|       |     be entered from SETUP and from PENDING. */
 2314|  7.59k|  bool connected;
 2315|  7.59k|  CURLMcode mresult = CURLM_OK;
 2316|  7.59k|  CURLcode result = Curl_connect(data, &connected);
 2317|  7.59k|  if(result == CURLE_NO_CONNECTION_AVAILABLE) {
  ------------------
  |  Branch (2317:6): [True: 203, False: 7.39k]
  ------------------
 2318|       |    /* There was no connection available. We will go to the pending state and
 2319|       |       wait for an available connection. */
 2320|    203|    multistate(data, MSTATE_PENDING);
  ------------------
  |  |  200|    203|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2321|       |    /* move from process to pending set */
 2322|    203|    Curl_uint32_bset_remove(&multi->process, data->mid);
 2323|    203|    Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2324|    203|    Curl_uint32_bset_add(&multi->pending, data->mid);
 2325|    203|    *resultp = CURLE_OK;
 2326|    203|    return mresult;
 2327|    203|  }
 2328|  7.39k|  else
 2329|  7.39k|    process_pending_handles(data->multi);
 2330|       |
 2331|  7.39k|  if(!result) {
  ------------------
  |  Branch (2331:6): [True: 6.06k, False: 1.32k]
  ------------------
 2332|       |    /* after the connect has been sent off, go WAITCONNECT unless the
 2333|       |       protocol connect is already done and we can go directly to WAITDO or
 2334|       |       DO! */
 2335|  6.06k|    mresult = CURLM_CALL_MULTI_PERFORM;
 2336|       |
 2337|  6.06k|    if(connected) {
  ------------------
  |  Branch (2337:8): [True: 0, False: 6.06k]
  ------------------
 2338|      0|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2338:10): [True: 0, False: 0]
  ------------------
 2339|      0|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  303|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2339:10): [True: 0, False: 0]
  ------------------
 2340|       |        /* new connection, can multiplex, wake pending handles */
 2341|      0|        process_pending_handles(data->multi);
 2342|      0|      }
 2343|      0|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2344|      0|    }
 2345|  6.06k|    else {
 2346|  6.06k|      multistate(data, MSTATE_CONNECTING);
  ------------------
  |  |  200|  6.06k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2347|  6.06k|    }
 2348|  6.06k|  }
 2349|  7.39k|  *resultp = result;
 2350|  7.39k|  return mresult;
 2351|  7.59k|}
multi.c:multistate_connecting:
 2486|   356k|{
 2487|   356k|  bool connected;
 2488|       |
 2489|   356k|  if(!data->conn) {
  ------------------
  |  Branch (2489:6): [True: 0, False: 356k]
  ------------------
 2490|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2490:5): [Folded, False: 0]
  |  Branch (2490:5): [Folded, False: 0]
  ------------------
 2491|      0|    *result = CURLE_FAILED_INIT;
 2492|      0|    return CURLM_OK;
 2493|      0|  }
 2494|   356k|  if(!Curl_xfer_recv_is_paused(data)) {
  ------------------
  |  Branch (2494:6): [True: 356k, False: 0]
  ------------------
 2495|   356k|    *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  |  303|   356k|#define FIRSTSOCKET     0
  ------------------
                  *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  | 1058|   356k|#define FALSE false
  ------------------
 2496|   356k|    if(connected && !(*result)) {
  ------------------
  |  Branch (2496:8): [True: 1.36k, False: 354k]
  |  Branch (2496:21): [True: 1.36k, False: 0]
  ------------------
 2497|  1.36k|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2497:10): [True: 1.36k, False: 0]
  ------------------
 2498|  1.36k|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  303|  1.36k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2498:10): [True: 0, False: 1.36k]
  ------------------
 2499|       |        /* new connection, can multiplex, wake pending handles */
 2500|      0|        process_pending_handles(data->multi);
 2501|      0|      }
 2502|  1.36k|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  200|  1.36k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2503|  1.36k|      return CURLM_CALL_MULTI_PERFORM;
 2504|  1.36k|    }
 2505|   354k|    else if(*result) {
  ------------------
  |  Branch (2505:13): [True: 4.44k, False: 350k]
  ------------------
 2506|       |      /* failure detected */
 2507|  4.44k|      CURL_TRC_M(data, "connect failed -> %d", *result);
  ------------------
  |  |  148|  4.44k|  do {                                   \
  |  |  149|  4.44k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  4.44k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  4.44k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  8.88k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 4.44k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.44k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  8.88k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  4.44k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  4.44k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  4.44k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 4.44k]
  |  |  ------------------
  ------------------
 2508|  4.44k|      multi_posttransfer(data);
 2509|  4.44k|      multi_done(data, *result, TRUE);
  ------------------
  |  | 1055|  4.44k|#define TRUE true
  ------------------
 2510|  4.44k|      *stream_error = TRUE;
  ------------------
  |  | 1055|  4.44k|#define TRUE true
  ------------------
 2511|  4.44k|      return CURLM_OK;
 2512|  4.44k|    }
 2513|   356k|  }
 2514|   350k|  return CURLM_OK;
 2515|   356k|}
multi.c:multistate_protoconnect:
 2520|  1.36k|{
 2521|  1.36k|  bool protocol_connected = FALSE;
  ------------------
  |  | 1058|  1.36k|#define FALSE false
  ------------------
 2522|       |
 2523|  1.36k|  if(!(*result) && data->conn->bits.reuse) {
  ------------------
  |  Branch (2523:6): [True: 1.36k, False: 0]
  |  Branch (2523:20): [True: 0, False: 1.36k]
  ------------------
 2524|       |    /* ftp seems to hang when protoconnect on reused connection since we
 2525|       |     * handle PROTOCONNECT in general inside the filters, it seems wrong to
 2526|       |     * restart this on a reused connection.
 2527|       |     */
 2528|      0|    multistate(data, MSTATE_DO);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2529|      0|    return CURLM_CALL_MULTI_PERFORM;
 2530|      0|  }
 2531|  1.36k|  if(!(*result))
  ------------------
  |  Branch (2531:6): [True: 1.36k, False: 0]
  ------------------
 2532|  1.36k|    *result = protocol_connect(data, &protocol_connected);
 2533|  1.36k|  if(!(*result) && !protocol_connected) {
  ------------------
  |  Branch (2533:6): [True: 923, False: 442]
  |  Branch (2533:20): [True: 495, False: 428]
  ------------------
 2534|       |    /* switch to waiting state */
 2535|    495|    multistate(data, MSTATE_PROTOCONNECTING);
  ------------------
  |  |  200|    495|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2536|    495|    return CURLM_CALL_MULTI_PERFORM;
 2537|    495|  }
 2538|    870|  else if(!(*result)) {
  ------------------
  |  Branch (2538:11): [True: 428, False: 442]
  ------------------
 2539|       |    /* protocol connect has completed, go WAITDO or DO */
 2540|    428|    multistate(data, MSTATE_DO);
  ------------------
  |  |  200|    428|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2541|    428|    return CURLM_CALL_MULTI_PERFORM;
 2542|    428|  }
 2543|       |
 2544|       |  /* failure detected */
 2545|    442|  multi_posttransfer(data);
 2546|    442|  multi_done(data, *result, TRUE);
  ------------------
  |  | 1055|    442|#define TRUE true
  ------------------
 2547|       |  *stream_error = TRUE;
  ------------------
  |  | 1055|    442|#define TRUE true
  ------------------
 2548|    442|  return CURLM_OK;
 2549|  1.36k|}
multi.c:protocol_connect:
 1896|  1.36k|{
 1897|  1.36k|  struct connectdata *conn = data->conn;
 1898|  1.36k|  CURLcode result = CURLE_OK;
 1899|       |
 1900|  1.36k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  1.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1900:3): [True: 0, False: 1.36k]
  |  Branch (1900:3): [True: 1.36k, False: 0]
  ------------------
 1901|  1.36k|  DEBUGASSERT(protocol_done);
  ------------------
  |  | 1081|  1.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1901:3): [True: 0, False: 1.36k]
  |  Branch (1901:3): [True: 1.36k, False: 0]
  ------------------
 1902|  1.36k|  DEBUGASSERT(Curl_conn_is_connected(conn, FIRSTSOCKET));
  ------------------
  |  | 1081|  1.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1902:3): [True: 0, False: 1.36k]
  |  Branch (1902:3): [True: 1.36k, False: 0]
  ------------------
 1903|       |
 1904|  1.36k|  *protocol_done = FALSE;
  ------------------
  |  | 1058|  1.36k|#define FALSE false
  ------------------
 1905|  1.36k|  if(!conn->bits.protoconnstart) {
  ------------------
  |  Branch (1905:6): [True: 1.36k, False: 0]
  ------------------
 1906|  1.36k|    if(conn->scheme->run->connect_it) {
  ------------------
  |  Branch (1906:8): [True: 1.36k, False: 0]
  ------------------
 1907|       |      /* Call the protocol-specific connect function */
 1908|  1.36k|      result = conn->scheme->run->connect_it(data, protocol_done);
 1909|  1.36k|      if(result)
  ------------------
  |  Branch (1909:10): [True: 442, False: 923]
  ------------------
 1910|    442|        return result;
 1911|  1.36k|    }
 1912|    923|    conn->bits.protoconnstart = TRUE;
  ------------------
  |  | 1055|    923|#define TRUE true
  ------------------
 1913|    923|  }
 1914|       |
 1915|       |  /* Unless this protocol does not have any protocol-connect callback, as
 1916|       |     then we know we are done. */
 1917|    923|  if(!conn->scheme->run->connecting)
  ------------------
  |  Branch (1917:6): [True: 0, False: 923]
  ------------------
 1918|      0|    *protocol_done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1919|    923|  return CURLE_OK;
 1920|  1.36k|}
multi.c:multistate_protoconnecting:
 2554|  4.49k|{
 2555|  4.49k|  bool protocol_connected = FALSE;
  ------------------
  |  | 1058|  4.49k|#define FALSE false
  ------------------
 2556|       |
 2557|       |  /* protocol-specific connect phase */
 2558|  4.49k|  *result = protocol_connecting(data, &protocol_connected);
 2559|  4.49k|  if(!(*result) && protocol_connected) {
  ------------------
  |  Branch (2559:6): [True: 4.12k, False: 362]
  |  Branch (2559:20): [True: 86, False: 4.04k]
  ------------------
 2560|       |    /* after the connect has completed, go WAITDO or DO */
 2561|     86|    multistate(data, MSTATE_DO);
  ------------------
  |  |  200|     86|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2562|     86|    return CURLM_CALL_MULTI_PERFORM;
 2563|     86|  }
 2564|  4.40k|  else if(*result) {
  ------------------
  |  Branch (2564:11): [True: 362, False: 4.04k]
  ------------------
 2565|       |    /* failure detected */
 2566|    362|    multi_posttransfer(data);
 2567|    362|    multi_done(data, *result, TRUE);
  ------------------
  |  | 1055|    362|#define TRUE true
  ------------------
 2568|    362|    *stream_error = TRUE;
  ------------------
  |  | 1055|    362|#define TRUE true
  ------------------
 2569|    362|  }
 2570|  4.40k|  return CURLM_OK;
 2571|  4.49k|}
multi.c:protocol_connecting:
 1856|  4.49k|{
 1857|  4.49k|  CURLcode result = CURLE_OK;
 1858|  4.49k|  struct connectdata *conn = data->conn;
 1859|       |
 1860|  4.49k|  if(conn && conn->scheme->run->connecting) {
  ------------------
  |  Branch (1860:6): [True: 4.49k, False: 0]
  |  Branch (1860:14): [True: 4.49k, False: 0]
  ------------------
 1861|  4.49k|    *done = FALSE;
  ------------------
  |  | 1058|  4.49k|#define FALSE false
  ------------------
 1862|  4.49k|    result = conn->scheme->run->connecting(data, done);
 1863|  4.49k|  }
 1864|      0|  else
 1865|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1866|       |
 1867|  4.49k|  return result;
 1868|  4.49k|}
multi.c:multistate_do:
 2149|    514|{
 2150|    514|  CURLMcode mresult = CURLM_OK;
 2151|    514|  CURLcode result = CURLE_OK;
 2152|    514|  if(data->set.fprereq) {
  ------------------
  |  Branch (2152:6): [True: 0, False: 514]
  ------------------
 2153|      0|    int prereq_rc;
 2154|       |
 2155|       |    /* call the prerequest callback function */
 2156|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2157|      0|    prereq_rc = data->set.fprereq(data->set.prereq_userp,
 2158|      0|                                  data->info.primary.remote_ip,
 2159|      0|                                  data->info.primary.local_ip,
 2160|      0|                                  data->info.primary.remote_port,
 2161|      0|                                  data->info.primary.local_port);
 2162|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2163|      0|    if(prereq_rc != CURL_PREREQFUNC_OK) {
  ------------------
  |  |  506|      0|#define CURL_PREREQFUNC_OK 0
  ------------------
  |  Branch (2163:8): [True: 0, False: 0]
  ------------------
 2164|      0|      failf(data, "operation aborted by pre-request callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2165|       |      /* failure in pre-request callback - do not do any other processing */
 2166|      0|      result = CURLE_ABORTED_BY_CALLBACK;
 2167|      0|      multi_posttransfer(data);
 2168|      0|      multi_done(data, result, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2169|      0|      *stream_errorp = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2170|      0|      goto end;
 2171|      0|    }
 2172|      0|  }
 2173|       |
 2174|    514|  if(data->set.connect_only && !data->set.connect_only_ws) {
  ------------------
  |  Branch (2174:6): [True: 3, False: 511]
  |  Branch (2174:32): [True: 1, False: 2]
  ------------------
 2175|      1|    multistate(data, MSTATE_DONE);
  ------------------
  |  |  200|      1|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2176|      1|    mresult = CURLM_CALL_MULTI_PERFORM;
 2177|      1|  }
 2178|    513|  else {
 2179|    513|    bool dophase_done = FALSE;
  ------------------
  |  | 1058|    513|#define FALSE false
  ------------------
 2180|       |    /* Perform the protocol's DO action */
 2181|    513|    result = multi_do(data, &dophase_done);
 2182|       |
 2183|       |    /* When multi_do() returns failure, data->conn might be NULL! */
 2184|       |
 2185|    513|    if(!result) {
  ------------------
  |  Branch (2185:8): [True: 480, False: 33]
  ------------------
 2186|    480|      if(!dophase_done) {
  ------------------
  |  Branch (2186:10): [True: 96, False: 384]
  ------------------
 2187|     96|#ifndef CURL_DISABLE_FTP
 2188|       |        /* some steps needed for wildcard matching */
 2189|     96|        if(data->state.wildcardmatch) {
  ------------------
  |  Branch (2189:12): [True: 0, False: 96]
  ------------------
 2190|      0|          struct WildcardData *wc = data->wildcard;
 2191|      0|          if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) {
  ------------------
  |  Branch (2191:14): [True: 0, False: 0]
  |  Branch (2191:42): [True: 0, False: 0]
  ------------------
 2192|       |            /* skip some states if it is important */
 2193|      0|            multi_done(data, CURLE_OK, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2194|       |
 2195|       |            /* if there is no connection left, skip the DONE state */
 2196|      0|            multistate(data, data->conn ? MSTATE_DONE : MSTATE_COMPLETED);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (200:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2197|      0|            mresult = CURLM_CALL_MULTI_PERFORM;
 2198|      0|            goto end;
 2199|      0|          }
 2200|      0|        }
 2201|     96|#endif
 2202|       |        /* DO was not completed in one function call, we must continue
 2203|       |           DOING... */
 2204|     96|        multistate(data, MSTATE_DOING);
  ------------------
  |  |  200|     96|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2205|     96|        mresult = CURLM_CALL_MULTI_PERFORM;
 2206|     96|      }
 2207|       |
 2208|       |      /* after DO, go DO_DONE... or DO_MORE */
 2209|    384|      else if(data->conn->bits.do_more) {
  ------------------
  |  Branch (2209:15): [True: 0, False: 384]
  ------------------
 2210|       |        /* we are supposed to do more, but we need to sit down, relax and wait
 2211|       |           a little while first */
 2212|      0|        multistate(data, MSTATE_DOING_MORE);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2213|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2214|      0|      }
 2215|    384|      else {
 2216|       |        /* we are done with the DO, now DID */
 2217|    384|        multistate(data, MSTATE_DID);
  ------------------
  |  |  200|    384|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2218|    384|        mresult = CURLM_CALL_MULTI_PERFORM;
 2219|    384|      }
 2220|    480|    }
 2221|     33|    else if((result == CURLE_SEND_ERROR) &&
  ------------------
  |  Branch (2221:13): [True: 0, False: 33]
  ------------------
 2222|      0|            data->conn->bits.reuse) {
  ------------------
  |  Branch (2222:13): [True: 0, False: 0]
  ------------------
 2223|       |      /*
 2224|       |       * In this situation, a connection that we were trying to use may have
 2225|       |       * unexpectedly died. If possible, send the connection back to the
 2226|       |       * CONNECT phase so we can try again.
 2227|       |       */
 2228|      0|      const struct Curl_scheme *handler = data->conn->scheme;
 2229|      0|      char *newurl = NULL;
 2230|      0|      followtype follow = FOLLOW_NONE;
 2231|      0|      CURLcode drc;
 2232|       |
 2233|      0|      drc = Curl_retry_request(data, &newurl);
 2234|      0|      if(drc) {
  ------------------
  |  Branch (2234:10): [True: 0, False: 0]
  ------------------
 2235|       |        /* a failure here pretty much implies an out of memory */
 2236|      0|        result = drc;
 2237|      0|        *stream_errorp = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2238|      0|      }
 2239|       |
 2240|      0|      multi_posttransfer(data);
 2241|      0|      drc = multi_done(data, result, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2242|       |
 2243|       |      /* When set to retry the connection, we must go back to the CONNECT
 2244|       |       * state */
 2245|      0|      if(newurl) {
  ------------------
  |  Branch (2245:10): [True: 0, False: 0]
  ------------------
 2246|      0|        if(!drc || (drc == CURLE_SEND_ERROR)) {
  ------------------
  |  Branch (2246:12): [True: 0, False: 0]
  |  Branch (2246:20): [True: 0, False: 0]
  ------------------
 2247|      0|          follow = FOLLOW_RETRY;
 2248|      0|          drc = multi_follow(data, handler, newurl, follow);
 2249|      0|          if(!drc) {
  ------------------
  |  Branch (2249:14): [True: 0, False: 0]
  ------------------
 2250|      0|            multistate(data, MSTATE_SETUP);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2251|      0|            mresult = CURLM_CALL_MULTI_PERFORM;
 2252|      0|            result = CURLE_OK;
 2253|      0|          }
 2254|      0|          else {
 2255|       |            /* Follow failed */
 2256|      0|            result = drc;
 2257|      0|          }
 2258|      0|        }
 2259|      0|        else {
 2260|       |          /* done did not return OK or SEND_ERROR */
 2261|      0|          result = drc;
 2262|      0|        }
 2263|      0|      }
 2264|      0|      else {
 2265|       |        /* Have error handler disconnect conn if we cannot retry */
 2266|      0|        *stream_errorp = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2267|      0|      }
 2268|      0|      curlx_free(newurl);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2269|      0|    }
 2270|     33|    else {
 2271|       |      /* failure detected */
 2272|     33|      multi_posttransfer(data);
 2273|     33|      if(data->conn)
  ------------------
  |  Branch (2273:10): [True: 33, False: 0]
  ------------------
 2274|     33|        multi_done(data, result, FALSE);
  ------------------
  |  | 1058|     33|#define FALSE false
  ------------------
 2275|     33|      *stream_errorp = TRUE;
  ------------------
  |  | 1055|     33|#define TRUE true
  ------------------
 2276|     33|    }
 2277|    513|  }
 2278|    514|end:
 2279|    514|  *resultp = result;
 2280|    514|  return mresult;
 2281|    514|}
multi.c:multi_do:
 1762|    513|{
 1763|    513|  CURLcode result = CURLE_OK;
 1764|    513|  struct connectdata *conn = data->conn;
 1765|       |
 1766|    513|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|    513|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1766:3): [True: 0, False: 513]
  |  Branch (1766:3): [True: 513, False: 0]
  ------------------
 1767|    513|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1081|    513|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1767:3): [True: 0, False: 513]
  |  Branch (1767:3): [True: 513, False: 0]
  ------------------
 1768|       |
 1769|    513|  if(conn->scheme->run->do_it)
  ------------------
  |  Branch (1769:6): [True: 513, False: 0]
  ------------------
 1770|    513|    result = conn->scheme->run->do_it(data, done);
 1771|       |
 1772|    513|  return result;
 1773|    513|}
multi.c:multistate_doing:
 2576|    130|{
 2577|    130|  bool dophase_done = FALSE;
  ------------------
  |  | 1058|    130|#define FALSE false
  ------------------
 2578|       |
 2579|       |  /* we continue DOING until the DO phase is complete */
 2580|    130|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|    130|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2580:3): [True: 0, False: 130]
  |  Branch (2580:3): [True: 130, False: 0]
  ------------------
 2581|    130|  *result = protocol_doing(data, &dophase_done);
 2582|    130|  if(!(*result)) {
  ------------------
  |  Branch (2582:6): [True: 81, False: 49]
  ------------------
 2583|     81|    if(dophase_done) {
  ------------------
  |  Branch (2583:8): [True: 43, False: 38]
  ------------------
 2584|       |      /* after DO, go DO_DONE or DO_MORE */
 2585|     43|      multistate(data, data->conn->bits.do_more ?
  ------------------
  |  |  200|     86|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (200:36): [True: 0, False: 43]
  |  |  ------------------
  ------------------
 2586|     43|                 MSTATE_DOING_MORE : MSTATE_DID);
 2587|     43|      return CURLM_CALL_MULTI_PERFORM;
 2588|     43|    } /* dophase_done */
 2589|     81|  }
 2590|     49|  else {
 2591|       |    /* failure detected */
 2592|     49|    multi_posttransfer(data);
 2593|     49|    multi_done(data, *result, FALSE);
  ------------------
  |  | 1058|     49|#define FALSE false
  ------------------
 2594|     49|    *stream_error = TRUE;
  ------------------
  |  | 1055|     49|#define TRUE true
  ------------------
 2595|     49|  }
 2596|     87|  return CURLM_OK;
 2597|    130|}
multi.c:protocol_doing:
 1876|    130|{
 1877|    130|  CURLcode result = CURLE_OK;
 1878|    130|  struct connectdata *conn = data->conn;
 1879|       |
 1880|    130|  if(conn && conn->scheme->run->doing) {
  ------------------
  |  Branch (1880:6): [True: 130, False: 0]
  |  Branch (1880:14): [True: 130, False: 0]
  ------------------
 1881|    130|    *done = FALSE;
  ------------------
  |  | 1058|    130|#define FALSE false
  ------------------
 1882|    130|    result = conn->scheme->run->doing(data, done);
 1883|    130|  }
 1884|      0|  else
 1885|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1886|       |
 1887|    130|  return result;
 1888|    130|}
multi.c:multistate_did:
 2632|    427|{
 2633|    427|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|    427|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2633:3): [True: 0, False: 427]
  |  Branch (2633:3): [True: 427, False: 0]
  ------------------
 2634|    427|  if(data->conn->bits.multiplex)
  ------------------
  |  Branch (2634:6): [True: 0, False: 427]
  ------------------
 2635|       |    /* Check if we can move pending requests to send pipe */
 2636|      0|    process_pending_handles(multi); /* multiplexed */
 2637|       |
 2638|       |  /* Only perform the transfer if there is a good socket to work with.
 2639|       |     Having both BAD is a signal to skip immediately to DONE */
 2640|    427|  if(CONN_SOCK_IDX_VALID(data->conn->recv_idx) ||
  ------------------
  |  |  382|    854|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 427, False: 0]
  |  |  |  Branch (382:50): [True: 427, False: 0]
  |  |  ------------------
  ------------------
 2641|      0|     CONN_SOCK_IDX_VALID(data->conn->send_idx))
  ------------------
  |  |  382|      0|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 0, False: 0]
  |  |  |  Branch (382:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2642|    427|    multistate(data, MSTATE_PERFORMING);
  ------------------
  |  |  200|    427|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2643|      0|  else {
 2644|      0|#ifndef CURL_DISABLE_FTP
 2645|      0|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (2645:8): [True: 0, False: 0]
  ------------------
 2646|      0|       ((data->conn->scheme->flags & PROTOPT_WILDCARD) == 0)) {
  ------------------
  |  |  231|      0|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (2646:8): [True: 0, False: 0]
  ------------------
 2647|      0|      data->wildcard->state = CURLWC_DONE;
 2648|      0|    }
 2649|      0|#endif
 2650|      0|    multistate(data, MSTATE_DONE);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2651|      0|  }
 2652|    427|  return CURLM_CALL_MULTI_PERFORM;
 2653|    427|}
multi.c:multistate_ratelimiting:
 2285|     47|{
 2286|     47|  CURLcode result = CURLE_OK;
 2287|     47|  CURLMcode mresult = CURLM_OK;
 2288|     47|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|     47|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2288:3): [True: 0, False: 47]
  |  Branch (2288:3): [True: 47, False: 0]
  ------------------
 2289|       |  /* if both rates are within spec, resume transfer */
 2290|     47|  result = Curl_pgrsCheck(data);
 2291|       |
 2292|     47|  if(result) {
  ------------------
  |  Branch (2292:6): [True: 0, False: 47]
  ------------------
 2293|      0|    if(!(data->conn->scheme->flags & PROTOPT_DUAL) &&
  ------------------
  |  |  208|      0|#define PROTOPT_DUAL (1 << 1)      /* this protocol uses two connections */
  ------------------
  |  Branch (2293:8): [True: 0, False: 0]
  ------------------
 2294|      0|       result != CURLE_HTTP2_STREAM)
  ------------------
  |  Branch (2294:8): [True: 0, False: 0]
  ------------------
 2295|      0|      streamclose(data->conn, "Transfer returned error");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2296|       |
 2297|      0|    multi_posttransfer(data);
 2298|      0|    multi_done(data, result, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2299|      0|  }
 2300|     47|  else {
 2301|     47|    if(!mspeed_check(data))
  ------------------
  |  Branch (2301:8): [True: 0, False: 47]
  ------------------
 2302|      0|      mresult = CURLM_CALL_MULTI_PERFORM;
 2303|     47|  }
 2304|     47|  *resultp = result;
 2305|     47|  return mresult;
 2306|     47|}
multi.c:mspeed_check:
 1964|    762|{
 1965|    762|  if(Curl_rlimit_active(&data->progress.dl.rlimit) ||
  ------------------
  |  Branch (1965:6): [True: 328, False: 434]
  ------------------
 1966|    434|     Curl_rlimit_active(&data->progress.ul.rlimit)) {
  ------------------
  |  Branch (1966:6): [True: 20, False: 414]
  ------------------
 1967|       |    /* check if our send/recv limits require idle waits */
 1968|    348|    const struct curltime *pnow = Curl_pgrs_now(data);
 1969|    348|    timediff_t recv_ms, send_ms;
 1970|       |
 1971|    348|    send_ms = Curl_rlimit_wait_ms(&data->progress.ul.rlimit, pnow);
 1972|    348|    recv_ms = Curl_rlimit_wait_ms(&data->progress.dl.rlimit, pnow);
 1973|       |
 1974|    348|    if(send_ms || recv_ms) {
  ------------------
  |  Branch (1974:8): [True: 0, False: 348]
  |  Branch (1974:19): [True: 86, False: 262]
  ------------------
 1975|     86|      if(data->mstate != MSTATE_RATELIMITING) {
  ------------------
  |  Branch (1975:10): [True: 39, False: 47]
  ------------------
 1976|     39|        multistate(data, MSTATE_RATELIMITING);
  ------------------
  |  |  200|     39|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 1977|     39|      }
 1978|     86|      Curl_expire(data, CURLMAX(send_ms, recv_ms), EXPIRE_TOOFAST);
  ------------------
  |  | 1286|     86|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 0, False: 86]
  |  |  ------------------
  ------------------
 1979|     86|      Curl_multi_clear_dirty(data);
 1980|     86|      CURL_TRC_M(data, "[RLIMIT] waiting %" FMT_TIMEDIFF_T "ms",
  ------------------
  |  |  148|     86|  do {                                   \
  |  |  149|     86|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|     86|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     86|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    172|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 86, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 86]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    172|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|     86|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|     86|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|     86|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 86]
  |  |  ------------------
  ------------------
 1981|     86|                 CURLMAX(send_ms, recv_ms));
 1982|     86|      return CURLE_AGAIN;
 1983|     86|    }
 1984|    262|    else {
 1985|       |      /* when will the rate limits increase next? The transfer needs
 1986|       |       * to run again at that time or it may stall. */
 1987|    262|      send_ms = Curl_rlimit_next_step_ms(&data->progress.ul.rlimit, pnow);
 1988|    262|      recv_ms = Curl_rlimit_next_step_ms(&data->progress.dl.rlimit, pnow);
 1989|    262|      if(send_ms || recv_ms) {
  ------------------
  |  Branch (1989:10): [True: 44, False: 218]
  |  Branch (1989:21): [True: 218, False: 0]
  ------------------
 1990|    262|        timediff_t next_ms = CURLMIN(send_ms, recv_ms);
  ------------------
  |  | 1287|    262|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 218, False: 44]
  |  |  ------------------
  ------------------
 1991|    262|        if(!next_ms)
  ------------------
  |  Branch (1991:12): [True: 238, False: 24]
  ------------------
 1992|    238|          next_ms = CURLMAX(send_ms, recv_ms);
  ------------------
  |  | 1286|    238|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 20, False: 218]
  |  |  ------------------
  ------------------
 1993|    262|        Curl_expire(data, next_ms, EXPIRE_TOOFAST);
 1994|    262|        CURL_TRC_M(data, "[RLIMIT] next token update in %" FMT_TIMEDIFF_T "ms",
  ------------------
  |  |  148|    262|  do {                                   \
  |  |  149|    262|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    262|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    262|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    524|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 262, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 262]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    524|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    262|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    262|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    262|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 262]
  |  |  ------------------
  ------------------
 1995|    262|                   next_ms);
 1996|    262|      }
 1997|    262|    }
 1998|    348|  }
 1999|       |
 2000|    676|  if(data->mstate != MSTATE_PERFORMING) {
  ------------------
  |  Branch (2000:6): [True: 0, False: 676]
  ------------------
 2001|      0|    CURL_TRC_M(data, "[RLIMIT] wait over, continue");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2002|      0|    multistate(data, MSTATE_PERFORMING);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2003|      0|  }
 2004|    676|  return CURLE_OK;
 2005|    762|}
multi.c:multistate_performing:
 2010|    557|{
 2011|    557|  char *newurl = NULL;
 2012|    557|  bool retry = FALSE;
  ------------------
  |  | 1058|    557|#define FALSE false
  ------------------
 2013|    557|  CURLMcode mresult = CURLM_OK;
 2014|    557|  CURLcode result = *resultp = CURLE_OK;
 2015|    557|  *stream_errorp = FALSE;
  ------------------
  |  | 1058|    557|#define FALSE false
  ------------------
 2016|       |
 2017|    557|  if(mspeed_check(data) == CURLE_AGAIN)
  ------------------
  |  Branch (2017:6): [True: 24, False: 533]
  ------------------
 2018|     24|    return CURLM_OK;
 2019|       |
 2020|       |  /* read/write data if it is ready to do so */
 2021|    533|  result = Curl_sendrecv(data);
 2022|       |
 2023|    533|  if(data->req.done || (result == CURLE_RECV_ERROR)) {
  ------------------
  |  Branch (2023:6): [True: 370, False: 163]
  |  Branch (2023:24): [True: 0, False: 163]
  ------------------
 2024|       |    /* If CURLE_RECV_ERROR happens early enough, we assume it was a race
 2025|       |     * condition and the server closed the reused connection exactly when we
 2026|       |     * wanted to use it, so figure out if that is indeed the case.
 2027|       |     */
 2028|    370|    CURLcode ret = Curl_retry_request(data, &newurl);
 2029|    370|    if(!ret)
  ------------------
  |  Branch (2029:8): [True: 370, False: 0]
  ------------------
 2030|    370|      retry = !!newurl;
 2031|      0|    else if(!result)
  ------------------
  |  Branch (2031:13): [True: 0, False: 0]
  ------------------
 2032|      0|      result = ret;
 2033|       |
 2034|    370|    if(retry) {
  ------------------
  |  Branch (2034:8): [True: 0, False: 370]
  ------------------
 2035|       |      /* if we are to retry, set the result to OK and consider the
 2036|       |         request as done */
 2037|      0|      result = CURLE_OK;
 2038|      0|      data->req.done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2039|      0|    }
 2040|    370|  }
 2041|    163|#ifndef CURL_DISABLE_HTTP
 2042|    163|  else if((result == CURLE_HTTP2_STREAM) &&
  ------------------
  |  Branch (2042:11): [True: 0, False: 163]
  ------------------
 2043|      0|          Curl_h2_http_1_1_error(data)) {
  ------------------
  |  Branch (2043:11): [True: 0, False: 0]
  ------------------
 2044|      0|    CURLcode ret = Curl_retry_request(data, &newurl);
 2045|       |
 2046|      0|    if(!ret) {
  ------------------
  |  Branch (2046:8): [True: 0, False: 0]
  ------------------
 2047|      0|      infof(data, "Downgrades to HTTP/1.1");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2048|      0|      streamclose(data->conn, "Disconnect HTTP/2 for HTTP/1");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2049|      0|      data->state.http_neg.wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2050|      0|      data->state.http_neg.allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2051|       |      /* clear the error message bit too as we ignore the one we got */
 2052|      0|      data->state.errorbuf = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2053|      0|      if(!newurl)
  ------------------
  |  Branch (2053:10): [True: 0, False: 0]
  ------------------
 2054|       |        /* typically for HTTP_1_1_REQUIRED error on first flight */
 2055|      0|        newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
 2056|      0|      if(!newurl) {
  ------------------
  |  Branch (2056:10): [True: 0, False: 0]
  ------------------
 2057|      0|        result = CURLE_OUT_OF_MEMORY;
 2058|      0|      }
 2059|      0|      else {
 2060|       |        /* if we are to retry, set the result to OK and consider the request
 2061|       |          as done */
 2062|      0|        retry = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2063|      0|        result = CURLE_OK;
 2064|      0|        data->req.done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2065|      0|      }
 2066|      0|    }
 2067|      0|    else
 2068|      0|      result = ret;
 2069|      0|  }
 2070|    533|#endif
 2071|       |
 2072|    533|  if(result) {
  ------------------
  |  Branch (2072:6): [True: 5, False: 528]
  ------------------
 2073|       |    /*
 2074|       |     * The transfer phase returned error, we mark the connection to get closed
 2075|       |     * to prevent being reused. This is because we cannot possibly know if the
 2076|       |     * connection is in a good shape or not now. Unless it is a protocol which
 2077|       |     * uses two "channels" like FTP, as then the error happened in the data
 2078|       |     * connection.
 2079|       |     */
 2080|       |
 2081|      5|    if(!(data->conn->scheme->flags & PROTOPT_DUAL) &&
  ------------------
  |  |  208|      5|#define PROTOPT_DUAL (1 << 1)      /* this protocol uses two connections */
  ------------------
  |  Branch (2081:8): [True: 5, False: 0]
  ------------------
 2082|      5|       result != CURLE_HTTP2_STREAM)
  ------------------
  |  Branch (2082:8): [True: 5, False: 0]
  ------------------
 2083|      5|      streamclose(data->conn, "Transfer returned error");
  ------------------
  |  |  102|      5|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      5|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2084|       |
 2085|      5|    multi_posttransfer(data);
 2086|      5|    multi_done(data, result, TRUE);
  ------------------
  |  | 1055|      5|#define TRUE true
  ------------------
 2087|      5|  }
 2088|    528|  else if(data->req.done && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (2088:11): [True: 370, False: 158]
  |  Branch (2088:29): [True: 370, False: 0]
  ------------------
 2089|    370|    const struct Curl_scheme *handler = data->conn->scheme;
 2090|       |
 2091|       |    /* call this even if the readwrite function returned error */
 2092|    370|    multi_posttransfer(data);
 2093|       |
 2094|       |    /* When we follow redirects or is set to retry the connection, we must to
 2095|       |       go back to the CONNECT state */
 2096|    370|    if(data->req.newurl || retry) {
  ------------------
  |  Branch (2096:8): [True: 0, False: 370]
  |  Branch (2096:28): [True: 0, False: 370]
  ------------------
 2097|      0|      followtype follow = FOLLOW_NONE;
 2098|      0|      if(!retry) {
  ------------------
  |  Branch (2098:10): [True: 0, False: 0]
  ------------------
 2099|       |        /* if the URL is a follow-location and not a retried request then
 2100|       |           figure out the URL here */
 2101|      0|        curlx_free(newurl);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2102|      0|        newurl = data->req.newurl;
 2103|      0|        data->req.newurl = NULL;
 2104|      0|        follow = FOLLOW_REDIR;
 2105|      0|      }
 2106|      0|      else
 2107|      0|        follow = FOLLOW_RETRY;
 2108|      0|      (void)multi_done(data, CURLE_OK, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2109|       |      /* multi_done() might return CURLE_GOT_NOTHING */
 2110|      0|      result = multi_follow(data, handler, newurl, follow);
 2111|      0|      if(!result) {
  ------------------
  |  Branch (2111:10): [True: 0, False: 0]
  ------------------
 2112|      0|        multistate(data, MSTATE_SETUP);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2113|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2114|      0|      }
 2115|      0|    }
 2116|    370|    else {
 2117|       |      /* after the transfer is done, go DONE */
 2118|       |
 2119|       |      /* but first check to see if we got a location info even though we are
 2120|       |         not following redirects */
 2121|    370|      if(data->req.location) {
  ------------------
  |  Branch (2121:10): [True: 0, False: 370]
  ------------------
 2122|      0|        curlx_free(newurl);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2123|      0|        newurl = data->req.location;
 2124|      0|        data->req.location = NULL;
 2125|      0|        result = multi_follow(data, handler, newurl, FOLLOW_FAKE);
 2126|      0|        if(result) {
  ------------------
  |  Branch (2126:12): [True: 0, False: 0]
  ------------------
 2127|      0|          *stream_errorp = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2128|      0|          result = multi_done(data, result, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2129|      0|        }
 2130|      0|      }
 2131|       |
 2132|    370|      if(!result) {
  ------------------
  |  Branch (2132:10): [True: 370, False: 0]
  ------------------
 2133|    370|        multistate(data, MSTATE_DONE);
  ------------------
  |  |  200|    370|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2134|    370|        mresult = CURLM_CALL_MULTI_PERFORM;
 2135|    370|      }
 2136|    370|    }
 2137|    370|  }
 2138|    158|  else { /* not errored, not done */
 2139|    158|    mspeed_check(data);
 2140|    158|  }
 2141|    533|  curlx_free(newurl);
  ------------------
  |  | 1483|    533|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2142|    533|  *resultp = result;
 2143|    533|  return mresult;
 2144|    557|}
multi.c:multistate_done:
 2656|    371|{
 2657|    371|  if(data->conn) {
  ------------------
  |  Branch (2657:6): [True: 371, False: 0]
  ------------------
 2658|    371|    CURLcode result;
 2659|       |
 2660|       |    /* post-transfer command */
 2661|    371|    result = multi_done(data, *presult, FALSE);
  ------------------
  |  | 1058|    371|#define FALSE false
  ------------------
 2662|       |
 2663|       |    /* allow a previously set error code take precedence */
 2664|    371|    if(!(*presult))
  ------------------
  |  Branch (2664:8): [True: 371, False: 0]
  ------------------
 2665|    371|      *presult = result;
 2666|    371|  }
 2667|       |
 2668|    371|#ifndef CURL_DISABLE_FTP
 2669|    371|  if(data->state.wildcardmatch) {
  ------------------
  |  Branch (2669:6): [True: 0, False: 371]
  ------------------
 2670|      0|    if(data->wildcard->state != CURLWC_DONE) {
  ------------------
  |  Branch (2670:8): [True: 0, False: 0]
  ------------------
 2671|       |      /* if a wildcard is set and we are not ending -> lets start again
 2672|       |         with MSTATE_INIT */
 2673|      0|      multistate(data, MSTATE_INIT);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2674|      0|      return CURLM_CALL_MULTI_PERFORM;
 2675|      0|    }
 2676|      0|  }
 2677|    371|#endif
 2678|       |  /* after we have DONE what we are supposed to do, go COMPLETED, and
 2679|       |     it does not matter what the multi_done() returned! */
 2680|    371|  multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  200|    371|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2681|    371|  return CURLM_CALL_MULTI_PERFORM;
 2682|    371|}
multi.c:is_finished:
 2358|   390k|{
 2359|   390k|  if(data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2359:6): [True: 389k, False: 371]
  ------------------
 2360|   389k|    if(result) {
  ------------------
  |  Branch (2360:8): [True: 9.96k, False: 379k]
  ------------------
 2361|       |      /*
 2362|       |       * If an error was returned, and we are not in completed state now,
 2363|       |       * then we go to completed and consider this transfer aborted.
 2364|       |       */
 2365|       |
 2366|       |      /* No attempt to disconnect connections must be made before this -
 2367|       |         connection detach and termination happens only here */
 2368|       |
 2369|       |      /* Check if we can move pending requests to send pipe */
 2370|  9.96k|      process_pending_handles(multi); /* connection */
 2371|       |
 2372|  9.96k|      if(data->conn) {
  ------------------
  |  Branch (2372:10): [True: 0, False: 9.96k]
  ------------------
 2373|      0|        if(stream_error) {
  ------------------
  |  Branch (2373:12): [True: 0, False: 0]
  ------------------
 2374|       |          /* Do not attempt to send data over a connection that timed out */
 2375|      0|          bool dead_connection = result == CURLE_OPERATION_TIMEDOUT;
 2376|      0|          struct connectdata *conn = data->conn;
 2377|       |
 2378|       |          /* This is where we make sure that the conn pointer is reset.
 2379|       |             We do not have to do this in every case block above where a
 2380|       |             failure is detected */
 2381|      0|          Curl_detach_connection(data);
 2382|      0|          Curl_conn_terminate(data, conn, dead_connection);
 2383|      0|        }
 2384|      0|      }
 2385|  9.96k|      else if(data->mstate == MSTATE_CONNECT) {
  ------------------
  |  Branch (2385:15): [True: 1.32k, False: 8.63k]
  ------------------
 2386|       |        /* Curl_connect() failed */
 2387|  1.32k|        multi_posttransfer(data);
 2388|  1.32k|        Curl_pgrsUpdate_nometer(data);
 2389|  1.32k|      }
 2390|       |
 2391|  9.96k|      multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  200|  9.96k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2392|  9.96k|      return result;
 2393|  9.96k|    }
 2394|       |    /* if there is still a connection to use, call the progress function */
 2395|   379k|    else if(data->conn && Curl_conn_is_connected(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  303|   364k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2395:13): [True: 364k, False: 15.2k]
  |  Branch (2395:27): [True: 8.00k, False: 356k]
  ------------------
 2396|  8.00k|      result = Curl_pgrsUpdate(data);
 2397|  8.00k|      if(result) {
  ------------------
  |  Branch (2397:10): [True: 0, False: 8.00k]
  ------------------
 2398|       |        /* aborted due to progress callback return code must close the
 2399|       |           connection */
 2400|      0|        streamclose(data->conn, "Aborted by callback");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2401|       |
 2402|       |        /* if not yet in DONE state, go there, otherwise COMPLETED */
 2403|      0|        multistate(data, (data->mstate < MSTATE_DONE) ?
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (200:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2404|      0|                   MSTATE_DONE : MSTATE_COMPLETED);
 2405|      0|        return result;
 2406|      0|      }
 2407|  8.00k|    }
 2408|   389k|  }
 2409|   380k|  return result;
 2410|   390k|}
multi.c:handle_completed:
 2415|  10.3k|{
 2416|  10.3k|  if(data->master_mid != UINT32_MAX) {
  ------------------
  |  Branch (2416:6): [True: 489, False: 9.84k]
  ------------------
 2417|       |    /* A sub transfer, not for msgsent to application */
 2418|    489|    struct Curl_easy *mdata;
 2419|       |
 2420|    489|    CURL_TRC_M(data, "sub xfer done for master %u", data->master_mid);
  ------------------
  |  |  148|    489|  do {                                   \
  |  |  149|    489|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    489|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    489|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    978|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 489, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 489]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    978|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    489|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    489|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    489|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 489]
  |  |  ------------------
  ------------------
 2421|    489|    mdata = Curl_multi_get_easy(multi, data->master_mid);
 2422|    489|    if(mdata) {
  ------------------
  |  Branch (2422:8): [True: 489, False: 0]
  ------------------
 2423|    489|      if(mdata->sub_xfer_done)
  ------------------
  |  Branch (2423:10): [True: 489, False: 0]
  ------------------
 2424|    489|        mdata->sub_xfer_done(mdata, data, result);
 2425|      0|      else
 2426|      0|        CURL_TRC_M(data, "master easy %u without sub_xfer_done callback.",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2427|    489|                   data->master_mid);
 2428|    489|    }
 2429|      0|    else {
 2430|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2431|      0|    }
 2432|    489|  }
 2433|  9.84k|  else {
 2434|       |    /* now fill in the Curl_message with this info */
 2435|  9.84k|    struct Curl_message *msg = &data->msg;
 2436|       |
 2437|  9.84k|    msg->extmsg.msg = CURLMSG_DONE;
 2438|  9.84k|    msg->extmsg.easy_handle = data;
 2439|  9.84k|    msg->extmsg.data.result = result;
 2440|       |
 2441|  9.84k|    multi_addmsg(multi, msg);
 2442|  9.84k|    DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  9.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2442:5): [True: 0, False: 9.84k]
  |  Branch (2442:5): [True: 9.84k, False: 0]
  ------------------
 2443|  9.84k|  }
 2444|  10.3k|  multistate(data, MSTATE_MSGSENT);
  ------------------
  |  |  200|  10.3k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2445|       |
 2446|       |  /* remove from the other sets, add to msgsent */
 2447|  10.3k|  Curl_uint32_bset_remove(&multi->process, data->mid);
 2448|  10.3k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2449|  10.3k|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 2450|  10.3k|  Curl_uint32_bset_add(&multi->msgsent, data->mid);
 2451|  10.3k|  --multi->xfers_alive;
 2452|  10.3k|  if(!multi->xfers_alive)
  ------------------
  |  Branch (2452:6): [True: 9.84k, False: 489]
  ------------------
 2453|  9.84k|    multi_assess_wakeup(multi);
 2454|  10.3k|}
multi.c:multi_addmsg:
  221|  9.84k|{
  222|  9.84k|  if(!Curl_llist_count(&multi->msglist))
  ------------------
  |  Branch (222:6): [True: 9.84k, False: 0]
  ------------------
  223|  9.84k|    CURLM_NTFY(multi->admin, CURLMNOTIFY_INFO_READ);
  ------------------
  |  |   51|  9.84k|  do {                                                \
  |  |   52|  9.84k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 9.84k, False: 0]
  |  |  |  Branch (52:15): [True: 9.84k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 9.84k]
  |  |  ------------------
  |  |   53|  9.84k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  9.84k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 9.84k]
  |  |  ------------------
  ------------------
  224|  9.84k|  Curl_llist_append(&multi->msglist, msg, &msg->list);
  225|  9.84k|}
multi.c:multi_ischanged:
 1709|  1.31M|{
 1710|  1.31M|  bool retval = FALSE;
  ------------------
  |  | 1058|  1.31M|#define FALSE false
  ------------------
 1711|  1.31M|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|  1.31M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1711:3): [True: 0, False: 1.31M]
  |  Branch (1711:3): [True: 1.31M, False: 0]
  ------------------
 1712|  1.31M|  if(multi) {
  ------------------
  |  Branch (1712:6): [True: 1.31M, False: 0]
  ------------------
 1713|  1.31M|    retval = (bool)multi->recheckstate;
 1714|  1.31M|    if(clear)
  ------------------
  |  Branch (1714:8): [True: 602k, False: 716k]
  ------------------
 1715|   602k|      multi->recheckstate = FALSE;
  ------------------
  |  | 1058|   602k|#define FALSE false
  ------------------
 1716|  1.31M|  }
 1717|  1.31M|  return retval;
 1718|  1.31M|}
multi.c:add_next_timeout:
 3106|      6|{
 3107|      6|  struct curltime *tv = &d->state.expiretime;
 3108|      6|  struct Curl_llist *list = &d->state.timeoutlist;
 3109|      6|  struct Curl_llist_node *e;
 3110|       |
 3111|       |  /* move over the timeout list for this specific handle and remove all
 3112|       |     timeouts that are now passed tense and store the next pending
 3113|       |     timeout in *tv */
 3114|     12|  for(e = Curl_llist_head(list); e;) {
  ------------------
  |  Branch (3114:34): [True: 12, False: 0]
  ------------------
 3115|     12|    struct Curl_llist_node *n = Curl_node_next(e);
 3116|     12|    struct time_node *node = Curl_node_elem(e);
 3117|     12|    timediff_t diff = curlx_ptimediff_us(&node->time, pnow);
 3118|     12|    if(diff <= 0)
  ------------------
  |  Branch (3118:8): [True: 6, False: 6]
  ------------------
 3119|       |      /* remove outdated entry */
 3120|      6|      Curl_node_remove(e);
 3121|      6|    else
 3122|       |      /* the list is sorted so get out on the first mismatch */
 3123|      6|      break;
 3124|      6|    e = n;
 3125|      6|  }
 3126|      6|  e = Curl_llist_head(list);
 3127|      6|  if(!e) {
  ------------------
  |  Branch (3127:6): [True: 0, False: 6]
  ------------------
 3128|       |    /* clear the expire times within the handles that we remove from the
 3129|       |       splay tree */
 3130|      0|    tv->tv_sec = 0;
 3131|      0|    tv->tv_usec = 0;
 3132|      0|  }
 3133|      6|  else {
 3134|      6|    struct time_node *node = Curl_node_elem(e);
 3135|       |    /* copy the first entry to 'tv' */
 3136|      6|    memcpy(tv, &node->time, sizeof(*tv));
 3137|       |
 3138|       |    /* Insert this node again into the splay. Keep the timer in the list in
 3139|       |       case we need to recompute future timers. */
 3140|      6|    multi->timetree = Curl_splayinsert(tv, multi->timetree,
 3141|      6|                                       &d->state.timenode);
 3142|      6|  }
 3143|      6|  return CURLM_OK;
 3144|      6|}
multi.c:multi_handle_timeout:
 1803|   727k|{
 1804|   727k|  timediff_t timeout_ms;
 1805|       |
 1806|   727k|  timeout_ms = Curl_timeleft_ms(data);
 1807|   727k|  if(timeout_ms < 0) {
  ------------------
  |  Branch (1807:6): [True: 13, False: 727k]
  ------------------
 1808|       |    /* Handle timed out */
 1809|     13|    struct curltime since;
 1810|     13|    if(Curl_is_connecting(data))
  ------------------
  |  Branch (1810:8): [True: 13, False: 0]
  ------------------
 1811|     13|      since = data->progress.t_startsingle;
 1812|      0|    else
 1813|      0|      since = data->progress.t_startop;
 1814|     13|    if(data->mstate == MSTATE_CONNECTING)
  ------------------
  |  Branch (1814:8): [True: 10, False: 3]
  ------------------
 1815|     10|      failf(data, "%s timed out after %" FMT_TIMEDIFF_T " milliseconds",
  ------------------
  |  |   62|     10|#define failf Curl_failf
  ------------------
 1816|     10|            data->conn->bits.dns_resolved ? "Connection" : "Resolving",
  ------------------
  |  Branch (1816:13): [True: 5, False: 5]
  ------------------
 1817|     10|            curlx_ptimediff_ms(Curl_pgrs_now(data), &since));
 1818|      3|    else {
 1819|      3|      struct SingleRequest *k = &data->req;
 1820|      3|      if(k->size != -1) {
  ------------------
  |  Branch (1820:10): [True: 0, False: 3]
  ------------------
 1821|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1822|      0|              " milliseconds with %" FMT_OFF_T " out of %"
 1823|      0|              FMT_OFF_T " bytes received",
 1824|      0|              curlx_ptimediff_ms(Curl_pgrs_now(data), &since),
 1825|      0|              k->bytecount, k->size);
 1826|      0|      }
 1827|      3|      else {
 1828|      3|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
 1829|      3|              " milliseconds with %" FMT_OFF_T " bytes received",
 1830|      3|              curlx_ptimediff_ms(Curl_pgrs_now(data), &since),
 1831|      3|              k->bytecount);
 1832|      3|      }
 1833|      3|    }
 1834|     13|    *result = CURLE_OPERATION_TIMEDOUT;
 1835|     13|    if(data->conn) {
  ------------------
  |  Branch (1835:8): [True: 13, False: 0]
  ------------------
 1836|       |      /* Force connection closed if the connection has indeed been used */
 1837|     13|      if(data->mstate > MSTATE_DO) {
  ------------------
  |  Branch (1837:10): [True: 0, False: 13]
  ------------------
 1838|      0|        streamclose(data->conn, "Disconnect due to timeout");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 1839|      0|        *stream_error = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1840|      0|      }
 1841|     13|      (void)multi_done(data, *result, TRUE);
  ------------------
  |  | 1055|     13|#define TRUE true
  ------------------
 1842|     13|    }
 1843|     13|    return TRUE;
  ------------------
  |  | 1055|     13|#define TRUE true
  ------------------
 1844|     13|  }
 1845|       |
 1846|   727k|  return FALSE;
  ------------------
  |  | 1058|   727k|#define FALSE false
  ------------------
 1847|   727k|}
multi.c:move_pending_to_connect:
 3815|    203|{
 3816|    203|  DEBUGASSERT(data->mstate == MSTATE_PENDING);
  ------------------
  |  | 1081|    203|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3816:3): [True: 0, False: 203]
  |  Branch (3816:3): [True: 203, False: 0]
  ------------------
 3817|       |
 3818|       |  /* Remove this node from the pending set, add into process set */
 3819|    203|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 3820|    203|  Curl_uint32_bset_add(&multi->process, data->mid);
 3821|       |
 3822|    203|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  200|    203|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 3823|    203|  Curl_multi_mark_dirty(data); /* make it run */
 3824|    203|}
multi.c:multi_deltimeout:
 3623|   185k|{
 3624|   185k|  struct Curl_llist_node *e;
 3625|   185k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3626|       |  /* find and remove the specific node from the list */
 3627|   366k|  for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3627:41): [True: 352k, False: 13.5k]
  ------------------
 3628|   352k|    struct time_node *n = Curl_node_elem(e);
 3629|   352k|    if(n->eid == eid) {
  ------------------
  |  Branch (3629:8): [True: 172k, False: 180k]
  ------------------
 3630|   172k|      Curl_node_remove(e);
 3631|   172k|      return;
 3632|   172k|    }
 3633|   352k|  }
 3634|   185k|}
multi.c:multi_addtimeout:
 3646|   180k|{
 3647|   180k|  struct Curl_llist_node *e;
 3648|   180k|  struct time_node *node;
 3649|   180k|  struct Curl_llist_node *prev = NULL;
 3650|   180k|  size_t n;
 3651|   180k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3652|       |
 3653|   180k|  node = &data->state.expires[eid];
 3654|       |
 3655|       |  /* copy the timestamp and id */
 3656|   180k|  memcpy(&node->time, stamp, sizeof(*stamp));
 3657|   180k|  node->eid = eid; /* also marks it as in use */
 3658|       |
 3659|   180k|  n = Curl_llist_count(timeoutlist);
 3660|   180k|  if(n) {
  ------------------
  |  Branch (3660:6): [True: 172k, False: 7.49k]
  ------------------
 3661|       |    /* find the correct spot in the list */
 3662|   347k|    for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3662:43): [True: 180k, False: 166k]
  ------------------
 3663|   180k|      struct time_node *check = Curl_node_elem(e);
 3664|   180k|      timediff_t diff = curlx_ptimediff_ms(&check->time, &node->time);
 3665|   180k|      if(diff > 0)
  ------------------
  |  Branch (3665:10): [True: 5.88k, False: 174k]
  ------------------
 3666|  5.88k|        break;
 3667|   174k|      prev = e;
 3668|   174k|    }
 3669|   172k|  }
 3670|       |  /* else
 3671|       |     this is the first timeout on the list */
 3672|       |
 3673|   180k|  Curl_llist_insert_next(timeoutlist, prev, node, &node->list);
 3674|   180k|  CURL_TRC_TIMER(data, eid, "set for %" FMT_TIMEDIFF_T "ns",
  ------------------
  |  |  173|   180k|  do {                                        \
  |  |  174|   180k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|   180k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   180k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|   360k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 180k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 180k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|   360k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   180k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|   180k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|   180k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 180k]
  |  |  ------------------
  ------------------
 3675|   180k|                 curlx_ptimediff_us(&node->time, Curl_pgrs_now(data)));
 3676|   180k|  return CURLM_OK;
 3677|   180k|}
multi.c:process_pending_handles:
 3841|  39.5k|{
 3842|  39.5k|  uint32_t mid = multi->last_pending_mid;
 3843|       |
 3844|  39.5k|  if(mid) {
  ------------------
  |  Branch (3844:6): [True: 203, False: 39.3k]
  ------------------
 3845|    203|    while(Curl_uint32_bset_next(&multi->pending, mid, &mid)) {
  ------------------
  |  Branch (3845:11): [True: 0, False: 203]
  ------------------
 3846|      0|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3847|      0|      if(data) {
  ------------------
  |  Branch (3847:10): [True: 0, False: 0]
  ------------------
 3848|      0|        move_pending_to_connect(multi, data);
 3849|      0|        multi->last_pending_mid = mid;
 3850|      0|        return;
 3851|      0|      }
 3852|       |      /* transfer no longer known, should not happen */
 3853|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3854|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3854:7): [Folded, False: 0]
  |  Branch (3854:7): [Folded, False: 0]
  ------------------
 3855|      0|    }
 3856|       |    /* found no pending transfers with `mid` larger than `last_pending_mid`.
 3857|       |     * Start at the beginning of the pending set again. */
 3858|    203|    multi->last_pending_mid = 0;
 3859|    203|  }
 3860|       |
 3861|  39.5k|  if(Curl_uint32_bset_first(&multi->pending, &mid)) {
  ------------------
  |  Branch (3861:6): [True: 203, False: 39.3k]
  ------------------
 3862|    203|    do {
 3863|    203|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3864|    203|      if(data) {
  ------------------
  |  Branch (3864:10): [True: 203, False: 0]
  ------------------
 3865|    203|        move_pending_to_connect(multi, data);
 3866|    203|        multi->last_pending_mid = mid;
 3867|    203|        return;
 3868|    203|      }
 3869|       |      /* transfer no longer known, should not happen */
 3870|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3871|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3871:7): [Folded, False: 0]
  |  Branch (3871:7): [Folded, False: 0]
  ------------------
 3872|      0|    } while(Curl_uint32_bset_next(&multi->pending, mid, &mid));
  ------------------
  |  Branch (3872:13): [True: 0, False: 0]
  ------------------
 3873|    203|  }
 3874|  39.5k|}
multi.c:multi_xfer_bufs_free:
 4106|  10.0k|{
 4107|  10.0k|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4107:3): [True: 0, False: 10.0k]
  |  Branch (4107:3): [True: 10.0k, False: 0]
  ------------------
 4108|  10.0k|  curlx_safefree(multi->xfer_buf);
  ------------------
  |  | 1327|  10.0k|  do {                      \
  |  | 1328|  10.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  10.0k|    (ptr) = NULL;           \
  |  | 1330|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
 4109|  10.0k|  multi->xfer_buf_len = 0;
 4110|  10.0k|  multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1058|  10.0k|#define FALSE false
  ------------------
 4111|  10.0k|  curlx_safefree(multi->xfer_ulbuf);
  ------------------
  |  | 1327|  10.0k|  do {                      \
  |  | 1328|  10.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  10.0k|    (ptr) = NULL;           \
  |  | 1330|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
 4112|  10.0k|  multi->xfer_ulbuf_len = 0;
 4113|  10.0k|  multi->xfer_ulbuf_borrowed = FALSE;
  ------------------
  |  | 1058|  10.0k|#define FALSE false
  ------------------
 4114|  10.0k|  curlx_safefree(multi->xfer_sockbuf);
  ------------------
  |  | 1327|  10.0k|  do {                      \
  |  | 1328|  10.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  10.0k|    (ptr) = NULL;           \
  |  | 1330|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
 4115|  10.0k|  multi->xfer_sockbuf_len = 0;
 4116|       |  multi->xfer_sockbuf_borrowed = FALSE;
  ------------------
  |  | 1058|  10.0k|#define FALSE false
  ------------------
 4117|  10.0k|}

Curl_multi_ev_socket_done:
  617|  5.43k|{
  618|  5.43k|  mev_forget_socket(multi, data, s, "socket done");
  619|  5.43k|}
Curl_multi_ev_xfer_done:
  623|  10.7k|{
  624|  10.7k|  DEBUGASSERT(!data->conn); /* transfer should have been detached */
  ------------------
  |  | 1081|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (624:3): [True: 0, False: 10.7k]
  |  Branch (624:3): [True: 10.7k, False: 0]
  ------------------
  625|  10.7k|  (void)mev_assess(multi, data, NULL);
  626|  10.7k|  Curl_meta_remove(data, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  10.7k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  627|  10.7k|}
Curl_multi_ev_conn_done:
  632|  6.06k|{
  633|  6.06k|  (void)mev_assess(multi, data, conn);
  634|  6.06k|  Curl_conn_meta_remove(conn, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  6.06k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  635|  6.06k|}
Curl_multi_ev_init:
  638|  10.0k|{
  639|  10.0k|  Curl_hash_init(&multi->ev.sh_entries, hashsize, mev_sh_entry_hash,
  640|  10.0k|                 mev_sh_entry_compare, mev_sh_entry_dtor);
  641|  10.0k|}
Curl_multi_ev_cleanup:
  644|  10.0k|{
  645|  10.0k|  Curl_hash_destroy(&multi->ev.sh_entries);
  646|  10.0k|}
multi_ev.c:mev_assess:
  499|  16.8k|{
  500|  16.8k|  struct easy_pollset ps, *last_ps;
  501|  16.8k|  CURLMcode mresult = CURLM_OK;
  502|       |
  503|  16.8k|  if(!multi || !multi->socket_cb)
  ------------------
  |  Branch (503:6): [True: 0, False: 16.8k]
  |  Branch (503:16): [True: 16.8k, False: 0]
  ------------------
  504|  16.8k|    return CURLM_OK;
  505|       |
  506|      0|  Curl_pollset_init(&ps);
  507|      0|  if(conn) {
  ------------------
  |  Branch (507:6): [True: 0, False: 0]
  ------------------
  508|      0|    CURLcode result = Curl_conn_adjust_pollset(data, conn, &ps);
  509|      0|    if(result) {
  ------------------
  |  Branch (509:8): [True: 0, False: 0]
  ------------------
  510|      0|      mresult = (result == CURLE_OUT_OF_MEMORY) ?
  ------------------
  |  Branch (510:17): [True: 0, False: 0]
  ------------------
  511|      0|        CURLM_OUT_OF_MEMORY : CURLM_INTERNAL_ERROR;
  512|      0|      goto out;
  513|      0|    }
  514|      0|  }
  515|      0|  else
  516|      0|    Curl_multi_pollset(data, &ps);
  517|      0|  last_ps = mev_get_last_pollset(data, conn);
  518|       |
  519|      0|  if(!last_ps && ps.n) {
  ------------------
  |  Branch (519:6): [True: 0, False: 0]
  |  Branch (519:18): [True: 0, False: 0]
  ------------------
  520|      0|    if(conn)
  ------------------
  |  Branch (520:8): [True: 0, False: 0]
  ------------------
  521|      0|      last_ps = mev_add_new_conn_pollset(conn);
  522|      0|    else
  523|      0|      last_ps = mev_add_new_xfer_pollset(data);
  524|      0|    if(!last_ps) {
  ------------------
  |  Branch (524:8): [True: 0, False: 0]
  ------------------
  525|      0|      mresult = CURLM_OUT_OF_MEMORY;
  526|      0|      goto out;
  527|      0|    }
  528|      0|  }
  529|       |
  530|      0|  if(last_ps)
  ------------------
  |  Branch (530:6): [True: 0, False: 0]
  ------------------
  531|      0|    mresult = mev_pollset_diff(multi, data, conn, &ps, last_ps);
  532|      0|  else
  533|      0|    DEBUGASSERT(!ps.n);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (533:5): [True: 0, False: 0]
  |  Branch (533:5): [True: 0, False: 0]
  ------------------
  534|      0|out:
  535|      0|  Curl_pollset_cleanup(&ps);
  536|      0|  return mresult;
  537|      0|}
multi_ev.c:mev_sh_entry_get:
   94|  5.43k|{
   95|  5.43k|  if(s != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.43k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (95:6): [True: 5.43k, False: 0]
  ------------------
   96|       |    /* only look for proper sockets */
   97|  5.43k|    return Curl_hash_pick(sh, (char *)&s, sizeof(curl_socket_t));
   98|  5.43k|  }
   99|      0|  return NULL;
  100|  5.43k|}
multi_ev.c:mev_forget_socket:
  201|  5.43k|{
  202|  5.43k|  struct mev_sh_entry *entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
  203|  5.43k|  int rc = 0;
  204|       |
  205|  5.43k|  if(!entry) /* we never knew or already forgot about this socket */
  ------------------
  |  Branch (205:6): [True: 5.43k, False: 0]
  ------------------
  206|  5.43k|    return CURLM_OK;
  207|       |
  208|       |  /* We managed this socket before, tell the socket callback to forget it. */
  209|      0|  if(entry->announced && multi->socket_cb) {
  ------------------
  |  Branch (209:6): [True: 0, False: 0]
  |  Branch (209:26): [True: 0, False: 0]
  ------------------
  210|      0|    NOVERBOSE((void)cause);
  ------------------
  |  | 1619|      0|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1180|      0|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1180:35): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  211|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  212|      0|    mev_in_callback(multi, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  213|      0|    rc = multi->socket_cb(data, s, CURL_POLL_REMOVE,
  ------------------
  |  |  286|      0|#define CURL_POLL_REMOVE 4
  ------------------
  214|      0|                          multi->socket_userp, entry->user_data);
  215|      0|    mev_in_callback(multi, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  216|      0|    entry->announced = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  217|      0|  }
  218|       |
  219|      0|  mev_sh_entry_kill(multi, s);
  220|      0|  if(rc == -1) {
  ------------------
  |  Branch (220:6): [True: 0, False: 0]
  ------------------
  221|      0|    multi->dead = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  222|      0|    return CURLM_ABORTED_BY_CALLBACK;
  223|      0|  }
  224|      0|  return CURLM_OK;
  225|      0|}

Curl_mntfy_init:
  125|  10.0k|{
  126|  10.0k|  memset(&multi->ntfy, 0, sizeof(multi->ntfy));
  127|  10.0k|  Curl_uint32_bset_init(&multi->ntfy.enabled);
  128|  10.0k|}
Curl_mntfy_resize:
  131|  10.0k|{
  132|  10.0k|  if(Curl_uint32_bset_resize(&multi->ntfy.enabled, CURLMNOTIFY_EASY_DONE + 1))
  ------------------
  |  |  540|  10.0k|#define CURLMNOTIFY_EASY_DONE    1
  ------------------
  |  Branch (132:6): [True: 0, False: 10.0k]
  ------------------
  133|      0|    return CURLM_OUT_OF_MEMORY;
  134|  10.0k|  return CURLM_OK;
  135|  10.0k|}
Curl_mntfy_cleanup:
  138|  10.0k|{
  139|  10.0k|  while(multi->ntfy.head) {
  ------------------
  |  Branch (139:9): [True: 0, False: 10.0k]
  ------------------
  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|  10.0k|  Curl_uint32_bset_destroy(&multi->ntfy.enabled);
  146|  10.0k|}

Curl_netrc_scan:
  572|      5|{
  573|      5|  NETRCcode retcode = NETRC_OK;
  574|      5|  char *filealloc = NULL;
  575|       |
  576|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      5|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|     10|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|     10|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      5|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      5|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  577|      5|             netrcfile, hostname, user);
  578|      5|  Curl_creds_unlink(pcreds);
  579|      5|  if(!netrcfile) {
  ------------------
  |  Branch (579:6): [True: 0, False: 5]
  ------------------
  580|      0|    char *home = NULL;
  581|      0|    char *homea = NULL;
  582|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  583|      0|    char pwbuf[1024];
  584|      0|#endif
  585|      0|    filealloc = curl_getenv("NETRC");
  586|      0|    if(!filealloc) {
  ------------------
  |  Branch (586:8): [True: 0, False: 0]
  ------------------
  587|      0|      homea = curl_getenv("HOME"); /* portable environment reader */
  588|      0|      if(homea) {
  ------------------
  |  Branch (588:10): [True: 0, False: 0]
  ------------------
  589|      0|        home = homea;
  590|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  591|      0|      }
  592|      0|      else {
  593|      0|        struct passwd pw, *pw_res;
  594|      0|        if(!getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) &&
  ------------------
  |  Branch (594:12): [True: 0, False: 0]
  ------------------
  595|      0|           pw_res) {
  ------------------
  |  Branch (595:12): [True: 0, False: 0]
  ------------------
  596|      0|          home = pw.pw_dir;
  597|      0|        }
  598|       |#elif defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
  599|       |      }
  600|       |      else {
  601|       |        struct passwd *pw;
  602|       |        pw = getpwuid(geteuid());
  603|       |        if(pw) {
  604|       |          home = pw->pw_dir;
  605|       |        }
  606|       |#elif defined(_WIN32)
  607|       |      }
  608|       |      else {
  609|       |        homea = curl_getenv("USERPROFILE");
  610|       |        if(homea) {
  611|       |          home = homea;
  612|       |        }
  613|       |#endif
  614|      0|      }
  615|       |
  616|      0|      if(!home)
  ------------------
  |  Branch (616:10): [True: 0, False: 0]
  ------------------
  617|      0|        return NETRC_FILE_MISSING; /* no home directory found (or possibly out
  618|       |                                      of memory) */
  619|       |
  620|      0|      filealloc = curl_maprintf("%s%s.netrc", home, DIR_CHAR);
  ------------------
  |  |  679|      0|#  define DIR_CHAR      "/"
  ------------------
  621|      0|      if(!filealloc) {
  ------------------
  |  Branch (621:10): [True: 0, False: 0]
  ------------------
  622|      0|        curlx_free(homea);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  623|      0|        retcode = NETRC_OUT_OF_MEMORY;
  624|      0|        goto out;
  625|      0|      }
  626|      0|    }
  627|      0|    retcode = netrc_scan_file(
  628|      0|      data, store, hostname, user, filealloc, pcreds);
  629|      0|    curlx_free(filealloc);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  630|       |#ifdef _WIN32
  631|       |    if(retcode == NETRC_FILE_MISSING) {
  632|       |      /* fallback to the old-style "_netrc" file */
  633|       |      filealloc = curl_maprintf("%s%s_netrc", home, DIR_CHAR);
  634|       |      if(!filealloc) {
  635|       |        curlx_free(homea);
  636|       |        return NETRC_OUT_OF_MEMORY;
  637|       |      }
  638|       |      retcode = netrc_scan_file(
  639|       |        data, store, hostname, user, filealloc, pcreds);
  640|       |      curlx_free(filealloc);
  641|       |    }
  642|       |#endif
  643|      0|    curlx_free(homea);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  644|      0|  }
  645|      5|  else
  646|      5|    retcode = netrc_scan_file(
  647|      5|      data, store, hostname, user, netrcfile, pcreds);
  648|       |
  649|      5|out:
  650|      5|  if(retcode)
  ------------------
  |  Branch (650:6): [True: 5, False: 0]
  ------------------
  651|      5|    Curl_creds_unlink(pcreds);
  652|      5|  return retcode;
  653|      5|}
Curl_netrc_init:
  656|  22.4k|{
  657|  22.4k|  curlx_dyn_init(&store->filebuf, MAX_NETRC_FILE);
  ------------------
  |  |   77|  22.4k|#define MAX_NETRC_FILE  (128 * 1024)
  ------------------
  658|       |  store->loaded = FALSE;
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  659|  22.4k|}
Curl_netrc_cleanup:
  661|  28.5k|{
  662|  28.5k|  curlx_dyn_free(&store->filebuf);
  663|       |  store->loaded = FALSE;
  ------------------
  |  | 1058|  28.5k|#define FALSE false
  ------------------
  664|  28.5k|}
netrc.c:netrc_scan_file:
  545|      5|{
  546|      5|  struct dynbuf *filebuf = &store->filebuf;
  547|       |
  548|      5|  if(!store->loaded) {
  ------------------
  |  Branch (548:6): [True: 5, False: 0]
  ------------------
  549|      5|    NETRCcode ret = file2memory(netrcfile, filebuf);
  550|      5|    if(ret) {
  ------------------
  |  Branch (550:8): [True: 0, False: 5]
  ------------------
  551|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  552|      0|      return ret;
  553|      0|    }
  554|      5|    store->loaded = TRUE;
  ------------------
  |  | 1055|      5|#define TRUE true
  ------------------
  555|      5|  }
  556|       |
  557|      5|  return netrc_scan(data, curlx_dyn_ptr(filebuf), hostname, user, pcreds);
  558|      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|  if(file) {
  ------------------
  |  Branch (506:6): [True: 5, False: 0]
  ------------------
  507|      5|    curlx_struct_stat stat;
  ------------------
  |  |   63|      5|#define curlx_struct_stat       struct stat
  ------------------
  508|      5|    if((curlx_fstat(fileno(file), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|      5|#define curlx_fstat             fstat
  ------------------
  |  Branch (508:8): [True: 0, False: 5]
  |  Branch (508:52): [True: 5, False: 0]
  ------------------
  509|      5|      CURLcode result = CURLE_OK;
  510|      5|      bool eof;
  511|      5|      struct dynbuf linebuf;
  512|      5|      curlx_dyn_init(&linebuf, MAX_NETRC_LINE);
  ------------------
  |  |   76|      5|#define MAX_NETRC_LINE  16384
  ------------------
  513|      5|      ret = NETRC_OK;
  514|      5|      do {
  515|      5|        const char *line;
  516|       |        /* Curl_get_line always returns lines ending with a newline */
  517|      5|        result = Curl_get_line(&linebuf, file, &eof);
  518|      5|        if(!result) {
  ------------------
  |  Branch (518:12): [True: 5, False: 0]
  ------------------
  519|      5|          line = curlx_dyn_ptr(&linebuf);
  520|       |          /* skip comments on load */
  521|      5|          curlx_str_passblanks(&line);
  522|      5|          if(*line == '#')
  ------------------
  |  Branch (522:14): [True: 0, False: 5]
  ------------------
  523|      0|            continue;
  524|      5|          result = curlx_dyn_add(filebuf, line);
  525|      5|        }
  526|      5|        if(result) {
  ------------------
  |  Branch (526:12): [True: 0, False: 5]
  ------------------
  527|      0|          curlx_dyn_free(filebuf);
  528|      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))
  ------------------
  529|      0|          break;
  530|      0|        }
  531|      5|      } while(!eof);
  ------------------
  |  Branch (531:15): [True: 0, False: 5]
  ------------------
  532|      5|      curlx_dyn_free(&linebuf);
  533|      5|    }
  534|      5|    curlx_fclose(file);
  ------------------
  |  |   79|      5|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  535|      5|  }
  536|      5|  return ret;
  537|      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);
  ------------------
  |  | 1058|      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);
  ------------------
  |  | 1055|      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;
  ------------------
  |  | 1058|      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;
  ------------------
  |  | 1055|      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: 1, False: 4]
  ------------------
  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);
  ------------------
  |  | 1327|     15|  do {                      \
  |  | 1328|     15|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|     15|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|     15|    (ptr) = NULL;           \
  |  | 1330|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  334|     15|  curlx_safefree(sc->passwd);
  ------------------
  |  | 1327|     15|  do {                      \
  |  | 1328|     15|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|     15|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|     15|    (ptr) = NULL;           \
  |  | 1330|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  335|       |  sc->matches_host = FALSE;
  ------------------
  |  | 1058|     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;
  ------------------
  |  | 1058|      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))
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  while(*s && !ISBLANK(*s) && !ISNEWLINE(*s))
  ------------------
  |  |   50|      0|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 0, False: 0]
  |  |  |  Branch (50: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;
  ------------------
  |  | 1055|      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;
  ------------------
  |  | 1055|      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|}

cidr4_match:
   52|    487|{
   53|    487|  unsigned int address = 0;
   54|    487|  unsigned int check = 0;
   55|       |
   56|    487|  if(bits > 32)
  ------------------
  |  Branch (56:6): [True: 23, False: 464]
  ------------------
   57|       |    /* strange input */
   58|     23|    return FALSE;
  ------------------
  |  | 1058|     23|#define FALSE false
  ------------------
   59|       |
   60|    464|  if(curlx_inet_pton(AF_INET, ipv4, &address) != 1)
  ------------------
  |  |   43|    464|  inet_pton(x, y, z)
  ------------------
  |  Branch (60:6): [True: 0, False: 464]
  ------------------
   61|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
   62|    464|  if(curlx_inet_pton(AF_INET, network, &check) != 1)
  ------------------
  |  |   43|    464|  inet_pton(x, y, z)
  ------------------
  |  Branch (62:6): [True: 442, False: 22]
  ------------------
   63|    442|    return FALSE;
  ------------------
  |  | 1058|    442|#define FALSE false
  ------------------
   64|       |
   65|     22|  if(bits && (bits != 32)) {
  ------------------
  |  Branch (65:6): [True: 5, False: 17]
  |  Branch (65:14): [True: 3, False: 2]
  ------------------
   66|      3|    unsigned int mask = 0xffffffff << (32 - bits);
   67|      3|    unsigned int haddr = htonl(address);
   68|      3|    unsigned int hcheck = htonl(check);
   69|       |#if 0
   70|       |    curl_mfprintf(stderr, "Host %s (%x) network %s (%x) "
   71|       |                  "bits %u mask %x => %x\n",
   72|       |                  ipv4, haddr, network, hcheck, bits, mask,
   73|       |                  (haddr ^ hcheck) & mask);
   74|       |#endif
   75|      3|    if((haddr ^ hcheck) & mask)
  ------------------
  |  Branch (75:8): [True: 2, False: 1]
  ------------------
   76|      2|      return FALSE;
  ------------------
  |  | 1058|      2|#define FALSE false
  ------------------
   77|      1|    return TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
   78|      3|  }
   79|     19|  return address == check;
   80|     22|}
Curl_check_noproxy:
  190|  6.26k|{
  191|       |  /*
  192|       |   * If we do not have a hostname at all, like for example with a FILE
  193|       |   * transfer, we have nothing to interrogate the noproxy list with.
  194|       |   */
  195|  6.26k|  if(!name || name[0] == '\0')
  ------------------
  |  Branch (195:6): [True: 0, False: 6.26k]
  |  Branch (195:15): [True: 0, False: 6.26k]
  ------------------
  196|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  197|       |
  198|       |  /* no_proxy=domain1.dom,host.domain2.dom
  199|       |   *   (a comma-separated list of hosts which should
  200|       |   *   not be proxied, or an asterisk to override
  201|       |   *   all proxy variables)
  202|       |   */
  203|  6.26k|  if(no_proxy && no_proxy[0]) {
  ------------------
  |  Branch (203:6): [True: 145, False: 6.12k]
  |  Branch (203:18): [True: 140, False: 5]
  ------------------
  204|    140|    const char *p = no_proxy;
  205|    140|    size_t namelen;
  206|    140|    char address[16];
  207|    140|    enum nametype type = TYPE_HOST;
  208|    140|    if(!strcmp("*", no_proxy))
  ------------------
  |  Branch (208:8): [True: 1, False: 139]
  ------------------
  209|      1|      return TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  210|       |
  211|       |    /* NO_PROXY was specified and it was not only an asterisk */
  212|       |
  213|       |    /* Check if name is an IP address; if not, assume it being a hostname. */
  214|    139|    namelen = strlen(name);
  215|    139|    if(curlx_inet_pton(AF_INET, name, &address) == 1)
  ------------------
  |  |   43|    139|  inet_pton(x, y, z)
  ------------------
  |  Branch (215:8): [True: 52, False: 87]
  ------------------
  216|     52|      type = TYPE_IPV4;
  217|     87|#ifdef USE_IPV6
  218|     87|    else if(curlx_inet_pton(AF_INET6, name, &address) == 1)
  ------------------
  |  |   43|     87|  inet_pton(x, y, z)
  ------------------
  |  Branch (218:13): [True: 0, False: 87]
  ------------------
  219|      0|      type = TYPE_IPV6;
  220|     87|#endif
  221|     87|    else {
  222|       |      /* ignore trailing dots in the hostname */
  223|     87|      if(name[namelen - 1] == '.')
  ------------------
  |  Branch (223:10): [True: 54, False: 33]
  ------------------
  224|     54|        namelen--;
  225|     87|    }
  226|       |
  227|  2.07k|    while(*p) {
  ------------------
  |  Branch (227:11): [True: 2.05k, False: 20]
  ------------------
  228|  2.05k|      const char *token;
  229|  2.05k|      size_t tokenlen = 0;
  230|       |
  231|       |      /* pass blanks */
  232|  2.05k|      curlx_str_passblanks(&p);
  233|       |
  234|  2.05k|      token = p;
  235|       |      /* pass over the pattern */
  236|  35.2k|      while(*p && !ISBLANK(*p) && (*p != ',')) {
  ------------------
  |  |   45|  70.4k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 52, False: 35.1k]
  |  |  |  Branch (45:38): [True: 29, False: 35.0k]
  |  |  ------------------
  ------------------
  |  Branch (236:13): [True: 35.1k, False: 93]
  |  Branch (236:35): [True: 33.1k, False: 1.88k]
  ------------------
  237|  33.1k|        p++;
  238|  33.1k|        tokenlen++;
  239|  33.1k|      }
  240|       |
  241|  2.05k|      if(tokenlen) {
  ------------------
  |  Branch (241:10): [True: 2.00k, False: 52]
  ------------------
  242|  2.00k|        bool match = FALSE;
  ------------------
  |  | 1058|  2.00k|#define FALSE false
  ------------------
  243|  2.00k|        if(type == TYPE_HOST)
  ------------------
  |  Branch (243:12): [True: 1.24k, False: 761]
  ------------------
  244|  1.24k|          match = match_host(token, tokenlen, name, namelen);
  245|    761|        else
  246|    761|          match = match_ip(type, token, tokenlen, name);
  247|       |
  248|  2.00k|        if(match)
  ------------------
  |  Branch (248:12): [True: 2, False: 2.00k]
  ------------------
  249|      2|          return TRUE;
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
  250|  2.00k|      }
  251|       |
  252|       |      /* pass blanks after pattern */
  253|  2.05k|      curlx_str_passblanks(&p);
  254|       |      /* if not a comma, this ends the loop */
  255|  2.05k|      if(*p != ',')
  ------------------
  |  Branch (255:10): [True: 117, False: 1.93k]
  ------------------
  256|    117|        break;
  257|       |      /* pass any number of commas */
  258|  4.74k|      while(*p == ',')
  ------------------
  |  Branch (258:13): [True: 2.80k, False: 1.93k]
  ------------------
  259|  2.80k|        p++;
  260|  1.93k|    } /* while(*p) */
  261|    139|  } /* NO_PROXY was specified and it was not only an asterisk */
  262|       |
  263|  6.26k|  return FALSE;
  ------------------
  |  | 1058|  6.26k|#define FALSE false
  ------------------
  264|  6.26k|}
noproxy.c:match_host:
  127|  1.24k|{
  128|  1.24k|  bool match = FALSE;
  ------------------
  |  | 1058|  1.24k|#define FALSE false
  ------------------
  129|       |
  130|       |  /* ignore trailing dots in the token to check */
  131|  1.24k|  if(token[tokenlen - 1] == '.')
  ------------------
  |  Branch (131:6): [True: 198, False: 1.04k]
  ------------------
  132|    198|    tokenlen--;
  133|       |
  134|  1.24k|  if(tokenlen && (*token == '.')) {
  ------------------
  |  Branch (134:6): [True: 1.12k, False: 119]
  |  Branch (134:18): [True: 84, False: 1.04k]
  ------------------
  135|       |    /* ignore leading token dot as well */
  136|     84|    token++;
  137|     84|    tokenlen--;
  138|     84|  }
  139|       |  /* A: example.com matches 'example.com'
  140|       |     B: www.example.com matches 'example.com'
  141|       |     C: nonexample.com DOES NOT match 'example.com'
  142|       |  */
  143|  1.24k|  if(tokenlen == namelen)
  ------------------
  |  Branch (143:6): [True: 269, False: 976]
  ------------------
  144|       |    /* case A, exact match */
  145|    269|    match = curl_strnequal(token, name, namelen);
  146|    976|  else if(tokenlen < namelen) {
  ------------------
  |  Branch (146:11): [True: 632, False: 344]
  ------------------
  147|       |    /* case B, tailmatch domain */
  148|    632|    match = (name[namelen - tokenlen - 1] == '.') &&
  ------------------
  |  Branch (148:13): [True: 63, False: 569]
  ------------------
  149|     63|            curl_strnequal(token, name + (namelen - tokenlen), tokenlen);
  ------------------
  |  Branch (149:13): [True: 1, False: 62]
  ------------------
  150|    632|  }
  151|       |  /* case C passes through, not a match */
  152|  1.24k|  return match;
  153|  1.24k|}
noproxy.c:match_ip:
  157|    761|{
  158|    761|  char *slash;
  159|    761|  unsigned int bits = 0;
  160|    761|  char checkip[128];
  161|    761|  if(tokenlen >= sizeof(checkip))
  ------------------
  |  Branch (161:6): [True: 36, False: 725]
  ------------------
  162|       |    /* this cannot match */
  163|     36|    return FALSE;
  ------------------
  |  | 1058|     36|#define FALSE false
  ------------------
  164|       |  /* copy the check name to a temp buffer */
  165|    725|  memcpy(checkip, token, tokenlen);
  166|    725|  checkip[tokenlen] = 0;
  167|       |
  168|    725|  slash = strchr(checkip, '/');
  169|       |  /* if the slash is part of this token, use it */
  170|    725|  if(slash) {
  ------------------
  |  Branch (170:6): [True: 290, False: 435]
  ------------------
  171|    290|    curl_off_t value;
  172|    290|    const char *p = &slash[1];
  173|    290|    if(curlx_str_number(&p, &value, 128) || *p)
  ------------------
  |  Branch (173:8): [True: 205, False: 85]
  |  Branch (173:45): [True: 33, False: 52]
  ------------------
  174|    238|      return FALSE;
  ------------------
  |  | 1058|    238|#define FALSE false
  ------------------
  175|       |    /* a too large value is rejected in the cidr function below */
  176|     52|    bits = (unsigned int)value;
  177|     52|    *slash = 0; /* null-terminate there */
  178|     52|  }
  179|    487|  if(type == TYPE_IPV6)
  ------------------
  |  Branch (179:6): [True: 0, False: 487]
  ------------------
  180|      0|    return cidr6_match(name, checkip, bits);
  181|    487|  else
  182|    487|    return cidr4_match(name, checkip, bits);
  183|    487|}

Curl_getdate_capped:
  606|  9.61k|{
  607|  9.61k|  int rc = parsedate(p, tp);
  608|  9.61k|  return (rc == PARSEDATE_FAIL);
  ------------------
  |  |   97|  9.61k|#define PARSEDATE_FAIL   (-1)
  ------------------
  609|  9.61k|}
parsedate.c:parsedate:
  543|  9.61k|{
  544|  9.61k|  curl_off_t seconds = 0;
  545|  9.61k|  enum assume dignext = DATE_MDAY;
  546|  9.61k|  const char *indate = date; /* save the original pointer */
  547|  9.61k|  int part = 0; /* max 6 parts */
  548|  9.61k|  int rc = 0;
  549|  9.61k|  struct when w;
  550|  9.61k|  initwhen(&w);
  551|       |
  552|  28.8k|  while(*date && (part < 6)) {
  ------------------
  |  Branch (552:9): [True: 24.7k, False: 4.05k]
  |  Branch (552:18): [True: 24.7k, False: 0]
  ------------------
  553|  24.7k|    skip(&date);
  554|       |
  555|  24.7k|    if(ISALPHA(*date))
  ------------------
  |  |   38|  24.7k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  49.5k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 3.38k, False: 21.3k]
  |  |  |  |  |  Branch (43:38): [True: 3.38k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  21.3k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 4.92k, False: 16.4k]
  |  |  |  |  |  Branch (42:38): [True: 4.92k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  556|  8.31k|      rc = datestring(&date, &w);
  557|  16.4k|    else if(ISDIGIT(*date))
  ------------------
  |  |   44|  16.4k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 14.1k, False: 2.30k]
  |  |  |  Branch (44:38): [True: 14.1k, False: 0]
  |  |  ------------------
  ------------------
  558|  14.1k|      rc = datenum(indate, &date, &w, &dignext);
  559|  24.7k|    if(rc)
  ------------------
  |  Branch (559:8): [True: 5.55k, False: 19.2k]
  ------------------
  560|  5.55k|      return rc;
  561|       |
  562|  19.2k|    part++;
  563|  19.2k|  }
  564|       |
  565|  4.05k|  rc = datecheck(&w);
  566|  4.05k|  if(rc)
  ------------------
  |  Branch (566:6): [True: 3.82k, False: 232]
  ------------------
  567|  3.82k|    return rc;
  568|       |
  569|    232|  seconds = time2epoch(&w); /* get number of seconds */
  570|    232|  tzadjust(&seconds, &w); /* handle the time zone offset */
  571|    232|  rc = mktimet(seconds, output); /* squeeze seconds into a time_t */
  572|       |
  573|    232|  return rc;
  574|  4.05k|}
parsedate.c:initwhen:
  360|  9.61k|{
  361|  9.61k|  w->wday = w->mon = w->mday = w->hour = w->min = w->sec = w->year = w->tzoff =
  362|  9.61k|    -1;
  363|  9.61k|}
parsedate.c:skip:
  256|  24.7k|{
  257|       |  /* skip everything that are not letters or digits */
  258|  45.1k|  while(**date && !ISALNUM(**date))
  ------------------
  |  |   41|  42.8k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|  85.6k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 30.7k, False: 12.0k]
  |  |  |  |  |  Branch (44:38): [True: 14.1k, False: 16.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  71.4k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 4.05k, False: 24.6k]
  |  |  |  |  |  Branch (43:38): [True: 3.38k, False: 662]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  25.2k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 6.27k, False: 19.0k]
  |  |  |  |  |  Branch (42:38): [True: 4.92k, False: 1.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (258:9): [True: 42.8k, False: 2.30k]
  ------------------
  259|  20.3k|    (*date)++;
  260|  24.7k|}
parsedate.c:datestring:
  366|  8.31k|{
  367|       |  /* a name coming up */
  368|  8.31k|  size_t len = 0;
  369|  8.31k|  const char *p = *datep;
  370|  8.31k|  bool found = FALSE;
  ------------------
  |  | 1058|  8.31k|#define FALSE false
  ------------------
  371|  27.4k|  while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |   38|  54.9k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  54.9k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 11.9k, False: 15.5k]
  |  |  |  |  |  Branch (43:38): [True: 11.5k, False: 439]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  15.9k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 8.58k, False: 7.37k]
  |  |  |  |  |  Branch (42:38): [True: 7.69k, False: 886]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |  357|  19.2k|#define NAME_LEN 12
  ------------------
  |  Branch (371:24): [True: 19.1k, False: 56]
  ------------------
  372|  19.1k|    p++;
  373|  19.1k|    len++;
  374|  19.1k|  }
  375|       |
  376|  8.31k|  if(len != NAME_LEN) {
  ------------------
  |  |  357|  8.31k|#define NAME_LEN 12
  ------------------
  |  Branch (376:6): [True: 8.23k, False: 76]
  ------------------
  377|  8.23k|    if(w->wday == -1) {
  ------------------
  |  Branch (377:8): [True: 7.37k, False: 865]
  ------------------
  378|  7.37k|      w->wday = checkday(*datep, len);
  379|  7.37k|      if(w->wday != -1)
  ------------------
  |  Branch (379:10): [True: 684, False: 6.68k]
  ------------------
  380|    684|        found = TRUE;
  ------------------
  |  | 1055|    684|#define TRUE true
  ------------------
  381|  7.37k|    }
  382|  8.23k|    if(!found && (w->mon == -1)) {
  ------------------
  |  Branch (382:8): [True: 7.55k, False: 684]
  |  Branch (382:18): [True: 6.44k, False: 1.10k]
  ------------------
  383|  6.44k|      w->mon = checkmonth(*datep, len);
  384|  6.44k|      if(w->mon != -1)
  ------------------
  |  Branch (384:10): [True: 1.35k, False: 5.09k]
  ------------------
  385|  1.35k|        found = TRUE;
  ------------------
  |  | 1055|  1.35k|#define TRUE true
  ------------------
  386|  6.44k|    }
  387|       |
  388|  8.23k|    if(!found && (w->tzoff == -1)) {
  ------------------
  |  Branch (388:8): [True: 6.20k, False: 2.03k]
  |  Branch (388:18): [True: 5.06k, False: 1.13k]
  ------------------
  389|       |      /* this must be a time zone string */
  390|  5.06k|      w->tzoff = checktz(*datep, len);
  391|  5.06k|      if(w->tzoff != -1)
  ------------------
  |  Branch (391:10): [True: 2.51k, False: 2.55k]
  ------------------
  392|  2.51k|        found = TRUE;
  ------------------
  |  | 1055|  2.51k|#define TRUE true
  ------------------
  393|  5.06k|    }
  394|  8.23k|  }
  395|  8.31k|  if(!found)
  ------------------
  |  Branch (395:6): [True: 3.76k, False: 4.55k]
  ------------------
  396|  3.76k|    return PARSEDATE_FAIL; /* bad string */
  ------------------
  |  |   97|  3.76k|#define PARSEDATE_FAIL   (-1)
  ------------------
  397|       |
  398|  4.55k|  *datep += len;
  399|  4.55k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  4.55k|#define PARSEDATE_OK     0
  ------------------
  400|  8.31k|}
parsedate.c:checkday:
  199|  7.37k|{
  200|  7.37k|  int i;
  201|  7.37k|  const char * const *what;
  202|  7.37k|  if(len > 3)
  ------------------
  |  Branch (202:6): [True: 861, False: 6.51k]
  ------------------
  203|    861|    what = &weekday[0];
  204|  6.51k|  else if(len == 3)
  ------------------
  |  Branch (204:11): [True: 2.34k, False: 4.16k]
  ------------------
  205|  2.34k|    what = &Curl_wkday[0];
  206|  4.16k|  else
  207|  4.16k|    return -1; /* too short */
  208|  23.7k|  for(i = 0; i < 7; i++) {
  ------------------
  |  Branch (208:14): [True: 21.1k, False: 2.52k]
  ------------------
  209|  21.1k|    size_t ilen = strlen(what[0]);
  210|  21.1k|    if((ilen == len) &&
  ------------------
  |  Branch (210:8): [True: 15.7k, False: 5.46k]
  ------------------
  211|  15.7k|       curl_strnequal(check, what[0], len))
  ------------------
  |  Branch (211:8): [True: 684, False: 15.0k]
  ------------------
  212|    684|      return i;
  213|  20.5k|    what++;
  214|  20.5k|  }
  215|  2.52k|  return -1;
  216|  3.20k|}
parsedate.c:checkmonth:
  219|  6.44k|{
  220|  6.44k|  int i;
  221|  6.44k|  const char * const *what = &Curl_month[0];
  222|  6.44k|  if(len != 3)
  ------------------
  |  Branch (222:6): [True: 4.61k, False: 1.83k]
  ------------------
  223|  4.61k|    return -1; /* not a month */
  224|       |
  225|  13.7k|  for(i = 0; i < 12; i++) {
  ------------------
  |  Branch (225:14): [True: 13.2k, False: 480]
  ------------------
  226|  13.2k|    if(curl_strnequal(check, what[0], 3))
  ------------------
  |  Branch (226:8): [True: 1.35k, False: 11.9k]
  ------------------
  227|  1.35k|      return i;
  228|  11.9k|    what++;
  229|  11.9k|  }
  230|    480|  return -1; /* return the offset or -1, no real offset is -1 */
  231|  1.83k|}
parsedate.c:checktz:
  243|  5.06k|{
  244|  5.06k|  if(len <= 4) {
  ------------------
  |  Branch (244:6): [True: 4.63k, False: 432]
  ------------------
  245|  4.63k|    const struct tzinfo *what;
  246|  4.63k|    struct tzinfo find;
  247|  4.63k|    curlx_strcopy(find.name, sizeof(find.name), check, len);
  248|  4.63k|    what = bsearch(&find, tz, CURL_ARRAYSIZE(tz), sizeof(tz[0]), tzcompare);
  ------------------
  |  | 1294|  4.63k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  249|  4.63k|    if(what)
  ------------------
  |  Branch (249:8): [True: 2.51k, False: 2.11k]
  ------------------
  250|  2.51k|      return what->offset * 60;
  251|  4.63k|  }
  252|  2.55k|  return -1;
  253|  5.06k|}
parsedate.c:tzcompare:
  234|  26.7k|{
  235|  26.7k|  const struct tzinfo *tz1 = m1;
  236|  26.7k|  const struct tzinfo *tz2 = m2;
  237|  26.7k|  return strcmp(tz1->name, tz2->name);
  238|  26.7k|}
parsedate.c:datenum:
  404|  14.1k|{
  405|       |  /* a digit */
  406|  14.1k|  unsigned int val;
  407|  14.1k|  char *end;
  408|  14.1k|  const char *date = *datep;
  409|  14.1k|  enum assume dignext = *dignextp;
  410|       |
  411|  14.1k|  if((w->sec == -1) && match_time(date, w, &end)) {
  ------------------
  |  Branch (411:6): [True: 12.6k, False: 1.53k]
  |  Branch (411:24): [True: 2.20k, False: 10.3k]
  ------------------
  412|       |    /* time stamp */
  413|  2.20k|    date = end;
  414|  2.20k|  }
  415|  11.9k|  else {
  416|  11.9k|    bool found = FALSE;
  ------------------
  |  | 1058|  11.9k|#define FALSE false
  ------------------
  417|  11.9k|    curl_off_t lval;
  418|  11.9k|    int num_digits = 0;
  419|  11.9k|    const char *p = *datep;
  420|  11.9k|    if(curlx_str_number(&p, &lval, 99999999))
  ------------------
  |  Branch (420:8): [True: 71, False: 11.8k]
  ------------------
  421|     71|      return PARSEDATE_FAIL;
  ------------------
  |  |   97|     71|#define PARSEDATE_FAIL   (-1)
  ------------------
  422|       |
  423|       |    /* we know num_digits cannot be larger than 8 */
  424|  11.8k|    num_digits = (int)(p - *datep);
  425|  11.8k|    val = (unsigned int)lval;
  426|       |
  427|  11.8k|    if((w->tzoff == -1) &&
  ------------------
  |  Branch (427:8): [True: 10.6k, False: 1.22k]
  ------------------
  428|  10.6k|       (num_digits == 4) &&
  ------------------
  |  Branch (428:8): [True: 1.42k, False: 9.21k]
  ------------------
  429|  1.42k|       (val <= 1400) &&
  ------------------
  |  Branch (429:8): [True: 1.03k, False: 396]
  ------------------
  430|  1.03k|       (indate < date) &&
  ------------------
  |  Branch (430:8): [True: 905, False: 125]
  ------------------
  431|    905|       (date[-1] == '+' || date[-1] == '-')) {
  ------------------
  |  Branch (431:9): [True: 311, False: 594]
  |  Branch (431:28): [True: 218, False: 376]
  ------------------
  432|       |      /* four digits and a value less than or equal to 1400 (to take into
  433|       |         account all sorts of funny time zone diffs) and it is preceded
  434|       |         with a plus or minus. This is a time zone indication. 1400 is
  435|       |         picked since +1300 is frequently used and +1400 is mentioned as
  436|       |         an edge number in the document "ISO C 200X Proposal: Timezone
  437|       |         Functions" at http://david.tribble.com/text/c0xtimezone.html If
  438|       |         anyone has a more authoritative source for the exact maximum time
  439|       |         zone offsets, please speak up! */
  440|    529|      found = TRUE;
  ------------------
  |  | 1055|    529|#define TRUE true
  ------------------
  441|    529|      w->tzoff = ((val / 100 * 60) + (val % 100)) * 60;
  442|       |
  443|       |      /* the + and - prefix indicates the local time compared to GMT,
  444|       |         this we need their reversed math to get what we want */
  445|    529|      w->tzoff = date[-1] == '+' ? -w->tzoff : w->tzoff;
  ------------------
  |  Branch (445:18): [True: 311, False: 218]
  ------------------
  446|    529|    }
  447|       |
  448|  11.3k|    else if((num_digits == 8) && (w->year == -1) &&
  ------------------
  |  Branch (448:13): [True: 757, False: 10.5k]
  |  Branch (448:34): [True: 657, False: 100]
  ------------------
  449|    657|            (w->mon == -1) && (w->mday == -1)) {
  ------------------
  |  Branch (449:13): [True: 577, False: 80]
  |  Branch (449:31): [True: 433, False: 144]
  ------------------
  450|       |      /* 8 digits, no year, month or day yet. This is YYYYMMDD */
  451|    433|      found = TRUE;
  ------------------
  |  | 1055|    433|#define TRUE true
  ------------------
  452|    433|      w->year = val / 10000;
  453|    433|      w->mon = ((val % 10000) / 100) - 1; /* month is 0 - 11 */
  454|    433|      w->mday = val % 100;
  455|    433|    }
  456|       |
  457|  11.8k|    if(!found && (dignext == DATE_MDAY) && (w->mday == -1)) {
  ------------------
  |  Branch (457:8): [True: 10.9k, False: 962]
  |  Branch (457:18): [True: 7.47k, False: 3.42k]
  |  Branch (457:44): [True: 7.38k, False: 95]
  ------------------
  458|  7.38k|      if((val > 0) && (val < 32)) {
  ------------------
  |  Branch (458:10): [True: 6.51k, False: 867]
  |  Branch (458:23): [True: 4.53k, False: 1.98k]
  ------------------
  459|  4.53k|        w->mday = val;
  460|  4.53k|        found = TRUE;
  ------------------
  |  | 1055|  4.53k|#define TRUE true
  ------------------
  461|  4.53k|      }
  462|  7.38k|      dignext = DATE_YEAR;
  463|  7.38k|    }
  464|       |
  465|  11.8k|    if(!found && (dignext == DATE_YEAR) && (w->year == -1)) {
  ------------------
  |  Branch (465:8): [True: 6.36k, False: 5.49k]
  |  Branch (465:18): [True: 6.27k, False: 95]
  |  Branch (465:44): [True: 4.64k, False: 1.62k]
  ------------------
  466|  4.64k|      w->year = val;
  467|  4.64k|      found = TRUE;
  ------------------
  |  | 1055|  4.64k|#define TRUE true
  ------------------
  468|  4.64k|      if(w->year < 100) {
  ------------------
  |  Branch (468:10): [True: 3.11k, False: 1.52k]
  ------------------
  469|  3.11k|        if(w->year > 70)
  ------------------
  |  Branch (469:12): [True: 379, False: 2.73k]
  ------------------
  470|    379|          w->year += 1900;
  471|  2.73k|        else
  472|  2.73k|          w->year += 2000;
  473|  3.11k|      }
  474|  4.64k|      if(w->mday == -1)
  ------------------
  |  Branch (474:10): [True: 2.25k, False: 2.39k]
  ------------------
  475|  2.25k|        dignext = DATE_MDAY;
  476|  4.64k|    }
  477|       |
  478|  11.8k|    if(!found)
  ------------------
  |  Branch (478:8): [True: 1.72k, False: 10.1k]
  ------------------
  479|  1.72k|      return PARSEDATE_FAIL;
  ------------------
  |  |   97|  1.72k|#define PARSEDATE_FAIL   (-1)
  ------------------
  480|       |
  481|  10.1k|    date = p;
  482|  10.1k|  }
  483|  12.3k|  *datep = date;
  484|  12.3k|  *dignextp = dignext;
  485|  12.3k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  12.3k|#define PARSEDATE_OK     0
  ------------------
  486|  14.1k|}
parsedate.c:match_time:
  316|  12.6k|{
  317|  12.6k|  const char *p;
  318|  12.6k|  int hh, mm, ss = 0;
  319|  12.6k|  hh = oneortwodigit(date, &p);
  320|  12.6k|  if((hh < 24) && (*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   44|  4.31k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 3.95k, False: 359]
  |  |  |  Branch (44:38): [True: 3.18k, False: 770]
  |  |  ------------------
  ------------------
  |  Branch (320:6): [True: 9.94k, False: 2.65k]
  |  Branch (320:19): [True: 4.31k, False: 5.63k]
  ------------------
  321|  3.18k|    mm = oneortwodigit(&p[1], &p);
  322|  3.18k|    if(mm < 60) {
  ------------------
  |  Branch (322:8): [True: 2.57k, False: 604]
  ------------------
  323|  2.57k|      if((*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   44|  1.36k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 1.14k, False: 224]
  |  |  |  Branch (44:38): [True: 1.04k, False: 96]
  |  |  ------------------
  ------------------
  |  Branch (323:10): [True: 1.36k, False: 1.21k]
  ------------------
  324|  1.04k|        ss = oneortwodigit(&p[1], &p);
  325|  1.04k|        if(ss <= 60) {
  ------------------
  |  Branch (325:12): [True: 677, False: 370]
  ------------------
  326|       |          /* valid HH:MM:SS */
  327|    677|          goto match;
  328|    677|        }
  329|  1.04k|      }
  330|  1.53k|      else {
  331|       |        /* valid HH:MM */
  332|  1.53k|        goto match;
  333|  1.53k|      }
  334|  2.57k|    }
  335|  3.18k|  }
  336|  10.3k|  return FALSE; /* not a time string */
  ------------------
  |  | 1058|  10.3k|#define FALSE false
  ------------------
  337|  2.20k|match:
  338|  2.20k|  w->hour = hh;
  339|  2.20k|  w->min = mm;
  340|  2.20k|  w->sec = ss;
  341|  2.20k|  *endp = (char *)CURL_UNCONST(p);
  ------------------
  |  |  866|  2.20k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  342|       |  return TRUE;
  ------------------
  |  | 1055|  2.20k|#define TRUE true
  ------------------
  343|  12.6k|}
parsedate.c:oneortwodigit:
  304|  16.8k|{
  305|  16.8k|  int num = date[0] - '0';
  306|  16.8k|  if(ISDIGIT(date[1])) {
  ------------------
  |  |   44|  16.8k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 13.7k, False: 3.07k]
  |  |  |  Branch (44:38): [True: 6.34k, False: 7.41k]
  |  |  ------------------
  ------------------
  307|  6.34k|    *endp = &date[2];
  308|  6.34k|    return (num * 10) + (date[1] - '0');
  309|  6.34k|  }
  310|  10.4k|  *endp = &date[1];
  311|  10.4k|  return num;
  312|  16.8k|}
parsedate.c:datecheck:
  489|  4.05k|{
  490|  4.05k|  if(w->sec == -1)
  ------------------
  |  Branch (490:6): [True: 2.74k, False: 1.31k]
  ------------------
  491|  2.74k|    w->sec = w->min = w->hour = 0; /* no time, make it zero */
  492|       |
  493|  4.05k|  if((w->mday == -1) || (w->mon == -1) || (w->year == -1))
  ------------------
  |  Branch (493:6): [True: 1.51k, False: 2.54k]
  |  Branch (493:25): [True: 1.55k, False: 987]
  |  Branch (493:43): [True: 313, False: 674]
  ------------------
  494|       |    /* lacks vital info, fail */
  495|  3.38k|    return PARSEDATE_FAIL;
  ------------------
  |  |   97|  3.38k|#define PARSEDATE_FAIL   (-1)
  ------------------
  496|       |
  497|       |  /* The Gregorian calendar was introduced 1582 */
  498|    674|  else if(w->year < 1583)
  ------------------
  |  Branch (498:11): [True: 231, False: 443]
  ------------------
  499|    231|    return PARSEDATE_FAIL;
  ------------------
  |  |   97|    231|#define PARSEDATE_FAIL   (-1)
  ------------------
  500|       |
  501|    443|  else if((w->mday > 31) || (w->mon > 11) || (w->hour > 23) ||
  ------------------
  |  Branch (501:11): [True: 134, False: 309]
  |  Branch (501:29): [True: 77, False: 232]
  |  Branch (501:46): [True: 0, False: 232]
  ------------------
  502|    232|          (w->min > 59) || (w->sec > 60))
  ------------------
  |  Branch (502:11): [True: 0, False: 232]
  |  Branch (502:28): [True: 0, False: 232]
  ------------------
  503|    211|    return PARSEDATE_FAIL; /* clearly an illegal date */
  ------------------
  |  |   97|    211|#define PARSEDATE_FAIL   (-1)
  ------------------
  504|       |
  505|    232|  return PARSEDATE_OK;
  ------------------
  |  |   96|    232|#define PARSEDATE_OK     0
  ------------------
  506|  4.05k|}
parsedate.c:time2epoch:
  288|    232|{
  289|    232|  static const int cumulative_days[12] = {
  290|    232|    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
  291|    232|  };
  292|    232|  int y = w->year - (w->mon <= 1);
  293|    232|  int leap_days = (y / 4) - (y / 100) + (y / 400) - LEAP_DAYS_BEFORE_1969;
  ------------------
  |  |  281|    232|#define LEAP_DAYS_BEFORE_1969 477
  ------------------
  294|    232|  curl_off_t days = (curl_off_t)(w->year - 1970) * 365 + leap_days +
  295|    232|    cumulative_days[w->mon] + w->mday - 1;
  296|       |
  297|    232|  return (((days * 24 + w->hour) * 60 + w->min) * 60) + w->sec;
  298|    232|}
parsedate.c:tzadjust:
  509|    232|{
  510|    232|  if(w->tzoff == -1) /* unknown tz means no offset */
  ------------------
  |  Branch (510:6): [True: 189, False: 43]
  ------------------
  511|    189|    w->tzoff = 0;
  512|       |
  513|       |  /* Add the time zone diff between local time zone and GMT. */
  514|    232|  if((w->tzoff > 0) && (*tp > (curl_off_t)(CURL_OFF_T_MAX - w->tzoff)))
  ------------------
  |  |  594|     18|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (514:6): [True: 18, False: 214]
  |  Branch (514:24): [True: 0, False: 18]
  ------------------
  515|      0|    *tp = CURL_OFF_T_MAX;
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  516|    232|  else
  517|    232|    *tp += w->tzoff;
  518|       |  /* this needs no minimum check since we require a year > 1582 */
  519|    232|}
parsedate.c:mktimet:
  522|    232|{
  523|       |#if SIZEOF_TIME_T < 5
  524|       |  if(seconds > TIME_T_MAX) {
  525|       |    *output = TIME_T_MAX;
  526|       |    return PARSEDATE_LATER;
  527|       |  }
  528|       |  else if(seconds < TIME_T_MIN) {
  529|       |    *output = TIME_T_MIN;
  530|       |    return PARSEDATE_SOONER;
  531|       |  }
  532|       |#elif defined(HAVE_TIME_T_UNSIGNED)
  533|       |  if(seconds < 0) {
  534|       |    *output = 0;
  535|       |    return PARSEDATE_SOONER;
  536|       |  }
  537|       |#endif
  538|    232|  *output = (time_t)seconds;
  539|    232|  return PARSEDATE_OK;
  ------------------
  |  |   96|    232|#define PARSEDATE_OK     0
  ------------------
  540|    232|}

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

Curl_pp_state_timeleft_ms:
   44|  6.93k|{
   45|  6.93k|  timediff_t xfer_remain_ms;
   46|  6.93k|  timediff_t remain_ms = data->set.server_response_timeout ?
  ------------------
  |  Branch (46:26): [True: 6.93k, False: 0]
  ------------------
   47|  6.93k|    data->set.server_response_timeout : PINGPONG_TIMEOUT_MS;
  ------------------
  |  |   75|      0|#define PINGPONG_TIMEOUT_MS      (60 * 1000)
  ------------------
   48|       |
   49|       |  /* If the overall transfer has less time remaining than pingpong
   50|       |   * has otherwise for the state, return that. */
   51|  6.93k|  remain_ms -= curlx_ptimediff_ms(Curl_pgrs_now(data), &pp->response);
   52|       |  /* transfer remaining time is 0, when it has no timeout. */
   53|  6.93k|  xfer_remain_ms = Curl_timeleft_ms(data);
   54|  6.93k|  if(xfer_remain_ms)
  ------------------
  |  Branch (54:6): [True: 6.93k, False: 3]
  ------------------
   55|  6.93k|    return CURLMIN(remain_ms, xfer_remain_ms);
  ------------------
  |  | 1287|  6.93k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 486, False: 6.44k]
  |  |  ------------------
  ------------------
   56|      3|  return remain_ms;
   57|  6.93k|}
Curl_pp_statemach:
   65|  6.93k|{
   66|  6.93k|  struct connectdata *conn = data->conn;
   67|  6.93k|  curl_socket_t sock = conn->sock[FIRSTSOCKET];
  ------------------
  |  |  303|  6.93k|#define FIRSTSOCKET     0
  ------------------
   68|  6.93k|  int rc;
   69|  6.93k|  timediff_t interval_ms;
   70|  6.93k|  timediff_t timeout_ms = Curl_pp_state_timeleft_ms(data, pp);
   71|  6.93k|  CURLcode result = CURLE_OK;
   72|       |
   73|  6.93k|  if(timeout_ms <= 0) {
  ------------------
  |  Branch (73:6): [True: 0, False: 6.93k]
  ------------------
   74|      0|    failf(data, "server response timeout");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
   75|      0|    return CURLE_OPERATION_TIMEDOUT; /* already too little time */
   76|      0|  }
   77|       |
   78|  6.93k|  if(block) {
  ------------------
  |  Branch (78:6): [True: 486, False: 6.45k]
  ------------------
   79|    486|    interval_ms = 1000;  /* use 1 second timeout intervals */
   80|    486|    if(timeout_ms < interval_ms)
  ------------------
  |  Branch (80:8): [True: 3, False: 483]
  ------------------
   81|      3|      interval_ms = timeout_ms;
   82|    486|  }
   83|  6.45k|  else
   84|  6.45k|    interval_ms = 0; /* immediate */
   85|       |
   86|  6.93k|  if(Curl_conn_data_pending(data, FIRSTSOCKET))
  ------------------
  |  |  303|  6.93k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (86:6): [True: 0, False: 6.93k]
  ------------------
   87|      0|    rc = 1;
   88|  6.93k|  else if(pp->overflow)
  ------------------
  |  Branch (88:11): [True: 529, False: 6.40k]
  ------------------
   89|       |    /* We are receiving and there is data in the cache so read it */
   90|    529|    rc = 1;
   91|  6.40k|  else if(!pp->sendleft && Curl_conn_data_pending(data, FIRSTSOCKET))
  ------------------
  |  |  303|  6.40k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (91:11): [True: 6.40k, False: 0]
  |  Branch (91:28): [True: 0, False: 6.40k]
  ------------------
   92|       |    /* We are receiving and there is data ready in the SSL library */
   93|      0|    rc = 1;
   94|  6.40k|  else {
   95|  6.40k|    rc = Curl_socket_check(pp->sendleft ? CURL_SOCKET_BAD : sock, /* reading */
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (95:28): [True: 0, False: 6.40k]
  ------------------
   96|  6.40k|                           CURL_SOCKET_BAD,
  ------------------
  |  |  145|  6.40k|#define CURL_SOCKET_BAD (-1)
  ------------------
   97|  6.40k|                           pp->sendleft ? sock : CURL_SOCKET_BAD, /* writing */
  ------------------
  |  |  145|  6.40k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (97:28): [True: 0, False: 6.40k]
  ------------------
   98|  6.40k|                           interval_ms);
   99|  6.40k|  }
  100|       |
  101|  6.93k|  if(block) {
  ------------------
  |  Branch (101:6): [True: 486, False: 6.45k]
  ------------------
  102|       |    /* if we did not wait, we do not have to spend time on this now */
  103|    486|    result = Curl_pgrsCheck(data);
  104|    486|    if(result)
  ------------------
  |  Branch (104:8): [True: 0, False: 486]
  ------------------
  105|      0|      return result;
  106|    486|  }
  107|       |
  108|  6.93k|  if(rc == -1) {
  ------------------
  |  Branch (108:6): [True: 0, False: 6.93k]
  ------------------
  109|      0|    failf(data, "select/poll error");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  110|      0|    result = CURLE_OUT_OF_MEMORY;
  111|      0|  }
  112|  6.93k|  else if(rc)
  ------------------
  |  Branch (112:11): [True: 6.75k, False: 185]
  ------------------
  113|  6.75k|    result = pp->statemachine(data, data->conn);
  114|    185|  else if(disconnecting)
  ------------------
  |  Branch (114:11): [True: 11, False: 174]
  ------------------
  115|     11|    return CURLE_OPERATION_TIMEDOUT;
  116|       |
  117|  6.92k|  return result;
  118|  6.93k|}
Curl_pp_init:
  122|  1.36k|{
  123|  1.36k|  DEBUGASSERT(!pp->initialized);
  ------------------
  |  | 1081|  1.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (123:3): [True: 0, False: 1.36k]
  |  Branch (123:3): [True: 1.36k, False: 0]
  ------------------
  124|  1.36k|  pp->nread_resp = 0;
  125|  1.36k|  pp->response = *pnow; /* start response time-out */
  126|  1.36k|  pp->pending_resp = TRUE;
  ------------------
  |  | 1055|  1.36k|#define TRUE true
  ------------------
  127|  1.36k|  curlx_dyn_init(&pp->sendbuf, DYN_PINGPPONG_CMD);
  ------------------
  |  |   76|  1.36k|#define DYN_PINGPPONG_CMD   (64 * 1024)
  ------------------
  128|  1.36k|  curlx_dyn_init(&pp->recvbuf, DYN_PINGPPONG_CMD);
  ------------------
  |  |   76|  1.36k|#define DYN_PINGPPONG_CMD   (64 * 1024)
  ------------------
  129|       |  pp->initialized = TRUE;
  ------------------
  |  | 1055|  1.36k|#define TRUE true
  ------------------
  130|  1.36k|}
Curl_pp_vsendf:
  146|  2.24k|{
  147|  2.24k|  size_t bytes_written = 0;
  148|  2.24k|  size_t write_len;
  149|  2.24k|  char *s;
  150|  2.24k|  CURLcode result;
  151|  2.24k|  struct connectdata *conn = data->conn;
  152|       |
  153|  2.24k|  DEBUGASSERT(pp->sendleft == 0);
  ------------------
  |  | 1081|  2.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (153:3): [True: 0, False: 2.24k]
  |  Branch (153:3): [True: 2.24k, False: 0]
  ------------------
  154|  2.24k|  DEBUGASSERT(pp->sendsize == 0);
  ------------------
  |  | 1081|  2.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (154:3): [True: 0, False: 2.24k]
  |  Branch (154:3): [True: 2.24k, False: 0]
  ------------------
  155|  2.24k|  DEBUGASSERT(pp->sendthis == NULL);
  ------------------
  |  | 1081|  2.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (155:3): [True: 0, False: 2.24k]
  |  Branch (155:3): [True: 2.24k, False: 0]
  ------------------
  156|       |
  157|  2.24k|  if(!conn)
  ------------------
  |  Branch (157:6): [True: 0, False: 2.24k]
  ------------------
  158|       |    /* cannot send without a connection! */
  159|      0|    return CURLE_SEND_ERROR;
  160|       |
  161|  2.24k|  curlx_dyn_reset(&pp->sendbuf);
  162|  2.24k|  result = curlx_dyn_vaddf(&pp->sendbuf, fmt, args);
  163|  2.24k|  if(result)
  ------------------
  |  Branch (163:6): [True: 4, False: 2.23k]
  ------------------
  164|      4|    return result;
  165|       |
  166|       |  /* append CRLF */
  167|  2.23k|  result = curlx_dyn_addn(&pp->sendbuf, "\r\n", 2);
  168|  2.23k|  if(result)
  ------------------
  |  Branch (168:6): [True: 0, False: 2.23k]
  ------------------
  169|      0|    return result;
  170|       |
  171|  2.23k|  pp->pending_resp = TRUE;
  ------------------
  |  | 1055|  2.23k|#define TRUE true
  ------------------
  172|  2.23k|  write_len = curlx_dyn_len(&pp->sendbuf);
  173|  2.23k|  s = curlx_dyn_ptr(&pp->sendbuf);
  174|       |
  175|  2.23k|  result = Curl_conn_send(data, FIRSTSOCKET, s, write_len, FALSE,
  ------------------
  |  |  303|  2.23k|#define FIRSTSOCKET     0
  ------------------
                result = Curl_conn_send(data, FIRSTSOCKET, s, write_len, FALSE,
  ------------------
  |  | 1058|  2.23k|#define FALSE false
  ------------------
  176|  2.23k|                          &bytes_written);
  177|  2.23k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (177:6): [True: 0, False: 2.23k]
  ------------------
  178|      0|    bytes_written = 0;
  179|      0|  }
  180|  2.23k|  else if(result)
  ------------------
  |  Branch (180:11): [True: 0, False: 2.23k]
  ------------------
  181|      0|    return result;
  182|       |
  183|  2.23k|  Curl_debug(data, CURLINFO_HEADER_OUT, s, bytes_written);
  184|       |
  185|  2.23k|  if(bytes_written != write_len) {
  ------------------
  |  Branch (185:6): [True: 0, False: 2.23k]
  ------------------
  186|       |    /* the whole chunk was not sent, keep it around and adjust sizes */
  187|      0|    pp->sendthis = s;
  188|      0|    pp->sendsize = write_len;
  189|      0|    pp->sendleft = write_len - bytes_written;
  190|      0|  }
  191|  2.23k|  else {
  192|  2.23k|    pp->sendthis = NULL;
  193|  2.23k|    pp->sendleft = pp->sendsize = 0;
  194|  2.23k|    pp->response = *Curl_pgrs_now(data);
  195|  2.23k|  }
  196|       |
  197|  2.23k|  return CURLE_OK;
  198|  2.23k|}
Curl_pp_sendf:
  212|  2.24k|{
  213|  2.24k|  CURLcode result;
  214|  2.24k|  va_list ap;
  215|  2.24k|  va_start(ap, fmt);
  216|       |
  217|  2.24k|  result = Curl_pp_vsendf(data, pp, fmt, ap);
  218|       |
  219|  2.24k|  va_end(ap);
  220|       |
  221|  2.24k|  return result;
  222|  2.24k|}
Curl_pp_readresp:
  243|  1.60M|{
  244|  1.60M|  struct connectdata *conn = data->conn;
  245|  1.60M|  CURLcode result = CURLE_OK;
  246|  1.60M|  size_t gotbytes;
  247|  1.60M|  char buffer[900];
  248|       |
  249|  1.60M|  *code = 0; /* 0 for errors or not done */
  250|  1.60M|  *size = 0;
  251|       |
  252|  1.61M|  do {
  253|  1.61M|    gotbytes = 0;
  254|  1.61M|    if(pp->nfinal) {
  ------------------
  |  Branch (254:8): [True: 1.60M, False: 6.92k]
  ------------------
  255|       |      /* a previous call left this many bytes in the beginning of the buffer as
  256|       |         that was the final line; now ditch that */
  257|  1.60M|      size_t full = curlx_dyn_len(&pp->recvbuf);
  258|       |
  259|       |      /* trim off the "final" leading part */
  260|  1.60M|      curlx_dyn_tail(&pp->recvbuf, full - pp->nfinal);
  261|       |
  262|  1.60M|      pp->nfinal = 0; /* now gone */
  263|  1.60M|    }
  264|  1.61M|    if(!pp->overflow) {
  ------------------
  |  Branch (264:8): [True: 8.89k, False: 1.60M]
  ------------------
  265|  8.89k|      result = pingpong_read(data, sockindex, buffer, sizeof(buffer),
  266|  8.89k|                             &gotbytes);
  267|  8.89k|      if(result == CURLE_AGAIN)
  ------------------
  |  Branch (267:10): [True: 0, False: 8.89k]
  ------------------
  268|      0|        return CURLE_OK;
  269|       |
  270|  8.89k|      if(result)
  ------------------
  |  Branch (270:10): [True: 0, False: 8.89k]
  ------------------
  271|      0|        return result;
  272|       |
  273|  8.89k|      if(!gotbytes) {
  ------------------
  |  Branch (273:10): [True: 1.17k, False: 7.72k]
  ------------------
  274|  1.17k|        failf(data, "response reading failed (errno: %d)", SOCKERRNO);
  ------------------
  |  |   62|  1.17k|#define failf Curl_failf
  ------------------
                      failf(data, "response reading failed (errno: %d)", SOCKERRNO);
  ------------------
  |  | 1095|  1.17k|#define SOCKERRNO         errno
  ------------------
  275|  1.17k|        return CURLE_RECV_ERROR;
  276|  1.17k|      }
  277|       |
  278|  7.72k|      result = curlx_dyn_addn(&pp->recvbuf, buffer, gotbytes);
  279|  7.72k|      if(result)
  ------------------
  |  Branch (279:10): [True: 7, False: 7.71k]
  ------------------
  280|      7|        return result;
  281|       |
  282|  7.71k|      data->req.headerbytecount += (unsigned int)gotbytes;
  283|       |
  284|  7.71k|      pp->nread_resp += gotbytes;
  285|  7.71k|    }
  286|       |
  287|  1.99M|    do {
  288|  1.99M|      const char *line = curlx_dyn_ptr(&pp->recvbuf);
  289|  1.99M|      const char *nl = memchr(line, '\n', curlx_dyn_len(&pp->recvbuf));
  290|  1.99M|      if(nl) {
  ------------------
  |  Branch (290:10): [True: 1.99M, False: 5.31k]
  ------------------
  291|       |        /* a newline is CRLF in pp-talk, so the CR is ignored as
  292|       |           the line is not really terminated until the LF comes */
  293|  1.99M|        size_t length = nl - line + 1;
  294|       |
  295|       |        /* output debug output if that is requested */
  296|  1.99M|        Curl_debug(data, CURLINFO_HEADER_IN, line, length);
  297|       |
  298|       |        /*
  299|       |         * Pass all response-lines to the callback function registered for
  300|       |         * "headers". The response lines can be seen as a kind of headers.
  301|       |         */
  302|  1.99M|        result = Curl_client_write(data, CLIENTWRITE_INFO, line, length);
  ------------------
  |  |   43|  1.99M|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  303|  1.99M|        if(result)
  ------------------
  |  Branch (303:12): [True: 0, False: 1.99M]
  ------------------
  304|      0|          return result;
  305|       |
  306|  1.99M|        if(pp->endofresp(data, conn, line, length, code)) {
  ------------------
  |  Branch (306:12): [True: 1.60M, False: 386k]
  ------------------
  307|       |          /* When at "end of response", keep the endofresp line first in the
  308|       |             buffer since it will be accessed outside (by pingpong
  309|       |             parsers). Store the overflow counter to inform about additional
  310|       |             data in this buffer after the endofresp line. */
  311|  1.60M|          pp->nfinal = length;
  312|  1.60M|          if(curlx_dyn_len(&pp->recvbuf) > length)
  ------------------
  |  Branch (312:14): [True: 1.60M, False: 2.00k]
  ------------------
  313|  1.60M|            pp->overflow = curlx_dyn_len(&pp->recvbuf) - length;
  314|  2.00k|          else
  315|  2.00k|            pp->overflow = 0;
  316|  1.60M|          *size = pp->nread_resp; /* size of the response */
  317|  1.60M|          pp->nread_resp = 0; /* restart */
  318|  1.60M|          gotbytes = 0; /* force break out of outer loop */
  319|  1.60M|          break;
  320|  1.60M|        }
  321|   386k|        if(curlx_dyn_len(&pp->recvbuf) > length)
  ------------------
  |  Branch (321:12): [True: 386k, False: 473]
  ------------------
  322|       |          /* keep the remaining piece */
  323|   386k|          curlx_dyn_tail((&pp->recvbuf), curlx_dyn_len(&pp->recvbuf) - length);
  324|    473|        else
  325|    473|          curlx_dyn_reset(&pp->recvbuf);
  326|   386k|      }
  327|  5.31k|      else {
  328|       |        /* without a newline, there is no overflow */
  329|  5.31k|        pp->overflow = 0;
  330|  5.31k|        break;
  331|  5.31k|      }
  332|       |
  333|  1.99M|    } while(1); /* while there is buffer left to scan */
  ------------------
  |  Branch (333:13): [True: 386k, Folded]
  ------------------
  334|       |
  335|  1.60M|  } while(gotbytes == sizeof(buffer));
  ------------------
  |  Branch (335:11): [True: 2.67k, False: 1.60M]
  ------------------
  336|       |
  337|  1.60M|  pp->pending_resp = FALSE;
  ------------------
  |  | 1058|  1.60M|#define FALSE false
  ------------------
  338|       |
  339|  1.60M|  return result;
  340|  1.60M|}
Curl_pp_pollset:
  345|  4.08k|{
  346|  4.08k|  int flags = pp->sendleft ? CURL_POLL_OUT : CURL_POLL_IN;
  ------------------
  |  |  284|      0|#define CURL_POLL_OUT    2
  ------------------
                int flags = pp->sendleft ? CURL_POLL_OUT : CURL_POLL_IN;
  ------------------
  |  |  283|  4.08k|#define CURL_POLL_IN     1
  ------------------
  |  Branch (346:15): [True: 0, False: 4.08k]
  ------------------
  347|  4.08k|  return Curl_pollset_change(data, ps, data->conn->sock[FIRSTSOCKET],
  ------------------
  |  |  303|  4.08k|#define FIRSTSOCKET     0
  ------------------
  348|  4.08k|                             flags, 0);
  349|  4.08k|}
Curl_pp_needs_flush:
  353|    450|{
  354|    450|  (void)data;
  355|    450|  return pp->sendleft > 0;
  356|    450|}
Curl_pp_disconnect:
  391|  11.4k|{
  392|  11.4k|  if(pp->initialized) {
  ------------------
  |  Branch (392:6): [True: 1.36k, False: 10.0k]
  ------------------
  393|  1.36k|    curlx_dyn_free(&pp->sendbuf);
  394|  1.36k|    curlx_dyn_free(&pp->recvbuf);
  395|  1.36k|    memset(pp, 0, sizeof(*pp));
  396|  1.36k|  }
  397|  11.4k|  return CURLE_OK;
  398|  11.4k|}
Curl_pp_moredata:
  401|  1.60M|{
  402|  1.60M|  return !pp->sendleft && curlx_dyn_len(&pp->recvbuf) > pp->nfinal;
  ------------------
  |  Branch (402:10): [True: 1.60M, False: 0]
  |  Branch (402:27): [True: 1.60M, False: 1.89k]
  ------------------
  403|  1.60M|}
pingpong.c:pingpong_read:
  229|  8.89k|{
  230|  8.89k|  return Curl_conn_recv(data, sockindex, buffer, buflen, nread);
  231|  8.89k|}

pop3.c:pop3_setup_connection:
 1678|  5.71k|{
 1679|  5.71k|  struct pop3_conn *pop3c;
 1680|  5.71k|  struct POP3 *pop3 = curlx_calloc(1, sizeof(*pop3));
  ------------------
  |  | 1480|  5.71k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1681|  5.71k|  if(!pop3 ||
  ------------------
  |  Branch (1681:6): [True: 0, False: 5.71k]
  ------------------
 1682|  5.71k|     Curl_meta_set(data, CURL_META_POP3_EASY, pop3, pop3_easy_dtor))
  ------------------
  |  |   90|  5.71k|#define CURL_META_POP3_EASY   "meta:proto:pop3:easy"
  ------------------
  |  Branch (1682:6): [True: 0, False: 5.71k]
  ------------------
 1683|      0|    return CURLE_OUT_OF_MEMORY;
 1684|       |
 1685|  5.71k|  pop3c = curlx_calloc(1, sizeof(*pop3c));
  ------------------
  |  | 1480|  5.71k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1686|  5.71k|  if(!pop3c ||
  ------------------
  |  Branch (1686:6): [True: 0, False: 5.71k]
  ------------------
 1687|  5.71k|     Curl_conn_meta_set(conn, CURL_META_POP3_CONN, pop3c, pop3_conn_dtor))
  ------------------
  |  |   92|  5.71k|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  |  Branch (1687:6): [True: 0, False: 5.71k]
  ------------------
 1688|      0|    return CURLE_OUT_OF_MEMORY;
 1689|       |
 1690|  5.71k|  return CURLE_OK;
 1691|  5.71k|}
pop3.c:pop3_easy_dtor:
 1654|  5.71k|{
 1655|  5.71k|  struct POP3 *pop3 = entry;
 1656|  5.71k|  (void)key;
 1657|  5.71k|  (void)klen;
 1658|  5.71k|  DEBUGASSERT(pop3);
  ------------------
  |  | 1081|  5.71k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1658:3): [True: 0, False: 5.71k]
  |  Branch (1658:3): [True: 5.71k, False: 0]
  ------------------
 1659|       |  /* Cleanup our per-request based variables */
 1660|  5.71k|  curlx_safefree(pop3->id);
  ------------------
  |  | 1327|  5.71k|  do {                      \
  |  | 1328|  5.71k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  5.71k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  5.71k|    (ptr) = NULL;           \
  |  | 1330|  5.71k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
 1661|  5.71k|  curlx_safefree(pop3->custom);
  ------------------
  |  | 1327|  5.71k|  do {                      \
  |  | 1328|  5.71k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  5.71k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  5.71k|    (ptr) = NULL;           \
  |  | 1330|  5.71k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
 1662|  5.71k|  curlx_free(pop3);
  ------------------
  |  | 1483|  5.71k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1663|  5.71k|}
pop3.c:pop3_conn_dtor:
 1666|  5.71k|{
 1667|  5.71k|  struct pop3_conn *pop3c = entry;
 1668|  5.71k|  (void)key;
 1669|  5.71k|  (void)klen;
 1670|  5.71k|  DEBUGASSERT(pop3c);
  ------------------
  |  | 1081|  5.71k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1670:3): [True: 0, False: 5.71k]
  |  Branch (1670:3): [True: 5.71k, False: 0]
  ------------------
 1671|  5.71k|  Curl_pp_disconnect(&pop3c->pp);
 1672|  5.71k|  curlx_safefree(pop3c->apoptimestamp);
  ------------------
  |  | 1327|  5.71k|  do {                      \
  |  | 1328|  5.71k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  5.71k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  5.71k|    (ptr) = NULL;           \
  |  | 1330|  5.71k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
 1673|  5.71k|  curlx_free(pop3c);
  ------------------
  |  | 1483|  5.71k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1674|  5.71k|}
pop3.c:pop3_do:
 1583|    513|{
 1584|    513|  CURLcode result = CURLE_OK;
 1585|    513|  *done = FALSE; /* default to false */
  ------------------
  |  | 1058|    513|#define FALSE false
  ------------------
 1586|       |
 1587|       |  /* Parse the URL path */
 1588|    513|  result = pop3_parse_url_path(data);
 1589|    513|  if(result)
  ------------------
  |  Branch (1589:6): [True: 1, False: 512]
  ------------------
 1590|      1|    return result;
 1591|       |
 1592|       |  /* Parse the custom request */
 1593|    512|  result = pop3_parse_custom_request(data);
 1594|    512|  if(result)
  ------------------
  |  Branch (1594:6): [True: 1, False: 511]
  ------------------
 1595|      1|    return result;
 1596|       |
 1597|    511|  result = pop3_regular_transfer(data, done);
 1598|       |
 1599|    511|  return result;
 1600|    512|}
pop3.c:pop3_parse_url_path:
  233|    513|{
  234|       |  /* The POP3 struct is already initialized in pop3_connect() */
  235|    513|  struct POP3 *pop3 = Curl_meta_get(data, CURL_META_POP3_EASY);
  ------------------
  |  |   90|    513|#define CURL_META_POP3_EASY   "meta:proto:pop3:easy"
  ------------------
  236|    513|  const char *path = &data->state.up.path[1]; /* skip leading path */
  237|       |
  238|    513|  if(!pop3)
  ------------------
  |  Branch (238:6): [True: 0, False: 513]
  ------------------
  239|      0|    return CURLE_FAILED_INIT;
  240|       |  /* URL decode the path for the message ID */
  241|    513|  return Curl_urldecode(path, 0, &pop3->id, NULL, REJECT_CTRL);
  242|    513|}
pop3.c:pop3_parse_custom_request:
  251|    512|{
  252|    512|  CURLcode result = CURLE_OK;
  253|    512|  struct POP3 *pop3 = Curl_meta_get(data, CURL_META_POP3_EASY);
  ------------------
  |  |   90|    512|#define CURL_META_POP3_EASY   "meta:proto:pop3:easy"
  ------------------
  254|    512|  const char *custom = data->set.str[STRING_CUSTOMREQUEST];
  255|       |
  256|    512|  if(!pop3)
  ------------------
  |  Branch (256:6): [True: 0, False: 512]
  ------------------
  257|      0|    return CURLE_FAILED_INIT;
  258|       |  /* URL decode the custom request */
  259|    512|  if(custom)
  ------------------
  |  Branch (259:6): [True: 6, False: 506]
  ------------------
  260|      6|    result = Curl_urldecode(custom, 0, &pop3->custom, NULL, REJECT_CTRL);
  261|       |
  262|    512|  return result;
  263|    512|}
pop3.c:pop3_regular_transfer:
 1553|    511|{
 1554|    511|  CURLcode result = CURLE_OK;
 1555|    511|  bool connected = FALSE;
  ------------------
  |  | 1058|    511|#define FALSE false
  ------------------
 1556|       |
 1557|       |  /* Make sure size is unknown at this point */
 1558|    511|  data->req.size = -1;
 1559|       |
 1560|       |  /* Set the progress data */
 1561|    511|  Curl_pgrsReset(data);
 1562|       |
 1563|       |  /* Carry out the perform */
 1564|    511|  result = pop3_perform(data, &connected, dophase_done);
 1565|       |
 1566|       |  /* Perform post DO phase operations if necessary */
 1567|    511|  if(!result && *dophase_done)
  ------------------
  |  Branch (1567:6): [True: 480, False: 31]
  |  Branch (1567:17): [True: 384, False: 96]
  ------------------
 1568|    384|    result = pop3_dophase_done(data, connected);
 1569|       |
 1570|    511|  return result;
 1571|    511|}
pop3.c:pop3_perform:
 1502|    511|{
 1503|       |  /* This is POP3 and no proxy */
 1504|    511|  CURLcode result = CURLE_OK;
 1505|    511|  struct POP3 *pop3 = Curl_meta_get(data, CURL_META_POP3_EASY);
  ------------------
  |  |   90|    511|#define CURL_META_POP3_EASY   "meta:proto:pop3:easy"
  ------------------
 1506|       |
 1507|    511|  if(!pop3)
  ------------------
  |  Branch (1507:6): [True: 0, False: 511]
  ------------------
 1508|      0|    return CURLE_FAILED_INIT;
 1509|       |
 1510|    511|  DEBUGF(infof(data, "DO phase starts"));
  ------------------
  |  | 1067|  3.57k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 511, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 511]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 511]
  |  |  ------------------
  ------------------
 1511|       |
 1512|       |  /* Start the first command in the DO phase, may alter data->req.no_body */
 1513|    511|  result = pop3_perform_command(data);
 1514|    511|  if(result)
  ------------------
  |  Branch (1514:6): [True: 0, False: 511]
  ------------------
 1515|      0|    return result;
 1516|       |
 1517|    511|  if(data->req.no_body)
  ------------------
  |  Branch (1517:6): [True: 1, False: 510]
  ------------------
 1518|       |    /* Requested no body means no transfer */
 1519|      1|    pop3->transfer = PPTRANSFER_INFO;
 1520|       |
 1521|    511|  *dophase_done = FALSE; /* not done yet */
  ------------------
  |  | 1058|    511|#define FALSE false
  ------------------
 1522|       |
 1523|       |  /* Run the state-machine */
 1524|    511|  result = pop3_multi_statemach(data, dophase_done);
 1525|    511|  *connected = Curl_conn_is_connected(data->conn, FIRSTSOCKET);
  ------------------
  |  |  303|    511|#define FIRSTSOCKET     0
  ------------------
 1526|       |
 1527|    511|  if(*dophase_done)
  ------------------
  |  Branch (1527:6): [True: 404, False: 107]
  ------------------
 1528|    404|    DEBUGF(infof(data, "DO phase is complete"));
  ------------------
  |  | 1067|  3.33k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 404, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 404]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 404]
  |  |  ------------------
  ------------------
 1529|       |
 1530|    511|  return result;
 1531|    511|}
pop3.c:pop3_perform_command:
  728|    511|{
  729|    511|  CURLcode result = CURLE_OK;
  730|    511|  struct connectdata *conn = data->conn;
  731|    511|  struct POP3 *pop3 = Curl_meta_get(data, CURL_META_POP3_EASY);
  ------------------
  |  |   90|    511|#define CURL_META_POP3_EASY   "meta:proto:pop3:easy"
  ------------------
  732|    511|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    511|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  733|    511|  const char *command = NULL;
  734|       |
  735|    511|  if(!pop3 || !pop3c)
  ------------------
  |  Branch (735:6): [True: 0, False: 511]
  |  Branch (735:15): [True: 0, False: 511]
  ------------------
  736|      0|    return CURLE_FAILED_INIT;
  737|       |
  738|       |  /* Calculate the default command */
  739|    511|  if(pop3->id[0] == '\0' || data->set.list_only) {
  ------------------
  |  Branch (739:6): [True: 487, False: 24]
  |  Branch (739:29): [True: 0, False: 24]
  ------------------
  740|    487|    command = "LIST";
  741|       |
  742|    487|    if(pop3->id[0] != '\0')
  ------------------
  |  Branch (742:8): [True: 0, False: 487]
  ------------------
  743|       |      /* Message specific LIST so skip the BODY transfer */
  744|      0|      pop3->transfer = PPTRANSFER_INFO;
  745|    487|  }
  746|     24|  else
  747|     24|    command = "RETR";
  748|       |
  749|    511|  if(pop3->custom && pop3->custom[0] != '\0')
  ------------------
  |  Branch (749:6): [True: 5, False: 506]
  |  Branch (749:22): [True: 4, False: 1]
  ------------------
  750|      4|    command = pop3->custom;
  751|       |
  752|       |  /* Send the command */
  753|    511|  if(pop3->id[0] != '\0')
  ------------------
  |  Branch (753:6): [True: 24, False: 487]
  ------------------
  754|     24|    result = Curl_pp_sendf(data, &pop3c->pp, "%s %s", command, pop3->id);
  755|    487|  else
  756|    487|    result = Curl_pp_sendf(data, &pop3c->pp, "%s", command);
  757|       |
  758|    511|  if(!result) {
  ------------------
  |  Branch (758:6): [True: 511, False: 0]
  ------------------
  759|    511|    pop3_state(data, POP3_COMMAND);
  760|    511|    data->req.no_body = !pop3_is_multiline(command);
  761|    511|  }
  762|       |
  763|    511|  return result;
  764|    511|}
pop3.c:pop3_state:
  387|  4.37k|{
  388|  4.37k|  struct pop3_conn *pop3c =
  389|  4.37k|    Curl_conn_meta_get(data->conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  4.37k|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  390|  4.37k|  if(pop3c) {
  ------------------
  |  Branch (390:6): [True: 4.37k, False: 0]
  ------------------
  391|  4.37k|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  392|       |    /* for debug purposes */
  393|  4.37k|    static const char * const names[] = {
  394|  4.37k|      "STOP",
  395|  4.37k|      "SERVERGREET",
  396|  4.37k|      "CAPA",
  397|  4.37k|      "STARTTLS",
  398|  4.37k|      "UPGRADETLS",
  399|  4.37k|      "AUTH",
  400|  4.37k|      "APOP",
  401|  4.37k|      "USER",
  402|  4.37k|      "PASS",
  403|  4.37k|      "COMMAND",
  404|  4.37k|      "QUIT",
  405|       |      /* LAST */
  406|  4.37k|    };
  407|       |
  408|  4.37k|    if(pop3c->state != newstate)
  ------------------
  |  Branch (408:8): [True: 4.37k, False: 0]
  ------------------
  409|  4.37k|      infof(data, "POP3 %p state change from %s to %s",
  ------------------
  |  |  143|  4.37k|  do {                               \
  |  |  144|  4.37k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  4.37k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 4.37k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.37k]
  |  |  |  |  ------------------
  |  |  |  |  320|  4.37k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  4.37k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  4.37k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 4.37k]
  |  |  ------------------
  ------------------
  410|  4.37k|            (void *)pop3c, names[pop3c->state], names[newstate]);
  411|  4.37k|#endif
  412|       |
  413|  4.37k|    pop3c->state = newstate;
  414|  4.37k|  }
  415|  4.37k|}
pop3.c:pop3_is_multiline:
  269|    511|{
  270|    511|  size_t i;
  271|  2.72k|  for(i = 0; i < CURL_ARRAYSIZE(pop3cmds); ++i) {
  ------------------
  |  | 1294|  2.72k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (271:14): [True: 2.71k, False: 2]
  ------------------
  272|  2.71k|    if(curl_strnequal(pop3cmds[i].name, cmdline, pop3cmds[i].nlen)) {
  ------------------
  |  Branch (272:8): [True: 510, False: 2.20k]
  ------------------
  273|    510|      if(!cmdline[pop3cmds[i].nlen])
  ------------------
  |  Branch (273:10): [True: 508, False: 2]
  ------------------
  274|    508|        return (bool)pop3cmds[i].multiline;
  275|      2|      else if(cmdline[pop3cmds[i].nlen] == ' ')
  ------------------
  |  Branch (275:15): [True: 1, False: 1]
  ------------------
  276|      1|        return (bool)pop3cmds[i].multiline_with_args;
  277|    510|    }
  278|  2.71k|  }
  279|       |  /* Unknown command, assume multi-line for backward compatibility with
  280|       |   * earlier curl versions that only could do multi-line responses. */
  281|      2|  return TRUE;
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
  282|    511|}
pop3.c:pop3_dophase_done:
 1535|    427|{
 1536|    427|  (void)data;
 1537|    427|  (void)connected;
 1538|       |
 1539|    427|  return CURLE_OK;
 1540|    427|}
pop3.c:pop3_done:
 1469|  1.36k|{
 1470|  1.36k|  CURLcode result = CURLE_OK;
 1471|  1.36k|  struct POP3 *pop3 = Curl_meta_get(data, CURL_META_POP3_EASY);
  ------------------
  |  |   90|  1.36k|#define CURL_META_POP3_EASY   "meta:proto:pop3:easy"
  ------------------
 1472|       |
 1473|  1.36k|  (void)premature;
 1474|       |
 1475|  1.36k|  if(!pop3)
  ------------------
  |  Branch (1475:6): [True: 0, False: 1.36k]
  ------------------
 1476|      0|    return CURLE_OK;
 1477|       |
 1478|  1.36k|  if(status) {
  ------------------
  |  Branch (1478:6): [True: 894, False: 471]
  ------------------
 1479|    894|    connclose(data->conn, "POP3 done with bad status");
  ------------------
  |  |  103|    894|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|    894|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
 1480|    894|    result = status;         /* use the already set error code */
 1481|    894|  }
 1482|       |
 1483|       |  /* Cleanup our per-request based variables */
 1484|  1.36k|  curlx_safefree(pop3->id);
  ------------------
  |  | 1327|  1.36k|  do {                      \
  |  | 1328|  1.36k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  1.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  1.36k|    (ptr) = NULL;           \
  |  | 1330|  1.36k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1.36k]
  |  |  ------------------
  ------------------
 1485|  1.36k|  curlx_safefree(pop3->custom);
  ------------------
  |  | 1327|  1.36k|  do {                      \
  |  | 1328|  1.36k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  1.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  1.36k|    (ptr) = NULL;           \
  |  | 1330|  1.36k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1.36k]
  |  |  ------------------
  ------------------
 1486|       |
 1487|       |  /* Clear the transfer mode for the next request */
 1488|  1.36k|  pop3->transfer = PPTRANSFER_BODY;
 1489|       |
 1490|  1.36k|  return result;
 1491|  1.36k|}
pop3.c:pop3_connect:
 1426|  1.36k|{
 1427|  1.36k|  CURLcode result = CURLE_OK;
 1428|  1.36k|  struct connectdata *conn = data->conn;
 1429|  1.36k|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  1.36k|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
 1430|  1.36k|  struct pingpong *pp = pop3c ? &pop3c->pp : NULL;
  ------------------
  |  Branch (1430:25): [True: 1.36k, False: 0]
  ------------------
 1431|       |
 1432|  1.36k|  *done = FALSE; /* default to not done yet */
  ------------------
  |  | 1058|  1.36k|#define FALSE false
  ------------------
 1433|  1.36k|  if(!pop3c)
  ------------------
  |  Branch (1433:6): [True: 0, False: 1.36k]
  ------------------
 1434|      0|    return CURLE_FAILED_INIT;
 1435|       |
 1436|  1.36k|  PINGPONG_SETUP(pp, pop3_statemachine, pop3_endofresp);
  ------------------
  |  |   78|  1.36k|  do {                           \
  |  |   79|  1.36k|    (pp)->statemachine = s;      \
  |  |   80|  1.36k|    (pp)->endofresp = e;         \
  |  |   81|  1.36k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (81:11): [Folded, False: 1.36k]
  |  |  ------------------
  ------------------
 1437|       |
 1438|       |  /* Set the default preferred authentication type and mechanism */
 1439|  1.36k|  pop3c->preftype = POP3_TYPE_ANY;
  ------------------
  |  |   83|  1.36k|#define POP3_TYPE_ANY  (POP3_TYPE_CLEARTEXT | POP3_TYPE_APOP | POP3_TYPE_SASL)
  |  |  ------------------
  |  |  |  |   77|  1.36k|#define POP3_TYPE_CLEARTEXT (1 << 0)
  |  |  ------------------
  |  |               #define POP3_TYPE_ANY  (POP3_TYPE_CLEARTEXT | POP3_TYPE_APOP | POP3_TYPE_SASL)
  |  |  ------------------
  |  |  |  |   78|  1.36k|#define POP3_TYPE_APOP      (1 << 1)
  |  |  ------------------
  |  |               #define POP3_TYPE_ANY  (POP3_TYPE_CLEARTEXT | POP3_TYPE_APOP | POP3_TYPE_SASL)
  |  |  ------------------
  |  |  |  |   79|  1.36k|#define POP3_TYPE_SASL      (1 << 2)
  |  |  ------------------
  ------------------
 1440|  1.36k|  Curl_sasl_init(&pop3c->sasl, data, &saslpop3);
 1441|       |
 1442|       |  /* Initialize the pingpong layer */
 1443|  1.36k|  Curl_pp_init(pp, Curl_pgrs_now(data));
 1444|       |
 1445|       |  /* Parse the URL options */
 1446|  1.36k|  result = pop3_parse_url_options(conn);
 1447|  1.36k|  if(result)
  ------------------
  |  Branch (1447:6): [True: 46, False: 1.31k]
  ------------------
 1448|     46|    return result;
 1449|       |
 1450|       |  /* Start off waiting for the server greeting response */
 1451|  1.31k|  pop3_state(data, POP3_SERVERGREET);
 1452|       |
 1453|  1.31k|  result = pop3_multi_statemach(data, done);
 1454|       |
 1455|  1.31k|  return result;
 1456|  1.36k|}
pop3.c:pop3_statemachine:
 1274|  6.75k|{
 1275|  6.75k|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  6.75k|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
 1276|  6.75k|  CURLcode result = CURLE_OK;
 1277|  6.75k|  int pop3code;
 1278|  6.75k|  struct pingpong *pp;
 1279|  6.75k|  size_t nread = 0;
 1280|  6.75k|  (void)data;
 1281|       |
 1282|  6.75k|  if(!pop3c)
  ------------------
  |  Branch (1282:6): [True: 0, False: 6.75k]
  ------------------
 1283|      0|    return CURLE_FAILED_INIT;
 1284|       |
 1285|  6.75k|  pp = &pop3c->pp;
 1286|       |  /* Busy upgrading the connection; right now all I/O is SSL/TLS, not POP3 */
 1287|  6.75k|upgrade_tls:
 1288|  6.75k|  if(pop3c->state == POP3_UPGRADETLS) {
  ------------------
  |  Branch (1288:6): [True: 0, False: 6.75k]
  ------------------
 1289|      0|    result = pop3_perform_upgrade_tls(data, conn);
 1290|      0|    if(result || (pop3c->state == POP3_UPGRADETLS))
  ------------------
  |  Branch (1290:8): [True: 0, False: 0]
  |  Branch (1290:18): [True: 0, False: 0]
  ------------------
 1291|      0|      return result;
 1292|      0|  }
 1293|       |
 1294|       |  /* Flush any data that needs to be sent */
 1295|  6.75k|  if(pp->sendleft)
  ------------------
  |  Branch (1295:6): [True: 0, False: 6.75k]
  ------------------
 1296|      0|    return Curl_pp_flushsend(data, pp);
 1297|       |
 1298|  1.60M|  do {
 1299|       |     /* Read the response from the server */
 1300|  1.60M|    result = Curl_pp_readresp(data, FIRSTSOCKET, pp, &pop3code, &nread);
  ------------------
  |  |  303|  1.60M|#define FIRSTSOCKET     0
  ------------------
 1301|  1.60M|    if(result)
  ------------------
  |  Branch (1301:8): [True: 1.18k, False: 1.60M]
  ------------------
 1302|  1.18k|      return result;
 1303|       |
 1304|  1.60M|    if(!pop3code)
  ------------------
  |  Branch (1304:8): [True: 2.64k, False: 1.60M]
  ------------------
 1305|  2.64k|      break;
 1306|       |
 1307|       |    /* We have now received a full POP3 server response */
 1308|  1.60M|    switch(pop3c->state) {
 1309|    896|    case POP3_SERVERGREET:
  ------------------
  |  Branch (1309:5): [True: 896, False: 1.60M]
  ------------------
 1310|    896|      result = pop3_state_servergreet_resp(data, pop3code, pop3c->state);
 1311|    896|      break;
 1312|       |
 1313|  1.60M|    case POP3_CAPA:
  ------------------
  |  Branch (1313:5): [True: 1.60M, False: 1.65k]
  ------------------
 1314|  1.60M|      result = pop3_state_capa_resp(data, pop3code, pop3c->state);
 1315|  1.60M|      break;
 1316|       |
 1317|      2|    case POP3_STARTTLS:
  ------------------
  |  Branch (1317:5): [True: 2, False: 1.60M]
  ------------------
 1318|      2|      result = pop3_state_starttls_resp(data, conn, pop3code, pop3c->state);
 1319|       |      /* During UPGRADETLS, leave the read loop as we need to connect
 1320|       |       * (e.g. TLS handshake) before we continue sending/receiving. */
 1321|      2|      if(!result && (pop3c->state == POP3_UPGRADETLS))
  ------------------
  |  Branch (1321:10): [True: 0, False: 2]
  |  Branch (1321:21): [True: 0, False: 0]
  ------------------
 1322|      0|        goto upgrade_tls;
 1323|      2|      break;
 1324|       |
 1325|    200|    case POP3_AUTH:
  ------------------
  |  Branch (1325:5): [True: 200, False: 1.60M]
  ------------------
 1326|    200|      result = pop3_state_auth_resp(data, pop3code, pop3c->state);
 1327|    200|      break;
 1328|       |
 1329|      0|#ifndef CURL_DISABLE_DIGEST_AUTH
 1330|      7|    case POP3_APOP:
  ------------------
  |  Branch (1330:5): [True: 7, False: 1.60M]
  ------------------
 1331|      7|      result = pop3_state_apop_resp(data, pop3code, pop3c->state);
 1332|      7|      break;
 1333|      0|#endif
 1334|       |
 1335|     41|    case POP3_USER:
  ------------------
  |  Branch (1335:5): [True: 41, False: 1.60M]
  ------------------
 1336|     41|      result = pop3_state_user_resp(data, pop3code, pop3c->state);
 1337|     41|      break;
 1338|       |
 1339|     35|    case POP3_PASS:
  ------------------
  |  Branch (1339:5): [True: 35, False: 1.60M]
  ------------------
 1340|     35|      result = pop3_state_pass_resp(data, pop3code, pop3c->state);
 1341|     35|      break;
 1342|       |
 1343|    459|    case POP3_COMMAND:
  ------------------
  |  Branch (1343:5): [True: 459, False: 1.60M]
  ------------------
 1344|    459|      result = pop3_state_command_resp(data, pop3code, pop3c->state);
 1345|    459|      break;
 1346|       |
 1347|     10|    case POP3_QUIT:
  ------------------
  |  Branch (1347:5): [True: 10, False: 1.60M]
  ------------------
 1348|     10|      pop3_state(data, POP3_STOP);
 1349|     10|      break;
 1350|       |
 1351|      0|    default:
  ------------------
  |  Branch (1351:5): [True: 0, False: 1.60M]
  ------------------
 1352|       |      /* internal error */
 1353|      0|      pop3_state(data, POP3_STOP);
 1354|      0|      break;
 1355|  1.60M|    }
 1356|  1.60M|  } while(!result && pop3c->state != POP3_STOP && Curl_pp_moredata(pp));
  ------------------
  |  Branch (1356:11): [True: 1.60M, False: 81]
  |  Branch (1356:22): [True: 1.60M, False: 951]
  |  Branch (1356:51): [True: 1.60M, False: 1.89k]
  ------------------
 1357|       |
 1358|  5.56k|  return result;
 1359|  6.75k|}
pop3.c:pop3_perform_capa:
  426|    886|{
  427|    886|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    886|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  428|    886|  CURLcode result = CURLE_OK;
  429|       |
  430|    886|  if(!pop3c)
  ------------------
  |  Branch (430:6): [True: 0, False: 886]
  ------------------
  431|      0|    return CURLE_FAILED_INIT;
  432|       |
  433|    886|  pop3c->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */
  ------------------
  |  |   45|    886|#define SASL_AUTH_NONE          0
  ------------------
  434|    886|  pop3c->sasl.authused = SASL_AUTH_NONE;  /* Clear the auth. mechanism used */
  ------------------
  |  |   45|    886|#define SASL_AUTH_NONE          0
  ------------------
  435|    886|  pop3c->tls_supported = FALSE;           /* Clear the TLS capability */
  ------------------
  |  | 1058|    886|#define FALSE false
  ------------------
  436|       |
  437|       |  /* Send the CAPA command */
  438|    886|  result = Curl_pp_sendf(data, &pop3c->pp, "%s", "CAPA");
  439|       |
  440|    886|  if(!result)
  ------------------
  |  Branch (440:6): [True: 886, False: 0]
  ------------------
  441|    886|    pop3_state(data, POP3_CAPA);
  442|       |
  443|    886|  return result;
  444|    886|}
pop3.c:pop3_state_servergreet_resp:
  793|    896|{
  794|    896|  CURLcode result = CURLE_OK;
  795|    896|  struct connectdata *conn = data->conn;
  796|    896|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    896|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  797|    896|  const char *line;
  798|    896|  size_t len;
  799|       |
  800|    896|  (void)instate;
  801|    896|  if(!pop3c)
  ------------------
  |  Branch (801:6): [True: 0, False: 896]
  ------------------
  802|      0|    return CURLE_FAILED_INIT;
  803|       |
  804|    896|  line = curlx_dyn_ptr(&pop3c->pp.recvbuf);
  805|    896|  len = pop3c->pp.nfinal;
  806|       |
  807|    896|  if(pop3code != '+') {
  ------------------
  |  Branch (807:6): [True: 10, False: 886]
  ------------------
  808|     10|    failf(data, "Got unexpected pop3-server response");
  ------------------
  |  |   62|     10|#define failf Curl_failf
  ------------------
  809|     10|    result = CURLE_WEIRD_SERVER_REPLY;
  810|     10|  }
  811|    886|  else if(len > 3) {
  ------------------
  |  Branch (811:11): [True: 886, False: 0]
  ------------------
  812|       |    /* Does the server support APOP authentication? */
  813|    886|    const char *lt;
  814|    886|    const char *gt = NULL;
  815|       |
  816|       |    /* Look for the APOP timestamp */
  817|    886|    lt = memchr(line, '<', len);
  818|    886|    if(lt)
  ------------------
  |  Branch (818:8): [True: 40, False: 846]
  ------------------
  819|       |      /* search the remainder for '>' */
  820|     40|      gt = memchr(lt, '>', len - (lt - line));
  821|    886|    if(gt) {
  ------------------
  |  Branch (821:8): [True: 20, False: 866]
  ------------------
  822|       |      /* the length of the timestamp, including the brackets */
  823|     20|      size_t timestamplen = gt - lt + 1;
  824|     20|      const char *at = memchr(lt, '@', timestamplen);
  825|       |      /* If the timestamp does not contain '@' it is not (as required by
  826|       |         RFC-1939) conformant to the RFC-822 message id syntax, and we
  827|       |         therefore do not use APOP authentication. */
  828|     20|      if(at) {
  ------------------
  |  Branch (828:10): [True: 18, False: 2]
  ------------------
  829|       |        /* dupe the timestamp */
  830|     18|        pop3c->apoptimestamp = curlx_memdup0(lt, timestamplen);
  831|     18|        if(!pop3c->apoptimestamp)
  ------------------
  |  Branch (831:12): [True: 0, False: 18]
  ------------------
  832|      0|          return CURLE_OUT_OF_MEMORY;
  833|       |        /* Store the APOP capability */
  834|     18|        pop3c->authtypes |= POP3_TYPE_APOP;
  ------------------
  |  |   78|     18|#define POP3_TYPE_APOP      (1 << 1)
  ------------------
  835|     18|      }
  836|     20|    }
  837|       |
  838|    886|    if(!result)
  ------------------
  |  Branch (838:8): [True: 886, False: 0]
  ------------------
  839|    886|      result = pop3_perform_capa(data, conn);
  840|    886|  }
  841|       |
  842|    896|  return result;
  843|    896|}
pop3.c:pop3_state_capa_resp:
  848|  1.60M|{
  849|  1.60M|  CURLcode result = CURLE_OK;
  850|  1.60M|  struct connectdata *conn = data->conn;
  851|  1.60M|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  1.60M|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  852|  1.60M|  const char *line;
  853|  1.60M|  size_t len;
  854|       |
  855|  1.60M|  (void)instate;
  856|  1.60M|  if(!pop3c)
  ------------------
  |  Branch (856:6): [True: 0, False: 1.60M]
  ------------------
  857|      0|    return CURLE_FAILED_INIT;
  858|       |
  859|  1.60M|  line = curlx_dyn_ptr(&pop3c->pp.recvbuf);
  860|  1.60M|  len = pop3c->pp.nfinal;
  861|       |
  862|       |  /* Do we have an untagged continuation response? */
  863|  1.60M|  if(pop3code == '*') {
  ------------------
  |  Branch (863:6): [True: 1.60M, False: 658]
  ------------------
  864|       |    /* Does the server support the STLS capability? */
  865|  1.60M|    if(len >= 4 && curl_strnequal(line, "STLS", 4))
  ------------------
  |  Branch (865:8): [True: 36.7k, False: 1.56M]
  |  Branch (865:20): [True: 639, False: 36.1k]
  ------------------
  866|    639|      pop3c->tls_supported = TRUE;
  ------------------
  |  | 1055|    639|#define TRUE true
  ------------------
  867|       |
  868|       |    /* Does the server support clear text authentication? */
  869|  1.60M|    else if(len >= 4 && curl_strnequal(line, "USER", 4))
  ------------------
  |  Branch (869:13): [True: 36.1k, False: 1.56M]
  |  Branch (869:25): [True: 1.23k, False: 34.8k]
  ------------------
  870|  1.23k|      pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
  ------------------
  |  |   77|  1.23k|#define POP3_TYPE_CLEARTEXT (1 << 0)
  ------------------
  871|       |
  872|       |    /* Does the server support SASL based authentication? */
  873|  1.59M|    else if(len >= 5 && curl_strnequal(line, "SASL ", 5)) {
  ------------------
  |  Branch (873:13): [True: 33.3k, False: 1.56M]
  |  Branch (873:25): [True: 8.38k, False: 25.0k]
  ------------------
  874|  8.38k|      pop3c->authtypes |= POP3_TYPE_SASL;
  ------------------
  |  |   79|  8.38k|#define POP3_TYPE_SASL      (1 << 2)
  ------------------
  875|       |
  876|       |      /* Advance past the SASL keyword */
  877|  8.38k|      line += 5;
  878|  8.38k|      len -= 5;
  879|       |
  880|       |      /* Loop through the data line */
  881|  40.2k|      for(;;) {
  882|  40.2k|        size_t llen;
  883|  40.2k|        size_t wordlen = 0;
  884|  40.2k|        unsigned short mechbit;
  885|       |
  886|  88.5k|        while(len && (ISBLANK(*line) || ISNEWLINE(*line))) {
  ------------------
  |  |   45|   160k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 14.5k, False: 65.5k]
  |  |  |  Branch (45:38): [True: 12.7k, False: 52.8k]
  |  |  ------------------
  ------------------
                      while(len && (ISBLANK(*line) || ISNEWLINE(*line))) {
  ------------------
  |  |   50|  52.8k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 8.38k, False: 44.4k]
  |  |  |  Branch (50:43): [True: 12.5k, False: 31.8k]
  |  |  ------------------
  ------------------
  |  Branch (886:15): [True: 80.1k, False: 8.38k]
  ------------------
  887|  48.3k|          line++;
  888|  48.3k|          len--;
  889|  48.3k|        }
  890|       |
  891|  40.2k|        if(!len)
  ------------------
  |  Branch (891:12): [True: 8.38k, False: 31.8k]
  ------------------
  892|  8.38k|          break;
  893|       |
  894|       |        /* Extract the word */
  895|   833k|        while(wordlen < len && !ISBLANK(line[wordlen]) &&
  ------------------
  |  |   45|  1.66M|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 12.9k, False: 820k]
  |  |  |  Branch (45:38): [True: 621, False: 819k]
  |  |  ------------------
  ------------------
  |  Branch (895:15): [True: 833k, False: 0]
  ------------------
  896|   819k|              !ISNEWLINE(line[wordlen]))
  ------------------
  |  |   50|   819k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 8.01k, False: 811k]
  |  |  |  Branch (50:43): [True: 10.3k, False: 801k]
  |  |  ------------------
  ------------------
  897|   801k|          wordlen++;
  898|       |
  899|       |        /* Test the word for a matching authentication mechanism */
  900|  31.8k|        mechbit = Curl_sasl_decode_mech(line, wordlen, &llen);
  901|  31.8k|        if(mechbit && llen == wordlen)
  ------------------
  |  Branch (901:12): [True: 6.03k, False: 25.8k]
  |  Branch (901:23): [True: 1.24k, False: 4.78k]
  ------------------
  902|  1.24k|          pop3c->sasl.authmechs |= mechbit;
  903|       |
  904|  31.8k|        line += wordlen;
  905|  31.8k|        len -= wordlen;
  906|  31.8k|      }
  907|  8.38k|    }
  908|  1.60M|  }
  909|    658|  else {
  910|       |    /* Clear text is supported when CAPA is not recognised */
  911|    658|    if(pop3code != '+')
  ------------------
  |  Branch (911:8): [True: 187, False: 471]
  ------------------
  912|    187|      pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
  ------------------
  |  |   77|    187|#define POP3_TYPE_CLEARTEXT (1 << 0)
  ------------------
  913|       |
  914|    658|    if(!data->set.use_ssl || Curl_conn_is_ssl(conn, FIRSTSOCKET))
  ------------------
  |  |  303|      5|#define FIRSTSOCKET     0
  ------------------
  |  Branch (914:8): [True: 653, False: 5]
  |  Branch (914:30): [True: 0, False: 5]
  ------------------
  915|    653|      result = pop3_perform_authentication(data, conn);
  916|      5|    else if(pop3code == '+' && pop3c->tls_supported)
  ------------------
  |  Branch (916:13): [True: 4, False: 1]
  |  Branch (916:32): [True: 2, False: 2]
  ------------------
  917|       |      /* Switch to TLS connection now */
  918|      2|      result = pop3_perform_starttls(data, conn);
  919|      3|    else if(data->set.use_ssl <= CURLUSESSL_TRY)
  ------------------
  |  |  925|      3|#define CURLUSESSL_TRY     1L /* try using SSL, proceed anyway otherwise */
  ------------------
  |  Branch (919:13): [True: 1, False: 2]
  ------------------
  920|       |      /* Fallback and carry on with authentication */
  921|      1|      result = pop3_perform_authentication(data, conn);
  922|      2|    else {
  923|      2|      failf(data, "STLS not supported.");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  924|      2|      result = CURLE_USE_SSL_FAILED;
  925|      2|    }
  926|    658|  }
  927|       |
  928|  1.60M|  return result;
  929|  1.60M|}
pop3.c:pop3_perform_authentication:
  680|    654|{
  681|    654|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    654|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  682|    654|  CURLcode result = CURLE_OK;
  683|    654|  saslprogress progress = SASL_IDLE;
  684|       |
  685|    654|  if(!pop3c)
  ------------------
  |  Branch (685:6): [True: 0, False: 654]
  ------------------
  686|      0|    return CURLE_FAILED_INIT;
  687|       |
  688|       |  /* Check we have enough data to authenticate with and end the
  689|       |     connect phase if we do not */
  690|    654|  if(!Curl_sasl_can_authenticate(&pop3c->sasl, data)) {
  ------------------
  |  Branch (690:6): [True: 473, False: 181]
  ------------------
  691|    473|    pop3_state(data, POP3_STOP);
  692|    473|    return result;
  693|    473|  }
  694|       |
  695|    181|  if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_SASL) {
  ------------------
  |  |   79|    181|#define POP3_TYPE_SASL      (1 << 2)
  ------------------
  |  Branch (695:6): [True: 143, False: 38]
  ------------------
  696|       |    /* Calculate the SASL login details */
  697|    143|    result = Curl_sasl_start(&pop3c->sasl, data, FALSE, &progress);
  ------------------
  |  | 1058|    143|#define FALSE false
  ------------------
  698|       |
  699|    143|    if(!result)
  ------------------
  |  Branch (699:8): [True: 143, False: 0]
  ------------------
  700|    143|      if(progress == SASL_INPROGRESS)
  ------------------
  |  Branch (700:10): [True: 124, False: 19]
  ------------------
  701|    124|        pop3_state(data, POP3_AUTH);
  702|    143|  }
  703|       |
  704|    181|  if(!result && progress == SASL_IDLE) {
  ------------------
  |  Branch (704:6): [True: 181, False: 0]
  |  Branch (704:17): [True: 57, False: 124]
  ------------------
  705|     57|#ifndef CURL_DISABLE_DIGEST_AUTH
  706|     57|    if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
  ------------------
  |  |   78|     57|#define POP3_TYPE_APOP      (1 << 1)
  ------------------
  |  Branch (706:8): [True: 17, False: 40]
  ------------------
  707|       |      /* Perform APOP authentication */
  708|     17|      result = pop3_perform_apop(data, conn);
  709|     40|    else
  710|     40|#endif
  711|     40|    if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
  ------------------
  |  |   77|     40|#define POP3_TYPE_CLEARTEXT (1 << 0)
  ------------------
  |  Branch (711:8): [True: 35, False: 5]
  ------------------
  712|       |      /* Perform clear text authentication */
  713|     35|      result = pop3_perform_user(data, conn);
  714|      5|    else
  715|      5|      result = Curl_sasl_is_blocked(&pop3c->sasl, data);
  716|     57|  }
  717|       |
  718|    181|  return result;
  719|    654|}
pop3.c:pop3_perform_apop:
  554|     17|{
  555|     17|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|     17|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  556|     17|  CURLcode result = CURLE_OK;
  557|     17|  size_t i;
  558|     17|  struct MD5_context *ctxt;
  559|     17|  unsigned char digest[MD5_DIGEST_LEN];
  560|     17|  char secret[(2 * MD5_DIGEST_LEN) + 1];
  561|       |
  562|     17|  if(!pop3c)
  ------------------
  |  Branch (562:6): [True: 0, False: 17]
  ------------------
  563|      0|    return CURLE_FAILED_INIT;
  564|       |
  565|       |  /* Check we have a username and password to authenticate with and end the
  566|       |     connect phase if we do not */
  567|     17|  if(!data->state.creds) {
  ------------------
  |  Branch (567:6): [True: 0, False: 17]
  ------------------
  568|      0|    pop3_state(data, POP3_STOP);
  569|       |
  570|      0|    return result;
  571|      0|  }
  572|       |
  573|       |  /* Create the digest */
  574|     17|  ctxt = Curl_MD5_init(&Curl_DIGEST_MD5);
  575|     17|  if(!ctxt)
  ------------------
  |  Branch (575:6): [True: 0, False: 17]
  ------------------
  576|      0|    return CURLE_OUT_OF_MEMORY;
  577|       |
  578|     17|  Curl_MD5_update(ctxt, (const unsigned char *)pop3c->apoptimestamp,
  579|     17|                  curlx_uztoui(strlen(pop3c->apoptimestamp)));
  580|       |
  581|     17|  Curl_MD5_update(ctxt, (const unsigned char *)Curl_creds_passwd(conn->creds),
  ------------------
  |  |   76|     17|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 17, False: 0]
  |  |  ------------------
  ------------------
  582|     17|                  curlx_uztoui(strlen(Curl_creds_passwd(conn->creds))));
  ------------------
  |  |   76|     17|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 17, False: 0]
  |  |  ------------------
  ------------------
  583|       |
  584|       |  /* Finalise the digest */
  585|     17|  Curl_MD5_final(ctxt, digest);
  586|       |
  587|       |  /* Convert the calculated 16 octet digest into a 32 byte hex string */
  588|    289|  for(i = 0; i < MD5_DIGEST_LEN; i++)
  ------------------
  |  |   32|    289|#define MD5_DIGEST_LEN  16
  ------------------
  |  Branch (588:14): [True: 272, False: 17]
  ------------------
  589|    272|    curl_msnprintf(&secret[2 * i], 3, "%02x", digest[i]);
  590|       |
  591|     17|  result = Curl_pp_sendf(data, &pop3c->pp, "APOP %s %s",
  592|     17|                         Curl_creds_user(conn->creds), secret);
  ------------------
  |  |   75|     17|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 17, False: 0]
  |  |  ------------------
  ------------------
  593|       |
  594|     17|  if(!result)
  ------------------
  |  Branch (594:6): [True: 17, False: 0]
  ------------------
  595|     17|    pop3_state(data, POP3_APOP);
  596|       |
  597|     17|  return result;
  598|     17|}
pop3.c:pop3_perform_user:
  521|     50|{
  522|     50|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|     50|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  523|     50|  CURLcode result = CURLE_OK;
  524|       |
  525|     50|  if(!pop3c)
  ------------------
  |  Branch (525:6): [True: 0, False: 50]
  ------------------
  526|      0|    return CURLE_FAILED_INIT;
  527|       |
  528|       |  /* Check we have a username and password to authenticate with and end the
  529|       |     connect phase if we do not */
  530|     50|  if(!conn->creds) {
  ------------------
  |  Branch (530:6): [True: 0, False: 50]
  ------------------
  531|      0|    pop3_state(data, POP3_STOP);
  532|       |
  533|      0|    return result;
  534|      0|  }
  535|       |
  536|       |  /* Send the USER command */
  537|     50|  result = Curl_pp_sendf(data, &pop3c->pp, "USER %s",
  538|     50|                         Curl_creds_user(conn->creds));
  ------------------
  |  |   75|     50|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 50, False: 0]
  |  |  ------------------
  ------------------
  539|     50|  if(!result)
  ------------------
  |  Branch (539:6): [True: 50, False: 0]
  ------------------
  540|     50|    pop3_state(data, POP3_USER);
  541|       |
  542|     50|  return result;
  543|     50|}
pop3.c:pop3_perform_starttls:
  454|      2|{
  455|      2|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|      2|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  456|      2|  CURLcode result;
  457|       |
  458|      2|  if(!pop3c)
  ------------------
  |  Branch (458:6): [True: 0, False: 2]
  ------------------
  459|      0|    return CURLE_FAILED_INIT;
  460|       |
  461|       |  /* Send the STLS command */
  462|      2|  result = Curl_pp_sendf(data, &pop3c->pp, "%s", "STLS");
  463|      2|  if(!result)
  ------------------
  |  Branch (463:6): [True: 2, False: 0]
  ------------------
  464|      2|    pop3_state(data, POP3_STARTTLS);
  465|       |
  466|      2|  return result;
  467|      2|}
pop3.c:pop3_state_starttls_resp:
  936|      2|{
  937|      2|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|      2|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  938|      2|  CURLcode result = CURLE_OK;
  939|      2|  (void)instate;
  940|       |
  941|      2|  if(!pop3c)
  ------------------
  |  Branch (941:6): [True: 0, False: 2]
  ------------------
  942|      0|    return CURLE_FAILED_INIT;
  943|       |
  944|       |  /* Pipelining in response is forbidden. */
  945|      2|  if(pop3c->pp.overflow)
  ------------------
  |  Branch (945:6): [True: 1, False: 1]
  ------------------
  946|      1|    return CURLE_WEIRD_SERVER_REPLY;
  947|       |
  948|      1|  if(pop3code != '+') {
  ------------------
  |  Branch (948:6): [True: 1, False: 0]
  ------------------
  949|      1|    if(data->set.use_ssl != CURLUSESSL_TRY) {
  ------------------
  |  |  925|      1|#define CURLUSESSL_TRY     1L /* try using SSL, proceed anyway otherwise */
  ------------------
  |  Branch (949:8): [True: 1, False: 0]
  ------------------
  950|      1|      failf(data, "STARTTLS denied");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  951|      1|      result = CURLE_USE_SSL_FAILED;
  952|      1|    }
  953|      0|    else
  954|      0|      result = pop3_perform_authentication(data, conn);
  955|      1|  }
  956|      0|  else
  957|      0|    pop3_state(data, POP3_UPGRADETLS);
  958|       |
  959|      1|  return result;
  960|      2|}
pop3.c:pop3_state_auth_resp:
  966|    200|{
  967|    200|  CURLcode result = CURLE_OK;
  968|    200|  struct connectdata *conn = data->conn;
  969|    200|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    200|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  970|    200|  saslprogress progress;
  971|       |
  972|    200|  (void)instate;
  973|    200|  if(!pop3c)
  ------------------
  |  Branch (973:6): [True: 0, False: 200]
  ------------------
  974|      0|    return CURLE_FAILED_INIT;
  975|       |
  976|    200|  result = Curl_sasl_continue(&pop3c->sasl, data, pop3code, &progress);
  977|    200|  if(!result)
  ------------------
  |  Branch (977:6): [True: 182, False: 18]
  ------------------
  978|    182|    switch(progress) {
  979|      5|    case SASL_DONE:
  ------------------
  |  Branch (979:5): [True: 5, False: 177]
  ------------------
  980|      5|      pop3_state(data, POP3_STOP);  /* Authenticated */
  981|      5|      break;
  982|     17|    case SASL_IDLE:            /* No mechanism left after cancellation */
  ------------------
  |  Branch (982:5): [True: 17, False: 165]
  ------------------
  983|     17|#ifndef CURL_DISABLE_DIGEST_AUTH
  984|     17|      if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
  ------------------
  |  |   78|     17|#define POP3_TYPE_APOP      (1 << 1)
  ------------------
  |  Branch (984:10): [True: 0, False: 17]
  ------------------
  985|       |        /* Perform APOP authentication */
  986|      0|        result = pop3_perform_apop(data, conn);
  987|     17|      else
  988|     17|#endif
  989|     17|      if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
  ------------------
  |  |   77|     17|#define POP3_TYPE_CLEARTEXT (1 << 0)
  ------------------
  |  Branch (989:10): [True: 15, False: 2]
  ------------------
  990|       |        /* Perform clear text authentication */
  991|     15|        result = pop3_perform_user(data, conn);
  992|      2|      else {
  993|      2|        failf(data, "Authentication cancelled");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  994|      2|        result = CURLE_LOGIN_DENIED;
  995|      2|      }
  996|     17|      break;
  997|    160|    default:
  ------------------
  |  Branch (997:5): [True: 160, False: 22]
  ------------------
  998|    160|      break;
  999|    182|    }
 1000|       |
 1001|    200|  return result;
 1002|    200|}
pop3.c:pop3_state_apop_resp:
 1008|      7|{
 1009|      7|  CURLcode result = CURLE_OK;
 1010|      7|  (void)instate;
 1011|       |
 1012|      7|  if(pop3code != '+') {
  ------------------
  |  Branch (1012:6): [True: 5, False: 2]
  ------------------
 1013|      5|    failf(data, "Authentication failed: %d", pop3code);
  ------------------
  |  |   62|      5|#define failf Curl_failf
  ------------------
 1014|      5|    result = CURLE_LOGIN_DENIED;
 1015|      5|  }
 1016|      2|  else
 1017|       |    /* End of connect phase */
 1018|      2|    pop3_state(data, POP3_STOP);
 1019|       |
 1020|      7|  return result;
 1021|      7|}
pop3.c:pop3_state_user_resp:
 1027|     41|{
 1028|     41|  CURLcode result = CURLE_OK;
 1029|     41|  struct connectdata *conn = data->conn;
 1030|     41|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|     41|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
 1031|     41|  (void)instate;
 1032|       |
 1033|     41|  if(!pop3c)
  ------------------
  |  Branch (1033:6): [True: 0, False: 41]
  ------------------
 1034|      0|    return CURLE_FAILED_INIT;
 1035|       |
 1036|     41|  if(pop3code != '+') {
  ------------------
  |  Branch (1036:6): [True: 4, False: 37]
  ------------------
 1037|      4|    failf(data, "Access denied. %c", pop3code);
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
 1038|      4|    result = CURLE_LOGIN_DENIED;
 1039|      4|  }
 1040|     37|  else
 1041|       |    /* Send the PASS command */
 1042|     37|    result = Curl_pp_sendf(data, &pop3c->pp, "PASS %s",
 1043|     37|                           Curl_creds_passwd(conn->creds));
  ------------------
  |  |   76|     37|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 37, False: 0]
  |  |  ------------------
  ------------------
 1044|     41|  if(!result)
  ------------------
  |  Branch (1044:6): [True: 37, False: 4]
  ------------------
 1045|     37|    pop3_state(data, POP3_PASS);
 1046|       |
 1047|     41|  return result;
 1048|     41|}
pop3.c:pop3_state_pass_resp:
 1053|     35|{
 1054|     35|  CURLcode result = CURLE_OK;
 1055|     35|  (void)instate;
 1056|       |
 1057|     35|  if(pop3code != '+') {
  ------------------
  |  Branch (1057:6): [True: 1, False: 34]
  ------------------
 1058|      1|    failf(data, "Access denied. %c", pop3code);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1059|      1|    result = CURLE_LOGIN_DENIED;
 1060|      1|  }
 1061|     34|  else
 1062|       |    /* End of connect phase */
 1063|     34|    pop3_state(data, POP3_STOP);
 1064|       |
 1065|     35|  return result;
 1066|     35|}
pop3.c:pop3_state_command_resp:
 1211|    459|{
 1212|    459|  CURLcode result = CURLE_OK;
 1213|    459|  struct connectdata *conn = data->conn;
 1214|    459|  struct POP3 *pop3 = Curl_meta_get(data, CURL_META_POP3_EASY);
  ------------------
  |  |   90|    459|#define CURL_META_POP3_EASY   "meta:proto:pop3:easy"
  ------------------
 1215|    459|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    459|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
 1216|    459|  struct pingpong *pp;
 1217|       |
 1218|    459|  (void)instate;
 1219|    459|  if(!pop3 || !pop3c)
  ------------------
  |  Branch (1219:6): [True: 0, False: 459]
  |  Branch (1219:15): [True: 0, False: 459]
  ------------------
 1220|      0|    return CURLE_FAILED_INIT;
 1221|       |
 1222|    459|  pp = &pop3c->pp;
 1223|    459|  if(pop3code != '+') {
  ------------------
  |  Branch (1223:6): [True: 26, False: 433]
  ------------------
 1224|     26|    pop3_state(data, POP3_STOP);
 1225|     26|    return CURLE_WEIRD_SERVER_REPLY;
 1226|     26|  }
 1227|       |
 1228|       |  /* This 'OK' line ends with a CR LF pair which is the two first bytes of the
 1229|       |     EOB string so count this is two matching bytes. This is necessary to make
 1230|       |     the code detect the EOB if the only data than comes now is %2e CR LF like
 1231|       |     when there is no body to return. */
 1232|    433|  pop3c->eob = 2;
 1233|       |
 1234|       |  /* Since this initial CR LF pair is not part of the actual body, we set
 1235|       |     the strip counter here so that these bytes will not be delivered. */
 1236|    433|  pop3c->strip = 2;
 1237|       |
 1238|    433|  if(pop3->transfer == PPTRANSFER_BODY) {
  ------------------
  |  Branch (1238:6): [True: 432, False: 1]
  ------------------
 1239|       |    /* POP3 download */
 1240|    432|    Curl_xfer_setup_recv(data, FIRSTSOCKET, -1);
  ------------------
  |  |  303|    432|#define FIRSTSOCKET     0
  ------------------
 1241|       |
 1242|    432|    if(pp->overflow) {
  ------------------
  |  Branch (1242:8): [True: 346, False: 86]
  ------------------
 1243|       |      /* The recv buffer contains data that is actually body content so send
 1244|       |         it as such. Note that there may even be additional "headers" after
 1245|       |         the body */
 1246|       |
 1247|       |      /* keep only the overflow */
 1248|    346|      curlx_dyn_tail(&pp->recvbuf, pp->overflow);
 1249|    346|      pp->nfinal = 0; /* done */
 1250|       |
 1251|    346|      if(!data->req.no_body) {
  ------------------
  |  Branch (1251:10): [True: 346, False: 0]
  ------------------
 1252|    346|        result = pop3_write(data, curlx_dyn_ptr(&pp->recvbuf),
 1253|    346|                            curlx_dyn_len(&pp->recvbuf), FALSE);
  ------------------
  |  | 1058|    346|#define FALSE false
  ------------------
 1254|    346|        if(result)
  ------------------
  |  Branch (1254:12): [True: 6, False: 340]
  ------------------
 1255|      6|          return result;
 1256|    346|      }
 1257|       |
 1258|       |      /* reset the buffer */
 1259|    340|      curlx_dyn_reset(&pp->recvbuf);
 1260|    340|      pp->overflow = 0;
 1261|    340|    }
 1262|    432|  }
 1263|      1|  else
 1264|      1|    pp->overflow = 0;
 1265|       |
 1266|       |  /* End of DO phase */
 1267|    427|  pop3_state(data, POP3_STOP);
 1268|       |
 1269|    427|  return result;
 1270|    433|}
pop3.c:pop3_endofresp:
  295|  1.99M|{
  296|  1.99M|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  1.99M|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  297|  1.99M|  (void)data;
  298|  1.99M|  DEBUGASSERT(pop3c);
  ------------------
  |  | 1081|  1.99M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (298:3): [True: 0, False: 1.99M]
  |  Branch (298:3): [True: 1.99M, False: 0]
  ------------------
  299|  1.99M|  if(!pop3c) /* internal error */
  ------------------
  |  Branch (299:6): [True: 0, False: 1.99M]
  ------------------
  300|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  301|       |
  302|       |  /* Do we have an error response? */
  303|  1.99M|  if(len >= 4 && !memcmp("-ERR", line, 4)) {
  ------------------
  |  Branch (303:6): [True: 43.8k, False: 1.94M]
  |  Branch (303:18): [True: 209, False: 43.6k]
  ------------------
  304|    209|    *resp = '-';
  305|       |
  306|    209|    return TRUE;
  ------------------
  |  | 1055|    209|#define TRUE true
  ------------------
  307|    209|  }
  308|       |
  309|       |  /* Are we processing CAPA command responses? */
  310|  1.99M|  if(pop3c->state == POP3_CAPA) {
  ------------------
  |  Branch (310:6): [True: 1.60M, False: 388k]
  ------------------
  311|       |    /* Do we have the terminating line? Per RFC 2449 this is a line
  312|       |       containing only a single dot */
  313|  1.60M|    if((len == 3 && line[0] == '.' && line[1] == '\r') ||
  ------------------
  |  Branch (313:9): [True: 4.59k, False: 1.59M]
  |  Branch (313:21): [True: 181, False: 4.40k]
  |  Branch (313:39): [True: 38, False: 143]
  ------------------
  314|  1.60M|       (len == 2 && line[0] == '.' && line[1] == '\n'))
  ------------------
  |  Branch (314:9): [True: 16.9k, False: 1.58M]
  |  Branch (314:21): [True: 433, False: 16.5k]
  |  Branch (314:39): [True: 433, False: 0]
  ------------------
  315|       |      /* Treat the response as a success */
  316|    471|      *resp = '+';
  317|  1.60M|    else
  318|       |      /* Treat the response as an untagged continuation */
  319|  1.60M|      *resp = '*';
  320|       |
  321|  1.60M|    return TRUE;
  ------------------
  |  | 1055|  1.60M|#define TRUE true
  ------------------
  322|  1.60M|  }
  323|       |
  324|       |  /* Do we have a success response? */
  325|   388k|  if(len >= 3 && !memcmp("+OK", line, 3)) {
  ------------------
  |  Branch (325:6): [True: 7.96k, False: 380k]
  |  Branch (325:18): [True: 1.41k, False: 6.55k]
  ------------------
  326|  1.41k|    *resp = '+';
  327|       |
  328|  1.41k|    return TRUE;
  ------------------
  |  | 1055|  1.41k|#define TRUE true
  ------------------
  329|  1.41k|  }
  330|       |
  331|       |  /* Do we have a continuation response? */
  332|   387k|  if(len >= 1 && line[0] == '+') {
  ------------------
  |  Branch (332:6): [True: 387k, False: 0]
  |  Branch (332:18): [True: 218, False: 386k]
  ------------------
  333|    218|    *resp = '*';
  334|       |
  335|    218|    return TRUE;
  ------------------
  |  | 1055|    218|#define TRUE true
  ------------------
  336|    218|  }
  337|       |
  338|   386k|  return FALSE; /* Nothing for us */
  ------------------
  |  | 1058|   386k|#define FALSE false
  ------------------
  339|   387k|}
pop3.c:pop3_perform_auth:
  611|    141|{
  612|    141|  struct pop3_conn *pop3c =
  613|    141|    Curl_conn_meta_get(data->conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    141|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  614|    141|  CURLcode result = CURLE_OK;
  615|    141|  const char *ir = Curl_bufref_ptr(initresp);
  616|       |
  617|    141|  if(!pop3c)
  ------------------
  |  Branch (617:6): [True: 0, False: 141]
  ------------------
  618|      0|    return CURLE_FAILED_INIT;
  619|       |
  620|    141|  if(ir) {                                  /* AUTH <mech> ...<crlf> */
  ------------------
  |  Branch (620:6): [True: 2, False: 139]
  ------------------
  621|       |    /* Send the AUTH command with the initial response */
  622|      2|    result = Curl_pp_sendf(data, &pop3c->pp, "AUTH %s %s", mech, ir);
  623|      2|  }
  624|    139|  else {
  625|       |    /* Send the AUTH command */
  626|    139|    result = Curl_pp_sendf(data, &pop3c->pp, "AUTH %s", mech);
  627|    139|  }
  628|       |
  629|    141|  return result;
  630|    141|}
pop3.c:pop3_continue_auth:
  641|     68|{
  642|     68|  struct pop3_conn *pop3c =
  643|     68|    Curl_conn_meta_get(data->conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|     68|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  644|       |
  645|     68|  (void)mech;
  646|     68|  if(!pop3c)
  ------------------
  |  Branch (646:6): [True: 0, False: 68]
  ------------------
  647|      0|    return CURLE_FAILED_INIT;
  648|       |
  649|     68|  return Curl_pp_sendf(data, &pop3c->pp, "%s", Curl_bufref_ptr(resp));
  650|     68|}
pop3.c:pop3_cancel_auth:
  659|     79|{
  660|     79|  struct pop3_conn *pop3c =
  661|     79|    Curl_conn_meta_get(data->conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|     79|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  662|       |
  663|     79|  (void)mech;
  664|     79|  if(!pop3c)
  ------------------
  |  Branch (664:6): [True: 0, False: 79]
  ------------------
  665|      0|    return CURLE_FAILED_INIT;
  666|       |
  667|     79|  return Curl_pp_sendf(data, &pop3c->pp, "*");
  668|     79|}
pop3.c:pop3_get_message:
  348|    114|{
  349|    114|  struct pop3_conn *pop3c =
  350|    114|    Curl_conn_meta_get(data->conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    114|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  351|    114|  char *message;
  352|    114|  size_t len;
  353|       |
  354|    114|  if(!pop3c)
  ------------------
  |  Branch (354:6): [True: 0, False: 114]
  ------------------
  355|      0|    return CURLE_FAILED_INIT;
  356|    114|  message = curlx_dyn_ptr(&pop3c->pp.recvbuf);
  357|    114|  len = pop3c->pp.nfinal;
  358|    114|  if(len > 2) {
  ------------------
  |  Branch (358:6): [True: 78, False: 36]
  ------------------
  359|       |    /* Find the start of the message */
  360|     78|    len -= 2;
  361|    331|    for(message += 2; ISBLANK(*message); message++, len--)
  ------------------
  |  |   45|    331|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 141, False: 190]
  |  |  |  Branch (45:38): [True: 112, False: 78]
  |  |  ------------------
  ------------------
  362|    253|      ;
  363|       |
  364|       |    /* Find the end of the message */
  365|    861|    while(len--)
  ------------------
  |  Branch (365:11): [True: 857, False: 4]
  ------------------
  366|    857|      if(!ISBLANK(message[len]) && !ISNEWLINE(message[len]))
  ------------------
  |  |   45|  1.71k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 104, False: 753]
  |  |  |  Branch (45:38): [True: 203, False: 550]
  |  |  ------------------
  ------------------
                    if(!ISBLANK(message[len]) && !ISNEWLINE(message[len]))
  ------------------
  |  |   50|    550|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 78, False: 472]
  |  |  |  Branch (50:43): [True: 398, False: 74]
  |  |  ------------------
  ------------------
  367|     74|        break;
  368|       |
  369|       |    /* Terminate the message */
  370|     78|    message[++len] = '\0';
  371|     78|    Curl_bufref_set(out, message, len, NULL);
  372|     78|  }
  373|     36|  else
  374|       |    /* junk input => zero length output */
  375|     36|    Curl_bufref_set(out, "", 0, NULL);
  376|       |
  377|    114|  return CURLE_OK;
  378|    114|}
pop3.c:pop3_parse_url_options:
  173|  1.36k|{
  174|  1.36k|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  1.36k|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  175|  1.36k|  CURLcode result = CURLE_OK;
  176|  1.36k|  const char *ptr = conn->options;
  177|       |
  178|  1.36k|  if(!pop3c)
  ------------------
  |  Branch (178:6): [True: 0, False: 1.36k]
  ------------------
  179|      0|    return CURLE_FAILED_INIT;
  180|       |
  181|  1.46k|  while(!result && ptr && *ptr) {
  ------------------
  |  Branch (181:9): [True: 1.41k, False: 46]
  |  Branch (181:20): [True: 137, False: 1.27k]
  |  Branch (181:27): [True: 96, False: 41]
  ------------------
  182|     96|    const char *key = ptr;
  183|     96|    const char *value;
  184|       |
  185|    605|    while(*ptr && *ptr != '=')
  ------------------
  |  Branch (185:11): [True: 591, False: 14]
  |  Branch (185:19): [True: 509, False: 82]
  ------------------
  186|    509|      ptr++;
  187|       |
  188|     96|    value = ptr + 1;
  189|       |
  190|    629|    while(*ptr && *ptr != ';')
  ------------------
  |  Branch (190:11): [True: 577, False: 52]
  |  Branch (190:19): [True: 533, False: 44]
  ------------------
  191|    533|      ptr++;
  192|       |
  193|     96|    if(curl_strnequal(key, "AUTH=", 5)) {
  ------------------
  |  Branch (193:8): [True: 70, False: 26]
  ------------------
  194|     70|      result = Curl_sasl_parse_url_auth_option(&pop3c->sasl,
  195|     70|                                               value, ptr - value);
  196|       |
  197|     70|      if(result && curl_strnequal(value, "+APOP", ptr - value)) {
  ------------------
  |  Branch (197:10): [True: 49, False: 21]
  |  Branch (197:20): [True: 29, False: 20]
  ------------------
  198|     29|        pop3c->preftype = POP3_TYPE_APOP;
  ------------------
  |  |   78|     29|#define POP3_TYPE_APOP      (1 << 1)
  ------------------
  199|     29|        pop3c->sasl.prefmech = SASL_AUTH_NONE;
  ------------------
  |  |   45|     29|#define SASL_AUTH_NONE          0
  ------------------
  200|     29|        result = CURLE_OK;
  201|     29|      }
  202|     70|    }
  203|     26|    else
  204|     26|      result = CURLE_URL_MALFORMAT;
  205|       |
  206|     96|    if(*ptr == ';')
  ------------------
  |  Branch (206:8): [True: 44, False: 52]
  ------------------
  207|     44|      ptr++;
  208|     96|  }
  209|       |
  210|  1.36k|  if(pop3c->preftype != POP3_TYPE_APOP)
  ------------------
  |  |   78|  1.36k|#define POP3_TYPE_APOP      (1 << 1)
  ------------------
  |  Branch (210:6): [True: 1.35k, False: 10]
  ------------------
  211|  1.35k|    switch(pop3c->sasl.prefmech) {
  212|     16|    case SASL_AUTH_NONE:
  ------------------
  |  |   45|     16|#define SASL_AUTH_NONE          0
  ------------------
  |  Branch (212:5): [True: 16, False: 1.33k]
  ------------------
  213|     16|      pop3c->preftype = POP3_TYPE_NONE;
  ------------------
  |  |   82|     16|#define POP3_TYPE_NONE 0
  ------------------
  214|     16|      break;
  215|  1.30k|    case SASL_AUTH_DEFAULT:
  ------------------
  |  |   47|  1.30k|#define SASL_AUTH_DEFAULT       (SASL_AUTH_ANY & ~SASL_MECH_EXTERNAL)
  |  |  ------------------
  |  |  |  |   46|  1.30k|#define SASL_AUTH_ANY           0xffff
  |  |  ------------------
  |  |               #define SASL_AUTH_DEFAULT       (SASL_AUTH_ANY & ~SASL_MECH_EXTERNAL)
  |  |  ------------------
  |  |  |  |   37|  1.30k|#define SASL_MECH_EXTERNAL          (1 << 5)
  |  |  ------------------
  ------------------
  |  Branch (215:5): [True: 1.30k, False: 50]
  ------------------
  216|  1.30k|      pop3c->preftype = POP3_TYPE_ANY;
  ------------------
  |  |   83|  1.30k|#define POP3_TYPE_ANY  (POP3_TYPE_CLEARTEXT | POP3_TYPE_APOP | POP3_TYPE_SASL)
  |  |  ------------------
  |  |  |  |   77|  1.30k|#define POP3_TYPE_CLEARTEXT (1 << 0)
  |  |  ------------------
  |  |               #define POP3_TYPE_ANY  (POP3_TYPE_CLEARTEXT | POP3_TYPE_APOP | POP3_TYPE_SASL)
  |  |  ------------------
  |  |  |  |   78|  1.30k|#define POP3_TYPE_APOP      (1 << 1)
  |  |  ------------------
  |  |               #define POP3_TYPE_ANY  (POP3_TYPE_CLEARTEXT | POP3_TYPE_APOP | POP3_TYPE_SASL)
  |  |  ------------------
  |  |  |  |   79|  1.30k|#define POP3_TYPE_SASL      (1 << 2)
  |  |  ------------------
  ------------------
  217|  1.30k|      break;
  218|     34|    default:
  ------------------
  |  Branch (218:5): [True: 34, False: 1.32k]
  ------------------
  219|     34|      pop3c->preftype = POP3_TYPE_SASL;
  ------------------
  |  |   79|     34|#define POP3_TYPE_SASL      (1 << 2)
  ------------------
  220|     34|      break;
  221|  1.35k|    }
  222|       |
  223|  1.36k|  return result;
  224|  1.36k|}
pop3.c:pop3_multi_statemach:
 1363|  6.45k|{
 1364|  6.45k|  CURLcode result = CURLE_OK;
 1365|  6.45k|  struct connectdata *conn = data->conn;
 1366|  6.45k|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  6.45k|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
 1367|       |
 1368|  6.45k|  if(!pop3c)
  ------------------
  |  Branch (1368:6): [True: 0, False: 6.45k]
  ------------------
 1369|      0|    return CURLE_FAILED_INIT;
 1370|  6.45k|  result = Curl_pp_statemach(data, &pop3c->pp, FALSE, FALSE);
  ------------------
  |  | 1058|  6.45k|#define FALSE false
  ------------------
                result = Curl_pp_statemach(data, &pop3c->pp, FALSE, FALSE);
  ------------------
  |  | 1058|  6.45k|#define FALSE false
  ------------------
 1371|  6.45k|  *done = (pop3c->state == POP3_STOP);
 1372|       |
 1373|  6.45k|  return result;
 1374|  6.45k|}
pop3.c:pop3_doing:
 1639|    130|{
 1640|    130|  CURLcode result = pop3_multi_statemach(data, dophase_done);
 1641|       |
 1642|    130|  if(result)
  ------------------
  |  Branch (1642:6): [True: 49, False: 81]
  ------------------
 1643|     49|    DEBUGF(infof(data, "DO phase failed"));
  ------------------
  |  | 1067|    473|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 49, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 49]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 49]
  |  |  ------------------
  ------------------
 1644|     81|  else if(*dophase_done) {
  ------------------
  |  Branch (1644:11): [True: 43, False: 38]
  ------------------
 1645|     43|    result = pop3_dophase_done(data, FALSE /* not connected */);
  ------------------
  |  | 1058|     43|#define FALSE false
  ------------------
 1646|       |
 1647|     43|    DEBUGF(infof(data, "DO phase is complete"));
  ------------------
  |  | 1067|    301|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 43, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 43]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 43]
  |  |  ------------------
  ------------------
 1648|     43|  }
 1649|       |
 1650|    130|  return result;
 1651|    130|}
pop3.c:pop3_pollset:
 1395|  4.08k|{
 1396|  4.08k|  struct pop3_conn *pop3c =
 1397|  4.08k|    Curl_conn_meta_get(data->conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  4.08k|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
 1398|  4.08k|  return pop3c ? Curl_pp_pollset(data, &pop3c->pp, ps) : CURLE_OK;
  ------------------
  |  Branch (1398:10): [True: 4.08k, False: 0]
  ------------------
 1399|  4.08k|}
pop3.c:pop3_disconnect:
 1611|  5.72k|{
 1612|  5.72k|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  5.72k|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
 1613|  5.72k|  (void)data;
 1614|       |
 1615|  5.72k|  if(!pop3c)
  ------------------
  |  Branch (1615:6): [True: 19, False: 5.71k]
  ------------------
 1616|     19|    return CURLE_FAILED_INIT;
 1617|       |
 1618|       |  /* We cannot send quit unconditionally. If this connection is stale or
 1619|       |     bad in any way, sending quit and waiting around here will make the
 1620|       |     disconnect wait in vain and cause more problems than we need to. */
 1621|       |
 1622|  5.71k|  if(!dead_connection && conn->bits.protoconnstart &&
  ------------------
  |  Branch (1622:6): [True: 450, False: 5.26k]
  |  Branch (1622:26): [True: 450, False: 0]
  ------------------
 1623|    450|     !Curl_pp_needs_flush(data, &pop3c->pp)) {
  ------------------
  |  Branch (1623:6): [True: 450, False: 0]
  ------------------
 1624|    450|    if(!pop3_perform_quit(data, conn))
  ------------------
  |  Branch (1624:8): [True: 450, False: 0]
  ------------------
 1625|    450|      (void)pop3_block_statemach(data, conn, TRUE); /* ignore errors on QUIT */
  ------------------
  |  | 1055|    450|#define TRUE true
  ------------------
 1626|    450|  }
 1627|       |
 1628|       |  /* Disconnect from the server */
 1629|  5.71k|  Curl_pp_disconnect(&pop3c->pp);
 1630|       |
 1631|       |  /* Cleanup our connection based variables */
 1632|  5.71k|  curlx_safefree(pop3c->apoptimestamp);
  ------------------
  |  | 1327|  5.71k|  do {                      \
  |  | 1328|  5.71k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  5.71k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  5.71k|    (ptr) = NULL;           \
  |  | 1330|  5.71k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
 1633|       |
 1634|  5.71k|  return CURLE_OK;
 1635|  5.72k|}
pop3.c:pop3_perform_quit:
  774|    450|{
  775|    450|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    450|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
  776|    450|  CURLcode result;
  777|       |
  778|    450|  if(!pop3c)
  ------------------
  |  Branch (778:6): [True: 0, False: 450]
  ------------------
  779|      0|    return CURLE_FAILED_INIT;
  780|       |
  781|       |  /* Send the QUIT command */
  782|    450|  result = Curl_pp_sendf(data, &pop3c->pp, "%s", "QUIT");
  783|    450|  if(!result)
  ------------------
  |  Branch (783:6): [True: 450, False: 0]
  ------------------
  784|    450|    pop3_state(data, POP3_QUIT);
  785|       |
  786|    450|  return result;
  787|    450|}
pop3.c:pop3_block_statemach:
 1379|    450|{
 1380|    450|  CURLcode result = CURLE_OK;
 1381|    450|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|    450|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
 1382|       |
 1383|    450|  if(!pop3c)
  ------------------
  |  Branch (1383:6): [True: 0, False: 450]
  ------------------
 1384|      0|    return CURLE_FAILED_INIT;
 1385|       |
 1386|    936|  while(pop3c->state != POP3_STOP && !result)
  ------------------
  |  Branch (1386:9): [True: 926, False: 10]
  |  Branch (1386:38): [True: 486, False: 440]
  ------------------
 1387|    486|    result = Curl_pp_statemach(data, &pop3c->pp, TRUE, disconnecting);
  ------------------
  |  | 1055|    486|#define TRUE true
  ------------------
 1388|       |
 1389|    450|  return result;
 1390|    450|}
pop3.c:pop3_write:
 1077|  1.65k|{
 1078|       |  /* This code could be made into a special function in the handler struct */
 1079|  1.65k|  CURLcode result = CURLE_OK;
 1080|  1.65k|  struct connectdata *conn = data->conn;
 1081|  1.65k|  struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
  ------------------
  |  |   92|  1.65k|#define CURL_META_POP3_CONN   "meta:proto:pop3:conn"
  ------------------
 1082|  1.65k|  bool strip_dot = FALSE;
  ------------------
  |  | 1058|  1.65k|#define FALSE false
  ------------------
 1083|  1.65k|  size_t last = 0;
 1084|  1.65k|  size_t i;
 1085|  1.65k|  (void)is_eos;
 1086|       |
 1087|  1.65k|  if(!pop3c)
  ------------------
  |  Branch (1087:6): [True: 0, False: 1.65k]
  ------------------
 1088|      0|    return CURLE_FAILED_INIT;
 1089|       |
 1090|       |  /* Search through the buffer looking for the end-of-body marker which is
 1091|       |     5 bytes (0d 0a 2e 0d 0a). Note that a line starting with a dot matches
 1092|       |     the eob so the server will have prefixed it with an extra dot which we
 1093|       |     need to strip out. Additionally the marker could of course be spread out
 1094|       |     over 5 different data chunks. */
 1095|  2.57M|  for(i = 0; i < nread; i++) {
  ------------------
  |  Branch (1095:14): [True: 2.57M, False: 1.65k]
  ------------------
 1096|  2.57M|    size_t prev = pop3c->eob;
 1097|       |
 1098|  2.57M|    switch(str[i]) {
 1099|   181k|    case 0x0d:
  ------------------
  |  Branch (1099:5): [True: 181k, False: 2.39M]
  ------------------
 1100|   181k|      if(pop3c->eob == 0) {
  ------------------
  |  Branch (1100:10): [True: 29.8k, False: 151k]
  ------------------
 1101|  29.8k|        pop3c->eob++;
 1102|       |
 1103|  29.8k|        if(i) {
  ------------------
  |  Branch (1103:12): [True: 29.7k, False: 50]
  ------------------
 1104|       |          /* Write out the body part that did not match */
 1105|  29.7k|          result = Curl_client_write(data, CLIENTWRITE_BODY, &str[last],
  ------------------
  |  |   42|  29.7k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
 1106|  29.7k|                                     i - last);
 1107|       |
 1108|  29.7k|          if(result)
  ------------------
  |  Branch (1108:14): [True: 5, False: 29.7k]
  ------------------
 1109|      5|            return result;
 1110|       |
 1111|  29.7k|          last = i;
 1112|  29.7k|        }
 1113|  29.8k|      }
 1114|   151k|      else if(pop3c->eob == 3)
  ------------------
  |  Branch (1114:15): [True: 2.38k, False: 149k]
  ------------------
 1115|  2.38k|        pop3c->eob++;
 1116|   149k|      else
 1117|       |        /* If the character match was not at position 0 or 3 then restart the
 1118|       |           pattern matching */
 1119|   149k|        pop3c->eob = 1;
 1120|   181k|      break;
 1121|       |
 1122|   360k|    case 0x0a:
  ------------------
  |  Branch (1122:5): [True: 360k, False: 2.21M]
  ------------------
 1123|   360k|      if(pop3c->eob == 1 || pop3c->eob == 4)
  ------------------
  |  Branch (1123:10): [True: 6.99k, False: 353k]
  |  Branch (1123:29): [True: 1.98k, False: 351k]
  ------------------
 1124|  8.98k|        pop3c->eob++;
 1125|   351k|      else
 1126|       |        /* If the character match was not at position 1 or 4 then start the
 1127|       |           search again */
 1128|   351k|        pop3c->eob = 0;
 1129|   360k|      break;
 1130|       |
 1131|  45.3k|    case 0x2e:
  ------------------
  |  Branch (1131:5): [True: 45.3k, False: 2.52M]
  ------------------
 1132|  45.3k|      if(pop3c->eob == 2)
  ------------------
  |  Branch (1132:10): [True: 3.86k, False: 41.4k]
  ------------------
 1133|  3.86k|        pop3c->eob++;
 1134|  41.4k|      else if(pop3c->eob == 3) {
  ------------------
  |  Branch (1134:15): [True: 551, False: 40.9k]
  ------------------
 1135|       |        /* We have an extra dot after the CRLF which we need to strip off */
 1136|    551|        strip_dot = TRUE;
  ------------------
  |  | 1055|    551|#define TRUE true
  ------------------
 1137|    551|        pop3c->eob = 0;
 1138|    551|      }
 1139|  40.9k|      else
 1140|       |        /* If the character match was not at position 2 then start the search
 1141|       |           again */
 1142|  40.9k|        pop3c->eob = 0;
 1143|  45.3k|      break;
 1144|       |
 1145|  1.98M|    default:
  ------------------
  |  Branch (1145:5): [True: 1.98M, False: 587k]
  ------------------
 1146|  1.98M|      pop3c->eob = 0;
 1147|  1.98M|      break;
 1148|  2.57M|    }
 1149|       |
 1150|       |    /* Did we have a partial match which has subsequently failed? */
 1151|  2.57M|    if(prev && prev >= pop3c->eob) {
  ------------------
  |  Branch (1151:8): [True: 194k, False: 2.37M]
  |  Branch (1151:16): [True: 179k, False: 15.2k]
  ------------------
 1152|       |      /* Strip can only be non-zero for the first mismatch after CRLF and
 1153|       |         then both prev and strip are equal and nothing will be output below */
 1154|   179k|      while(prev && pop3c->strip) {
  ------------------
  |  Branch (1154:13): [True: 179k, False: 268]
  |  Branch (1154:21): [True: 702, False: 178k]
  ------------------
 1155|    702|        prev--;
 1156|    702|        pop3c->strip--;
 1157|    702|      }
 1158|       |
 1159|   179k|      if(prev) {
  ------------------
  |  Branch (1159:10): [True: 178k, False: 268]
  ------------------
 1160|       |        /* If the partial match was the CRLF and dot then only write the CRLF
 1161|       |           as the server would have inserted the dot */
 1162|   178k|        if(strip_dot && prev - 1 > 0) {
  ------------------
  |  Branch (1162:12): [True: 551, False: 178k]
  |  Branch (1162:25): [True: 542, False: 9]
  ------------------
 1163|    542|          result = Curl_client_write(data, CLIENTWRITE_BODY, POP3_EOB,
  ------------------
  |  |   42|    542|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
                        result = Curl_client_write(data, CLIENTWRITE_BODY, POP3_EOB,
  ------------------
  |  |   86|    542|#define POP3_EOB     "\x0d\x0a\x2e\x0d\x0a"
  ------------------
 1164|    542|                                     prev - 1);
 1165|    542|        }
 1166|   178k|        else if(!strip_dot) {
  ------------------
  |  Branch (1166:17): [True: 178k, False: 9]
  ------------------
 1167|   178k|          result = Curl_client_write(data, CLIENTWRITE_BODY, POP3_EOB,
  ------------------
  |  |   42|   178k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
                        result = Curl_client_write(data, CLIENTWRITE_BODY, POP3_EOB,
  ------------------
  |  |   86|   178k|#define POP3_EOB     "\x0d\x0a\x2e\x0d\x0a"
  ------------------
 1168|   178k|                                     prev);
 1169|   178k|        }
 1170|      9|        else {
 1171|      9|          result = CURLE_OK;
 1172|      9|        }
 1173|       |
 1174|   178k|        if(result)
  ------------------
  |  Branch (1174:12): [True: 1, False: 178k]
  ------------------
 1175|      1|          return result;
 1176|       |
 1177|   178k|        last = i;
 1178|   178k|        strip_dot = FALSE;
  ------------------
  |  | 1058|   178k|#define FALSE false
  ------------------
 1179|   178k|      }
 1180|   179k|    }
 1181|  2.57M|  }
 1182|       |
 1183|  1.65k|  if(pop3c->eob == POP3_EOB_LEN) {
  ------------------
  |  |   87|  1.65k|#define POP3_EOB_LEN 5
  ------------------
  |  Branch (1183:6): [True: 12, False: 1.63k]
  ------------------
 1184|       |    /* We have a full match so the transfer is done, however we must transfer
 1185|       |    the CRLF at the start of the EOB as this is considered to be part of the
 1186|       |    message as per RFC-1939, sect. 3 */
 1187|     12|    result = Curl_client_write(data, CLIENTWRITE_BODY, POP3_EOB, 2);
  ------------------
  |  |   42|     12|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
                  result = Curl_client_write(data, CLIENTWRITE_BODY, POP3_EOB, 2);
  ------------------
  |  |   86|     12|#define POP3_EOB     "\x0d\x0a\x2e\x0d\x0a"
  ------------------
 1188|       |
 1189|     12|    CURL_REQ_CLEAR_RECV(data);
  ------------------
  |  |   49|     12|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|     12|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
 1190|     12|    pop3c->eob = 0;
 1191|       |
 1192|     12|    return result;
 1193|     12|  }
 1194|       |
 1195|  1.63k|  if(pop3c->eob)
  ------------------
  |  Branch (1195:6): [True: 325, False: 1.31k]
  ------------------
 1196|       |    /* While EOB is matching nothing should be output */
 1197|    325|    return CURLE_OK;
 1198|       |
 1199|  1.31k|  if(nread - last) {
  ------------------
  |  Branch (1199:6): [True: 1.06k, False: 246]
  ------------------
 1200|  1.06k|    result = Curl_client_write(data, CLIENTWRITE_BODY, &str[last],
  ------------------
  |  |   42|  1.06k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
 1201|  1.06k|                               nread - last);
 1202|  1.06k|  }
 1203|       |
 1204|  1.31k|  return result;
 1205|  1.63k|}

time2str:
   40|    843|{
   41|    843|  curl_off_t h;
   42|    843|  if(seconds <= 0) {
  ------------------
  |  Branch (42:6): [True: 843, False: 0]
  ------------------
   43|    843|    curlx_strcopy(r, rsize, STRCONST("       "));
  ------------------
  |  | 1292|    843|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   44|    843|    return;
   45|    843|  }
   46|      0|  h = seconds / 3600;
   47|      0|  if(h <= 99) {
  ------------------
  |  Branch (47:6): [True: 0, False: 0]
  ------------------
   48|      0|    curl_off_t m = (seconds - (h * 3600)) / 60;
   49|      0|    if(h <= 9) {
  ------------------
  |  Branch (49:8): [True: 0, False: 0]
  ------------------
   50|      0|      curl_off_t s = (seconds - (h * 3600)) - (m * 60);
   51|      0|      if(h)
  ------------------
  |  Branch (51:10): [True: 0, False: 0]
  ------------------
   52|      0|        curl_msnprintf(r, rsize, "%" FMT_OFF_T ":%02" FMT_OFF_T ":"
   53|      0|                       "%02" FMT_OFF_T, h, m, s);
  ------------------
  |  |  598|      0|#define FMT_OFF_T  CURL_FORMAT_CURL_OFF_T
  |  |  ------------------
  |  |  |  |  341|      0|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  |  |  ------------------
  ------------------
   54|      0|      else
   55|      0|        curl_msnprintf(r, rsize, "  %02" FMT_OFF_T ":%02" FMT_OFF_T, m, s);
  ------------------
  |  |  598|      0|#define FMT_OFF_T  CURL_FORMAT_CURL_OFF_T
  |  |  ------------------
  |  |  |  |  341|      0|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  |  |  ------------------
  ------------------
   56|      0|    }
   57|      0|    else
   58|      0|      curl_msnprintf(r, rsize, "%" FMT_OFF_T "h %02" FMT_OFF_T "m", h, m);
   59|      0|  }
   60|      0|  else {
   61|      0|    curl_off_t d = seconds / 86400;
   62|      0|    h = (seconds - (d * 86400)) / 3600;
   63|      0|    if(d <= 99)
  ------------------
  |  Branch (63:8): [True: 0, False: 0]
  ------------------
   64|      0|      curl_msnprintf(r, rsize, "%2" FMT_OFF_T "d %02" FMT_OFF_T "h", d, h);
   65|      0|    else if(d <= 999)
  ------------------
  |  Branch (65:13): [True: 0, False: 0]
  ------------------
   66|      0|      curl_msnprintf(r, rsize, "%6" FMT_OFF_T "d", d);
   67|      0|    else { /* more than 999 days */
   68|      0|      curl_off_t m = d / 30;
   69|      0|      if(m <= 999)
  ------------------
  |  Branch (69:10): [True: 0, False: 0]
  ------------------
   70|      0|        curl_msnprintf(r, rsize, "%6" FMT_OFF_T "m", m);
   71|      0|      else { /* more than 999 months */
   72|      0|        curl_off_t y = d / 365;
   73|      0|        if(y <= 99999)
  ------------------
  |  Branch (73:12): [True: 0, False: 0]
  ------------------
   74|      0|          curl_msnprintf(r, rsize, "%6" FMT_OFF_T "y", y);
   75|      0|        else
   76|      0|          curlx_strcopy(r, rsize, STRCONST(">99999y"));
  ------------------
  |  | 1292|      0|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   77|      0|      }
   78|      0|    }
   79|      0|  }
   80|      0|}
max6out:
   90|  1.68k|{
   91|       |  /* a signed 64-bit value is 8192 petabytes maximum, shown as
   92|       |     8.0E (exabytes)*/
   93|  1.68k|  if(bytes < 100000)
  ------------------
  |  Branch (93:6): [True: 1.49k, False: 196]
  ------------------
   94|  1.49k|    curl_msnprintf(max6, mlen, "%6" CURL_FORMAT_CURL_OFF_T, bytes);
  ------------------
  |  |  341|  1.49k|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  ------------------
   95|    196|  else {
   96|    196|    const char unit[] = { 'k', 'M', 'G', 'T', 'P', 'E', 0 };
   97|    196|    int k = 0;
   98|    196|    curl_off_t nbytes;
   99|    196|    curl_off_t rest;
  100|    291|    do {
  101|    291|      nbytes = bytes / 1024;
  102|    291|      if(nbytes < 1000)
  ------------------
  |  Branch (102:10): [True: 196, False: 95]
  ------------------
  103|    196|        break;
  104|     95|      bytes = nbytes;
  105|     95|      k++;
  106|     95|      DEBUGASSERT(unit[k]);
  ------------------
  |  | 1081|     95|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (106:7): [True: 0, False: 95]
  |  Branch (106:7): [True: 95, False: 0]
  ------------------
  107|     95|    } while(unit[k]);
  ------------------
  |  Branch (107:13): [True: 95, False: 0]
  ------------------
  108|    196|    rest = bytes % 1024;
  109|    196|    if(nbytes <= 99)
  ------------------
  |  Branch (109:8): [True: 96, False: 100]
  ------------------
  110|       |      /* xx.yyU */
  111|     96|      curl_msnprintf(max6, mlen, "%2" CURL_FORMAT_CURL_OFF_T
  112|     96|                     ".%02" CURL_FORMAT_CURL_OFF_T "%c", nbytes,
  113|     96|                     rest * 100 / 1024, unit[k]);
  114|    100|    else
  115|       |      /* xxx.yU */
  116|    100|      curl_msnprintf(max6, mlen, "%3" CURL_FORMAT_CURL_OFF_T
  117|    100|                     ".%" CURL_FORMAT_CURL_OFF_T "%c", nbytes,
  118|    100|                     rest * 10 / 1024, unit[k]);
  119|    196|  }
  120|  1.68k|  return max6;
  121|  1.68k|}
pgrs_speedcheck:
  136|  1.06k|{
  137|  1.06k|  if(!data->set.low_speed_time || !data->set.low_speed_limit ||
  ------------------
  |  Branch (137:6): [True: 999, False: 62]
  |  Branch (137:35): [True: 10, False: 52]
  ------------------
  138|     52|     Curl_xfer_recv_is_paused(data) || Curl_xfer_send_is_paused(data))
  ------------------
  |  Branch (138:6): [True: 0, False: 52]
  |  Branch (138:40): [True: 0, False: 52]
  ------------------
  139|       |    /* A paused transfer is not qualified for speed checks */
  140|  1.00k|    return CURLE_OK;
  141|       |
  142|     52|  if(data->progress.current_speed >= 0) {
  ------------------
  |  Branch (142:6): [True: 52, False: 0]
  ------------------
  143|     52|    if(data->progress.current_speed < data->set.low_speed_limit) {
  ------------------
  |  Branch (143:8): [True: 32, False: 20]
  ------------------
  144|     32|      if(!data->state.keeps_speed.tv_sec)
  ------------------
  |  Branch (144:10): [True: 24, False: 8]
  ------------------
  145|       |        /* under the limit at this moment */
  146|     24|        data->state.keeps_speed = *pnow;
  147|      8|      else {
  148|       |        /* how long has it been under the limit */
  149|      8|        timediff_t howlong =
  150|      8|          curlx_ptimediff_ms(pnow, &data->state.keeps_speed);
  151|       |
  152|      8|        if(howlong >= data->set.low_speed_time * 1000) {
  ------------------
  |  Branch (152:12): [True: 0, False: 8]
  ------------------
  153|       |          /* too long */
  154|      0|          failf(data, "Operation too slow. Less than %" FMT_OFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  155|      0|                " bytes/sec transferred the last %u seconds",
  156|      0|                data->set.low_speed_limit, data->set.low_speed_time);
  157|      0|          return CURLE_OPERATION_TIMEDOUT;
  158|      0|        }
  159|      8|      }
  160|     32|    }
  161|     20|    else
  162|       |      /* faster right now */
  163|     20|      data->state.keeps_speed.tv_sec = 0;
  164|     52|  }
  165|       |
  166|       |  /* since low speed limit is enabled, set the expire timer to make this
  167|       |     connection's speed get checked again in a second */
  168|     52|  Curl_expire(data, 1000, EXPIRE_SPEEDCHECK);
  169|       |
  170|     52|  return CURLE_OK;
  171|     52|}
Curl_pgrs_now:
  174|  2.59M|{
  175|  2.59M|  struct curltime *pnow = data->multi ?
  ------------------
  |  Branch (175:27): [True: 2.59M, False: 282]
  ------------------
  176|  2.59M|                          &data->multi->now : &data->progress.now;
  177|  2.59M|  curlx_pnow(pnow);
  178|  2.59M|  return pnow;
  179|  2.59M|}
Curl_pgrsDone:
  194|  1.36k|{
  195|  1.36k|  int rc;
  196|  1.36k|  data->progress.lastshow = 0;
  197|  1.36k|  rc = Curl_pgrsUpdate(data); /* the final (forced) update */
  198|  1.36k|  if(rc)
  ------------------
  |  Branch (198:6): [True: 0, False: 1.36k]
  ------------------
  199|      0|    return rc;
  200|       |
  201|  1.36k|  if(!data->progress.hide && !data->progress.callback)
  ------------------
  |  Branch (201:6): [True: 83, False: 1.28k]
  |  Branch (201:30): [True: 83, False: 0]
  ------------------
  202|       |    /* only output if we do not use a progress callback and we are not
  203|       |     * hidden */
  204|     83|    curl_mfprintf(data->set.err, "\n");
  205|       |
  206|  1.36k|  return 0;
  207|  1.36k|}
Curl_pgrsReset:
  210|  6.59k|{
  211|  6.59k|  Curl_pgrsSetUploadCounter(data, 0);
  212|  6.59k|  data->progress.dl.cur_size = 0;
  213|  6.59k|  Curl_pgrsSetUploadSize(data, -1);
  214|  6.59k|  Curl_pgrsSetDownloadSize(data, -1);
  215|  6.59k|  data->progress.speeder_c = 0; /* reset speed records */
  216|  6.59k|  data->progress.deliver = 0;
  217|  6.59k|  pgrs_speedinit(data);
  218|  6.59k|}
Curl_pgrsResetTransferSizes:
  222|  7.49k|{
  223|  7.49k|  Curl_pgrsSetDownloadSize(data, -1);
  224|  7.49k|  Curl_pgrsSetUploadSize(data, -1);
  225|  7.49k|}
Curl_pgrsTimeWas:
  248|  38.1k|{
  249|  38.1k|  timediff_t *delta = NULL;
  250|       |
  251|  38.1k|  switch(timer) {
  252|      0|  default:
  ------------------
  |  Branch (252:3): [True: 0, False: 38.1k]
  ------------------
  253|      0|  case TIMER_NONE:
  ------------------
  |  Branch (253:3): [True: 0, False: 38.1k]
  ------------------
  254|       |    /* mistake filter */
  255|      0|    break;
  256|  13.2k|  case TIMER_STARTOP:
  ------------------
  |  Branch (256:3): [True: 13.2k, False: 24.9k]
  ------------------
  257|       |    /* This is set at the start of a transfer */
  258|  13.2k|    data->progress.t_startop = timestamp;
  259|  13.2k|    data->progress.t_startqueue = timestamp;
  260|  13.2k|    data->progress.t_postqueue = 0;
  261|  13.2k|    break;
  262|  7.49k|  case TIMER_STARTSINGLE:
  ------------------
  |  Branch (262:3): [True: 7.49k, False: 30.6k]
  ------------------
  263|       |    /* This is set at the start of each single transfer */
  264|  7.49k|    data->progress.t_startsingle = timestamp;
  265|  7.49k|    data->progress.is_t_startransfer_set = FALSE;
  ------------------
  |  | 1058|  7.49k|#define FALSE false
  ------------------
  266|  7.49k|    break;
  267|  6.06k|  case TIMER_POSTQUEUE:
  ------------------
  |  Branch (267:3): [True: 6.06k, False: 32.1k]
  ------------------
  268|       |    /* Queue time is accumulative from all involved redirects */
  269|  6.06k|    data->progress.t_postqueue +=
  270|  6.06k|      curlx_ptimediff_us(&timestamp, &data->progress.t_startqueue);
  271|  6.06k|    break;
  272|      0|  case TIMER_STARTACCEPT:
  ------------------
  |  Branch (272:3): [True: 0, False: 38.1k]
  ------------------
  273|      0|    data->progress.t_acceptdata = timestamp;
  274|      0|    break;
  275|  5.45k|  case TIMER_NAMELOOKUP:
  ------------------
  |  Branch (275:3): [True: 5.45k, False: 32.7k]
  ------------------
  276|  5.45k|    delta = &data->progress.t_nslookup;
  277|  5.45k|    break;
  278|  5.16k|  case TIMER_CONNECT:
  ------------------
  |  Branch (278:3): [True: 5.16k, False: 33.0k]
  ------------------
  279|  5.16k|    delta = &data->progress.t_connect;
  280|  5.16k|    break;
  281|      0|  case TIMER_APPCONNECT:
  ------------------
  |  Branch (281:3): [True: 0, False: 38.1k]
  ------------------
  282|      0|    delta = &data->progress.t_appconnect;
  283|      0|    break;
  284|    427|  case TIMER_PRETRANSFER:
  ------------------
  |  Branch (284:3): [True: 427, False: 37.7k]
  ------------------
  285|    427|    delta = &data->progress.t_pretransfer;
  286|    427|    break;
  287|    350|  case TIMER_STARTTRANSFER:
  ------------------
  |  Branch (287:3): [True: 350, False: 37.8k]
  ------------------
  288|    350|    delta = &data->progress.t_starttransfer;
  289|       |    /* prevent updating t_starttransfer unless:
  290|       |     *   1. this is the first time we are setting t_starttransfer
  291|       |     *   2. a redirect has occurred since the last time t_starttransfer was set
  292|       |     * This prevents repeated invocations of the function from incorrectly
  293|       |     * changing the t_starttransfer time.
  294|       |     */
  295|    350|    if(data->progress.is_t_startransfer_set) {
  ------------------
  |  Branch (295:8): [True: 0, False: 350]
  ------------------
  296|      0|      return;
  297|      0|    }
  298|    350|    else {
  299|    350|      data->progress.is_t_startransfer_set = TRUE;
  ------------------
  |  | 1055|    350|#define TRUE true
  ------------------
  300|    350|      break;
  301|    350|    }
  302|      0|  case TIMER_POSTRANSFER:
  ------------------
  |  Branch (302:3): [True: 0, False: 38.1k]
  ------------------
  303|      0|    delta = &data->progress.t_posttransfer;
  304|      0|    break;
  305|      0|  case TIMER_REDIRECT:
  ------------------
  |  Branch (305:3): [True: 0, False: 38.1k]
  ------------------
  306|      0|    data->progress.t_redirect = curlx_ptimediff_us(&timestamp,
  307|      0|                                                   &data->progress.start);
  308|      0|    data->progress.t_startqueue = timestamp;
  309|      0|    break;
  310|  38.1k|  }
  311|  38.1k|  if(delta) {
  ------------------
  |  Branch (311:6): [True: 11.3k, False: 26.7k]
  ------------------
  312|  11.3k|    timediff_t us = curlx_ptimediff_us(&timestamp,
  313|  11.3k|                                       &data->progress.t_startsingle);
  314|  11.3k|    if(us < 1)
  ------------------
  |  Branch (314:8): [True: 0, False: 11.3k]
  ------------------
  315|      0|      us = 1; /* make sure at least one microsecond passed */
  316|  11.3k|    *delta += us;
  317|  11.3k|  }
  318|  38.1k|}
Curl_pgrsTime:
  327|  33.0k|{
  328|  33.0k|  Curl_pgrsTimeWas(data, timer, *Curl_pgrs_now(data));
  329|  33.0k|}
Curl_pgrsStartNow:
  332|  7.49k|{
  333|  7.49k|  struct Progress *p = &data->progress;
  334|       |
  335|  7.49k|  p->speeder_c = 0; /* reset the progress meter display */
  336|  7.49k|  p->start = *Curl_pgrs_now(data);
  337|  7.49k|  p->is_t_startransfer_set = FALSE;
  ------------------
  |  | 1058|  7.49k|#define FALSE false
  ------------------
  338|  7.49k|  p->dl.cur_size = 0;
  339|  7.49k|  p->ul.cur_size = 0;
  340|       |  /* the sizes are unknown at start */
  341|  7.49k|  p->dl_size_known = FALSE;
  ------------------
  |  | 1058|  7.49k|#define FALSE false
  ------------------
  342|       |  p->ul_size_known = FALSE;
  ------------------
  |  | 1058|  7.49k|#define FALSE false
  ------------------
  343|  7.49k|}
Curl_pgrs_deliver_check:
  348|   211k|{
  349|   211k|  if(data->set.max_filesize &&
  ------------------
  |  Branch (349:6): [True: 791, False: 210k]
  ------------------
  350|    791|     ((curl_off_t)delta > data->set.max_filesize - data->progress.deliver)) {
  ------------------
  |  Branch (350:6): [True: 0, False: 791]
  ------------------
  351|      0|    failf(data, "Would have exceeded max file size");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  352|      0|    return CURLE_FILESIZE_EXCEEDED;
  353|      0|  }
  354|   211k|  return CURLE_OK;
  355|   211k|}
Curl_pgrs_deliver_inc:
  360|   211k|{
  361|   211k|  data->progress.deliver += delta;
  362|   211k|}
Curl_pgrs_download_inc:
  365|   209k|{
  366|   209k|  if(delta) {
  ------------------
  |  Branch (366:6): [True: 209k, False: 0]
  ------------------
  367|   209k|    data->progress.dl.cur_size += delta;
  368|   209k|    Curl_rlimit_drain(&data->progress.dl.rlimit, delta, Curl_pgrs_now(data));
  369|   209k|  }
  370|   209k|}
Curl_pgrsSetUploadCounter:
  384|  6.59k|{
  385|  6.59k|  data->progress.ul.cur_size = size;
  386|  6.59k|}
Curl_pgrsSetDownloadSize:
  389|  14.0k|{
  390|  14.0k|  if(size >= 0) {
  ------------------
  |  Branch (390:6): [True: 0, False: 14.0k]
  ------------------
  391|      0|    data->progress.dl.total_size = size;
  392|      0|    data->progress.dl_size_known = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  393|      0|  }
  394|  14.0k|  else {
  395|  14.0k|    data->progress.dl.total_size = 0;
  396|       |    data->progress.dl_size_known = FALSE;
  ------------------
  |  | 1058|  14.0k|#define FALSE false
  ------------------
  397|  14.0k|  }
  398|  14.0k|}
Curl_pgrsSetUploadSize:
  401|  14.0k|{
  402|  14.0k|  if(size >= 0) {
  ------------------
  |  Branch (402:6): [True: 0, False: 14.0k]
  ------------------
  403|      0|    data->progress.ul.total_size = size;
  404|      0|    data->progress.ul_size_known = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  405|      0|  }
  406|  14.0k|  else {
  407|  14.0k|    data->progress.ul.total_size = 0;
  408|       |    data->progress.ul_size_known = FALSE;
  ------------------
  |  | 1058|  14.0k|#define FALSE false
  ------------------
  409|  14.0k|  }
  410|  14.0k|}
Curl_pgrsUpdate:
  685|   438k|{
  686|   438k|  return pgrs_update(data, Curl_pgrs_now(data));
  687|   438k|}
Curl_pgrsCheck:
  690|  1.06k|{
  691|  1.06k|  CURLcode result;
  692|       |
  693|  1.06k|  result = pgrs_update(data, Curl_pgrs_now(data));
  694|  1.06k|  if(!result && !data->req.done)
  ------------------
  |  Branch (694:6): [True: 1.06k, False: 0]
  |  Branch (694:17): [True: 1.06k, False: 0]
  ------------------
  695|  1.06k|    result = pgrs_speedcheck(data, Curl_pgrs_now(data));
  696|  1.06k|  return result;
  697|  1.06k|}
Curl_pgrsUpdate_nometer:
  703|  1.32k|{
  704|  1.32k|  (void)progress_calc(data, Curl_pgrs_now(data));
  705|  1.32k|}
progress.c:pgrs_speedinit:
  125|  6.59k|{
  126|  6.59k|  memset(&data->state.keeps_speed, 0, sizeof(struct curltime));
  127|  6.59k|}
progress.c:pgrs_update:
  679|   439k|{
  680|       |  bool showprogress = progress_calc(data, pnow);
  681|   439k|  return pgrsupdate(data, showprogress);
  682|   439k|}
progress.c:pgrsupdate:
  632|   439k|{
  633|   439k|  if(!data->progress.hide) {
  ------------------
  |  Branch (633:6): [True: 697, False: 438k]
  ------------------
  634|    697|    int rc;
  635|    697|    if(data->set.fxferinfo) {
  ------------------
  |  Branch (635:8): [True: 0, False: 697]
  ------------------
  636|       |      /* There is a callback set, call that */
  637|      0|      Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  638|      0|      rc = data->set.fxferinfo(data->set.progress_client,
  639|      0|                               data->progress.dl.total_size,
  640|      0|                               data->progress.dl.cur_size,
  641|      0|                               data->progress.ul.total_size,
  642|      0|                               data->progress.ul.cur_size);
  643|      0|      Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  644|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  234|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (644:10): [True: 0, False: 0]
  ------------------
  645|      0|        if(rc) {
  ------------------
  |  Branch (645:12): [True: 0, False: 0]
  ------------------
  646|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  647|      0|          return CURLE_ABORTED_BY_CALLBACK;
  648|      0|        }
  649|      0|        return CURLE_OK;
  650|      0|      }
  651|      0|    }
  652|    697|    else if(data->set.fprogress) {
  ------------------
  |  Branch (652:13): [True: 0, False: 697]
  ------------------
  653|       |      /* The older deprecated callback is set, call that */
  654|      0|      Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  655|      0|      rc = data->set.fprogress(data->set.progress_client,
  656|      0|                               (double)data->progress.dl.total_size,
  657|      0|                               (double)data->progress.dl.cur_size,
  658|      0|                               (double)data->progress.ul.total_size,
  659|      0|                               (double)data->progress.ul.cur_size);
  660|      0|      Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  661|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  234|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (661:10): [True: 0, False: 0]
  ------------------
  662|      0|        if(rc) {
  ------------------
  |  Branch (662:12): [True: 0, False: 0]
  ------------------
  663|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  664|      0|          return CURLE_ABORTED_BY_CALLBACK;
  665|      0|        }
  666|      0|        return CURLE_OK;
  667|      0|      }
  668|      0|    }
  669|       |
  670|    697|    if(showprogress)
  ------------------
  |  Branch (670:8): [True: 281, False: 416]
  ------------------
  671|    281|      progress_meter(data);
  672|    697|  }
  673|       |
  674|   439k|  return CURLE_OK;
  675|   439k|}
progress.c:progress_meter:
  538|    281|{
  539|    281|  struct Progress *p = &data->progress;
  540|    281|  char max6[6][7];
  541|    281|  struct pgrs_estimate dl_estm;
  542|    281|  struct pgrs_estimate ul_estm;
  543|    281|  struct pgrs_estimate total_estm;
  544|    281|  curl_off_t total_cur_size;
  545|    281|  curl_off_t total_expected_size;
  546|    281|  curl_off_t dl_size;
  547|    281|  char time_left[8];
  548|    281|  char time_total[8];
  549|    281|  char time_spent[8];
  550|    281|  curl_off_t cur_secs = (curl_off_t)p->timespent / 1000000; /* seconds */
  551|       |
  552|    281|  if(!p->headers_out) {
  ------------------
  |  Branch (552:6): [True: 85, False: 196]
  ------------------
  553|     85|    if(data->state.resume_from) {
  ------------------
  |  Branch (553:8): [True: 17, False: 68]
  ------------------
  554|     17|      curl_mfprintf(data->set.err,
  555|     17|                    "** Resuming transfer from byte position %" FMT_OFF_T "\n",
  556|     17|                    data->state.resume_from);
  557|     17|    }
  558|     85|    curl_mfprintf(data->set.err,
  559|     85|                  "  %% Total    %% Received %% Xferd  Average Speed  "
  560|     85|                  "Time    Time    Time   Current\n"
  561|     85|                  "                                 Dload  Upload  "
  562|     85|                  "Total   Spent   Left   Speed\n");
  563|     85|    p->headers_out = TRUE; /* headers are shown */
  ------------------
  |  | 1055|     85|#define TRUE true
  ------------------
  564|     85|  }
  565|       |
  566|       |  /* Figure out the estimated time of arrival for upload and download */
  567|    281|  pgrs_estimates(&p->ul, (bool)p->ul_size_known, &ul_estm);
  568|    281|  pgrs_estimates(&p->dl, (bool)p->dl_size_known, &dl_estm);
  569|       |
  570|       |  /* Since both happen at the same time, total expected duration is max. */
  571|    281|  total_estm.secs = CURLMAX(ul_estm.secs, dl_estm.secs);
  ------------------
  |  | 1286|    281|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 0, False: 281]
  |  |  ------------------
  ------------------
  572|       |  /* create the three time strings */
  573|    281|  time2str(time_left, sizeof(time_left),
  574|    281|           total_estm.secs > 0 ? (total_estm.secs - cur_secs) : 0);
  ------------------
  |  Branch (574:12): [True: 0, False: 281]
  ------------------
  575|    281|  time2str(time_total, sizeof(time_total), total_estm.secs);
  576|    281|  time2str(time_spent, sizeof(time_spent), cur_secs);
  577|       |
  578|       |  /* Get the total amount of data expected to get transferred */
  579|    281|  total_expected_size = p->ul_size_known ? p->ul.total_size : p->ul.cur_size;
  ------------------
  |  Branch (579:25): [True: 0, False: 281]
  ------------------
  580|       |
  581|    281|  dl_size = p->dl_size_known ? p->dl.total_size : p->dl.cur_size;
  ------------------
  |  Branch (581:13): [True: 0, False: 281]
  ------------------
  582|       |
  583|       |  /* integer overflow check */
  584|    281|  if((CURL_OFF_T_MAX - total_expected_size) < dl_size)
  ------------------
  |  |  594|    281|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (584:6): [True: 0, False: 281]
  ------------------
  585|      0|    total_expected_size = CURL_OFF_T_MAX; /* capped */
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  586|    281|  else
  587|    281|    total_expected_size += dl_size;
  588|       |
  589|       |  /* We have transferred this much so far */
  590|    281|  total_cur_size = p->dl.cur_size + p->ul.cur_size;
  591|       |
  592|       |  /* Get the percentage of data transferred so far */
  593|    281|  total_estm.percent = pgrs_est_percent(total_expected_size, total_cur_size);
  594|       |
  595|    281|  curl_mfprintf(data->set.err,
  596|    281|                "\r"
  597|    281|                "%3" FMT_OFF_T " %s "
  598|    281|                "%3" FMT_OFF_T " %s "
  599|    281|                "%3" FMT_OFF_T " %s %s %s %s %s %s %s",
  600|    281|                total_estm.percent, /* 3 letters */    /* total % */
  601|    281|                max6out(total_expected_size, max6[2],
  602|    281|                        sizeof(max6[2])),              /* total size */
  603|    281|                dl_estm.percent, /* 3 letters */       /* rcvd % */
  604|    281|                max6out(p->dl.cur_size, max6[0],
  605|    281|                        sizeof(max6[0])),              /* rcvd size */
  606|    281|                ul_estm.percent, /* 3 letters */       /* xfer % */
  607|    281|                max6out(p->ul.cur_size, max6[1],
  608|    281|                        sizeof(max6[1])),              /* xfer size */
  609|    281|                max6out(p->dl.speed, max6[3],
  610|    281|                        sizeof(max6[3])),              /* avrg dl speed */
  611|    281|                max6out(p->ul.speed, max6[4],
  612|    281|                        sizeof(max6[4])),              /* avrg ul speed */
  613|    281|                time_total,    /* 7 letters */         /* total time */
  614|    281|                time_spent,    /* 7 letters */         /* time spent */
  615|    281|                time_left,     /* 7 letters */         /* time left */
  616|    281|                max6out(p->current_speed, max6[5],
  617|    281|                        sizeof(max6[5]))               /* current speed */
  618|    281|    );
  619|       |
  620|       |  /* we flush the output stream to make it appear as soon as possible */
  621|    281|  fflush(data->set.err);
  622|    281|}
progress.c:pgrs_estimates:
  528|    562|{
  529|    562|  est->secs = 0;
  530|    562|  est->percent = 0;
  531|    562|  if(total_known && (d->speed > 0)) {
  ------------------
  |  Branch (531:6): [True: 0, False: 562]
  |  Branch (531:21): [True: 0, False: 0]
  ------------------
  532|      0|    est->secs = d->total_size / d->speed;
  533|      0|    est->percent = pgrs_est_percent(d->total_size, d->cur_size);
  534|      0|  }
  535|    562|}
progress.c:pgrs_est_percent:
  517|    281|{
  518|    281|  if(total > 10000)
  ------------------
  |  Branch (518:6): [True: 9, False: 272]
  ------------------
  519|      9|    return cur / (total / 100);
  520|    272|  else if(total > 0)
  ------------------
  |  Branch (520:11): [True: 171, False: 101]
  ------------------
  521|    171|    return (cur * 100) / total;
  522|    101|  return 0;
  523|    281|}
progress.c:progress_calc:
  434|   440k|{
  435|   440k|  struct Progress * const p = &data->progress;
  436|   440k|  int i_next, i_oldest, i_latest;
  437|   440k|  timediff_t duration_us;
  438|   440k|  curl_off_t amount;
  439|       |
  440|       |  /* The time spent so far (from the start) in microseconds */
  441|   440k|  p->timespent = curlx_ptimediff_us(pnow, &p->start);
  442|   440k|  p->dl.speed = trspeed(p->dl.cur_size, p->timespent);
  443|   440k|  p->ul.speed = trspeed(p->ul.cur_size, p->timespent);
  444|       |
  445|   440k|  if(!p->speeder_c) { /* no previous record exists */
  ------------------
  |  Branch (445:6): [True: 4.54k, False: 436k]
  ------------------
  446|  4.54k|    p->speed_amount[0] = p->dl.cur_size + p->ul.cur_size;
  447|  4.54k|    p->speed_time[0] = *pnow;
  448|  4.54k|    p->speeder_c++;
  449|       |    /* use the overall average at the start */
  450|  4.54k|    p->current_speed = p->ul.speed + p->dl.speed;
  451|  4.54k|    p->lastshow = pnow->tv_sec;
  452|  4.54k|    return TRUE;
  ------------------
  |  | 1055|  4.54k|#define TRUE true
  ------------------
  453|  4.54k|  }
  454|       |  /* We have at least one record now. Where to put the next and
  455|       |   * where is the latest one? */
  456|   436k|  i_next = p->speeder_c % CURL_SPEED_RECORDS;
  ------------------
  |  |  542|   436k|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  457|   436k|  i_latest = (i_next > 0) ? (i_next - 1) : (CURL_SPEED_RECORDS - 1);
  ------------------
  |  |  542|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (457:14): [True: 436k, False: 0]
  ------------------
  458|       |
  459|       |  /* Make a new record only when some time has passed.
  460|       |   * Too frequent calls otherwise ruin the history. */
  461|   436k|  if(curlx_ptimediff_ms(pnow, &p->speed_time[i_latest]) >= 1000) {
  ------------------
  |  Branch (461:6): [True: 10, False: 436k]
  ------------------
  462|     10|    p->speeder_c++;
  463|     10|    i_latest = i_next;
  464|     10|    p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  465|     10|    p->speed_time[i_latest] = *pnow;
  466|     10|  }
  467|   436k|  else if(data->req.done) {
  ------------------
  |  Branch (467:11): [True: 1.11k, False: 435k]
  ------------------
  468|       |    /* When a transfer is done, and we did not have a current speed
  469|       |     * already, update the last record. Otherwise, stay at the speed
  470|       |     * we have. The last chunk of data, when rate limiting, would increase
  471|       |     * reported speed since it no longer measures a full second. */
  472|  1.11k|    if(!p->current_speed) {
  ------------------
  |  Branch (472:8): [True: 855, False: 255]
  ------------------
  473|    855|      p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  474|    855|      p->speed_time[i_latest] = *pnow;
  475|    855|    }
  476|  1.11k|  }
  477|   435k|  else {
  478|       |    /* transfer ongoing, wait for more time to pass. */
  479|   435k|    return FALSE;
  ------------------
  |  | 1058|   435k|#define FALSE false
  ------------------
  480|   435k|  }
  481|       |
  482|  1.12k|  i_oldest = (p->speeder_c < CURL_SPEED_RECORDS) ? 0 :
  ------------------
  |  |  542|  1.12k|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (482:14): [True: 1.12k, False: 0]
  ------------------
  483|  1.12k|             ((i_latest + 1) % CURL_SPEED_RECORDS);
  ------------------
  |  |  542|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  484|       |
  485|       |  /* How much we transferred between oldest and current records */
  486|  1.12k|  amount = p->speed_amount[i_latest] - p->speed_amount[i_oldest];
  487|       |  /* How long this took */
  488|  1.12k|  duration_us = curlx_ptimediff_us(&p->speed_time[i_latest],
  489|  1.12k|                                   &p->speed_time[i_oldest]);
  490|  1.12k|  if(duration_us <= 0)
  ------------------
  |  Branch (490:6): [True: 1.11k, False: 10]
  ------------------
  491|  1.11k|    duration_us = 1;
  492|       |
  493|  1.12k|  if(amount > (CURL_OFF_T_MAX / 1000000)) {
  ------------------
  |  |  594|  1.12k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (493:6): [True: 0, False: 1.12k]
  ------------------
  494|       |    /* the 'amount' value is bigger than would fit in 64 bits if
  495|       |       multiplied with 1000000, so we use the double math for this */
  496|      0|    p->current_speed =
  497|      0|      (curl_off_t)(((double)amount * 1000000.0) / (double)duration_us);
  498|      0|  }
  499|  1.12k|  else {
  500|  1.12k|    p->current_speed = amount * 1000000 / duration_us;
  501|  1.12k|  }
  502|       |
  503|  1.12k|  if((p->lastshow == pnow->tv_sec) && !data->req.done)
  ------------------
  |  Branch (503:6): [True: 740, False: 380]
  |  Branch (503:39): [True: 0, False: 740]
  ------------------
  504|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  505|  1.12k|  p->lastshow = pnow->tv_sec;
  506|       |  return TRUE;
  ------------------
  |  | 1055|  1.12k|#define TRUE true
  ------------------
  507|  1.12k|}
progress.c:trspeed:
  420|   881k|{
  421|   881k|  if(us < 1)
  ------------------
  |  Branch (421:6): [True: 0, False: 881k]
  ------------------
  422|      0|    return size * 1000000;
  423|   881k|  else if(size < CURL_OFF_T_MAX / 1000000)
  ------------------
  |  |  594|   881k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (423:11): [True: 881k, False: 0]
  ------------------
  424|   881k|    return (size * 1000000) / us;
  425|      0|  else if(us >= 1000000)
  ------------------
  |  Branch (425:11): [True: 0, False: 0]
  ------------------
  426|      0|    return size / (us / 1000000);
  427|      0|  else
  428|      0|    return CURL_OFF_T_MAX;
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  429|   881k|}

Curl_getn_scheme:
  469|  45.0k|{
  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|  45.0k|  static const struct Curl_scheme * const all_schemes[59] = { NULL,
  480|  45.0k|    &Curl_scheme_pop3, NULL,
  481|  45.0k|    &Curl_scheme_smtps,
  482|  45.0k|    &Curl_scheme_socks,
  483|  45.0k|    &Curl_scheme_socks4,
  484|  45.0k|    &Curl_scheme_socks5, NULL, NULL,
  485|  45.0k|    &Curl_scheme_gophers,
  486|  45.0k|    &Curl_scheme_ws,
  487|  45.0k|    &Curl_scheme_sftp,
  488|  45.0k|    &Curl_scheme_socks4a,
  489|  45.0k|    &Curl_scheme_scp,
  490|  45.0k|    &Curl_scheme_rtsp,
  491|  45.0k|    &Curl_scheme_dict, NULL, NULL,
  492|  45.0k|    &Curl_scheme_gopher, NULL, NULL, NULL,
  493|  45.0k|    &Curl_scheme_wss, NULL,
  494|  45.0k|    &Curl_scheme_smb, NULL,
  495|  45.0k|    &Curl_scheme_ldap,
  496|  45.0k|    &Curl_scheme_ldaps,
  497|  45.0k|    &Curl_scheme_imap, NULL, NULL, NULL,
  498|  45.0k|    &Curl_scheme_imaps,
  499|  45.0k|    &Curl_scheme_https,
  500|  45.0k|    &Curl_scheme_tftp,
  501|  45.0k|    &Curl_scheme_telnet, NULL, NULL, NULL,
  502|  45.0k|    &Curl_scheme_file,
  503|  45.0k|    &Curl_scheme_smtp, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  504|  45.0k|    &Curl_scheme_ftp,
  505|  45.0k|    &Curl_scheme_mqtt, NULL,
  506|  45.0k|    &Curl_scheme_socks5h,
  507|  45.0k|    &Curl_scheme_http,
  508|  45.0k|    &Curl_scheme_pop3s, NULL,
  509|  45.0k|    &Curl_scheme_mqtts, NULL,
  510|  45.0k|    &Curl_scheme_smbs,
  511|  45.0k|    &Curl_scheme_ftps,
  512|  45.0k|  };
  513|       |
  514|  45.0k|  if(len && (len <= 7)) {
  ------------------
  |  Branch (514:6): [True: 45.0k, False: 0]
  |  Branch (514:13): [True: 45.0k, False: 28]
  ------------------
  515|  45.0k|    const char *s = scheme;
  516|  45.0k|    size_t l = len;
  517|  45.0k|    const struct Curl_scheme *h;
  518|  45.0k|    unsigned int c = 443;
  519|   248k|    while(l) {
  ------------------
  |  Branch (519:11): [True: 202k, False: 45.0k]
  ------------------
  520|   202k|      c <<= 5;
  521|   202k|      c += (unsigned int)Curl_raw_tolower(*s);
  522|   202k|      s++;
  523|   202k|      l--;
  524|   202k|    }
  525|       |
  526|  45.0k|    h = all_schemes[c % 59];
  527|  45.0k|    if(h && curl_strnequal(scheme, h->name, len) && !h->name[len])
  ------------------
  |  Branch (527:8): [True: 44.9k, False: 35]
  |  Branch (527:13): [True: 44.9k, False: 52]
  |  Branch (527:53): [True: 44.9k, False: 14]
  ------------------
  528|  44.9k|      return h;
  529|  45.0k|  }
  530|    129|  return NULL;
  531|  45.0k|}
Curl_get_scheme:
  534|  24.7k|{
  535|  24.7k|  return Curl_getn_scheme(scheme, strlen(scheme));
  536|  24.7k|}

Curl_rand_bytes:
  160|     48|{
  161|     48|  CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
  162|       |#ifndef DEBUGBUILD
  163|       |  const bool env_override = FALSE;
  164|       |#endif
  165|       |
  166|     48|  DEBUGASSERT(num);
  ------------------
  |  | 1081|     48|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 48]
  |  Branch (166:3): [True: 48, False: 0]
  ------------------
  167|       |
  168|    144|  while(num) {
  ------------------
  |  Branch (168:9): [True: 96, False: 48]
  ------------------
  169|     96|    unsigned int r;
  170|     96|    size_t left = num < sizeof(unsigned int) ? num : sizeof(unsigned int);
  ------------------
  |  Branch (170:19): [True: 0, False: 96]
  ------------------
  171|       |
  172|     96|    result = randit(data, &r, env_override);
  173|     96|    if(result)
  ------------------
  |  Branch (173:8): [True: 0, False: 96]
  ------------------
  174|      0|      return result;
  175|       |
  176|    480|    while(left) {
  ------------------
  |  Branch (176:11): [True: 384, False: 96]
  ------------------
  177|    384|      *rnd++ = (unsigned char)(r & 0xFF);
  178|    384|      r >>= 8;
  179|    384|      --num;
  180|    384|      --left;
  181|    384|    }
  182|     96|  }
  183|       |
  184|     48|  return result;
  185|     48|}
Curl_rand_alnum:
  225|    144|{
  226|    144|  CURLcode result = CURLE_OK;
  227|    144|  const unsigned int alnumspace = sizeof(alnum) - 1;
  228|    144|  unsigned int r;
  229|    144|  DEBUGASSERT(num > 1);
  ------------------
  |  | 1081|    144|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (229:3): [True: 0, False: 144]
  |  Branch (229:3): [True: 144, False: 0]
  ------------------
  230|       |
  231|    144|  num--; /* save one for null-termination */
  232|       |
  233|  3.31k|  while(num) {
  ------------------
  |  Branch (233:9): [True: 3.16k, False: 144]
  ------------------
  234|  3.16k|    do {
  235|  3.16k|      result = randit(data, &r, TRUE);
  ------------------
  |  | 1055|  3.16k|#define TRUE true
  ------------------
  236|  3.16k|      if(result)
  ------------------
  |  Branch (236:10): [True: 0, False: 3.16k]
  ------------------
  237|      0|        return result;
  238|  3.16k|    } while(r >= (UINT_MAX - UINT_MAX % alnumspace));
  ------------------
  |  Branch (238:13): [True: 0, False: 3.16k]
  ------------------
  239|       |
  240|  3.16k|    *rnd++ = (unsigned char)alnum[r % alnumspace];
  241|  3.16k|    num--;
  242|  3.16k|  }
  243|    144|  *rnd = 0;
  244|       |
  245|    144|  return result;
  246|    144|}
rand.c:randit:
  105|  3.26k|{
  106|  3.26k|#ifdef DEBUGBUILD
  107|  3.26k|  if(env_override) {
  ------------------
  |  Branch (107:6): [True: 3.26k, False: 0]
  ------------------
  108|  3.26k|    char *force_entropy = getenv("CURL_ENTROPY");
  109|  3.26k|    if(force_entropy) {
  ------------------
  |  Branch (109:8): [True: 0, False: 3.26k]
  ------------------
  110|      0|      static unsigned int randseed;
  111|      0|      static bool seeded = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  112|       |
  113|      0|      if(!seeded) {
  ------------------
  |  Branch (113:10): [True: 0, False: 0]
  ------------------
  114|      0|        unsigned int seed = 0;
  115|      0|        size_t elen = strlen(force_entropy);
  116|      0|        size_t clen = sizeof(seed);
  117|      0|        size_t min = elen < clen ? elen : clen;
  ------------------
  |  Branch (117:22): [True: 0, False: 0]
  ------------------
  118|      0|        memcpy((char *)&seed, force_entropy, min);
  119|      0|        randseed = ntohl(seed);
  120|      0|        seeded = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  121|      0|      }
  122|      0|      else
  123|      0|        randseed++;
  124|      0|      *rnd = randseed;
  125|      0|      return CURLE_OK;
  126|      0|    }
  127|  3.26k|  }
  128|       |#else
  129|       |  (void)env_override;
  130|       |#endif
  131|       |
  132|       |  /* data may be NULL! */
  133|  3.26k|#ifdef USE_SSL
  134|  3.26k|  return Curl_ssl_random(data, (unsigned char *)rnd, sizeof(*rnd));
  135|       |#else
  136|       |  return weak_random(data, (unsigned char *)rnd, sizeof(*rnd));
  137|       |#endif
  138|  3.26k|}

Curl_rlimit_init:
  156|    282|{
  157|    282|  DEBUGASSERT(rate_per_sec >= 0);
  ------------------
  |  | 1081|    282|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (157:3): [True: 0, False: 282]
  |  Branch (157:3): [True: 282, False: 0]
  ------------------
  158|    282|  DEBUGASSERT(burst_per_sec >= rate_per_sec || !burst_per_sec);
  ------------------
  |  | 1081|    282|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (158:3): [True: 282, False: 0]
  |  Branch (158:3): [True: 0, False: 0]
  |  Branch (158:3): [True: 282, False: 0]
  |  Branch (158:3): [True: 0, False: 0]
  ------------------
  159|    282|  DEBUGASSERT(pts);
  ------------------
  |  | 1081|    282|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (159:3): [True: 0, False: 282]
  |  Branch (159:3): [True: 282, False: 0]
  ------------------
  160|    282|  r->rate_per_step = r->rate_per_sec = rate_per_sec;
  161|    282|  r->burst_per_step = r->burst_per_sec = burst_per_sec;
  162|    282|  r->step_us = CURL_US_PER_SEC;
  ------------------
  |  |   29|    282|#define CURL_US_PER_SEC         1000000
  ------------------
  163|    282|  r->spare_us = 0;
  164|    282|  r->tokens = r->rate_per_step;
  165|    282|  r->ts = *pts;
  166|       |  r->blocked = FALSE;
  ------------------
  |  | 1058|    282|#define FALSE false
  ------------------
  167|    282|}
Curl_rlimit_start:
  171|    350|{
  172|       |  /* A start always resets the values to initial defaults, then
  173|       |   * fine tunes the intervals for the total_tokens expected. */
  174|    350|  r->rate_per_step = r->rate_per_sec;
  175|    350|  r->burst_per_step = r->burst_per_sec;
  176|    350|  r->step_us = CURL_US_PER_SEC;
  ------------------
  |  |   29|    350|#define CURL_US_PER_SEC         1000000
  ------------------
  177|    350|  r->spare_us = 0;
  178|    350|  r->tokens = r->rate_per_step;
  179|    350|  r->ts = *pts;
  180|    350|  rlimit_tune_steps(r, total_tokens);
  181|    350|}
Curl_rlimit_active:
  189|  2.60k|{
  190|  2.60k|  return (r->rate_per_step > 0) || r->blocked;
  ------------------
  |  Branch (190:10): [True: 764, False: 1.84k]
  |  Branch (190:36): [True: 0, False: 1.84k]
  ------------------
  191|  2.60k|}
Curl_rlimit_is_blocked:
  194|   708k|{
  195|   708k|  return (bool)r->blocked;
  196|   708k|}
Curl_rlimit_avail:
  200|   403k|{
  201|   403k|  if(r->blocked)
  ------------------
  |  Branch (201:6): [True: 0, False: 403k]
  ------------------
  202|      0|    return 0;
  203|   403k|  else if(r->rate_per_step) {
  ------------------
  |  Branch (203:11): [True: 15.3k, False: 388k]
  ------------------
  204|  15.3k|    rlimit_update(r, pts);
  205|  15.3k|    return r->tokens;
  206|  15.3k|  }
  207|   388k|  else
  208|   388k|    return INT64_MAX;
  209|   403k|}
Curl_rlimit_drain:
  214|   209k|{
  215|   209k|  if(r->blocked || !r->rate_per_step)
  ------------------
  |  Branch (215:6): [True: 0, False: 209k]
  |  Branch (215:20): [True: 142k, False: 66.8k]
  ------------------
  216|   142k|    return;
  217|       |
  218|  66.8k|  rlimit_update(r, pts);
  219|  66.8k|#if 8 <= SIZEOF_SIZE_T
  220|  66.8k|  if(tokens > INT64_MAX) {
  ------------------
  |  Branch (220:6): [True: 0, False: 66.8k]
  ------------------
  221|      0|    r->tokens = INT64_MAX;
  222|      0|  }
  223|  66.8k|  else
  224|  66.8k|#endif
  225|  66.8k|  {
  226|  66.8k|    int64_t val = (int64_t)tokens;
  227|  66.8k|    if((INT64_MIN + val) < r->tokens)
  ------------------
  |  Branch (227:8): [True: 66.8k, False: 0]
  ------------------
  228|  66.8k|      r->tokens -= val;
  229|      0|    else
  230|      0|      r->tokens = INT64_MIN;
  231|  66.8k|  }
  232|  66.8k|}
Curl_rlimit_wait_ms:
  236|    696|{
  237|    696|  timediff_t wait_us, elapsed_us;
  238|       |
  239|    696|  if(r->blocked || !r->rate_per_step)
  ------------------
  |  Branch (239:6): [True: 0, False: 696]
  |  Branch (239:20): [True: 320, False: 376]
  ------------------
  240|    320|    return 0;
  241|    376|  rlimit_update(r, pts);
  242|    376|  if(r->tokens > 0)
  ------------------
  |  Branch (242:6): [True: 290, False: 86]
  ------------------
  243|    290|    return 0;
  244|       |
  245|       |  /* How much time will it take tokens to become positive again?
  246|       |   * Deduct `spare_us` and check against already elapsed time */
  247|     86|  wait_us = r->step_us - r->spare_us;
  248|     86|  if(r->tokens < 0) {
  ------------------
  |  Branch (248:6): [True: 63, False: 23]
  ------------------
  249|     63|    curl_off_t debt_pct = ((-r->tokens) * 100 / r->rate_per_step);
  250|     63|    if(debt_pct)
  ------------------
  |  Branch (250:8): [True: 50, False: 13]
  ------------------
  251|     50|      wait_us += (r->step_us * debt_pct / 100);
  252|     63|  }
  253|       |
  254|     86|  elapsed_us = curlx_ptimediff_us(pts, &r->ts);
  255|     86|  if(elapsed_us >= wait_us)
  ------------------
  |  Branch (255:6): [True: 0, False: 86]
  ------------------
  256|      0|    return 0;
  257|     86|  wait_us -= elapsed_us;
  258|     86|  return (wait_us + 999) / 1000; /* in milliseconds */
  259|     86|}
Curl_rlimit_next_step_ms:
  263|    524|{
  264|    524|  if(!r->blocked && r->rate_per_step) {
  ------------------
  |  Branch (264:6): [True: 524, False: 0]
  |  Branch (264:21): [True: 286, False: 238]
  ------------------
  265|    286|    timediff_t elapsed_us, next_us;
  266|       |
  267|    286|    elapsed_us = curlx_ptimediff_us(pts, &r->ts) + r->spare_us;
  268|    286|    if(r->step_us > elapsed_us) {
  ------------------
  |  Branch (268:8): [True: 286, False: 0]
  ------------------
  269|    286|      next_us = r->step_us - elapsed_us;
  270|    286|      return (next_us + 999) / 1000; /* in milliseconds */
  271|    286|    }
  272|    286|  }
  273|    238|  return 0;
  274|    524|}
Curl_rlimit_block:
  279|  15.1k|{
  280|  15.1k|  if(!activate == !r->blocked)
  ------------------
  |  Branch (280:6): [True: 15.1k, False: 0]
  ------------------
  281|  15.1k|    return;
  282|       |
  283|      0|  r->ts = *pts;
  284|      0|  r->blocked = activate;
  285|      0|  if(!r->blocked) {
  ------------------
  |  Branch (285:6): [True: 0, False: 0]
  ------------------
  286|       |    /* Start rate limiting fresh. The amount of time this was blocked
  287|       |     * does not generate extra tokens. */
  288|      0|    Curl_rlimit_start(r, pts, -1);
  289|      0|  }
  290|      0|  else {
  291|      0|    r->tokens = 0;
  292|      0|  }
  293|      0|}
ratelimit.c:rlimit_tune_steps:
   79|    350|{
   80|    350|  int64_t tokens_last, tokens_main, msteps;
   81|       |
   82|       |  /* Tune the ratelimit at the start *if* we know how many tokens
   83|       |   * are expected to be consumed in total.
   84|       |   * The reason for tuning is that rlimit provides tokens to be consumed
   85|       |   * per "step" which starts out to be a second. The tokens may be consumed
   86|       |   * in full at the beginning of a step. The remainder of the second will
   87|       |   * have no tokens available, effectively blocking the consumption and
   88|       |   * so keeping the "step average" in line.
   89|       |   * This works will up to the last step. When no more tokens are needed,
   90|       |   * no wait will happen and the last step would be too fast. This is
   91|       |   * especially noticeable when only a few steps are needed.
   92|       |   *
   93|       |   * Example: downloading 1.5kb with a ratelimit of 1k could be done in
   94|       |   * roughly 1 second (1k in the first second and the 0.5 at the start of
   95|       |   * the second one).
   96|       |   *
   97|       |   * The tuning tries to make the last step small, using only
   98|       |   * 1 percent of the total tokens (at least 1). The rest of the tokens
   99|       |   * are to be consumed in the steps before by adjusting the duration of
  100|       |   * the step and the amount of tokens it provides. */
  101|    350|  if(!r->rate_per_step ||
  ------------------
  |  Branch (101:6): [True: 222, False: 128]
  ------------------
  102|    128|     (tokens_total <= 1) ||
  ------------------
  |  Branch (102:6): [True: 128, False: 0]
  ------------------
  103|      0|     (tokens_total > (INT64_MAX / 1000)))
  ------------------
  |  Branch (103:6): [True: 0, False: 0]
  ------------------
  104|    350|    return;
  105|       |
  106|       |  /* Calculate tokens for the last step and the ones before. */
  107|      0|  tokens_last = tokens_total / 100;
  108|      0|  if(!tokens_last) /* less than 100 total, use 1 */
  ------------------
  |  Branch (108:6): [True: 0, False: 0]
  ------------------
  109|      0|    tokens_last = 1;
  110|      0|  else if(tokens_last > CURL_RLIMIT_MIN_RATE)
  ------------------
  |  |   30|      0|#define CURL_RLIMIT_MIN_RATE    (4 * 1024)  /* minimum step rate */
  ------------------
  |  Branch (110:11): [True: 0, False: 0]
  ------------------
  111|      0|    tokens_last = CURL_RLIMIT_MIN_RATE;
  ------------------
  |  |   30|      0|#define CURL_RLIMIT_MIN_RATE    (4 * 1024)  /* minimum step rate */
  ------------------
  112|      0|  DEBUGASSERT(tokens_last);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 0, False: 0]
  |  Branch (112:3): [True: 0, False: 0]
  ------------------
  113|      0|  tokens_main = tokens_total - tokens_last;
  114|      0|  DEBUGASSERT(tokens_main);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (114:3): [True: 0, False: 0]
  |  Branch (114:3): [True: 0, False: 0]
  ------------------
  115|       |
  116|       |  /* how many milli-steps will it take to consume those, give the
  117|       |  * original rate limit per second? */
  118|      0|  DEBUGASSERT(r->step_us == CURL_US_PER_SEC);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (118:3): [True: 0, False: 0]
  |  Branch (118:3): [True: 0, False: 0]
  ------------------
  119|       |
  120|      0|  msteps = (tokens_main * 1000 / r->rate_per_step);
  121|      0|  if(msteps < CURL_RLIMIT_STEP_MIN_MS) {
  ------------------
  |  |   31|      0|#define CURL_RLIMIT_STEP_MIN_MS 2  /* minimum step duration */
  ------------------
  |  Branch (121:6): [True: 0, False: 0]
  ------------------
  122|       |    /* Steps this small will not work. Do not tune. */
  123|      0|    return;
  124|      0|  }
  125|      0|  else if(msteps < 1000) {
  ------------------
  |  Branch (125:11): [True: 0, False: 0]
  ------------------
  126|       |    /* It needs less than one step to provide the needed tokens.
  127|       |     * Make it exactly that long and with exactly those tokens. */
  128|      0|    r->step_us = (timediff_t)msteps * 1000;
  129|      0|    r->rate_per_step = tokens_main;
  130|      0|    r->tokens = r->rate_per_step;
  131|      0|  }
  132|      0|  else {
  133|       |    /* More than 1 step. Spread the remainder milli steps and
  134|       |     * the tokens they need to provide across all steps. If integer
  135|       |     * arithmetic can do it. */
  136|      0|    curl_off_t ms_unaccounted = (msteps % 1000);
  137|      0|    curl_off_t mstep_inc = (ms_unaccounted / (msteps / 1000));
  138|      0|    if(mstep_inc) {
  ------------------
  |  Branch (138:8): [True: 0, False: 0]
  ------------------
  139|      0|      curl_off_t rate_inc = ((r->rate_per_step * mstep_inc) / 1000);
  140|      0|      if(rate_inc) {
  ------------------
  |  Branch (140:10): [True: 0, False: 0]
  ------------------
  141|      0|        r->step_us = CURL_US_PER_SEC + ((timediff_t)mstep_inc * 1000);
  ------------------
  |  |   29|      0|#define CURL_US_PER_SEC         1000000
  ------------------
  142|      0|        r->rate_per_step += rate_inc;
  143|      0|        r->tokens = r->rate_per_step;
  144|      0|      }
  145|      0|    }
  146|      0|  }
  147|       |
  148|      0|  if(r->burst_per_step)
  ------------------
  |  Branch (148:6): [True: 0, False: 0]
  ------------------
  149|      0|    r->burst_per_step = r->rate_per_step;
  150|      0|}
ratelimit.c:rlimit_update:
   35|  82.5k|{
   36|  82.5k|  timediff_t elapsed_us, elapsed_steps;
   37|  82.5k|  int64_t token_gain;
   38|       |
   39|  82.5k|  DEBUGASSERT(r->rate_per_step);
  ------------------
  |  | 1081|  82.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 82.5k]
  |  Branch (39:3): [True: 82.5k, False: 0]
  ------------------
   40|  82.5k|  if((r->ts.tv_sec == pts->tv_sec) && (r->ts.tv_usec == pts->tv_usec))
  ------------------
  |  Branch (40:6): [True: 82.5k, False: 2]
  |  Branch (40:39): [True: 69, False: 82.5k]
  ------------------
   41|     69|    return;
   42|       |
   43|  82.5k|  elapsed_us = curlx_ptimediff_us(pts, &r->ts);
   44|  82.5k|  if(elapsed_us < 0) { /* not going back in time */
  ------------------
  |  Branch (44:6): [True: 0, False: 82.5k]
  ------------------
   45|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      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|  82.5k|  elapsed_us += r->spare_us;
   50|  82.5k|  if(elapsed_us < r->step_us)
  ------------------
  |  Branch (50:6): [True: 82.5k, False: 0]
  ------------------
   51|  82.5k|    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|  22.4k|{
   40|  22.4k|  memset(req, 0, sizeof(*req));
   41|  22.4k|}
Curl_req_soft_reset:
   45|  6.08k|{
   46|  6.08k|  CURLcode result;
   47|       |
   48|  6.08k|  req->done = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   49|  6.08k|  req->upload_done = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   50|  6.08k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   51|  6.08k|  req->download_done = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   52|  6.08k|  req->eos_written = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   53|  6.08k|  req->eos_read = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   54|  6.08k|  req->eos_sent = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   55|  6.08k|  req->ignorebody = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   56|  6.08k|  req->shutdown = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   57|  6.08k|  req->bytecount = 0;
   58|  6.08k|  req->writebytecount = 0;
   59|  6.08k|  req->header = FALSE;
  ------------------
  |  | 1058|  6.08k|#define FALSE false
  ------------------
   60|  6.08k|  req->headerline = 0;
   61|  6.08k|  req->headerbytecount = 0;
   62|  6.08k|  req->allheadercount = 0;
   63|  6.08k|  req->deductheadercount = 0;
   64|  6.08k|  req->httpversion_sent = 0;
   65|  6.08k|  req->httpversion = 0;
   66|  6.08k|  req->sendbuf_hds_len = 0;
   67|       |
   68|  6.08k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1327|  6.08k|  do {                      \
  |  | 1328|  6.08k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  6.08k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  6.08k|    (ptr) = NULL;           \
  |  | 1330|  6.08k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 6.08k]
  |  |  ------------------
  ------------------
   69|  6.08k|#ifndef CURL_DISABLE_PROXY
   70|  6.08k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1327|  6.08k|  do {                      \
  |  | 1328|  6.08k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  6.08k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  6.08k|    (ptr) = NULL;           \
  |  | 1330|  6.08k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 6.08k]
  |  |  ------------------
  ------------------
   71|  6.08k|#endif
   72|       |
   73|  6.08k|  result = Curl_client_start(data);
   74|  6.08k|  if(result)
  ------------------
  |  Branch (74:6): [True: 0, False: 6.08k]
  ------------------
   75|      0|    return result;
   76|       |
   77|  6.08k|  if(!req->sendbuf_init) {
  ------------------
  |  Branch (77:6): [True: 6.06k, False: 15]
  ------------------
   78|  6.06k|    Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   79|  6.06k|                    BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|  6.06k|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   80|  6.06k|    req->sendbuf_init = TRUE;
  ------------------
  |  | 1055|  6.06k|#define TRUE true
  ------------------
   81|  6.06k|  }
   82|     15|  else {
   83|     15|    Curl_bufq_reset(&req->sendbuf);
   84|     15|    if(data->set.upload_buffer_size != req->sendbuf.chunk_size) {
  ------------------
  |  Branch (84:8): [True: 0, False: 15]
  ------------------
   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|     15|  }
   90|       |
   91|  6.08k|  return CURLE_OK;
   92|  6.08k|}
Curl_req_start:
   96|  6.06k|{
   97|  6.06k|  req->start = *Curl_pgrs_now(data);
   98|  6.06k|  return Curl_req_soft_reset(req, data);
   99|  6.06k|}
Curl_req_done:
  105|    717|{
  106|    717|  (void)req;
  107|    717|  if(!aborted)
  ------------------
  |  Branch (107:6): [True: 371, False: 346]
  ------------------
  108|    371|    (void)req_flush(data);
  109|    717|  Curl_client_reset(data);
  110|    717|  return CURLE_OK;
  111|    717|}
Curl_req_hard_reset:
  114|  7.59k|{
  115|  7.59k|  struct curltime t0 = { 0, 0 };
  116|       |
  117|  7.59k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1327|  7.59k|  do {                      \
  |  | 1328|  7.59k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  7.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  7.59k|    (ptr) = NULL;           \
  |  | 1330|  7.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 7.59k]
  |  |  ------------------
  ------------------
  118|  7.59k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1327|  7.59k|  do {                      \
  |  | 1328|  7.59k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  7.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  7.59k|    (ptr) = NULL;           \
  |  | 1330|  7.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 7.59k]
  |  |  ------------------
  ------------------
  119|  7.59k|#ifndef CURL_DISABLE_PROXY
  120|  7.59k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1327|  7.59k|  do {                      \
  |  | 1328|  7.59k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  7.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  7.59k|    (ptr) = NULL;           \
  |  | 1330|  7.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 7.59k]
  |  |  ------------------
  ------------------
  121|  7.59k|#endif
  122|  7.59k|#ifndef CURL_DISABLE_COOKIES
  123|  7.59k|  curlx_safefree(req->cookiehost);
  ------------------
  |  | 1327|  7.59k|  do {                      \
  |  | 1328|  7.59k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  7.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  7.59k|    (ptr) = NULL;           \
  |  | 1330|  7.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 7.59k]
  |  |  ------------------
  ------------------
  124|  7.59k|#endif
  125|  7.59k|  Curl_client_reset(data);
  126|  7.59k|  if(req->sendbuf_init)
  ------------------
  |  Branch (126:6): [True: 0, False: 7.59k]
  ------------------
  127|      0|    Curl_bufq_reset(&req->sendbuf);
  128|       |
  129|       |  /* clear any resolve data */
  130|  7.59k|  Curl_resolv_destroy_all(data);
  131|       |  /* Can no longer memset() this struct as we need to keep some state */
  132|  7.59k|  req->size = -1;
  133|  7.59k|  req->maxdownload = -1;
  134|  7.59k|  req->bytecount = 0;
  135|  7.59k|  req->writebytecount = 0;
  136|  7.59k|  req->start = t0;
  137|  7.59k|  req->headerbytecount = 0;
  138|  7.59k|  req->allheadercount = 0;
  139|  7.59k|  req->deductheadercount = 0;
  140|  7.59k|  req->headerline = 0;
  141|  7.59k|  req->offset = 0;
  142|  7.59k|  req->httpcode = 0;
  143|  7.59k|  req->io_flags = 0;
  144|  7.59k|  req->upgr101 = UPGR101_NONE;
  145|  7.59k|  req->sendbuf_hds_len = 0;
  146|  7.59k|  req->timeofdoc = 0;
  147|  7.59k|  req->location = NULL;
  148|  7.59k|  req->newurl = NULL;
  149|  7.59k|#ifndef CURL_DISABLE_COOKIES
  150|  7.59k|  req->setcookies = 0;
  151|  7.59k|#endif
  152|  7.59k|  req->header = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  153|  7.59k|  req->content_range = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  154|  7.59k|  req->download_done = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  155|  7.59k|  req->eos_written = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  156|  7.59k|  req->eos_read = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  157|  7.59k|  req->eos_sent = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  158|  7.59k|  req->rewind_read = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  159|  7.59k|  req->upload_done = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  160|  7.59k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  161|  7.59k|  req->ignorebody = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  162|  7.59k|  req->http_bodyless = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  163|  7.59k|  req->chunk = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  164|  7.59k|  req->resp_trailer = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  165|  7.59k|  req->ignore_cl = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  166|  7.59k|  req->upload_chunky = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  167|  7.59k|  req->no_body = data->set.opt_no_body;
  168|  7.59k|  req->authneg = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  169|  7.59k|  req->shutdown = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  170|       |  /* Unpause all directions */
  171|  7.59k|  Curl_rlimit_block(&data->progress.dl.rlimit, FALSE, &t0);
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  172|       |  Curl_rlimit_block(&data->progress.ul.rlimit, FALSE, &t0);
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
  173|  7.59k|}
Curl_req_free:
  176|  22.4k|{
  177|  22.4k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  178|  22.4k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  179|  22.4k|#ifndef CURL_DISABLE_PROXY
  180|  22.4k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  181|  22.4k|#endif
  182|  22.4k|  if(req->sendbuf_init)
  ------------------
  |  Branch (182:6): [True: 6.06k, False: 16.4k]
  ------------------
  183|  6.06k|    Curl_bufq_free(&req->sendbuf);
  184|  22.4k|  Curl_client_cleanup(data);
  185|  22.4k|}
Curl_req_sendbuf_empty:
  428|  1.10k|{
  429|  1.10k|  return !data->req.sendbuf_init || Curl_bufq_is_empty(&data->req.sendbuf);
  ------------------
  |  Branch (429:10): [True: 0, False: 1.10k]
  |  Branch (429:37): [True: 1.10k, False: 0]
  ------------------
  430|  1.10k|}
Curl_req_want_send:
  433|  1.10k|{
  434|       |  /* Not done and upload not blocked and either one of
  435|       |   * - REQ_IO_SEND
  436|       |   * - request has buffered data to send
  437|       |   * - connection has pending data to send */
  438|  1.10k|  return !data->req.done &&
  ------------------
  |  Branch (438:10): [True: 1.10k, False: 0]
  ------------------
  439|  1.10k|         !Curl_rlimit_is_blocked(&data->progress.ul.rlimit) &&
  ------------------
  |  Branch (439:10): [True: 1.10k, False: 0]
  ------------------
  440|  1.10k|         (CURL_REQ_WANT_SEND(data) ||
  ------------------
  |  |   39|  2.20k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  1.10k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 0, False: 1.10k]
  |  |  ------------------
  ------------------
  441|  1.10k|          !Curl_req_sendbuf_empty(data) ||
  ------------------
  |  Branch (441:11): [True: 0, False: 1.10k]
  ------------------
  442|  1.10k|          Curl_xfer_needs_flush(data));
  ------------------
  |  Branch (442:11): [True: 0, False: 1.10k]
  ------------------
  443|  1.10k|}
Curl_req_want_recv:
  446|    143|{
  447|       |  /* Not done and download not blocked and want RECV */
  448|    143|  return !data->req.done &&
  ------------------
  |  Branch (448:10): [True: 143, False: 0]
  ------------------
  449|    143|         !Curl_rlimit_is_blocked(&data->progress.dl.rlimit) &&
  ------------------
  |  Branch (449:10): [True: 143, False: 0]
  ------------------
  450|    143|         CURL_REQ_WANT_RECV(data);
  ------------------
  |  |   40|    286|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|    143|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |  |  Branch (40:32): [True: 143, False: 0]
  |  |  ------------------
  ------------------
  451|    143|}
Curl_req_stop_send_recv:
  493|    357|{
  494|       |  /* stop receiving and ALL sending as well, including PAUSE and HOLD.
  495|       |   * We might still be paused on receive client writes though, so
  496|       |   * keep those bits around. */
  497|    357|  CURLcode result = CURLE_OK;
  498|    357|  if(CURL_REQ_WANT_SEND(data))
  ------------------
  |  |   39|    357|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|    357|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 0, False: 357]
  |  |  ------------------
  ------------------
  499|      0|    result = Curl_req_abort_sending(data);
  500|    357|  CURL_REQ_CLEAR_IO(data);
  ------------------
  |  |   51|    357|  ((d)->req.io_flags &= (uint8_t)~(REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|    357|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |                 ((d)->req.io_flags &= (uint8_t)~(REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   36|    357|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  501|    357|  return result;
  502|    357|}
request.c:req_flush:
  299|    371|{
  300|    371|  CURLcode result;
  301|       |
  302|    371|  if(!data || !data->conn)
  ------------------
  |  Branch (302:6): [True: 0, False: 371]
  |  Branch (302:15): [True: 0, False: 371]
  ------------------
  303|      0|    return CURLE_FAILED_INIT;
  304|       |
  305|    371|  if(!Curl_bufq_is_empty(&data->req.sendbuf)) {
  ------------------
  |  Branch (305:6): [True: 0, False: 371]
  ------------------
  306|      0|    result = req_send_buffer_flush(data);
  307|      0|    if(result)
  ------------------
  |  Branch (307:8): [True: 0, False: 0]
  ------------------
  308|      0|      return result;
  309|      0|    if(!Curl_bufq_is_empty(&data->req.sendbuf)) {
  ------------------
  |  Branch (309:8): [True: 0, False: 0]
  ------------------
  310|      0|      DEBUGF(infof(data, "Curl_req_flush(len=%zu) -> EAGAIN",
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  311|      0|                   Curl_bufq_len(&data->req.sendbuf)));
  312|      0|      return CURLE_AGAIN;
  313|      0|    }
  314|      0|  }
  315|    371|  else if(Curl_xfer_needs_flush(data)) {
  ------------------
  |  Branch (315:11): [True: 0, False: 371]
  ------------------
  316|      0|    DEBUGF(infof(data, "Curl_req_flush(), xfer send_pending"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  317|      0|    return Curl_xfer_flush(data);
  318|      0|  }
  319|       |
  320|    371|  if(data->req.eos_read && !data->req.eos_sent) {
  ------------------
  |  Branch (320:6): [True: 0, False: 371]
  |  Branch (320:28): [True: 0, False: 0]
  ------------------
  321|      0|    char tmp = 0;
  322|      0|    size_t nwritten;
  323|      0|    result = xfer_send(data, &tmp, 0, 0, &nwritten);
  324|      0|    if(result)
  ------------------
  |  Branch (324:8): [True: 0, False: 0]
  ------------------
  325|      0|      return result;
  326|      0|    DEBUGASSERT(data->req.eos_sent);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (326:5): [True: 0, False: 0]
  |  Branch (326:5): [True: 0, False: 0]
  ------------------
  327|      0|  }
  328|       |
  329|    371|  if(!data->req.upload_done && data->req.eos_read && data->req.eos_sent) {
  ------------------
  |  Branch (329:6): [True: 371, False: 0]
  |  Branch (329:32): [True: 0, False: 371]
  |  Branch (329:54): [True: 0, False: 0]
  ------------------
  330|      0|    DEBUGASSERT(Curl_bufq_is_empty(&data->req.sendbuf));
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (330:5): [True: 0, False: 0]
  |  Branch (330:5): [True: 0, False: 0]
  ------------------
  331|      0|    if(data->req.shutdown) {
  ------------------
  |  Branch (331:8): [True: 0, False: 0]
  ------------------
  332|      0|      bool done;
  333|      0|      result = Curl_xfer_send_shutdown(data, &done);
  334|      0|      if(result && data->req.shutdown_err_ignore) {
  ------------------
  |  Branch (334:10): [True: 0, False: 0]
  |  Branch (334:20): [True: 0, False: 0]
  ------------------
  335|      0|        infof(data, "Shutdown send direction error: %d. Broken server? "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  336|      0|              "Proceeding as if everything is ok.", result);
  337|      0|        result = CURLE_OK;
  338|      0|        done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  339|      0|      }
  340|       |
  341|      0|      if(result)
  ------------------
  |  Branch (341:10): [True: 0, False: 0]
  ------------------
  342|      0|        return result;
  343|      0|      if(!done)
  ------------------
  |  Branch (343:10): [True: 0, False: 0]
  ------------------
  344|      0|        return CURLE_AGAIN;
  345|      0|    }
  346|      0|    return req_set_upload_done(data);
  347|      0|  }
  348|    371|  return CURLE_OK;
  349|    371|}

Curl_socket_check:
  124|  31.8k|{
  125|  31.8k|  struct pollfd pfd[3];
  126|  31.8k|  int num;
  127|  31.8k|  int r;
  128|       |
  129|  31.8k|  if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|  31.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
                if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|  25.4k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (129:6): [True: 25.4k, False: 6.40k]
  |  Branch (129:38): [True: 25.4k, False: 0]
  ------------------
  130|  25.4k|     (writefd == CURL_SOCKET_BAD)) {
  ------------------
  |  |  145|  25.4k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (130:6): [True: 0, False: 25.4k]
  ------------------
  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|  31.8k|  num = 0;
  141|  31.8k|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  31.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (141:6): [True: 6.40k, False: 25.4k]
  ------------------
  142|  6.40k|    pfd[num].fd = readfd0;
  143|  6.40k|    pfd[num].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
  144|  6.40k|    pfd[num].revents = 0;
  145|  6.40k|    num++;
  146|  6.40k|  }
  147|  31.8k|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  31.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (147:6): [True: 0, False: 31.8k]
  ------------------
  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|  31.8k|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  31.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (153:6): [True: 25.4k, False: 6.40k]
  ------------------
  154|  25.4k|    pfd[num].fd = writefd;
  155|  25.4k|    pfd[num].events = POLLWRNORM | POLLOUT | POLLPRI;
  156|  25.4k|    pfd[num].revents = 0;
  157|  25.4k|    num++;
  158|  25.4k|  }
  159|       |
  160|  31.8k|  r = Curl_poll(pfd, (unsigned int)num, timeout_ms);
  161|  31.8k|  if(r <= 0)
  ------------------
  |  Branch (161:6): [True: 25.5k, False: 6.23k]
  ------------------
  162|  25.5k|    return r;
  163|       |
  164|  6.23k|  r = 0;
  165|  6.23k|  num = 0;
  166|  6.23k|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  6.23k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (166:6): [True: 6.22k, False: 14]
  ------------------
  167|  6.22k|    if(pfd[num].revents & (POLLRDNORM | POLLIN | POLLERR | POLLHUP))
  ------------------
  |  Branch (167:8): [True: 6.22k, False: 0]
  ------------------
  168|  6.22k|      r |= CURL_CSELECT_IN;
  ------------------
  |  |  290|  6.22k|#define CURL_CSELECT_IN   0x01
  ------------------
  169|  6.22k|    if(pfd[num].revents & (POLLPRI | POLLNVAL))
  ------------------
  |  Branch (169:8): [True: 0, False: 6.22k]
  ------------------
  170|      0|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|      0|#define CURL_CSELECT_ERR  0x04
  ------------------
  171|  6.22k|    num++;
  172|  6.22k|  }
  173|  6.23k|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  6.23k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (173:6): [True: 0, False: 6.23k]
  ------------------
  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.23k|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  6.23k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (180:6): [True: 14, False: 6.22k]
  ------------------
  181|     14|    if(pfd[num].revents & (POLLWRNORM | POLLOUT))
  ------------------
  |  Branch (181:8): [True: 14, False: 0]
  ------------------
  182|     14|      r |= CURL_CSELECT_OUT;
  ------------------
  |  |  291|     14|#define CURL_CSELECT_OUT  0x02
  ------------------
  183|     14|    if(pfd[num].revents & (POLLERR | POLLHUP | POLLPRI | POLLNVAL))
  ------------------
  |  Branch (183:8): [True: 14, False: 0]
  ------------------
  184|     14|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|     14|#define CURL_CSELECT_ERR  0x04
  ------------------
  185|     14|  }
  186|       |
  187|  6.23k|  return r;
  188|  31.8k|}
Curl_poll:
  204|  31.8k|{
  205|  31.8k|#ifdef HAVE_POLL
  206|  31.8k|  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|  31.8k|  bool fds_none = TRUE;
  ------------------
  |  | 1055|  31.8k|#define TRUE true
  ------------------
  214|  31.8k|  unsigned int i;
  215|  31.8k|  int r;
  216|       |
  217|  31.8k|  if(ufds) {
  ------------------
  |  Branch (217:6): [True: 31.8k, False: 0]
  ------------------
  218|  31.8k|    for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (218:16): [True: 31.8k, False: 0]
  ------------------
  219|  31.8k|      if(ufds[i].fd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  31.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (219:10): [True: 31.8k, False: 0]
  ------------------
  220|  31.8k|        fds_none = FALSE;
  ------------------
  |  | 1058|  31.8k|#define FALSE false
  ------------------
  221|  31.8k|        break;
  222|  31.8k|      }
  223|  31.8k|    }
  224|  31.8k|  }
  225|  31.8k|  if(fds_none) {
  ------------------
  |  Branch (225:6): [True: 0, False: 31.8k]
  ------------------
  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|  31.8k|#ifdef HAVE_POLL
  236|       |
  237|       |  /* prevent overflow, timeout_ms is typecast to int. */
  238|  31.8k|#if TIMEDIFF_T_MAX > INT_MAX
  239|  31.8k|  if(timeout_ms > INT_MAX)
  ------------------
  |  Branch (239:6): [True: 0, False: 31.8k]
  ------------------
  240|      0|    timeout_ms = INT_MAX;
  241|  31.8k|#endif
  242|  31.8k|  if(timeout_ms > 0)
  ------------------
  |  Branch (242:6): [True: 457, False: 31.3k]
  ------------------
  243|    457|    pending_ms = (int)timeout_ms;
  244|  31.3k|  else if(timeout_ms < 0)
  ------------------
  |  Branch (244:11): [True: 0, False: 31.3k]
  ------------------
  245|      0|    pending_ms = -1;
  246|  31.3k|  else
  247|  31.3k|    pending_ms = 0;
  248|  31.8k|  r = poll(ufds, nfds, pending_ms);
  249|  31.8k|  if(r <= 0) {
  ------------------
  |  Branch (249:6): [True: 25.5k, False: 6.23k]
  ------------------
  250|  25.5k|    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
                  if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1129|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (250:8): [True: 0, False: 25.5k]
  |  Branch (250:21): [True: 0, False: 0]
  ------------------
  251|       |      /* make EINTR from select or poll not a "lethal" error */
  252|      0|      r = 0;
  253|  25.5k|    return r;
  254|  25.5k|  }
  255|       |
  256|  12.4k|  for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (256:14): [True: 6.23k, False: 6.23k]
  ------------------
  257|  6.23k|    if(ufds[i].fd == CURL_SOCKET_BAD)
  ------------------
  |  |  145|  6.23k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (257:8): [True: 0, False: 6.23k]
  ------------------
  258|      0|      continue;
  259|  6.23k|    if(ufds[i].revents & POLLHUP)
  ------------------
  |  Branch (259:8): [True: 14, False: 6.22k]
  ------------------
  260|     14|      ufds[i].revents |= POLLIN;
  261|  6.23k|    if(ufds[i].revents & POLLERR)
  ------------------
  |  Branch (261:8): [True: 14, False: 6.22k]
  ------------------
  262|     14|      ufds[i].revents |= POLLIN | POLLOUT;
  263|  6.23k|  }
  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|       |  /*
  291|       |     Note also that Winsock ignores the first argument, so we do not worry
  292|       |     about the fact that maxfd is computed incorrectly with Winsock (since
  293|       |     curl_socket_t is unsigned in such cases and thus -1 is the largest
  294|       |     value).
  295|       |  */
  296|       |  r = our_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
  297|       |  if(r <= 0) {
  298|       |    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  299|       |      /* make EINTR from select or poll not a "lethal" error */
  300|       |      r = 0;
  301|       |    return r;
  302|       |  }
  303|       |
  304|       |  r = 0;
  305|       |  for(i = 0; i < nfds; i++) {
  306|       |    ufds[i].revents = 0;
  307|       |    if(ufds[i].fd == CURL_SOCKET_BAD)
  308|       |      continue;
  309|       |    if(FD_ISSET(ufds[i].fd, &fds_read)) {
  310|       |      if(ufds[i].events & POLLRDNORM)
  311|       |        ufds[i].revents |= POLLRDNORM;
  312|       |      if(ufds[i].events & POLLIN)
  313|       |        ufds[i].revents |= POLLIN;
  314|       |    }
  315|       |    if(FD_ISSET(ufds[i].fd, &fds_write)) {
  316|       |      if(ufds[i].events & POLLWRNORM)
  317|       |        ufds[i].revents |= POLLWRNORM;
  318|       |      if(ufds[i].events & POLLOUT)
  319|       |        ufds[i].revents |= POLLOUT;
  320|       |    }
  321|       |    if(FD_ISSET(ufds[i].fd, &fds_err)) {
  322|       |      if(ufds[i].events & POLLRDBAND)
  323|       |        ufds[i].revents |= POLLRDBAND;
  324|       |      if(ufds[i].events & POLLPRI)
  325|       |        ufds[i].revents |= POLLPRI;
  326|       |    }
  327|       |    if(ufds[i].revents)
  328|       |      r++;
  329|       |  }
  330|       |
  331|       |#endif /* HAVE_POLL */
  332|       |
  333|  6.23k|  return r;
  334|  31.8k|}
Curl_pollfds_init:
  339|   356k|{
  340|   356k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1081|   356k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (340:3): [True: 0, False: 356k]
  |  Branch (340:3): [True: 356k, False: 0]
  ------------------
  341|   356k|  memset(cpfds, 0, sizeof(*cpfds));
  342|   356k|  if(static_pfds && static_count) {
  ------------------
  |  Branch (342:6): [True: 356k, False: 0]
  |  Branch (342:21): [True: 356k, False: 0]
  ------------------
  343|   356k|    cpfds->pfds = static_pfds;
  344|   356k|    cpfds->count = static_count;
  345|   356k|  }
  346|   356k|}
Curl_pollfds_cleanup:
  354|   356k|{
  355|   356k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1081|   356k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (355:3): [True: 0, False: 356k]
  |  Branch (355:3): [True: 356k, False: 0]
  ------------------
  356|   356k|  if(cpfds->allocated_pfds) {
  ------------------
  |  Branch (356:6): [True: 0, False: 356k]
  ------------------
  357|      0|    curlx_free(cpfds->pfds);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  358|      0|  }
  359|   356k|  memset(cpfds, 0, sizeof(*cpfds));
  360|   356k|}
Curl_pollset_reset:
  488|  1.67M|{
  489|  1.67M|  unsigned int i;
  490|  1.67M|  ps->n = 0;
  491|  1.67M|#ifdef DEBUGBUILD
  492|  1.67M|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1081|  1.67M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (492:3): [True: 0, False: 1.67M]
  |  Branch (492:3): [True: 1.67M, False: 0]
  ------------------
  493|  1.67M|#endif
  494|  1.67M|  DEBUGASSERT(ps->count);
  ------------------
  |  | 1081|  1.67M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (494:3): [True: 0, False: 1.67M]
  |  Branch (494:3): [True: 1.67M, False: 0]
  ------------------
  495|  5.02M|  for(i = 0; i < ps->count; i++)
  ------------------
  |  Branch (495:14): [True: 3.35M, False: 1.67M]
  ------------------
  496|  3.35M|    ps->sockets[i] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  5.02M|#define CURL_SOCKET_BAD (-1)
  ------------------
  497|  1.67M|  memset(ps->actions, 0, ps->count * sizeof(ps->actions[0]));
  498|  1.67M|}
Curl_pollset_init:
  501|   558k|{
  502|   558k|#ifdef DEBUGBUILD
  503|   558k|  ps->init = CURL_EASY_POLLSET_MAGIC;
  ------------------
  |  |  131|   558k|#define CURL_EASY_POLLSET_MAGIC  0x7a657370
  ------------------
  504|   558k|#endif
  505|   558k|  ps->sockets = ps->def_sockets;
  506|   558k|  ps->actions = ps->def_actions;
  507|   558k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1294|   558k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  508|   558k|  ps->n = 0;
  509|   558k|  Curl_pollset_reset(ps);
  510|   558k|}
Curl_pollset_cleanup:
  521|   558k|{
  522|   558k|#ifdef DEBUGBUILD
  523|   558k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1081|   558k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (523:3): [True: 0, False: 558k]
  |  Branch (523:3): [True: 558k, False: 0]
  ------------------
  524|   558k|#endif
  525|   558k|  if(ps->sockets != ps->def_sockets) {
  ------------------
  |  Branch (525:6): [True: 0, False: 558k]
  ------------------
  526|      0|    curlx_free(ps->sockets);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  527|      0|    ps->sockets = ps->def_sockets;
  528|      0|  }
  529|   558k|  if(ps->actions != ps->def_actions) {
  ------------------
  |  Branch (529:6): [True: 0, False: 558k]
  ------------------
  530|      0|    curlx_free(ps->actions);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  531|      0|    ps->actions = ps->def_actions;
  532|      0|  }
  533|   558k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1294|   558k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  534|   558k|  Curl_pollset_reset(ps);
  535|   558k|}
Curl_pollset_change:
  564|   627k|{
  565|   627k|  unsigned int i;
  566|       |
  567|   627k|#ifdef DEBUGBUILD
  568|   627k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1081|   627k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (568:3): [True: 0, False: 627k]
  |  Branch (568:3): [True: 627k, False: 0]
  ------------------
  569|   627k|#endif
  570|       |
  571|   627k|  DEBUGASSERT(VALID_SOCK(sock));
  ------------------
  |  | 1081|   627k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (571:3): [True: 0, False: 627k]
  |  Branch (571:3): [True: 627k, False: 0]
  ------------------
  572|   627k|  if(!VALID_SOCK(sock))
  ------------------
  |  |   98|   627k|#define VALID_SOCK(s) ((s) >= 0)
  ------------------
  |  Branch (572:6): [True: 0, False: 627k]
  ------------------
  573|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  574|       |
  575|   627k|  DEBUGASSERT(add_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1081|   627k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (575:3): [True: 0, False: 627k]
  |  Branch (575:3): [True: 627k, False: 0]
  ------------------
  576|   627k|  DEBUGASSERT(remove_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1081|   627k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:3): [True: 0, False: 627k]
  |  Branch (576:3): [True: 627k, False: 0]
  ------------------
  577|   627k|  DEBUGASSERT((add_flags & remove_flags) == 0); /* no overlap */
  ------------------
  |  | 1081|   627k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (577:3): [True: 0, False: 627k]
  |  Branch (577:3): [True: 627k, False: 0]
  ------------------
  578|   627k|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (578:14): [True: 197k, False: 429k]
  ------------------
  579|   197k|    if(ps->sockets[i] == sock) {
  ------------------
  |  Branch (579:8): [True: 197k, False: 0]
  ------------------
  580|   197k|      ps->actions[i] &= (unsigned char)(~remove_flags);
  581|   197k|      ps->actions[i] |= (unsigned char)add_flags;
  582|       |      /* all gone? remove socket */
  583|   197k|      if(!ps->actions[i]) {
  ------------------
  |  Branch (583:10): [True: 0, False: 197k]
  ------------------
  584|      0|        if((i + 1) < ps->n) {
  ------------------
  |  Branch (584:12): [True: 0, False: 0]
  ------------------
  585|      0|          memmove(&ps->sockets[i], &ps->sockets[i + 1],
  586|      0|                  (ps->n - (i + 1)) * sizeof(ps->sockets[0]));
  587|      0|          memmove(&ps->actions[i], &ps->actions[i + 1],
  588|      0|                  (ps->n - (i + 1)) * sizeof(ps->actions[0]));
  589|      0|        }
  590|      0|        --ps->n;
  591|      0|      }
  592|   197k|      return CURLE_OK;
  593|   197k|    }
  594|   197k|  }
  595|       |  /* not present */
  596|   429k|  if(add_flags) {
  ------------------
  |  Branch (596:6): [True: 429k, False: 0]
  ------------------
  597|   429k|    if(i >= ps->count) { /* need to grow */
  ------------------
  |  Branch (597:8): [True: 0, False: 429k]
  ------------------
  598|      0|      unsigned int new_count = CURLMAX(ps->count * 2, 8);
  ------------------
  |  | 1286|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  599|      0|      curl_socket_t *nsockets;
  600|      0|      unsigned char *nactions;
  601|       |
  602|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  603|      0|                 ps->count, new_count);
  604|      0|      if(new_count <= ps->count)
  ------------------
  |  Branch (604:10): [True: 0, False: 0]
  ------------------
  605|      0|        return CURLE_OUT_OF_MEMORY;
  606|      0|      nsockets = curlx_calloc(new_count, sizeof(nsockets[0]));
  ------------------
  |  | 1480|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  607|      0|      if(!nsockets)
  ------------------
  |  Branch (607:10): [True: 0, False: 0]
  ------------------
  608|      0|        return CURLE_OUT_OF_MEMORY;
  609|      0|      nactions = curlx_calloc(new_count, sizeof(nactions[0]));
  ------------------
  |  | 1480|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  610|      0|      if(!nactions) {
  ------------------
  |  Branch (610:10): [True: 0, False: 0]
  ------------------
  611|      0|        curlx_free(nsockets);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  612|      0|        return CURLE_OUT_OF_MEMORY;
  613|      0|      }
  614|      0|      memcpy(nsockets, ps->sockets, ps->count * sizeof(ps->sockets[0]));
  615|      0|      memcpy(nactions, ps->actions, ps->count * sizeof(ps->actions[0]));
  616|      0|      if(ps->sockets != ps->def_sockets)
  ------------------
  |  Branch (616:10): [True: 0, False: 0]
  ------------------
  617|      0|        curlx_free(ps->sockets);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  618|      0|      ps->sockets = nsockets;
  619|      0|      if(ps->actions != ps->def_actions)
  ------------------
  |  Branch (619:10): [True: 0, False: 0]
  ------------------
  620|      0|        curlx_free(ps->actions);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  621|      0|      ps->actions = nactions;
  622|      0|      ps->count = new_count;
  623|      0|    }
  624|   429k|    DEBUGASSERT(i < ps->count);
  ------------------
  |  | 1081|   429k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (624:5): [True: 0, False: 429k]
  |  Branch (624:5): [True: 429k, False: 0]
  ------------------
  625|   429k|    if(i < ps->count) {
  ------------------
  |  Branch (625:8): [True: 429k, False: 0]
  ------------------
  626|   429k|      ps->sockets[i] = sock;
  627|   429k|      ps->actions[i] = (unsigned char)add_flags;
  628|   429k|      ps->n = i + 1;
  629|   429k|    }
  630|   429k|  }
  631|   429k|  return CURLE_OK;
  632|   429k|}
Curl_pollset_want_recv:
  712|   403k|{
  713|   403k|  unsigned int i;
  714|   403k|  (void)data;
  715|   802k|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (715:14): [True: 403k, False: 398k]
  ------------------
  716|   403k|    if((ps->sockets[i] == sock) && (ps->actions[i] & CURL_POLL_IN))
  ------------------
  |  |  283|  4.22k|#define CURL_POLL_IN     1
  ------------------
  |  Branch (716:8): [True: 4.22k, False: 398k]
  |  Branch (716:36): [True: 4.22k, False: 0]
  ------------------
  717|  4.22k|      return TRUE;
  ------------------
  |  | 1055|  4.22k|#define TRUE true
  ------------------
  718|   403k|  }
  719|   398k|  return FALSE;
  ------------------
  |  | 1058|   398k|#define FALSE false
  ------------------
  720|   403k|}

Curl_client_cleanup:
   71|  22.4k|{
   72|  22.4k|  cl_reset_reader(data);
   73|  22.4k|  cl_reset_writer(data);
   74|       |
   75|  22.4k|  data->req.bytecount = 0;
   76|  22.4k|  data->req.headerline = 0;
   77|  22.4k|}
Curl_client_reset:
   80|  8.32k|{
   81|  8.32k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (81:6): [True: 0, False: 8.32k]
  ------------------
   82|       |    /* already requested */
   83|      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)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
   84|      0|  }
   85|  8.32k|  else {
   86|  8.32k|    CURL_TRC_READ(data, "client_reset, clear readers");
  ------------------
  |  |  163|  8.32k|  do {                                                    \
  |  |  164|  8.32k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|  8.32k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  16.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 8.32k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  16.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  8.32k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|  8.32k|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|  8.32k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 8.32k]
  |  |  ------------------
  ------------------
   87|  8.32k|    cl_reset_reader(data);
   88|  8.32k|  }
   89|  8.32k|  cl_reset_writer(data);
   90|       |
   91|  8.32k|  data->req.bytecount = 0;
   92|  8.32k|  data->req.headerline = 0;
   93|  8.32k|}
Curl_client_start:
   96|  6.08k|{
   97|  6.08k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (97:6): [True: 0, False: 6.08k]
  ------------------
   98|      0|    struct Curl_creader *r = data->req.reader_stack;
   99|      0|    CURLcode result = CURLE_OK;
  100|       |
  101|      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)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  102|      0|    while(r) {
  ------------------
  |  Branch (102:11): [True: 0, False: 0]
  ------------------
  103|      0|      result = r->crt->cntrl(data, r, CURL_CRCNTRL_REWIND);
  104|      0|      if(result) {
  ------------------
  |  Branch (104:10): [True: 0, False: 0]
  ------------------
  105|      0|        failf(data, "rewind of client reader '%s' failed: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  106|      0|              r->crt->name, result);
  107|      0|        return result;
  108|      0|      }
  109|      0|      r = r->next;
  110|      0|    }
  111|      0|    data->req.rewind_read = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  112|      0|    cl_reset_reader(data);
  113|      0|  }
  114|  6.08k|  return CURLE_OK;
  115|  6.08k|}
Curl_cwriter_write:
  131|  8.84M|{
  132|  8.84M|  if(!writer)
  ------------------
  |  Branch (132:6): [True: 0, False: 8.84M]
  ------------------
  133|      0|    return CURLE_WRITE_ERROR;
  134|  8.84M|  return writer->cwt->do_write(data, writer, type, buf, nbytes);
  135|  8.84M|}
Curl_cwriter_def_init:
  139|  3.30k|{
  140|  3.30k|  (void)data;
  141|  3.30k|  (void)writer;
  142|  3.30k|  return CURLE_OK;
  143|  3.30k|}
Curl_cwriter_def_close:
  154|  3.30k|{
  155|  3.30k|  (void)data;
  156|  3.30k|  (void)writer;
  157|  3.30k|}
Curl_client_write:
  377|  2.21M|{
  378|  2.21M|  CURLcode result;
  379|       |
  380|       |  /* it is one of those, at least */
  381|  2.21M|  DEBUGASSERT(type &
  ------------------
  |  | 1081|  2.21M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 0, False: 2.21M]
  |  Branch (381:3): [True: 2.21M, False: 0]
  ------------------
  382|  2.21M|              (CLIENTWRITE_BODY | CLIENTWRITE_HEADER | CLIENTWRITE_INFO));
  383|       |  /* BODY is only BODY (with optional EOS) */
  384|  2.21M|  DEBUGASSERT(!(type & CLIENTWRITE_BODY) ||
  ------------------
  |  | 1081|  2.21M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (384:3): [True: 2.21M, False: 0]
  |  Branch (384:3): [True: 0, False: 0]
  |  Branch (384:3): [True: 2.00M, False: 209k]
  |  Branch (384:3): [True: 209k, False: 0]
  ------------------
  385|  2.21M|              ((type & ~(CLIENTWRITE_BODY | CLIENTWRITE_EOS)) == 0));
  386|       |  /* INFO is only INFO (with optional EOS) */
  387|  2.21M|  DEBUGASSERT(!(type & CLIENTWRITE_INFO) ||
  ------------------
  |  | 1081|  2.21M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (387:3): [True: 2.21M, False: 0]
  |  Branch (387:3): [True: 0, False: 0]
  |  Branch (387:3): [True: 220k, False: 1.99M]
  |  Branch (387:3): [True: 1.99M, False: 0]
  ------------------
  388|  2.21M|              ((type & ~(CLIENTWRITE_INFO | CLIENTWRITE_EOS)) == 0));
  389|       |
  390|  2.21M|  if(!data->req.writer_stack) {
  ------------------
  |  Branch (390:6): [True: 1.11k, False: 2.21M]
  ------------------
  391|  1.11k|    result = do_init_writer_stack(data);
  392|  1.11k|    if(result)
  ------------------
  |  Branch (392:8): [True: 0, False: 1.11k]
  ------------------
  393|      0|      return result;
  394|  1.11k|    DEBUGASSERT(data->req.writer_stack);
  ------------------
  |  | 1081|  1.11k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (394:5): [True: 0, False: 1.11k]
  |  Branch (394:5): [True: 1.11k, False: 0]
  ------------------
  395|  1.11k|  }
  396|       |
  397|  2.21M|  result = Curl_cwriter_write(data, data->req.writer_stack, type, buf, len);
  398|  2.21M|  CURL_TRC_WRITE(data, "client_write(type=%x, len=%zu) -> %d",
  ------------------
  |  |  158|  2.21M|  do {                                                     \
  |  |  159|  2.21M|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  2.21M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.42M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.21M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.21M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.42M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.21M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  2.21M|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  2.21M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 2.21M]
  |  |  ------------------
  ------------------
  399|  2.21M|                 type, len, result);
  400|  2.21M|  return result;
  401|  2.21M|}
Curl_cwriter_create:
  408|  6.24k|{
  409|  6.24k|  struct Curl_cwriter *writer = NULL;
  410|  6.24k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  411|  6.24k|  void *p;
  412|       |
  413|  6.24k|  DEBUGASSERT(cwt->cwriter_size >= sizeof(struct Curl_cwriter));
  ------------------
  |  | 1081|  6.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (413:3): [True: 0, False: 6.24k]
  |  Branch (413:3): [True: 6.24k, False: 0]
  ------------------
  414|  6.24k|  p = curlx_calloc(1, cwt->cwriter_size);
  ------------------
  |  | 1480|  6.24k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  415|  6.24k|  if(!p)
  ------------------
  |  Branch (415:6): [True: 0, False: 6.24k]
  ------------------
  416|      0|    goto out;
  417|       |
  418|  6.24k|  writer = (struct Curl_cwriter *)p;
  419|  6.24k|  writer->cwt = cwt;
  420|  6.24k|  writer->ctx = p;
  421|  6.24k|  writer->phase = phase;
  422|  6.24k|  result = cwt->do_init(data, writer);
  423|       |
  424|  6.24k|out:
  425|  6.24k|  *pwriter = result ? NULL : writer;
  ------------------
  |  Branch (425:14): [True: 0, False: 6.24k]
  ------------------
  426|  6.24k|  if(result)
  ------------------
  |  Branch (426:6): [True: 0, False: 6.24k]
  ------------------
  427|      0|    curlx_free(writer);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  428|  6.24k|  return result;
  429|  6.24k|}
Curl_cwriter_add:
  454|  4.77k|{
  455|  4.77k|  CURLcode result;
  456|  4.77k|  struct Curl_cwriter **anchor = &data->req.writer_stack;
  457|       |
  458|  4.77k|  if(!*anchor) {
  ------------------
  |  Branch (458:6): [True: 355, False: 4.41k]
  ------------------
  459|    355|    result = do_init_writer_stack(data);
  460|    355|    if(result)
  ------------------
  |  Branch (460:8): [True: 0, False: 355]
  ------------------
  461|      0|      return result;
  462|    355|  }
  463|       |
  464|       |  /* Insert the writer as first in its phase.
  465|       |   * Skip existing writers of lower phases. */
  466|  5.12k|  while(*anchor && (*anchor)->phase < writer->phase)
  ------------------
  |  Branch (466:9): [True: 5.12k, False: 0]
  |  Branch (466:20): [True: 355, False: 4.77k]
  ------------------
  467|    355|    anchor = &((*anchor)->next);
  468|  4.77k|  writer->next = *anchor;
  469|  4.77k|  *anchor = writer;
  470|  4.77k|  return CURLE_OK;
  471|  4.77k|}
Curl_cwriter_get_by_name:
  475|    355|{
  476|    355|  struct Curl_cwriter *writer;
  477|    355|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (477:40): [True: 0, False: 355]
  ------------------
  478|      0|    if(!strcmp(name, writer->cwt->name))
  ------------------
  |  Branch (478:8): [True: 0, False: 0]
  ------------------
  479|      0|      return writer;
  480|      0|  }
  481|    355|  return NULL;
  482|    355|}
Curl_cwriter_get_by_type:
  486|  2.21M|{
  487|  2.21M|  struct Curl_cwriter *writer;
  488|  8.85M|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (488:40): [True: 8.85M, False: 4.63k]
  ------------------
  489|  8.85M|    if(writer->cwt == cwt)
  ------------------
  |  Branch (489:8): [True: 2.21M, False: 6.63M]
  ------------------
  490|  2.21M|      return writer;
  491|  8.85M|  }
  492|  4.63k|  return NULL;
  493|  2.21M|}
Curl_cwriter_is_content_decoding:
  496|  2.21M|{
  497|  2.21M|  struct Curl_cwriter *writer;
  498|  11.0M|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (498:40): [True: 8.84M, False: 2.21M]
  ------------------
  499|  8.84M|    if(writer->phase == CURL_CW_CONTENT_DECODE)
  ------------------
  |  Branch (499:8): [True: 0, False: 8.84M]
  ------------------
  500|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  501|  8.84M|  }
  502|  2.21M|  return FALSE;
  ------------------
  |  | 1058|  2.21M|#define FALSE false
  ------------------
  503|  2.21M|}
Curl_cwriter_is_paused:
  506|  2.21M|{
  507|  2.21M|  return Curl_cw_out_is_paused(data);
  508|  2.21M|}
Curl_creader_def_init:
  537|    887|{
  538|    887|  (void)data;
  539|    887|  (void)reader;
  540|    887|  return CURLE_OK;
  541|    887|}
Curl_creader_def_close:
  545|    887|{
  546|    887|  (void)data;
  547|    887|  (void)reader;
  548|    887|}
Curl_creader_create:
  926|    887|{
  927|    887|  struct Curl_creader *reader = NULL;
  928|    887|  CURLcode result = CURLE_OUT_OF_MEMORY;
  929|    887|  void *p;
  930|       |
  931|    887|  DEBUGASSERT(crt->creader_size >= sizeof(struct Curl_creader));
  ------------------
  |  | 1081|    887|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (931:3): [True: 0, False: 887]
  |  Branch (931:3): [True: 887, False: 0]
  ------------------
  932|    887|  p = curlx_calloc(1, crt->creader_size);
  ------------------
  |  | 1480|    887|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  933|    887|  if(!p)
  ------------------
  |  Branch (933:6): [True: 0, False: 887]
  ------------------
  934|      0|    goto out;
  935|       |
  936|    887|  reader = (struct Curl_creader *)p;
  937|    887|  reader->crt = crt;
  938|    887|  reader->ctx = p;
  939|    887|  reader->phase = phase;
  940|    887|  result = crt->do_init(data, reader);
  941|       |
  942|    887|out:
  943|    887|  *preader = result ? NULL : reader;
  ------------------
  |  Branch (943:14): [True: 0, False: 887]
  ------------------
  944|    887|  if(result)
  ------------------
  |  Branch (944:6): [True: 0, False: 887]
  ------------------
  945|      0|    curlx_free(reader);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  946|    887|  return result;
  947|    887|}
Curl_creader_set_null:
 1275|    887|{
 1276|    887|  struct Curl_creader *r;
 1277|    887|  CURLcode result;
 1278|       |
 1279|    887|  result = Curl_creader_create(&r, data, &cr_null, CURL_CR_CLIENT);
 1280|    887|  if(result)
  ------------------
  |  Branch (1280:6): [True: 0, False: 887]
  ------------------
 1281|      0|    return result;
 1282|       |
 1283|    887|  cl_reset_reader(data);
 1284|    887|  return do_init_reader_stack(data, r);
 1285|    887|}
sendf.c:cl_reset_reader:
   59|  31.6k|{
   60|  31.6k|  struct Curl_creader *reader = data->req.reader_stack;
   61|  31.6k|  data->req.reader_started = FALSE;
  ------------------
  |  | 1058|  31.6k|#define FALSE false
  ------------------
   62|  32.5k|  while(reader) {
  ------------------
  |  Branch (62:9): [True: 887, False: 31.6k]
  ------------------
   63|    887|    data->req.reader_stack = reader->next;
   64|    887|    reader->crt->do_close(data, reader);
   65|    887|    curlx_free(reader);
  ------------------
  |  | 1483|    887|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   66|    887|    reader = data->req.reader_stack;
   67|    887|  }
   68|  31.6k|}
sendf.c:cl_reset_writer:
   48|  30.8k|{
   49|  30.8k|  struct Curl_cwriter *writer = data->req.writer_stack;
   50|  37.0k|  while(writer) {
  ------------------
  |  Branch (50:9): [True: 6.24k, False: 30.8k]
  ------------------
   51|  6.24k|    data->req.writer_stack = writer->next;
   52|  6.24k|    writer->cwt->do_close(data, writer);
   53|  6.24k|    curlx_free(writer);
  ------------------
  |  | 1483|  6.24k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   54|  6.24k|    writer = data->req.writer_stack;
   55|  6.24k|  }
   56|  30.8k|}
sendf.c:do_init_writer_stack:
  326|  1.47k|{
  327|  1.47k|  struct Curl_cwriter *writer;
  328|  1.47k|  CURLcode result;
  329|       |
  330|  1.47k|  DEBUGASSERT(!data->req.writer_stack);
  ------------------
  |  | 1081|  1.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (330:3): [True: 0, False: 1.47k]
  |  Branch (330:3): [True: 1.47k, False: 0]
  ------------------
  331|  1.47k|  result = Curl_cwriter_create(&data->req.writer_stack,
  332|  1.47k|                               data, &Curl_cwt_out, CURL_CW_CLIENT);
  333|  1.47k|  if(result)
  ------------------
  |  Branch (333:6): [True: 0, False: 1.47k]
  ------------------
  334|      0|    return result;
  335|       |
  336|       |  /* This places the "pause" writer behind the "download" writer that
  337|       |   * is added below. Meaning the "download" can do checks on content length
  338|       |   * and other things *before* write outs are buffered for paused transfers. */
  339|  1.47k|  result = Curl_cwriter_create(&writer, data, &Curl_cwt_pause,
  340|  1.47k|                               CURL_CW_PROTOCOL);
  341|  1.47k|  if(!result) {
  ------------------
  |  Branch (341:6): [True: 1.47k, False: 0]
  ------------------
  342|  1.47k|    result = Curl_cwriter_add(data, writer);
  343|  1.47k|    if(result)
  ------------------
  |  Branch (343:8): [True: 0, False: 1.47k]
  ------------------
  344|      0|      Curl_cwriter_free(data, writer);
  345|  1.47k|  }
  346|  1.47k|  if(result)
  ------------------
  |  Branch (346:6): [True: 0, False: 1.47k]
  ------------------
  347|      0|    return result;
  348|       |
  349|  1.47k|  result = Curl_cwriter_create(&writer, data, &cw_download, CURL_CW_PROTOCOL);
  350|  1.47k|  if(!result) {
  ------------------
  |  Branch (350:6): [True: 1.47k, False: 0]
  ------------------
  351|  1.47k|    result = Curl_cwriter_add(data, writer);
  352|  1.47k|    if(result)
  ------------------
  |  Branch (352:8): [True: 0, False: 1.47k]
  ------------------
  353|      0|      Curl_cwriter_free(data, writer);
  354|  1.47k|  }
  355|  1.47k|  if(result)
  ------------------
  |  Branch (355:6): [True: 0, False: 1.47k]
  ------------------
  356|      0|    return result;
  357|       |
  358|  1.47k|  result = Curl_cwriter_create(&writer, data, &cw_raw, CURL_CW_RAW);
  359|  1.47k|  if(!result) {
  ------------------
  |  Branch (359:6): [True: 1.47k, False: 0]
  ------------------
  360|  1.47k|    result = Curl_cwriter_add(data, writer);
  361|  1.47k|    if(result)
  ------------------
  |  Branch (361:8): [True: 0, False: 1.47k]
  ------------------
  362|      0|      Curl_cwriter_free(data, writer);
  363|  1.47k|  }
  364|  1.47k|  if(result)
  ------------------
  |  Branch (364:6): [True: 0, False: 1.47k]
  ------------------
  365|      0|    return result;
  366|       |
  367|  1.47k|  return result;
  368|  1.47k|}
sendf.c:cw_download_write:
  179|  2.21M|{
  180|  2.21M|  struct cw_download_ctx *ctx = writer->ctx;
  181|  2.21M|  CURLcode result;
  182|  2.21M|  size_t nwrite, excess_len = 0;
  183|  2.21M|  bool is_connect = !!(type & CLIENTWRITE_CONNECT);
  ------------------
  |  |   46|  2.21M|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  184|       |
  185|  2.21M|  if(!ctx->started_response &&
  ------------------
  |  Branch (185:6): [True: 2.00M, False: 209k]
  ------------------
  186|  2.00M|     !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   43|  2.00M|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
                   !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   46|  2.00M|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (186:6): [True: 350, False: 2.00M]
  ------------------
  187|    350|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  188|    350|    ctx->started_response = TRUE;
  ------------------
  |  | 1055|    350|#define TRUE true
  ------------------
  189|    350|  }
  190|       |
  191|  2.21M|  if(!(type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   42|  2.21M|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (191:6): [True: 2.00M, False: 209k]
  ------------------
  192|  2.00M|    if(is_connect && data->set.suppress_connect_headers)
  ------------------
  |  Branch (192:8): [True: 11.2k, False: 1.99M]
  |  Branch (192:22): [True: 1.97k, False: 9.27k]
  ------------------
  193|  1.97k|      return CURLE_OK;
  194|  2.00M|    result = Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  195|  2.00M|    CURL_TRC_WRITE(data, "download_write header(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|  2.00M|  do {                                                     \
  |  |  159|  2.00M|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  2.00M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.00M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.00M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.00M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.00M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  2.00M|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  2.00M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 2.00M]
  |  |  ------------------
  ------------------
  196|  2.00M|                   type, nbytes, result);
  197|  2.00M|    return result;
  198|  2.00M|  }
  199|       |
  200|   209k|  if(!ctx->started_body &&
  ------------------
  |  Branch (200:6): [True: 350, False: 209k]
  ------------------
  201|    350|     !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   43|    350|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
                   !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   46|    350|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (201:6): [True: 350, False: 0]
  ------------------
  202|    350|    Curl_rlimit_start(&data->progress.dl.rlimit, Curl_pgrs_now(data),
  203|    350|                      data->req.size);
  204|    350|    ctx->started_body = TRUE;
  ------------------
  |  | 1055|    350|#define TRUE true
  ------------------
  205|    350|  }
  206|       |
  207|       |  /* Here, we deal with REAL BODY bytes. All filtering and transfer
  208|       |   * encodings have been applied and only the true content, e.g. BODY,
  209|       |   * bytes are passed here.
  210|       |   * This allows us to check sizes, update stats, etc. independent
  211|       |   * from the protocol in play. */
  212|       |
  213|   209k|  if(data->req.no_body && nbytes > 0) {
  ------------------
  |  Branch (213:6): [True: 0, False: 209k]
  |  Branch (213:27): [True: 0, False: 0]
  ------------------
  214|       |    /* BODY arrives although we want none, bail out */
  215|      0|    streamclose(data->conn, "ignoring body");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
  216|      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)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  217|      0|                   "did not want a BODY", type, nbytes);
  218|      0|    data->req.download_done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  219|      0|    if(data->info.header_size)
  ------------------
  |  Branch (219:8): [True: 0, False: 0]
  ------------------
  220|       |      /* if headers have been received, this is fine */
  221|      0|      return CURLE_OK;
  222|      0|    return CURLE_WEIRD_SERVER_REPLY;
  223|      0|  }
  224|       |
  225|       |  /* Determine if we see any bytes in excess to what is allowed.
  226|       |   * We write the allowed bytes and handle excess further below.
  227|       |   * This gives deterministic BODY writes on varying buffer receive
  228|       |   * lengths. */
  229|   209k|  nwrite = nbytes;
  230|   209k|  if(data->req.maxdownload != -1) {
  ------------------
  |  Branch (230:6): [True: 0, False: 209k]
  ------------------
  231|      0|    size_t wmax = get_max_body_write_len(data, data->req.maxdownload);
  232|      0|    if(nwrite > wmax) {
  ------------------
  |  Branch (232:8): [True: 0, False: 0]
  ------------------
  233|      0|      excess_len = nbytes - wmax;
  234|      0|      nwrite = wmax;
  235|      0|    }
  236|       |
  237|      0|    if(nwrite == wmax) {
  ------------------
  |  Branch (237:8): [True: 0, False: 0]
  ------------------
  238|      0|      data->req.download_done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  239|      0|    }
  240|       |
  241|      0|    if((type & CLIENTWRITE_EOS) && !data->req.no_body &&
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (241:8): [True: 0, False: 0]
  |  Branch (241:36): [True: 0, False: 0]
  ------------------
  242|      0|       (data->req.size > data->req.bytecount)) {
  ------------------
  |  Branch (242:8): [True: 0, False: 0]
  ------------------
  243|      0|      failf(data, "end of response with %" FMT_OFF_T " bytes missing",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  244|      0|            data->req.size - data->req.bytecount);
  245|      0|      return CURLE_PARTIAL_FILE;
  246|      0|    }
  247|      0|  }
  248|       |
  249|       |  /* Error on too large filesize is handled below, after writing
  250|       |   * the permitted bytes */
  251|   209k|  if(data->set.max_filesize && !data->req.ignorebody) {
  ------------------
  |  Branch (251:6): [True: 794, False: 208k]
  |  Branch (251:32): [True: 794, False: 0]
  ------------------
  252|    794|    size_t wmax = get_max_body_write_len(data, data->set.max_filesize);
  253|    794|    if(nwrite > wmax) {
  ------------------
  |  Branch (253:8): [True: 11, False: 783]
  ------------------
  254|     11|      nwrite = wmax;
  255|     11|    }
  256|    794|  }
  257|       |
  258|   209k|  if(!data->req.ignorebody && (nwrite || (type & CLIENTWRITE_EOS))) {
  ------------------
  |  |   49|      3|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (258:6): [True: 209k, False: 0]
  |  Branch (258:32): [True: 209k, False: 3]
  |  Branch (258:42): [True: 0, False: 3]
  ------------------
  259|   209k|    result = Curl_cwriter_write(data, writer->next, type, buf, nwrite);
  260|   209k|    CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|   209k|  do {                                                     \
  |  |  159|   209k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|   209k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   419k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 209k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 209k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   419k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|   209k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|   209k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|   209k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 209k]
  |  |  ------------------
  ------------------
  261|   209k|                   type, nbytes, result);
  262|   209k|    if(result)
  ------------------
  |  Branch (262:8): [True: 0, False: 209k]
  ------------------
  263|      0|      return result;
  264|   209k|  }
  265|       |
  266|       |  /* Update stats, write and report progress */
  267|   209k|  if(nwrite) {
  ------------------
  |  Branch (267:6): [True: 209k, False: 3]
  ------------------
  268|   209k|    data->req.bytecount += nwrite;
  269|   209k|    Curl_pgrs_download_inc(data, nwrite);
  270|   209k|  }
  271|       |
  272|   209k|  if(excess_len) {
  ------------------
  |  Branch (272:6): [True: 0, False: 209k]
  ------------------
  273|      0|    if(!data->req.ignorebody) {
  ------------------
  |  Branch (273:8): [True: 0, False: 0]
  ------------------
  274|      0|      infof(data,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  275|      0|            "Excess found writing body:"
  276|      0|            " excess = %zu"
  277|      0|            ", size = %" FMT_OFF_T
  278|      0|            ", maxdownload = %" FMT_OFF_T
  279|      0|            ", bytecount = %" FMT_OFF_T,
  280|      0|            excess_len, data->req.size, data->req.maxdownload,
  281|      0|            data->req.bytecount);
  282|      0|      connclose(data->conn, "excess found in a read");
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  283|      0|    }
  284|      0|  }
  285|   209k|  else if((nwrite < nbytes) && !data->req.ignorebody) {
  ------------------
  |  Branch (285:11): [True: 11, False: 209k]
  |  Branch (285:32): [True: 11, False: 0]
  ------------------
  286|     11|    failf(data, "Exceeded the maximum allowed file size "
  ------------------
  |  |   62|     11|#define failf Curl_failf
  ------------------
  287|     11|          "(%" FMT_OFF_T ") with %" FMT_OFF_T " bytes",
  288|     11|          data->set.max_filesize, data->req.bytecount);
  289|     11|    return CURLE_FILESIZE_EXCEEDED;
  290|     11|  }
  291|       |
  292|   209k|  return CURLE_OK;
  293|   209k|}
sendf.c:get_max_body_write_len:
  160|    794|{
  161|    794|  if(limit != -1) {
  ------------------
  |  Branch (161:6): [True: 794, False: 0]
  ------------------
  162|       |    /* How much more are we allowed to write? */
  163|    794|    return curlx_sotouz_range(limit - data->req.bytecount, 0, SIZE_MAX);
  164|    794|  }
  165|      0|  return SIZE_MAX;
  166|    794|}
sendf.c:cw_raw_write:
  309|  2.21M|{
  310|  2.21M|  if(type & CLIENTWRITE_BODY && data->set.verbose && !data->req.ignorebody) {
  ------------------
  |  |   42|  4.42M|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (310:6): [True: 209k, False: 2.00M]
  |  Branch (310:33): [True: 0, False: 209k]
  |  Branch (310:54): [True: 0, False: 0]
  ------------------
  311|      0|    Curl_debug(data, CURLINFO_DATA_IN, buf, nbytes);
  312|      0|  }
  313|  2.21M|  return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  314|  2.21M|}
sendf.c:do_init_reader_stack:
 1100|    887|{
 1101|    887|  CURLcode result = CURLE_OK;
 1102|    887|  curl_off_t clen;
 1103|       |
 1104|    887|  DEBUGASSERT(r);
  ------------------
  |  | 1081|    887|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1104:3): [True: 0, False: 887]
  |  Branch (1104:3): [True: 887, False: 0]
  ------------------
 1105|    887|  DEBUGASSERT(r->crt);
  ------------------
  |  | 1081|    887|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1105:3): [True: 0, False: 887]
  |  Branch (1105:3): [True: 887, False: 0]
  ------------------
 1106|    887|  DEBUGASSERT(r->phase == CURL_CR_CLIENT);
  ------------------
  |  | 1081|    887|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1106:3): [True: 0, False: 887]
  |  Branch (1106:3): [True: 887, False: 0]
  ------------------
 1107|    887|  DEBUGASSERT(!data->req.reader_stack);
  ------------------
  |  | 1081|    887|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1107:3): [True: 0, False: 887]
  |  Branch (1107:3): [True: 887, False: 0]
  ------------------
 1108|       |
 1109|    887|  data->req.reader_stack = r;
 1110|    887|  clen = r->crt->total_length(data, r);
 1111|       |  /* if we do not have 0 length init, and crlf conversion is wanted,
 1112|       |   * add the reader for it */
 1113|    887|  if(clen && (data->set.crlf
  ------------------
  |  Branch (1113:6): [True: 0, False: 887]
  |  Branch (1113:15): [True: 0, False: 0]
  ------------------
 1114|      0|#ifdef CURL_PREFER_LF_LINEENDS
 1115|      0|     || data->state.prefer_ascii
  ------------------
  |  Branch (1115:9): [True: 0, False: 0]
  ------------------
 1116|      0|#endif
 1117|      0|    )) {
 1118|      0|    result = cr_lc_add(data);
 1119|      0|    if(result)
  ------------------
  |  Branch (1119:8): [True: 0, False: 0]
  ------------------
 1120|      0|      return result;
 1121|      0|  }
 1122|       |
 1123|    887|  return result;
 1124|    887|}
sendf.c:cr_null_total_length:
 1253|    887|{
 1254|       |  /* this reader changes length depending on input */
 1255|    887|  (void)data;
 1256|    887|  (void)reader;
 1257|    887|  return 0;
 1258|    887|}

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

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

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

Curl_slist_append_nodup:
   56|  42.6k|{
   57|  42.6k|  struct curl_slist *last;
   58|  42.6k|  struct curl_slist *new_item;
   59|       |
   60|  42.6k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  42.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (60:3): [True: 0, False: 42.6k]
  |  Branch (60:3): [True: 42.6k, False: 0]
  ------------------
   61|       |
   62|  42.6k|  new_item = curlx_malloc(sizeof(struct curl_slist));
  ------------------
  |  | 1478|  42.6k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   63|  42.6k|  if(!new_item)
  ------------------
  |  Branch (63:6): [True: 0, False: 42.6k]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|  42.6k|  new_item->next = NULL;
   67|  42.6k|  new_item->data = CURL_UNCONST(data);
  ------------------
  |  |  866|  42.6k|#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|  42.6k|  if(!list)
  ------------------
  |  Branch (70:6): [True: 31.7k, False: 10.9k]
  ------------------
   71|  31.7k|    return new_item;
   72|       |
   73|  10.9k|  last = slist_get_last(list);
   74|  10.9k|  last->next = new_item;
   75|  10.9k|  return list;
   76|  42.6k|}
curl_slist_append:
   86|  41.8k|{
   87|  41.8k|  char *dupdata = curlx_strdup(data);
  ------------------
  |  | 1477|  41.8k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   88|       |
   89|  41.8k|  if(!dupdata)
  ------------------
  |  Branch (89:6): [True: 0, False: 41.8k]
  ------------------
   90|      0|    return NULL;
   91|       |
   92|  41.8k|  list = Curl_slist_append_nodup(list, dupdata);
   93|  41.8k|  if(!list)
  ------------------
  |  Branch (93:6): [True: 0, False: 41.8k]
  ------------------
   94|      0|    curlx_free(dupdata);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   95|       |
   96|  41.8k|  return list;
   97|  41.8k|}
curl_slist_free_all:
  125|  59.2k|{
  126|  59.2k|  struct curl_slist *next;
  127|  59.2k|  struct curl_slist *item;
  128|       |
  129|  59.2k|  if(!list)
  ------------------
  |  Branch (129:6): [True: 27.4k, False: 31.7k]
  ------------------
  130|  27.4k|    return;
  131|       |
  132|  31.7k|  item = list;
  133|  42.5k|  do {
  134|  42.5k|    next = item->next;
  135|  42.5k|    curlx_safefree(item->data);
  ------------------
  |  | 1327|  42.5k|  do {                      \
  |  | 1328|  42.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  42.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  42.5k|    (ptr) = NULL;           \
  |  | 1330|  42.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 42.5k]
  |  |  ------------------
  ------------------
  136|  42.5k|    curlx_free(item);
  ------------------
  |  | 1483|  42.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  137|  42.5k|    item = next;
  138|  42.5k|  } while(next);
  ------------------
  |  Branch (138:11): [True: 10.8k, False: 31.7k]
  ------------------
  139|  31.7k|}
slist.c:slist_get_last:
   30|  10.9k|{
   31|  10.9k|  struct curl_slist *item;
   32|       |
   33|       |  /* if caller passed us a NULL, return now */
   34|  10.9k|  if(!list)
  ------------------
  |  Branch (34:6): [True: 0, False: 10.9k]
  ------------------
   35|      0|    return NULL;
   36|       |
   37|       |  /* loop through to find the last item */
   38|  10.9k|  item = list;
   39|  7.91M|  while(item->next) {
  ------------------
  |  Branch (39:9): [True: 7.90M, False: 10.9k]
  ------------------
   40|  7.90M|    item = item->next;
   41|  7.90M|  }
   42|  10.9k|  return item;
   43|  10.9k|}

Curl_wakeup_init:
  284|  10.0k|{
  285|  10.0k|#ifdef USE_EVENTFD
  286|  10.0k|  return wakeup_eventfd(socks, nonblocking);
  287|       |#elif defined(HAVE_PIPE)
  288|       |  return wakeup_pipe(socks, nonblocking);
  289|       |#elif defined(HAVE_SOCKETPAIR)
  290|       |  return wakeup_socketpair(socks, nonblocking);
  291|       |#else
  292|       |  return wakeup_inet(socks, nonblocking);
  293|       |#endif
  294|  10.0k|}
Curl_wakeup_signal:
  311|    826|{
  312|    826|  int err = 0;
  313|    826|#ifdef USE_EVENTFD
  314|    826|  const uint64_t buf[1] = { 1 };
  315|       |#else
  316|       |  const char buf[1] = { 1 };
  317|       |#endif
  318|       |
  319|    826|  while(1) {
  ------------------
  |  Branch (319:9): [True: 826, Folded]
  ------------------
  320|    826|    err = 0;
  321|    826|    if(wakeup_write(socks[1], buf, sizeof(buf)) < 0) {
  ------------------
  |  |  298|    826|#define wakeup_write        write
  ------------------
  |  Branch (321:8): [True: 0, False: 826]
  ------------------
  322|      0|      err = SOCKERRNO;
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
  323|       |#ifdef USE_WINSOCK
  324|       |      if(err == SOCKEWOULDBLOCK)
  325|       |        err = 0; /* wakeup is already ongoing */
  326|       |#else
  327|      0|      if(SOCKEINTR == err)
  ------------------
  |  | 1129|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (327:10): [True: 0, False: 0]
  ------------------
  328|      0|        continue;
  329|      0|      if((err == SOCKEWOULDBLOCK) || (err == EAGAIN))
  ------------------
  |  | 1137|      0|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
  |  Branch (329:10): [True: 0, False: 0]
  |  Branch (329:38): [True: 0, False: 0]
  ------------------
  330|      0|        err = 0; /* wakeup is already ongoing */
  331|      0|#endif
  332|      0|    }
  333|    826|    break;
  334|    826|  }
  335|    826|  return err;
  336|    826|}
Curl_wakeup_consume:
  339|   212k|{
  340|   212k|  char buf[64];
  341|   212k|  ssize_t rc;
  342|   212k|  CURLcode result = CURLE_OK;
  343|       |
  344|   213k|  do {
  345|   213k|    rc = wakeup_read(socks[0], buf, sizeof(buf));
  ------------------
  |  |  299|   213k|#define wakeup_read         read
  ------------------
  346|   213k|    if(!rc)
  ------------------
  |  Branch (346:8): [True: 0, False: 213k]
  ------------------
  347|      0|      break;
  348|   213k|    else if(rc < 0) {
  ------------------
  |  Branch (348:13): [True: 212k, False: 547]
  ------------------
  349|       |#ifdef USE_WINSOCK
  350|       |      if(SOCKERRNO == SOCKEWOULDBLOCK)
  351|       |        break;
  352|       |#else
  353|   212k|      if(SOCKEINTR == SOCKERRNO)
  ------------------
  |  | 1129|   212k|#define SOCKEINTR         EINTR
  ------------------
                    if(SOCKEINTR == SOCKERRNO)
  ------------------
  |  | 1095|   212k|#define SOCKERRNO         errno
  ------------------
  |  Branch (353:10): [True: 0, False: 212k]
  ------------------
  354|      0|        continue;
  355|   212k|      if((SOCKERRNO == SOCKEWOULDBLOCK) || (SOCKERRNO == EAGAIN))
  ------------------
  |  | 1095|   212k|#define SOCKERRNO         errno
  ------------------
                    if((SOCKERRNO == SOCKEWOULDBLOCK) || (SOCKERRNO == EAGAIN))
  ------------------
  |  | 1137|   212k|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
                    if((SOCKERRNO == SOCKEWOULDBLOCK) || (SOCKERRNO == EAGAIN))
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
  |  Branch (355:10): [True: 212k, False: 0]
  |  Branch (355:44): [True: 0, False: 0]
  ------------------
  356|   212k|        break;
  357|      0|#endif
  358|      0|      result = CURLE_READ_ERROR;
  359|      0|      break;
  360|   212k|    }
  361|   213k|  } while(all);
  ------------------
  |  Branch (361:11): [True: 547, False: 0]
  ------------------
  362|   212k|  return result;
  363|   212k|}
Curl_wakeup_destroy:
  366|  10.0k|{
  367|       |#ifndef USE_EVENTFD
  368|       |  if(socks[1] != CURL_SOCKET_BAD)
  369|       |    wakeup_close(socks[1]);
  370|       |#endif
  371|  10.0k|  if(socks[0] != CURL_SOCKET_BAD)
  ------------------
  |  |  145|  10.0k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (371:6): [True: 10.0k, False: 0]
  ------------------
  372|  10.0k|    wakeup_close(socks[0]);
  ------------------
  |  |  300|  10.0k|#define wakeup_close        close
  ------------------
  373|  10.0k|  socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  10.0k|#define CURL_SOCKET_BAD (-1)
  ------------------
  374|  10.0k|}
socketpair.c:wakeup_eventfd:
   39|  10.0k|{
   40|  10.0k|  int efd = eventfd(0, nonblocking ? EFD_CLOEXEC | EFD_NONBLOCK : EFD_CLOEXEC);
  ------------------
  |  Branch (40:24): [True: 10.0k, False: 0]
  ------------------
   41|  10.0k|  if(efd == -1) {
  ------------------
  |  Branch (41:6): [True: 0, False: 10.0k]
  ------------------
   42|      0|    socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   43|      0|    return -1;
   44|      0|  }
   45|  10.0k|  socks[0] = socks[1] = efd;
   46|  10.0k|  return 0;
   47|  10.0k|}

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

Curl_splay:
   43|   637k|{
   44|   637k|  struct Curl_tree N, *l, *r, *y;
   45|       |
   46|   637k|  if(!t)
  ------------------
  |  Branch (46:6): [True: 0, False: 637k]
  ------------------
   47|      0|    return NULL;
   48|   637k|  N.smaller = N.larger = NULL;
   49|   637k|  l = r = &N;
   50|       |
   51|   764k|  for(;;) {
   52|   764k|    timediff_t comp = splay_compare(pkey, &t->key);
  ------------------
  |  |   35|   764k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
   53|   764k|    if(comp < 0) {
  ------------------
  |  Branch (53:8): [True: 203k, False: 561k]
  ------------------
   54|   203k|      if(!t->smaller)
  ------------------
  |  Branch (54:10): [True: 76.2k, False: 126k]
  ------------------
   55|  76.2k|        break;
   56|   126k|      if(splay_compare(pkey, &t->smaller->key) < 0) {
  ------------------
  |  |   35|   126k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (56:10): [True: 126k, False: 7]
  ------------------
   57|   126k|        y = t->smaller;                           /* rotate smaller */
   58|   126k|        t->smaller = y->larger;
   59|   126k|        y->larger = t;
   60|   126k|        t = y;
   61|   126k|        if(!t->smaller)
  ------------------
  |  Branch (61:12): [True: 126k, False: 404]
  ------------------
   62|   126k|          break;
   63|   126k|      }
   64|    411|      r->smaller = t;                               /* link smaller */
   65|    411|      r = t;
   66|    411|      t = t->smaller;
   67|    411|    }
   68|   561k|    else if(comp > 0) {
  ------------------
  |  Branch (68:13): [True: 381k, False: 179k]
  ------------------
   69|   381k|      if(!t->larger)
  ------------------
  |  Branch (69:10): [True: 254k, False: 127k]
  ------------------
   70|   254k|        break;
   71|   127k|      if(splay_compare(pkey, &t->larger->key) > 0) {
  ------------------
  |  |   35|   127k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (71:10): [True: 380, False: 126k]
  ------------------
   72|    380|        y = t->larger;                          /* rotate larger */
   73|    380|        t->larger = y->smaller;
   74|    380|        y->smaller = t;
   75|    380|        t = y;
   76|    380|        if(!t->larger)
  ------------------
  |  Branch (76:12): [True: 179, False: 201]
  ------------------
   77|    179|          break;
   78|    380|      }
   79|   126k|      l->larger = t;                              /* link larger */
   80|   126k|      l = t;
   81|   126k|      t = t->larger;
   82|   126k|    }
   83|   179k|    else
   84|   179k|      break;
   85|   764k|  }
   86|       |
   87|   637k|  l->larger = t->smaller;                                /* assemble */
   88|   637k|  r->smaller = t->larger;
   89|   637k|  t->smaller = N.larger;
   90|   637k|  t->larger = N.smaller;
   91|       |
   92|   637k|  return t;
   93|   637k|}
Curl_splayinsert:
  107|   179k|{
  108|   179k|  DEBUGASSERT(node);
  ------------------
  |  | 1081|   179k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (108:3): [True: 0, False: 179k]
  |  Branch (108:3): [True: 179k, False: 0]
  ------------------
  109|       |
  110|   179k|  if(t) {
  ------------------
  |  Branch (110:6): [True: 127k, False: 52.2k]
  ------------------
  111|   127k|    t = Curl_splay(pkey, t);
  112|   127k|    DEBUGASSERT(t);
  ------------------
  |  | 1081|   127k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:5): [True: 0, False: 127k]
  |  Branch (112:5): [True: 127k, False: 0]
  ------------------
  113|   127k|    if(splay_compare(pkey, &t->key) == 0) {
  ------------------
  |  |   35|   127k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (113:8): [True: 0, False: 127k]
  ------------------
  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|   127k|  }
  127|       |
  128|   179k|  if(!t) {
  ------------------
  |  Branch (128:6): [True: 52.2k, False: 127k]
  ------------------
  129|  52.2k|    node->smaller = node->larger = NULL;
  130|  52.2k|  }
  131|   127k|  else if(splay_compare(pkey, &t->key) < 0) {
  ------------------
  |  |   35|   127k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (131:11): [True: 1, False: 127k]
  ------------------
  132|      1|    node->smaller = t->smaller;
  133|      1|    node->larger = t;
  134|      1|    t->smaller = NULL;
  135|      1|  }
  136|   127k|  else {
  137|   127k|    node->larger = t->larger;
  138|   127k|    node->smaller = t;
  139|   127k|    t->larger = NULL;
  140|   127k|  }
  141|   179k|  node->key = *pkey;
  142|       |
  143|       |  /* no identical nodes (yet), we are the only one in the list of nodes */
  144|   179k|  node->samen = node;
  145|   179k|  node->samep = node;
  146|   179k|  return node;
  147|   179k|}
Curl_splaygetbest:
  155|   202k|{
  156|   202k|  static const struct curltime tv_zero = { 0, 0 };
  157|   202k|  struct Curl_tree *x;
  158|       |
  159|   202k|  if(!t) {
  ------------------
  |  Branch (159:6): [True: 0, False: 202k]
  ------------------
  160|      0|    *removed = NULL; /* none removed since there was no root */
  161|      0|    return NULL;
  162|      0|  }
  163|       |
  164|       |  /* find smallest */
  165|   202k|  t = Curl_splay(&tv_zero, t);
  166|   202k|  DEBUGASSERT(t);
  ------------------
  |  | 1081|   202k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 202k]
  |  Branch (166:3): [True: 202k, False: 0]
  ------------------
  167|   202k|  if(splay_compare(pkey, &t->key) < 0) {
  ------------------
  |  |   35|   202k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (167:6): [True: 202k, False: 6]
  ------------------
  168|       |    /* even the smallest is too big */
  169|   202k|    *removed = NULL;
  170|   202k|    return t;
  171|   202k|  }
  172|       |
  173|       |  /* FIRST! Check if there is a list with identical keys */
  174|      6|  x = t->samen;
  175|      6|  if(x != t) {
  ------------------
  |  Branch (175:6): [True: 0, False: 6]
  ------------------
  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|      6|  x = t->larger;
  192|      6|  *removed = t;
  193|       |
  194|      6|  return x;
  195|      6|}
Curl_splayremove:
  211|   179k|{
  212|   179k|  struct Curl_tree *x;
  213|       |
  214|   179k|  if(!t)
  ------------------
  |  Branch (214:6): [True: 0, False: 179k]
  ------------------
  215|      0|    return 1;
  216|       |
  217|   179k|  DEBUGASSERT(removenode);
  ------------------
  |  | 1081|   179k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (217:3): [True: 0, False: 179k]
  |  Branch (217:3): [True: 179k, False: 0]
  ------------------
  218|       |
  219|   179k|  if(splay_compare(&SPLAY_SUBNODE, &removenode->key) == 0) {
  ------------------
  |  |   35|   179k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (219:6): [True: 0, False: 179k]
  ------------------
  220|       |    /* It is a subnode within a 'same' linked list and thus we can unlink it
  221|       |       easily. */
  222|      0|    DEBUGASSERT(removenode->samen != removenode);
  ------------------
  |  | 1081|      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|   179k|  t = Curl_splay(&removenode->key, t);
  238|   179k|  DEBUGASSERT(t);
  ------------------
  |  | 1081|   179k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (238:3): [True: 0, False: 179k]
  |  Branch (238:3): [True: 179k, 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|   179k|  DEBUGASSERT(t == removenode);
  ------------------
  |  | 1081|   179k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 179k]
  |  Branch (247:3): [True: 179k, False: 0]
  ------------------
  248|   179k|  if(t != removenode)
  ------------------
  |  Branch (248:6): [True: 0, False: 179k]
  ------------------
  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|   179k|  x = t->samen;
  254|   179k|  if(x != t) {
  ------------------
  |  Branch (254:6): [True: 0, False: 179k]
  ------------------
  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|   179k|  else {
  265|       |    /* Remove the root node */
  266|   179k|    if(!t->smaller)
  ------------------
  |  Branch (266:8): [True: 52.2k, False: 127k]
  ------------------
  267|  52.2k|      x = t->larger;
  268|   127k|    else {
  269|   127k|      x = Curl_splay(&removenode->key, t->smaller);
  270|   127k|      DEBUGASSERT(x);
  ------------------
  |  | 1081|   127k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (270:7): [True: 0, False: 127k]
  |  Branch (270:7): [True: 127k, False: 0]
  ------------------
  271|   127k|      x->larger = t->larger;
  272|   127k|    }
  273|   179k|  }
  274|       |
  275|   179k|  *newroot = x; /* store new root pointer */
  276|       |
  277|   179k|  return 0;
  278|   179k|}
Curl_splayset:
  282|   179k|{
  283|   179k|  DEBUGASSERT(node);
  ------------------
  |  | 1081|   179k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (283:3): [True: 0, False: 179k]
  |  Branch (283:3): [True: 179k, False: 0]
  ------------------
  284|   179k|  node->ptr = payload;
  285|   179k|}
Curl_splayget:
  288|      6|{
  289|      6|  DEBUGASSERT(node);
  ------------------
  |  | 1081|      6|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:3): [True: 0, False: 6]
  |  Branch (289:3): [True: 6, False: 0]
  ------------------
  290|      6|  return node->ptr;
  291|      6|}

Curl_raw_toupper:
   75|  1.87M|{
   76|  1.87M|  return (char)touppermap[(unsigned char)in];
   77|  1.87M|}
Curl_raw_tolower:
   82|  1.64M|{
   83|  1.64M|  return (char)tolowermap[(unsigned char)in];
   84|  1.64M|}
Curl_strntoupper:
   92|  6.14k|{
   93|  6.14k|  if(n < 1)
  ------------------
  |  Branch (93:6): [True: 0, False: 6.14k]
  ------------------
   94|      0|    return;
   95|       |
   96|  57.6k|  do {
   97|  57.6k|    *dest++ = Curl_raw_toupper(*src);
   98|  57.6k|  } while(*src++ && --n);
  ------------------
  |  Branch (98:11): [True: 53.2k, False: 4.44k]
  |  Branch (98:21): [True: 51.5k, False: 1.70k]
  ------------------
   99|  6.14k|}
Curl_strntolower:
  107|   351k|{
  108|   351k|  if(n < 1)
  ------------------
  |  Branch (108:6): [True: 6, False: 351k]
  ------------------
  109|      6|    return;
  110|       |
  111|  1.44M|  do {
  112|  1.44M|    *dest++ = Curl_raw_tolower(*src);
  113|  1.44M|  } while(*src++ && --n);
  ------------------
  |  Branch (113:11): [True: 1.44M, False: 0]
  |  Branch (113:21): [True: 1.09M, False: 351k]
  ------------------
  114|   351k|}
Curl_safecmp:
  120|  1.34k|{
  121|  1.34k|  if(a && b)
  ------------------
  |  Branch (121:6): [True: 0, False: 1.34k]
  |  Branch (121:11): [True: 0, False: 0]
  ------------------
  122|      0|    return !strcmp(a, b);
  123|  1.34k|  return !a && !b;
  ------------------
  |  Branch (123:10): [True: 1.34k, False: 0]
  |  Branch (123:16): [True: 0, False: 1.34k]
  ------------------
  124|  1.34k|}

curl_strequal:
   77|  56.2k|{
   78|  56.2k|  if(s1 && s2)
  ------------------
  |  Branch (78:6): [True: 56.0k, False: 203]
  |  Branch (78:12): [True: 56.0k, False: 0]
  ------------------
   79|       |    /* both pointers point to something then compare them */
   80|  56.0k|    return casecompare(s1, s2);
   81|       |
   82|       |  /* if both pointers are NULL then treat them as equal */
   83|    203|  return NULL == s1 && NULL == s2;
  ------------------
  |  Branch (83:10): [True: 203, False: 0]
  |  Branch (83:24): [True: 203, False: 0]
  ------------------
   84|  56.2k|}
curl_strnequal:
   88|   475k|{
   89|   475k|  if(s1 && s2)
  ------------------
  |  Branch (89:6): [True: 475k, False: 0]
  |  Branch (89:12): [True: 475k, False: 0]
  ------------------
   90|       |    /* both pointers point to something then compare them */
   91|   475k|    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|   475k|}
strequal.c:casecompare:
   36|  56.0k|{
   37|  68.4k|  while(*first) {
  ------------------
  |  Branch (37:9): [True: 67.9k, False: 489]
  ------------------
   38|  67.9k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (38:8): [True: 55.5k, False: 12.3k]
  ------------------
   39|       |      /* get out of the loop as soon as they do not match */
   40|  55.5k|      return 0;
   41|  12.3k|    first++;
   42|  12.3k|    second++;
   43|  12.3k|  }
   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|    489|  return !*first == !*second;
   49|  56.0k|}
strequal.c:ncasecompare:
   52|   475k|{
   53|   928k|  while(*first && max) {
  ------------------
  |  Branch (53:9): [True: 831k, False: 97.0k]
  |  Branch (53:19): [True: 781k, False: 49.8k]
  ------------------
   54|   781k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (54:8): [True: 328k, False: 452k]
  ------------------
   55|   328k|      return 0;
   56|   452k|    max--;
   57|   452k|    first++;
   58|   452k|    second++;
   59|   452k|  }
   60|   146k|  if(max == 0)
  ------------------
  |  Branch (60:6): [True: 88.0k, False: 58.9k]
  ------------------
   61|  88.0k|    return 1; /* they are equal this far */
   62|       |
   63|  58.9k|  return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
   64|   146k|}

curl_easy_strerror:
   35|    172|{
   36|    172|#ifdef CURLVERBOSE
   37|    172|  switch(error) {
   38|      0|  case CURLE_OK:
  ------------------
  |  Branch (38:3): [True: 0, False: 172]
  ------------------
   39|      0|    return "No error";
   40|       |
   41|      0|  case CURLE_UNSUPPORTED_PROTOCOL:
  ------------------
  |  Branch (41:3): [True: 0, False: 172]
  ------------------
   42|      0|    return "Unsupported protocol";
   43|       |
   44|      0|  case CURLE_FAILED_INIT:
  ------------------
  |  Branch (44:3): [True: 0, False: 172]
  ------------------
   45|      0|    return "Failed initialization";
   46|       |
   47|      0|  case CURLE_URL_MALFORMAT:
  ------------------
  |  Branch (47:3): [True: 0, False: 172]
  ------------------
   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: 172]
  ------------------
   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: 172]
  ------------------
   55|      0|    return "Could not resolve proxy name";
   56|       |
   57|      0|  case CURLE_COULDNT_RESOLVE_HOST:
  ------------------
  |  Branch (57:3): [True: 0, False: 172]
  ------------------
   58|      0|    return "Could not resolve hostname";
   59|       |
   60|     71|  case CURLE_COULDNT_CONNECT:
  ------------------
  |  Branch (60:3): [True: 71, False: 101]
  ------------------
   61|     71|    return "Could not connect to server";
   62|       |
   63|      0|  case CURLE_WEIRD_SERVER_REPLY:
  ------------------
  |  Branch (63:3): [True: 0, False: 172]
  ------------------
   64|      0|    return "Weird server reply";
   65|       |
   66|      0|  case CURLE_REMOTE_ACCESS_DENIED:
  ------------------
  |  Branch (66:3): [True: 0, False: 172]
  ------------------
   67|      0|    return "Access denied to remote resource";
   68|       |
   69|      0|  case CURLE_FTP_ACCEPT_FAILED:
  ------------------
  |  Branch (69:3): [True: 0, False: 172]
  ------------------
   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: 172]
  ------------------
   73|      0|    return "FTP: Accepting server connect has timed out";
   74|       |
   75|      0|  case CURLE_FTP_PRET_FAILED:
  ------------------
  |  Branch (75:3): [True: 0, False: 172]
  ------------------
   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: 172]
  ------------------
   79|      0|    return "FTP: unknown PASS reply";
   80|       |
   81|      0|  case CURLE_FTP_WEIRD_PASV_REPLY:
  ------------------
  |  Branch (81:3): [True: 0, False: 172]
  ------------------
   82|      0|    return "FTP: unknown PASV reply";
   83|       |
   84|      0|  case CURLE_FTP_WEIRD_227_FORMAT:
  ------------------
  |  Branch (84:3): [True: 0, False: 172]
  ------------------
   85|      0|    return "FTP: unknown 227 response format";
   86|       |
   87|      0|  case CURLE_FTP_CANT_GET_HOST:
  ------------------
  |  Branch (87:3): [True: 0, False: 172]
  ------------------
   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: 172]
  ------------------
   91|      0|    return "Error in the HTTP2 framing layer";
   92|       |
   93|      0|  case CURLE_FTP_COULDNT_SET_TYPE:
  ------------------
  |  Branch (93:3): [True: 0, False: 172]
  ------------------
   94|      0|    return "FTP: could not set file type";
   95|       |
   96|      0|  case CURLE_PARTIAL_FILE:
  ------------------
  |  Branch (96:3): [True: 0, False: 172]
  ------------------
   97|      0|    return "Transferred a partial file";
   98|       |
   99|      0|  case CURLE_FTP_COULDNT_RETR_FILE:
  ------------------
  |  Branch (99:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  103|      0|    return "Quote command returned error";
  104|       |
  105|      0|  case CURLE_HTTP_RETURNED_ERROR:
  ------------------
  |  Branch (105:3): [True: 0, False: 172]
  ------------------
  106|      0|    return "HTTP response code said error";
  107|       |
  108|      0|  case CURLE_WRITE_ERROR:
  ------------------
  |  Branch (108:3): [True: 0, False: 172]
  ------------------
  109|      0|    return "Failed writing received data to disk/application";
  110|       |
  111|      0|  case CURLE_UPLOAD_FAILED:
  ------------------
  |  Branch (111:3): [True: 0, False: 172]
  ------------------
  112|      0|    return "Upload failed (at start/before it took off)";
  113|       |
  114|      0|  case CURLE_READ_ERROR:
  ------------------
  |  Branch (114:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  118|      0|    return "Out of memory";
  119|       |
  120|      0|  case CURLE_OPERATION_TIMEDOUT:
  ------------------
  |  Branch (120:3): [True: 0, False: 172]
  ------------------
  121|      0|    return "Timeout was reached";
  122|       |
  123|      0|  case CURLE_FTP_PORT_FAILED:
  ------------------
  |  Branch (123:3): [True: 0, False: 172]
  ------------------
  124|      0|    return "FTP: command PORT failed";
  125|       |
  126|      0|  case CURLE_FTP_COULDNT_USE_REST:
  ------------------
  |  Branch (126:3): [True: 0, False: 172]
  ------------------
  127|      0|    return "FTP: command REST failed";
  128|       |
  129|      0|  case CURLE_RANGE_ERROR:
  ------------------
  |  Branch (129:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  133|      0|    return "SSL connect error";
  134|       |
  135|      0|  case CURLE_BAD_DOWNLOAD_RESUME:
  ------------------
  |  Branch (135:3): [True: 0, False: 172]
  ------------------
  136|      0|    return "Could not resume download";
  137|       |
  138|      0|  case CURLE_FILE_COULDNT_READ_FILE:
  ------------------
  |  Branch (138:3): [True: 0, False: 172]
  ------------------
  139|      0|    return "Could not read a file:// file";
  140|       |
  141|      0|  case CURLE_LDAP_CANNOT_BIND:
  ------------------
  |  Branch (141:3): [True: 0, False: 172]
  ------------------
  142|      0|    return "LDAP: cannot bind";
  143|       |
  144|      0|  case CURLE_LDAP_SEARCH_FAILED:
  ------------------
  |  Branch (144:3): [True: 0, False: 172]
  ------------------
  145|      0|    return "LDAP: search failed";
  146|       |
  147|      0|  case CURLE_ABORTED_BY_CALLBACK:
  ------------------
  |  Branch (147:3): [True: 0, False: 172]
  ------------------
  148|      0|    return "Operation was aborted by an application callback";
  149|       |
  150|      2|  case CURLE_BAD_FUNCTION_ARGUMENT:
  ------------------
  |  Branch (150:3): [True: 2, False: 170]
  ------------------
  151|      2|    return "A libcurl function was given a bad argument";
  152|       |
  153|     99|  case CURLE_INTERFACE_FAILED:
  ------------------
  |  Branch (153:3): [True: 99, False: 73]
  ------------------
  154|     99|    return "Failed binding local connection end";
  155|       |
  156|      0|  case CURLE_TOO_MANY_REDIRECTS:
  ------------------
  |  Branch (156:3): [True: 0, False: 172]
  ------------------
  157|      0|    return "Number of redirects hit maximum amount";
  158|       |
  159|      0|  case CURLE_UNKNOWN_OPTION:
  ------------------
  |  Branch (159:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  163|      0|    return "Malformed option provided in a setopt";
  164|       |
  165|      0|  case CURLE_GOT_NOTHING:
  ------------------
  |  Branch (165:3): [True: 0, False: 172]
  ------------------
  166|      0|    return "Server returned nothing (no headers, no data)";
  167|       |
  168|      0|  case CURLE_SSL_ENGINE_NOTFOUND:
  ------------------
  |  Branch (168:3): [True: 0, False: 172]
  ------------------
  169|      0|    return "SSL crypto engine not found";
  170|       |
  171|      0|  case CURLE_SSL_ENGINE_SETFAILED:
  ------------------
  |  Branch (171:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  175|      0|    return "Failed to initialize SSL crypto engine";
  176|       |
  177|      0|  case CURLE_SEND_ERROR:
  ------------------
  |  Branch (177:3): [True: 0, False: 172]
  ------------------
  178|      0|    return "Failed sending data to the peer";
  179|       |
  180|      0|  case CURLE_RECV_ERROR:
  ------------------
  |  Branch (180:3): [True: 0, False: 172]
  ------------------
  181|      0|    return "Failure when receiving data from the peer";
  182|       |
  183|      0|  case CURLE_SSL_CERTPROBLEM:
  ------------------
  |  Branch (183:3): [True: 0, False: 172]
  ------------------
  184|      0|    return "Problem with the local SSL certificate";
  185|       |
  186|      0|  case CURLE_SSL_CIPHER:
  ------------------
  |  Branch (186:3): [True: 0, False: 172]
  ------------------
  187|      0|    return "Could not use specified SSL cipher";
  188|       |
  189|      0|  case CURLE_PEER_FAILED_VERIFICATION:
  ------------------
  |  Branch (189:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  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: 172]
  ------------------
  196|      0|    return "Unrecognized or bad HTTP Content or Transfer-Encoding";
  197|       |
  198|      0|  case CURLE_FILESIZE_EXCEEDED:
  ------------------
  |  Branch (198:3): [True: 0, False: 172]
  ------------------
  199|      0|    return "Maximum file size exceeded";
  200|       |
  201|      0|  case CURLE_USE_SSL_FAILED:
  ------------------
  |  Branch (201:3): [True: 0, False: 172]
  ------------------
  202|      0|    return "Requested SSL level failed";
  203|       |
  204|      0|  case CURLE_SSL_SHUTDOWN_FAILED:
  ------------------
  |  Branch (204:3): [True: 0, False: 172]
  ------------------
  205|      0|    return "Failed to shut down the SSL connection";
  206|       |
  207|      0|  case CURLE_SSL_CRL_BADFILE:
  ------------------
  |  Branch (207:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  211|      0|    return "Issuer check against peer certificate failed";
  212|       |
  213|      0|  case CURLE_SEND_FAIL_REWIND:
  ------------------
  |  Branch (213:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  217|      0|    return "Login denied";
  218|       |
  219|      0|  case CURLE_TFTP_NOTFOUND:
  ------------------
  |  Branch (219:3): [True: 0, False: 172]
  ------------------
  220|      0|    return "TFTP: File Not Found";
  221|       |
  222|      0|  case CURLE_TFTP_PERM:
  ------------------
  |  Branch (222:3): [True: 0, False: 172]
  ------------------
  223|      0|    return "TFTP: Access Violation";
  224|       |
  225|      0|  case CURLE_REMOTE_DISK_FULL:
  ------------------
  |  Branch (225:3): [True: 0, False: 172]
  ------------------
  226|      0|    return "Disk full or allocation exceeded";
  227|       |
  228|      0|  case CURLE_TFTP_ILLEGAL:
  ------------------
  |  Branch (228:3): [True: 0, False: 172]
  ------------------
  229|      0|    return "TFTP: Illegal operation";
  230|       |
  231|      0|  case CURLE_TFTP_UNKNOWNID:
  ------------------
  |  Branch (231:3): [True: 0, False: 172]
  ------------------
  232|      0|    return "TFTP: Unknown transfer ID";
  233|       |
  234|      0|  case CURLE_REMOTE_FILE_EXISTS:
  ------------------
  |  Branch (234:3): [True: 0, False: 172]
  ------------------
  235|      0|    return "Remote file already exists";
  236|       |
  237|      0|  case CURLE_TFTP_NOSUCHUSER:
  ------------------
  |  Branch (237:3): [True: 0, False: 172]
  ------------------
  238|      0|    return "TFTP: No such user";
  239|       |
  240|      0|  case CURLE_REMOTE_FILE_NOT_FOUND:
  ------------------
  |  Branch (240:3): [True: 0, False: 172]
  ------------------
  241|      0|    return "Remote file not found";
  242|       |
  243|      0|  case CURLE_SSH:
  ------------------
  |  Branch (243:3): [True: 0, False: 172]
  ------------------
  244|      0|    return "Error in the SSH layer";
  245|       |
  246|      0|  case CURLE_AGAIN:
  ------------------
  |  Branch (246:3): [True: 0, False: 172]
  ------------------
  247|      0|    return "Socket not ready for send/recv";
  248|       |
  249|      0|  case CURLE_RTSP_CSEQ_ERROR:
  ------------------
  |  Branch (249:3): [True: 0, False: 172]
  ------------------
  250|      0|    return "RTSP CSeq mismatch or invalid CSeq";
  251|       |
  252|      0|  case CURLE_RTSP_SESSION_ERROR:
  ------------------
  |  Branch (252:3): [True: 0, False: 172]
  ------------------
  253|      0|    return "RTSP session error";
  254|       |
  255|      0|  case CURLE_FTP_BAD_FILE_LIST:
  ------------------
  |  Branch (255:3): [True: 0, False: 172]
  ------------------
  256|      0|    return "Unable to parse FTP file list";
  257|       |
  258|      0|  case CURLE_CHUNK_FAILED:
  ------------------
  |  Branch (258:3): [True: 0, False: 172]
  ------------------
  259|      0|    return "Chunk callback failed";
  260|       |
  261|      0|  case CURLE_NO_CONNECTION_AVAILABLE:
  ------------------
  |  Branch (261:3): [True: 0, False: 172]
  ------------------
  262|      0|    return "The max connection limit is reached";
  263|       |
  264|      0|  case CURLE_SSL_PINNEDPUBKEYNOTMATCH:
  ------------------
  |  Branch (264:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  268|      0|    return "SSL server certificate status verification FAILED";
  269|       |
  270|      0|  case CURLE_HTTP2_STREAM:
  ------------------
  |  Branch (270:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  274|      0|    return "API function called from within callback";
  275|       |
  276|      0|  case CURLE_AUTH_ERROR:
  ------------------
  |  Branch (276:3): [True: 0, False: 172]
  ------------------
  277|      0|    return "An authentication function returned an error";
  278|       |
  279|      0|  case CURLE_HTTP3:
  ------------------
  |  Branch (279:3): [True: 0, False: 172]
  ------------------
  280|      0|    return "HTTP/3 error";
  281|       |
  282|      0|  case CURLE_QUIC_CONNECT_ERROR:
  ------------------
  |  Branch (282:3): [True: 0, False: 172]
  ------------------
  283|      0|    return "QUIC connection error";
  284|       |
  285|      0|  case CURLE_PROXY:
  ------------------
  |  Branch (285:3): [True: 0, False: 172]
  ------------------
  286|      0|    return "proxy handshake error";
  287|       |
  288|      0|  case CURLE_SSL_CLIENTCERT:
  ------------------
  |  Branch (288:3): [True: 0, False: 172]
  ------------------
  289|      0|    return "SSL Client Certificate required";
  290|       |
  291|      0|  case CURLE_UNRECOVERABLE_POLL:
  ------------------
  |  Branch (291:3): [True: 0, False: 172]
  ------------------
  292|      0|    return "Unrecoverable error in select/poll";
  293|       |
  294|      0|  case CURLE_TOO_LARGE:
  ------------------
  |  Branch (294:3): [True: 0, False: 172]
  ------------------
  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: 172]
  ------------------
  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: 172]
  ------------------
  302|      0|    break;
  303|    172|  }
  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|    172|}
curl_url_strerror:
  421|    677|{
  422|    677|#ifdef CURLVERBOSE
  423|    677|  switch(error) {
  ------------------
  |  Branch (423:10): [True: 677, False: 0]
  ------------------
  424|      0|  case CURLUE_OK:
  ------------------
  |  Branch (424:3): [True: 0, False: 677]
  ------------------
  425|      0|    return "No error";
  426|       |
  427|      0|  case CURLUE_BAD_HANDLE:
  ------------------
  |  Branch (427:3): [True: 0, False: 677]
  ------------------
  428|      0|    return "An invalid CURLU pointer was passed as argument";
  429|       |
  430|      0|  case CURLUE_BAD_PARTPOINTER:
  ------------------
  |  Branch (430:3): [True: 0, False: 677]
  ------------------
  431|      0|    return "An invalid 'part' argument was passed as argument";
  432|       |
  433|    268|  case CURLUE_MALFORMED_INPUT:
  ------------------
  |  Branch (433:3): [True: 268, False: 409]
  ------------------
  434|    268|    return "Malformed input to a URL function";
  435|       |
  436|     80|  case CURLUE_BAD_PORT_NUMBER:
  ------------------
  |  Branch (436:3): [True: 80, False: 597]
  ------------------
  437|     80|    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: 677]
  ------------------
  440|      0|    return "Unsupported URL scheme";
  441|       |
  442|      0|  case CURLUE_URLDECODE:
  ------------------
  |  Branch (442:3): [True: 0, False: 677]
  ------------------
  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: 677]
  ------------------
  446|      0|    return "A memory function failed";
  447|       |
  448|      1|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (448:3): [True: 1, False: 676]
  ------------------
  449|      1|    return "Credentials was passed in the URL when prohibited";
  450|       |
  451|      0|  case CURLUE_UNKNOWN_PART:
  ------------------
  |  Branch (451:3): [True: 0, False: 677]
  ------------------
  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: 677]
  ------------------
  455|      0|    return "No scheme part in the URL";
  456|       |
  457|      0|  case CURLUE_NO_USER:
  ------------------
  |  Branch (457:3): [True: 0, False: 677]
  ------------------
  458|      0|    return "No user part in the URL";
  459|       |
  460|      0|  case CURLUE_NO_PASSWORD:
  ------------------
  |  Branch (460:3): [True: 0, False: 677]
  ------------------
  461|      0|    return "No password part in the URL";
  462|       |
  463|      0|  case CURLUE_NO_OPTIONS:
  ------------------
  |  Branch (463:3): [True: 0, False: 677]
  ------------------
  464|      0|    return "No options part in the URL";
  465|       |
  466|    103|  case CURLUE_NO_HOST:
  ------------------
  |  Branch (466:3): [True: 103, False: 574]
  ------------------
  467|    103|    return "No host part in the URL";
  468|       |
  469|      0|  case CURLUE_NO_PORT:
  ------------------
  |  Branch (469:3): [True: 0, False: 677]
  ------------------
  470|      0|    return "No port part in the URL";
  471|       |
  472|      0|  case CURLUE_NO_QUERY:
  ------------------
  |  Branch (472:3): [True: 0, False: 677]
  ------------------
  473|      0|    return "No query part in the URL";
  474|       |
  475|      0|  case CURLUE_NO_FRAGMENT:
  ------------------
  |  Branch (475:3): [True: 0, False: 677]
  ------------------
  476|      0|    return "No fragment part in the URL";
  477|       |
  478|      0|  case CURLUE_NO_ZONEID:
  ------------------
  |  Branch (478:3): [True: 0, False: 677]
  ------------------
  479|      0|    return "No zoneid part in the URL";
  480|       |
  481|      0|  case CURLUE_BAD_LOGIN:
  ------------------
  |  Branch (481:3): [True: 0, False: 677]
  ------------------
  482|      0|    return "Bad login part";
  483|       |
  484|     56|  case CURLUE_BAD_IPV6:
  ------------------
  |  Branch (484:3): [True: 56, False: 621]
  ------------------
  485|     56|    return "Bad IPv6 address";
  486|       |
  487|    121|  case CURLUE_BAD_HOSTNAME:
  ------------------
  |  Branch (487:3): [True: 121, False: 556]
  ------------------
  488|    121|    return "Bad hostname";
  489|       |
  490|     45|  case CURLUE_BAD_FILE_URL:
  ------------------
  |  Branch (490:3): [True: 45, False: 632]
  ------------------
  491|     45|    return "Bad file:// URL";
  492|       |
  493|      3|  case CURLUE_BAD_SLASHES:
  ------------------
  |  Branch (493:3): [True: 3, False: 674]
  ------------------
  494|      3|    return "Unsupported number of slashes following scheme";
  495|       |
  496|      0|  case CURLUE_BAD_SCHEME:
  ------------------
  |  Branch (496:3): [True: 0, False: 677]
  ------------------
  497|      0|    return "Bad scheme";
  498|       |
  499|      0|  case CURLUE_BAD_PATH:
  ------------------
  |  Branch (499:3): [True: 0, False: 677]
  ------------------
  500|      0|    return "Bad path";
  501|       |
  502|      0|  case CURLUE_BAD_FRAGMENT:
  ------------------
  |  Branch (502:3): [True: 0, False: 677]
  ------------------
  503|      0|    return "Bad fragment";
  504|       |
  505|      0|  case CURLUE_BAD_QUERY:
  ------------------
  |  Branch (505:3): [True: 0, False: 677]
  ------------------
  506|      0|    return "Bad query";
  507|       |
  508|      0|  case CURLUE_BAD_PASSWORD:
  ------------------
  |  Branch (508:3): [True: 0, False: 677]
  ------------------
  509|      0|    return "Bad password";
  510|       |
  511|      0|  case CURLUE_BAD_USER:
  ------------------
  |  Branch (511:3): [True: 0, False: 677]
  ------------------
  512|      0|    return "Bad user";
  513|       |
  514|      0|  case CURLUE_LACKS_IDN:
  ------------------
  |  Branch (514:3): [True: 0, False: 677]
  ------------------
  515|      0|    return "libcurl lacks IDN support";
  516|       |
  517|      0|  case CURLUE_TOO_LARGE:
  ------------------
  |  Branch (517:3): [True: 0, False: 677]
  ------------------
  518|      0|    return "A value or data field is larger than allowed";
  519|       |
  520|      0|  case CURLUE_LAST:
  ------------------
  |  Branch (520:3): [True: 0, False: 677]
  ------------------
  521|      0|    break;
  522|    677|  }
  523|       |
  524|      0|  return "CURLUcode unknown";
  525|       |#else
  526|       |  if(error == CURLUE_OK)
  527|       |    return "No error";
  528|       |  else
  529|       |    return "Error";
  530|       |#endif
  531|    677|}

Curl_thrdpool_set_props:
  272|  10.0k|{
  273|  10.0k|  CURLcode result = CURLE_OK;
  274|  10.0k|  size_t running;
  275|       |
  276|  10.0k|  if(!max_threads || (min_threads > max_threads))
  ------------------
  |  Branch (276:6): [True: 0, False: 10.0k]
  |  Branch (276:22): [True: 0, False: 10.0k]
  ------------------
  277|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  278|       |
  279|  10.0k|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|  10.0k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  280|  10.0k|  tpool->min_threads = min_threads;
  281|  10.0k|  tpool->max_threads = max_threads;
  282|  10.0k|  tpool->idle_time_ms = idle_time_ms;
  283|  10.0k|  running = Curl_llist_count(&tpool->slots);
  284|  10.0k|  if(tpool->min_threads > running) {
  ------------------
  |  Branch (284:6): [True: 0, False: 10.0k]
  ------------------
  285|      0|    result = thrdpool_signal(tpool, tpool->min_threads - (uint32_t)running);
  286|      0|  }
  287|  10.0k|  Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|  10.0k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  288|       |
  289|  10.0k|  return result;
  290|  10.0k|}
Curl_thrdpool_create:
  301|  10.0k|{
  302|  10.0k|  struct curl_thrdpool *tpool;
  303|  10.0k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  304|       |
  305|  10.0k|  tpool = curlx_calloc(1, sizeof(*tpool));
  ------------------
  |  | 1480|  10.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  306|  10.0k|  if(!tpool)
  ------------------
  |  Branch (306:6): [True: 0, False: 10.0k]
  ------------------
  307|      0|    goto out;
  308|  10.0k|  tpool->refcount = 1;
  309|       |
  310|  10.0k|  Curl_mutex_init(&tpool->lock);
  ------------------
  |  |   35|  10.0k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  311|  10.0k|  Curl_cond_init(&tpool->await);
  ------------------
  |  |   40|  10.0k|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  312|  10.0k|  Curl_llist_init(&tpool->slots, NULL);
  313|  10.0k|  Curl_llist_init(&tpool->zombies, NULL);
  314|  10.0k|  tpool->fn_take = fn_take;
  315|  10.0k|  tpool->fn_process = fn_process;
  316|  10.0k|  tpool->fn_return = fn_return;
  317|  10.0k|  tpool->fn_user_data = user_data;
  318|       |
  319|  10.0k|  tpool->name = curlx_strdup(name);
  ------------------
  |  | 1477|  10.0k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  320|  10.0k|  if(!tpool->name)
  ------------------
  |  Branch (320:6): [True: 0, False: 10.0k]
  ------------------
  321|      0|    goto out;
  322|       |
  323|  10.0k|  result = Curl_thrdpool_set_props(tpool, min_threads, max_threads,
  324|  10.0k|                                   idle_time_ms);
  325|       |
  326|  10.0k|out:
  327|  10.0k|  if(result && tpool) {
  ------------------
  |  Branch (327:6): [True: 0, False: 10.0k]
  |  Branch (327:16): [True: 0, False: 0]
  ------------------
  328|      0|    tpool->aborted = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  329|      0|    thrdpool_unlink(tpool, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  330|       |    tpool = NULL;
  331|      0|  }
  332|  10.0k|  *ptpool = tpool;
  333|  10.0k|  return result;
  334|  10.0k|}
Curl_thrdpool_destroy:
  337|  10.0k|{
  338|  10.0k|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|  10.0k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  339|       |
  340|  10.0k|  tpool->aborted = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  341|       |
  342|  10.8k|  while(join && Curl_llist_count(&tpool->slots)) {
  ------------------
  |  Branch (342:9): [True: 10.8k, False: 0]
  |  Branch (342:17): [True: 807, False: 10.0k]
  ------------------
  343|    807|    thrdpool_wake_all(tpool);
  344|    807|    Curl_cond_wait(&tpool->await, &tpool->lock);
  345|    807|  }
  346|       |
  347|  10.0k|  thrdpool_join_zombies(tpool);
  348|       |
  349|       |  /* detach all still running threads */
  350|  10.0k|  if(Curl_llist_count(&tpool->slots)) {
  ------------------
  |  Branch (350:6): [True: 0, False: 10.0k]
  ------------------
  351|      0|    struct Curl_llist_node *e;
  352|      0|    for(e = Curl_llist_head(&tpool->slots); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (352:45): [True: 0, False: 0]
  ------------------
  353|      0|      struct thrdslot *tslot = Curl_node_elem(e);
  354|      0|      if(tslot->thread != curl_thread_t_null)
  ------------------
  |  |   34|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (354:10): [True: 0, False: 0]
  ------------------
  355|      0|        Curl_thread_destroy(&tslot->thread);
  356|      0|    }
  357|      0|    tpool->detached = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  358|      0|  }
  359|       |
  360|  10.0k|  if(!thrdpool_unlink(tpool, TRUE)) {
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  |  Branch (360:6): [True: 0, False: 10.0k]
  ------------------
  361|       |    /* tpool not destroyed */
  362|      0|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  363|      0|  }
  364|  10.0k|}
Curl_thrdpool_signal:
  367|    985|{
  368|    985|  CURLcode result;
  369|       |
  370|    985|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|    985|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  371|    985|  result = thrdpool_signal(tpool, nthreads);
  372|    985|  Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|    985|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  373|    985|  return result;
  374|    985|}
thrdpool.c:thrdpool_signal:
  237|    985|{
  238|    985|  struct Curl_llist_node *e, *n;
  239|    985|  CURLcode result = CURLE_OK;
  240|       |
  241|    985|  DEBUGASSERT(!tpool->aborted);
  ------------------
  |  | 1081|    985|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 0, False: 985]
  |  Branch (241:3): [True: 985, False: 0]
  ------------------
  242|    985|  thrdpool_join_zombies(tpool);
  243|       |
  244|  1.44k|  for(e = Curl_llist_head(&tpool->slots); e && nthreads; e = n) {
  ------------------
  |  Branch (244:43): [True: 477, False: 970]
  |  Branch (244:48): [True: 462, False: 15]
  ------------------
  245|    462|    struct thrdslot *tslot = Curl_node_elem(e);
  246|    462|    n = Curl_node_next(e);
  247|    462|    if(tslot->idle) {
  ------------------
  |  Branch (247:8): [True: 27, False: 435]
  ------------------
  248|     27|      Curl_cond_signal(&tslot->await);
  249|     27|      --nthreads;
  250|     27|    }
  251|    435|    else if(!tslot->starttime.tv_sec && !tslot->starttime.tv_usec) {
  ------------------
  |  Branch (251:13): [True: 434, False: 1]
  |  Branch (251:41): [True: 434, False: 0]
  ------------------
  252|       |      /* starting thread, queries for work soon. */
  253|    434|      --nthreads;
  254|    434|    }
  255|    462|  }
  256|       |
  257|  1.94k|  while(nthreads && !result &&
  ------------------
  |  Branch (257:9): [True: 958, False: 985]
  |  Branch (257:21): [True: 958, False: 0]
  ------------------
  258|    958|        Curl_llist_count(&tpool->slots) < tpool->max_threads) {
  ------------------
  |  Branch (258:9): [True: 958, False: 0]
  ------------------
  259|    958|    result = thrdslot_start(tpool);
  260|    958|    if(result)
  ------------------
  |  Branch (260:8): [True: 0, False: 958]
  ------------------
  261|      0|      break;
  262|    958|    --nthreads;
  263|    958|  }
  264|       |
  265|    985|  return result;
  266|    985|}
thrdpool.c:thrdslot_start:
  155|    958|{
  156|    958|  struct thrdslot *tslot;
  157|    958|  CURLcode result = CURLE_OUT_OF_MEMORY;
  158|       |
  159|    958|  tslot = curlx_calloc(1, sizeof(*tslot));
  ------------------
  |  | 1480|    958|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  160|    958|  if(!tslot)
  ------------------
  |  Branch (160:6): [True: 0, False: 958]
  ------------------
  161|      0|    goto out;
  162|    958|  tslot->id = tpool->next_id++;
  163|    958|  tslot->tpool = tpool;
  164|    958|  tslot->thread = curl_thread_t_null;
  ------------------
  |  |   34|    958|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  165|    958|  Curl_cond_init(&tslot->await);
  ------------------
  |  |   40|    958|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  166|       |
  167|    958|  tpool->refcount++;
  168|    958|  tslot->running = TRUE;
  ------------------
  |  | 1055|    958|#define TRUE true
  ------------------
  169|    958|  tslot->thread = Curl_thread_create(thrdslot_run, tslot);
  170|    958|  if(tslot->thread == curl_thread_t_null) { /* never started */
  ------------------
  |  |   34|    958|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (170:6): [True: 0, False: 958]
  ------------------
  171|      0|    tslot->running = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  172|      0|    thrdpool_unlink(tpool, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  173|      0|    result = CURLE_FAILED_INIT;
  174|      0|    goto out;
  175|      0|  }
  176|       |
  177|    958|  Curl_llist_append(&tpool->slots, tslot, &tslot->node);
  178|    958|  tslot = NULL;
  179|    958|  result = CURLE_OK;
  180|       |
  181|    958|out:
  182|    958|  if(tslot)
  ------------------
  |  Branch (182:6): [True: 0, False: 958]
  ------------------
  183|      0|    thrdslot_destroy(tslot);
  184|    958|  return result;
  185|    958|}
thrdpool.c:thrdslot_run:
   94|    958|{
   95|    958|  struct thrdslot *tslot = arg;
   96|    958|  struct curl_thrdpool *tpool = tslot->tpool;
   97|    958|  void *item;
   98|       |
   99|    958|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|    958|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  100|    958|  DEBUGASSERT(Curl_node_llist(&tslot->node) == &tpool->slots);
  ------------------
  |  | 1081|    958|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (100:3): [True: 0, False: 958]
  |  Branch (100:3): [True: 958, False: 0]
  ------------------
  101|  1.78k|  for(;;) {
  102|  2.76k|    while(!tpool->aborted) {
  ------------------
  |  Branch (102:11): [True: 1.81k, False: 958]
  ------------------
  103|  1.81k|      tslot->work_description = NULL;
  104|  1.81k|      tslot->work_timeout_ms = 0;
  105|  1.81k|      item = tpool->fn_take(tpool->fn_user_data, &tslot->work_description,
  106|  1.81k|                            &tslot->work_timeout_ms);
  107|  1.81k|      if(!item)
  ------------------
  |  Branch (107:10): [True: 826, False: 985]
  ------------------
  108|    826|        break;
  109|    985|      tslot->starttime = curlx_now();
  110|    985|      tslot->idle = FALSE;
  ------------------
  |  | 1058|    985|#define FALSE false
  ------------------
  111|    985|      Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|    985|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  112|       |
  113|    985|      tpool->fn_process(item);
  114|       |
  115|    985|      Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|    985|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  116|    985|      tslot->work_description = NULL;
  117|    985|      tpool->fn_return(item, tpool->aborted ? NULL : tpool->fn_user_data);
  ------------------
  |  Branch (117:30): [True: 159, False: 826]
  ------------------
  118|    985|    }
  119|       |
  120|  1.78k|    if(tpool->aborted ||
  ------------------
  |  Branch (120:8): [True: 958, False: 826]
  ------------------
  121|    826|       (Curl_llist_count(&tpool->slots) > tpool->max_threads))
  ------------------
  |  Branch (121:8): [True: 0, False: 826]
  ------------------
  122|    958|      goto out;
  123|       |
  124|    826|    tslot->idle = TRUE;
  ------------------
  |  | 1055|    826|#define TRUE true
  ------------------
  125|    826|    tslot->starttime = curlx_now();
  126|    826|    thrdpool_join_zombies(tpool);
  127|    826|    Curl_cond_signal(&tpool->await);
  128|       |    /* Only wait with idle timeout when we are above the minimum
  129|       |     * number of threads. Otherwise short idle timeouts will keep
  130|       |     * on activating threads that have no means to shut down. */
  131|    826|    if((tpool->idle_time_ms > 0) &&
  ------------------
  |  Branch (131:8): [True: 826, False: 0]
  ------------------
  132|    826|       (Curl_llist_count(&tpool->slots) > tpool->min_threads)) {
  ------------------
  |  Branch (132:8): [True: 826, False: 0]
  ------------------
  133|    826|      CURLcode result = Curl_cond_timedwait(&tslot->await, &tpool->lock,
  134|    826|                                            tpool->idle_time_ms);
  135|    826|      if((result == CURLE_OPERATION_TIMEDOUT) &&
  ------------------
  |  Branch (135:10): [True: 0, False: 826]
  ------------------
  136|      0|         (Curl_llist_count(&tpool->slots) > tpool->min_threads)) {
  ------------------
  |  Branch (136:10): [True: 0, False: 0]
  ------------------
  137|      0|        goto out;
  138|      0|      }
  139|    826|    }
  140|      0|    else {
  141|      0|      Curl_cond_wait(&tslot->await, &tpool->lock);
  142|      0|    }
  143|    826|  }
  144|       |
  145|    958|out:
  146|    958|  thrdslot_done(tslot);
  147|    958|  if(!thrdpool_unlink(tslot->tpool, TRUE)) {
  ------------------
  |  | 1055|    958|#define TRUE true
  ------------------
  |  Branch (147:6): [True: 958, False: 0]
  ------------------
  148|       |    /* tpool not destroyed */
  149|    958|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|    958|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  150|    958|  }
  151|    958|  return 0;
  152|    958|}
thrdpool.c:thrdslot_done:
   83|    958|{
   84|    958|  struct curl_thrdpool *tpool = tslot->tpool;
   85|       |
   86|    958|  DEBUGASSERT(Curl_node_llist(&tslot->node) == &tpool->slots);
  ------------------
  |  | 1081|    958|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (86:3): [True: 0, False: 958]
  |  Branch (86:3): [True: 958, False: 0]
  ------------------
   87|    958|  Curl_node_remove(&tslot->node);
   88|       |  tslot->running = FALSE;
  ------------------
  |  | 1058|    958|#define FALSE false
  ------------------
   89|    958|  Curl_llist_append(&tpool->zombies, tslot, &tslot->node);
   90|    958|  Curl_cond_signal(&tpool->await);
   91|    958|}
thrdpool.c:thrdslot_destroy:
   75|    958|{
   76|    958|  DEBUGASSERT(tslot->thread == curl_thread_t_null);
  ------------------
  |  | 1081|    958|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 958]
  |  Branch (76:3): [True: 958, False: 0]
  ------------------
   77|    958|  DEBUGASSERT(!tslot->running);
  ------------------
  |  | 1081|    958|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 958]
  |  Branch (77:3): [True: 958, False: 0]
  ------------------
   78|    958|  Curl_cond_destroy(&tslot->await);
  ------------------
  |  |   41|    958|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
   79|    958|  curlx_free(tslot);
  ------------------
  |  | 1483|    958|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   80|    958|}
thrdpool.c:thrdpool_unlink:
  216|  11.0k|{
  217|  11.0k|  DEBUGASSERT(tpool->refcount);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (217:3): [True: 0, False: 11.0k]
  |  Branch (217:3): [True: 11.0k, False: 0]
  ------------------
  218|  11.0k|  if(tpool->refcount)
  ------------------
  |  Branch (218:6): [True: 11.0k, False: 0]
  ------------------
  219|  11.0k|    tpool->refcount--;
  220|  11.0k|  if(tpool->refcount)
  ------------------
  |  Branch (220:6): [True: 958, False: 10.0k]
  ------------------
  221|    958|    return FALSE;
  ------------------
  |  | 1058|    958|#define FALSE false
  ------------------
  222|       |
  223|       |  /* no more references, free */
  224|  10.0k|  DEBUGASSERT(tpool->aborted);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (224:3): [True: 0, False: 10.0k]
  |  Branch (224:3): [True: 10.0k, False: 0]
  ------------------
  225|  10.0k|  thrdpool_join_zombies(tpool);
  226|  10.0k|  if(locked)
  ------------------
  |  Branch (226:6): [True: 10.0k, False: 0]
  ------------------
  227|  10.0k|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|  10.0k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  228|  10.0k|  curlx_free(tpool->name);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  229|  10.0k|  Curl_cond_destroy(&tpool->await);
  ------------------
  |  |   41|  10.0k|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
  230|  10.0k|  Curl_mutex_destroy(&tpool->lock);
  ------------------
  |  |   38|  10.0k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  231|  10.0k|  curlx_free(tpool);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  232|       |  return TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  233|  10.0k|}
thrdpool.c:thrdpool_wake_all:
  188|    807|{
  189|    807|  struct Curl_llist_node *e;
  190|  2.04k|  for(e = Curl_llist_head(&tpool->slots); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (190:43): [True: 1.24k, False: 807]
  ------------------
  191|  1.24k|    struct thrdslot *tslot = Curl_node_elem(e);
  192|  1.24k|    Curl_cond_signal(&tslot->await);
  193|  1.24k|  }
  194|    807|}
thrdpool.c:thrdpool_join_zombies:
  197|  21.9k|{
  198|  21.9k|  struct Curl_llist_node *e;
  199|       |
  200|  22.9k|  for(e = Curl_llist_head(&tpool->zombies); e;
  ------------------
  |  Branch (200:45): [True: 958, False: 21.9k]
  ------------------
  201|  21.9k|      e = Curl_llist_head(&tpool->zombies)) {
  202|    958|    struct thrdslot *tslot = Curl_node_elem(e);
  203|       |
  204|    958|    Curl_node_remove(&tslot->node);
  205|    958|    if(tslot->thread != curl_thread_t_null) {
  ------------------
  |  |   34|    958|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (205:8): [True: 958, False: 0]
  ------------------
  206|    958|      Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|    958|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  207|    958|      Curl_thread_join(&tslot->thread);
  208|    958|      Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|    958|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  209|    958|      tslot->thread = curl_thread_t_null;
  ------------------
  |  |   34|    958|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  210|    958|    }
  211|    958|    thrdslot_destroy(tslot);
  212|    958|  }
  213|  21.9k|}

Curl_thrdq_create:
  209|  10.0k|{
  210|  10.0k|  struct curl_thrdq *tqueue;
  211|  10.0k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  212|       |
  213|  10.0k|  tqueue = curlx_calloc(1, sizeof(*tqueue));
  ------------------
  |  | 1480|  10.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  214|  10.0k|  if(!tqueue)
  ------------------
  |  Branch (214:6): [True: 0, False: 10.0k]
  ------------------
  215|      0|    goto out;
  216|       |
  217|  10.0k|  Curl_mutex_init(&tqueue->lock);
  ------------------
  |  |   35|  10.0k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  218|  10.0k|  Curl_cond_init(&tqueue->await);
  ------------------
  |  |   40|  10.0k|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  219|  10.0k|  Curl_llist_init(&tqueue->sendq, thrdq_item_list_dtor);
  220|  10.0k|  Curl_llist_init(&tqueue->recvq, thrdq_item_list_dtor);
  221|  10.0k|  tqueue->fn_free = fn_free;
  222|  10.0k|  tqueue->fn_process = fn_process;
  223|  10.0k|  tqueue->fn_event = fn_event;
  224|  10.0k|  tqueue->fn_user_data = user_data;
  225|  10.0k|  tqueue->send_max_len = max_len;
  226|       |
  227|  10.0k|  tqueue->name = curlx_strdup(name);
  ------------------
  |  | 1477|  10.0k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  228|  10.0k|  if(!tqueue->name)
  ------------------
  |  Branch (228:6): [True: 0, False: 10.0k]
  ------------------
  229|      0|    goto out;
  230|       |
  231|  10.0k|  result = Curl_thrdpool_create(&tqueue->tpool, name,
  232|  10.0k|                                min_threads, max_threads, idle_time_ms,
  233|  10.0k|                                thrdq_tpool_take,
  234|  10.0k|                                thrdq_tpool_process,
  235|  10.0k|                                thrdq_tpool_return,
  236|  10.0k|                                tqueue);
  237|       |
  238|  10.0k|out:
  239|  10.0k|  if(result && tqueue) {
  ------------------
  |  Branch (239:6): [True: 0, False: 10.0k]
  |  Branch (239:16): [True: 0, False: 0]
  ------------------
  240|      0|    tqueue->aborted = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  241|      0|    thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
                  thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  242|       |    tqueue = NULL;
  243|      0|  }
  244|  10.0k|  *ptqueue = tqueue;
  245|  10.0k|  return result;
  246|  10.0k|}
Curl_thrdq_destroy:
  249|  10.0k|{
  250|  10.0k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|  10.0k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  251|  10.0k|  DEBUGASSERT(!tqueue->aborted);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (251:3): [True: 0, False: 10.0k]
  |  Branch (251:3): [True: 10.0k, False: 0]
  ------------------
  252|  10.0k|  tqueue->aborted = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  253|       |  thrdq_unlink(tqueue, TRUE, join);
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  254|  10.0k|}
Curl_thrdq_send:
  258|    985|{
  259|    985|  CURLcode result = CURLE_AGAIN;
  260|    985|  size_t signals = 0;
  261|       |
  262|    985|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|    985|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  263|    985|  if(tqueue->aborted) {
  ------------------
  |  Branch (263:6): [True: 0, False: 985]
  ------------------
  264|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (264:5): [Folded, False: 0]
  |  Branch (264:5): [Folded, False: 0]
  ------------------
  265|      0|    result = CURLE_SEND_ERROR;
  266|      0|    goto out;
  267|      0|  }
  268|    985|  if(timeout_ms < 0) {
  ------------------
  |  Branch (268:6): [True: 0, False: 985]
  ------------------
  269|      0|    result = CURLE_OPERATION_TIMEDOUT;
  270|      0|    goto out;
  271|      0|  }
  272|       |
  273|    985|  if(!tqueue->send_max_len ||
  ------------------
  |  Branch (273:6): [True: 985, False: 0]
  ------------------
  274|    985|     (Curl_llist_count(&tqueue->sendq) < tqueue->send_max_len)) {
  ------------------
  |  Branch (274:6): [True: 0, False: 0]
  ------------------
  275|    985|    struct thrdq_item *qitem = thrdq_item_create(tqueue, item, description,
  276|    985|                                                 timeout_ms);
  277|    985|    if(!qitem) {
  ------------------
  |  Branch (277:8): [True: 0, False: 985]
  ------------------
  278|      0|      result = CURLE_OUT_OF_MEMORY;
  279|      0|      goto out;
  280|      0|    }
  281|    985|    item = NULL;
  282|    985|    Curl_llist_append(&tqueue->sendq, qitem, &qitem->node);
  283|    985|    signals = Curl_llist_count(&tqueue->sendq);
  284|    985|    result = CURLE_OK;
  285|    985|  }
  286|       |
  287|    985|out:
  288|    985|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|    985|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  289|       |  /* Signal thread pool unlocked to avoid deadlocks. Since we added
  290|       |   * item to the queue already, it might have been taken for processing
  291|       |   * already. Any error in signalling the pool cannot be reported to
  292|       |   * the caller since it needs to give up ownership of item. */
  293|    985|  if(!result && signals)
  ------------------
  |  Branch (293:6): [True: 985, False: 0]
  |  Branch (293:17): [True: 985, False: 0]
  ------------------
  294|    985|    (void)Curl_thrdpool_signal(tqueue->tpool, (uint32_t)signals);
  295|    985|  return result;
  296|    985|}
Curl_thrdq_recv:
  299|   537k|{
  300|   537k|  CURLcode result = CURLE_AGAIN;
  301|   537k|  struct Curl_llist_node *e;
  302|       |
  303|   537k|  *pitem = NULL;
  304|   537k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|   537k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  305|   537k|  if(tqueue->aborted) {
  ------------------
  |  Branch (305:6): [True: 0, False: 537k]
  ------------------
  306|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (306:5): [Folded, False: 0]
  |  Branch (306:5): [Folded, False: 0]
  ------------------
  307|      0|    result = CURLE_RECV_ERROR;
  308|      0|    goto out;
  309|      0|  }
  310|       |
  311|   537k|  e = Curl_llist_head(&tqueue->recvq);
  312|   537k|  if(e) {
  ------------------
  |  Branch (312:6): [True: 826, False: 536k]
  ------------------
  313|    826|    struct thrdq_item *qitem = Curl_node_take_elem(e);
  314|    826|    *pitem = qitem->item;
  315|    826|    qitem->item = NULL;
  316|    826|    thrdq_item_destroy(qitem);
  317|    826|    result = CURLE_OK;
  318|    826|  }
  319|   537k|out:
  320|   537k|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|   537k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  321|   537k|  return result;
  322|   537k|}
Curl_thrdq_clear:
  342|     97|{
  343|     97|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|     97|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  344|     97|  if(tqueue->aborted) {
  ------------------
  |  Branch (344:6): [True: 0, False: 97]
  ------------------
  345|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (345:5): [Folded, False: 0]
  |  Branch (345:5): [Folded, False: 0]
  ------------------
  346|      0|    goto out;
  347|      0|  }
  348|     97|  thrdq_llist_clean_matches(&tqueue->sendq, fn_match, match_data);
  349|     97|  thrdq_llist_clean_matches(&tqueue->recvq, fn_match, match_data);
  350|     97|out:
  351|     97|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|     97|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  352|     97|}
Curl_thrdq_trace:
  389|   547k|{
  390|   547k|  struct curl_trc_feat *feat = &Curl_trc_feat_threads;
  391|   547k|  if(Curl_trc_ft_is_verbose(data, feat)) {
  ------------------
  |  |  326|   547k|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|  1.09M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 547k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 547k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.09M|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|   547k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  392|      0|    struct Curl_llist_node *e;
  393|      0|    struct thrdq_item *qitem;
  394|       |
  395|      0|    Curl_thrdpool_trace(tqueue->tpool, data);
  396|      0|    Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  397|      0|    if(!Curl_llist_count(&tqueue->sendq) &&
  ------------------
  |  Branch (397:8): [True: 0, False: 0]
  ------------------
  398|      0|       !Curl_llist_count(&tqueue->recvq)) {
  ------------------
  |  Branch (398:8): [True: 0, False: 0]
  ------------------
  399|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] empty", tqueue->name);
  400|      0|    }
  401|      0|    for(e = Curl_llist_head(&tqueue->sendq); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (401:46): [True: 0, False: 0]
  ------------------
  402|      0|      qitem = Curl_node_elem(e);
  403|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] in: %s",
  404|      0|                          tqueue->name, qitem->description);
  405|      0|    }
  406|      0|    for(e = Curl_llist_head(&tqueue->recvq); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (406:46): [True: 0, False: 0]
  ------------------
  407|      0|      qitem = Curl_node_elem(e);
  408|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] out: %s",
  409|      0|                          tqueue->name, qitem->description);
  410|      0|    }
  411|      0|    Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  412|      0|  }
  413|   547k|}
thrdqueue.c:thrdq_tpool_take:
  100|  1.81k|{
  101|  1.81k|  struct curl_thrdq *tqueue = user_data;
  102|  1.81k|  struct thrdq_item *qitem = NULL;
  103|  1.81k|  struct Curl_llist_node *e;
  104|  1.81k|  Curl_thrdq_ev_cb *fn_event = NULL;
  105|  1.81k|  void *fn_user_data = NULL;
  106|       |
  107|  1.81k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|  1.81k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  108|  1.81k|  *pdescription = NULL;
  109|  1.81k|  *ptimeout_ms = 0;
  110|  1.81k|  if(!tqueue->aborted) {
  ------------------
  |  Branch (110:6): [True: 1.81k, False: 0]
  ------------------
  111|  1.81k|    e = Curl_llist_head(&tqueue->sendq);
  112|  1.81k|    if(e) {
  ------------------
  |  Branch (112:8): [True: 985, False: 826]
  ------------------
  113|    985|      struct curltime now = curlx_now();
  114|    985|      timediff_t timeout_ms;
  115|    985|      while(e) {
  ------------------
  |  Branch (115:13): [True: 985, False: 0]
  ------------------
  116|    985|        qitem = Curl_node_take_elem(e);
  117|    985|        timeout_ms = (!qitem->timeout_ms) ? 0 :
  ------------------
  |  Branch (117:22): [True: 88, False: 897]
  ------------------
  118|    985|          (qitem->timeout_ms - curlx_ptimediff_ms(&now, &qitem->start));
  119|    985|        if(timeout_ms < 0) {
  ------------------
  |  Branch (119:12): [True: 0, False: 985]
  ------------------
  120|       |          /* timed out while queued, place on receive queue */
  121|      0|          Curl_llist_append(&tqueue->recvq, qitem, &qitem->node);
  122|      0|          fn_event = tqueue->fn_event;
  123|      0|          fn_user_data = tqueue->fn_user_data;
  124|      0|          qitem = NULL;
  125|      0|          e = Curl_llist_head(&tqueue->sendq);
  126|      0|          continue;
  127|      0|        }
  128|    985|        else {
  129|    985|          *pdescription = qitem->description;
  130|    985|          *ptimeout_ms = timeout_ms;
  131|    985|          break;
  132|    985|        }
  133|    985|      }
  134|    985|    }
  135|  1.81k|  }
  136|  1.81k|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|  1.81k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  137|       |  /* avoiding deadlocks */
  138|  1.81k|  if(fn_event)
  ------------------
  |  Branch (138:6): [True: 0, False: 1.81k]
  ------------------
  139|      0|    fn_event(tqueue, CURL_THRDQ_EV_ITEM_DONE, fn_user_data);
  140|  1.81k|  return qitem;
  141|  1.81k|}
thrdqueue.c:thrdq_tpool_process:
  172|    985|{
  173|    985|  struct thrdq_item *qitem = item;
  174|    985|  qitem->fn_process(qitem->item);
  175|    985|}
thrdqueue.c:thrdq_tpool_return:
  144|    985|{
  145|    985|  struct curl_thrdq *tqueue = user_data;
  146|    985|  struct thrdq_item *qitem = item;
  147|    985|  Curl_thrdq_ev_cb *fn_event = NULL;
  148|    985|  void *fn_user_data = NULL;
  149|       |
  150|    985|  if(!tqueue) {
  ------------------
  |  Branch (150:6): [True: 159, False: 826]
  ------------------
  151|    159|    thrdq_item_destroy(item);
  152|    159|    return;
  153|    159|  }
  154|       |
  155|    826|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|    826|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  156|    826|  if(tqueue->aborted) {
  ------------------
  |  Branch (156:6): [True: 0, False: 826]
  ------------------
  157|      0|    thrdq_item_destroy(qitem);
  158|      0|  }
  159|    826|  else {
  160|    826|    DEBUGASSERT(!Curl_node_llist(&qitem->node));
  ------------------
  |  | 1081|    826|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (160:5): [True: 0, False: 826]
  |  Branch (160:5): [True: 826, False: 0]
  ------------------
  161|    826|    Curl_llist_append(&tqueue->recvq, qitem, &qitem->node);
  162|    826|    fn_event = tqueue->fn_event;
  163|    826|    fn_user_data = tqueue->fn_user_data;
  164|    826|  }
  165|    826|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|    826|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  166|       |  /* avoiding deadlocks */
  167|    826|  if(fn_event)
  ------------------
  |  Branch (167:6): [True: 826, False: 0]
  ------------------
  168|    826|    fn_event(tqueue, CURL_THRDQ_EV_ITEM_DONE, fn_user_data);
  169|    826|}
thrdqueue.c:thrdq_unlink:
  178|  10.0k|{
  179|  10.0k|  DEBUGASSERT(tqueue->aborted);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 10.0k]
  |  Branch (179:3): [True: 10.0k, False: 0]
  ------------------
  180|  10.0k|  if(tqueue->tpool) {
  ------------------
  |  Branch (180:6): [True: 10.0k, False: 0]
  ------------------
  181|  10.0k|    if(locked)
  ------------------
  |  Branch (181:8): [True: 10.0k, False: 0]
  ------------------
  182|  10.0k|      Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|  10.0k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  183|  10.0k|    Curl_thrdpool_destroy(tqueue->tpool, join);
  184|  10.0k|    tqueue->tpool = NULL;
  185|  10.0k|    if(locked)
  ------------------
  |  Branch (185:8): [True: 10.0k, False: 0]
  ------------------
  186|  10.0k|      Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|  10.0k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  187|  10.0k|  }
  188|       |
  189|  10.0k|  Curl_llist_destroy(&tqueue->sendq, NULL);
  190|  10.0k|  Curl_llist_destroy(&tqueue->recvq, NULL);
  191|  10.0k|  curlx_free(tqueue->name);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  192|  10.0k|  Curl_cond_destroy(&tqueue->await);
  ------------------
  |  |   41|  10.0k|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
  193|  10.0k|  if(locked)
  ------------------
  |  Branch (193:6): [True: 10.0k, False: 0]
  ------------------
  194|  10.0k|    Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|  10.0k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  195|  10.0k|  Curl_mutex_destroy(&tqueue->lock);
  ------------------
  |  |   38|  10.0k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  196|  10.0k|  curlx_free(tqueue);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  197|  10.0k|}
thrdqueue.c:thrdq_item_create:
   68|    985|{
   69|    985|  struct thrdq_item *qitem;
   70|       |
   71|    985|  qitem = curlx_calloc(1, sizeof(*qitem));
  ------------------
  |  | 1480|    985|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   72|    985|  if(!qitem)
  ------------------
  |  Branch (72:6): [True: 0, False: 985]
  ------------------
   73|      0|    return NULL;
   74|    985|  qitem->item = item;
   75|    985|  qitem->description = description;
   76|    985|  qitem->fn_free = tqueue->fn_free;
   77|    985|  qitem->fn_process = tqueue->fn_process;
   78|    985|  if(timeout_ms) {
  ------------------
  |  Branch (78:6): [True: 897, False: 88]
  ------------------
   79|    897|    qitem->start = curlx_now();
   80|    897|    qitem->timeout_ms = timeout_ms;
   81|    897|  }
   82|    985|  return qitem;
   83|    985|}
thrdqueue.c:thrdq_item_destroy:
   86|    985|{
   87|    985|  if(qitem->item)
  ------------------
  |  Branch (87:6): [True: 159, False: 826]
  ------------------
   88|    159|    qitem->fn_free(qitem->item);
   89|    985|  curlx_free(qitem);
  ------------------
  |  | 1483|    985|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   90|    985|}
thrdqueue.c:thrdq_llist_clean_matches:
  327|    194|{
  328|    194|  struct Curl_llist_node *e, *n;
  329|    194|  struct thrdq_item *qitem;
  330|       |
  331|    194|  for(e = Curl_llist_head(llist); e; e = n) {
  ------------------
  |  Branch (331:35): [True: 0, False: 194]
  ------------------
  332|      0|    n = Curl_node_next(e);
  333|      0|    qitem = Curl_node_elem(e);
  334|      0|    if(fn_match(qitem->item, match_data))
  ------------------
  |  Branch (334:8): [True: 0, False: 0]
  ------------------
  335|      0|      Curl_node_remove(e);
  336|      0|  }
  337|    194|}

Curl_checkheaders:
   88|  3.01k|{
   89|  3.01k|  struct curl_slist *head;
   90|  3.01k|  DEBUGASSERT(thislen);
  ------------------
  |  | 1081|  3.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (90:3): [True: 0, False: 3.01k]
  |  Branch (90:3): [True: 3.01k, False: 0]
  ------------------
   91|  3.01k|  DEBUGASSERT(thisheader[thislen - 1] != ':');
  ------------------
  |  | 1081|  3.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:3): [True: 0, False: 3.01k]
  |  Branch (91:3): [True: 3.01k, False: 0]
  ------------------
   92|       |
   93|  5.59k|  for(head = data->set.headers; head; head = head->next) {
  ------------------
  |  Branch (93:33): [True: 2.58k, False: 3.01k]
  ------------------
   94|  2.58k|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (94:8): [True: 5, False: 2.58k]
  ------------------
   95|      5|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|      5|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 4, False: 1]
  |  |  |  Branch (26:45): [True: 0, False: 1]
  |  |  ------------------
  ------------------
   96|      4|      return head->data;
   97|  2.58k|  }
   98|       |
   99|  3.01k|  return NULL;
  100|  3.01k|}
Curl_sendrecv:
  357|    533|{
  358|    533|  struct SingleRequest *k = &data->req;
  359|    533|  CURLcode result = CURLE_OK;
  360|       |
  361|    533|  if(Curl_xfer_is_blocked(data)) {
  ------------------
  |  Branch (361:6): [True: 0, False: 533]
  ------------------
  362|      0|    result = CURLE_OK;
  363|      0|    goto out;
  364|      0|  }
  365|       |
  366|       |  /* We go ahead and do a read if we have a readable socket or if the stream
  367|       |     was rewound (in which case we have data in a buffer) */
  368|    533|  if(CURL_REQ_WANT_RECV(data)) {
  ------------------
  |  |   40|    533|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|    533|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |  |  Branch (40:32): [True: 523, False: 10]
  |  |  ------------------
  ------------------
  369|    523|    result = sendrecv_dl(data, k);
  370|    523|    if(result || data->req.done)
  ------------------
  |  Branch (370:8): [True: 5, False: 518]
  |  Branch (370:18): [True: 0, False: 518]
  ------------------
  371|      5|      goto out;
  372|    523|  }
  373|       |
  374|       |  /* If we still have writing to do, we check if we have a writable socket. */
  375|    528|  if(Curl_req_want_send(data)) {
  ------------------
  |  Branch (375:6): [True: 0, False: 528]
  ------------------
  376|      0|    result = sendrecv_ul(data);
  377|      0|    if(result)
  ------------------
  |  Branch (377:8): [True: 0, False: 0]
  ------------------
  378|      0|      goto out;
  379|      0|  }
  380|       |
  381|    528|  result = Curl_pgrsCheck(data);
  382|    528|  if(result)
  ------------------
  |  Branch (382:6): [True: 0, False: 528]
  ------------------
  383|      0|    goto out;
  384|       |
  385|    528|  if(CURL_REQ_WANT_IO(data)) {
  ------------------
  |  |   42|    528|  ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|    528|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |                 ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   36|    528|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (42:3): [True: 158, False: 370]
  |  |  ------------------
  ------------------
  386|    158|    if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (386:8): [True: 0, False: 158]
  ------------------
  387|      0|      if(k->size != -1) {
  ------------------
  |  Branch (387:10): [True: 0, False: 0]
  ------------------
  388|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  389|      0|              " milliseconds with %" FMT_OFF_T " out of %"
  390|      0|              FMT_OFF_T " bytes received",
  391|      0|              curlx_ptimediff_ms(Curl_pgrs_now(data),
  392|      0|                                 &data->progress.t_startsingle),
  393|      0|              k->bytecount, k->size);
  394|      0|      }
  395|      0|      else {
  396|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  397|      0|              " milliseconds with %" FMT_OFF_T " bytes received",
  398|      0|              curlx_ptimediff_ms(Curl_pgrs_now(data),
  399|      0|                                 &data->progress.t_startsingle),
  400|      0|              k->bytecount);
  401|      0|      }
  402|      0|      result = CURLE_OPERATION_TIMEDOUT;
  403|      0|      goto out;
  404|      0|    }
  405|    158|  }
  406|    370|  else {
  407|       |    /*
  408|       |     * The transfer has been performed. Make some general checks before
  409|       |     * returning.
  410|       |     */
  411|    370|    if(!(data->req.no_body) && (k->size != -1) &&
  ------------------
  |  Branch (411:8): [True: 369, False: 1]
  |  Branch (411:32): [True: 0, False: 369]
  ------------------
  412|      0|       (k->bytecount != k->size) && !k->newurl) {
  ------------------
  |  Branch (412:8): [True: 0, False: 0]
  |  Branch (412:37): [True: 0, False: 0]
  ------------------
  413|      0|      failf(data, "transfer closed with %" FMT_OFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  414|      0|            " bytes remaining to read", k->size - k->bytecount);
  415|      0|      result = CURLE_PARTIAL_FILE;
  416|      0|      goto out;
  417|      0|    }
  418|    370|  }
  419|       |
  420|       |  /* If there is nothing more to send/recv, the request is done */
  421|    528|  if(!CURL_REQ_WANT_IO(data))
  ------------------
  |  |   42|    528|  ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|    528|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |                 ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   36|    528|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  |  Branch (421:6): [True: 370, False: 158]
  ------------------
  422|    370|    data->req.done = TRUE;
  ------------------
  |  | 1055|    370|#define TRUE true
  ------------------
  423|       |
  424|    528|  result = Curl_pgrsUpdate(data);
  425|       |
  426|    533|out:
  427|    533|  if(result)
  ------------------
  |  Branch (427:6): [True: 5, False: 528]
  ------------------
  428|      5|    DEBUGF(infof(data, "Curl_sendrecv() -> %d", result));
  ------------------
  |  | 1067|    568|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 5, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 5]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 5]
  |  |  ------------------
  ------------------
  429|    533|  return result;
  430|    528|}
Curl_init_CONNECT:
  435|  7.70k|{
  436|  7.70k|  data->state.fread_func = data->set.fread_func_set;
  437|  7.70k|  data->state.in = data->set.in_set;
  438|  7.70k|  data->state.upload = (data->state.httpreq == HTTPREQ_PUT);
  439|  7.70k|}
Curl_pretransfer:
  447|  10.7k|{
  448|  10.7k|  CURLcode result = CURLE_OK;
  449|       |
  450|       |  /* Reset the retry count at the start of each request.
  451|       |   * If the retry count is not reset, when the connection drops,
  452|       |   * it will not enter the retry mechanism on CONN_MAX_RETRIES + 1 attempts
  453|       |   * and will immediately throw
  454|       |   * "Connection died, tried CONN_MAX_RETRIES times before giving up".
  455|       |   * By resetting it here, we ensure each new request starts fresh. */
  456|  10.7k|  data->state.retrycount = 0;
  457|       |
  458|  10.7k|  if(!data->set.str[STRING_SET_URL] && !data->set.uh) {
  ------------------
  |  Branch (458:6): [True: 3.27k, False: 7.51k]
  |  Branch (458:40): [True: 3.27k, False: 0]
  ------------------
  459|       |    /* we cannot do anything without URL */
  460|  3.27k|    failf(data, "No URL set");
  ------------------
  |  |   62|  3.27k|#define failf Curl_failf
  ------------------
  461|  3.27k|    return CURLE_URL_MALFORMAT;
  462|  3.27k|  }
  463|       |
  464|       |  /* CURLOPT_CURLU overrides CURLOPT_URL and the contents of the CURLU handle
  465|       |     is allowed to be changed by the user between transfers */
  466|  7.51k|  if(data->set.uh) {
  ------------------
  |  Branch (466:6): [True: 0, False: 7.51k]
  ------------------
  467|      0|    CURLUcode uc;
  468|      0|    curlx_free(data->set.str[STRING_SET_URL]);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  469|      0|    uc = curl_url_get(data->set.uh,
  470|      0|                      CURLUPART_URL, &data->set.str[STRING_SET_URL], 0);
  471|      0|    if(uc) {
  ------------------
  |  Branch (471:8): [True: 0, False: 0]
  ------------------
  472|       |      /* clear the pointer to not point to freed memory anymore */
  473|      0|      Curl_bufref_set(&data->state.url, NULL, 0, NULL);
  474|      0|      failf(data, "No URL set");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  475|      0|      return CURLE_URL_MALFORMAT;
  476|      0|    }
  477|      0|  }
  478|       |
  479|  7.51k|  Curl_bufref_set(&data->state.url, data->set.str[STRING_SET_URL], 0, NULL);
  480|       |
  481|  7.51k|  if(data->set.postfields && data->set.set_resume_from) {
  ------------------
  |  Branch (481:6): [True: 733, False: 6.78k]
  |  Branch (481:30): [True: 14, False: 719]
  ------------------
  482|       |    /* we cannot */
  483|     14|    failf(data, "cannot mix POSTFIELDS with RESUME_FROM");
  ------------------
  |  |   62|     14|#define failf Curl_failf
  ------------------
  484|     14|    return CURLE_BAD_FUNCTION_ARGUMENT;
  485|     14|  }
  486|       |
  487|  7.49k|  data->state.prefer_ascii = data->set.prefer_ascii;
  488|  7.49k|#ifdef CURL_LIST_ONLY_PROTOCOL
  489|  7.49k|  data->state.list_only = data->set.list_only;
  490|  7.49k|#endif
  491|  7.49k|  data->state.httpreq = data->set.method;
  492|       |
  493|       |  /* initial transfer request coming up, forget the initial origin
  494|       |   * from a previous perform() on this handle. */
  495|  7.49k|  Curl_peer_unlink(&data->state.initial_origin);
  496|  7.49k|  data->state.requests = 0;
  497|  7.49k|  data->state.followlocation = 0; /* reset the location-follow counter */
  498|  7.49k|  data->state.this_is_a_follow = FALSE; /* reset this */
  ------------------
  |  | 1058|  7.49k|#define FALSE false
  ------------------
  499|  7.49k|  data->state.http_ignorecustom = FALSE; /* use custom HTTP method */
  ------------------
  |  | 1058|  7.49k|#define FALSE false
  ------------------
  500|  7.49k|  data->state.errorbuf = FALSE; /* no error has occurred */
  ------------------
  |  | 1058|  7.49k|#define FALSE false
  ------------------
  501|  7.49k|#ifndef CURL_DISABLE_HTTP
  502|  7.49k|  Curl_http_neg_init(data, &data->state.http_neg);
  503|  7.49k|#endif
  504|  7.49k|  data->state.authproblem = FALSE;
  ------------------
  |  | 1058|  7.49k|#define FALSE false
  ------------------
  505|  7.49k|  data->state.authhost.want = data->set.httpauth;
  506|  7.49k|  data->state.authproxy.want = data->set.proxyauth;
  507|  7.49k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1327|  7.49k|  do {                      \
  |  | 1328|  7.49k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  7.49k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  7.49k|    (ptr) = NULL;           \
  |  | 1330|  7.49k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 7.49k]
  |  |  ------------------
  ------------------
  508|  7.49k|  Curl_data_priority_clear_state(data);
  509|  7.49k|  if(data->set.http_auto_referer)
  ------------------
  |  Branch (509:6): [True: 1, False: 7.49k]
  ------------------
  510|      1|    Curl_bufref_free(&data->state.referer);
  511|  7.49k|  if(data->set.str[STRING_SET_REFERER])
  ------------------
  |  Branch (511:6): [True: 5, False: 7.49k]
  ------------------
  512|      5|    Curl_bufref_set(&data->state.referer, data->set.str[STRING_SET_REFERER],
  513|      5|                    0, NULL);
  514|  7.49k|  else
  515|  7.49k|    Curl_bufref_free(&data->state.referer);
  516|       |
  517|  7.49k|  if(data->state.httpreq == HTTPREQ_PUT)
  ------------------
  |  Branch (517:6): [True: 35, False: 7.46k]
  ------------------
  518|     35|    data->state.infilesize = data->set.filesize;
  519|  7.46k|  else if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (519:11): [True: 764, False: 6.70k]
  ------------------
  520|    764|          (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (520:11): [True: 758, False: 6]
  ------------------
  521|    758|    data->state.infilesize = data->set.postfieldsize;
  522|    758|    if(data->set.postfields && (data->state.infilesize == -1))
  ------------------
  |  Branch (522:8): [True: 719, False: 39]
  |  Branch (522:32): [True: 9, False: 710]
  ------------------
  523|      9|      data->state.infilesize = (curl_off_t)strlen(data->set.postfields);
  524|    758|  }
  525|  6.70k|  else
  526|  6.70k|    data->state.infilesize = 0;
  527|       |
  528|       |  /* If there is a list of cookie files to read, do it now! */
  529|  7.49k|  result = Curl_cookie_loadfiles(data);
  530|  7.49k|  if(!result)
  ------------------
  |  Branch (530:6): [True: 7.49k, False: 0]
  ------------------
  531|  7.49k|    Curl_cookie_run(data); /* activate */
  532|       |
  533|       |  /* If there is a list of host pairs to deal with */
  534|  7.49k|  if(!result && data->state.resolve)
  ------------------
  |  Branch (534:6): [True: 7.49k, False: 0]
  |  Branch (534:17): [True: 0, False: 7.49k]
  ------------------
  535|      0|    result = Curl_loadhostpairs(data);
  536|       |
  537|  7.49k|  if(!result)
  ------------------
  |  Branch (537:6): [True: 7.49k, False: 0]
  ------------------
  538|       |    /* If there is a list of hsts files to read */
  539|  7.49k|    result = Curl_hsts_loadfiles(data);
  540|       |
  541|  7.49k|  if(!result) {
  ------------------
  |  Branch (541:6): [True: 7.49k, 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|  7.49k|    data->state.allow_port = TRUE;
  ------------------
  |  | 1055|  7.49k|#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|  7.49k|    Curl_initinfo(data); /* reset session-specific information "variables" */
  556|  7.49k|    Curl_pgrsResetTransferSizes(data);
  557|  7.49k|    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|  7.49k|    data->state.authhost.picked &= data->state.authhost.want;
  563|  7.49k|    data->state.authproxy.picked &= data->state.authproxy.want;
  564|       |
  565|  7.49k|#ifndef CURL_DISABLE_FTP
  566|  7.49k|    data->state.wildcardmatch = data->set.wildcard_enabled;
  567|  7.49k|    if(data->state.wildcardmatch) {
  ------------------
  |  Branch (567:8): [True: 22, False: 7.47k]
  ------------------
  568|     22|      struct WildcardData *wc;
  569|     22|      if(!data->wildcard) {
  ------------------
  |  Branch (569:10): [True: 22, False: 0]
  ------------------
  570|     22|        data->wildcard = curlx_calloc(1, sizeof(struct WildcardData));
  ------------------
  |  | 1480|     22|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  571|     22|        if(!data->wildcard)
  ------------------
  |  Branch (571:12): [True: 0, False: 22]
  ------------------
  572|      0|          return CURLE_OUT_OF_MEMORY;
  573|     22|      }
  574|     22|      wc = data->wildcard;
  575|     22|      if(wc->state < CURLWC_INIT) {
  ------------------
  |  Branch (575:10): [True: 22, False: 0]
  ------------------
  576|     22|        if(wc->ftpwc)
  ------------------
  |  Branch (576:12): [True: 0, False: 22]
  ------------------
  577|      0|          wc->dtor(wc->ftpwc);
  578|     22|        curlx_safefree(wc->pattern);
  ------------------
  |  | 1327|     22|  do {                      \
  |  | 1328|     22|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|     22|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|     22|    (ptr) = NULL;           \
  |  | 1330|     22|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22]
  |  |  ------------------
  ------------------
  579|     22|        curlx_safefree(wc->path);
  ------------------
  |  | 1327|     22|  do {                      \
  |  | 1328|     22|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|     22|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|     22|    (ptr) = NULL;           \
  |  | 1330|     22|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22]
  |  |  ------------------
  ------------------
  580|     22|        Curl_wildcard_init(wc); /* init wildcard structures */
  581|     22|      }
  582|     22|    }
  583|  7.49k|#endif
  584|  7.49k|    result = Curl_hsts_loadcb(data, data->hsts);
  585|  7.49k|  }
  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|  7.49k|  if(!result && data->set.str[STRING_USERAGENT]) {
  ------------------
  |  Branch (591:6): [True: 7.49k, False: 0]
  |  Branch (591:17): [True: 11, False: 7.48k]
  ------------------
  592|     11|    curlx_free(data->state.aptr.uagent);
  ------------------
  |  | 1483|     11|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  593|     11|    data->state.aptr.uagent =
  594|     11|      curl_maprintf("User-Agent: %s\r\n", data->set.str[STRING_USERAGENT]);
  595|     11|    if(!data->state.aptr.uagent)
  ------------------
  |  Branch (595:8): [True: 0, False: 11]
  ------------------
  596|      0|      return CURLE_OUT_OF_MEMORY;
  597|     11|  }
  598|       |
  599|  7.49k|  data->req.headerbytecount = 0;
  600|  7.49k|  Curl_headers_cleanup(data);
  601|  7.49k|  return result;
  602|  7.49k|}
Curl_retry_request:
  608|    370|{
  609|    370|  struct connectdata *conn = data->conn;
  610|    370|  bool retry = FALSE;
  ------------------
  |  | 1058|    370|#define FALSE false
  ------------------
  611|    370|  *url = NULL;
  612|       |
  613|       |  /* if we are talking upload, we cannot do the checks below, unless the
  614|       |     protocol is HTTP as when uploading over HTTP we will still get a
  615|       |     response */
  616|    370|  if(data->state.upload &&
  ------------------
  |  Branch (616:6): [True: 13, False: 357]
  ------------------
  617|     13|     !(conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_RTSP)))
  ------------------
  |  |   84|     13|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|     13|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|     13|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|     13|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|     13|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|     13|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
                   !(conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_RTSP)))
  ------------------
  |  | 1096|     13|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (617:6): [True: 13, False: 0]
  ------------------
  618|     13|    return CURLE_OK;
  619|       |
  620|    357|  if(conn->bits.reuse &&
  ------------------
  |  Branch (620:6): [True: 0, False: 357]
  ------------------
  621|      0|     (data->req.bytecount + data->req.headerbytecount == 0) &&
  ------------------
  |  Branch (621:6): [True: 0, False: 0]
  ------------------
  622|      0|     ((!data->req.no_body && !data->req.done) ||
  ------------------
  |  Branch (622:8): [True: 0, False: 0]
  |  Branch (622:30): [True: 0, False: 0]
  ------------------
  623|      0|      (conn->scheme->protocol & PROTO_FAMILY_HTTP))
  ------------------
  |  |   84|      0|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|      0|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|      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 (623:7): [True: 0, False: 0]
  ------------------
  624|      0|#ifndef CURL_DISABLE_RTSP
  625|      0|     && (data->set.rtspreq != RTSPREQ_RECEIVE)
  ------------------
  |  Branch (625:9): [True: 0, False: 0]
  ------------------
  626|    357|#endif
  627|    357|    )
  628|       |    /* We got no data, we attempted to reuse a connection. For HTTP this
  629|       |       can be a retry so we try again regardless if we expected a body.
  630|       |       For other protocols we only try again only if we expected a body.
  631|       |
  632|       |       This might happen if the connection was left alive when we were
  633|       |       done using it before, but that was closed when we wanted to read from
  634|       |       it again. Bad luck. Retry the same request on a fresh connect! */
  635|      0|    retry = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  636|    357|  else if(data->state.refused_stream &&
  ------------------
  |  Branch (636:11): [True: 0, False: 357]
  ------------------
  637|      0|          (data->req.bytecount + data->req.headerbytecount == 0)) {
  ------------------
  |  Branch (637:11): [True: 0, False: 0]
  ------------------
  638|       |    /* This was sent on a refused stream, safe to rerun. A refused stream
  639|       |       error can typically only happen on HTTP/2 level if the stream is safe
  640|       |       to issue again, but the nghttp2 API can deliver the message to other
  641|       |       streams as well, which is why this adds the check the data counters
  642|       |       too. */
  643|      0|    infof(data, "REFUSED_STREAM, retrying a fresh connect");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  644|      0|    data->state.refused_stream = FALSE; /* clear again */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  645|      0|    retry = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  646|      0|  }
  647|    357|  if(retry) {
  ------------------
  |  Branch (647:6): [True: 0, False: 357]
  ------------------
  648|      0|#define CONN_MAX_RETRIES 5
  649|      0|    if(data->state.retrycount++ >= CONN_MAX_RETRIES) {
  ------------------
  |  |  648|      0|#define CONN_MAX_RETRIES 5
  ------------------
  |  Branch (649:8): [True: 0, False: 0]
  ------------------
  650|      0|      failf(data, "Connection died, tried %d times before giving up",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  651|      0|            CONN_MAX_RETRIES);
  ------------------
  |  |  648|      0|#define CONN_MAX_RETRIES 5
  ------------------
  652|      0|      data->state.retrycount = 0;
  653|      0|      return CURLE_SEND_ERROR;
  654|      0|    }
  655|      0|    infof(data, "Connection died, retrying a fresh connect (retry count: %d)",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  656|      0|          data->state.retrycount);
  657|      0|    *url = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  658|      0|    if(!*url)
  ------------------
  |  Branch (658:8): [True: 0, False: 0]
  ------------------
  659|      0|      return CURLE_OUT_OF_MEMORY;
  660|       |
  661|      0|    connclose(conn, "retry"); /* close this connection */
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  662|      0|    conn->bits.retry = TRUE; /* mark this as a connection we are about to
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  663|       |                                retry. Marking it this way should prevent i.e
  664|       |                                HTTP transfers to return error because nothing
  665|       |                                has been transferred! */
  666|      0|    Curl_creader_set_rewind(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  667|      0|  }
  668|    357|  return CURLE_OK;
  669|    357|}
Curl_xfer_setup_recv:
  737|    432|{
  738|    432|  xfer_setup(data, -1, sockindex, recv_size);
  739|    432|}
Curl_xfer_write_resp:
  755|  1.31k|{
  756|  1.31k|  CURLcode result = CURLE_OK;
  757|       |
  758|  1.31k|  if(data->conn->scheme->run->write_resp) {
  ------------------
  |  Branch (758:6): [True: 1.31k, False: 0]
  ------------------
  759|       |    /* protocol handlers offering this function take full responsibility
  760|       |     * for writing all received download data to the client. */
  761|  1.31k|    result = data->conn->scheme->run->write_resp(data, buf, blen, is_eos);
  762|  1.31k|  }
  763|      0|  else {
  764|       |    /* No special handling by protocol handler, write all received data
  765|       |     * as BODY to the client. */
  766|      0|    if(blen || is_eos) {
  ------------------
  |  Branch (766:8): [True: 0, False: 0]
  |  Branch (766:16): [True: 0, False: 0]
  ------------------
  767|      0|      int cwtype = CLIENTWRITE_BODY;
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  768|      0|      if(is_eos)
  ------------------
  |  Branch (768:10): [True: 0, False: 0]
  ------------------
  769|      0|        cwtype |= CLIENTWRITE_EOS;
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  770|      0|      result = Curl_client_write(data, cwtype, buf, blen);
  771|      0|    }
  772|      0|  }
  773|       |
  774|  1.31k|  if(!result && is_eos) {
  ------------------
  |  Branch (774:6): [True: 1.30k, False: 5]
  |  Branch (774:17): [True: 357, False: 948]
  ------------------
  775|       |    /* If we wrote the EOS, we are definitely done */
  776|    357|    data->req.eos_written = TRUE;
  ------------------
  |  | 1055|    357|#define TRUE true
  ------------------
  777|    357|    data->req.download_done = TRUE;
  ------------------
  |  | 1055|    357|#define TRUE true
  ------------------
  778|    357|  }
  779|  1.31k|  CURL_TRC_WRITE(data, "xfer_write_resp(len=%zu, eos=%d) -> %d",
  ------------------
  |  |  158|  1.31k|  do {                                                     \
  |  |  159|  1.31k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  1.31k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.31k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.62k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.31k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.31k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.31k]
  |  |  ------------------
  ------------------
  780|  1.31k|                 blen, is_eos, result);
  781|  1.31k|  return result;
  782|  1.31k|}
Curl_xfer_write_done:
  803|  6.06k|{
  804|  6.06k|  (void)premature;
  805|  6.06k|  return Curl_cw_out_done(data);
  806|  6.06k|}
Curl_xfer_needs_flush:
  809|  1.47k|{
  810|  1.47k|  return Curl_conn_needs_flush(data, data->conn->send_idx);
  811|  1.47k|}
Curl_xfer_recv:
  844|  1.39k|{
  845|  1.39k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  1.39k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (845:3): [True: 0, False: 1.39k]
  |  Branch (845:3): [True: 1.39k, False: 0]
  ------------------
  846|  1.39k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  1.39k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (846:3): [True: 0, False: 1.39k]
  |  Branch (846:3): [True: 1.39k, False: 0]
  ------------------
  847|  1.39k|  DEBUGASSERT(data->set.buffer_size > 0);
  ------------------
  |  | 1081|  1.39k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (847:3): [True: 0, False: 1.39k]
  |  Branch (847:3): [True: 1.39k, False: 0]
  ------------------
  848|       |
  849|  1.39k|  if(curlx_uitouz(data->set.buffer_size) < blen)
  ------------------
  |  Branch (849:6): [True: 0, False: 1.39k]
  ------------------
  850|      0|    blen = curlx_uitouz(data->set.buffer_size);
  851|  1.39k|  return Curl_conn_recv(data, data->conn->recv_idx, buf, blen, pnrcvd);
  852|  1.39k|}
Curl_xfer_is_blocked:
  861|    533|{
  862|    533|  bool want_send = CURL_REQ_WANT_SEND(data);
  ------------------
  |  |   39|    533|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|    533|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  863|    533|  bool want_recv = CURL_REQ_WANT_RECV(data);
  ------------------
  |  |   40|    533|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|    533|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  864|    533|  if(!want_send)
  ------------------
  |  Branch (864:6): [True: 533, False: 0]
  ------------------
  865|    533|    return want_recv && Curl_xfer_recv_is_paused(data);
  ------------------
  |  Branch (865:12): [True: 523, False: 10]
  |  Branch (865:25): [True: 0, False: 523]
  ------------------
  866|      0|  else if(!want_recv)
  ------------------
  |  Branch (866:11): [True: 0, False: 0]
  ------------------
  867|      0|    return want_send && Curl_xfer_send_is_paused(data);
  ------------------
  |  Branch (867:12): [True: 0, False: 0]
  |  Branch (867:25): [True: 0, False: 0]
  ------------------
  868|      0|  else
  869|      0|    return Curl_xfer_recv_is_paused(data) && Curl_xfer_send_is_paused(data);
  ------------------
  |  Branch (869:12): [True: 0, False: 0]
  |  Branch (869:46): [True: 0, False: 0]
  ------------------
  870|    533|}
Curl_xfer_send_is_paused:
  873|     52|{
  874|     52|  return Curl_rlimit_is_blocked(&data->progress.ul.rlimit);
  875|     52|}
Curl_xfer_recv_is_paused:
  878|   707k|{
  879|   707k|  return Curl_rlimit_is_blocked(&data->progress.dl.rlimit);
  880|   707k|}
transfer.c:sendrecv_dl:
  223|    523|{
  224|    523|  struct connectdata *conn = data->conn;
  225|    523|  CURLcode result = CURLE_OK;
  226|    523|  char *buf, *xfer_buf;
  227|    523|  size_t blen, xfer_blen;
  228|    523|  int maxloops = 10;
  229|    523|  bool is_multiplex = FALSE;
  ------------------
  |  | 1058|    523|#define FALSE false
  ------------------
  230|    523|  bool rcvd_eagain = FALSE;
  ------------------
  |  | 1058|    523|#define FALSE false
  ------------------
  231|    523|  bool is_eos = FALSE, rate_limited = FALSE;
  ------------------
  |  | 1058|    523|#define FALSE false
  ------------------
                bool is_eos = FALSE, rate_limited = FALSE;
  ------------------
  |  | 1058|    523|#define FALSE false
  ------------------
  232|       |
  233|    523|  result = Curl_multi_xfer_buf_borrow(data, &xfer_buf, &xfer_blen);
  234|    523|  if(result)
  ------------------
  |  Branch (234:6): [True: 0, False: 523]
  ------------------
  235|      0|    goto out;
  236|       |
  237|       |  /* This is where we loop until we have read everything there is to
  238|       |     read or we get a CURLE_AGAIN */
  239|  1.40k|  do {
  240|  1.40k|    size_t bytestoread;
  241|       |
  242|  1.40k|    if(!is_multiplex) {
  ------------------
  |  Branch (242:8): [True: 1.40k, False: 0]
  ------------------
  243|       |      /* Multiplexed connection have inherent handling of EOF and we do not
  244|       |       * have to carefully restrict the amount we try to read.
  245|       |       * Multiplexed changes only in one direction. */
  246|  1.40k|      is_multiplex = Curl_conn_is_multiplex(conn, FIRSTSOCKET);
  ------------------
  |  |  303|  1.40k|#define FIRSTSOCKET     0
  ------------------
  247|  1.40k|    }
  248|       |
  249|  1.40k|    buf = xfer_buf;
  250|  1.40k|    bytestoread = xfer_blen;
  251|       |
  252|  1.40k|    if(bytestoread && Curl_rlimit_active(&data->progress.dl.rlimit)) {
  ------------------
  |  Branch (252:8): [True: 1.40k, False: 0]
  |  Branch (252:23): [True: 416, False: 993]
  ------------------
  253|    416|      curl_off_t dl_avail = Curl_rlimit_avail(&data->progress.dl.rlimit,
  254|    416|                                              Curl_pgrs_now(data));
  255|       |#if 0
  256|       |      DEBUGF(infof(data, "dl_rlimit, available=%" FMT_OFF_T, dl_avail));
  257|       |#endif
  258|       |      /* In case of rate limited downloads: if this loop already got data and
  259|       |       * less than 16k is left in the limit, break out. We want to stutter a
  260|       |       * bit to keep in the limit, but too small receives will cost cpu
  261|       |       * unnecessarily. */
  262|    416|      if(dl_avail <= 0) {
  ------------------
  |  Branch (262:10): [True: 15, False: 401]
  ------------------
  263|     15|        rate_limited = TRUE;
  ------------------
  |  | 1055|     15|#define TRUE true
  ------------------
  264|     15|        break;
  265|     15|      }
  266|    401|      if(dl_avail < (curl_off_t)bytestoread)
  ------------------
  |  Branch (266:10): [True: 112, False: 289]
  ------------------
  267|    112|        bytestoread = (size_t)dl_avail;
  268|    401|    }
  269|       |
  270|  1.39k|    rcvd_eagain = FALSE;
  ------------------
  |  | 1058|  1.39k|#define FALSE false
  ------------------
  271|  1.39k|    result = xfer_recv_resp(data, buf, bytestoread, is_multiplex, &blen);
  272|  1.39k|    if(result) {
  ------------------
  |  Branch (272:8): [True: 84, False: 1.31k]
  ------------------
  273|     84|      if(result != CURLE_AGAIN)
  ------------------
  |  Branch (273:10): [True: 0, False: 84]
  ------------------
  274|      0|        goto out; /* real error */
  275|     84|      rcvd_eagain = TRUE;
  ------------------
  |  | 1055|     84|#define TRUE true
  ------------------
  276|     84|      result = CURLE_OK;
  277|     84|      if(data->req.download_done && data->req.no_body &&
  ------------------
  |  Branch (277:10): [True: 0, False: 84]
  |  Branch (277:37): [True: 0, False: 0]
  ------------------
  278|      0|         !data->req.resp_trailer) {
  ------------------
  |  Branch (278:10): [True: 0, False: 0]
  ------------------
  279|      0|        DEBUGF(infof(data, "EAGAIN, download done, no trailer announced, "
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  280|      0|                     "not waiting for EOS"));
  281|      0|        blen = 0;
  282|       |        /* continue as if we received the EOS */
  283|      0|      }
  284|     84|      else
  285|     84|        break; /* get out of loop */
  286|     84|    }
  287|       |
  288|       |    /* We only get a 0-length receive at the end of the response */
  289|  1.31k|    is_eos = (blen == 0);
  290|       |
  291|  1.31k|    if(!blen) {
  ------------------
  |  Branch (291:8): [True: 357, False: 953]
  ------------------
  292|    357|      result = Curl_req_stop_send_recv(data);
  293|    357|      if(result)
  ------------------
  |  Branch (293:10): [True: 0, False: 357]
  ------------------
  294|      0|        goto out;
  295|    357|      if(k->eos_written) /* already did write this to client, leave */
  ------------------
  |  Branch (295:10): [True: 0, False: 357]
  ------------------
  296|      0|        break;
  297|    357|    }
  298|       |
  299|  1.31k|    result = Curl_xfer_write_resp(data, buf, blen, is_eos);
  300|  1.31k|    if(result || data->req.done)
  ------------------
  |  Branch (300:8): [True: 5, False: 1.30k]
  |  Branch (300:18): [True: 0, False: 1.30k]
  ------------------
  301|      5|      goto out;
  302|       |
  303|       |    /* if we are done, we stop receiving. On multiplexed connections,
  304|       |     * we should read the EOS. Which may arrive as meta data after
  305|       |     * the bytes. Not taking it in might lead to RST of streams. */
  306|  1.30k|    if((!is_multiplex && data->req.download_done) || is_eos) {
  ------------------
  |  Branch (306:9): [True: 1.30k, False: 0]
  |  Branch (306:26): [True: 357, False: 948]
  |  Branch (306:54): [True: 0, False: 948]
  ------------------
  307|    357|      CURL_REQ_CLEAR_RECV(data);
  ------------------
  |  |   49|    357|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|    357|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  308|    357|    }
  309|       |    /* if we stopped receiving, leave the loop */
  310|  1.30k|    if(!CURL_REQ_WANT_RECV(data))
  ------------------
  |  |   40|  1.30k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  1.30k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  |  Branch (310:8): [True: 360, False: 945]
  ------------------
  311|    360|      break;
  312|       |
  313|  1.30k|  } while(maxloops--);
  ------------------
  |  Branch (313:11): [True: 886, False: 59]
  ------------------
  314|       |
  315|    518|  if(!is_eos && !rate_limited && CURL_REQ_WANT_RECV(data) &&
  ------------------
  |  |   40|    664|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|    146|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |  |  Branch (40:32): [True: 143, False: 3]
  |  |  ------------------
  ------------------
  |  Branch (315:6): [True: 161, False: 357]
  |  Branch (315:17): [True: 146, False: 15]
  ------------------
  316|    143|     (!rcvd_eagain || data_pending(data, rcvd_eagain))) {
  ------------------
  |  Branch (316:7): [True: 59, False: 84]
  |  Branch (316:23): [True: 0, False: 84]
  ------------------
  317|       |    /* Did not read until EAGAIN/EOS or there is still data pending
  318|       |     * in buffers. Mark as read-again via simulated SELECT results. */
  319|     59|    Curl_multi_mark_dirty(data);
  320|     59|    CURL_TRC_M(data, "sendrecv_dl() no EAGAIN/pending data, mark as dirty");
  ------------------
  |  |  148|     59|  do {                                   \
  |  |  149|     59|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|     59|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     59|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    118|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 59, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 59]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    118|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|     59|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|     59|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|     59|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 59]
  |  |  ------------------
  ------------------
  321|     59|  }
  322|       |
  323|    518|  if(!CURL_REQ_WANT_RECV(data) && CURL_REQ_WANT_SEND(data) &&
  ------------------
  |  |   40|  1.03k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|    518|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
                if(!CURL_REQ_WANT_RECV(data) && CURL_REQ_WANT_SEND(data) &&
  ------------------
  |  |   39|    878|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|    360|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 0, False: 360]
  |  |  ------------------
  ------------------
  |  Branch (323:6): [True: 360, False: 158]
  ------------------
  324|      0|     (conn->bits.close || is_multiplex)) {
  ------------------
  |  Branch (324:7): [True: 0, False: 0]
  |  Branch (324:27): [True: 0, False: 0]
  ------------------
  325|       |    /* When we have read the entire thing and the close bit is set, the server
  326|       |       may now close the connection. If there is now any kind of sending going
  327|       |       on from our side, we need to stop that immediately. */
  328|      0|    infof(data, "we are done reading and this is set to close, stop send");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  329|      0|    Curl_req_abort_sending(data);
  330|      0|  }
  331|       |
  332|    523|out:
  333|    523|  Curl_multi_xfer_buf_release(data, xfer_buf);
  334|    523|  if(result)
  ------------------
  |  Branch (334:6): [True: 5, False: 518]
  ------------------
  335|      5|    DEBUGF(infof(data, "sendrecv_dl() -> %d", result));
  ------------------
  |  | 1067|    558|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 5, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 5]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 5]
  |  |  ------------------
  ------------------
  336|    523|  return result;
  337|    518|}
transfer.c:xfer_recv_resp:
  180|  1.39k|{
  181|  1.39k|  CURLcode result;
  182|       |
  183|  1.39k|  DEBUGASSERT(blen > 0);
  ------------------
  |  | 1081|  1.39k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (183:3): [True: 0, False: 1.39k]
  |  Branch (183:3): [True: 1.39k, False: 0]
  ------------------
  184|  1.39k|  *pnread = 0;
  185|       |  /* If we are reading BODY data and the connection does NOT handle EOF
  186|       |   * and we know the size of the BODY data, limit the read amount */
  187|  1.39k|  if(!eos_reliable && !data->req.header && data->req.size != -1) {
  ------------------
  |  Branch (187:6): [True: 1.39k, False: 0]
  |  Branch (187:23): [True: 1.39k, False: 0]
  |  Branch (187:44): [True: 0, False: 1.39k]
  ------------------
  188|      0|    blen = curlx_sotouz_range(data->req.size - data->req.bytecount, 0, blen);
  189|      0|  }
  190|  1.39k|  else if(xfer_recv_shutdown_started(data)) {
  ------------------
  |  Branch (190:11): [True: 0, False: 1.39k]
  ------------------
  191|       |    /* we already received everything. Do not try more. */
  192|      0|    blen = 0;
  193|      0|  }
  194|       |
  195|  1.39k|  if(blen) {
  ------------------
  |  Branch (195:6): [True: 1.39k, False: 0]
  ------------------
  196|  1.39k|    result = Curl_xfer_recv(data, buf, blen, pnread);
  197|  1.39k|    if(result)
  ------------------
  |  Branch (197:8): [True: 84, False: 1.31k]
  ------------------
  198|     84|      return result;
  199|  1.39k|  }
  200|       |
  201|  1.31k|  if(*pnread == 0) {
  ------------------
  |  Branch (201:6): [True: 357, False: 953]
  ------------------
  202|    357|    if(data->req.shutdown) {
  ------------------
  |  Branch (202:8): [True: 0, False: 357]
  ------------------
  203|      0|      bool done;
  204|      0|      result = xfer_recv_shutdown(data, &done);
  205|      0|      if(result)
  ------------------
  |  Branch (205:10): [True: 0, False: 0]
  ------------------
  206|      0|        return result;
  207|      0|      if(!done) {
  ------------------
  |  Branch (207:10): [True: 0, False: 0]
  ------------------
  208|      0|        return CURLE_AGAIN;
  209|      0|      }
  210|      0|    }
  211|    357|    DEBUGF(infof(data, "sendrecv_dl: we are done"));
  ------------------
  |  | 1067|  2.49k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 357, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 357]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 357]
  |  |  ------------------
  ------------------
  212|    357|  }
  213|  1.31k|  return CURLE_OK;
  214|  1.31k|}
transfer.c:xfer_recv_shutdown_started:
  155|  1.39k|{
  156|  1.39k|  if(!data || !data->conn)
  ------------------
  |  Branch (156:6): [True: 0, False: 1.39k]
  |  Branch (156:15): [True: 0, False: 1.39k]
  ------------------
  157|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  158|  1.39k|  return Curl_shutdown_started(data, data->conn->recv_idx);
  159|  1.39k|}
transfer.c:data_pending:
  104|     84|{
  105|     84|  struct connectdata *conn = data->conn;
  106|       |
  107|     84|  if(conn->scheme->protocol & PROTO_FAMILY_FTP)
  ------------------
  |  |   86|     84|#define PROTO_FAMILY_FTP  (CURLPROTO_FTP | CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1080|     84|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_FTP  (CURLPROTO_FTP | CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1081|     84|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  |  Branch (107:6): [True: 0, False: 84]
  ------------------
  108|      0|    return Curl_conn_data_pending(data, SECONDARYSOCKET);
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  109|       |
  110|       |  /* in the case of libssh2, we can never be really sure that we have emptied
  111|       |     its internal buffers so we MUST always try until we get EAGAIN back */
  112|     84|  return (!rcvd_eagain &&
  ------------------
  |  Branch (112:11): [True: 0, False: 84]
  ------------------
  113|      0|          conn->scheme->protocol & (CURLPROTO_SCP | CURLPROTO_SFTP)) ||
  ------------------
  |  | 1082|      0|#define CURLPROTO_SCP     (1L << 4)
  ------------------
                        conn->scheme->protocol & (CURLPROTO_SCP | CURLPROTO_SFTP)) ||
  ------------------
  |  | 1083|      0|#define CURLPROTO_SFTP    (1L << 5)
  ------------------
  |  Branch (113:11): [True: 0, False: 0]
  ------------------
  114|     84|         Curl_conn_data_pending(data, FIRSTSOCKET);
  ------------------
  |  |  303|     84|#define FIRSTSOCKET     0
  ------------------
  |  Branch (114:10): [True: 0, False: 84]
  ------------------
  115|     84|}
transfer.c:xfer_setup:
  677|    432|{
  678|    432|  struct SingleRequest *k = &data->req;
  679|    432|  struct connectdata *conn = data->conn;
  680|       |
  681|    432|  DEBUGASSERT(conn != NULL);
  ------------------
  |  | 1081|    432|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (681:3): [True: 0, False: 432]
  |  Branch (681:3): [True: 432, False: 0]
  ------------------
  682|       |  /* indexes are in range */
  683|    432|  DEBUGASSERT((send_idx <= 1) && (send_idx >= -1));
  ------------------
  |  | 1081|    432|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (683:3): [True: 0, False: 432]
  |  Branch (683:3): [True: 0, False: 0]
  |  Branch (683:3): [True: 432, False: 0]
  |  Branch (683:3): [True: 432, False: 0]
  ------------------
  684|    432|  DEBUGASSERT((recv_idx <= 1) && (recv_idx >= -1));
  ------------------
  |  | 1081|    432|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (684:3): [True: 0, False: 432]
  |  Branch (684:3): [True: 0, False: 0]
  |  Branch (684:3): [True: 432, False: 0]
  |  Branch (684:3): [True: 432, False: 0]
  ------------------
  685|       |  /* if request wants to send, switching off the send direction is wrong */
  686|    432|  DEBUGASSERT((send_idx >= 0) || !Curl_req_want_send(data));
  ------------------
  |  | 1081|    432|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (686:3): [True: 432, False: 0]
  |  Branch (686:3): [True: 0, False: 0]
  |  Branch (686:3): [True: 0, False: 432]
  |  Branch (686:3): [True: 432, False: 0]
  ------------------
  687|       |
  688|    432|  conn->send_idx = send_idx;
  689|    432|  conn->recv_idx = recv_idx;
  690|       |
  691|       |  /* without receiving, there should be not recv_size */
  692|    432|  DEBUGASSERT((conn->recv_idx >= 0) || (recv_size == -1));
  ------------------
  |  | 1081|    432|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (692:3): [True: 432, False: 0]
  |  Branch (692:3): [True: 0, False: 0]
  |  Branch (692:3): [True: 432, False: 0]
  |  Branch (692:3): [True: 0, False: 0]
  ------------------
  693|    432|  k->size = recv_size;
  694|    432|  k->header = !!conn->scheme->run->write_resp_hd;
  695|       |  /* by default, we do not shutdown at the end of the transfer */
  696|    432|  k->shutdown = FALSE;
  ------------------
  |  | 1058|    432|#define FALSE false
  ------------------
  697|    432|  k->shutdown_err_ignore = FALSE;
  ------------------
  |  | 1058|    432|#define FALSE false
  ------------------
  698|       |
  699|       |  /* The code sequence below is placed in this function because all necessary
  700|       |     input is not always known in do_complete() as this function may be called
  701|       |     after that */
  702|    432|  if(!k->header && (recv_size > 0))
  ------------------
  |  Branch (702:6): [True: 432, False: 0]
  |  Branch (702:20): [True: 0, False: 432]
  ------------------
  703|      0|    Curl_pgrsSetDownloadSize(data, recv_size);
  704|       |
  705|       |  /* we want header and/or body, if neither then do not do this! */
  706|    432|  if(conn->scheme->run->write_resp_hd || !data->req.no_body) {
  ------------------
  |  Branch (706:6): [True: 0, False: 432]
  |  Branch (706:42): [True: 432, False: 0]
  ------------------
  707|    432|    if(conn->recv_idx != -1)
  ------------------
  |  Branch (707:8): [True: 432, False: 0]
  ------------------
  708|    432|      CURL_REQ_SET_RECV(data);
  ------------------
  |  |   45|    432|#define CURL_REQ_SET_RECV(d)   ((d)->req.io_flags |= REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|    432|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  709|    432|    if(conn->send_idx != -1)
  ------------------
  |  Branch (709:8): [True: 0, False: 432]
  ------------------
  710|      0|      CURL_REQ_SET_SEND(data);
  ------------------
  |  |   44|      0|#define CURL_REQ_SET_SEND(d)   ((d)->req.io_flags |= REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|      0|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  711|    432|  }
  712|    432|  CURL_TRC_M(data, "xfer_setup: recv_idx=%d, send_idx=%d",
  ------------------
  |  |  148|    432|  do {                                   \
  |  |  149|    432|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    432|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    432|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    864|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 432, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 432]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    864|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    432|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    432|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    432|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 432]
  |  |  ------------------
  ------------------
  713|    432|             conn->recv_idx, conn->send_idx);
  714|    432|}

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

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

Curl_freeset:
  150|  22.4k|{
  151|       |  /* Free all dynamic strings stored in the data->set substructure. */
  152|  22.4k|  enum dupstring i;
  153|  22.4k|  enum dupblob j;
  154|       |
  155|  1.70M|  for(i = (enum dupstring)0; i < STRING_LAST; i++) {
  ------------------
  |  Branch (155:30): [True: 1.68M, False: 22.4k]
  ------------------
  156|  1.68M|    curlx_safefree(data->set.str[i]);
  ------------------
  |  | 1327|  1.68M|  do {                      \
  |  | 1328|  1.68M|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  1.68M|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  1.68M|    (ptr) = NULL;           \
  |  | 1330|  1.68M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
  157|  1.68M|  }
  158|       |
  159|   202k|  for(j = (enum dupblob)0; j < BLOB_LAST; j++) {
  ------------------
  |  Branch (159:28): [True: 179k, False: 22.4k]
  ------------------
  160|   179k|    curlx_safefree(data->set.blobs[j]);
  ------------------
  |  | 1327|   179k|  do {                      \
  |  | 1328|   179k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   179k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   179k|    (ptr) = NULL;           \
  |  | 1330|   179k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 179k]
  |  |  ------------------
  ------------------
  161|   179k|  }
  162|       |
  163|  22.4k|  Curl_bufref_free(&data->state.referer);
  164|  22.4k|  Curl_bufref_free(&data->state.url);
  165|       |
  166|  22.4k|#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
  167|  22.4k|  Curl_mime_cleanpart(data->set.mimepostp);
  168|  22.4k|  curlx_safefree(data->set.mimepostp);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  169|  22.4k|#endif
  170|       |
  171|  22.4k|#ifndef CURL_DISABLE_COOKIES
  172|  22.4k|  curl_slist_free_all(data->state.cookielist);
  173|       |  data->state.cookielist = NULL;
  174|  22.4k|#endif
  175|  22.4k|}
Curl_close:
  201|  22.4k|{
  202|  22.4k|  struct Curl_easy *data;
  203|       |
  204|  22.4k|  if(!datap || !*datap)
  ------------------
  |  Branch (204:6): [True: 0, False: 22.4k]
  |  Branch (204:16): [True: 8, False: 22.4k]
  ------------------
  205|      8|    return CURLE_OK;
  206|       |
  207|  22.4k|  data = *datap;
  208|  22.4k|  *datap = NULL;
  209|       |
  210|  22.4k|  if(!data->state.internal && data->multi) {
  ------------------
  |  Branch (210:6): [True: 11.6k, False: 10.7k]
  |  Branch (210:31): [True: 0, False: 11.6k]
  ------------------
  211|       |    /* This handle is still part of a multi handle, take care of this first
  212|       |       and detach this handle from there.
  213|       |       This detaches the connection. */
  214|      0|    curl_multi_remove_handle(data->multi, data);
  215|      0|  }
  216|  22.4k|  else {
  217|       |    /* Detach connection if any is left. This should not be normal, but can be
  218|       |       the case for example with CONNECT_ONLY + recv/send (test 556) */
  219|  22.4k|    Curl_detach_connection(data);
  220|  22.4k|    if(!data->state.internal && data->multi_easy) {
  ------------------
  |  Branch (220:8): [True: 11.6k, False: 10.7k]
  |  Branch (220:33): [True: 0, False: 11.6k]
  ------------------
  221|       |      /* when curl_easy_perform() is used, it creates its own multi handle to
  222|       |         use and this is the one */
  223|      0|      curl_multi_cleanup(data->multi_easy);
  224|      0|      data->multi_easy = NULL;
  225|      0|    }
  226|  22.4k|  }
  227|  22.4k|  DEBUGASSERT(!data->conn || data->state.internal);
  ------------------
  |  | 1081|  22.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (227:3): [True: 22.4k, False: 0]
  |  Branch (227:3): [True: 0, False: 0]
  |  Branch (227:3): [True: 22.4k, False: 0]
  |  Branch (227:3): [True: 0, False: 0]
  ------------------
  228|       |
  229|  22.4k|  Curl_expire_clear(data); /* shut off any timers left */
  230|       |
  231|  22.4k|  if(data->state.rangestringalloc)
  ------------------
  |  Branch (231:6): [True: 47, False: 22.4k]
  ------------------
  232|     47|    curlx_free(data->state.range);
  ------------------
  |  | 1483|     47|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  233|       |
  234|       |  /* release any resolve information this transfer kept */
  235|  22.4k|  Curl_resolv_destroy_all(data);
  236|       |
  237|  22.4k|  data->set.verbose = FALSE; /* no more calls to DEBUGFUNCTION */
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  238|  22.4k|  data->magic = 0; /* force a clear AFTER the possibly enforced removal from
  239|       |                    * the multi handle and async dns shutdown. The multi
  240|       |                    * handle might check the magic and so might any
  241|       |                    * DEBUGFUNCTION invoked for tracing */
  242|       |
  243|       |  /* freed here in case DONE was not called */
  244|  22.4k|  Curl_req_free(&data->req, data);
  245|       |
  246|       |  /* Close down all open SSL info and sessions */
  247|  22.4k|  Curl_ssl_close_all(data);
  248|  22.4k|  Curl_peer_unlink(&data->state.initial_origin);
  249|  22.4k|  Curl_ssl_free_certinfo(data);
  250|       |
  251|  22.4k|  Curl_bufref_free(&data->state.referer);
  252|       |
  253|  22.4k|  up_free(data);
  254|  22.4k|  curlx_dyn_free(&data->state.headerb);
  255|  22.4k|  Curl_flush_cookies(data, TRUE);
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  256|  22.4k|#ifndef CURL_DISABLE_ALTSVC
  257|  22.4k|  Curl_altsvc_save(data, data->asi, data->set.str[STRING_ALTSVC]);
  258|  22.4k|  Curl_altsvc_cleanup(&data->asi);
  259|  22.4k|#endif
  260|  22.4k|#ifndef CURL_DISABLE_HSTS
  261|  22.4k|  Curl_hsts_save(data, data->hsts, data->set.str[STRING_HSTS]);
  262|  22.4k|  if(!data->share || !data->share->hsts)
  ------------------
  |  Branch (262:6): [True: 22.4k, False: 0]
  |  Branch (262:22): [True: 0, False: 0]
  ------------------
  263|  22.4k|    Curl_hsts_cleanup(&data->hsts);
  264|  22.4k|  curl_slist_free_all(data->state.hstslist); /* clean up list */
  265|  22.4k|#endif
  266|  22.4k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
  267|  22.4k|  Curl_http_auth_cleanup_digest(data);
  268|  22.4k|#endif
  269|  22.4k|  curlx_safefree(data->state.most_recent_ftp_entrypath);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  270|  22.4k|  curlx_safefree(data->info.contenttype);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  271|  22.4k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  272|       |
  273|       |  /* No longer a dirty share, if it exists */
  274|  22.4k|  if(Curl_share_easy_unlink(data))
  ------------------
  |  Branch (274:6): [True: 0, False: 22.4k]
  ------------------
  275|  22.4k|    DEBUGASSERT(0);
  ------------------
  |  | 1081|  22.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:5): [Folded, False: 0]
  |  Branch (275:5): [Folded, False: 0]
  ------------------
  276|       |
  277|  22.4k|  Curl_hash_destroy(&data->meta_hash);
  278|  22.4k|  Curl_creds_unlink(&data->state.creds);
  279|  22.4k|  curlx_safefree(data->state.aptr.uagent);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  280|  22.4k|  curlx_safefree(data->state.aptr.accept_encoding);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  281|  22.4k|  curlx_safefree(data->state.aptr.rangeline);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  282|  22.4k|  curlx_safefree(data->state.aptr.ref);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  283|  22.4k|  curlx_safefree(data->state.aptr.host);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  284|  22.4k|#ifndef CURL_DISABLE_COOKIES
  285|  22.4k|  curlx_safefree(data->req.cookiehost);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  286|  22.4k|#endif
  287|  22.4k|#ifndef CURL_DISABLE_RTSP
  288|  22.4k|  curlx_safefree(data->state.aptr.rtsp_transport);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  289|  22.4k|#endif
  290|       |
  291|  22.4k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_FORM_API)
  292|  22.4k|  Curl_mime_cleanpart(data->state.formp);
  293|  22.4k|  curlx_safefree(data->state.formp);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  294|  22.4k|#endif
  295|       |
  296|       |  /* destruct wildcard structures if it is needed */
  297|  22.4k|  Curl_wildcard_dtor(&data->wildcard);
  298|  22.4k|  Curl_freeset(data);
  299|  22.4k|  Curl_headers_cleanup(data);
  300|  22.4k|  Curl_netrc_cleanup(&data->state.netrc);
  301|  22.4k|#ifndef CURL_DISABLE_DIGEST_AUTH
  302|  22.4k|  curlx_free(data->state.envproxy);
  ------------------
  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  303|  22.4k|#endif
  304|  22.4k|  curlx_free(data);
  ------------------
  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  305|  22.4k|  return CURLE_OK;
  306|  22.4k|}
Curl_init_userdefined:
  313|  22.4k|{
  314|  22.4k|  struct UserDefined *set = &data->set;
  315|       |
  316|  22.4k|  set->out = stdout;  /* default output to stdout */
  317|  22.4k|  set->in_set = stdin;  /* default input from stdin */
  318|  22.4k|  set->err = stderr;  /* default stderr to stderr */
  319|       |
  320|  22.4k|#if defined(__clang__) && __clang_major__ >= 16
  321|  22.4k|#pragma clang diagnostic push
  322|  22.4k|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
  323|  22.4k|#endif
  324|       |  /* use fwrite as default function to store output */
  325|  22.4k|  set->fwrite_func = (curl_write_callback)fwrite;
  326|       |
  327|       |  /* use fread as default function to read input */
  328|  22.4k|  set->fread_func_set = (curl_read_callback)fread;
  329|  22.4k|#if defined(__clang__) && __clang_major__ >= 16
  330|  22.4k|#pragma clang diagnostic pop
  331|  22.4k|#endif
  332|  22.4k|  set->is_fread_set = 0;
  333|       |
  334|  22.4k|  set->seek_client = ZERO_NULL;
  ------------------
  |  | 1155|  22.4k|#define ZERO_NULL 0
  ------------------
  335|       |
  336|  22.4k|  set->filesize = -1;        /* we do not know the size */
  337|  22.4k|  set->postfieldsize = -1;   /* unknown size */
  338|  22.4k|  set->maxredirs = 30;       /* sensible default */
  339|       |
  340|  22.4k|  set->method = HTTPREQ_GET; /* Default HTTP request */
  341|  22.4k|#ifndef CURL_DISABLE_RTSP
  342|  22.4k|  set->rtspreq = RTSPREQ_OPTIONS; /* Default RTSP request */
  343|  22.4k|#endif
  344|  22.4k|#ifndef CURL_DISABLE_FTP
  345|  22.4k|  set->ftp_use_epsv = TRUE;   /* FTP defaults to EPSV operations */
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  346|  22.4k|  set->ftp_use_eprt = TRUE;   /* FTP defaults to EPRT operations */
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  347|  22.4k|  set->ftp_use_pret = FALSE;  /* mainly useful for drftpd servers */
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  348|  22.4k|  set->ftp_filemethod = FTPFILE_MULTICWD;
  349|  22.4k|  set->ftp_skip_ip = TRUE;    /* skip PASV IP by default */
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  350|  22.4k|#endif
  351|  22.4k|  set->dns_cache_timeout_ms = 60000; /* Timeout every 60 seconds by default */
  352|       |
  353|       |  /* Timeout every 24 hours by default */
  354|  22.4k|  set->general_ssl.ca_cache_timeout = 24 * 60 * 60;
  355|       |
  356|  22.4k|  set->httpauth = CURLAUTH_BASIC;  /* defaults to basic */
  ------------------
  |  |  831|  22.4k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  357|       |
  358|  22.4k|#ifndef CURL_DISABLE_PROXY
  359|  22.4k|  set->proxyport = 0;
  360|  22.4k|  set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
  ------------------
  |  |  790|  22.4k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  361|  22.4k|  set->proxyauth = CURLAUTH_BASIC; /* defaults to basic */
  ------------------
  |  |  831|  22.4k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  362|       |  /* SOCKS5 proxy auth defaults to username/password + GSS-API */
  363|  22.4k|  set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  831|  22.4k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  837|  22.4k|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|  22.4k|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  364|  22.4k|#endif
  365|       |
  366|  22.4k|  Curl_ssl_easy_config_init(data);
  367|  22.4k|#ifndef CURL_DISABLE_DOH
  368|  22.4k|  set->doh_verifyhost = TRUE;
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  369|  22.4k|  set->doh_verifypeer = TRUE;
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  370|  22.4k|#endif
  371|       |#ifdef USE_SSH
  372|       |  /* defaults to any auth type */
  373|       |  set->ssh_auth_types = CURLSSH_AUTH_DEFAULT;
  374|       |  set->new_directory_perms = 0755; /* Default permissions */
  375|       |#endif
  376|       |
  377|  22.4k|  set->new_file_perms = 0644;    /* Default permissions */
  378|  22.4k|  set->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
  ------------------
  |  |   68|  22.4k|#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
  ------------------
  379|  22.4k|  set->redir_protocols = CURLPROTO_REDIR;
  ------------------
  |  |   71|  22.4k|#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1078|  22.4k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1079|  22.4k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1080|  22.4k|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |   72|  22.4k|                         CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1081|  22.4k|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  380|       |
  381|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  382|       |  /*
  383|       |   * disallow unprotected protection negotiation NEC reference implementation
  384|       |   * seem not to follow rfc1961 section 4.3/4.4
  385|       |   */
  386|       |  set->socks5_gssapi_nec = FALSE;
  387|       |#endif
  388|       |
  389|       |  /* set default minimum TLS version */
  390|  22.4k|#ifdef USE_SSL
  391|  22.4k|  Curl_setopt_SSLVERSION(data, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2368|  22.4k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  392|  22.4k|#ifndef CURL_DISABLE_PROXY
  393|  22.4k|  Curl_setopt_SSLVERSION(data, CURLOPT_PROXY_SSLVERSION,
  394|  22.4k|                         CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2368|  22.4k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  395|  22.4k|#endif
  396|  22.4k|#endif
  397|  22.4k|#ifndef CURL_DISABLE_FTP
  398|  22.4k|  set->wildcard_enabled = FALSE;
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  399|  22.4k|  set->chunk_bgn = ZERO_NULL;
  ------------------
  |  | 1155|  22.4k|#define ZERO_NULL 0
  ------------------
  400|  22.4k|  set->chunk_end = ZERO_NULL;
  ------------------
  |  | 1155|  22.4k|#define ZERO_NULL 0
  ------------------
  401|  22.4k|  set->fnmatch = ZERO_NULL;
  ------------------
  |  | 1155|  22.4k|#define ZERO_NULL 0
  ------------------
  402|  22.4k|#endif
  403|  22.4k|  set->tcp_keepalive = FALSE;
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  404|  22.4k|  set->tcp_keepintvl = 60;
  405|  22.4k|  set->tcp_keepidle = 60;
  406|  22.4k|  set->tcp_keepcnt = 9;
  407|  22.4k|  set->tcp_fastopen = FALSE;
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  408|  22.4k|  set->tcp_nodelay = TRUE;
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  409|  22.4k|  set->ssl_enable_alpn = TRUE;
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  410|  22.4k|  set->expect_100_timeout = 1000L; /* Wait for a second by default. */
  411|  22.4k|  set->sep_headers = TRUE; /* separated header lists by default */
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  412|  22.4k|  set->buffer_size = READBUFFER_SIZE;
  ------------------
  |  |  114|  22.4k|#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  265|  22.4k|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
  413|  22.4k|  set->upload_buffer_size = UPLOADBUFFER_DEFAULT;
  ------------------
  |  |  126|  22.4k|#define UPLOADBUFFER_DEFAULT 65536
  ------------------
  414|  22.4k|  set->upload_flags = CURLULFLAG_SEEN;
  ------------------
  |  | 1044|  22.4k|#define CURLULFLAG_SEEN     (1L << 4)
  ------------------
  415|  22.4k|  set->happy_eyeballs_timeout = CURL_HET_DEFAULT;
  ------------------
  |  |  969|  22.4k|#define CURL_HET_DEFAULT 200L
  ------------------
  416|  22.4k|  set->upkeep_interval_ms = CURL_UPKEEP_INTERVAL_DEFAULT;
  ------------------
  |  |  972|  22.4k|#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
  ------------------
  417|  22.4k|  set->maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
  ------------------
  |  |   38|  22.4k|#define DEFAULT_CONNCACHE_SIZE 5
  ------------------
  418|  22.4k|  set->conn_max_idle_ms = 118 * 1000;
  419|  22.4k|  set->conn_max_age_ms = 24 * 3600 * 1000;
  420|  22.4k|  set->http09_allowed = FALSE;
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  421|  22.4k|  set->httpwant = CURL_HTTP_VERSION_NONE;
  ------------------
  |  | 2312|  22.4k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  422|  22.4k|#if defined(USE_HTTP2) || defined(USE_HTTP3)
  423|  22.4k|  memset(&set->priority, 0, sizeof(set->priority));
  424|  22.4k|#endif
  425|  22.4k|  set->quick_exit = 0L;
  426|  22.4k|#ifndef CURL_DISABLE_WEBSOCKETS
  427|  22.4k|  set->ws_raw_mode = FALSE;
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  428|       |  set->ws_no_auto_pong = FALSE;
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  429|  22.4k|#endif
  430|  22.4k|}
Curl_open:
  452|  22.4k|{
  453|  22.4k|  struct Curl_easy *data;
  454|       |
  455|       |  /* simple start-up: alloc the struct, init it with zeroes and return */
  456|  22.4k|  data = curlx_calloc(1, sizeof(struct Curl_easy));
  ------------------
  |  | 1480|  22.4k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  457|  22.4k|  if(!data) {
  ------------------
  |  Branch (457:6): [True: 0, False: 22.4k]
  ------------------
  458|       |    /* this is a serious error */
  459|      0|    DEBUGF(curl_mfprintf(stderr, "Error: calloc of Curl_easy failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  460|      0|    return CURLE_OUT_OF_MEMORY;
  461|      0|  }
  462|       |
  463|  22.4k|  data->magic = CURLEASY_MAGIC_NUMBER;
  ------------------
  |  |  130|  22.4k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  ------------------
  464|       |  /* most recent connection is not yet defined */
  465|  22.4k|  data->state.lastconnect_id = -1;
  466|  22.4k|  data->state.recent_conn_id = -1;
  467|       |  /* and not assigned an id yet */
  468|  22.4k|  data->id = -1;
  469|  22.4k|  data->mid = UINT32_MAX;
  470|  22.4k|  data->master_mid = UINT32_MAX;
  471|  22.4k|  data->progress.hide = TRUE;
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  472|  22.4k|  data->state.current_speed = -1; /* init to negative == impossible */
  473|       |
  474|  22.4k|  Curl_hash_init(&data->meta_hash, 23,
  475|  22.4k|                 Curl_hash_str, curlx_str_key_compare, easy_meta_freeentry);
  476|  22.4k|  curlx_dyn_init(&data->state.headerb, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  22.4k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  477|  22.4k|  Curl_bufref_init(&data->state.url);
  478|  22.4k|  Curl_bufref_init(&data->state.referer);
  479|  22.4k|  Curl_req_init(&data->req);
  480|  22.4k|  Curl_initinfo(data);
  481|  22.4k|#ifndef CURL_DISABLE_HTTP
  482|  22.4k|  Curl_llist_init(&data->state.httphdrs, NULL);
  483|  22.4k|#endif
  484|  22.4k|  Curl_netrc_init(&data->state.netrc);
  485|  22.4k|  Curl_init_userdefined(data);
  486|       |
  487|  22.4k|  *curl = data;
  488|  22.4k|  return CURLE_OK;
  489|  22.4k|}
Curl_conn_free:
  492|  7.59k|{
  493|  7.59k|  size_t i;
  494|       |
  495|  7.59k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  7.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (495:3): [True: 0, False: 7.59k]
  |  Branch (495:3): [True: 7.59k, False: 0]
  ------------------
  496|       |
  497|  7.59k|  if(conn->scheme && conn->scheme->run->disconnect &&
  ------------------
  |  Branch (497:6): [True: 6.30k, False: 1.28k]
  |  Branch (497:22): [True: 5.72k, False: 580]
  ------------------
  498|  5.72k|     !conn->bits.shutdown_handler)
  ------------------
  |  Branch (498:6): [True: 19, False: 5.71k]
  ------------------
  499|     19|    conn->scheme->run->disconnect(data, conn, TRUE);
  ------------------
  |  | 1055|     19|#define TRUE true
  ------------------
  500|       |
  501|  22.7k|  for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1294|  22.7k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (501:14): [True: 15.1k, False: 7.59k]
  ------------------
  502|  15.1k|    Curl_conn_cf_discard_all(data, conn, (int)i);
  503|  15.1k|  }
  504|       |
  505|  7.59k|#ifndef CURL_DISABLE_PROXY
  506|  7.59k|  Curl_peer_unlink(&conn->http_proxy.peer);
  507|  7.59k|  Curl_peer_unlink(&conn->socks_proxy.peer);
  508|  7.59k|  Curl_creds_unlink(&conn->http_proxy.creds);
  509|  7.59k|  Curl_creds_unlink(&conn->socks_proxy.creds);
  510|  7.59k|#endif
  511|  7.59k|  Curl_creds_unlink(&conn->creds);
  512|  7.59k|  curlx_safefree(conn->options);
  ------------------
  |  | 1327|  7.59k|  do {                      \
  |  | 1328|  7.59k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  7.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  7.59k|    (ptr) = NULL;           \
  |  | 1330|  7.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 7.59k]
  |  |  ------------------
  ------------------
  513|  7.59k|  curlx_safefree(conn->localdev);
  ------------------
  |  | 1327|  7.59k|  do {                      \
  |  | 1328|  7.59k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  7.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  7.59k|    (ptr) = NULL;           \
  |  | 1330|  7.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 7.59k]
  |  |  ------------------
  ------------------
  514|  7.59k|  Curl_ssl_conn_config_cleanup(conn);
  515|       |
  516|  7.59k|  curlx_safefree(conn->destination);
  ------------------
  |  | 1327|  7.59k|  do {                      \
  |  | 1328|  7.59k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  7.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  7.59k|    (ptr) = NULL;           \
  |  | 1330|  7.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 7.59k]
  |  |  ------------------
  ------------------
  517|  7.59k|  Curl_hash_destroy(&conn->meta_hash);
  518|  7.59k|  Curl_peer_unlink(&conn->origin);
  519|  7.59k|  Curl_peer_unlink(&conn->via_peer);
  520|  7.59k|  Curl_peer_unlink(&conn->origin2);
  521|  7.59k|  Curl_peer_unlink(&conn->via_peer2);
  522|       |
  523|  7.59k|  curlx_free(conn); /* free all the connection oriented data */
  ------------------
  |  | 1483|  7.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  524|  7.59k|}
Curl_uc_to_curlcode:
 1373|    678|{
 1374|    678|  switch(uc) {
 1375|    677|  default:
  ------------------
  |  Branch (1375:3): [True: 677, False: 1]
  ------------------
 1376|    677|    return CURLE_URL_MALFORMAT;
 1377|      0|  case CURLUE_UNSUPPORTED_SCHEME:
  ------------------
  |  Branch (1377:3): [True: 0, False: 678]
  ------------------
 1378|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
 1379|      0|  case CURLUE_OUT_OF_MEMORY:
  ------------------
  |  Branch (1379:3): [True: 0, False: 678]
  ------------------
 1380|      0|    return CURLE_OUT_OF_MEMORY;
 1381|      1|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (1381:3): [True: 1, False: 677]
  ------------------
 1382|      1|    return CURLE_LOGIN_DENIED;
 1383|    678|  }
 1384|    678|}
Curl_parse_login_details:
 2103|  1.67k|{
 2104|  1.67k|  char *ubuf = NULL;
 2105|  1.67k|  char *pbuf = NULL;
 2106|  1.67k|  const char *psep = NULL;
 2107|  1.67k|  const char *osep = NULL;
 2108|  1.67k|  size_t ulen;
 2109|  1.67k|  size_t plen;
 2110|  1.67k|  size_t olen;
 2111|       |
 2112|  1.67k|  DEBUGASSERT(userp);
  ------------------
  |  | 1081|  1.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2112:3): [True: 0, False: 1.67k]
  |  Branch (2112:3): [True: 1.67k, False: 0]
  ------------------
 2113|  1.67k|  DEBUGASSERT(passwdp);
  ------------------
  |  | 1081|  1.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2113:3): [True: 0, False: 1.67k]
  |  Branch (2113:3): [True: 1.67k, False: 0]
  ------------------
 2114|       |
 2115|       |  /* Attempt to find the password separator */
 2116|  1.67k|  psep = memchr(login, ':', len);
 2117|       |
 2118|       |  /* Attempt to find the options separator */
 2119|  1.67k|  if(optionsp)
  ------------------
  |  Branch (2119:6): [True: 217, False: 1.46k]
  ------------------
 2120|    217|    osep = memchr(login, ';', len);
 2121|       |
 2122|       |  /* Calculate the portion lengths */
 2123|  1.67k|  ulen = (psep ?
  ------------------
  |  Branch (2123:11): [True: 410, False: 1.26k]
  ------------------
 2124|    410|          (size_t)(osep && psep > osep ? osep - login : psep - login) :
  ------------------
  |  Branch (2124:20): [True: 11, False: 399]
  |  Branch (2124:28): [True: 4, False: 7]
  ------------------
 2125|  1.67k|          (osep ? (size_t)(osep - login) : len));
  ------------------
  |  Branch (2125:12): [True: 21, False: 1.24k]
  ------------------
 2126|  1.67k|  plen = (psep ?
  ------------------
  |  Branch (2126:11): [True: 410, False: 1.26k]
  ------------------
 2127|    410|          (osep && osep > psep ? (size_t)(osep - psep) :
  ------------------
  |  Branch (2127:12): [True: 11, False: 399]
  |  Branch (2127:20): [True: 7, False: 4]
  ------------------
 2128|  1.26k|           (size_t)(login + len - psep)) - 1 : 0);
 2129|  1.67k|  olen = (osep ?
  ------------------
  |  Branch (2129:11): [True: 32, False: 1.64k]
  ------------------
 2130|     32|          (psep && psep > osep ? (size_t)(psep - osep) :
  ------------------
  |  Branch (2130:12): [True: 11, False: 21]
  |  Branch (2130:20): [True: 4, False: 7]
  ------------------
 2131|  1.64k|           (size_t)(login + len - osep)) - 1 : 0);
 2132|       |
 2133|       |  /* Clone the user portion buffer, which can be zero length */
 2134|  1.67k|  ubuf = curlx_memdup0(login, ulen);
 2135|  1.67k|  if(!ubuf)
  ------------------
  |  Branch (2135:6): [True: 0, False: 1.67k]
  ------------------
 2136|      0|    goto error;
 2137|       |
 2138|       |  /* Clone the password portion buffer */
 2139|  1.67k|  if(psep) {
  ------------------
  |  Branch (2139:6): [True: 410, False: 1.26k]
  ------------------
 2140|    410|    pbuf = curlx_memdup0(&psep[1], plen);
 2141|    410|    if(!pbuf)
  ------------------
  |  Branch (2141:8): [True: 0, False: 410]
  ------------------
 2142|      0|      goto error;
 2143|    410|  }
 2144|       |
 2145|       |  /* Allocate the options portion buffer */
 2146|  1.67k|  if(optionsp) {
  ------------------
  |  Branch (2146:6): [True: 217, False: 1.46k]
  ------------------
 2147|    217|    char *obuf = NULL;
 2148|    217|    if(olen) {
  ------------------
  |  Branch (2148:8): [True: 25, False: 192]
  ------------------
 2149|     25|      obuf = curlx_memdup0(&osep[1], olen);
 2150|     25|      if(!obuf)
  ------------------
  |  Branch (2150:10): [True: 0, False: 25]
  ------------------
 2151|      0|        goto error;
 2152|     25|    }
 2153|    217|    *optionsp = obuf;
 2154|    217|  }
 2155|  1.67k|  *userp = ubuf;
 2156|  1.67k|  *passwdp = pbuf;
 2157|  1.67k|  return CURLE_OK;
 2158|      0|error:
 2159|      0|  curlx_free(ubuf);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2160|      0|  curlx_free(pbuf);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2161|      0|  return CURLE_OUT_OF_MEMORY;
 2162|  1.67k|}
Curl_connect:
 2935|  7.59k|{
 2936|  7.59k|  CURLcode result;
 2937|  7.59k|  struct connectdata *conn;
 2938|       |
 2939|  7.59k|  *pconnected = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
 2940|       |
 2941|       |  /* Set the request to virgin state based on transfer settings */
 2942|  7.59k|  Curl_req_hard_reset(&data->req, data);
 2943|       |
 2944|       |  /* Get or create a connection for the transfer. */
 2945|  7.59k|  result = url_find_or_create_conn(data);
 2946|  7.59k|  conn = data->conn;
 2947|       |
 2948|  7.59k|  if(result)
  ------------------
  |  Branch (2948:6): [True: 1.53k, False: 6.06k]
  ------------------
 2949|  1.53k|    goto out;
 2950|       |
 2951|  6.06k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  6.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2951:3): [True: 0, False: 6.06k]
  |  Branch (2951:3): [True: 6.06k, False: 0]
  ------------------
 2952|  6.06k|  Curl_pgrsTime(data, TIMER_POSTQUEUE);
 2953|  6.06k|  if(conn->bits.reuse) {
  ------------------
  |  Branch (2953:6): [True: 0, False: 6.06k]
  ------------------
 2954|      0|    if(conn->attached_xfers > 1)
  ------------------
  |  Branch (2954:8): [True: 0, False: 0]
  ------------------
 2955|       |      /* multiplexed */
 2956|      0|      *pconnected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2957|      0|  }
 2958|  6.06k|  else if(conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  6.06k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2958:11): [True: 0, False: 6.06k]
  ------------------
 2959|      0|    Curl_pgrsTime(data, TIMER_NAMELOOKUP);
 2960|      0|    *pconnected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2961|      0|  }
 2962|  6.06k|  else {
 2963|  6.06k|    result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  303|  6.06k|#define FIRSTSOCKET     0
  ------------------
                  result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  363|  6.06k|#define CURL_CF_SSL_DEFAULT  (-1)
  ------------------
 2964|  6.06k|    if(!result)
  ------------------
  |  Branch (2964:8): [True: 6.06k, False: 0]
  ------------------
 2965|  6.06k|      result = Curl_headers_init(data);
 2966|  6.06k|    CURL_TRC_M(data, "Curl_conn_setup() -> %d", result);
  ------------------
  |  |  148|  6.06k|  do {                                   \
  |  |  149|  6.06k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.06k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  6.06k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  12.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 6.06k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  12.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  6.06k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.06k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
 2967|  6.06k|  }
 2968|       |
 2969|  7.59k|out:
 2970|  7.59k|  if(result == CURLE_NO_CONNECTION_AVAILABLE)
  ------------------
  |  Branch (2970:6): [True: 203, False: 7.39k]
  ------------------
 2971|  7.59k|    DEBUGASSERT(!conn);
  ------------------
  |  | 1081|  7.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2971:5): [True: 0, False: 203]
  |  Branch (2971:5): [True: 203, False: 0]
  ------------------
 2972|       |
 2973|  7.59k|  if(result && conn) {
  ------------------
  |  Branch (2973:6): [True: 1.53k, False: 6.06k]
  |  Branch (2973:16): [True: 0, False: 1.53k]
  ------------------
 2974|       |    /* We are not allowed to return failure with memory left allocated in the
 2975|       |       connectdata struct, free those here */
 2976|      0|    Curl_detach_connection(data);
 2977|      0|    Curl_conn_terminate(data, conn, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2978|      0|  }
 2979|       |
 2980|  7.59k|  return result;
 2981|  7.59k|}
Curl_init_do:
 2994|  6.06k|{
 2995|  6.06k|  CURLcode result;
 2996|       |
 2997|  6.06k|  if(conn) {
  ------------------
  |  Branch (2997:6): [True: 6.06k, False: 0]
  ------------------
 2998|  6.06k|    conn->bits.do_more = FALSE; /* by default there is no curl_do_more() to
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
 2999|       |                                   use */
 3000|       |    /* if the protocol used does not support wildcards, switch it off */
 3001|  6.06k|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (3001:8): [True: 9, False: 6.05k]
  ------------------
 3002|      9|       !(conn->scheme->flags & PROTOPT_WILDCARD))
  ------------------
  |  |  231|      9|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (3002:8): [True: 9, False: 0]
  ------------------
 3003|      9|      data->state.wildcardmatch = FALSE;
  ------------------
  |  | 1058|      9|#define FALSE false
  ------------------
 3004|  6.06k|  }
 3005|       |
 3006|  6.06k|  data->state.done = FALSE; /* *_done() is not called yet */
  ------------------
  |  | 1058|  6.06k|#define FALSE false
  ------------------
 3007|       |
 3008|  6.06k|  data->req.no_body = data->set.opt_no_body;
 3009|  6.06k|  if(data->req.no_body)
  ------------------
  |  Branch (3009:6): [True: 5, False: 6.06k]
  ------------------
 3010|       |    /* in HTTP lingo, no body means using the HEAD request... */
 3011|      5|    data->state.httpreq = HTTPREQ_HEAD;
 3012|       |
 3013|  6.06k|  result = Curl_req_start(&data->req, data);
 3014|  6.06k|  if(!result) {
  ------------------
  |  Branch (3014:6): [True: 6.06k, False: 0]
  ------------------
 3015|  6.06k|    Curl_pgrsReset(data);
 3016|  6.06k|  }
 3017|  6.06k|  return result;
 3018|  6.06k|}
Curl_data_priority_clear_state:
 3023|  7.49k|{
 3024|  7.49k|  memset(&data->state.priority, 0, sizeof(data->state.priority));
 3025|  7.49k|}
Curl_conn_meta_set:
 3031|  5.71k|{
 3032|  5.71k|  if(!Curl_hash_add2(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1,
  ------------------
  |  |  866|  5.71k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (3032:6): [True: 0, False: 5.71k]
  ------------------
 3033|  5.71k|                     meta_data, meta_dtor)) {
 3034|      0|    meta_dtor(CURL_UNCONST(key), strlen(key) + 1, meta_data);
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3035|      0|    return CURLE_OUT_OF_MEMORY;
 3036|      0|  }
 3037|  5.71k|  return CURLE_OK;
 3038|  5.71k|}
Curl_conn_meta_remove:
 3041|  6.06k|{
 3042|  6.06k|  Curl_hash_delete(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  866|  6.06k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3043|  6.06k|}
Curl_conn_meta_get:
 3046|  3.63M|{
 3047|  3.63M|  return Curl_hash_pick(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  866|  3.63M|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3048|  3.63M|}
Curl_1st_fatal:
 3051|  6.06k|{
 3052|  6.06k|  if(r1 && (r1 != CURLE_AGAIN))
  ------------------
  |  Branch (3052:6): [True: 5.34k, False: 717]
  |  Branch (3052:12): [True: 5.34k, False: 0]
  ------------------
 3053|  5.34k|    return r1;
 3054|    717|  if(r2 && (r2 != CURLE_AGAIN))
  ------------------
  |  Branch (3054:6): [True: 0, False: 717]
  |  Branch (3054:12): [True: 0, False: 0]
  ------------------
 3055|      0|    return r2;
 3056|    717|  return r1;
 3057|    717|}
url.c:up_free:
  179|  30.0k|{
  180|  30.0k|  struct urlpieces *up = &data->state.up;
  181|  30.0k|  curlx_safefree(up->scheme);
  ------------------
  |  | 1327|  30.0k|  do {                      \
  |  | 1328|  30.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  30.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  30.0k|    (ptr) = NULL;           \
  |  | 1330|  30.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  182|  30.0k|  curlx_safefree(up->hostname);
  ------------------
  |  | 1327|  30.0k|  do {                      \
  |  | 1328|  30.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  30.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  30.0k|    (ptr) = NULL;           \
  |  | 1330|  30.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  183|  30.0k|  curlx_safefree(up->port);
  ------------------
  |  | 1327|  30.0k|  do {                      \
  |  | 1328|  30.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  30.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  30.0k|    (ptr) = NULL;           \
  |  | 1330|  30.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  184|  30.0k|  curlx_safefree(up->user);
  ------------------
  |  | 1327|  30.0k|  do {                      \
  |  | 1328|  30.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  30.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  30.0k|    (ptr) = NULL;           \
  |  | 1330|  30.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  185|  30.0k|  curlx_safefree(up->password);
  ------------------
  |  | 1327|  30.0k|  do {                      \
  |  | 1328|  30.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  30.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  30.0k|    (ptr) = NULL;           \
  |  | 1330|  30.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  186|  30.0k|  curlx_safefree(up->options);
  ------------------
  |  | 1327|  30.0k|  do {                      \
  |  | 1328|  30.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  30.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  30.0k|    (ptr) = NULL;           \
  |  | 1330|  30.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  187|  30.0k|  curlx_safefree(up->path);
  ------------------
  |  | 1327|  30.0k|  do {                      \
  |  | 1328|  30.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  30.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  30.0k|    (ptr) = NULL;           \
  |  | 1330|  30.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  188|  30.0k|  curlx_safefree(up->query);
  ------------------
  |  | 1327|  30.0k|  do {                      \
  |  | 1328|  30.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  30.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  30.0k|    (ptr) = NULL;           \
  |  | 1330|  30.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  189|  30.0k|  curl_url_cleanup(data->state.uh);
  190|       |  data->state.uh = NULL;
  191|  30.0k|}
url.c:url_find_or_create_conn:
 2736|  7.59k|{
 2737|  7.59k|  struct connectdata *needle = NULL;
 2738|  7.59k|  bool waitpipe = FALSE;
  ------------------
  |  | 1058|  7.59k|#define FALSE false
  ------------------
 2739|  7.59k|  CURLcode result;
 2740|       |
 2741|       |  /* create the template connection for transfer data. Use this needle to
 2742|       |   * find an existing connection or, if none exists, convert needle
 2743|       |   * to a full connection and attach it to data. */
 2744|  7.59k|  result = url_create_needle(data, &needle);
 2745|  7.59k|  if(result)
  ------------------
  |  Branch (2745:6): [True: 1.32k, False: 6.26k]
  ------------------
 2746|  1.32k|    goto out;
 2747|  6.26k|  DEBUGASSERT(needle);
  ------------------
  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2747:3): [True: 0, False: 6.26k]
  |  Branch (2747:3): [True: 6.26k, False: 0]
  ------------------
 2748|       |
 2749|       |  /***********************************************************************
 2750|       |   * file: is a special case in that it does not need a network connection
 2751|       |   ***********************************************************************/
 2752|  6.26k|#ifndef CURL_DISABLE_FILE
 2753|  6.26k|  if(needle->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  6.26k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2753:6): [True: 0, False: 6.26k]
  ------------------
 2754|      0|    bool done;
 2755|       |    /* this is supposed to be the connect function so we better at least check
 2756|       |       that the file is present here! */
 2757|      0|    DEBUGASSERT(needle->scheme->run->connect_it);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2757:5): [True: 0, False: 0]
  |  Branch (2757:5): [True: 0, False: 0]
  ------------------
 2758|      0|    data->info.conn_scheme = needle->scheme->name;
 2759|       |    /* conn_protocol can only provide "old" protocols */
 2760|      0|    data->info.conn_protocol = (needle->scheme->protocol) & CURLPROTO_MASK;
  ------------------
  |  |   79|      0|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2761|      0|    result = needle->scheme->run->connect_it(data, &done);
 2762|      0|    if(result)
  ------------------
  |  Branch (2762:8): [True: 0, False: 0]
  ------------------
 2763|      0|      goto out;
 2764|       |
 2765|       |    /* Setup a "faked" transfer that will do nothing */
 2766|      0|    Curl_attach_connection(data, needle);
 2767|      0|    needle = NULL;
 2768|      0|    result = Curl_cpool_add(data, data->conn);
 2769|      0|    if(!result) {
  ------------------
  |  Branch (2769:8): [True: 0, False: 0]
  ------------------
 2770|       |      /* Setup whatever necessary for a resumed transfer */
 2771|      0|      result = setup_range(data);
 2772|      0|      if(!result) {
  ------------------
  |  Branch (2772:10): [True: 0, False: 0]
  ------------------
 2773|      0|        Curl_xfer_setup_nop(data);
 2774|      0|        result = Curl_init_do(data, data->conn);
 2775|      0|      }
 2776|      0|    }
 2777|       |
 2778|      0|    if(result) {
  ------------------
  |  Branch (2778:8): [True: 0, False: 0]
  ------------------
 2779|      0|      DEBUGASSERT(data->conn->scheme->run->done);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2779:7): [True: 0, False: 0]
  |  Branch (2779:7): [True: 0, False: 0]
  ------------------
 2780|       |      /* we ignore the return code for the protocol-specific DONE */
 2781|      0|      (void)data->conn->scheme->run->done(data, result, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2782|      0|    }
 2783|      0|    goto out;
 2784|      0|  }
 2785|  6.26k|#endif
 2786|       |
 2787|       |  /* Complete the easy's SSL configuration for connection cache matching */
 2788|  6.26k|  result = Curl_ssl_easy_config_complete(data);
 2789|  6.26k|  if(result)
  ------------------
  |  Branch (2789:6): [True: 0, False: 6.26k]
  ------------------
 2790|      0|    goto out;
 2791|       |
 2792|       |  /* Get rid of any dead connections so limit are easier kept. */
 2793|  6.26k|  Curl_cpool_prune_dead(data);
 2794|       |
 2795|       |  /*************************************************************
 2796|       |   * Reuse of existing connection is not allowed when
 2797|       |   * - connect_only is set or
 2798|       |   * - reuse_fresh is set and this is not a follow-up request
 2799|       |   *   (like with HTTP followlocation)
 2800|       |   *************************************************************/
 2801|  6.26k|  if((!data->set.reuse_fresh || data->state.followlocation) &&
  ------------------
  |  Branch (2801:7): [True: 6.26k, False: 1]
  |  Branch (2801:33): [True: 0, False: 1]
  ------------------
 2802|  6.26k|     !data->set.connect_only) {
  ------------------
  |  Branch (2802:6): [True: 6.26k, False: 5]
  ------------------
 2803|       |    /* Ok, try to find and attach an existing one */
 2804|  6.26k|    url_attach_existing(data, needle, &waitpipe);
 2805|  6.26k|  }
 2806|       |
 2807|  6.26k|  if(data->conn) {
  ------------------
  |  Branch (2807:6): [True: 0, False: 6.26k]
  ------------------
 2808|       |    /* We attached an existing connection for this transfer. Copy
 2809|       |     * over transfer specific properties over from needle. */
 2810|      0|    struct connectdata *conn = data->conn;
 2811|      0|    VERBOSE(bool tls_upgraded = (!(needle->given->flags & PROTOPT_SSL) &&
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  |  |  ------------------
  |  |  |  Branch (1618:20): [True: 0, False: 0]
  |  |  |  Branch (1618:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2812|      0|                                 Curl_conn_is_ssl(conn, FIRSTSOCKET)));
 2813|       |
 2814|      0|    conn->bits.reuse = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2815|      0|    url_conn_reuse_adjust(data, needle);
 2816|       |
 2817|      0|#ifndef CURL_DISABLE_PROXY
 2818|      0|    infof(data, "Reusing existing %s: connection%s with %s %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2819|      0|          conn->given->name,
 2820|      0|          tls_upgraded ? " (upgraded to SSL)" : "",
 2821|      0|          conn->bits.proxy ? "proxy" : "host",
 2822|      0|          conn->socks_proxy.peer ? conn->socks_proxy.peer->user_hostname :
 2823|      0|          conn->http_proxy.peer ? conn->http_proxy.peer->user_hostname :
 2824|      0|          conn->origin->hostname);
 2825|       |#else
 2826|       |    infof(data, "Reusing existing %s: connection%s with host %s",
 2827|       |          conn->given->name,
 2828|       |          tls_upgraded ? " (upgraded to SSL)" : "",
 2829|       |          conn->origin->hostname);
 2830|       |#endif
 2831|      0|  }
 2832|  6.26k|  else {
 2833|       |    /* We have decided that we want a new connection. We may not be able to do
 2834|       |       that if we have reached the limit of how many connections we are
 2835|       |       allowed to open. */
 2836|  6.26k|    DEBUGF(infof(data, "new connection, bits.close=%d", needle->bits.close));
  ------------------
  |  | 1067|  43.8k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 6.26k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 6.26k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
 2837|       |
 2838|  6.26k|    if(waitpipe) {
  ------------------
  |  Branch (2838:8): [True: 203, False: 6.06k]
  ------------------
 2839|       |      /* There is a connection that *might* become usable for multiplexing
 2840|       |         "soon", and we wait for that */
 2841|    203|      infof(data, "Waiting on connection to negotiate possible multiplexing.");
  ------------------
  |  |  143|    203|  do {                               \
  |  |  144|    203|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    203|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 203, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 203]
  |  |  |  |  ------------------
  |  |  |  |  320|    203|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    203|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    203|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 203]
  |  |  ------------------
  ------------------
 2842|    203|      result = CURLE_NO_CONNECTION_AVAILABLE;
 2843|    203|      goto out;
 2844|    203|    }
 2845|  6.06k|    else {
 2846|  6.06k|      switch(Curl_cpool_check_limits(data, needle)) {
 2847|      0|      case CPOOL_LIMIT_DEST:
  ------------------
  |  |   91|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  |  Branch (2847:7): [True: 0, False: 6.06k]
  ------------------
 2848|      0|        infof(data, "No more connections allowed to host");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2849|      0|        result = CURLE_NO_CONNECTION_AVAILABLE;
 2850|      0|        goto out;
 2851|      0|      case CPOOL_LIMIT_TOTAL:
  ------------------
  |  |   92|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  |  Branch (2851:7): [True: 0, False: 6.06k]
  ------------------
 2852|      0|        if(data->master_mid != UINT32_MAX)
  ------------------
  |  Branch (2852:12): [True: 0, False: 0]
  ------------------
 2853|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2854|      0|                     "max connection limit");
 2855|      0|        else {
 2856|      0|          infof(data, "No connections available, total of %zu reached.",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2857|      0|                data->multi->max_total_connections);
 2858|      0|          result = CURLE_NO_CONNECTION_AVAILABLE;
 2859|      0|          goto out;
 2860|      0|        }
 2861|      0|        break;
 2862|  6.06k|      default:
  ------------------
  |  Branch (2862:7): [True: 6.06k, False: 0]
  ------------------
 2863|  6.06k|        break;
 2864|  6.06k|      }
 2865|  6.06k|    }
 2866|       |
 2867|       |    /* Convert needle into a full connection by filling in all the
 2868|       |     * remaining parts like the cloned SSL configuration. */
 2869|  6.06k|    result = Curl_ssl_conn_config_init(data, needle);
 2870|  6.06k|    if(result) {
  ------------------
  |  Branch (2870:8): [True: 0, False: 6.06k]
  ------------------
 2871|      0|      DEBUGF(curl_mfprintf(stderr, "Error: init connection SSL config\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
 2872|      0|      goto out;
 2873|      0|    }
 2874|       |    /* attach it and no longer own it */
 2875|  6.06k|    Curl_attach_connection(data, needle);
 2876|  6.06k|    needle = NULL;
 2877|       |
 2878|  6.06k|    result = Curl_cpool_add(data, data->conn);
 2879|  6.06k|    if(result)
  ------------------
  |  Branch (2879:8): [True: 0, False: 6.06k]
  ------------------
 2880|      0|      goto out;
 2881|       |
 2882|       |#ifdef USE_NTLM
 2883|       |    /* If NTLM is requested in a part of this connection, make sure we do not
 2884|       |       assume the state is fine as this is a fresh connection and NTLM is
 2885|       |       connection based. */
 2886|       |    if((data->state.authhost.picked & CURLAUTH_NTLM) &&
 2887|       |       data->state.authhost.done) {
 2888|       |      infof(data, "NTLM picked AND auth done set, clear picked");
 2889|       |      data->state.authhost.picked = CURLAUTH_NONE;
 2890|       |      data->state.authhost.done = FALSE;
 2891|       |    }
 2892|       |
 2893|       |    if((data->state.authproxy.picked & CURLAUTH_NTLM) &&
 2894|       |       data->state.authproxy.done) {
 2895|       |      infof(data, "NTLM-proxy picked AND auth done set, clear picked");
 2896|       |      data->state.authproxy.picked = CURLAUTH_NONE;
 2897|       |      data->state.authproxy.done = FALSE;
 2898|       |    }
 2899|       |#endif
 2900|  6.06k|  }
 2901|       |
 2902|       |  /* Setup and init stuff before DO starts, in preparing for the transfer. */
 2903|  6.06k|  result = Curl_init_do(data, data->conn);
 2904|  6.06k|  if(result)
  ------------------
  |  Branch (2904:6): [True: 0, False: 6.06k]
  ------------------
 2905|      0|    goto out;
 2906|       |
 2907|       |  /* Setup whatever necessary for a resumed transfer */
 2908|  6.06k|  result = setup_range(data);
 2909|  6.06k|  if(result)
  ------------------
  |  Branch (2909:6): [True: 0, False: 6.06k]
  ------------------
 2910|      0|    goto out;
 2911|       |
 2912|       |  /* persist the scheme and handler the transfer is using */
 2913|  6.06k|  data->info.conn_scheme = data->conn->scheme->name;
 2914|       |  /* conn_protocol can only provide "old" protocols */
 2915|  6.06k|  data->info.conn_protocol = (data->conn->scheme->protocol) & CURLPROTO_MASK;
  ------------------
  |  |   79|  6.06k|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2916|  6.06k|  data->info.used_proxy =
 2917|       |#ifdef CURL_DISABLE_PROXY
 2918|       |    0
 2919|       |#else
 2920|  6.06k|    data->conn->bits.proxy
 2921|  6.06k|#endif
 2922|  6.06k|    ;
 2923|       |
 2924|       |  /* Lastly, inform connection filters that a new transfer is attached */
 2925|  6.06k|  result = Curl_conn_ev_data_setup(data);
 2926|       |
 2927|  7.59k|out:
 2928|  7.59k|  if(needle)
  ------------------
  |  Branch (2928:6): [True: 203, False: 7.39k]
  ------------------
 2929|    203|    Curl_conn_free(data, needle);
 2930|  7.59k|  DEBUGASSERT(result || data->conn);
  ------------------
  |  | 1081|  7.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2930:3): [True: 7.59k, False: 0]
  |  Branch (2930:3): [True: 0, False: 0]
  |  Branch (2930:3): [True: 1.53k, False: 6.06k]
  |  Branch (2930:3): [True: 6.06k, False: 0]
  ------------------
 2931|  7.59k|  return result;
 2932|  7.59k|}
url.c:url_create_needle:
 2575|  7.59k|{
 2576|  7.59k|  struct connectdata *needle = NULL;
 2577|  7.59k|  CURLcode result = CURLE_OK;
 2578|  7.59k|  bool network_scheme = TRUE; /* almost all are */
  ------------------
  |  | 1055|  7.59k|#define TRUE true
  ------------------
 2579|       |
 2580|       |  /*************************************************************
 2581|       |   * Check input data
 2582|       |   *************************************************************/
 2583|  7.59k|  if(!Curl_bufref_ptr(&data->state.url)) {
  ------------------
  |  Branch (2583:6): [True: 0, False: 7.59k]
  ------------------
 2584|      0|    result = CURLE_URL_MALFORMAT;
 2585|      0|    goto out;
 2586|      0|  }
 2587|       |
 2588|       |  /* First, split up the current URL in parts so that we can use the
 2589|       |     parts for checking against the already present connections. In order
 2590|       |     to not have to modify everything at once, we allocate a temporary
 2591|       |     connection data struct and fill in for comparison purposes. */
 2592|  7.59k|  needle = allocate_conn(data);
 2593|  7.59k|  if(!needle) {
  ------------------
  |  Branch (2593:6): [True: 0, False: 7.59k]
  ------------------
 2594|      0|    result = CURLE_OUT_OF_MEMORY;
 2595|      0|    goto out;
 2596|      0|  }
 2597|       |
 2598|       |  /* Do the unfailable inits first, before checks that may early return */
 2599|  7.59k|  Curl_hash_init(&needle->meta_hash, 23,
 2600|  7.59k|                 Curl_hash_str, curlx_str_key_compare, conn_meta_freeentry);
 2601|       |
 2602|       |  /*************************************************************
 2603|       |   * Determine `conn->origin` and propulate `data->state.up` and
 2604|       |   * other URL related properties.
 2605|       |   *************************************************************/
 2606|  7.59k|  result = parseurlandfillconn(data, needle);
 2607|  7.59k|  if(result)
  ------------------
  |  Branch (2607:6): [True: 1.31k, False: 6.28k]
  ------------------
 2608|  1.31k|    goto out;
 2609|  6.28k|  DEBUGASSERT(needle->origin);
  ------------------
  |  | 1081|  6.28k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2609:3): [True: 0, False: 6.28k]
  |  Branch (2609:3): [True: 6.28k, False: 0]
  ------------------
 2610|  6.28k|  network_scheme = !(needle->origin->scheme->flags & PROTOPT_NONETWORK);
  ------------------
  |  |  215|  6.28k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
 2611|       |
 2612|  6.28k|#ifdef USE_UNIX_SOCKETS
 2613|       |  /*************************************************************
 2614|       |   * Set UDS first. It overrides "via_peer" and proxy settings.
 2615|       |   *************************************************************/
 2616|  6.28k|  if(network_scheme && data->set.str[STRING_UNIX_SOCKET_PATH]) {
  ------------------
  |  Branch (2616:6): [True: 6.28k, False: 0]
  |  Branch (2616:24): [True: 15, False: 6.26k]
  ------------------
 2617|     15|    result = Curl_peer_uds_create(needle->origin->scheme,
 2618|     15|                                  data->set.str[STRING_UNIX_SOCKET_PATH],
 2619|     15|                                  (bool)data->set.abstract_unix_socket,
 2620|     15|                                  &needle->via_peer);
 2621|     15|    if(result)
  ------------------
  |  Branch (2621:8): [True: 1, False: 14]
  ------------------
 2622|      1|      goto out;
 2623|     15|  }
 2624|  6.28k|#endif /* USE_UNIX_SOCKETS */
 2625|       |
 2626|  6.28k|  if(network_scheme && !needle->via_peer) {
  ------------------
  |  Branch (2626:6): [True: 6.28k, False: 0]
  |  Branch (2626:24): [True: 6.26k, False: 14]
  ------------------
 2627|       |    /*************************************************************
 2628|       |     * If the `via_peer` is not already set (via UDS above),
 2629|       |     * determine if we talk to `conn->origin` directly or use
 2630|       |     * `conn->via_peer` using "connect to" and "alt-svc" properties.
 2631|       |     *************************************************************/
 2632|  6.26k|    result = url_set_conn_peer(data, needle);
 2633|  6.26k|    if(result)
  ------------------
  |  Branch (2633:8): [True: 0, False: 6.26k]
  ------------------
 2634|      0|      goto out;
 2635|  6.26k|  }
 2636|       |
 2637|  6.28k|#ifndef CURL_DISABLE_PROXY
 2638|       |  /* Going via a unix socket ignores any proxy settings */
 2639|  6.28k|  if(needle->via_peer && needle->via_peer->unix_socket) {
  ------------------
  |  Branch (2639:6): [True: 5.72k, False: 558]
  |  Branch (2639:26): [True: 14, False: 5.71k]
  ------------------
 2640|     14|    needle->bits.socksproxy = FALSE;
  ------------------
  |  | 1058|     14|#define FALSE false
  ------------------
 2641|     14|    needle->bits.httpproxy = FALSE;
  ------------------
  |  | 1058|     14|#define FALSE false
  ------------------
 2642|     14|    needle->bits.proxy = FALSE;
  ------------------
  |  | 1058|     14|#define FALSE false
  ------------------
 2643|     14|  }
 2644|  6.26k|  else if(network_scheme) {
  ------------------
  |  Branch (2644:11): [True: 6.26k, False: 0]
  ------------------
 2645|  6.26k|    result = url_set_conn_proxies(data, needle);
 2646|  6.26k|    if(result)
  ------------------
  |  Branch (2646:8): [True: 14, False: 6.25k]
  ------------------
 2647|     14|      goto out;
 2648|       |
 2649|       |    /*************************************************************
 2650|       |     * If the protocol is using SSL and HTTP proxy is used, we set
 2651|       |     * the tunnel_proxy bit.
 2652|       |     *************************************************************/
 2653|  6.25k|    if((needle->given->flags & PROTOPT_SSL) && needle->bits.httpproxy)
  ------------------
  |  |  207|  6.25k|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (2653:8): [True: 3.14k, False: 3.11k]
  |  Branch (2653:48): [True: 86, False: 3.05k]
  ------------------
 2654|     86|      needle->bits.tunnel_proxy = TRUE;
  ------------------
  |  | 1055|     86|#define TRUE true
  ------------------
 2655|  6.25k|  }
 2656|  6.26k|#endif /* CURL_DISABLE_PROXY */
 2657|       |
 2658|       |  /* Check for overridden login details and set them accordingly so that
 2659|       |     they are known when protocol->setup_connection is called! */
 2660|  6.26k|  result = override_login(data, needle);
 2661|  6.26k|  if(result)
  ------------------
  |  Branch (2661:6): [True: 0, False: 6.26k]
  ------------------
 2662|      0|    goto out;
 2663|       |
 2664|  6.26k|  result = url_set_conn_login(data, needle); /* default credentials */
 2665|  6.26k|  if(result)
  ------------------
  |  Branch (2665:6): [True: 0, False: 6.26k]
  ------------------
 2666|      0|    goto out;
 2667|       |
 2668|       |  /*************************************************************
 2669|       |   * Check whether the host and the "connect to host" are equal.
 2670|       |   * Do this after the hostnames have been IDN-converted.
 2671|       |   *************************************************************/
 2672|  6.26k|  if(Curl_peer_equal(needle->origin, needle->via_peer)) {
  ------------------
  |  Branch (2672:6): [True: 0, False: 6.26k]
  ------------------
 2673|      0|    Curl_peer_unlink(&needle->via_peer);
 2674|      0|  }
 2675|       |
 2676|  6.26k|#ifndef CURL_DISABLE_PROXY
 2677|       |  /*************************************************************
 2678|       |   * If the "connect to" feature is used with an HTTP proxy,
 2679|       |   * we set the tunnel_proxy bit.
 2680|       |   *************************************************************/
 2681|  6.26k|  if(needle->via_peer && needle->bits.httpproxy)
  ------------------
  |  Branch (2681:6): [True: 5.71k, False: 558]
  |  Branch (2681:26): [True: 1.34k, False: 4.36k]
  ------------------
 2682|  1.34k|    needle->bits.tunnel_proxy = TRUE;
  ------------------
  |  | 1055|  1.34k|#define TRUE true
  ------------------
 2683|  6.26k|#endif
 2684|       |
 2685|       |  /*************************************************************
 2686|       |   * Setup internals depending on protocol. Needs to be done after
 2687|       |   * we figured out what/if proxy to use.
 2688|       |   *************************************************************/
 2689|  6.26k|  result = setup_connection_internals(data, needle);
 2690|  6.26k|  if(result)
  ------------------
  |  Branch (2690:6): [True: 0, False: 6.26k]
  ------------------
 2691|      0|    goto out;
 2692|       |
 2693|  6.26k|  if(needle->scheme->flags & PROTOPT_ALPN) {
  ------------------
  |  |  223|  6.26k|#define PROTOPT_ALPN (1 << 8) /* set ALPN for this */
  ------------------
  |  Branch (2693:6): [True: 551, False: 5.71k]
  ------------------
 2694|       |    /* The protocol wants it, so set the bits if enabled in the easy handle
 2695|       |       (default) */
 2696|    551|    if(data->set.ssl_enable_alpn)
  ------------------
  |  Branch (2696:8): [True: 551, False: 0]
  ------------------
 2697|    551|      needle->bits.tls_enable_alpn = TRUE;
  ------------------
  |  | 1055|    551|#define TRUE true
  ------------------
 2698|    551|  }
 2699|       |
 2700|  6.26k|  if(network_scheme) {
  ------------------
  |  Branch (2700:6): [True: 6.26k, False: 0]
  ------------------
 2701|       |    /* Setup callbacks for network connections */
 2702|  6.26k|    needle->recv[FIRSTSOCKET] = Curl_cf_recv;
  ------------------
  |  |  303|  6.26k|#define FIRSTSOCKET     0
  ------------------
 2703|  6.26k|    needle->send[FIRSTSOCKET] = Curl_cf_send;
  ------------------
  |  |  303|  6.26k|#define FIRSTSOCKET     0
  ------------------
 2704|  6.26k|    needle->recv[SECONDARYSOCKET] = Curl_cf_recv;
  ------------------
  |  |  304|  6.26k|#define SECONDARYSOCKET 1
  ------------------
 2705|  6.26k|    needle->send[SECONDARYSOCKET] = Curl_cf_send;
  ------------------
  |  |  304|  6.26k|#define SECONDARYSOCKET 1
  ------------------
 2706|  6.26k|    needle->bits.tcp_fastopen = data->set.tcp_fastopen;
 2707|  6.26k|#ifdef USE_UNIX_SOCKETS
 2708|  6.26k|    if(Curl_conn_get_first_peer(needle, FIRSTSOCKET)->unix_socket)
  ------------------
  |  |  303|  6.26k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2708:8): [True: 15, False: 6.25k]
  ------------------
 2709|     15|      needle->transport_wanted = TRNSPRT_UNIX;
  ------------------
  |  |  310|     15|#define TRNSPRT_UNIX 6
  ------------------
 2710|  6.26k|#endif
 2711|  6.26k|  }
 2712|       |
 2713|  7.59k|out:
 2714|  7.59k|  if(!result) {
  ------------------
  |  Branch (2714:6): [True: 6.26k, False: 1.32k]
  ------------------
 2715|  6.26k|    DEBUGASSERT(needle);
  ------------------
  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2715:5): [True: 0, False: 6.26k]
  |  Branch (2715:5): [True: 6.26k, False: 0]
  ------------------
 2716|  6.26k|    DEBUGASSERT(needle->origin);
  ------------------
  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2716:5): [True: 0, False: 6.26k]
  |  Branch (2716:5): [True: 6.26k, False: 0]
  ------------------
 2717|  6.26k|    *pneedle = needle;
 2718|  6.26k|  }
 2719|  1.32k|  else {
 2720|  1.32k|    *pneedle = NULL;
 2721|  1.32k|    if(needle)
  ------------------
  |  Branch (2721:8): [True: 1.32k, False: 0]
  ------------------
 2722|  1.32k|      Curl_conn_free(data, needle);
 2723|  1.32k|  }
 2724|  7.59k|  return result;
 2725|  7.59k|}
url.c:allocate_conn:
 1272|  7.59k|{
 1273|  7.59k|  struct connectdata *conn = curlx_calloc(1, sizeof(struct connectdata));
  ------------------
  |  | 1480|  7.59k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1274|  7.59k|  if(!conn)
  ------------------
  |  Branch (1274:6): [True: 0, False: 7.59k]
  ------------------
 1275|      0|    return NULL;
 1276|       |
 1277|       |  /* and we setup a few fields in case we end up actually using this struct */
 1278|       |
 1279|  7.59k|  conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  303|  7.59k|#define FIRSTSOCKET     0
  ------------------
                conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  145|  7.59k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1280|  7.59k|  conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  304|  7.59k|#define SECONDARYSOCKET 1
  ------------------
                conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  145|  7.59k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1281|  7.59k|  conn->recv_idx = 0; /* default for receiving transfer data */
 1282|  7.59k|  conn->send_idx = 0; /* default for sending transfer data */
 1283|  7.59k|  conn->connection_id = -1;    /* no ID */
 1284|  7.59k|  conn->attached_xfers = 0;
 1285|       |
 1286|       |  /* Store creation time to help future close decision making */
 1287|  7.59k|  conn->created = *Curl_pgrs_now(data);
 1288|       |
 1289|       |  /* Store current time to give a baseline to keepalive connection times. */
 1290|  7.59k|  conn->keepalive = conn->created;
 1291|       |
 1292|  7.59k|#ifndef CURL_DISABLE_PROXY
 1293|  7.59k|  conn->http_proxy.proxytype = data->set.proxytype;
 1294|  7.59k|  conn->socks_proxy.proxytype = CURLPROXY_SOCKS4;
  ------------------
  |  |  798|  7.59k|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
 1295|       |
 1296|       |  /* note that these two proxy bits are set on what looks to be
 1297|       |     requested, they may be altered down the road */
 1298|  7.59k|  conn->bits.proxy = (data->set.str[STRING_PROXY] &&
  ------------------
  |  Branch (1298:23): [True: 1.39k, False: 6.20k]
  ------------------
 1299|  1.39k|                      *data->set.str[STRING_PROXY]);
  ------------------
  |  Branch (1299:23): [True: 1.39k, False: 2]
  ------------------
 1300|  7.59k|  conn->bits.httpproxy = (conn->bits.proxy &&
  ------------------
  |  Branch (1300:27): [True: 1.39k, False: 6.20k]
  ------------------
 1301|  1.39k|                          (conn->http_proxy.proxytype == CURLPROXY_HTTP ||
  ------------------
  |  |  790|  2.79k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  |  Branch (1301:28): [True: 1.05k, False: 336]
  ------------------
 1302|    336|                           conn->http_proxy.proxytype == CURLPROXY_HTTP_1_0 ||
  ------------------
  |  |  792|  1.73k|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (1302:28): [True: 2, False: 334]
  ------------------
 1303|    334|                           IS_HTTPS_PROXY(conn->http_proxy.proxytype)));
  ------------------
  |  |   80|    334|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  794|    334|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (80:4): [True: 140, False: 194]
  |  |  ------------------
  |  |   81|    334|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  796|    194|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (81:4): [True: 160, False: 34]
  |  |  ------------------
  |  |   82|    334|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  805|     34|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 0, False: 34]
  |  |  ------------------
  ------------------
 1304|  7.59k|  conn->bits.socksproxy = (conn->bits.proxy && !conn->bits.httpproxy);
  ------------------
  |  Branch (1304:28): [True: 1.39k, False: 6.20k]
  |  Branch (1304:48): [True: 34, False: 1.36k]
  ------------------
 1305|       |
 1306|  7.59k|  if(data->set.str[STRING_PRE_PROXY] && *data->set.str[STRING_PRE_PROXY]) {
  ------------------
  |  Branch (1306:6): [True: 497, False: 7.10k]
  |  Branch (1306:41): [True: 495, False: 2]
  ------------------
 1307|    495|    conn->bits.proxy = TRUE;
  ------------------
  |  | 1055|    495|#define TRUE true
  ------------------
 1308|    495|    conn->bits.socksproxy = TRUE;
  ------------------
  |  | 1055|    495|#define TRUE true
  ------------------
 1309|    495|  }
 1310|       |
 1311|  7.59k|  conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy;
 1312|  7.59k|#endif /* CURL_DISABLE_PROXY */
 1313|       |
 1314|  7.59k|#ifndef CURL_DISABLE_FTP
 1315|  7.59k|  conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
 1316|  7.59k|  conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
 1317|  7.59k|#endif
 1318|  7.59k|  conn->ip_version = data->set.ipver;
 1319|  7.59k|  conn->bits.connect_only = (bool)data->set.connect_only;
 1320|  7.59k|  conn->transport_wanted = TRNSPRT_TCP; /* most of them are TCP streams */
  ------------------
  |  |  307|  7.59k|#define TRNSPRT_TCP  3
  ------------------
 1321|       |
 1322|       |  /* Store the local bind parameters that will be used for this connection */
 1323|  7.59k|  if(data->set.str[STRING_DEVICE]) {
  ------------------
  |  Branch (1323:6): [True: 116, False: 7.48k]
  ------------------
 1324|    116|    conn->localdev = curlx_strdup(data->set.str[STRING_DEVICE]);
  ------------------
  |  | 1477|    116|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1325|    116|    if(!conn->localdev)
  ------------------
  |  Branch (1325:8): [True: 0, False: 116]
  ------------------
 1326|      0|      goto error;
 1327|    116|  }
 1328|  7.59k|#ifndef CURL_DISABLE_BINDLOCAL
 1329|  7.59k|  conn->localportrange = data->set.localportrange;
 1330|  7.59k|  conn->localport = data->set.localport;
 1331|  7.59k|#endif
 1332|       |
 1333|       |  /* the close socket stuff needs to be copied to the connection struct as
 1334|       |     it may live on without (this specific) Curl_easy */
 1335|  7.59k|  conn->fclosesocket = data->set.fclosesocket;
 1336|  7.59k|  conn->closesocket_client = data->set.closesocket_client;
 1337|  7.59k|  conn->lastused = conn->created;
 1338|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1339|       |  conn->gssapi_delegation = data->set.gssapi_delegation;
 1340|       |#endif
 1341|  7.59k|  DEBUGF(infof(data, "alloc connection, bits.close=%d", conn->bits.close));
  ------------------
  |  | 1067|  53.1k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 7.59k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 7.59k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 7.59k]
  |  |  ------------------
  ------------------
 1342|  7.59k|  return conn;
 1343|      0|error:
 1344|       |
 1345|      0|  curlx_free(conn->localdev);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1346|      0|  curlx_free(conn);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1347|       |  return NULL;
 1348|  7.59k|}
url.c:parseurlandfillconn:
 1492|  7.59k|{
 1493|  7.59k|  CURLcode result = CURLE_OK;
 1494|  7.59k|  CURLU *uh;
 1495|  7.59k|  CURLUcode uc;
 1496|  7.59k|  bool use_set_uh = (data->set.uh && !data->state.this_is_a_follow);
  ------------------
  |  Branch (1496:22): [True: 0, False: 7.59k]
  |  Branch (1496:38): [True: 0, False: 0]
  ------------------
 1497|  7.59k|  uint16_t port_override = data->state.allow_port ? data->set.use_port : 0;
  ------------------
  |  Branch (1497:28): [True: 7.59k, False: 0]
  ------------------
 1498|  7.59k|  uint32_t scope_id = 0;
 1499|       |
 1500|  7.59k|  up_free(data); /* cleanup previous leftovers first */
 1501|       |
 1502|       |  /* parse the URL */
 1503|  7.59k|  if(use_set_uh)
  ------------------
  |  Branch (1503:6): [True: 0, False: 7.59k]
  ------------------
 1504|      0|    uh = data->state.uh = curl_url_dup(data->set.uh);
 1505|  7.59k|  else
 1506|  7.59k|    uh = data->state.uh = curl_url();
 1507|  7.59k|  if(!uh) {
  ------------------
  |  Branch (1507:6): [True: 0, False: 7.59k]
  ------------------
 1508|      0|    result = CURLE_OUT_OF_MEMORY;
 1509|      0|    goto out;
 1510|      0|  }
 1511|       |
 1512|       |  /* Calculate the *real* URL this transfer uses, applying defaults
 1513|       |   * where information is missing. */
 1514|  7.59k|  if(data->set.str[STRING_DEFAULT_PROTOCOL] &&
  ------------------
  |  Branch (1514:6): [True: 866, False: 6.73k]
  ------------------
 1515|    866|     !Curl_is_absolute_url(Curl_bufref_ptr(&data->state.url), NULL, 0, TRUE)) {
  ------------------
  |  | 1055|    866|#define TRUE true
  ------------------
  |  Branch (1515:6): [True: 708, False: 158]
  ------------------
 1516|    708|    char *url = curl_maprintf("%s://%s",
 1517|    708|                              data->set.str[STRING_DEFAULT_PROTOCOL],
 1518|    708|                              Curl_bufref_ptr(&data->state.url));
 1519|    708|    if(!url) {
  ------------------
  |  Branch (1519:8): [True: 0, False: 708]
  ------------------
 1520|      0|      result = CURLE_OUT_OF_MEMORY;
 1521|      0|      goto out;
 1522|      0|    }
 1523|    708|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 1524|    708|  }
 1525|       |
 1526|  7.59k|  if(!use_set_uh) {
  ------------------
  |  Branch (1526:6): [True: 7.59k, False: 0]
  ------------------
 1527|  7.59k|    char *newurl;
 1528|  7.59k|    uc = curl_url_set(uh, CURLUPART_URL, Curl_bufref_ptr(&data->state.url),
 1529|  7.59k|                      (unsigned int)(CURLU_GUESS_SCHEME |
  ------------------
  |  |   96|  7.59k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1530|  7.59k|                       CURLU_NON_SUPPORT_SCHEME |
  ------------------
  |  |   90|  7.59k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
 1531|  7.59k|                       (data->set.disallow_username_in_url ?
  ------------------
  |  Branch (1531:25): [True: 1, False: 7.59k]
  ------------------
 1532|  7.59k|                        CURLU_DISALLOW_USER : 0) |
  ------------------
  |  |   92|      1|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
 1533|  7.59k|                       (data->set.path_as_is ? CURLU_PATH_AS_IS : 0)));
  ------------------
  |  |   91|      2|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1533:25): [True: 2, False: 7.59k]
  ------------------
 1534|  7.59k|    if(uc) {
  ------------------
  |  Branch (1534:8): [True: 675, False: 6.92k]
  ------------------
 1535|    675|      failf(data, "URL rejected: %s", curl_url_strerror(uc));
  ------------------
  |  |   62|    675|#define failf Curl_failf
  ------------------
 1536|    675|      result = Curl_uc_to_curlcode(uc);
 1537|    675|      goto out;
 1538|    675|    }
 1539|       |
 1540|       |    /* after it was parsed, get the generated normalized version */
 1541|  6.92k|    uc = curl_url_get(uh, CURLUPART_URL, &newurl, CURLU_GET_EMPTY);
  ------------------
  |  |  102|  6.92k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 1542|  6.92k|    if(uc) {
  ------------------
  |  Branch (1542:8): [True: 0, False: 6.92k]
  ------------------
 1543|      0|      result = Curl_uc_to_curlcode(uc);
 1544|      0|      goto out;
 1545|      0|    }
 1546|  6.92k|    Curl_bufref_set(&data->state.url, newurl, 0, curl_free);
 1547|  6.92k|  }
 1548|       |
 1549|  6.92k|#ifdef USE_IPV6
 1550|  6.92k|  scope_id = data->set.scope_id;
 1551|  6.92k|#endif
 1552|       |
 1553|       |  /* `uh` is now as the connection should use it, probably. */
 1554|  6.92k|  result = Curl_peer_from_url(uh, data, port_override, scope_id,
 1555|  6.92k|                              &data->state.up, &conn->origin);
 1556|  6.92k|  if(result)
  ------------------
  |  Branch (1556:6): [True: 143, False: 6.77k]
  ------------------
 1557|    143|    goto out;
 1558|       |
 1559|  6.77k|  result = hsts_upgrade(data, conn, uh, port_override, scope_id);
 1560|  6.77k|  if(result)
  ------------------
  |  Branch (1560:6): [True: 0, False: 6.77k]
  ------------------
 1561|      0|    goto out;
 1562|       |
 1563|       |  /* now that the origin is fixed, check and set the connection scheme */
 1564|  6.77k|  result = url_set_conn_scheme(data, conn, conn->origin->scheme);
 1565|  6.77k|  if(result)
  ------------------
  |  Branch (1565:6): [True: 470, False: 6.30k]
  ------------------
 1566|    470|    goto out;
 1567|       |
 1568|       |  /* When the transfers initial_origin is not set, this is the initial
 1569|       |   * request. Remember this starting point. This is used to
 1570|       |   * select credentials. */
 1571|  6.30k|  if(!data->state.initial_origin)
  ------------------
  |  Branch (1571:6): [True: 6.21k, False: 95]
  ------------------
 1572|  6.21k|    Curl_peer_link(&data->state.initial_origin, conn->origin);
 1573|       |
 1574|  6.30k|  result = url_set_data_creds(data, conn, uh);
 1575|  6.30k|  if(result)
  ------------------
  |  Branch (1575:6): [True: 25, False: 6.28k]
  ------------------
 1576|     25|    goto out;
 1577|       |
 1578|  6.28k|  uc = curl_url_get(uh, CURLUPART_OPTIONS, &data->state.up.options,
 1579|  6.28k|                    CURLU_URLDECODE);
  ------------------
  |  |   93|  6.28k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1580|  6.28k|  if(!uc) {
  ------------------
  |  Branch (1580:6): [True: 18, False: 6.26k]
  ------------------
 1581|     18|    conn->options = curlx_strdup(data->state.up.options);
  ------------------
  |  | 1477|     18|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1582|     18|    if(!conn->options) {
  ------------------
  |  Branch (1582:8): [True: 0, False: 18]
  ------------------
 1583|      0|      result = CURLE_OUT_OF_MEMORY;
 1584|      0|      goto out;
 1585|      0|    }
 1586|     18|  }
 1587|  6.26k|  else if(uc != CURLUE_NO_OPTIONS) {
  ------------------
  |  Branch (1587:11): [True: 1, False: 6.26k]
  ------------------
 1588|      1|    result = Curl_uc_to_curlcode(uc);
 1589|      1|    goto out;
 1590|      1|  }
 1591|       |
 1592|  6.28k|  uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path, CURLU_URLENCODE);
  ------------------
  |  |   94|  6.28k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 1593|  6.28k|  if(uc) {
  ------------------
  |  Branch (1593:6): [True: 0, False: 6.28k]
  ------------------
 1594|      0|    result = Curl_uc_to_curlcode(uc);
 1595|      0|    goto out;
 1596|      0|  }
 1597|       |
 1598|  6.28k|  uc = curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query,
 1599|  6.28k|                    CURLU_GET_EMPTY);
  ------------------
  |  |  102|  6.28k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 1600|  6.28k|  if(uc && (uc != CURLUE_NO_QUERY)) {
  ------------------
  |  Branch (1600:6): [True: 5.79k, False: 489]
  |  Branch (1600:12): [True: 0, False: 5.79k]
  ------------------
 1601|      0|    result = CURLE_OUT_OF_MEMORY;
 1602|      0|    goto out;
 1603|      0|  }
 1604|       |
 1605|  6.28k|#ifdef USE_IPV6
 1606|       |  /* Fill in the conn parts that do not use authority, yet. */
 1607|  6.28k|  conn->scope_id = conn->origin->scopeid;
 1608|  6.28k|#endif
 1609|       |
 1610|  6.28k|#ifdef CURLVERBOSE
 1611|  6.28k|  Curl_creds_trace(data, data->state.creds, "transfer credentials");
 1612|  6.28k|#endif
 1613|       |
 1614|  7.59k|out:
 1615|  7.59k|  return result;
 1616|  6.28k|}
url.c:hsts_upgrade:
 1392|  6.77k|{
 1393|       |  /* HSTS upgrade */
 1394|  6.77k|  if(data->hsts && (conn->origin->scheme == &Curl_scheme_http) &&
  ------------------
  |  Branch (1394:6): [True: 6.18k, False: 593]
  |  Branch (1394:20): [True: 431, False: 5.75k]
  ------------------
 1395|    431|     Curl_hsts_applies(data->hsts, conn->origin)) {
  ------------------
  |  Branch (1395:6): [True: 0, False: 431]
  ------------------
 1396|      0|    char *url;
 1397|      0|    CURLUcode uc;
 1398|      0|    CURLcode result;
 1399|       |
 1400|      0|    curlx_safefree(data->state.up.scheme);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1401|      0|    uc = curl_url_set(uh, CURLUPART_SCHEME, "https", 0);
 1402|      0|    if(uc)
  ------------------
  |  Branch (1402:8): [True: 0, False: 0]
  ------------------
 1403|      0|      return Curl_uc_to_curlcode(uc);
 1404|      0|    Curl_bufref_free(&data->state.url);
 1405|       |    /* after update, get the updated version */
 1406|      0|    uc = curl_url_get(uh, CURLUPART_URL, &url, 0);
 1407|      0|    if(uc)
  ------------------
  |  Branch (1407:8): [True: 0, False: 0]
  ------------------
 1408|      0|      return Curl_uc_to_curlcode(uc);
 1409|      0|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 1410|       |
 1411|      0|    result = Curl_peer_from_url(uh, data, port_override, scope_id,
 1412|      0|                                &data->state.up, &conn->origin);
 1413|      0|    if(result)
  ------------------
  |  Branch (1413:8): [True: 0, False: 0]
  ------------------
 1414|      0|      return result;
 1415|      0|    infof(data, "Switched from HTTP to HTTPS due to HSTS => %s", url);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1416|      0|  }
 1417|  6.77k|  return CURLE_OK;
 1418|  6.77k|}
url.c:url_set_conn_scheme:
 1353|  6.77k|{
 1354|       |  /* URL scheme is usable for connection when it is
 1355|       |   * - allowed
 1356|       |   * - not from a redirect or an allowed redirect protocol */
 1357|  6.77k|  if(scheme->run &&
  ------------------
  |  Branch (1357:6): [True: 6.77k, False: 0]
  ------------------
 1358|  6.77k|     (data->set.allowed_protocols & scheme->protocol) &&
  ------------------
  |  Branch (1358:6): [True: 6.30k, False: 470]
  ------------------
 1359|  6.30k|     (!data->state.this_is_a_follow ||
  ------------------
  |  Branch (1359:7): [True: 6.30k, False: 0]
  ------------------
 1360|  6.30k|       (data->set.redir_protocols & scheme->protocol))) {
  ------------------
  |  Branch (1360:8): [True: 0, False: 0]
  ------------------
 1361|  6.30k|    conn->scheme = conn->given = scheme;
 1362|  6.30k|    return CURLE_OK;
 1363|  6.30k|  }
 1364|    470|  if(scheme->flags & PROTOPT_NO_TRANSFER)
  ------------------
  |  |  239|    470|#define PROTOPT_NO_TRANSFER (1 << 17) /* this protocol is not for transfers */
  ------------------
  |  Branch (1364:6): [True: 0, False: 470]
  ------------------
 1365|      0|    failf(data, "Protocol \"%s\" is not for transfers", scheme->name);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1366|    470|  else
 1367|    470|    failf(data, "Protocol \"%s\" is disabled%s", scheme->name,
  ------------------
  |  |   62|    470|#define failf Curl_failf
  ------------------
 1368|    470|          data->state.this_is_a_follow ? " (in redirect)" : "");
  ------------------
  |  Branch (1368:11): [True: 0, False: 470]
  ------------------
 1369|    470|  return CURLE_UNSUPPORTED_PROTOCOL;
 1370|  6.77k|}
url.c:url_set_data_creds:
 1426|  6.30k|{
 1427|  6.30k|  CURLcode result = CURLE_OK;
 1428|       |
 1429|       |  /* We reset any existing credentials on the transfer. Then
 1430|       |   * set the CURLOPT_* credentials ONLY IF the origin is the initial one. */
 1431|  6.30k|  Curl_creds_unlink(&data->state.creds);
 1432|  6.30k|  if((data->set.str[STRING_USERNAME] ||
  ------------------
  |  Branch (1432:7): [True: 165, False: 6.14k]
  ------------------
 1433|  6.14k|      data->set.str[STRING_PASSWORD] ||
  ------------------
  |  Branch (1433:7): [True: 29, False: 6.11k]
  ------------------
 1434|  6.11k|      data->set.str[STRING_BEARER] ||
  ------------------
  |  Branch (1434:7): [True: 27, False: 6.08k]
  ------------------
 1435|  6.08k|      data->set.str[STRING_SASL_AUTHZID] ||
  ------------------
  |  Branch (1435:7): [True: 7, False: 6.08k]
  ------------------
 1436|  6.08k|      data->set.str[STRING_SERVICE_NAME]) &&
  ------------------
  |  Branch (1436:7): [True: 22, False: 6.05k]
  ------------------
 1437|    250|     Curl_auth_allowed_to_origin(data, conn->origin)) {
  ------------------
  |  Branch (1437:6): [True: 250, False: 0]
  ------------------
 1438|    250|    result = Curl_creds_create(data->set.str[STRING_USERNAME],
 1439|    250|                               data->set.str[STRING_PASSWORD],
 1440|    250|                               data->set.str[STRING_BEARER],
 1441|    250|                               data->set.str[STRING_SASL_AUTHZID],
 1442|    250|                               data->set.str[STRING_SERVICE_NAME],
 1443|    250|                               CREDS_OPTION, &data->state.creds);
  ------------------
  |  |   31|    250|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
 1444|    250|    if(result)
  ------------------
  |  Branch (1444:8): [True: 0, False: 250]
  ------------------
 1445|      0|      return result;
 1446|    250|  }
 1447|       |
 1448|       |  /* Extract credentials from the URL only if there are none OR
 1449|       |   * if no CURLOPT_USER was set. */
 1450|  6.30k|  if(!data->state.creds || !Curl_creds_has_user(data->state.creds)) {
  ------------------
  |  |   71|    192|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (71:43): [True: 192, False: 0]
  |  |  |  Branch (71:50): [True: 157, False: 35]
  |  |  ------------------
  ------------------
  |  Branch (1450:6): [True: 6.11k, False: 192]
  ------------------
 1451|  6.15k|    char *udecoded = NULL;
 1452|  6.15k|    char *pdecoded = NULL;
 1453|  6.15k|    CURLUcode uc;
 1454|       |
 1455|  6.15k|    uc = curl_url_get(uh, CURLUPART_USER, &data->state.up.user, 0);
 1456|  6.15k|    if(uc && (uc != CURLUE_NO_USER)) {
  ------------------
  |  Branch (1456:8): [True: 5.16k, False: 983]
  |  Branch (1456:14): [True: 0, False: 5.16k]
  ------------------
 1457|      0|      result = Curl_uc_to_curlcode(uc);
 1458|      0|      goto out;
 1459|      0|    }
 1460|  6.15k|    uc = curl_url_get(uh, CURLUPART_PASSWORD, &data->state.up.password, 0);
 1461|  6.15k|    if(uc && (uc != CURLUE_NO_PASSWORD)) {
  ------------------
  |  Branch (1461:8): [True: 5.94k, False: 207]
  |  Branch (1461:14): [True: 0, False: 5.94k]
  ------------------
 1462|      0|      result = Curl_uc_to_curlcode(uc);
 1463|      0|      goto out;
 1464|      0|    }
 1465|  6.15k|    if(data->state.up.user) {
  ------------------
  |  Branch (1465:8): [True: 983, False: 5.16k]
  ------------------
 1466|    983|      result = Curl_urldecode(data->state.up.user, 0, &udecoded, NULL,
 1467|    983|                              conn->scheme->flags&PROTOPT_USERPWDCTRL ?
  ------------------
  |  |  232|    983|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1467:31): [True: 159, False: 824]
  ------------------
 1468|    824|                              REJECT_ZERO : REJECT_CTRL);
 1469|    983|    }
 1470|  6.15k|    if(!result && data->state.up.password) {
  ------------------
  |  Branch (1470:8): [True: 6.12k, False: 25]
  |  Branch (1470:19): [True: 203, False: 5.92k]
  ------------------
 1471|    203|      result = Curl_urldecode(data->state.up.password, 0, &pdecoded, NULL,
 1472|    203|                              conn->scheme->flags&PROTOPT_USERPWDCTRL ?
  ------------------
  |  |  232|    203|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1472:31): [True: 29, False: 174]
  ------------------
 1473|    174|                              REJECT_ZERO : REJECT_CTRL);
 1474|    203|    }
 1475|  6.15k|    if(!result)
  ------------------
  |  Branch (1475:8): [True: 6.12k, False: 25]
  ------------------
 1476|  6.12k|      result = Curl_creds_merge(udecoded, pdecoded, data->state.creds,
 1477|  6.12k|                                CREDS_URL, &data->state.creds);
  ------------------
  |  |   30|  6.12k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
 1478|  6.15k|out:
 1479|  6.15k|    curlx_free(udecoded);
  ------------------
  |  | 1483|  6.15k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1480|  6.15k|    curlx_free(pdecoded);
  ------------------
  |  | 1483|  6.15k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1481|  6.15k|    if(result)
  ------------------
  |  Branch (1481:8): [True: 25, False: 6.12k]
  ------------------
 1482|     25|      failf(data, "error extracting credentials from URL");
  ------------------
  |  |   62|     25|#define failf Curl_failf
  ------------------
 1483|  6.15k|  }
 1484|  6.30k|  return result;
 1485|  6.30k|}
url.c:url_set_conn_peer:
 2387|  6.26k|{
 2388|  6.26k|  CURLcode result = CURLE_OK;
 2389|  6.26k|  const struct Curl_peer *origin = conn->origin;
 2390|  6.26k|  struct Curl_peer *via_peer = NULL;
 2391|  6.26k|  struct curl_slist *conn_to_entry = data->set.connect_to;
 2392|       |
 2393|  6.26k|  DEBUGASSERT(!conn->via_peer);
  ------------------
  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2393:3): [True: 0, False: 6.26k]
  |  Branch (2393:3): [True: 6.26k, False: 0]
  ------------------
 2394|  6.26k|  Curl_peer_unlink(&conn->via_peer);
 2395|       |
 2396|  11.9k|  while(conn_to_entry && !via_peer) {
  ------------------
  |  Branch (2396:9): [True: 5.71k, False: 6.26k]
  |  Branch (2396:26): [True: 5.71k, False: 0]
  ------------------
 2397|  5.71k|    result = parse_connect_to_string(data, origin, conn_to_entry->data,
 2398|  5.71k|                                     &via_peer);
 2399|  5.71k|    if(result)
  ------------------
  |  Branch (2399:8): [True: 0, False: 5.71k]
  ------------------
 2400|      0|      return result;
 2401|  5.71k|    conn_to_entry = conn_to_entry->next;
 2402|  5.71k|  }
 2403|       |
 2404|  6.26k|#ifndef CURL_DISABLE_ALTSVC
 2405|  6.26k|  if(data->asi && !via_peer &&
  ------------------
  |  Branch (2405:6): [True: 5.71k, False: 558]
  |  Branch (2405:19): [True: 0, False: 5.71k]
  ------------------
 2406|      0|     ((conn->scheme->protocol == CURLPROTO_HTTPS) ||
  ------------------
  |  | 1079|      0|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (2406:7): [True: 0, False: 0]
  ------------------
 2407|      0|#ifdef DEBUGBUILD
 2408|       |      /* allow debug builds to circumvent the HTTPS restriction */
 2409|      0|      getenv("CURL_ALTSVC_HTTP")
  ------------------
  |  Branch (2409:7): [True: 0, False: 0]
  ------------------
 2410|       |#else
 2411|       |      0
 2412|       |#endif
 2413|      0|       )) {
 2414|       |    /* no connect_to match, try alt-svc! */
 2415|      0|    enum alpnid srcalpnid = ALPN_none;
 2416|      0|    bool hit = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2417|      0|    struct altsvc *as = NULL;
 2418|      0|    int allowed_alpns = ALPN_none;
 2419|      0|    struct http_negotiation *neg = &data->state.http_neg;
 2420|      0|    bool same_dest = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2421|       |
 2422|      0|    DEBUGF(infof(data, "Alt-svc check wanted=%x, allowed=%x",
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2423|      0|                 neg->wanted, neg->allowed));
 2424|       |#ifdef USE_HTTP3
 2425|       |    if(neg->allowed & CURL_HTTP_V3x)
 2426|       |      allowed_alpns |= ALPN_h3;
 2427|       |#endif
 2428|      0|#ifdef USE_HTTP2
 2429|      0|    if(neg->allowed & CURL_HTTP_V2x)
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (2429:8): [True: 0, False: 0]
  ------------------
 2430|      0|      allowed_alpns |= ALPN_h2;
 2431|      0|#endif
 2432|      0|    if(neg->allowed & CURL_HTTP_V1x)
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (2432:8): [True: 0, False: 0]
  ------------------
 2433|      0|      allowed_alpns |= ALPN_h1;
 2434|      0|    allowed_alpns &= (int)data->asi->flags;
 2435|       |
 2436|      0|    DEBUGF(infof(data, "check Alt-Svc for host '%s'", origin->hostname));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2437|       |#ifdef USE_HTTP3
 2438|       |    if(!hit && (neg->wanted & CURL_HTTP_V3x)) {
 2439|       |      srcalpnid = ALPN_h3;
 2440|       |      hit = Curl_altsvc_lookup(data->asi,
 2441|       |                               ALPN_h3, origin->hostname,
 2442|       |                               origin->port, /* from */
 2443|       |                               &as /* to */,
 2444|       |                               allowed_alpns, &same_dest);
 2445|       |    }
 2446|       |#endif
 2447|      0|#ifdef USE_HTTP2
 2448|      0|    if(!hit && (neg->wanted & CURL_HTTP_V2x) &&
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (2448:8): [True: 0, False: 0]
  |  Branch (2448:16): [True: 0, False: 0]
  ------------------
 2449|      0|       !neg->h2_prior_knowledge) {
  ------------------
  |  Branch (2449:8): [True: 0, False: 0]
  ------------------
 2450|      0|      srcalpnid = ALPN_h2;
 2451|      0|      hit = Curl_altsvc_lookup(data->asi,
 2452|      0|                               ALPN_h2, origin->hostname,
 2453|      0|                               origin->port, /* from */
 2454|      0|                               &as /* to */,
 2455|      0|                               allowed_alpns, &same_dest);
 2456|      0|    }
 2457|      0|#endif
 2458|      0|    if(!hit && (neg->wanted & CURL_HTTP_V1x) &&
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (2458:8): [True: 0, False: 0]
  |  Branch (2458:16): [True: 0, False: 0]
  ------------------
 2459|      0|       !neg->only_10) {
  ------------------
  |  Branch (2459:8): [True: 0, False: 0]
  ------------------
 2460|      0|      srcalpnid = ALPN_h1;
 2461|      0|      hit = Curl_altsvc_lookup(data->asi,
 2462|      0|                               ALPN_h1, origin->hostname,
 2463|      0|                               origin->port, /* from */
 2464|      0|                               &as /* to */,
 2465|      0|                               allowed_alpns, &same_dest);
 2466|      0|    }
 2467|       |
 2468|      0|    if(hit && same_dest) {
  ------------------
  |  Branch (2468:8): [True: 0, False: 0]
  |  Branch (2468:15): [True: 0, False: 0]
  ------------------
 2469|       |      /* same destination, but more HTTPS version options */
 2470|      0|      switch(as->dst.alpnid) {
 2471|      0|      case ALPN_h1:
  ------------------
  |  Branch (2471:7): [True: 0, False: 0]
  ------------------
 2472|      0|        neg->wanted |= CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2473|      0|        neg->preferred = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2474|      0|        break;
 2475|      0|      case ALPN_h2:
  ------------------
  |  Branch (2475:7): [True: 0, False: 0]
  ------------------
 2476|      0|        neg->wanted |= CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 2477|      0|        neg->preferred = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 2478|      0|        break;
 2479|      0|      case ALPN_h3:
  ------------------
  |  Branch (2479:7): [True: 0, False: 0]
  ------------------
 2480|      0|        neg->wanted |= CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 2481|      0|        neg->preferred = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 2482|      0|        break;
 2483|      0|      default: /* should not be possible */
  ------------------
  |  Branch (2483:7): [True: 0, False: 0]
  ------------------
 2484|      0|        break;
 2485|      0|      }
 2486|      0|    }
 2487|      0|    else if(hit) {
  ------------------
  |  Branch (2487:13): [True: 0, False: 0]
  ------------------
 2488|      0|      result = Curl_peer_create(data, conn->origin->scheme,
 2489|      0|                                as->dst.host, as->dst.port,
 2490|      0|                                &via_peer);
 2491|      0|      if(result)
  ------------------
  |  Branch (2491:10): [True: 0, False: 0]
  ------------------
 2492|      0|        return result;
 2493|      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))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2494|      0|            Curl_alpnid2str(srcalpnid), origin->hostname, origin->port,
 2495|      0|            Curl_alpnid2str(as->dst.alpnid),
 2496|      0|            via_peer->hostname, via_peer->port);
 2497|      0|      conn->bits.altused = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2498|      0|      if(srcalpnid != as->dst.alpnid) {
  ------------------
  |  Branch (2498:10): [True: 0, False: 0]
  ------------------
 2499|       |        /* protocol version switch */
 2500|      0|        switch(as->dst.alpnid) {
 2501|      0|        case ALPN_h1:
  ------------------
  |  Branch (2501:9): [True: 0, False: 0]
  ------------------
 2502|      0|          neg->wanted = neg->allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2503|      0|          neg->only_10 = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2504|      0|          break;
 2505|      0|        case ALPN_h2:
  ------------------
  |  Branch (2505:9): [True: 0, False: 0]
  ------------------
 2506|      0|          neg->wanted = neg->allowed = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 2507|      0|          break;
 2508|      0|        case ALPN_h3:
  ------------------
  |  Branch (2508:9): [True: 0, False: 0]
  ------------------
 2509|      0|          conn->transport_wanted = TRNSPRT_QUIC;
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
 2510|      0|          neg->wanted = neg->allowed = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 2511|      0|          break;
 2512|      0|        default: /* should not be possible */
  ------------------
  |  Branch (2512:9): [True: 0, False: 0]
  ------------------
 2513|      0|          break;
 2514|      0|        }
 2515|      0|      }
 2516|      0|    }
 2517|      0|  }
 2518|  6.26k|#endif
 2519|       |
 2520|  6.26k|  if(via_peer)
  ------------------
  |  Branch (2520:6): [True: 5.71k, False: 558]
  ------------------
 2521|  5.71k|    conn->via_peer = via_peer;
 2522|       |
 2523|  6.26k|  return result;
 2524|  6.26k|}
url.c:parse_connect_to_string:
 2329|  5.71k|{
 2330|  5.71k|  CURLcode result = CURLE_OK;
 2331|  5.71k|  const char *ptr = conn_to_line;
 2332|  5.71k|  bool host_match = FALSE;
  ------------------
  |  | 1058|  5.71k|#define FALSE false
  ------------------
 2333|  5.71k|  bool port_match = FALSE;
  ------------------
  |  | 1058|  5.71k|#define FALSE false
  ------------------
 2334|       |
 2335|  5.71k|  *pvia_dest = NULL;
 2336|       |
 2337|  5.71k|  if(*ptr == ':') {
  ------------------
  |  Branch (2337:6): [True: 5.71k, False: 0]
  ------------------
 2338|       |    /* an empty hostname always matches */
 2339|  5.71k|    host_match = TRUE;
  ------------------
  |  | 1055|  5.71k|#define TRUE true
  ------------------
 2340|  5.71k|    ptr++;
 2341|  5.71k|  }
 2342|      0|  else {
 2343|       |    /* check whether the URL's hostname matches. Use the URL hostname
 2344|       |     * when it was an IPv6 address. Otherwise use the connection's hostname
 2345|       |     * that has IDN conversion. */
 2346|      0|    const char *hostname_to_match = (dest->user_hostname[0] == '[') ?
  ------------------
  |  Branch (2346:37): [True: 0, False: 0]
  ------------------
 2347|      0|      dest->user_hostname : dest->hostname;
 2348|      0|    size_t hlen = strlen(hostname_to_match);
 2349|      0|    host_match = curl_strnequal(ptr, hostname_to_match, hlen);
 2350|      0|    ptr += hlen;
 2351|       |
 2352|      0|    host_match = host_match && *ptr == ':';
  ------------------
  |  Branch (2352:18): [True: 0, False: 0]
  |  Branch (2352:32): [True: 0, False: 0]
  ------------------
 2353|      0|    ptr++;
 2354|      0|  }
 2355|       |
 2356|  5.71k|  if(host_match) {
  ------------------
  |  Branch (2356:6): [True: 5.71k, False: 0]
  ------------------
 2357|  5.71k|    if(*ptr == ':') {
  ------------------
  |  Branch (2357:8): [True: 5.71k, False: 0]
  ------------------
 2358|       |      /* an empty port always matches */
 2359|  5.71k|      port_match = TRUE;
  ------------------
  |  | 1055|  5.71k|#define TRUE true
  ------------------
 2360|  5.71k|      ptr++;
 2361|  5.71k|    }
 2362|      0|    else {
 2363|       |      /* check whether the URL's port matches */
 2364|      0|      const char *ptr_next = strchr(ptr, ':');
 2365|      0|      if(ptr_next) {
  ------------------
  |  Branch (2365:10): [True: 0, False: 0]
  ------------------
 2366|      0|        curl_off_t port_to_match;
 2367|      0|        if(!curlx_str_number(&ptr, &port_to_match, 0xffff) &&
  ------------------
  |  Branch (2367:12): [True: 0, False: 0]
  ------------------
 2368|      0|           ((uint16_t)port_to_match == dest->port)) {
  ------------------
  |  Branch (2368:12): [True: 0, False: 0]
  ------------------
 2369|      0|          port_match = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2370|      0|        }
 2371|      0|        ptr = ptr_next + 1;
 2372|      0|      }
 2373|      0|    }
 2374|  5.71k|  }
 2375|       |
 2376|  5.71k|  if(host_match && port_match && ptr && *ptr)
  ------------------
  |  Branch (2376:6): [True: 5.71k, False: 0]
  |  Branch (2376:20): [True: 5.71k, False: 0]
  |  Branch (2376:34): [True: 5.71k, False: 0]
  |  Branch (2376:41): [True: 5.71k, False: 0]
  ------------------
 2377|  5.71k|    result = Curl_peer_from_connect_to(data, dest, ptr, pvia_dest);
 2378|       |
 2379|  5.71k|  return result;
 2380|  5.71k|}
url.c:url_set_conn_proxies:
 1913|  6.26k|{
 1914|  6.26k|  char *proxy = NULL;
 1915|  6.26k|  char *pre_proxy = NULL;
 1916|  6.26k|  char *no_proxy = NULL;
 1917|  6.26k|  CURLcode result = CURLE_OK;
 1918|       |
 1919|       |  /*************************************************************
 1920|       |   * Detect what (if any) proxy to use
 1921|       |   *************************************************************/
 1922|  6.26k|  if(data->set.str[STRING_PROXY]) {
  ------------------
  |  Branch (1922:6): [True: 1.38k, False: 4.88k]
  ------------------
 1923|  1.38k|    proxy = curlx_strdup(data->set.str[STRING_PROXY]);
  ------------------
  |  | 1477|  1.38k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1924|       |    /* if global proxy is set, this is it */
 1925|  1.38k|    if(!proxy) {
  ------------------
  |  Branch (1925:8): [True: 0, False: 1.38k]
  ------------------
 1926|      0|      failf(data, "memory shortage");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1927|      0|      result = CURLE_OUT_OF_MEMORY;
 1928|      0|      goto out;
 1929|      0|    }
 1930|  1.38k|  }
 1931|       |
 1932|  6.26k|  if(data->set.str[STRING_PRE_PROXY]) {
  ------------------
  |  Branch (1932:6): [True: 495, False: 5.77k]
  ------------------
 1933|    495|    pre_proxy = curlx_strdup(data->set.str[STRING_PRE_PROXY]);
  ------------------
  |  | 1477|    495|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1934|       |    /* if global socks proxy is set, this is it */
 1935|    495|    if(!pre_proxy) {
  ------------------
  |  Branch (1935:8): [True: 0, False: 495]
  ------------------
 1936|      0|      failf(data, "memory shortage");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1937|      0|      result = CURLE_OUT_OF_MEMORY;
 1938|      0|      goto out;
 1939|      0|    }
 1940|    495|  }
 1941|       |
 1942|  6.26k|  if(!data->set.str[STRING_NOPROXY]) {
  ------------------
  |  Branch (1942:6): [True: 6.12k, False: 145]
  ------------------
 1943|  6.12k|    const char *p = "no_proxy";
 1944|  6.12k|    no_proxy = curl_getenv(p);
 1945|  6.12k|    if(!no_proxy) {
  ------------------
  |  Branch (1945:8): [True: 6.12k, False: 0]
  ------------------
 1946|  6.12k|      p = "NO_PROXY";
 1947|  6.12k|      no_proxy = curl_getenv(p);
 1948|  6.12k|    }
 1949|  6.12k|    if(no_proxy) {
  ------------------
  |  Branch (1949:8): [True: 0, False: 6.12k]
  ------------------
 1950|      0|      infof(data, "Uses proxy env variable %s == '%s'", p, no_proxy);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1951|      0|    }
 1952|  6.12k|  }
 1953|       |
 1954|  6.26k|  if(Curl_check_noproxy(conn->origin->hostname, data->set.str[STRING_NOPROXY] ?
  ------------------
  |  Branch (1954:6): [True: 3, False: 6.26k]
  |  Branch (1954:49): [True: 145, False: 6.12k]
  ------------------
 1955|  6.12k|                        data->set.str[STRING_NOPROXY] : no_proxy)) {
 1956|      3|    curlx_safefree(proxy);
  ------------------
  |  | 1327|      3|  do {                      \
  |  | 1328|      3|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      3|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      3|    (ptr) = NULL;           \
  |  | 1330|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
 1957|      3|    curlx_safefree(pre_proxy);
  ------------------
  |  | 1327|      3|  do {                      \
  |  | 1328|      3|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      3|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      3|    (ptr) = NULL;           \
  |  | 1330|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
 1958|      3|  }
 1959|  6.26k|#ifndef CURL_DISABLE_HTTP
 1960|  6.26k|  else if(!proxy && !pre_proxy)
  ------------------
  |  Branch (1960:11): [True: 4.88k, False: 1.38k]
  |  Branch (1960:21): [True: 4.45k, False: 428]
  ------------------
 1961|       |    /* if the host is not in the noproxy list, detect proxy. */
 1962|  4.45k|    proxy = url_detect_proxy(data, conn);
 1963|  6.26k|#endif /* CURL_DISABLE_HTTP */
 1964|  6.26k|  curlx_safefree(no_proxy);
  ------------------
  |  | 1327|  6.26k|  do {                      \
  |  | 1328|  6.26k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  6.26k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  6.26k|    (ptr) = NULL;           \
  |  | 1330|  6.26k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
 1965|       |
 1966|  6.26k|  if(proxy && (!*proxy || (conn->scheme->flags & PROTOPT_NONETWORK))) {
  ------------------
  |  |  215|  1.38k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (1966:6): [True: 1.38k, False: 4.88k]
  |  Branch (1966:16): [True: 1, False: 1.38k]
  |  Branch (1966:27): [True: 0, False: 1.38k]
  ------------------
 1967|      1|    curlx_safefree(proxy);  /* Do not bother with an empty proxy string
  ------------------
  |  | 1327|      1|  do {                      \
  |  | 1328|      1|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      1|    (ptr) = NULL;           \
  |  | 1330|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1968|       |                               or if the protocol does not work with network */
 1969|      1|  }
 1970|  6.26k|  if(pre_proxy && (!*pre_proxy ||
  ------------------
  |  Branch (1970:6): [True: 495, False: 5.77k]
  |  Branch (1970:20): [True: 1, False: 494]
  ------------------
 1971|    494|                    (conn->scheme->flags & PROTOPT_NONETWORK))) {
  ------------------
  |  |  215|    494|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (1971:21): [True: 0, False: 494]
  ------------------
 1972|      1|    curlx_safefree(pre_proxy);  /* Do not bother with an empty socks proxy
  ------------------
  |  | 1327|      1|  do {                      \
  |  | 1328|      1|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      1|    (ptr) = NULL;           \
  |  | 1330|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1973|       |                                   string or if the protocol does not work
 1974|       |                                   with network */
 1975|      1|  }
 1976|       |
 1977|       |  /***********************************************************************
 1978|       |   * If this is supposed to use a proxy, we need to figure out the proxy host
 1979|       |   * name, proxy type and port number, so that we can reuse an existing
 1980|       |   * connection that may exist registered to the same proxy host.
 1981|       |   ***********************************************************************/
 1982|  6.26k|  if(proxy || pre_proxy) {
  ------------------
  |  Branch (1982:6): [True: 1.38k, False: 4.88k]
  |  Branch (1982:15): [True: 427, False: 4.45k]
  ------------------
 1983|  1.81k|    if(pre_proxy) {
  ------------------
  |  Branch (1983:8): [True: 494, False: 1.31k]
  ------------------
 1984|    494|      result = parse_proxy(data, pre_proxy, TRUE, &conn->socks_proxy);
  ------------------
  |  | 1055|    494|#define TRUE true
  ------------------
 1985|    494|      if(result)
  ------------------
  |  Branch (1985:10): [True: 10, False: 484]
  ------------------
 1986|     10|        goto out;
 1987|    494|    }
 1988|       |
 1989|  1.80k|    if(proxy) {
  ------------------
  |  Branch (1989:8): [True: 1.38k, False: 418]
  ------------------
 1990|  1.38k|      result = parse_proxy(data, proxy, FALSE, &conn->http_proxy);
  ------------------
  |  | 1058|  1.38k|#define FALSE false
  ------------------
 1991|  1.38k|      if(result)
  ------------------
  |  Branch (1991:10): [True: 3, False: 1.38k]
  ------------------
 1992|      3|        goto out;
 1993|  1.38k|      switch(conn->http_proxy.proxytype) {
 1994|      8|      case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|      8|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1994:7): [True: 8, False: 1.37k]
  ------------------
 1995|     11|      case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|     11|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1995:7): [True: 3, False: 1.37k]
  ------------------
 1996|     27|      case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     27|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1996:7): [True: 16, False: 1.36k]
  ------------------
 1997|     34|      case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     34|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1997:7): [True: 7, False: 1.37k]
  ------------------
 1998|       |        /* Whoops, it's not a HTTP proxy */
 1999|     34|        if(conn->socks_proxy.peer) {
  ------------------
  |  Branch (1999:12): [True: 1, False: 33]
  ------------------
 2000|       |          /* and we already have a SOCKS pre-proxy. Cannot have both */
 2001|      1|          failf(data, "Having a SOCKS pre-proxy and proxy is not "
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 2002|      1|                "supported with \'%s\'", proxy);
 2003|      1|          result = CURLE_COULDNT_RESOLVE_PROXY;
 2004|      1|          goto out;
 2005|      1|        }
 2006|       |        /* switch */
 2007|     33|        conn->socks_proxy = conn->http_proxy;
 2008|     33|        memset(&conn->http_proxy, 0, sizeof(conn->http_proxy));
 2009|     33|        break;
 2010|  1.34k|      default:
  ------------------
  |  Branch (2010:7): [True: 1.34k, False: 34]
  ------------------
 2011|  1.34k|        break;
 2012|  1.38k|      }
 2013|  1.38k|    }
 2014|       |
 2015|  1.79k|    if(conn->http_proxy.peer) {
  ------------------
  |  Branch (2015:8): [True: 1.34k, False: 451]
  ------------------
 2016|       |#ifdef CURL_DISABLE_HTTP
 2017|       |      /* asking for an HTTP proxy is a bit funny when HTTP is disabled... */
 2018|       |      result = CURLE_UNSUPPORTED_PROTOCOL;
 2019|       |      goto out;
 2020|       |#else
 2021|  1.34k|#ifndef CURL_DISABLE_DIGEST_AUTH
 2022|  1.34k|      if(!Curl_safecmp(data->state.envproxy, proxy)) {
  ------------------
  |  Branch (2022:10): [True: 1.34k, False: 0]
  ------------------
 2023|       |        /* proxy changed */
 2024|  1.34k|        Curl_auth_digest_cleanup(&data->state.proxydigest);
 2025|  1.34k|        curlx_free(data->state.envproxy);
  ------------------
  |  | 1483|  1.34k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2026|  1.34k|        data->state.envproxy = curlx_strdup(proxy);
  ------------------
  |  | 1477|  1.34k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 2027|  1.34k|      }
 2028|  1.34k|#endif
 2029|  1.34k|      if(conn->scheme->flags & PROTOPT_HTTP_PROXY_TUNNEL) {
  ------------------
  |  |  240|  1.34k|#define PROTOPT_HTTP_PROXY_TUNNEL (1 << 18) /* Using this protocol with a
  ------------------
  |  Branch (2029:10): [True: 0, False: 1.34k]
  ------------------
 2030|      0|        conn->bits.tunnel_proxy = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2031|      0|      }
 2032|  1.34k|      else if(!(conn->scheme->protocol & PROTO_FAMILY_HTTP)) {
  ------------------
  |  |   84|  1.34k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  1.34k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  1.34k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  1.34k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  1.34k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  1.34k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (2032:15): [True: 1.34k, False: 0]
  ------------------
 2033|       |        /* force this connection's protocol to become HTTP if compatible */
 2034|  1.34k|        if((conn->scheme->flags & PROTOPT_PROXY_AS_HTTP) &&
  ------------------
  |  |  227|  1.34k|#define PROTOPT_PROXY_AS_HTTP (1 << 11) /* allow this non-HTTP scheme over a
  ------------------
  |  Branch (2034:12): [True: 0, False: 1.34k]
  ------------------
 2035|      0|           !conn->bits.tunnel_proxy)
  ------------------
  |  Branch (2035:12): [True: 0, False: 0]
  ------------------
 2036|      0|          conn->scheme = &Curl_scheme_http;
 2037|  1.34k|        else
 2038|       |          /* if not converting to HTTP over the proxy, enforce tunneling */
 2039|  1.34k|          conn->bits.tunnel_proxy = TRUE;
  ------------------
  |  | 1055|  1.34k|#define TRUE true
  ------------------
 2040|  1.34k|      }
 2041|  1.34k|#endif
 2042|  1.34k|    }
 2043|    451|    else
 2044|    451|      conn->bits.tunnel_proxy = FALSE; /* no tunneling if not HTTP */
  ------------------
  |  | 1058|    451|#define FALSE false
  ------------------
 2045|  1.79k|  }
 2046|       |
 2047|  6.25k|  conn->bits.socksproxy = !!conn->socks_proxy.peer;
 2048|  6.25k|  conn->bits.httpproxy = !!conn->http_proxy.peer;
 2049|  6.25k|  conn->bits.proxy = conn->bits.httpproxy || conn->bits.socksproxy;
  ------------------
  |  Branch (2049:22): [True: 1.34k, False: 4.90k]
  |  Branch (2049:46): [True: 451, False: 4.45k]
  ------------------
 2050|       |
 2051|  6.25k|  if(!conn->bits.proxy) {
  ------------------
  |  Branch (2051:6): [True: 4.45k, False: 1.79k]
  ------------------
 2052|       |    /* we are not using the proxy after all... */
 2053|  4.45k|    conn->bits.proxy = FALSE;
  ------------------
  |  | 1058|  4.45k|#define FALSE false
  ------------------
 2054|  4.45k|    conn->bits.httpproxy = FALSE;
  ------------------
  |  | 1058|  4.45k|#define FALSE false
  ------------------
 2055|  4.45k|    conn->bits.socksproxy = FALSE;
  ------------------
  |  | 1058|  4.45k|#define FALSE false
  ------------------
 2056|  4.45k|    conn->bits.tunnel_proxy = FALSE;
  ------------------
  |  | 1058|  4.45k|#define FALSE false
  ------------------
 2057|       |    /* CURLPROXY_HTTPS does not have its own flag in conn->bits, yet we need
 2058|       |       to signal that CURLPROXY_HTTPS is not used for this connection */
 2059|  4.45k|    conn->http_proxy.proxytype = CURLPROXY_HTTP;
  ------------------
  |  |  790|  4.45k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
 2060|  4.45k|  }
 2061|       |
 2062|  6.26k|out:
 2063|       |
 2064|  6.26k|  curlx_free(pre_proxy);
  ------------------
  |  | 1483|  6.26k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2065|  6.26k|  curlx_free(proxy);
  ------------------
  |  | 1483|  6.26k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2066|  6.26k|  return result;
 2067|  6.25k|}
url.c:url_detect_proxy:
 1707|  4.45k|{
 1708|  4.45k|  char *proxy = NULL;
 1709|       |
 1710|       |  /* If proxy was not specified, we check for default proxy environment
 1711|       |   * variables, to enable i.e Lynx compliance:
 1712|       |   *
 1713|       |   * http_proxy=http://some.server.dom:port/
 1714|       |   * https_proxy=http://some.server.dom:port/
 1715|       |   * ftp_proxy=http://some.server.dom:port/
 1716|       |   * no_proxy=domain1.dom,host.domain2.dom
 1717|       |   *   (a comma-separated list of hosts which should
 1718|       |   *   not be proxied, or an asterisk to override
 1719|       |   *   all proxy variables)
 1720|       |   * all_proxy=http://some.server.dom:port/
 1721|       |   *   (seems to exist for the CERN www lib. Probably
 1722|       |   *   the first to check for.)
 1723|       |   *
 1724|       |   * For compatibility, the all-uppercase versions of these variables are
 1725|       |   * checked if the lowercase versions do not exist.
 1726|       |   */
 1727|  4.45k|  char proxy_env[20];
 1728|  4.45k|  const char *envp;
 1729|  4.45k|  VERBOSE(envp = proxy_env);
  ------------------
  |  | 1618|  4.45k|#define VERBOSE(x) x
  ------------------
 1730|       |
 1731|  4.45k|  curl_msnprintf(proxy_env, sizeof(proxy_env), "%s_proxy",
 1732|  4.45k|                 conn->scheme->name);
 1733|       |
 1734|       |  /* read the protocol proxy: */
 1735|  4.45k|  proxy = curl_getenv(proxy_env);
 1736|       |
 1737|       |  /*
 1738|       |   * We do not try the uppercase version of HTTP_PROXY because of
 1739|       |   * security reasons:
 1740|       |   *
 1741|       |   * When curl is used in a webserver application
 1742|       |   * environment (cgi or php), this environment variable can
 1743|       |   * be controlled by the web server user by setting the
 1744|       |   * http header 'Proxy:' to some value.
 1745|       |   *
 1746|       |   * This can cause 'internal' http/ftp requests to be
 1747|       |   * arbitrarily redirected by any external attacker.
 1748|       |   */
 1749|  4.45k|  if(!proxy && !curl_strequal("http_proxy", proxy_env)) {
  ------------------
  |  Branch (1749:6): [True: 4.45k, False: 0]
  |  Branch (1749:16): [True: 4.44k, False: 7]
  ------------------
 1750|       |    /* There was no lowercase variable, try the uppercase version: */
 1751|  4.44k|    Curl_strntoupper(proxy_env, proxy_env, sizeof(proxy_env));
 1752|  4.44k|    proxy = curl_getenv(proxy_env);
 1753|  4.44k|  }
 1754|       |
 1755|  4.45k|  if(!proxy) {
  ------------------
  |  Branch (1755:6): [True: 4.45k, False: 0]
  ------------------
 1756|  4.45k|#ifndef CURL_DISABLE_WEBSOCKETS
 1757|       |    /* websocket proxy fallbacks */
 1758|  4.45k|    if(curl_strequal("ws_proxy", proxy_env)) {
  ------------------
  |  Branch (1758:8): [True: 0, False: 4.45k]
  ------------------
 1759|      0|      proxy = curl_getenv("http_proxy");
 1760|      0|    }
 1761|  4.45k|    else if(curl_strequal("wss_proxy", proxy_env)) {
  ------------------
  |  Branch (1761:13): [True: 0, False: 4.45k]
  ------------------
 1762|      0|      proxy = curl_getenv("https_proxy");
 1763|      0|      if(!proxy)
  ------------------
  |  Branch (1763:10): [True: 0, False: 0]
  ------------------
 1764|      0|        proxy = curl_getenv("HTTPS_PROXY");
 1765|      0|    }
 1766|  4.45k|    if(!proxy) {
  ------------------
  |  Branch (1766:8): [True: 4.45k, False: 0]
  ------------------
 1767|  4.45k|#endif
 1768|  4.45k|      envp = "all_proxy";
 1769|  4.45k|      proxy = curl_getenv(envp); /* default proxy to use */
 1770|  4.45k|      if(!proxy) {
  ------------------
  |  Branch (1770:10): [True: 4.45k, False: 0]
  ------------------
 1771|  4.45k|        envp = "ALL_PROXY";
 1772|  4.45k|        proxy = curl_getenv(envp);
 1773|  4.45k|      }
 1774|  4.45k|#ifndef CURL_DISABLE_WEBSOCKETS
 1775|  4.45k|    }
 1776|  4.45k|#endif
 1777|  4.45k|  }
 1778|  4.45k|  if(proxy)
  ------------------
  |  Branch (1778:6): [True: 0, False: 4.45k]
  ------------------
 1779|      0|    infof(data, "Uses proxy env variable %s == '%s'", envp, proxy);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1780|       |
 1781|  4.45k|  return proxy;
 1782|  4.45k|}
url.c:parse_proxy:
 1794|  1.87k|{
 1795|  1.87k|  char *proxyuser = NULL;
 1796|  1.87k|  char *proxypasswd = NULL;
 1797|  1.87k|  char *scheme = NULL;
 1798|  1.87k|  CURLcode result = CURLE_OK;
 1799|       |  /* Set the start proxy type for url scheme guessing */
 1800|  1.87k|  uint8_t proxytype = for_pre_proxy ? CURLPROXY_SOCKS4 : data->set.proxytype;
  ------------------
  |  |  798|    494|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1800:23): [True: 494, False: 1.38k]
  ------------------
 1801|  1.87k|  CURLU *uhp = curl_url();
 1802|  1.87k|  CURLUcode uc;
 1803|       |
 1804|  1.87k|  if(!uhp) {
  ------------------
  |  Branch (1804:6): [True: 0, False: 1.87k]
  ------------------
 1805|      0|    result = CURLE_OUT_OF_MEMORY;
 1806|      0|    goto error;
 1807|      0|  }
 1808|       |  /* When parsing the proxy, allowing non-supported schemes since we have
 1809|       |     these made up ones for proxies. Guess scheme for URLs without it. */
 1810|  1.87k|  uc = curl_url_set(uhp, CURLUPART_URL, proxy,
 1811|  1.87k|                    CURLU_NON_SUPPORT_SCHEME | CURLU_GUESS_SCHEME);
  ------------------
  |  |   90|  1.87k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
                                  CURLU_NON_SUPPORT_SCHEME | CURLU_GUESS_SCHEME);
  ------------------
  |  |   96|  1.87k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1812|  1.87k|  if(!uc) {
  ------------------
  |  Branch (1812:6): [True: 1.87k, False: 2]
  ------------------
 1813|       |    /* parsed okay as a URL - only update proxytype when scheme was explicit */
 1814|  1.87k|    uc = curl_url_get(uhp, CURLUPART_SCHEME, &scheme, CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  105|  1.87k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
 1815|  1.87k|    if(!uc) {
  ------------------
  |  Branch (1815:8): [True: 6, False: 1.86k]
  ------------------
 1816|      6|      result = Curl_scheme_to_proxytype(data, scheme, &proxytype, proxy);
 1817|      6|      if(result)
  ------------------
  |  Branch (1817:10): [True: 4, False: 2]
  ------------------
 1818|      4|        goto error;
 1819|      6|    }
 1820|  1.86k|    else if(uc != CURLUE_NO_SCHEME) {
  ------------------
  |  Branch (1820:13): [True: 0, False: 1.86k]
  ------------------
 1821|      0|      result = CURLE_OUT_OF_MEMORY;
 1822|      0|      goto error;
 1823|      0|    }
 1824|       |    /* else: no explicit scheme, keep the configured proxytype */
 1825|  1.87k|  }
 1826|      2|  else {
 1827|      2|    failf(data, "Unsupported proxy syntax in \'%s\': %s", proxy,
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
 1828|      2|          curl_url_strerror(uc));
 1829|      2|    result = CURLE_COULDNT_RESOLVE_PROXY;
 1830|      2|    goto error;
 1831|      2|  }
 1832|       |
 1833|  1.87k|  result = Curl_peer_from_proxy_url(uhp, data, proxy, proxytype,
 1834|  1.87k|                                    &proxyinfo->peer, &proxytype);
 1835|  1.87k|  if(result)
  ------------------
  |  Branch (1835:6): [True: 4, False: 1.86k]
  ------------------
 1836|      4|    goto error;
 1837|       |
 1838|  1.86k|  switch(proxytype) {
 1839|  1.04k|    case CURLPROXY_HTTP:
  ------------------
  |  |  790|  1.04k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  |  Branch (1839:5): [True: 1.04k, False: 818]
  ------------------
 1840|  1.05k|    case CURLPROXY_HTTP_1_0:
  ------------------
  |  |  792|  1.05k|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (1840:5): [True: 1, False: 1.86k]
  ------------------
 1841|  1.18k|    case CURLPROXY_HTTPS:
  ------------------
  |  |  794|  1.18k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  ------------------
  |  Branch (1841:5): [True: 139, False: 1.72k]
  ------------------
 1842|  1.34k|    case CURLPROXY_HTTPS2:
  ------------------
  |  |  796|  1.34k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (1842:5): [True: 159, False: 1.70k]
  ------------------
 1843|  1.34k|    case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|  1.34k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (1843:5): [True: 0, False: 1.86k]
  ------------------
 1844|  1.34k|      if(for_pre_proxy) {
  ------------------
  |  Branch (1844:10): [True: 1, False: 1.34k]
  ------------------
 1845|      1|        failf(data, "Unsupported pre-proxy type for \'%s\'", proxy);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1846|      1|        result = CURLE_COULDNT_RESOLVE_PROXY;
 1847|      1|        goto error;
 1848|      1|      }
 1849|  1.34k|      break;
 1850|  1.34k|    case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    493|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1850:5): [True: 493, False: 1.37k]
  ------------------
 1851|    496|    case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|    496|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1851:5): [True: 3, False: 1.86k]
  ------------------
 1852|    512|    case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|    512|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1852:5): [True: 16, False: 1.85k]
  ------------------
 1853|    519|    case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|    519|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1853:5): [True: 7, False: 1.86k]
  ------------------
 1854|    519|      break;
 1855|      0|    default:
  ------------------
  |  Branch (1855:5): [True: 0, False: 1.86k]
  ------------------
 1856|      0|      failf(data, "Unsupported proxy type %u for \'%s\'", proxytype, proxy);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1857|      0|      result = CURLE_COULDNT_RESOLVE_PROXY;
 1858|      0|      goto error;
 1859|  1.86k|  }
 1860|       |
 1861|       |  /* Is there a username and password given in this proxy URL? */
 1862|  1.86k|  uc = curl_url_get(uhp, CURLUPART_USER, &proxyuser, CURLU_URLDECODE);
  ------------------
  |  |   93|  1.86k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1863|  1.86k|  if(uc && (uc != CURLUE_NO_USER)) {
  ------------------
  |  Branch (1863:6): [True: 1.53k, False: 335]
  |  Branch (1863:12): [True: 1, False: 1.53k]
  ------------------
 1864|      1|    result = Curl_uc_to_curlcode(uc);
 1865|      1|    goto error;
 1866|      1|  }
 1867|  1.86k|  uc = curl_url_get(uhp, CURLUPART_PASSWORD, &proxypasswd, CURLU_URLDECODE);
  ------------------
  |  |   93|  1.86k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1868|  1.86k|  if(uc && (uc != CURLUE_NO_PASSWORD)) {
  ------------------
  |  Branch (1868:6): [True: 1.74k, False: 118]
  |  Branch (1868:12): [True: 1, False: 1.74k]
  ------------------
 1869|      1|    result = Curl_uc_to_curlcode(uc);
 1870|      1|    goto error;
 1871|      1|  }
 1872|       |
 1873|  1.86k|  if(proxyuser || proxypasswd) {
  ------------------
  |  Branch (1873:6): [True: 334, False: 1.53k]
  |  Branch (1873:19): [True: 0, False: 1.53k]
  ------------------
 1874|    334|    result = Curl_creds_create(proxyuser, proxypasswd, NULL, NULL,
 1875|    334|                               data->set.str[STRING_PROXY_SERVICE_NAME],
 1876|    334|                               CREDS_URL, &proxyinfo->creds);
  ------------------
  |  |   30|    334|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
 1877|    334|    if(result)
  ------------------
  |  Branch (1877:8): [True: 0, False: 334]
  ------------------
 1878|      0|      goto error;
 1879|    334|  }
 1880|  1.53k|  else if(!for_pre_proxy &&
  ------------------
  |  Branch (1880:11): [True: 1.12k, False: 404]
  ------------------
 1881|  1.12k|          (data->set.str[STRING_PROXYUSERNAME] ||
  ------------------
  |  Branch (1881:12): [True: 18, False: 1.10k]
  ------------------
 1882|  1.10k|           data->set.str[STRING_PROXYPASSWORD] ||
  ------------------
  |  Branch (1882:12): [True: 3, False: 1.10k]
  ------------------
 1883|  1.10k|           data->set.str[STRING_PROXY_SERVICE_NAME])) {
  ------------------
  |  Branch (1883:12): [True: 7, False: 1.09k]
  ------------------
 1884|       |    /* No user/passwd in URL, if this is not a pre-proxy, the
 1885|       |     * CURLOPT_PROXY* settings apply. */
 1886|     28|    result = Curl_creds_create(data->set.str[STRING_PROXYUSERNAME],
 1887|     28|                               data->set.str[STRING_PROXYPASSWORD],
 1888|     28|                               NULL, NULL,
 1889|     28|                               data->set.str[STRING_PROXY_SERVICE_NAME],
 1890|     28|                               CREDS_OPTION, &proxyinfo->creds);
  ------------------
  |  |   31|     28|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
 1891|     28|  }
 1892|  1.50k|  else
 1893|  1.50k|    Curl_creds_unlink(&proxyinfo->creds);
 1894|       |
 1895|  1.86k|  proxyinfo->proxytype = proxytype;
 1896|       |
 1897|  1.87k|error:
 1898|  1.87k|  curlx_free(scheme);
  ------------------
  |  | 1483|  1.87k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1899|  1.87k|  curlx_free(proxyuser);
  ------------------
  |  | 1483|  1.87k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1900|  1.87k|  curlx_free(proxypasswd);
  ------------------
  |  | 1483|  1.87k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1901|  1.87k|  curl_url_cleanup(uhp);
 1902|  1.87k|#ifdef DEBUGBUILD
 1903|  1.87k|  if(!result) {
  ------------------
  |  Branch (1903:6): [True: 1.86k, False: 13]
  ------------------
 1904|  1.86k|    DEBUGASSERT(proxyinfo);
  ------------------
  |  | 1081|  1.86k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1904:5): [True: 0, False: 1.86k]
  |  Branch (1904:5): [True: 1.86k, False: 0]
  ------------------
 1905|  1.86k|    DEBUGASSERT(proxyinfo->peer);
  ------------------
  |  | 1081|  1.86k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1905:5): [True: 0, False: 1.86k]
  |  Branch (1905:5): [True: 1.86k, False: 0]
  ------------------
 1906|  1.86k|  }
 1907|  1.87k|#endif
 1908|  1.87k|  return result;
 1909|  1.87k|}
url.c:override_login:
 2185|  6.26k|{
 2186|  6.26k|  char **optionsp = &conn->options;
 2187|  6.26k|#ifndef CURL_DISABLE_NETRC
 2188|  6.26k|  struct Curl_creds *ncreds_out = NULL;
 2189|  6.26k|#endif
 2190|  6.26k|  CURLcode result = CURLE_OK;
 2191|       |
 2192|  6.26k|  if(data->set.str[STRING_OPTIONS]) {
  ------------------
  |  Branch (2192:6): [True: 107, False: 6.16k]
  ------------------
 2193|    107|    curlx_free(*optionsp);
  ------------------
  |  | 1483|    107|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2194|    107|    *optionsp = curlx_strdup(data->set.str[STRING_OPTIONS]);
  ------------------
  |  | 1477|    107|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 2195|    107|    if(!*optionsp) {
  ------------------
  |  Branch (2195:8): [True: 0, False: 107]
  ------------------
 2196|      0|      result = CURLE_OUT_OF_MEMORY;
 2197|      0|      goto out;
 2198|      0|    }
 2199|    107|  }
 2200|       |
 2201|  6.26k|#ifndef CURL_DISABLE_NETRC
 2202|  6.26k|  if(data->set.use_netrc) { /* not CURL_NETRC_IGNORED */
  ------------------
  |  Branch (2202:6): [True: 7, False: 6.26k]
  ------------------
 2203|      7|    struct Curl_creds *ncreds_in = NULL;
 2204|      7|    bool scan_netrc = TRUE;
  ------------------
  |  | 1055|      7|#define TRUE true
  ------------------
 2205|      7|    NETRCcode ret;
 2206|      7|    CURLUcode uc;
 2207|       |
 2208|      7|    if(data->state.creds) {
  ------------------
  |  Branch (2208:8): [True: 5, False: 2]
  ------------------
 2209|      5|      switch(data->state.creds->source) {
 2210|      1|      case CREDS_OPTION:
  ------------------
  |  |   31|      1|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
  |  Branch (2210:7): [True: 1, False: 4]
  ------------------
 2211|       |        /* we never override credentials set via CURLOPT_*, leave. */
 2212|      1|        scan_netrc = FALSE;
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
 2213|      1|        break;
 2214|      4|      case CREDS_URL: /* only apply when netrc is not required */
  ------------------
  |  |   30|      4|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
  |  Branch (2214:7): [True: 4, False: 1]
  ------------------
 2215|      4|        if(data->set.use_netrc == CURL_NETRC_REQUIRED) {
  ------------------
  |  | 2359|      4|#define CURL_NETRC_REQUIRED 2L /* A user:password in the URL is ignored.
  ------------------
  |  Branch (2215:12): [True: 1, False: 3]
  ------------------
 2216|       |          /* We ignore password from URL */
 2217|      1|          ncreds_in = data->state.creds;
 2218|      1|        }
 2219|      3|        else if(!Curl_creds_has_user(data->state.creds) ||
  ------------------
  |  |   71|      6|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (71:43): [True: 3, False: 0]
  |  |  |  Branch (71:50): [True: 2, False: 1]
  |  |  ------------------
  ------------------
 2220|      2|                !Curl_creds_has_passwd(data->state.creds)) {
  ------------------
  |  |   72|      2|#define Curl_creds_has_passwd(c)         ((c) && (c)->passwd[0])
  |  |  ------------------
  |  |  |  Branch (72:43): [True: 2, False: 0]
  |  |  |  Branch (72:50): [True: 1, False: 1]
  |  |  ------------------
  ------------------
 2221|       |          /* We use netrc to complete what is missing */
 2222|      2|          ncreds_in = data->state.creds;
 2223|      2|        }
 2224|      1|        else
 2225|      1|          scan_netrc = FALSE;
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
 2226|      4|        break;
 2227|      0|      default: /* ignore credentials from other sources */
  ------------------
  |  Branch (2227:7): [True: 0, False: 5]
  ------------------
 2228|      0|        break;
 2229|      5|      }
 2230|      5|    }
 2231|       |
 2232|      7|    if(!scan_netrc)
  ------------------
  |  Branch (2232:8): [True: 2, False: 5]
  ------------------
 2233|      2|      goto out;
 2234|       |
 2235|      5|    ret = Curl_netrc_scan(data, &data->state.netrc,
 2236|      5|                          conn->origin->hostname,
 2237|      5|                          Curl_creds_user(ncreds_in),
  ------------------
  |  |   75|      5|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 3, False: 2]
  |  |  ------------------
  ------------------
 2238|      5|                          data->set.str[STRING_NETRC_FILE],
 2239|      5|                          &ncreds_out);
 2240|      5|    DEBUGASSERT(!ret || !ncreds_out);
  ------------------
  |  | 1081|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2240:5): [True: 5, False: 0]
  |  Branch (2240:5): [True: 0, False: 0]
  |  Branch (2240:5): [True: 0, False: 5]
  |  Branch (2240:5): [True: 5, False: 0]
  ------------------
 2241|      5|    if(ret == NETRC_OUT_OF_MEMORY) {
  ------------------
  |  Branch (2241:8): [True: 0, False: 5]
  ------------------
 2242|      0|      result = CURLE_OUT_OF_MEMORY;
 2243|      0|      goto out;
 2244|      0|    }
 2245|      5|    else if(ret && ((ret == NETRC_NO_MATCH) ||
  ------------------
  |  Branch (2245:13): [True: 5, False: 0]
  |  Branch (2245:21): [True: 5, False: 0]
  ------------------
 2246|      5|                    (data->set.use_netrc == CURL_NETRC_OPTIONAL))) {
  ------------------
  |  | 2357|      0|#define CURL_NETRC_OPTIONAL 1L /* A user:password in the URL is preferred
  ------------------
  |  Branch (2246:21): [True: 0, False: 0]
  ------------------
 2247|      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))    \
  |  |  ------------------
  |  |  |  |  319|      5|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 5, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  320|      5|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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]
  |  |  ------------------
  ------------------
 2248|      5|            conn->origin->hostname,
 2249|      5|            (data->set.str[STRING_NETRC_FILE] ?
 2250|      5|             data->set.str[STRING_NETRC_FILE] : ".netrc"));
 2251|      5|    }
 2252|      0|    else if(ret) {
  ------------------
  |  Branch (2252:13): [True: 0, False: 0]
  ------------------
 2253|      0|      const char *m = Curl_netrc_strerror(ret);
 2254|      0|      failf(data, ".netrc error: %s", m);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2255|      0|      result = CURLE_READ_ERROR;
 2256|      0|      goto out;
 2257|      0|    }
 2258|      0|    else if(ncreds_out) {
  ------------------
  |  Branch (2258:13): [True: 0, False: 0]
  ------------------
 2259|      0|      if(!(conn->scheme->flags & PROTOPT_USERPWDCTRL)) {
  ------------------
  |  |  232|      0|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (2259:10): [True: 0, False: 0]
  ------------------
 2260|       |        /* if the protocol cannot handle control codes in credentials, make
 2261|       |           sure there are none */
 2262|      0|        if(str_has_ctrl(ncreds_out->user) ||
  ------------------
  |  Branch (2262:12): [True: 0, False: 0]
  ------------------
 2263|      0|           str_has_ctrl(ncreds_out->passwd)) {
  ------------------
  |  Branch (2263:12): [True: 0, False: 0]
  ------------------
 2264|      0|          failf(data, "control code detected in .netrc credentials");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2265|      0|          result = CURLE_READ_ERROR;
 2266|      0|          goto out;
 2267|      0|        }
 2268|      0|      }
 2269|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2270|      0|                 conn->origin->hostname, ncreds_out->user);
 2271|      0|      result = Curl_creds_merge(ncreds_out->user, ncreds_out->passwd,
 2272|      0|                                data->state.creds, CREDS_NETRC,
  ------------------
  |  |   32|      0|#define CREDS_NETRC  3 /* username/passwd found in netrc */
  ------------------
 2273|      0|                                &data->state.creds);
 2274|      0|      if(result)
  ------------------
  |  Branch (2274:10): [True: 0, False: 0]
  ------------------
 2275|      0|        goto out;
 2276|       |      /* for updated strings, we update them in the URL */
 2277|      0|      uc = curl_url_set(data->state.uh, CURLUPART_USER,
 2278|      0|                        Curl_creds_user(data->state.creds), CURLU_URLENCODE);
  ------------------
  |  |   75|      0|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                      Curl_creds_user(data->state.creds), CURLU_URLENCODE);
  ------------------
  |  |   94|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2279|      0|      if(!uc)
  ------------------
  |  Branch (2279:10): [True: 0, False: 0]
  ------------------
 2280|      0|        uc = curl_url_set(data->state.uh, CURLUPART_PASSWORD,
 2281|      0|                          Curl_creds_passwd(data->state.creds),
  ------------------
  |  |   76|      0|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2282|      0|                          CURLU_URLENCODE);
  ------------------
  |  |   94|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2283|      0|      if(uc)
  ------------------
  |  Branch (2283:10): [True: 0, False: 0]
  ------------------
 2284|      0|        result = Curl_uc_to_curlcode(uc);
 2285|      0|    }
 2286|      0|    else
 2287|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2287:7): [Folded, False: 0]
  |  Branch (2287:7): [Folded, False: 0]
  ------------------
 2288|      5|  }
 2289|  6.26k|#endif
 2290|       |
 2291|  6.26k|out:
 2292|  6.26k|#ifndef CURL_DISABLE_NETRC
 2293|  6.26k|  Curl_creds_unlink(&ncreds_out);
 2294|  6.26k|#endif
 2295|  6.26k|  return result;
 2296|  6.26k|}
url.c:url_set_conn_login:
 2303|  6.26k|{
 2304|       |  /* If our protocol needs a password and we have none, use the defaults */
 2305|  6.26k|  if((conn->scheme->flags & PROTOPT_NEEDSPWD) && !conn->creds) {
  ------------------
  |  |  216|  6.26k|#define PROTOPT_NEEDSPWD (1 << 5)  /* needs a password, and if none is set it
  ------------------
  |  Branch (2305:6): [True: 0, False: 6.26k]
  |  Branch (2305:50): [True: 0, False: 0]
  ------------------
 2306|      0|    if(data->state.creds)
  ------------------
  |  Branch (2306:8): [True: 0, False: 0]
  ------------------
 2307|      0|      Curl_creds_link(&conn->creds, data->state.creds);
 2308|      0|    else
 2309|      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"
  ------------------
 2310|      0|                               NULL, NULL, NULL, CREDS_NONE, &conn->creds);
  ------------------
  |  |   29|      0|#define CREDS_NONE   0 /* used for default username/passwd */
  ------------------
 2311|      0|  }
 2312|  6.26k|  else if(!(conn->scheme->flags & PROTOPT_CREDSPERREQUEST)) {
  ------------------
  |  |  220|  6.26k|#define PROTOPT_CREDSPERREQUEST (1 << 7) /* requires login credentials per
  ------------------
  |  Branch (2312:11): [True: 5.71k, False: 558]
  ------------------
 2313|       |    /* for protocols that do not handle credentials per request,
 2314|       |     * the connection credentials are set by the initial transfer. */
 2315|  5.71k|    Curl_creds_link(&conn->creds, data->state.creds);
 2316|  5.71k|  }
 2317|       |
 2318|  6.26k|  return CURLE_OK;
 2319|  6.26k|}
url.c:setup_connection_internals:
 1660|  6.26k|{
 1661|  6.26k|  struct Curl_peer *peer = NULL;
 1662|  6.26k|  CURLcode result;
 1663|       |
 1664|  6.26k|  DEBUGF(infof(data, "setup connection, bits.close=%d", conn->bits.close));
  ------------------
  |  | 1067|  43.8k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 6.26k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 6.26k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
 1665|  6.26k|  if(conn->scheme->run->setup_connection) {
  ------------------
  |  Branch (1665:6): [True: 6.26k, False: 0]
  ------------------
 1666|  6.26k|    result = conn->scheme->run->setup_connection(data, conn);
 1667|  6.26k|    if(result)
  ------------------
  |  Branch (1667:8): [True: 0, False: 6.26k]
  ------------------
 1668|      0|      return result;
 1669|  6.26k|  }
 1670|  6.26k|  DEBUGF(infof(data, "setup connection, bits.close=%d", conn->bits.close));
  ------------------
  |  | 1067|  43.8k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 6.26k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 6.26k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
 1671|       |
 1672|       |  /* Now create the destination name */
 1673|  6.26k|  peer = Curl_conn_get_destination(conn, FIRSTSOCKET);
  ------------------
  |  |  303|  6.26k|#define FIRSTSOCKET     0
  ------------------
 1674|  6.26k|  if(!peer)
  ------------------
  |  Branch (1674:6): [True: 0, False: 6.26k]
  ------------------
 1675|      0|    return CURLE_FAILED_INIT;
 1676|       |
 1677|       |  /* IPv6 addresses with a scope_id (0 is default == global) have a
 1678|       |   * printable representation with a '%<scope_id>' suffix. */
 1679|  6.26k|  if(peer->ipv6)
  ------------------
  |  Branch (1679:6): [True: 24, False: 6.24k]
  ------------------
 1680|     24|    if(peer->scopeid)
  ------------------
  |  Branch (1680:8): [True: 10, False: 14]
  ------------------
 1681|     10|      conn->destination = curl_maprintf("[%s%%%u]:%u",
 1682|     10|        peer->hostname, peer->scopeid, peer->port);
 1683|     14|    else
 1684|     14|      conn->destination = curl_maprintf("[%s]:%u",
 1685|     14|        peer->hostname, peer->port);
 1686|  6.24k|  else
 1687|  6.24k|    conn->destination = curl_maprintf("%s:%u", peer->hostname, peer->port);
 1688|  6.26k|  if(!conn->destination)
  ------------------
  |  Branch (1688:6): [True: 0, False: 6.26k]
  ------------------
 1689|      0|    return CURLE_OUT_OF_MEMORY;
 1690|       |
 1691|  6.26k|  Curl_strntolower(conn->destination, conn->destination,
 1692|  6.26k|                   strlen(conn->destination));
 1693|       |
 1694|  6.26k|  return CURLE_OK;
 1695|  6.26k|}
url.c:setup_range:
 1623|  6.06k|{
 1624|  6.06k|  struct UrlState *s = &data->state;
 1625|  6.06k|  s->resume_from = data->set.set_resume_from;
 1626|  6.06k|  if(s->resume_from || data->set.str[STRING_SET_RANGE]) {
  ------------------
  |  Branch (1626:6): [True: 45, False: 6.02k]
  |  Branch (1626:24): [True: 2, False: 6.01k]
  ------------------
 1627|     47|    if(s->rangestringalloc)
  ------------------
  |  Branch (1627:8): [True: 0, False: 47]
  ------------------
 1628|      0|      curlx_free(s->range);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1629|       |
 1630|     47|    if(s->resume_from)
  ------------------
  |  Branch (1630:8): [True: 45, False: 2]
  ------------------
 1631|     45|      s->range = curl_maprintf("%" FMT_OFF_T "-", s->resume_from);
 1632|      2|    else
 1633|      2|      s->range = curlx_strdup(data->set.str[STRING_SET_RANGE]);
  ------------------
  |  | 1477|      2|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1634|       |
 1635|     47|    if(!s->range)
  ------------------
  |  Branch (1635:8): [True: 0, False: 47]
  ------------------
 1636|      0|      return CURLE_OUT_OF_MEMORY;
 1637|       |
 1638|     47|    s->rangestringalloc = TRUE;
  ------------------
  |  | 1055|     47|#define TRUE true
  ------------------
 1639|       |
 1640|       |    /* tell ourselves to fetch this range */
 1641|     47|    s->use_range = TRUE;        /* enable range download */
  ------------------
  |  | 1055|     47|#define TRUE true
  ------------------
 1642|     47|  }
 1643|  6.01k|  else
 1644|  6.01k|    s->use_range = FALSE; /* disable range download */
  ------------------
  |  | 1058|  6.01k|#define FALSE false
  ------------------
 1645|       |
 1646|  6.06k|  return CURLE_OK;
 1647|  6.06k|}
url.c:url_attach_existing:
 1221|  6.26k|{
 1222|  6.26k|  struct url_conn_match match;
 1223|  6.26k|  bool success;
 1224|       |
 1225|  6.26k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  6.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1225:3): [True: 0, False: 6.26k]
  |  Branch (1225:3): [True: 6.26k, False: 0]
  ------------------
 1226|  6.26k|  memset(&match, 0, sizeof(match));
 1227|  6.26k|  match.data = data;
 1228|  6.26k|  match.needle = needle;
 1229|  6.26k|  match.may_multiplex = xfer_may_multiplex(data, needle);
 1230|       |
 1231|       |#ifdef USE_NTLM
 1232|       |  match.want_ntlm_http =
 1233|       |    (data->state.authhost.want & CURLAUTH_NTLM) &&
 1234|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1235|       |#ifndef CURL_DISABLE_PROXY
 1236|       |  match.want_proxy_ntlm_http =
 1237|       |    needle->http_proxy.creds &&
 1238|       |    (data->state.authproxy.want & CURLAUTH_NTLM) &&
 1239|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1240|       |#endif
 1241|       |#endif
 1242|       |
 1243|       |#if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
 1244|       |  match.want_nego_http =
 1245|       |    (data->state.authhost.want & CURLAUTH_NEGOTIATE) &&
 1246|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1247|       |#ifndef CURL_DISABLE_PROXY
 1248|       |  match.want_proxy_nego_http =
 1249|       |    needle->http_proxy.creds &&
 1250|       |    (data->state.authproxy.want & CURLAUTH_NEGOTIATE) &&
 1251|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1252|       |#endif
 1253|       |#endif
 1254|  6.26k|  match.require_tls = data->set.use_ssl >= CURLUSESSL_CONTROL;
  ------------------
  |  |  926|  6.26k|#define CURLUSESSL_CONTROL 2L /* SSL for the control connection or fail */
  ------------------
 1255|  6.26k|  match.may_tls = data->set.use_ssl > CURLUSESSL_NONE;
  ------------------
  |  |  924|  6.26k|#define CURLUSESSL_NONE    0L /* do not attempt to use SSL */
  ------------------
 1256|       |
 1257|       |  /* Find a connection in the pool that matches what "data + needle"
 1258|       |   * requires. If a suitable candidate is found, it is attached to "data". */
 1259|  6.26k|  success = Curl_cpool_find(data, needle->destination,
 1260|  6.26k|                            url_match_conn, url_match_result, &match);
 1261|       |
 1262|       |  /* wait_pipe is TRUE if we encounter a bundle that is undecided. There
 1263|       |   * is no matching connection then, yet. */
 1264|  6.26k|  *waitpipe = (bool)match.wait_pipe;
 1265|  6.26k|  return success;
 1266|  6.26k|}
url.c:xfer_may_multiplex:
  534|  6.26k|{
  535|  6.26k|#ifndef CURL_DISABLE_HTTP
  536|       |  /* If an HTTP protocol and multiplexing is enabled */
  537|  6.26k|  if((conn->scheme->protocol & PROTO_FAMILY_HTTP) &&
  ------------------
  |  |   84|  6.26k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  6.26k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  6.26k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  6.26k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  6.26k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  6.26k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (537:6): [True: 558, False: 5.70k]
  ------------------
  538|    558|     (!conn->bits.protoconnstart || !conn->bits.close)) {
  ------------------
  |  Branch (538:7): [True: 558, False: 0]
  |  Branch (538:37): [True: 0, False: 0]
  ------------------
  539|       |
  540|    558|    if(Curl_multiplex_wanted(data->multi) &&
  ------------------
  |  Branch (540:8): [True: 558, False: 0]
  ------------------
  541|    558|       (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   41|    558|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                     (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   42|    558|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (541:8): [True: 558, False: 0]
  ------------------
  542|       |      /* allows HTTP/2 or newer */
  543|    558|      return TRUE;
  ------------------
  |  | 1055|    558|#define TRUE true
  ------------------
  544|    558|  }
  545|       |#else
  546|       |  (void)data;
  547|       |  (void)conn;
  548|       |#endif
  549|  5.70k|  return FALSE;
  ------------------
  |  | 1058|  5.70k|#define FALSE false
  ------------------
  550|  6.26k|}
url.c:url_match_conn:
 1126|    207|{
 1127|    207|  struct url_conn_match *m = userdata;
 1128|       |  /* Check if `conn` can be used for transfer `m->data` */
 1129|       |
 1130|       |  /* general connect config setting match? */
 1131|    207|  if(!url_match_connect_config(conn, m))
  ------------------
  |  Branch (1131:6): [True: 4, False: 203]
  ------------------
 1132|      4|    return FALSE;
  ------------------
  |  | 1058|      4|#define FALSE false
  ------------------
 1133|       |
 1134|       |  /* match for destination and protocol? */
 1135|    203|  if(!url_match_destination(conn, m))
  ------------------
  |  Branch (1135:6): [True: 0, False: 203]
  ------------------
 1136|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1137|       |
 1138|    203|  if(!url_match_fully_connected(conn, m))
  ------------------
  |  Branch (1138:6): [True: 203, False: 0]
  ------------------
 1139|    203|    return FALSE;
  ------------------
  |  | 1058|    203|#define FALSE false
  ------------------
 1140|       |
 1141|      0|  if(!url_match_multiplex_needs(conn, m))
  ------------------
  |  Branch (1141:6): [True: 0, False: 0]
  ------------------
 1142|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1143|       |
 1144|      0|  if(!url_match_proxy_use(conn, m))
  ------------------
  |  Branch (1144:6): [True: 0, False: 0]
  ------------------
 1145|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1146|      0|  if(!url_match_ssl_config(conn, m))
  ------------------
  |  Branch (1146:6): [True: 0, False: 0]
  ------------------
 1147|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1148|       |
 1149|      0|  if(!url_match_http_multiplex(conn, m))
  ------------------
  |  Branch (1149:6): [True: 0, False: 0]
  ------------------
 1150|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1151|      0|  else if(m->wait_pipe)
  ------------------
  |  Branch (1151:11): [True: 0, False: 0]
  ------------------
 1152|       |    /* we decided to wait on PIPELINING */
 1153|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1154|       |
 1155|      0|  if(!url_match_auth(conn, m))
  ------------------
  |  Branch (1155:6): [True: 0, False: 0]
  ------------------
 1156|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1157|       |
 1158|      0|  if(!url_match_proto_config(conn, m))
  ------------------
  |  Branch (1158:6): [True: 0, False: 0]
  ------------------
 1159|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1160|       |
 1161|      0|  if(!url_match_auth_ntlm(conn, m))
  ------------------
  |  | 1069|      0|#define url_match_auth_ntlm(c, m) ((void)(c), (void)(m), TRUE)
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (1161:6): [True: 0, False: 0]
  ------------------
 1162|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1163|      0|  else if(m->force_reuse)
  ------------------
  |  Branch (1163:11): [True: 0, False: 0]
  ------------------
 1164|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1165|       |
 1166|      0|  if(!url_match_auth_nego(conn, m))
  ------------------
  |  | 1122|      0|#define url_match_auth_nego(c, m) ((void)(c), (void)(m), TRUE)
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (1166:6): [True: 0, False: 0]
  ------------------
 1167|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1168|      0|  else if(m->force_reuse)
  ------------------
  |  Branch (1168:11): [True: 0, False: 0]
  ------------------
 1169|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1170|       |
 1171|      0|  if(!url_match_multiplex_limits(conn, m))
  ------------------
  |  Branch (1171:6): [True: 0, False: 0]
  ------------------
 1172|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1173|       |
 1174|      0|  if(!CONN_INUSE(conn) && Curl_conn_seems_dead(conn, m->data)) {
  ------------------
  |  |  346|      0|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  ------------------
  |  Branch (1174:6): [True: 0, False: 0]
  |  Branch (1174:27): [True: 0, False: 0]
  ------------------
 1175|       |    /* remove and disconnect. */
 1176|      0|    Curl_conn_terminate(m->data, conn, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1177|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1178|      0|  }
 1179|       |
 1180|       |  /* conn matches our needs. */
 1181|      0|  m->found = conn;
 1182|       |  return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1183|      0|}
url.c:url_match_connect_config:
  692|    207|{
  693|       |  /* connect-only or to-be-closed connections will not be reused */
  694|    207|  if(conn->bits.connect_only || conn->bits.close || conn->bits.no_reuse)
  ------------------
  |  Branch (694:6): [True: 0, False: 207]
  |  Branch (694:33): [True: 0, False: 207]
  |  Branch (694:53): [True: 0, False: 207]
  ------------------
  695|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  696|       |
  697|       |  /* ip_version must match */
  698|    207|  if(m->data->set.ipver != CURL_IPRESOLVE_WHATEVER &&
  ------------------
  |  | 2303|    414|#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
  ------------------
  |  Branch (698:6): [True: 0, False: 207]
  ------------------
  699|      0|     m->data->set.ipver != conn->ip_version)
  ------------------
  |  Branch (699:6): [True: 0, False: 0]
  ------------------
  700|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  701|       |
  702|    207|  if(m->needle->localdev || m->needle->localport) {
  ------------------
  |  Branch (702:6): [True: 0, False: 207]
  |  Branch (702:29): [True: 0, False: 207]
  ------------------
  703|       |    /* If we are bound to a specific local end (IP+port), we must not reuse a
  704|       |       random other one, although if we did not ask for a particular one we
  705|       |       can reuse one that was bound.
  706|       |
  707|       |       This comparison is a bit rough and too strict. Since the input
  708|       |       parameters can be specified in numerous ways and still end up the same
  709|       |       it would take a lot of processing to make it really accurate. Instead,
  710|       |       this matching will assume that reuses of bound connections will most
  711|       |       likely also reuse the exact same binding parameters and missing out a
  712|       |       few edge cases should not hurt anyone much.
  713|       |    */
  714|      0|    if((conn->localport != m->needle->localport) ||
  ------------------
  |  Branch (714:8): [True: 0, False: 0]
  ------------------
  715|      0|       (conn->localportrange != m->needle->localportrange) ||
  ------------------
  |  Branch (715:8): [True: 0, False: 0]
  ------------------
  716|      0|       (m->needle->localdev &&
  ------------------
  |  Branch (716:9): [True: 0, False: 0]
  ------------------
  717|      0|        (!conn->localdev || strcmp(conn->localdev, m->needle->localdev))))
  ------------------
  |  Branch (717:10): [True: 0, False: 0]
  |  Branch (717:29): [True: 0, False: 0]
  ------------------
  718|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  719|      0|  }
  720|       |
  721|    207|  if(!m->needle->via_peer != !conn->via_peer)
  ------------------
  |  Branch (721:6): [True: 4, False: 203]
  ------------------
  722|       |    /* do not mix connections that use the "connect to host" feature and
  723|       |     * connections that do not use this feature */
  724|      4|    return FALSE;
  ------------------
  |  | 1058|      4|#define FALSE false
  ------------------
  725|       |
  726|    203|  return TRUE;
  ------------------
  |  | 1055|    203|#define TRUE true
  ------------------
  727|    207|}
url.c:url_match_destination:
  955|    203|{
  956|       |  /* Different connect-to peers never match */
  957|    203|  if(!Curl_peer_same_destination(m->needle->via_peer, conn->via_peer))
  ------------------
  |  Branch (957:6): [True: 0, False: 203]
  ------------------
  958|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  959|       |
  960|    203|#ifndef CURL_DISABLE_PROXY
  961|    203|  if(m->needle->bits.httpproxy && !m->needle->bits.tunnel_proxy) {
  ------------------
  |  Branch (961:6): [True: 0, False: 203]
  |  Branch (961:35): [True: 0, False: 0]
  ------------------
  962|       |    /* Talking to a non-tunneling HTTP proxy matches on proxy peers. */
  963|      0|    return Curl_peer_equal(m->needle->http_proxy.peer,
  964|      0|                           conn->http_proxy.peer);
  965|      0|  }
  966|    203|#endif
  967|       |
  968|    203|  if(m->needle->origin->scheme != conn->origin->scheme) {
  ------------------
  |  Branch (968:6): [True: 0, False: 203]
  ------------------
  969|       |    /* `needle` and `conn` not having the same scheme.
  970|       |     * This is allowed for the same family *if* conn is using TLS.
  971|       |     * - IMAP+STARTTLS works for IMAPS.
  972|       |     * - IMAPS works for IMAP. */
  973|      0|    if(get_protocol_family(conn->origin->scheme) !=
  ------------------
  |  Branch (973:8): [True: 0, False: 0]
  ------------------
  974|      0|       m->needle->scheme->protocol) {
  975|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  976|      0|    }
  977|      0|    if(!url_match_ssl_use(conn, m)) {
  ------------------
  |  Branch (977:8): [True: 0, False: 0]
  ------------------
  978|      0|      DEBUGF(infof(m->data, "Connection #%" FMT_OFF_T
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  979|      0|                   " has compatible protocol family, but no SSL, no match",
  980|      0|                   conn->connection_id));
  981|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  982|      0|    }
  983|      0|  }
  984|       |  /* Scheme mismatch is acceptable, just compare hostname/port */
  985|    203|  return Curl_peer_same_destination(m->needle->origin, conn->origin);
  986|    203|}
url.c:url_match_fully_connected:
  731|    203|{
  732|    203|  if(!Curl_conn_is_connected(conn, FIRSTSOCKET) ||
  ------------------
  |  |  303|    203|#define FIRSTSOCKET     0
  ------------------
  |  Branch (732:6): [True: 203, False: 0]
  ------------------
  733|    203|     conn->bits.upgrade_in_progress) {
  ------------------
  |  Branch (733:6): [True: 0, False: 0]
  ------------------
  734|       |    /* Not yet connected, or a protocol upgrade is in progress. The later
  735|       |     * happens for HTTP/2 Upgrade: requests that need a response. */
  736|    203|    if(m->may_multiplex) {
  ------------------
  |  Branch (736:8): [True: 203, False: 0]
  ------------------
  737|    203|      m->seen_pending_conn = TRUE;
  ------------------
  |  | 1055|    203|#define TRUE true
  ------------------
  738|       |      /* Do not pick a connection that has not connected yet */
  739|    203|      infof(m->data, "Connection #%" FMT_OFF_T
  ------------------
  |  |  143|    203|  do {                               \
  |  |  144|    203|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    203|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 203, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 203]
  |  |  |  |  ------------------
  |  |  |  |  320|    203|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    203|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    203|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 203]
  |  |  ------------------
  ------------------
  740|    203|            " is not open enough, cannot reuse", conn->connection_id);
  741|    203|    }
  742|       |    /* Do not pick a connection that has not connected yet */
  743|    203|    return FALSE;
  ------------------
  |  | 1058|    203|#define FALSE false
  ------------------
  744|    203|  }
  745|      0|  return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  746|    203|}
url.c:url_match_result:
 1186|  6.26k|{
 1187|  6.26k|  struct url_conn_match *match = userdata;
 1188|  6.26k|  if(match->found) {
  ------------------
  |  Branch (1188:6): [True: 0, False: 6.26k]
  ------------------
 1189|       |    /* Attach it now while still under lock, so the connection does
 1190|       |     * no longer appear idle and can be reaped. */
 1191|      0|    Curl_attach_connection(match->data, match->found);
 1192|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1193|      0|  }
 1194|  6.26k|  else if(match->seen_single_use_conn && !match->seen_multiplex_conn) {
  ------------------
  |  Branch (1194:11): [True: 0, False: 6.26k]
  |  Branch (1194:42): [True: 0, False: 0]
  ------------------
 1195|       |    /* We have seen a single-use, existing connection to the destination and
 1196|       |     * no multiplexed one. It seems safe to assume that the server does
 1197|       |     * not support multiplexing. */
 1198|      0|    match->wait_pipe = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1199|      0|  }
 1200|  6.26k|  else if(match->seen_pending_conn && match->data->set.pipewait) {
  ------------------
  |  Branch (1200:11): [True: 203, False: 6.05k]
  |  Branch (1200:39): [True: 203, False: 0]
  ------------------
 1201|    203|    infof(match->data,
  ------------------
  |  |  143|    203|  do {                               \
  |  |  144|    203|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    203|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 203, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 203]
  |  |  |  |  ------------------
  |  |  |  |  320|    203|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    203|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    203|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 203]
  |  |  ------------------
  ------------------
 1202|    203|          "Found pending candidate for reuse and CURLOPT_PIPEWAIT is set");
 1203|    203|    match->wait_pipe = TRUE;
  ------------------
  |  | 1055|    203|#define TRUE true
  ------------------
 1204|    203|  }
 1205|  6.26k|  match->force_reuse = FALSE;
  ------------------
  |  | 1058|  6.26k|#define FALSE false
  ------------------
 1206|       |  return FALSE;
  ------------------
  |  | 1058|  6.26k|#define FALSE false
  ------------------
 1207|  6.26k|}

urlencode_str:
  129|  6.28k|{
  130|       |  /* we must add this with whitespace-replacing */
  131|  6.28k|  const unsigned char *iptr;
  132|  6.28k|  const unsigned char *host_sep = (const unsigned char *)url;
  133|  6.28k|  CURLcode result = CURLE_OK;
  134|       |
  135|  6.28k|  DEBUGASSERT((query >= QUERY_NO) && (query <= QUERY_YES));
  ------------------
  |  | 1081|  6.28k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (135:3): [True: 0, False: 6.28k]
  |  Branch (135:3): [True: 0, False: 0]
  |  Branch (135:3): [True: 6.28k, False: 0]
  |  Branch (135:3): [True: 6.28k, False: 0]
  ------------------
  136|       |
  137|  6.28k|  if(!relative) {
  ------------------
  |  Branch (137:6): [True: 0, False: 6.28k]
  ------------------
  138|      0|    size_t n;
  139|      0|    host_sep = (const unsigned char *)find_host_sep(url);
  140|       |
  141|       |    /* output the first piece as-is */
  142|      0|    n = (const char *)host_sep - url;
  143|      0|    result = curlx_dyn_addn(o, url, n);
  144|      0|    len -= n;
  145|      0|  }
  146|       |
  147|  9.26M|  for(iptr = host_sep; len && !result; iptr++, len--) {
  ------------------
  |  Branch (147:24): [True: 9.25M, False: 6.28k]
  |  Branch (147:31): [True: 9.25M, False: 0]
  ------------------
  148|  9.25M|    if(*iptr == ' ') {
  ------------------
  |  Branch (148:8): [True: 0, False: 9.25M]
  ------------------
  149|      0|      if(query != QUERY_YES)
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
  |  Branch (149:10): [True: 0, False: 0]
  ------------------
  150|      0|        result = curlx_dyn_addn(o, "%20", 3);
  151|      0|      else
  152|      0|        result = curlx_dyn_addn(o, "+", 1);
  153|      0|    }
  154|  9.25M|    else if((*iptr < ' ') || (*iptr >= 0x7f)) {
  ------------------
  |  Branch (154:13): [True: 0, False: 9.25M]
  |  Branch (154:30): [True: 7.72M, False: 1.52M]
  ------------------
  155|  7.72M|      unsigned char out[3] = { '%' };
  156|  7.72M|      Curl_hexbyte(&out[1], *iptr);
  157|  7.72M|      result = curlx_dyn_addn(o, out, 3);
  158|  7.72M|    }
  159|  1.52M|    else if(*iptr == '%' && (len >= 3) &&
  ------------------
  |  Branch (159:13): [True: 978k, False: 551k]
  |  Branch (159:29): [True: 978k, False: 107]
  ------------------
  160|   978k|            ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   39|  2.50M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  1.95M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 148k, False: 829k]
  |  |  |  |  |  Branch (44:38): [True: 15.8k, False: 132k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  1.94M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 117k, False: 844k]
  |  |  |  |  |  Branch (27:43): [True: 16.3k, False: 101k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|   946k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 115k, False: 831k]
  |  |  |  |  |  Branch (28:43): [True: 10.8k, False: 104k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   39|  1.57M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  86.1k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 29.5k, False: 13.4k]
  |  |  |  |  |  Branch (44:38): [True: 4.98k, False: 24.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  81.1k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 21.4k, False: 16.6k]
  |  |  |  |  |  Branch (27:43): [True: 6.32k, False: 15.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  31.7k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 18.1k, False: 13.5k]
  |  |  |  |  |  Branch (28:43): [True: 2.70k, False: 15.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  161|  14.0k|            (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   43|  28.0k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 2.33k, False: 11.6k]
  |  |  |  Branch (43:38): [True: 2.33k, False: 0]
  |  |  ------------------
  ------------------
                          (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   43|  11.6k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 4.55k, False: 7.13k]
  |  |  |  Branch (43:38): [True: 4.55k, False: 0]
  |  |  ------------------
  ------------------
  162|       |      /* uppercase it */
  163|  6.89k|      unsigned char hex = (unsigned char)((curlx_hexval(iptr[1]) << 4) |
  ------------------
  |  |  112|  6.89k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  164|  6.89k|                                          curlx_hexval(iptr[2]));
  ------------------
  |  |  112|  6.89k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  165|  6.89k|      unsigned char out[3] = { '%' };
  166|  6.89k|      Curl_hexbyte(&out[1], hex);
  167|  6.89k|      result = curlx_dyn_addn(o, out, 3);
  168|  6.89k|      iptr += 2;
  169|  6.89k|      len -= 2;
  170|  6.89k|    }
  171|  1.52M|    else {
  172|  1.52M|      result = curlx_dyn_addn(o, iptr, 1);
  173|  1.52M|      if(*iptr == '?' && (query == QUERY_NOT_YET))
  ------------------
  |  |   53|      0|#define QUERY_NOT_YET 3 /* allow to change to query */
  ------------------
  |  Branch (173:10): [True: 0, False: 1.52M]
  |  Branch (173:26): [True: 0, False: 0]
  ------------------
  174|      0|        query = QUERY_YES;
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
  175|  1.52M|    }
  176|  9.25M|  }
  177|       |
  178|  6.28k|  if(result)
  ------------------
  |  Branch (178:6): [True: 0, False: 6.28k]
  ------------------
  179|      0|    return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  180|  6.28k|  return CURLUE_OK;
  181|  6.28k|}
Curl_is_absolute_url:
  193|  19.3k|{
  194|  19.3k|  size_t i = 0;
  195|  19.3k|  DEBUGASSERT(!buf || (buflen > MAX_SCHEME_LEN));
  ------------------
  |  | 1081|  19.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (195:3): [True: 19.3k, False: 0]
  |  Branch (195:3): [True: 0, False: 0]
  |  Branch (195:3): [True: 10.1k, False: 9.20k]
  |  Branch (195:3): [True: 9.20k, False: 0]
  ------------------
  196|  19.3k|  (void)buflen; /* only used in debug-builds */
  197|  19.3k|  if(buf)
  ------------------
  |  Branch (197:6): [True: 9.20k, False: 10.1k]
  ------------------
  198|  9.20k|    buf[0] = 0; /* always leave a defined value in buf */
  199|       |#ifdef _WIN32
  200|       |  if(guess_scheme && STARTS_WITH_DRIVE_PREFIX(url))
  201|       |    return 0;
  202|       |#endif
  203|  19.3k|  if(ISALPHA(url[0]))
  ------------------
  |  |   38|  19.3k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  38.6k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 10.9k, False: 8.37k]
  |  |  |  |  |  Branch (43:38): [True: 10.7k, False: 232]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  8.60k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 3.89k, False: 4.70k]
  |  |  |  |  |  Branch (42:38): [True: 3.42k, False: 477]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  204|  68.2k|    for(i = 1; i < MAX_SCHEME_LEN; ++i) {
  ------------------
  |  |   55|  68.2k|#define MAX_SCHEME_LEN 40
  ------------------
  |  Branch (204:16): [True: 68.2k, False: 34]
  ------------------
  205|  68.2k|      char s = url[i];
  206|  68.2k|      if(s && (ISALNUM(s) || (s == '+') || (s == '-') || (s == '.'))) {
  ------------------
  |  |   41|   126k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|   126k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 56.6k, False: 6.41k]
  |  |  |  |  |  Branch (44:38): [True: 11.2k, False: 45.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|   114k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 26.5k, False: 25.2k]
  |  |  |  |  |  Branch (43:38): [True: 26.5k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  25.2k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 10.7k, False: 14.5k]
  |  |  |  |  |  Branch (42:38): [True: 10.6k, False: 91]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (206:10): [True: 63.0k, False: 5.12k]
  |  Branch (206:30): [True: 220, False: 14.4k]
  |  Branch (206:44): [True: 299, False: 14.1k]
  |  Branch (206:58): [True: 5.16k, False: 8.97k]
  ------------------
  207|       |        /* RFC 3986 3.1 explains:
  208|       |           scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  209|       |        */
  210|  54.1k|      }
  211|  14.0k|      else {
  212|  14.0k|        break;
  213|  14.0k|      }
  214|  68.2k|    }
  215|  19.3k|  if(i && (url[i] == ':') && ((url[i + 1] == '/') || !guess_scheme)) {
  ------------------
  |  Branch (215:6): [True: 14.1k, False: 5.18k]
  |  Branch (215:11): [True: 7.97k, False: 6.15k]
  |  Branch (215:31): [True: 7.75k, False: 220]
  |  Branch (215:54): [True: 0, False: 220]
  ------------------
  216|       |    /* If this does not guess scheme, the scheme always ends with the colon so
  217|       |       that this also detects data: URLs etc. In guessing mode, data: could
  218|       |       be the hostname "data" with a specified port number. */
  219|       |
  220|       |    /* the length of the scheme is the name part only */
  221|  7.75k|    size_t len = i;
  222|  7.75k|    if(buf) {
  ------------------
  |  Branch (222:8): [True: 3.79k, False: 3.96k]
  ------------------
  223|  3.79k|      Curl_strntolower(buf, url, i);
  224|  3.79k|      buf[i] = 0;
  225|  3.79k|    }
  226|  7.75k|    return len;
  227|  7.75k|  }
  228|  11.5k|  return 0;
  229|  19.3k|}
Curl_junkscan:
  233|  9.23k|{
  234|  9.23k|  size_t n = strlen(url);
  235|  9.23k|  size_t i;
  236|  9.23k|  unsigned char control;
  237|  9.23k|  const unsigned char *p = (const unsigned char *)url;
  238|  9.23k|  if(n > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  9.23k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (238:6): [True: 0, False: 9.23k]
  ------------------
  239|      0|    return CURLUE_MALFORMED_INPUT;
  240|       |
  241|  9.23k|  control = allowspace ? 0x1f : 0x20;
  ------------------
  |  Branch (241:13): [True: 0, False: 9.23k]
  ------------------
  242|  23.2M|  for(i = 0; i < n; i++) {
  ------------------
  |  Branch (242:14): [True: 23.2M, False: 9.20k]
  ------------------
  243|  23.2M|    if(p[i] <= control || p[i] == 127)
  ------------------
  |  Branch (243:8): [True: 24, False: 23.2M]
  |  Branch (243:27): [True: 8, False: 23.2M]
  ------------------
  244|     32|      return CURLUE_MALFORMED_INPUT;
  245|  23.2M|  }
  246|  9.20k|  *urllen = n;
  247|  9.20k|  return CURLUE_OK;
  248|  9.23k|}
parse_port:
  349|  9.05k|{
  350|  9.05k|  const char *portptr;
  351|  9.05k|  const char *hostname = curlx_dyn_ptr(host);
  352|       |  /*
  353|       |   * Find the end of an IPv6 address on the ']' ending bracket.
  354|       |   */
  355|  9.05k|  if(hostname[0] == '[') {
  ------------------
  |  Branch (355:6): [True: 93, False: 8.96k]
  ------------------
  356|     93|    portptr = strchr(hostname, ']');
  357|     93|    if(!portptr)
  ------------------
  |  Branch (357:8): [True: 3, False: 90]
  ------------------
  358|      3|      return CURLUE_BAD_IPV6;
  359|     90|    portptr++;
  360|       |    /* this is a RFC2732-style specified IP-address */
  361|     90|    if(*portptr) {
  ------------------
  |  Branch (361:8): [True: 9, False: 81]
  ------------------
  362|      9|      if(*portptr != ':')
  ------------------
  |  Branch (362:10): [True: 6, False: 3]
  ------------------
  363|      6|        return CURLUE_BAD_PORT_NUMBER;
  364|      9|    }
  365|     81|    else
  366|     81|      portptr = NULL;
  367|     90|  }
  368|  8.96k|  else
  369|  8.96k|    portptr = strchr(hostname, ':');
  370|       |
  371|  9.04k|  if(portptr) {
  ------------------
  |  Branch (371:6): [True: 261, False: 8.78k]
  ------------------
  372|    261|    curl_off_t port;
  373|    261|    size_t keep = portptr - hostname;
  374|       |
  375|       |    /* Browser behavior adaptation. If there is a colon with no digits after,
  376|       |       cut off the name there which makes us ignore the colon and use the
  377|       |       default port. Firefox, Chrome and Safari all do that.
  378|       |
  379|       |       Do not do it if the URL has no scheme, to make something that looks like
  380|       |       a scheme not work!
  381|       |    */
  382|    261|    curlx_dyn_setlen(host, keep);
  383|    261|    portptr++;
  384|    261|    if(!*portptr)
  ------------------
  |  Branch (384:8): [True: 72, False: 189]
  ------------------
  385|     72|      return has_scheme ? CURLUE_OK : CURLUE_BAD_PORT_NUMBER;
  ------------------
  |  Branch (385:14): [True: 25, False: 47]
  ------------------
  386|       |
  387|    189|    if(curlx_str_number(&portptr, &port, 0xffff) || *portptr)
  ------------------
  |  Branch (387:8): [True: 20, False: 169]
  |  Branch (387:53): [True: 7, False: 162]
  ------------------
  388|     27|      return CURLUE_BAD_PORT_NUMBER;
  389|       |
  390|    162|    u->portnum = (unsigned short)port;
  391|       |    /* generate a new port number string to get rid of leading zeroes etc */
  392|    162|    curlx_free(u->port);
  ------------------
  |  | 1483|    162|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  393|    162|    u->port = curl_maprintf("%" CURL_FORMAT_CURL_OFF_T, port);
  ------------------
  |  |  341|    162|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  ------------------
  394|    162|    if(!u->port)
  ------------------
  |  Branch (394:8): [True: 0, False: 162]
  ------------------
  395|      0|      return CURLUE_OUT_OF_MEMORY;
  396|    162|  }
  397|       |
  398|  8.94k|  return CURLUE_OK;
  399|  9.04k|}
ipv6_parse:
  410|    112|{
  411|    112|  size_t len;
  412|    112|  DEBUGASSERT(*hostname == '[');
  ------------------
  |  | 1081|    112|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (412:3): [True: 0, False: 112]
  |  Branch (412:3): [True: 112, False: 0]
  ------------------
  413|    112|  if(hlen < 4) /* '[::]' is the shortest possible valid string */
  ------------------
  |  Branch (413:6): [True: 4, False: 108]
  ------------------
  414|      4|    return CURLUE_BAD_IPV6;
  415|    108|  hostname++;
  416|    108|  hlen -= 2;
  417|       |
  418|       |  /* only valid IPv6 letters are ok */
  419|    108|  len = strspn(hostname, "0123456789abcdefABCDEF:.");
  420|       |
  421|    108|  if(hlen != len) {
  ------------------
  |  Branch (421:6): [True: 68, False: 40]
  ------------------
  422|     68|    hlen = len;
  423|     68|    if(hostname[len] == '%') {
  ------------------
  |  Branch (423:8): [True: 59, False: 9]
  ------------------
  424|       |      /* this could now be '%[zone id]' */
  425|     59|      char zoneid[16];
  426|     59|      int i = 0;
  427|     59|      char *h = &hostname[len + 1];
  428|       |      /* pass '25' if present and is a URL encoded percent sign */
  429|     59|      if(!strncmp(h, "25", 2) && h[2] && (h[2] != ']'))
  ------------------
  |  Branch (429:10): [True: 5, False: 54]
  |  Branch (429:34): [True: 4, False: 1]
  |  Branch (429:42): [True: 1, False: 3]
  ------------------
  430|      1|        h += 2;
  431|    426|      while(*h && (*h != ']') && (i < 15))
  ------------------
  |  Branch (431:13): [True: 419, False: 7]
  |  Branch (431:19): [True: 383, False: 36]
  |  Branch (431:34): [True: 367, False: 16]
  ------------------
  432|    367|        zoneid[i++] = *h++;
  433|     59|      if(!i || (']' != *h))
  ------------------
  |  Branch (433:10): [True: 3, False: 56]
  |  Branch (433:16): [True: 23, False: 33]
  ------------------
  434|     26|        return CURLUE_BAD_IPV6;
  435|     33|      zoneid[i] = 0;
  436|     33|      u->zoneid = curlx_strdup(zoneid);
  ------------------
  |  | 1477|     33|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  437|     33|      if(!u->zoneid)
  ------------------
  |  Branch (437:10): [True: 0, False: 33]
  ------------------
  438|      0|        return CURLUE_OUT_OF_MEMORY;
  439|     33|      hostname[len] = ']'; /* insert end bracket */
  440|     33|      hostname[len + 1] = 0; /* terminate the hostname */
  441|     33|    }
  442|      9|    else
  443|      9|      return CURLUE_BAD_IPV6;
  444|       |    /* hostname is fine */
  445|     68|  }
  446|       |
  447|       |  /* Normalize the IPv6 address */
  448|     73|  {
  449|     73|    char dest[16]; /* fits a binary IPv6 address */
  450|     73|    hostname[hlen] = 0; /* end the address there */
  451|     73|    if(curlx_inet_pton(AF_INET6, hostname, dest) != 1)
  ------------------
  |  |   43|     73|  inet_pton(x, y, z)
  ------------------
  |  Branch (451:8): [True: 14, False: 59]
  ------------------
  452|     14|      return CURLUE_BAD_IPV6;
  453|     59|    if(curlx_inet_ntop(AF_INET6, dest, hostname, hlen + 1)) {
  ------------------
  |  |   44|     59|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  |  |  ------------------
  |  |  |  Branch (44:3): [True: 48, False: 11]
  |  |  ------------------
  ------------------
  454|     48|      hlen = strlen(hostname); /* might be shorter now */
  455|     48|      hostname[hlen + 1] = 0;
  456|     48|    }
  457|     59|    hostname[hlen] = ']'; /* restore ending bracket */
  458|     59|  }
  459|      0|  return CURLUE_OK;
  460|     73|}
ipv4_normalize:
  509|  8.94k|{
  510|  8.94k|  bool done = FALSE;
  ------------------
  |  | 1058|  8.94k|#define FALSE false
  ------------------
  511|  8.94k|  int n = 0;
  512|  8.94k|  const char *c = curlx_dyn_ptr(host);
  513|  8.94k|  unsigned int parts[4] = { 0, 0, 0, 0 };
  514|  8.94k|  CURLcode result = CURLE_OK;
  515|       |
  516|  8.94k|  if(*c == '[')
  ------------------
  |  Branch (516:6): [True: 83, False: 8.86k]
  ------------------
  517|     83|    return HOST_IPV6;
  ------------------
  |  |   50|     83|#define HOST_IPV6    3
  ------------------
  518|       |
  519|  12.7k|  while(!done) {
  ------------------
  |  Branch (519:9): [True: 9.77k, False: 2.92k]
  ------------------
  520|  9.77k|    int rc;
  521|  9.77k|    curl_off_t l;
  522|  9.77k|    if(*c == '0') {
  ------------------
  |  Branch (522:8): [True: 1.29k, False: 8.47k]
  ------------------
  523|  1.29k|      if(c[1] == 'x') {
  ------------------
  |  Branch (523:10): [True: 28, False: 1.27k]
  ------------------
  524|     28|        c += 2; /* skip the prefix */
  525|     28|        rc = curlx_str_hex(&c, &l, UINT_MAX);
  526|     28|        if(rc)
  ------------------
  |  Branch (526:12): [True: 15, False: 13]
  ------------------
  527|     15|          return HOST_NAME;
  ------------------
  |  |   48|     15|#define HOST_NAME    1
  ------------------
  528|     28|      }
  529|  1.27k|      else
  530|  1.27k|        rc = curlx_str_octal(&c, &l, UINT_MAX);
  531|  1.29k|    }
  532|  8.47k|    else
  533|  8.47k|      rc = curlx_str_number(&c, &l, UINT_MAX);
  534|       |
  535|  9.76k|    if(rc) {
  ------------------
  |  Branch (535:8): [True: 5.82k, False: 3.94k]
  ------------------
  536|  5.82k|      if(!n || (rc != STRE_NO_NUM) || *c)
  ------------------
  |  |   36|     61|#define STRE_NO_NUM   8
  ------------------
  |  Branch (536:10): [True: 5.75k, False: 61]
  |  Branch (536:16): [True: 7, False: 54]
  |  Branch (536:39): [True: 28, False: 26]
  ------------------
  537|  5.79k|        return HOST_NAME;
  ------------------
  |  |   48|  5.79k|#define HOST_NAME    1
  ------------------
  538|     26|      n--;
  539|     26|    }
  540|  3.94k|    else
  541|  3.94k|      parts[n] = (unsigned int)l;
  542|       |
  543|  3.96k|    switch(*c) {
  544|    930|    case '.':
  ------------------
  |  Branch (544:5): [True: 930, False: 3.03k]
  ------------------
  545|    930|      if(n == 3) {
  ------------------
  |  Branch (545:10): [True: 13, False: 917]
  ------------------
  546|     13|        if(c[1])
  ------------------
  |  Branch (546:12): [True: 8, False: 5]
  ------------------
  547|       |          /* something follows this dot */
  548|      8|          return HOST_NAME;
  ------------------
  |  |   48|      8|#define HOST_NAME    1
  ------------------
  549|      5|        done = TRUE;
  ------------------
  |  | 1055|      5|#define TRUE true
  ------------------
  550|      5|      }
  551|    917|      else {
  552|    917|        n++;
  553|    917|        c++;
  554|    917|      }
  555|    922|      break;
  556|       |
  557|  2.91k|    case '\0':
  ------------------
  |  Branch (557:5): [True: 2.91k, False: 1.05k]
  ------------------
  558|  2.91k|      done = TRUE;
  ------------------
  |  | 1055|  2.91k|#define TRUE true
  ------------------
  559|  2.91k|      break;
  560|       |
  561|    121|    default:
  ------------------
  |  Branch (561:5): [True: 121, False: 3.84k]
  ------------------
  562|    121|      return HOST_NAME;
  ------------------
  |  |   48|    121|#define HOST_NAME    1
  ------------------
  563|  3.96k|    }
  564|  3.96k|  }
  565|       |
  566|  2.92k|  switch(n) {
  ------------------
  |  Branch (566:10): [True: 2.92k, False: 0]
  ------------------
  567|  2.55k|  case 0: /* a -- 32 bits */
  ------------------
  |  Branch (567:3): [True: 2.55k, False: 371]
  ------------------
  568|  2.55k|    curlx_dyn_reset(host);
  569|       |
  570|  2.55k|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  571|  2.55k|                            (parts[0] >> 24),
  572|  2.55k|                            ((parts[0] >> 16) & 0xff),
  573|  2.55k|                            ((parts[0] >> 8) & 0xff),
  574|  2.55k|                            (parts[0] & 0xff));
  575|  2.55k|    break;
  576|    102|  case 1: /* a.b -- 8.24 bits */
  ------------------
  |  Branch (576:3): [True: 102, False: 2.82k]
  ------------------
  577|    102|    if((parts[0] > 0xff) || (parts[1] > 0xffffff))
  ------------------
  |  Branch (577:8): [True: 36, False: 66]
  |  Branch (577:29): [True: 20, False: 46]
  ------------------
  578|     56|      return HOST_NAME;
  ------------------
  |  |   48|     56|#define HOST_NAME    1
  ------------------
  579|     46|    curlx_dyn_reset(host);
  580|     46|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  581|     46|                            (parts[0]),
  582|     46|                            ((parts[1] >> 16) & 0xff),
  583|     46|                            ((parts[1] >> 8) & 0xff),
  584|     46|                            (parts[1] & 0xff));
  585|     46|    break;
  586|    134|  case 2: /* a.b.c -- 8.8.16 bits */
  ------------------
  |  Branch (586:3): [True: 134, False: 2.78k]
  ------------------
  587|    134|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xffff))
  ------------------
  |  Branch (587:8): [True: 44, False: 90]
  |  Branch (587:29): [True: 38, False: 52]
  |  Branch (587:50): [True: 33, False: 19]
  ------------------
  588|    115|      return HOST_NAME;
  ------------------
  |  |   48|    115|#define HOST_NAME    1
  ------------------
  589|     19|    curlx_dyn_reset(host);
  590|     19|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  591|     19|                            (parts[0]),
  592|     19|                            (parts[1]),
  593|     19|                            ((parts[2] >> 8) & 0xff),
  594|     19|                            (parts[2] & 0xff));
  595|     19|    break;
  596|    135|  case 3: /* a.b.c.d -- 8.8.8.8 bits */
  ------------------
  |  Branch (596:3): [True: 135, False: 2.78k]
  ------------------
  597|    135|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff) ||
  ------------------
  |  Branch (597:8): [True: 26, False: 109]
  |  Branch (597:29): [True: 30, False: 79]
  |  Branch (597:50): [True: 26, False: 53]
  ------------------
  598|     53|       (parts[3] > 0xff))
  ------------------
  |  Branch (598:8): [True: 36, False: 17]
  ------------------
  599|    118|      return HOST_NAME;
  ------------------
  |  |   48|    118|#define HOST_NAME    1
  ------------------
  600|     17|    curlx_dyn_reset(host);
  601|     17|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  602|     17|                            (parts[0]),
  603|     17|                            (parts[1]),
  604|     17|                            (parts[2]),
  605|     17|                            (parts[3]));
  606|     17|    break;
  607|  2.92k|  }
  608|  2.63k|  if(result)
  ------------------
  |  Branch (608:6): [True: 0, False: 2.63k]
  ------------------
  609|      0|    return HOST_ERROR;
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  610|  2.63k|  return HOST_IPV4;
  ------------------
  |  |   49|  2.63k|#define HOST_IPV4    2
  ------------------
  611|  2.63k|}
dedotdotify:
  754|    792|{
  755|    792|  struct dynbuf out;
  756|    792|  CURLcode result = CURLE_OK;
  757|       |
  758|       |  /* variables for leading dot checks */
  759|    792|  const char *dinput = input;
  760|    792|  size_t dlen = clen;
  761|       |
  762|    792|  *outp = NULL;
  763|       |  /* a single byte path cannot be cleaned up */
  764|    792|  if(clen < 2)
  ------------------
  |  Branch (764:6): [True: 6, False: 786]
  ------------------
  765|      6|    return 0;
  766|       |
  767|    786|  curlx_dyn_init(&out, clen + 1);
  768|       |
  769|       |  /* if the input buffer begins with a prefix of "../" or "./", then remove
  770|       |     that prefix from the input buffer; otherwise, */
  771|    786|  if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (771:6): [True: 0, False: 786]
  ------------------
  772|      0|    if(ISSLASH(*dinput)) {
  ------------------
  |  |  735|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  773|       |      /* one dot followed by a slash */
  774|      0|      input = dinput + 1;
  775|      0|      clen = dlen - 1;
  776|      0|    }
  777|       |
  778|       |    /* if the input buffer consists only of "." or "..", then remove
  779|       |       that from the input buffer; otherwise, */
  780|      0|    else if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (780:13): [True: 0, False: 0]
  ------------------
  781|      0|      if(!dlen)
  ------------------
  |  Branch (781:10): [True: 0, False: 0]
  ------------------
  782|       |        /* .. [end] */
  783|      0|        goto end;
  784|      0|      else if(ISSLASH(*dinput)) {
  ------------------
  |  |  735|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  785|       |        /* ../ */
  786|      0|        input = dinput + 1;
  787|      0|        clen = dlen - 1;
  788|      0|      }
  789|      0|    }
  790|      0|  }
  791|       |
  792|  12.2M|  while(clen && !result) { /* until end of path content */
  ------------------
  |  Branch (792:9): [True: 12.2M, False: 757]
  |  Branch (792:17): [True: 12.2M, False: 0]
  ------------------
  793|  12.2M|    if(ISSLASH(*input)) {
  ------------------
  |  |  735|  12.2M|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 968k, False: 11.3M]
  |  |  ------------------
  ------------------
  794|   968k|      const char *p = &input[1];
  795|   968k|      size_t blen = clen - 1;
  796|       |      /* if the input buffer begins with a prefix of "/./" or "/.", where "."
  797|       |         is a complete path segment, then replace that prefix with "/" in the
  798|       |         input buffer; otherwise, */
  799|   968k|      if(is_dot(&p, &blen)) {
  ------------------
  |  Branch (799:10): [True: 23.5k, False: 944k]
  ------------------
  800|  23.5k|        if(!blen) { /* /. */
  ------------------
  |  Branch (800:12): [True: 14, False: 23.4k]
  ------------------
  801|     14|          result = curlx_dyn_addn(&out, "/", 1);
  802|     14|          break;
  803|     14|        }
  804|  23.4k|        else if(ISSLASH(*p)) { /* /./ */
  ------------------
  |  |  735|  23.4k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 2.17k, False: 21.3k]
  |  |  ------------------
  ------------------
  805|  2.17k|          input = p;
  806|  2.17k|          clen = blen;
  807|  2.17k|          continue;
  808|  2.17k|        }
  809|       |
  810|       |        /* if the input buffer begins with a prefix of "/../" or "/..", where
  811|       |           ".." is a complete path segment, then replace that prefix with "/"
  812|       |           in the input buffer and remove the last segment and its preceding
  813|       |           "/" (if any) from the output buffer; otherwise, */
  814|  21.3k|        else if(is_dot(&p, &blen) && (ISSLASH(*p) || !blen)) {
  ------------------
  |  |  735|  29.7k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 10.8k, False: 4.03k]
  |  |  ------------------
  ------------------
  |  Branch (814:17): [True: 14.8k, False: 6.44k]
  |  Branch (814:54): [True: 15, False: 4.02k]
  ------------------
  815|       |          /* remove the last segment from the output buffer */
  816|  10.8k|          size_t len = curlx_dyn_len(&out);
  817|  10.8k|          if(len) {
  ------------------
  |  Branch (817:14): [True: 10.4k, False: 445]
  ------------------
  818|  10.4k|            const char *ptr = curlx_dyn_ptr(&out);
  819|  10.4k|            const char *last = memrchr(ptr, '/', len);
  820|  10.4k|            if(last)
  ------------------
  |  Branch (820:16): [True: 10.4k, False: 0]
  ------------------
  821|       |              /* trim the output at the slash */
  822|  10.4k|              curlx_dyn_setlen(&out, last - ptr);
  823|  10.4k|          }
  824|       |
  825|  10.8k|          if(blen) { /* /../ */
  ------------------
  |  Branch (825:14): [True: 10.8k, False: 15]
  ------------------
  826|  10.8k|            input = p;
  827|  10.8k|            clen = blen;
  828|  10.8k|            continue;
  829|  10.8k|          }
  830|     15|          result = curlx_dyn_addn(&out, "/", 1);
  831|     15|          break;
  832|  10.8k|        }
  833|  23.5k|      }
  834|   968k|    }
  835|       |
  836|       |    /* move the first path segment in the input buffer to the end of the
  837|       |       output buffer, including the initial "/" character (if any) and any
  838|       |       subsequent characters up to, but not including, the next "/" character
  839|       |       or the end of the input buffer. */
  840|       |
  841|  12.2M|    result = curlx_dyn_addn(&out, input, 1);
  842|  12.2M|    input++;
  843|  12.2M|    clen--;
  844|  12.2M|  }
  845|    786|end:
  846|    786|  if(!result) {
  ------------------
  |  Branch (846:6): [True: 786, False: 0]
  ------------------
  847|    786|    if(curlx_dyn_len(&out))
  ------------------
  |  Branch (847:8): [True: 786, False: 0]
  ------------------
  848|    786|      *outp = curlx_dyn_ptr(&out);
  849|      0|    else {
  850|      0|      *outp = curlx_strdup("");
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  851|      0|      if(!*outp)
  ------------------
  |  Branch (851:10): [True: 0, False: 0]
  ------------------
  852|      0|        return 1;
  853|      0|    }
  854|    786|  }
  855|    786|  return result ? 1 : 0; /* success */
  ------------------
  |  Branch (855:10): [True: 0, False: 786]
  ------------------
  856|    786|}
parse_file:
  865|     72|{
  866|     72|  const char *path;
  867|     72|  size_t pathlen;
  868|       |
  869|     72|  *pathp = NULL;
  870|     72|  *pathlenp = 0;
  871|     72|  if(urllen <= 6)
  ------------------
  |  Branch (871:6): [True: 3, False: 69]
  ------------------
  872|       |    /* file:/ is not enough to actually be a complete file: URL */
  873|      3|    return CURLUE_BAD_FILE_URL;
  874|       |
  875|       |  /* path has been allocated large enough to hold this */
  876|     69|  path = &url[5];
  877|     69|  pathlen = urllen - 5;
  878|       |
  879|       |  /* RFC 8089: file-hier-part = ( "//" auth-path ) / local-path, where
  880|       |     local-path also starts with a "/". So reject anything that doesn't
  881|       |     start with at least one "/" */
  882|     69|  if(path[0] != '/')
  ------------------
  |  Branch (882:6): [True: 0, False: 69]
  ------------------
  883|      0|    return CURLUE_BAD_FILE_URL;
  884|       |
  885|       |  /* Extra handling URLs with an authority component (i.e. that start with
  886|       |   * "file://")
  887|       |   *
  888|       |   * We allow omitted hostname (e.g. file:/<path>) -- valid according to
  889|       |   * RFC 8089, but not the (current) WHAT-WG URL spec.
  890|       |   */
  891|     69|  if(path[1] == '/') {
  ------------------
  |  Branch (891:6): [True: 43, False: 26]
  ------------------
  892|       |    /* swallow the two slashes */
  893|     43|    const char *ptr = &path[2];
  894|       |
  895|       |    /*
  896|       |     * According to RFC 8089, a file: URL can be reliably dereferenced if:
  897|       |     *
  898|       |     *  o it has no/blank hostname, or
  899|       |     *
  900|       |     *  o the hostname matches "localhost" (case-insensitively), or
  901|       |     *
  902|       |     *  o the hostname is a FQDN that resolves to this machine, or
  903|       |     *
  904|       |     * For brevity, we only consider URLs with empty, "localhost", or
  905|       |     * "127.0.0.1" hostnames as local, otherwise as an UNC String.
  906|       |     *
  907|       |     * Additionally, there is an exception for URLs with a Windows drive
  908|       |     * letter in the authority (which was accidentally omitted from RFC 8089
  909|       |     * Appendix E, but believe me, it was meant to be there. --MK)
  910|       |     */
  911|     43|    if(ptr[0] != '/' && !STARTS_WITH_URL_DRIVE_PREFIX(ptr)) {
  ------------------
  |  |   49|     34|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 19, False: 15]
  |  |  |  Branch (49:25): [True: 16, False: 3]
  |  |  ------------------
  |  |   50|     34|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 13, False: 5]
  |  |  |  Branch (50:25): [True: 8, False: 5]
  |  |  ------------------
  |  |   51|     34|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 8, False: 16]
  |  |  |  Branch (51:24): [True: 8, False: 8]
  |  |  ------------------
  |  |   52|     34|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 13]
  |  |  |  Branch (52:24): [True: 3, False: 10]
  |  |  |  Branch (52:44): [True: 5, False: 5]
  |  |  ------------------
  ------------------
  |  Branch (911:8): [True: 34, False: 9]
  ------------------
  912|       |      /* the URL includes a hostname, it must match "localhost" or
  913|       |         "127.0.0.1" to be valid */
  914|     23|      if(checkprefix("localhost/", ptr) ||
  ------------------
  |  |   33|     46|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|     23|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 22]
  |  |  ------------------
  ------------------
  915|     22|         checkprefix("127.0.0.1/", ptr)) {
  ------------------
  |  |   33|     22|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|     22|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 22]
  |  |  ------------------
  ------------------
  916|      1|        ptr += 9; /* now points to the slash after the host */
  917|      1|      }
  918|     22|      else
  919|       |        /* Invalid file://hostname/, expected localhost or 127.0.0.1 or
  920|       |           none */
  921|     22|        return CURLUE_BAD_FILE_URL;
  922|     23|    }
  923|       |
  924|     21|    path = ptr;
  925|     21|    pathlen = urllen - (ptr - url);
  926|     21|  }
  927|       |
  928|     47|#if !defined(_WIN32) && !defined(MSDOS) && !defined(__CYGWIN__)
  929|       |  /* Do not allow Windows drive letters when not in Windows.
  930|       |   * This catches both "file:/c:" and "file:c:" */
  931|     47|  if(('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) ||
  ------------------
  |  |   49|     36|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 16, False: 20]
  |  |  |  Branch (49:25): [True: 13, False: 3]
  |  |  ------------------
  |  |   50|     36|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 11, False: 12]
  |  |  |  Branch (50:25): [True: 8, False: 3]
  |  |  ------------------
  |  |   51|     36|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 6, False: 15]
  |  |  |  Branch (51:24): [True: 7, False: 8]
  |  |  ------------------
  |  |   52|     36|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 10]
  |  |  |  Branch (52:24): [True: 3, False: 7]
  |  |  |  Branch (52:44): [True: 3, False: 4]
  |  |  ------------------
  ------------------
  |  Branch (931:7): [True: 36, False: 11]
  ------------------
  932|     38|     STARTS_WITH_URL_DRIVE_PREFIX(path)) {
  ------------------
  |  |   49|     38|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 7, False: 31]
  |  |  |  Branch (49:25): [True: 7, False: 0]
  |  |  ------------------
  |  |   50|     38|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 4, False: 27]
  |  |  |  Branch (50:25): [True: 4, False: 0]
  |  |  ------------------
  |  |   51|     38|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 5, False: 6]
  |  |  |  Branch (51:24): [True: 6, False: 0]
  |  |  ------------------
  |  |   52|     38|   ((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]
  |  |  ------------------
  ------------------
  933|       |    /* File drive letters are only accepted in MS-DOS/Windows */
  934|     20|    return CURLUE_BAD_FILE_URL;
  935|     20|  }
  936|       |#else
  937|       |  /* If the path starts with a slash and a drive letter, ditch the slash */
  938|       |  if('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) {
  939|       |    /* This cannot be done with strcpy, as the memory chunks overlap! */
  940|       |    path++;
  941|       |    pathlen--;
  942|       |  }
  943|       |#endif
  944|     27|  u->scheme = curlx_strdup("file");
  ------------------
  |  | 1477|     27|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  945|     27|  if(!u->scheme)
  ------------------
  |  Branch (945:6): [True: 0, False: 27]
  ------------------
  946|      0|    return CURLUE_OUT_OF_MEMORY;
  947|       |
  948|     27|  *pathp = path;
  949|     27|  *pathlenp = pathlen;
  950|     27|  return CURLUE_OK;
  951|     27|}
curl_url:
 1312|  9.47k|{
 1313|  9.47k|  return curlx_calloc(1, sizeof(struct Curl_URL));
  ------------------
  |  | 1480|  9.47k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1314|  9.47k|}
curl_url_cleanup:
 1317|  31.9k|{
 1318|  31.9k|  if(u) {
  ------------------
  |  Branch (1318:6): [True: 9.47k, False: 22.4k]
  ------------------
 1319|  9.47k|    free_urlhandle(u);
 1320|  9.47k|    curlx_free(u);
  ------------------
  |  | 1483|  9.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1321|  9.47k|  }
 1322|  31.9k|}
curl_url_get:
 1564|  84.1k|{
 1565|  84.1k|  const char *ptr;
 1566|  84.1k|  CURLUcode ifmissing = CURLUE_UNKNOWN_PART;
 1567|  84.1k|  char portbuf[7];
 1568|  84.1k|  bool plusdecode = FALSE;
  ------------------
  |  | 1058|  84.1k|#define FALSE false
  ------------------
 1569|  84.1k|  if(!u)
  ------------------
  |  Branch (1569:6): [True: 0, False: 84.1k]
  ------------------
 1570|      0|    return CURLUE_BAD_HANDLE;
 1571|  84.1k|  if(!part)
  ------------------
  |  Branch (1571:6): [True: 0, False: 84.1k]
  ------------------
 1572|      0|    return CURLUE_BAD_PARTPOINTER;
 1573|  84.1k|  *part = NULL;
 1574|       |
 1575|  84.1k|  switch(what) {
 1576|  10.6k|  case CURLUPART_SCHEME:
  ------------------
  |  Branch (1576:3): [True: 10.6k, False: 73.4k]
  ------------------
 1577|  10.6k|    ptr = u->scheme;
 1578|  10.6k|    ifmissing = CURLUE_NO_SCHEME;
 1579|  10.6k|    flags &= ~U_CURLU_URLDECODE; /* never for schemes */
  ------------------
  |  |   63|  10.6k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   93|  10.6k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1580|  10.6k|    if((flags & CURLU_NO_GUESS_SCHEME) && u->guessed_scheme)
  ------------------
  |  |  105|  10.6k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1580:8): [True: 3.74k, False: 6.92k]
  |  Branch (1580:43): [True: 3.73k, False: 8]
  ------------------
 1581|  3.73k|      return CURLUE_NO_SCHEME;
 1582|  6.93k|    break;
 1583|  8.01k|  case CURLUPART_USER:
  ------------------
  |  Branch (1583:3): [True: 8.01k, False: 76.1k]
  ------------------
 1584|  8.01k|    ptr = u->user;
 1585|  8.01k|    ifmissing = CURLUE_NO_USER;
 1586|  8.01k|    break;
 1587|  8.01k|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (1587:3): [True: 8.01k, False: 76.1k]
  ------------------
 1588|  8.01k|    ptr = u->password;
 1589|  8.01k|    ifmissing = CURLUE_NO_PASSWORD;
 1590|  8.01k|    break;
 1591|  6.28k|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (1591:3): [True: 6.28k, False: 77.8k]
  ------------------
 1592|  6.28k|    ptr = u->options;
 1593|  6.28k|    ifmissing = CURLUE_NO_OPTIONS;
 1594|  6.28k|    break;
 1595|  8.77k|  case CURLUPART_HOST:
  ------------------
  |  Branch (1595:3): [True: 8.77k, False: 75.3k]
  ------------------
 1596|  8.77k|    ptr = u->host;
 1597|  8.77k|    ifmissing = CURLUE_NO_HOST;
 1598|  8.77k|    break;
 1599|  8.58k|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (1599:3): [True: 8.58k, False: 75.5k]
  ------------------
 1600|  8.58k|    ptr = u->zoneid;
 1601|  8.58k|    ifmissing = CURLUE_NO_ZONEID;
 1602|  8.58k|    break;
 1603|  8.64k|  case CURLUPART_PORT:
  ------------------
  |  Branch (1603:3): [True: 8.64k, False: 75.5k]
  ------------------
 1604|  8.64k|    ptr = u->port;
 1605|  8.64k|    ifmissing = CURLUE_NO_PORT;
 1606|  8.64k|    flags &= ~U_CURLU_URLDECODE; /* never for port */
  ------------------
  |  |   63|  8.64k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   93|  8.64k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1607|  8.64k|    if(!ptr && (flags & CURLU_DEFAULT_PORT) && u->scheme) {
  ------------------
  |  |   84|  8.50k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1607:8): [True: 8.50k, False: 136]
  |  Branch (1607:16): [True: 6.68k, False: 1.82k]
  |  Branch (1607:48): [True: 6.68k, False: 0]
  ------------------
 1608|       |      /* there is no stored port number, but asked to deliver
 1609|       |         a default one for the scheme */
 1610|  6.68k|      const struct Curl_scheme *h = Curl_get_scheme(u->scheme);
 1611|  6.68k|      if(h) {
  ------------------
  |  Branch (1611:10): [True: 6.68k, False: 0]
  ------------------
 1612|  6.68k|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1613|  6.68k|        ptr = portbuf;
 1614|  6.68k|      }
 1615|  6.68k|    }
 1616|  1.96k|    else if(ptr && u->scheme) {
  ------------------
  |  Branch (1616:13): [True: 136, False: 1.82k]
  |  Branch (1616:20): [True: 136, False: 0]
  ------------------
 1617|       |      /* there is a stored port number, but ask to inhibit if
 1618|       |         it matches the default one for the scheme */
 1619|    136|      const struct Curl_scheme *h = Curl_get_scheme(u->scheme);
 1620|    136|      if(h && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1620:10): [True: 136, False: 0]
  |  Branch (1620:15): [True: 4, False: 132]
  ------------------
 1621|      4|         (flags & CURLU_NO_DEFAULT_PORT))
  ------------------
  |  |   85|      4|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1621:10): [True: 1, False: 3]
  ------------------
 1622|      1|        ptr = NULL;
 1623|    136|    }
 1624|  8.64k|    break;
 1625|  6.30k|  case CURLUPART_PATH:
  ------------------
  |  Branch (1625:3): [True: 6.30k, False: 77.8k]
  ------------------
 1626|  6.30k|    ptr = u->path;
 1627|  6.30k|    if(!ptr)
  ------------------
  |  Branch (1627:8): [True: 5.73k, False: 568]
  ------------------
 1628|  5.73k|      ptr = "/";
 1629|  6.30k|    break;
 1630|  6.28k|  case CURLUPART_QUERY:
  ------------------
  |  Branch (1630:3): [True: 6.28k, False: 77.8k]
  ------------------
 1631|  6.28k|    ptr = u->query;
 1632|  6.28k|    ifmissing = CURLUE_NO_QUERY;
 1633|  6.28k|    plusdecode = flags & CURLU_URLDECODE;
  ------------------
  |  |   93|  6.28k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1634|  6.28k|    if(ptr && !ptr[0] && !(flags & CURLU_GET_EMPTY))
  ------------------
  |  |  102|     29|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1634:8): [True: 489, False: 5.79k]
  |  Branch (1634:15): [True: 29, False: 460]
  |  Branch (1634:26): [True: 0, False: 29]
  ------------------
 1635|       |      /* there was a blank query and the user do not ask for it */
 1636|      0|      ptr = NULL;
 1637|  6.28k|    break;
 1638|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (1638:3): [True: 0, False: 84.1k]
  ------------------
 1639|      0|    ptr = u->fragment;
 1640|      0|    ifmissing = CURLUE_NO_FRAGMENT;
 1641|      0|    if(!ptr && u->fragment_present && flags & CURLU_GET_EMPTY)
  ------------------
  |  |  102|      0|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1641:8): [True: 0, False: 0]
  |  Branch (1641:16): [True: 0, False: 0]
  |  Branch (1641:39): [True: 0, False: 0]
  ------------------
 1642|       |      /* there was a blank fragment and the user asks for it */
 1643|      0|      ptr = "";
 1644|      0|    break;
 1645|  12.5k|  case CURLUPART_URL:
  ------------------
  |  Branch (1645:3): [True: 12.5k, False: 71.5k]
  ------------------
 1646|  12.5k|    return urlget_url(u, part, flags);
 1647|      0|  default:
  ------------------
  |  Branch (1647:3): [True: 0, False: 84.1k]
  ------------------
 1648|      0|    ptr = NULL;
 1649|      0|    break;
 1650|  84.1k|  }
 1651|  67.8k|  if(ptr)
  ------------------
  |  Branch (1651:6): [True: 30.9k, False: 36.8k]
  ------------------
 1652|  30.9k|    return urlget_format(u, what, ptr, part, plusdecode, flags);
 1653|       |
 1654|  36.8k|  return ifmissing;
 1655|  67.8k|}
curl_url_set:
 1830|  9.48k|{
 1831|  9.48k|  char **storep = NULL;
 1832|  9.48k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   94|  9.48k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1832:20): [True: 0, False: 9.48k]
  ------------------
 1833|  9.48k|  bool plusencode = FALSE;
  ------------------
  |  | 1058|  9.48k|#define FALSE false
  ------------------
 1834|  9.48k|  bool pathmode = FALSE;
  ------------------
  |  | 1058|  9.48k|#define FALSE false
  ------------------
 1835|  9.48k|  bool leadingslash = FALSE;
  ------------------
  |  | 1058|  9.48k|#define FALSE false
  ------------------
 1836|  9.48k|  bool appendquery = FALSE;
  ------------------
  |  | 1058|  9.48k|#define FALSE false
  ------------------
 1837|  9.48k|  bool equalsencode = FALSE;
  ------------------
  |  | 1058|  9.48k|#define FALSE false
  ------------------
 1838|  9.48k|  size_t nalloc;
 1839|       |
 1840|  9.48k|  if(!u)
  ------------------
  |  Branch (1840:6): [True: 0, False: 9.48k]
  ------------------
 1841|      0|    return CURLUE_BAD_HANDLE;
 1842|  9.48k|  if(!part)
  ------------------
  |  Branch (1842:6): [True: 0, False: 9.48k]
  ------------------
 1843|       |    /* setting a part to NULL clears it */
 1844|      0|    return urlset_clear(u, what);
 1845|       |
 1846|  9.48k|  nalloc = strlen(part);
 1847|  9.48k|  if(nalloc > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  9.48k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1847:6): [True: 0, False: 9.48k]
  ------------------
 1848|       |    /* excessive input length */
 1849|      0|    return CURLUE_MALFORMED_INPUT;
 1850|       |
 1851|  9.48k|  switch(what) {
 1852|      0|  case CURLUPART_SCHEME: {
  ------------------
  |  Branch (1852:3): [True: 0, False: 9.48k]
  ------------------
 1853|      0|    CURLUcode status = set_url_scheme(u, part, flags);
 1854|      0|    if(status)
  ------------------
  |  Branch (1854:8): [True: 0, False: 0]
  ------------------
 1855|      0|      return status;
 1856|      0|    storep = &u->scheme;
 1857|      0|    urlencode = FALSE; /* never */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1858|      0|    break;
 1859|      0|  }
 1860|      0|  case CURLUPART_USER:
  ------------------
  |  Branch (1860:3): [True: 0, False: 9.48k]
  ------------------
 1861|      0|    storep = &u->user;
 1862|      0|    break;
 1863|      0|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (1863:3): [True: 0, False: 9.48k]
  ------------------
 1864|      0|    storep = &u->password;
 1865|      0|    break;
 1866|      0|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (1866:3): [True: 0, False: 9.48k]
  ------------------
 1867|      0|    storep = &u->options;
 1868|      0|    break;
 1869|      0|  case CURLUPART_HOST:
  ------------------
  |  Branch (1869:3): [True: 0, False: 9.48k]
  ------------------
 1870|      0|    storep = &u->host;
 1871|      0|    curlx_safefree(u->zoneid);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1872|      0|    break;
 1873|      0|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (1873:3): [True: 0, False: 9.48k]
  ------------------
 1874|      0|    storep = &u->zoneid;
 1875|      0|    break;
 1876|      9|  case CURLUPART_PORT:
  ------------------
  |  Branch (1876:3): [True: 9, False: 9.47k]
  ------------------
 1877|      9|    return set_url_port(u, part);
 1878|      0|  case CURLUPART_PATH:
  ------------------
  |  Branch (1878:3): [True: 0, False: 9.48k]
  ------------------
 1879|      0|    pathmode = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1880|      0|    leadingslash = TRUE; /* enforce */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1881|      0|    storep = &u->path;
 1882|      0|    break;
 1883|      0|  case CURLUPART_QUERY:
  ------------------
  |  Branch (1883:3): [True: 0, False: 9.48k]
  ------------------
 1884|      0|    plusencode = urlencode;
 1885|      0|    appendquery = (flags & CURLU_APPENDQUERY) ? 1 : 0;
  ------------------
  |  |   95|      0|#define CURLU_APPENDQUERY (1 << 8)        /* append a form style part */
  ------------------
  |  Branch (1885:19): [True: 0, False: 0]
  ------------------
 1886|      0|    equalsencode = appendquery;
 1887|      0|    storep = &u->query;
 1888|      0|    u->query_present = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1889|      0|    break;
 1890|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (1890:3): [True: 0, False: 9.48k]
  ------------------
 1891|      0|    storep = &u->fragment;
 1892|      0|    u->fragment_present = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1893|      0|    break;
 1894|  9.47k|  case CURLUPART_URL:
  ------------------
  |  Branch (1894:3): [True: 9.47k, False: 9]
  ------------------
 1895|  9.47k|    return set_url(u, part, nalloc, flags);
 1896|      0|  default:
  ------------------
  |  Branch (1896:3): [True: 0, False: 9.48k]
  ------------------
 1897|      0|    return CURLUE_UNKNOWN_PART;
 1898|  9.48k|  }
 1899|      0|  DEBUGASSERT(storep);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1899:3): [True: 0, False: 0]
  |  Branch (1899:3): [True: 0, False: 0]
  ------------------
 1900|      0|  {
 1901|      0|    const char *newp;
 1902|      0|    struct dynbuf enc;
 1903|      0|    curlx_dyn_init(&enc, (nalloc * 3) + 1 + leadingslash);
 1904|       |
 1905|      0|    if(leadingslash && (part[0] != '/')) {
  ------------------
  |  Branch (1905:8): [True: 0, False: 0]
  |  Branch (1905:24): [True: 0, False: 0]
  ------------------
 1906|      0|      CURLcode result = curlx_dyn_addn(&enc, "/", 1);
 1907|      0|      if(result)
  ------------------
  |  Branch (1907:10): [True: 0, False: 0]
  ------------------
 1908|      0|        return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1909|      0|    }
 1910|      0|    if(urlencode) {
  ------------------
  |  Branch (1910:8): [True: 0, False: 0]
  ------------------
 1911|      0|      const unsigned char *i;
 1912|       |
 1913|      0|      for(i = (const unsigned char *)part; *i; i++) {
  ------------------
  |  Branch (1913:44): [True: 0, False: 0]
  ------------------
 1914|      0|        CURLcode result;
 1915|      0|        if((*i == ' ') && plusencode) {
  ------------------
  |  Branch (1915:12): [True: 0, False: 0]
  |  Branch (1915:27): [True: 0, False: 0]
  ------------------
 1916|      0|          result = curlx_dyn_addn(&enc, "+", 1);
 1917|      0|          if(result)
  ------------------
  |  Branch (1917:14): [True: 0, False: 0]
  ------------------
 1918|      0|            return CURLUE_OUT_OF_MEMORY;
 1919|      0|        }
 1920|      0|        else if(ISUNRESERVED(*i) ||
  ------------------
  |  |   49|      0|#define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   41|      0|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   43|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (42:22): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (42:38): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   48|      0|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (48:20): [True: 0, False: 0]
  |  |  |  |  |  Branch (48:36): [True: 0, False: 0]
  |  |  |  |  |  Branch (48:52): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1921|      0|                (pathmode && allowed_in_path(*i)) ||
  ------------------
  |  Branch (1921:18): [True: 0, False: 0]
  |  Branch (1921:30): [True: 0, False: 0]
  ------------------
 1922|      0|                ((*i == '=') && equalsencode)) {
  ------------------
  |  Branch (1922:18): [True: 0, False: 0]
  |  Branch (1922:33): [True: 0, False: 0]
  ------------------
 1923|      0|          if((*i == '=') && equalsencode)
  ------------------
  |  Branch (1923:14): [True: 0, False: 0]
  |  Branch (1923:29): [True: 0, False: 0]
  ------------------
 1924|       |            /* only skip the first equals sign */
 1925|      0|            equalsencode = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1926|      0|          result = curlx_dyn_addn(&enc, i, 1);
 1927|      0|          if(result)
  ------------------
  |  Branch (1927:14): [True: 0, False: 0]
  ------------------
 1928|      0|            return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1929|      0|        }
 1930|      0|        else {
 1931|      0|          unsigned char out[3] = { '%' };
 1932|      0|          Curl_hexbyte(&out[1], *i);
 1933|      0|          result = curlx_dyn_addn(&enc, out, 3);
 1934|      0|          if(result)
  ------------------
  |  Branch (1934:14): [True: 0, False: 0]
  ------------------
 1935|      0|            return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1936|      0|        }
 1937|      0|      }
 1938|      0|    }
 1939|      0|    else {
 1940|      0|      char *p;
 1941|      0|      CURLcode result = curlx_dyn_add(&enc, part);
 1942|      0|      if(result)
  ------------------
  |  Branch (1942:10): [True: 0, False: 0]
  ------------------
 1943|      0|        return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1944|      0|      p = curlx_dyn_ptr(&enc);
 1945|      0|      while(*p) {
  ------------------
  |  Branch (1945:13): [True: 0, False: 0]
  ------------------
 1946|       |        /* make sure percent encoded are upper case */
 1947|      0|        if((*p == '%') && ISXDIGIT(p[1]) && ISXDIGIT(p[2]) &&
  ------------------
  |  |   39|      0|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (44: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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if((*p == '%') && ISXDIGIT(p[1]) && ISXDIGIT(p[2]) &&
  ------------------
  |  |   39|      0|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (44: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 (1947:12): [True: 0, False: 0]
  ------------------
 1948|      0|           (ISLOWER(p[1]) || ISLOWER(p[2]))) {
  ------------------
  |  |   43|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                         (ISLOWER(p[1]) || ISLOWER(p[2]))) {
  ------------------
  |  |   43|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1949|      0|          p[1] = Curl_raw_toupper(p[1]);
 1950|      0|          p[2] = Curl_raw_toupper(p[2]);
 1951|      0|          p += 3;
 1952|      0|        }
 1953|      0|        else
 1954|      0|          p++;
 1955|      0|      }
 1956|      0|    }
 1957|      0|    newp = curlx_dyn_ptr(&enc);
 1958|       |
 1959|      0|    if(appendquery && newp) {
  ------------------
  |  Branch (1959:8): [True: 0, False: 0]
  |  Branch (1959:23): [True: 0, False: 0]
  ------------------
 1960|       |      /* Append the 'newp' string onto the old query. Add a '&' separator if
 1961|       |         none is present at the end of the existing query already */
 1962|       |
 1963|      0|      size_t querylen = u->query ? strlen(u->query) : 0;
  ------------------
  |  Branch (1963:25): [True: 0, False: 0]
  ------------------
 1964|      0|      bool addamperand = querylen && (u->query[querylen - 1] != '&');
  ------------------
  |  Branch (1964:26): [True: 0, False: 0]
  |  Branch (1964:38): [True: 0, False: 0]
  ------------------
 1965|      0|      if(querylen) {
  ------------------
  |  Branch (1965:10): [True: 0, False: 0]
  ------------------
 1966|      0|        struct dynbuf qbuf;
 1967|      0|        curlx_dyn_init(&qbuf, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1968|       |
 1969|      0|        if(curlx_dyn_addn(&qbuf, u->query, querylen)) /* add original query */
  ------------------
  |  Branch (1969:12): [True: 0, False: 0]
  ------------------
 1970|      0|          goto nomem;
 1971|       |
 1972|      0|        if(addamperand) {
  ------------------
  |  Branch (1972:12): [True: 0, False: 0]
  ------------------
 1973|      0|          if(curlx_dyn_addn(&qbuf, "&", 1))
  ------------------
  |  Branch (1973:14): [True: 0, False: 0]
  ------------------
 1974|      0|            goto nomem;
 1975|      0|        }
 1976|      0|        if(curlx_dyn_add(&qbuf, newp))
  ------------------
  |  Branch (1976:12): [True: 0, False: 0]
  ------------------
 1977|      0|          goto nomem;
 1978|      0|        curlx_dyn_free(&enc);
 1979|      0|        curlx_free(*storep);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1980|      0|        *storep = curlx_dyn_ptr(&qbuf);
 1981|      0|        return CURLUE_OK;
 1982|      0|nomem:
 1983|      0|        curlx_dyn_free(&enc);
 1984|      0|        return CURLUE_OUT_OF_MEMORY;
 1985|      0|      }
 1986|      0|    }
 1987|      0|    else if(what == CURLUPART_HOST) {
  ------------------
  |  Branch (1987:13): [True: 0, False: 0]
  ------------------
 1988|      0|      size_t n = curlx_dyn_len(&enc);
 1989|      0|      if(!n && (flags & CURLU_NO_AUTHORITY)) {
  ------------------
  |  |   97|      0|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (1989:10): [True: 0, False: 0]
  |  Branch (1989:16): [True: 0, False: 0]
  ------------------
 1990|       |        /* Skip hostname check, it is allowed to be empty. */
 1991|      0|      }
 1992|      0|      else {
 1993|      0|        bool bad = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1994|      0|        if(!n)
  ------------------
  |  Branch (1994:12): [True: 0, False: 0]
  ------------------
 1995|      0|          bad = TRUE; /* empty hostname is not okay */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1996|      0|        else if(!urlencode) {
  ------------------
  |  Branch (1996:17): [True: 0, False: 0]
  ------------------
 1997|       |          /* if the hostname part was not URL encoded here, it was set ready
 1998|       |             URL encoded so we need to decode it to check */
 1999|      0|          size_t dlen;
 2000|      0|          char *decoded = NULL;
 2001|      0|          CURLcode result =
 2002|      0|            Curl_urldecode(newp, n, &decoded, &dlen, REJECT_CTRL);
 2003|      0|          if(result || hostname_check(u, decoded, dlen))
  ------------------
  |  Branch (2003:14): [True: 0, False: 0]
  |  Branch (2003:24): [True: 0, False: 0]
  ------------------
 2004|      0|            bad = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2005|      0|          curlx_free(decoded);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2006|      0|        }
 2007|      0|        else if(hostname_check(u, (char *)CURL_UNCONST(newp), n))
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (2007:17): [True: 0, False: 0]
  ------------------
 2008|      0|          bad = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2009|      0|        if(bad) {
  ------------------
  |  Branch (2009:12): [True: 0, False: 0]
  ------------------
 2010|      0|          curlx_dyn_free(&enc);
 2011|      0|          return CURLUE_BAD_HOSTNAME;
 2012|      0|        }
 2013|      0|      }
 2014|      0|    }
 2015|       |
 2016|      0|    curlx_free(*storep);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2017|      0|    *storep = (char *)CURL_UNCONST(newp);
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2018|      0|  }
 2019|      0|  return CURLUE_OK;
 2020|      0|}
urlapi.c:parse_authority:
  645|  9.05k|{
  646|  9.05k|  size_t offset;
  647|  9.05k|  CURLUcode uc;
  648|  9.05k|  CURLcode result;
  649|       |
  650|       |  /*
  651|       |   * Parse the login details and strip them out of the hostname.
  652|       |   */
  653|  9.05k|  uc = parse_hostname_login(u, auth, authlen, flags, &offset);
  654|  9.05k|  if(uc)
  ------------------
  |  Branch (654:6): [True: 1, False: 9.05k]
  ------------------
  655|      1|    goto out;
  656|       |
  657|  9.05k|  result = curlx_dyn_addn(host, auth + offset, authlen - offset);
  658|  9.05k|  if(result) {
  ------------------
  |  Branch (658:6): [True: 0, False: 9.05k]
  ------------------
  659|      0|    uc = cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  660|      0|    goto out;
  661|      0|  }
  662|       |
  663|  9.05k|  uc = parse_port(u, host, has_scheme);
  664|  9.05k|  if(uc)
  ------------------
  |  Branch (664:6): [True: 83, False: 8.97k]
  ------------------
  665|     83|    goto out;
  666|       |
  667|  8.97k|  if(!curlx_dyn_len(host))
  ------------------
  |  Branch (667:6): [True: 28, False: 8.94k]
  ------------------
  668|     28|    return CURLUE_NO_HOST;
  669|       |
  670|  8.94k|  switch(ipv4_normalize(host)) {
  671|  2.63k|  case HOST_IPV4:
  ------------------
  |  |   49|  2.63k|#define HOST_IPV4    2
  ------------------
  |  Branch (671:3): [True: 2.63k, False: 6.31k]
  ------------------
  672|  2.63k|    break;
  673|     83|  case HOST_IPV6:
  ------------------
  |  |   50|     83|#define HOST_IPV6    3
  ------------------
  |  Branch (673:3): [True: 83, False: 8.86k]
  ------------------
  674|     83|    uc = ipv6_parse(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  675|     83|    break;
  676|  6.22k|  case HOST_NAME:
  ------------------
  |  |   48|  6.22k|#define HOST_NAME    1
  ------------------
  |  Branch (676:3): [True: 6.22k, False: 2.71k]
  ------------------
  677|  6.22k|    uc = urldecode_host(host);
  678|  6.22k|    if(!uc)
  ------------------
  |  Branch (678:8): [True: 6.22k, False: 5]
  ------------------
  679|  6.22k|      uc = hostname_check(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  680|  6.22k|    break;
  681|      0|  case HOST_ERROR:
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  |  Branch (681:3): [True: 0, False: 8.94k]
  ------------------
  682|      0|    uc = CURLUE_OUT_OF_MEMORY;
  683|      0|    break;
  684|      0|  default:
  ------------------
  |  Branch (684:3): [True: 0, False: 8.94k]
  ------------------
  685|      0|    uc = CURLUE_BAD_HOSTNAME; /* Bad IPv4 address even */
  686|      0|    break;
  687|  8.94k|  }
  688|       |
  689|  9.02k|out:
  690|  9.02k|  return uc;
  691|  8.94k|}
urlapi.c:parse_hostname_login:
  262|  9.05k|{
  263|  9.05k|  CURLUcode ures = CURLUE_OK;
  264|  9.05k|  CURLcode result;
  265|  9.05k|  char *userp = NULL;
  266|  9.05k|  char *passwdp = NULL;
  267|  9.05k|  char *optionsp = NULL;
  268|  9.05k|  const struct Curl_scheme *h = NULL;
  269|       |
  270|       |  /* At this point, we assume all the other special cases have been taken
  271|       |   * care of, so the host is at most
  272|       |   *
  273|       |   *   [user[:password][;options]]@]hostname
  274|       |   *
  275|       |   * We need somewhere to put the embedded details, so do that first.
  276|       |   */
  277|  9.05k|  const char *ptr;
  278|       |
  279|  9.05k|  DEBUGASSERT(login);
  ------------------
  |  | 1081|  9.05k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (279:3): [True: 0, False: 9.05k]
  |  Branch (279:3): [True: 9.05k, False: 0]
  ------------------
  280|       |
  281|  9.05k|  *offset = 0;
  282|  9.05k|  ptr = memchr(login, '@', len);
  283|  9.05k|  if(!ptr)
  ------------------
  |  Branch (283:6): [True: 7.64k, False: 1.40k]
  ------------------
  284|  7.64k|    goto out;
  285|       |
  286|       |  /* We will now try to extract the
  287|       |   * possible login information in a string like:
  288|       |   * ftp://user:password@ftp.site.example:8021/README */
  289|  1.40k|  ptr++;
  290|       |
  291|       |  /* if this is a known scheme, get some details */
  292|  1.40k|  if(u->scheme)
  ------------------
  |  Branch (292:6): [True: 410, False: 999]
  ------------------
  293|    410|    h = Curl_get_scheme(u->scheme);
  294|       |
  295|       |  /* We could use the login information in the URL so extract it. Only parse
  296|       |     options if the handler says we should. Note that 'h' might be NULL! */
  297|  1.40k|  result = Curl_parse_login_details(login, ptr - login - 1,
  298|  1.40k|                                    &userp, &passwdp,
  299|  1.40k|                                    (h && (h->flags & PROTOPT_URLOPTIONS)) ?
  ------------------
  |  |  225|    394|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (299:38): [True: 394, False: 1.01k]
  |  Branch (299:43): [True: 217, False: 177]
  ------------------
  300|  1.40k|                                    &optionsp : NULL);
  301|  1.40k|  if(result) {
  ------------------
  |  Branch (301:6): [True: 0, False: 1.40k]
  ------------------
  302|       |    /* the only possible error from Curl_parse_login_details is out of
  303|       |       memory: */
  304|      0|    ures = CURLUE_OUT_OF_MEMORY;
  305|      0|    goto out;
  306|      0|  }
  307|       |
  308|  1.40k|  if(userp) {
  ------------------
  |  Branch (308:6): [True: 1.40k, False: 0]
  ------------------
  309|  1.40k|    if(flags & CURLU_DISALLOW_USER) {
  ------------------
  |  |   92|  1.40k|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
  |  Branch (309:8): [True: 1, False: 1.40k]
  ------------------
  310|       |      /* Option DISALLOW_USER is set and URL contains username. */
  311|      1|      ures = CURLUE_USER_NOT_ALLOWED;
  312|      1|      goto out;
  313|      1|    }
  314|  1.40k|    curlx_free(u->user);
  ------------------
  |  | 1483|  1.40k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  315|  1.40k|    u->user = userp;
  316|  1.40k|  }
  317|       |
  318|  1.40k|  if(passwdp) {
  ------------------
  |  Branch (318:6): [True: 338, False: 1.07k]
  ------------------
  319|    338|    curlx_free(u->password);
  ------------------
  |  | 1483|    338|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  320|    338|    u->password = passwdp;
  321|    338|  }
  322|       |
  323|  1.40k|  if(optionsp) {
  ------------------
  |  Branch (323:6): [True: 25, False: 1.38k]
  ------------------
  324|     25|    curlx_free(u->options);
  ------------------
  |  | 1483|     25|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  325|     25|    u->options = optionsp;
  326|     25|  }
  327|       |
  328|       |  /* the hostname starts at this offset */
  329|  1.40k|  *offset = ptr - login;
  330|  1.40k|  return CURLUE_OK;
  331|       |
  332|  7.64k|out:
  333|       |
  334|  7.64k|  curlx_free(userp);
  ------------------
  |  | 1483|  7.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  335|  7.64k|  curlx_free(passwdp);
  ------------------
  |  | 1483|  7.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  336|  7.64k|  curlx_free(optionsp);
  ------------------
  |  | 1483|  7.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  337|  7.64k|  u->user = NULL;
  338|  7.64k|  u->password = NULL;
  339|  7.64k|  u->options = NULL;
  340|       |
  341|  7.64k|  return ures;
  342|  1.40k|}
urlapi.c:urldecode_host:
  615|  6.22k|{
  616|  6.22k|  const char *per;
  617|  6.22k|  const char *hostname = curlx_dyn_ptr(host);
  618|  6.22k|  per = strchr(hostname, '%');
  619|  6.22k|  if(!per)
  ------------------
  |  Branch (619:6): [True: 5.90k, False: 324]
  ------------------
  620|       |    /* nothing to decode */
  621|  5.90k|    return CURLUE_OK;
  622|    324|  else {
  623|       |    /* encoded */
  624|    324|    size_t dlen;
  625|    324|    char *decoded;
  626|    324|    CURLcode result = Curl_urldecode(hostname, 0, &decoded, &dlen,
  627|    324|                                     REJECT_CTRL);
  628|    324|    if(result)
  ------------------
  |  Branch (628:8): [True: 5, False: 319]
  ------------------
  629|      5|      return CURLUE_BAD_HOSTNAME;
  630|    319|    curlx_dyn_reset(host);
  631|    319|    result = curlx_dyn_addn(host, decoded, dlen);
  632|    319|    curlx_free(decoded);
  ------------------
  |  | 1483|    319|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  633|    319|    if(result)
  ------------------
  |  Branch (633:8): [True: 0, False: 319]
  ------------------
  634|      0|      return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  635|    319|  }
  636|       |
  637|    319|  return CURLUE_OK;
  638|  6.22k|}
urlapi.c:is_dot:
  719|   990k|{
  720|   990k|  const char *p = *str;
  721|   990k|  if(*p == '.') {
  ------------------
  |  Branch (721:6): [True: 38.3k, False: 951k]
  ------------------
  722|  38.3k|    (*str)++;
  723|  38.3k|    (*clen)--;
  724|  38.3k|    return TRUE;
  ------------------
  |  | 1055|  38.3k|#define TRUE true
  ------------------
  725|  38.3k|  }
  726|   951k|  else if((*clen >= 3) &&
  ------------------
  |  Branch (726:11): [True: 951k, False: 324]
  ------------------
  727|   951k|          (p[0] == '%') && (p[1] == '2') && ((p[2] | 0x20) == 'e')) {
  ------------------
  |  Branch (727:11): [True: 20.2k, False: 931k]
  |  Branch (727:28): [True: 175, False: 20.1k]
  |  Branch (727:45): [True: 43, False: 132]
  ------------------
  728|     43|    *str += 3;
  729|     43|    *clen -= 3;
  730|     43|    return TRUE;
  ------------------
  |  | 1055|     43|#define TRUE true
  ------------------
  731|     43|  }
  732|   951k|  return FALSE;
  ------------------
  |  | 1058|   951k|#define FALSE false
  ------------------
  733|   990k|}
urlapi.c:free_urlhandle:
   69|  18.7k|{
   70|  18.7k|  curlx_free(u->scheme);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   71|  18.7k|  curlx_free(u->user);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   72|  18.7k|  curlx_free(u->password);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   73|  18.7k|  curlx_free(u->options);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   74|  18.7k|  curlx_free(u->host);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|  18.7k|  curlx_free(u->zoneid);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   76|  18.7k|  curlx_free(u->port);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   77|  18.7k|  curlx_free(u->path);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   78|  18.7k|  curlx_free(u->query);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  18.7k|  curlx_free(u->fragment);
  ------------------
  |  | 1483|  18.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   80|  18.7k|}
urlapi.c:urlget_url:
 1451|  12.5k|{
 1452|  12.5k|  char *url;
 1453|  12.5k|  char *allochost = NULL;
 1454|  12.5k|  const char *fragmentsep =
 1455|  12.5k|    (u->fragment || (u->fragment_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  102|     32|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1455:6): [True: 49, False: 12.5k]
  |  Branch (1455:22): [True: 32, False: 12.5k]
  |  Branch (1455:45): [True: 32, False: 0]
  ------------------
 1456|  12.5k|    "#" : "";
 1457|  12.5k|  const char *querysep = ((u->query && u->query[0]) ||
  ------------------
  |  Branch (1457:28): [True: 510, False: 12.0k]
  |  Branch (1457:40): [True: 471, False: 39]
  ------------------
 1458|  12.1k|                          (u->query_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  102|     39|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1458:28): [True: 39, False: 12.0k]
  |  Branch (1458:48): [True: 39, False: 0]
  ------------------
 1459|  12.0k|    "?" : "";
 1460|  12.5k|  char portbuf[7];
 1461|  12.5k|  if(u->scheme && curl_strequal("file", u->scheme)) {
  ------------------
  |  Branch (1461:6): [True: 6.92k, False: 5.66k]
  |  Branch (1461:19): [True: 27, False: 6.89k]
  ------------------
 1462|     27|    url = curl_maprintf("file://%s%s%s%s%s",
 1463|     27|                        u->path, querysep, u->query ? u->query : "",
  ------------------
  |  Branch (1463:44): [True: 4, False: 23]
  ------------------
 1464|     27|                        fragmentsep, u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1464:38): [True: 5, False: 22]
  ------------------
 1465|     27|  }
 1466|  12.5k|  else if(!u->host)
  ------------------
  |  Branch (1466:11): [True: 5.66k, False: 6.89k]
  ------------------
 1467|  5.66k|    return CURLUE_NO_HOST;
 1468|  6.89k|  else {
 1469|  6.89k|    const char *scheme;
 1470|  6.89k|    char *options = u->options;
 1471|  6.89k|    char *port = u->port;
 1472|  6.89k|    const struct Curl_scheme *h = NULL;
 1473|  6.89k|    char schemebuf[MAX_SCHEME_LEN + 5];
 1474|  6.89k|    if(u->scheme)
  ------------------
  |  Branch (1474:8): [True: 6.89k, False: 0]
  ------------------
 1475|  6.89k|      scheme = u->scheme;
 1476|      0|    else if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   88|      0|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (1476:13): [True: 0, False: 0]
  ------------------
 1477|      0|      scheme = DEFAULT_SCHEME;
  ------------------
  |  |   66|      0|#define DEFAULT_SCHEME "https"
  ------------------
 1478|      0|    else
 1479|      0|      return CURLUE_NO_SCHEME;
 1480|       |
 1481|  6.89k|    h = Curl_get_scheme(scheme);
 1482|  6.89k|    if(!port && (flags & CURLU_DEFAULT_PORT)) {
  ------------------
  |  |   84|  6.79k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1482:8): [True: 6.79k, False: 101]
  |  Branch (1482:17): [True: 0, False: 6.79k]
  ------------------
 1483|       |      /* there is no stored port number, but asked to deliver
 1484|       |         a default one for the scheme */
 1485|      0|      if(h) {
  ------------------
  |  Branch (1485:10): [True: 0, False: 0]
  ------------------
 1486|      0|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1487|      0|        port = portbuf;
 1488|      0|      }
 1489|      0|    }
 1490|  6.89k|    else if(port) {
  ------------------
  |  Branch (1490:13): [True: 101, False: 6.79k]
  ------------------
 1491|       |      /* there is a stored port number, but asked to inhibit if it matches
 1492|       |         the default one for the scheme */
 1493|    101|      if(h && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1493:10): [True: 98, False: 3]
  |  Branch (1493:15): [True: 6, False: 92]
  ------------------
 1494|      6|         (flags & CURLU_NO_DEFAULT_PORT))
  ------------------
  |  |   85|      6|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1494:10): [True: 0, False: 6]
  ------------------
 1495|      0|        port = NULL;
 1496|    101|    }
 1497|       |
 1498|  6.89k|    if(h && !(h->flags & PROTOPT_URLOPTIONS))
  ------------------
  |  |  225|  6.87k|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (1498:8): [True: 6.87k, False: 22]
  |  Branch (1498:13): [True: 1.13k, False: 5.73k]
  ------------------
 1499|  1.13k|      options = NULL;
 1500|       |
 1501|  6.89k|    if(u->host[0] == '[') {
  ------------------
  |  Branch (1501:8): [True: 42, False: 6.85k]
  ------------------
 1502|     42|      if(u->zoneid) {
  ------------------
  |  Branch (1502:10): [True: 17, False: 25]
  ------------------
 1503|       |        /* make it '[ host %25 zoneid ]' */
 1504|     17|        struct dynbuf enc;
 1505|     17|        size_t hostlen = strlen(u->host);
 1506|     17|        curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|     17|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1507|     17|        if(curlx_dyn_addf(&enc, "%.*s%%25%s]", (int)hostlen - 1, u->host,
  ------------------
  |  Branch (1507:12): [True: 0, False: 17]
  ------------------
 1508|     17|                          u->zoneid))
 1509|      0|          return CURLUE_OUT_OF_MEMORY;
 1510|     17|        allochost = curlx_dyn_ptr(&enc);
 1511|     17|      }
 1512|     42|    }
 1513|  6.85k|    else if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|  6.85k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1513:13): [True: 0, False: 6.85k]
  ------------------
 1514|      0|      allochost = curl_easy_escape(NULL, u->host, 0);
 1515|      0|      if(!allochost)
  ------------------
  |  Branch (1515:10): [True: 0, False: 0]
  ------------------
 1516|      0|        return CURLUE_OUT_OF_MEMORY;
 1517|      0|    }
 1518|  6.85k|    else if(flags & CURLU_PUNYCODE) {
  ------------------
  |  |  100|  6.85k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1518:13): [True: 0, False: 6.85k]
  ------------------
 1519|      0|      if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1519:10): [True: 0, False: 0]
  ------------------
 1520|      0|        CURLUcode ret = host_decode(u->host, &allochost);
 1521|      0|        if(ret)
  ------------------
  |  Branch (1521:12): [True: 0, False: 0]
  ------------------
 1522|      0|          return ret;
 1523|      0|      }
 1524|      0|    }
 1525|  6.85k|    else if(flags & CURLU_PUNY2IDN) {
  ------------------
  |  |  101|  6.85k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1525:13): [True: 0, False: 6.85k]
  ------------------
 1526|      0|      if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1526:10): [True: 0, False: 0]
  ------------------
 1527|      0|        CURLUcode ret = host_encode(u->host, &allochost);
 1528|      0|        if(ret)
  ------------------
  |  Branch (1528:12): [True: 0, False: 0]
  ------------------
 1529|      0|          return ret;
 1530|      0|      }
 1531|      0|    }
 1532|       |
 1533|  6.89k|    if(!(flags & CURLU_NO_GUESS_SCHEME) || !u->guessed_scheme)
  ------------------
  |  |  105|  6.89k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1533:8): [True: 6.89k, False: 0]
  |  Branch (1533:44): [True: 0, False: 0]
  ------------------
 1534|  6.89k|      curl_msnprintf(schemebuf, sizeof(schemebuf), "%s://", scheme);
 1535|      0|    else
 1536|      0|      schemebuf[0] = 0;
 1537|       |
 1538|  6.89k|    url = curl_maprintf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 1539|  6.89k|                        schemebuf,
 1540|  6.89k|                        u->user ? u->user : "",
  ------------------
  |  Branch (1540:25): [True: 1.02k, False: 5.87k]
  ------------------
 1541|  6.89k|                        u->password ? ":" : "",
  ------------------
  |  Branch (1541:25): [True: 212, False: 6.68k]
  ------------------
 1542|  6.89k|                        u->password ? u->password : "",
  ------------------
  |  Branch (1542:25): [True: 212, False: 6.68k]
  ------------------
 1543|  6.89k|                        options ? ";" : "",
  ------------------
  |  Branch (1543:25): [True: 23, False: 6.87k]
  ------------------
 1544|  6.89k|                        options ? options : "",
  ------------------
  |  Branch (1544:25): [True: 23, False: 6.87k]
  ------------------
 1545|  6.89k|                        (u->user || u->password || options) ? "@" : "",
  ------------------
  |  Branch (1545:26): [True: 1.02k, False: 5.87k]
  |  Branch (1545:37): [True: 0, False: 5.87k]
  |  Branch (1545:52): [True: 0, False: 5.87k]
  ------------------
 1546|  6.89k|                        allochost ? allochost : u->host,
  ------------------
  |  Branch (1546:25): [True: 17, False: 6.87k]
  ------------------
 1547|  6.89k|                        port ? ":" : "",
  ------------------
  |  Branch (1547:25): [True: 101, False: 6.79k]
  ------------------
 1548|  6.89k|                        port ? port : "",
  ------------------
  |  Branch (1548:25): [True: 101, False: 6.79k]
  ------------------
 1549|  6.89k|                        u->path ? u->path : "/",
  ------------------
  |  Branch (1549:25): [True: 672, False: 6.22k]
  ------------------
 1550|  6.89k|                        querysep,
 1551|  6.89k|                        u->query ? u->query : "",
  ------------------
  |  Branch (1551:25): [True: 506, False: 6.38k]
  ------------------
 1552|  6.89k|                        fragmentsep,
 1553|  6.89k|                        u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1553:25): [True: 44, False: 6.85k]
  ------------------
 1554|  6.89k|    curlx_free(allochost);
  ------------------
  |  | 1483|  6.89k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1555|  6.89k|  }
 1556|  6.92k|  if(!url)
  ------------------
  |  Branch (1556:6): [True: 0, False: 6.92k]
  ------------------
 1557|      0|    return CURLUE_OUT_OF_MEMORY;
 1558|  6.92k|  *part = url;
 1559|  6.92k|  return CURLUE_OK;
 1560|  6.92k|}
urlapi.c:urlget_format:
 1383|  30.9k|{
 1384|  30.9k|  CURLUcode uc = CURLUE_OK;
 1385|  30.9k|  size_t partlen = strlen(ptr);
 1386|  30.9k|  bool urldecode = (flags & CURLU_URLDECODE) ? 1 : 0;
  ------------------
  |  |   93|  30.9k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  |  Branch (1386:20): [True: 2.36k, False: 28.5k]
  ------------------
 1387|  30.9k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   94|  30.9k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1387:20): [True: 6.28k, False: 24.6k]
  ------------------
 1388|  30.9k|  bool punycode = (flags & CURLU_PUNYCODE) && (what == CURLUPART_HOST);
  ------------------
  |  |  100|  30.9k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1388:19): [True: 0, False: 30.9k]
  |  Branch (1388:47): [True: 0, False: 0]
  ------------------
 1389|  30.9k|  bool depunyfy = (flags & CURLU_PUNY2IDN) && (what == CURLUPART_HOST);
  ------------------
  |  |  101|  30.9k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1389:19): [True: 0, False: 30.9k]
  |  Branch (1389:47): [True: 0, False: 0]
  ------------------
 1390|  30.9k|  char *part = curlx_memdup0(ptr, partlen);
 1391|  30.9k|  *partp = NULL;
 1392|  30.9k|  if(!part)
  ------------------
  |  Branch (1392:6): [True: 0, False: 30.9k]
  ------------------
 1393|      0|    return CURLUE_OUT_OF_MEMORY;
 1394|  30.9k|  if(plusdecode) {
  ------------------
  |  Branch (1394:6): [True: 0, False: 30.9k]
  ------------------
 1395|       |    /* convert + to space */
 1396|      0|    char *plus = part;
 1397|      0|    size_t i = 0;
 1398|      0|    for(i = 0; i < partlen; ++plus, i++) {
  ------------------
  |  Branch (1398:16): [True: 0, False: 0]
  ------------------
 1399|      0|      if(*plus == '+')
  ------------------
  |  Branch (1399:10): [True: 0, False: 0]
  ------------------
 1400|      0|        *plus = ' ';
 1401|      0|    }
 1402|      0|  }
 1403|  30.9k|  if(urldecode) {
  ------------------
  |  Branch (1403:6): [True: 2.36k, False: 28.5k]
  ------------------
 1404|  2.36k|    char *decoded;
 1405|  2.36k|    size_t dlen;
 1406|       |    /* this unconditional rejection of control bytes is documented API
 1407|       |       behavior */
 1408|  2.36k|    CURLcode result = Curl_urldecode(part, partlen, &decoded, &dlen,
 1409|  2.36k|                                     REJECT_CTRL);
 1410|  2.36k|    curlx_free(part);
  ------------------
  |  | 1483|  2.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1411|  2.36k|    if(result)
  ------------------
  |  Branch (1411:8): [True: 4, False: 2.35k]
  ------------------
 1412|      4|      return CURLUE_URLDECODE;
 1413|  2.35k|    part = decoded;
 1414|  2.35k|    partlen = dlen;
 1415|  2.35k|  }
 1416|  30.9k|  if(urlencode) {
  ------------------
  |  Branch (1416:6): [True: 6.28k, False: 24.6k]
  ------------------
 1417|  6.28k|    struct dynbuf enc;
 1418|  6.28k|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  6.28k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1419|  6.28k|    uc = urlencode_str(&enc, part, partlen, TRUE, what == CURLUPART_QUERY ?
  ------------------
  |  | 1055|  6.28k|#define TRUE true
  ------------------
  |  Branch (1419:51): [True: 0, False: 6.28k]
  ------------------
 1420|  6.28k|                       QUERY_YES : QUERY_NO);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
                                     QUERY_YES : QUERY_NO);
  ------------------
  |  |   52|  12.5k|#define QUERY_NO      2
  ------------------
 1421|  6.28k|    curlx_free(part);
  ------------------
  |  | 1483|  6.28k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1422|  6.28k|    if(uc)
  ------------------
  |  Branch (1422:8): [True: 0, False: 6.28k]
  ------------------
 1423|      0|      return uc;
 1424|  6.28k|    part = curlx_dyn_ptr(&enc);
 1425|  6.28k|  }
 1426|  24.6k|  else if(punycode) {
  ------------------
  |  Branch (1426:11): [True: 0, False: 24.6k]
  ------------------
 1427|      0|    if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1427:8): [True: 0, False: 0]
  ------------------
 1428|      0|      char *punyversion = NULL;
 1429|      0|      uc = host_decode(part, &punyversion);
 1430|      0|      curlx_free(part);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1431|      0|      if(uc)
  ------------------
  |  Branch (1431:10): [True: 0, False: 0]
  ------------------
 1432|      0|        return uc;
 1433|      0|      part = punyversion;
 1434|      0|    }
 1435|      0|  }
 1436|  24.6k|  else if(depunyfy) {
  ------------------
  |  Branch (1436:11): [True: 0, False: 24.6k]
  ------------------
 1437|      0|    if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1437:8): [True: 0, False: 0]
  ------------------
 1438|      0|      char *unpunified = NULL;
 1439|      0|      uc = host_encode(part, &unpunified);
 1440|      0|      curlx_free(part);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1441|      0|      if(uc)
  ------------------
  |  Branch (1441:10): [True: 0, False: 0]
  ------------------
 1442|      0|        return uc;
 1443|      0|      part = unpunified;
 1444|      0|    }
 1445|      0|  }
 1446|  30.9k|  *partp = part;
 1447|  30.9k|  return CURLUE_OK;
 1448|  30.9k|}
urlapi.c:set_url_port:
 1689|      9|{
 1690|      9|  char *tmp;
 1691|      9|  curl_off_t port;
 1692|      9|  if(!ISDIGIT(provided_port[0]))
  ------------------
  |  |   44|      9|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 9, False: 0]
  |  |  |  Branch (44:38): [True: 9, False: 0]
  |  |  ------------------
  ------------------
 1693|       |    /* not a number */
 1694|      0|    return CURLUE_BAD_PORT_NUMBER;
 1695|      9|  if(curlx_str_number(&provided_port, &port, 0xffff) || *provided_port)
  ------------------
  |  Branch (1695:6): [True: 0, False: 9]
  |  Branch (1695:57): [True: 0, False: 9]
  ------------------
 1696|       |    /* weirdly provided number, not good! */
 1697|      0|    return CURLUE_BAD_PORT_NUMBER;
 1698|      9|  tmp = curl_maprintf("%" CURL_FORMAT_CURL_OFF_T, port);
  ------------------
  |  |  341|      9|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  ------------------
 1699|      9|  if(!tmp)
  ------------------
  |  Branch (1699:6): [True: 0, False: 9]
  ------------------
 1700|      0|    return CURLUE_OUT_OF_MEMORY;
 1701|      9|  curlx_free(u->port);
  ------------------
  |  | 1483|      9|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1702|      9|  u->port = tmp;
 1703|      9|  u->portnum = (unsigned short)port;
 1704|      9|  return CURLUE_OK;
 1705|      9|}
urlapi.c:set_url:
 1709|  9.47k|{
 1710|       |  /*
 1711|       |   * Allow a new URL to replace the existing (if any) contents.
 1712|       |   *
 1713|       |   * If the existing contents is enough for a URL, allow a relative URL to
 1714|       |   * replace it.
 1715|       |   */
 1716|  9.47k|  CURLUcode uc;
 1717|  9.47k|  char *oldurl = NULL;
 1718|       |
 1719|  9.47k|  if(!part_size) {
  ------------------
  |  Branch (1719:6): [True: 236, False: 9.23k]
  ------------------
 1720|       |    /* a blank URL is not a valid URL unless we already have a complete one
 1721|       |       and this is a redirect */
 1722|    236|    uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
 1723|    236|    if(!uc) {
  ------------------
  |  Branch (1723:8): [True: 0, False: 236]
  ------------------
 1724|       |      /* success, meaning the "" is a fine relative URL, but nothing
 1725|       |         changes */
 1726|      0|      curlx_free(oldurl);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1727|      0|      return CURLUE_OK;
 1728|      0|    }
 1729|    236|    if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1729:8): [True: 0, False: 236]
  ------------------
 1730|      0|      return uc;
 1731|    236|    return CURLUE_MALFORMED_INPUT;
 1732|    236|  }
 1733|       |
 1734|       |  /* if the new URL is absolute replace the existing with the new. */
 1735|  9.23k|  if(Curl_is_absolute_url(url, NULL, 0,
  ------------------
  |  Branch (1735:6): [True: 3.80k, False: 5.43k]
  ------------------
 1736|  9.23k|                          flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   96|  9.23k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
                                        flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   88|  9.23k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1737|  3.80k|    return parseurl_and_replace(url, u, flags);
 1738|       |
 1739|       |  /* if the old URL is incomplete (we cannot get an absolute URL in
 1740|       |     'oldurl'), replace the existing with the new.
 1741|       |     Always include "scheme://" to make the URL "complete" */
 1742|  5.43k|  uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags& ~CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  105|  5.43k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
 1743|  5.43k|  if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1743:6): [True: 0, False: 5.43k]
  ------------------
 1744|      0|    return uc;
 1745|  5.43k|  else if(uc)
  ------------------
  |  Branch (1745:11): [True: 5.43k, False: 0]
  ------------------
 1746|  5.43k|    return parseurl_and_replace(url, u, flags);
 1747|       |
 1748|      0|  DEBUGASSERT(oldurl); /* it is set here */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1748:3): [True: 0, False: 0]
  |  Branch (1748:3): [True: 0, False: 0]
  ------------------
 1749|       |  /* apply the relative part to create a new URL */
 1750|      0|  uc = redirect_url(oldurl, url, u, flags);
 1751|      0|  curlx_free(oldurl);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1752|      0|  return uc;
 1753|      0|}
urlapi.c:parseurl_and_replace:
 1218|  9.23k|{
 1219|  9.23k|  CURLUcode ures;
 1220|  9.23k|  CURLU tmpurl;
 1221|  9.23k|  memset(&tmpurl, 0, sizeof(tmpurl));
 1222|  9.23k|  ures = parseurl(url, &tmpurl, flags);
 1223|  9.23k|  if(!ures) {
  ------------------
  |  Branch (1223:6): [True: 8.79k, False: 441]
  ------------------
 1224|  8.79k|    free_urlhandle(u);
 1225|  8.79k|    *u = tmpurl;
 1226|  8.79k|  }
 1227|  9.23k|  return ures;
 1228|  9.23k|}
urlapi.c:parseurl:
 1127|  9.23k|{
 1128|  9.23k|  const char *path;
 1129|  9.23k|  size_t pathlen;
 1130|  9.23k|  char schemebuf[MAX_SCHEME_LEN + 1];
 1131|  9.23k|  size_t schemelen = 0;
 1132|  9.23k|  size_t urllen;
 1133|  9.23k|  CURLUcode ures = CURLUE_OK;
 1134|  9.23k|  struct dynbuf host;
 1135|  9.23k|  bool is_file = FALSE;
  ------------------
  |  | 1058|  9.23k|#define FALSE false
  ------------------
 1136|       |
 1137|  9.23k|  DEBUGASSERT(url);
  ------------------
  |  | 1081|  9.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1137:3): [True: 0, False: 9.23k]
  |  Branch (1137:3): [True: 9.23k, False: 0]
  ------------------
 1138|       |
 1139|  9.23k|  curlx_dyn_init(&host, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  9.23k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1140|       |
 1141|  9.23k|  ures = Curl_junkscan(url, &urllen, !!(flags & CURLU_ALLOW_SPACE));
  ------------------
  |  |   99|  9.23k|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1142|  9.23k|  if(ures)
  ------------------
  |  Branch (1142:6): [True: 32, False: 9.20k]
  ------------------
 1143|     32|    goto fail;
 1144|       |
 1145|  9.20k|  schemelen = Curl_is_absolute_url(url, schemebuf, sizeof(schemebuf),
 1146|  9.20k|                                   flags & (CURLU_GUESS_SCHEME |
  ------------------
  |  |   96|  9.20k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1147|  9.20k|                                            CURLU_DEFAULT_SCHEME));
  ------------------
  |  |   88|  9.20k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1148|       |
 1149|       |  /* handle the file: scheme */
 1150|  9.20k|  if(schemelen && !strcmp(schemebuf, "file")) {
  ------------------
  |  Branch (1150:6): [True: 3.79k, False: 5.41k]
  |  Branch (1150:19): [True: 72, False: 3.71k]
  ------------------
 1151|     72|    is_file = TRUE;
  ------------------
  |  | 1055|     72|#define TRUE true
  ------------------
 1152|     72|    ures = parse_file(url, urllen, u, &path, &pathlen);
 1153|     72|  }
 1154|  9.13k|  else {
 1155|  9.13k|    const char *hostp = NULL;
 1156|  9.13k|    size_t hostlen;
 1157|  9.13k|    ures = parse_scheme(url, u, schemebuf, schemelen, flags, &hostp);
 1158|  9.13k|    if(ures)
  ------------------
  |  Branch (1158:8): [True: 3, False: 9.13k]
  ------------------
 1159|      3|      goto fail;
 1160|       |
 1161|       |    /* find the end of the hostname + port number */
 1162|  9.13k|    hostlen = strcspn(hostp, "/?#");
 1163|  9.13k|    path = &hostp[hostlen];
 1164|       |
 1165|       |    /* this pathlen also contains the query and the fragment */
 1166|  9.13k|    pathlen = urllen - (path - url);
 1167|  9.13k|    if(hostlen) {
  ------------------
  |  Branch (1167:8): [True: 9.05k, False: 75]
  ------------------
 1168|  9.05k|      ures = parse_authority(u, hostp, hostlen, flags, &host,
 1169|  9.05k|                             u->scheme != NULL);
 1170|  9.05k|      if(!ures && (flags & CURLU_GUESS_SCHEME) && !u->scheme)
  ------------------
  |  |   96|  8.77k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (1170:10): [True: 8.77k, False: 286]
  |  Branch (1170:19): [True: 8.77k, False: 0]
  |  Branch (1170:51): [True: 5.22k, False: 3.54k]
  ------------------
 1171|  5.22k|        ures = guess_scheme(u, &host);
 1172|  9.05k|    }
 1173|     75|    else if(flags & CURLU_NO_AUTHORITY) {
  ------------------
  |  |   97|     75|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (1173:13): [True: 0, False: 75]
  ------------------
 1174|       |      /* allowed to be empty. */
 1175|      0|      if(curlx_dyn_add(&host, ""))
  ------------------
  |  Branch (1175:10): [True: 0, False: 0]
  ------------------
 1176|      0|        ures = CURLUE_OUT_OF_MEMORY;
 1177|      0|    }
 1178|     75|    else
 1179|     75|      ures = CURLUE_NO_HOST;
 1180|  9.13k|  }
 1181|  9.20k|  if(!ures) {
  ------------------
  |  Branch (1181:6): [True: 8.79k, False: 406]
  ------------------
 1182|       |    /* The path might at this point contain a fragment and/or a query to
 1183|       |       handle */
 1184|  8.79k|    const char *fragment = strchr(path, '#');
 1185|  8.79k|    if(fragment) {
  ------------------
  |  Branch (1185:8): [True: 105, False: 8.69k]
  ------------------
 1186|    105|      size_t fraglen = pathlen - (fragment - path);
 1187|    105|      ures = handle_fragment(u, fragment, fraglen, flags);
 1188|       |      /* after this, pathlen still contains the query */
 1189|    105|      pathlen -= fraglen;
 1190|    105|    }
 1191|  8.79k|  }
 1192|  9.20k|  if(!ures) {
  ------------------
  |  Branch (1192:6): [True: 8.79k, False: 406]
  ------------------
 1193|  8.79k|    const char *query = memchr(path, '?', pathlen);
 1194|  8.79k|    if(query) {
  ------------------
  |  Branch (1194:8): [True: 528, False: 8.26k]
  ------------------
 1195|    528|      size_t qlen = pathlen - (query - path);
 1196|    528|      ures = handle_query(u, query, qlen, flags);
 1197|    528|      pathlen -= qlen;
 1198|    528|    }
 1199|  8.79k|  }
 1200|  9.20k|  if(!ures)
  ------------------
  |  Branch (1200:6): [True: 8.79k, False: 406]
  ------------------
 1201|       |    /* the fragment and query parts are trimmed off from the path */
 1202|  8.79k|    ures = handle_path(u, path, pathlen, flags, is_file);
 1203|  9.20k|  if(!ures) {
  ------------------
  |  Branch (1203:6): [True: 8.79k, False: 406]
  ------------------
 1204|  8.79k|    u->host = curlx_dyn_ptr(&host);
 1205|  8.79k|    return CURLUE_OK;
 1206|  8.79k|  }
 1207|    441|fail:
 1208|    441|  curlx_dyn_free(&host);
 1209|    441|  free_urlhandle(u);
 1210|    441|  return ures;
 1211|  9.20k|}
urlapi.c:parse_scheme:
  956|  9.13k|{
  957|       |  /* clear path */
  958|  9.13k|  const char *schemep = NULL;
  959|       |
  960|  9.13k|  if(schemelen) {
  ------------------
  |  Branch (960:6): [True: 3.71k, False: 5.41k]
  ------------------
  961|  3.71k|    int i = 0;
  962|  3.71k|    const char *p = &url[schemelen + 1];
  963|  8.26k|    while((*p == '/') && (i < 4)) {
  ------------------
  |  Branch (963:11): [True: 4.54k, False: 3.71k]
  |  Branch (963:26): [True: 4.54k, False: 2]
  ------------------
  964|  4.54k|      p++;
  965|  4.54k|      i++;
  966|  4.54k|    }
  967|       |
  968|  3.71k|    schemep = schemebuf;
  969|  3.71k|    if(!Curl_get_scheme(schemep) &&
  ------------------
  |  Branch (969:8): [True: 50, False: 3.66k]
  ------------------
  970|     50|       !(flags & CURLU_NON_SUPPORT_SCHEME))
  ------------------
  |  |   90|     50|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
  |  Branch (970:8): [True: 0, False: 50]
  ------------------
  971|      0|      return CURLUE_UNSUPPORTED_SCHEME;
  972|       |
  973|  3.71k|    if((i < 1) || (i > 3))
  ------------------
  |  Branch (973:8): [True: 0, False: 3.71k]
  |  Branch (973:19): [True: 3, False: 3.71k]
  ------------------
  974|       |      /* less than one or more than three slashes */
  975|      3|      return CURLUE_BAD_SLASHES;
  976|       |
  977|  3.71k|    *hostpp = p; /* hostname starts here */
  978|  3.71k|  }
  979|  5.41k|  else {
  980|       |    /* no scheme! */
  981|       |
  982|  5.41k|    if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   88|  5.41k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
                  if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   96|  5.41k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (982:8): [True: 0, False: 5.41k]
  ------------------
  983|      0|      return CURLUE_BAD_SCHEME;
  984|       |
  985|  5.41k|    if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   88|  5.41k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (985:8): [True: 0, False: 5.41k]
  ------------------
  986|      0|      schemep = DEFAULT_SCHEME;
  ------------------
  |  |   66|      0|#define DEFAULT_SCHEME "https"
  ------------------
  987|       |
  988|       |    /*
  989|       |     * The URL was badly formatted, let's try without scheme specified.
  990|       |     */
  991|  5.41k|    *hostpp = url;
  992|  5.41k|  }
  993|       |
  994|  9.13k|  if(schemep) {
  ------------------
  |  Branch (994:6): [True: 3.71k, False: 5.41k]
  ------------------
  995|  3.71k|    u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1477|  3.71k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  996|  3.71k|    if(!u->scheme)
  ------------------
  |  Branch (996:8): [True: 0, False: 3.71k]
  ------------------
  997|      0|      return CURLUE_OUT_OF_MEMORY;
  998|  3.71k|  }
  999|  9.13k|  return CURLUE_OK;
 1000|  9.13k|}
urlapi.c:guess_scheme:
 1003|  5.22k|{
 1004|  5.22k|  const char *hostname = curlx_dyn_ptr(host);
 1005|  5.22k|  const char *schemep = NULL;
 1006|       |  /* legacy curl-style guess based on hostname */
 1007|  5.22k|  if(checkprefix("ftp.", hostname))
  ------------------
  |  |   33|  5.22k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  5.22k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 2, False: 5.22k]
  |  |  ------------------
  ------------------
 1008|      2|    schemep = "ftp";
 1009|  5.22k|  else if(checkprefix("dict.", hostname))
  ------------------
  |  |   33|  5.22k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  5.22k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 2, False: 5.22k]
  |  |  ------------------
  ------------------
 1010|      2|    schemep = "dict";
 1011|  5.22k|  else if(checkprefix("ldap.", hostname))
  ------------------
  |  |   33|  5.22k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  5.22k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 5.22k]
  |  |  ------------------
  ------------------
 1012|      1|    schemep = "ldap";
 1013|  5.22k|  else if(checkprefix("imap.", hostname))
  ------------------
  |  |   33|  5.22k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  5.22k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 5.22k]
  |  |  ------------------
  ------------------
 1014|      1|    schemep = "imap";
 1015|  5.22k|  else if(checkprefix("smtp.", hostname))
  ------------------
  |  |   33|  5.22k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  5.22k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 5.22k]
  |  |  ------------------
  ------------------
 1016|      1|    schemep = "smtp";
 1017|  5.22k|  else if(checkprefix("pop3.", hostname))
  ------------------
  |  |   33|  5.22k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  5.22k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 2.82k, False: 2.39k]
  |  |  ------------------
  ------------------
 1018|  2.82k|    schemep = "pop3";
 1019|  2.39k|  else
 1020|  2.39k|    schemep = "http";
 1021|       |
 1022|  5.22k|  u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1477|  5.22k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1023|  5.22k|  if(!u->scheme)
  ------------------
  |  Branch (1023:6): [True: 0, False: 5.22k]
  ------------------
 1024|      0|    return CURLUE_OUT_OF_MEMORY;
 1025|       |
 1026|  5.22k|  u->guessed_scheme = TRUE;
  ------------------
  |  | 1055|  5.22k|#define TRUE true
  ------------------
 1027|  5.22k|  return CURLUE_OK;
 1028|  5.22k|}
urlapi.c:handle_fragment:
 1032|    105|{
 1033|    105|  CURLUcode ures;
 1034|    105|  u->fragment_present = TRUE;
  ------------------
  |  | 1055|    105|#define TRUE true
  ------------------
 1035|    105|  if(fraglen > 1) {
  ------------------
  |  Branch (1035:6): [True: 59, False: 46]
  ------------------
 1036|       |    /* skip the leading '#' in the copy but include the terminating null */
 1037|     59|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|     59|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1037:8): [True: 0, False: 59]
  ------------------
 1038|      0|      struct dynbuf enc;
 1039|      0|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1040|      0|      ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  |   52|      0|#define QUERY_NO      2
  ------------------
 1041|      0|      if(ures)
  ------------------
  |  Branch (1041:10): [True: 0, False: 0]
  ------------------
 1042|      0|        return ures;
 1043|      0|      u->fragment = curlx_dyn_ptr(&enc);
 1044|      0|    }
 1045|     59|    else {
 1046|     59|      u->fragment = curlx_memdup0(fragment + 1, fraglen - 1);
 1047|     59|      if(!u->fragment)
  ------------------
  |  Branch (1047:10): [True: 0, False: 59]
  ------------------
 1048|      0|        return CURLUE_OUT_OF_MEMORY;
 1049|     59|    }
 1050|     59|  }
 1051|    105|  return CURLUE_OK;
 1052|    105|}
urlapi.c:handle_query:
 1056|    528|{
 1057|    528|  u->query_present = TRUE;
  ------------------
  |  | 1055|    528|#define TRUE true
  ------------------
 1058|    528|  if(qlen > 1) {
  ------------------
  |  Branch (1058:6): [True: 478, False: 50]
  ------------------
 1059|    478|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|    478|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1059:8): [True: 0, False: 478]
  ------------------
 1060|      0|      struct dynbuf enc;
 1061|      0|      CURLUcode ures;
 1062|      0|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1063|       |      /* skip the leading question mark */
 1064|      0|      ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
 1065|      0|      if(ures)
  ------------------
  |  Branch (1065:10): [True: 0, False: 0]
  ------------------
 1066|      0|        return ures;
 1067|      0|      u->query = curlx_dyn_ptr(&enc);
 1068|      0|    }
 1069|    478|    else {
 1070|    478|      u->query = curlx_memdup0(query + 1, qlen - 1);
 1071|    478|      if(!u->query)
  ------------------
  |  Branch (1071:10): [True: 0, False: 478]
  ------------------
 1072|      0|        return CURLUE_OUT_OF_MEMORY;
 1073|    478|    }
 1074|    478|  }
 1075|     50|  else {
 1076|       |    /* single byte query */
 1077|     50|    u->query = curlx_strdup("");
  ------------------
  |  | 1477|     50|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1078|     50|    if(!u->query)
  ------------------
  |  Branch (1078:8): [True: 0, False: 50]
  ------------------
 1079|      0|      return CURLUE_OUT_OF_MEMORY;
 1080|     50|  }
 1081|    528|  return CURLUE_OK;
 1082|    528|}
urlapi.c:handle_path:
 1087|  8.79k|{
 1088|  8.79k|  CURLUcode ures;
 1089|  8.79k|  if(pathlen && (flags & CURLU_URLENCODE)) {
  ------------------
  |  |   94|    872|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1089:6): [True: 872, False: 7.92k]
  |  Branch (1089:17): [True: 0, False: 872]
  ------------------
 1090|      0|    struct dynbuf enc;
 1091|      0|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1092|      0|    ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
                  ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  |   52|      0|#define QUERY_NO      2
  ------------------
 1093|      0|    if(ures)
  ------------------
  |  Branch (1093:8): [True: 0, False: 0]
  ------------------
 1094|      0|      return ures;
 1095|      0|    pathlen = curlx_dyn_len(&enc);
 1096|      0|    path = u->path = curlx_dyn_ptr(&enc);
 1097|      0|  }
 1098|       |
 1099|  8.79k|  if(pathlen >= (size_t)(1 + !is_file)) {
  ------------------
  |  Branch (1099:6): [True: 793, False: 8.00k]
  ------------------
 1100|       |    /* paths for file:// scheme can be one byte, others need to be two */
 1101|    793|    if(!u->path) {
  ------------------
  |  Branch (1101:8): [True: 793, False: 0]
  ------------------
 1102|    793|      u->path = curlx_memdup0(path, pathlen);
 1103|    793|      if(!u->path)
  ------------------
  |  Branch (1103:10): [True: 0, False: 793]
  ------------------
 1104|      0|        return CURLUE_OUT_OF_MEMORY;
 1105|    793|      path = u->path;
 1106|    793|    }
 1107|      0|    else if(flags & CURLU_URLENCODE)
  ------------------
  |  |   94|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1107:13): [True: 0, False: 0]
  ------------------
 1108|       |      /* it might have encoded more than the path so cut it */
 1109|      0|      u->path[pathlen] = 0;
 1110|       |
 1111|    793|    if(!(flags & CURLU_PATH_AS_IS)) {
  ------------------
  |  |   91|    793|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1111:8): [True: 792, False: 1]
  ------------------
 1112|       |      /* remove ../ and ./ sequences according to RFC3986 */
 1113|    792|      char *dedot;
 1114|    792|      int err = dedotdotify(path, pathlen, &dedot);
 1115|    792|      if(err)
  ------------------
  |  Branch (1115:10): [True: 0, False: 792]
  ------------------
 1116|      0|        return CURLUE_OUT_OF_MEMORY;
 1117|    792|      if(dedot) {
  ------------------
  |  Branch (1117:10): [True: 786, False: 6]
  ------------------
 1118|    786|        curlx_free(u->path);
  ------------------
  |  | 1483|    786|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1119|    786|        u->path = dedot;
 1120|    786|      }
 1121|    792|    }
 1122|    793|  }
 1123|  8.79k|  return CURLUE_OK;
 1124|  8.79k|}
urlapi.c:hostname_check:
  464|  6.22k|{
  465|  6.22k|  size_t len;
  466|  6.22k|  DEBUGASSERT(hostname);
  ------------------
  |  | 1081|  6.22k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (466:3): [True: 0, False: 6.22k]
  |  Branch (466:3): [True: 6.22k, False: 0]
  ------------------
  467|       |
  468|  6.22k|  if(!hlen)
  ------------------
  |  Branch (468:6): [True: 0, False: 6.22k]
  ------------------
  469|      0|    return CURLUE_NO_HOST;
  470|  6.22k|  else if(hostname[0] == '[')
  ------------------
  |  Branch (470:11): [True: 29, False: 6.19k]
  ------------------
  471|     29|    return ipv6_parse(u, hostname, hlen);
  472|  6.19k|  else {
  473|       |    /* letters from the second string are not ok */
  474|  6.19k|    len = strcspn(hostname, " \r\n\t/:#?!@{}[]\\$\'\"^`*<>=;,+&()%|");
  475|  6.19k|    if(hlen != len)
  ------------------
  |  Branch (475:8): [True: 103, False: 6.09k]
  ------------------
  476|       |      /* hostname with bad content */
  477|    103|      return CURLUE_BAD_HOSTNAME;
  478|  6.09k|    else if((hlen >= 2) &&
  ------------------
  |  Branch (478:13): [True: 4.00k, False: 2.08k]
  ------------------
  479|  4.00k|            (hostname[hlen - 1] == '.') && (hostname[hlen - 2] == '.'))
  ------------------
  |  Branch (479:13): [True: 2.72k, False: 1.27k]
  |  Branch (479:44): [True: 8, False: 2.71k]
  ------------------
  480|       |      /* more than one trailing dot is not allowed */
  481|      8|      return CURLUE_BAD_HOSTNAME;
  482|  6.08k|    else if((hlen == 1) && (hostname[0] == '.'))
  ------------------
  |  Branch (482:13): [True: 2.08k, False: 3.99k]
  |  Branch (482:28): [True: 5, False: 2.08k]
  ------------------
  483|       |      /* just a single dot is not allowed */
  484|      5|      return CURLUE_BAD_HOSTNAME;
  485|  6.19k|  }
  486|  6.07k|  return CURLUE_OK;
  487|  6.22k|}

Curl_auth_create_plain_message:
   51|      8|{
   52|      8|  size_t len;
   53|      8|  char *auth;
   54|       |
   55|      8|  size_t zlen = strlen(Curl_creds_sasl_authzid(creds));
  ------------------
  |  |   78|      8|#define Curl_creds_sasl_authzid(c)       ((c) ? (c)->sasl_authzid : "")
  |  |  ------------------
  |  |  |  Branch (78:43): [True: 8, False: 0]
  |  |  ------------------
  ------------------
   56|      8|  size_t clen = strlen(Curl_creds_user(creds));
  ------------------
  |  |   75|      8|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 8, False: 0]
  |  |  ------------------
  ------------------
   57|      8|  size_t plen = strlen(Curl_creds_passwd(creds));
  ------------------
  |  |   76|      8|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 8, False: 0]
  |  |  ------------------
  ------------------
   58|       |
   59|      8|  if((zlen > CURL_MAX_INPUT_LENGTH) || (clen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|      8|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
                if((zlen > CURL_MAX_INPUT_LENGTH) || (clen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|      8|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (59:6): [True: 0, False: 8]
  |  Branch (59:40): [True: 0, False: 8]
  ------------------
   60|      8|     (plen > CURL_MAX_INPUT_LENGTH))
  ------------------
  |  |   45|      8|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (60:6): [True: 0, False: 8]
  ------------------
   61|      0|    return CURLE_TOO_LARGE;
   62|       |
   63|      8|  len = zlen + clen + plen + 2;
   64|       |
   65|      8|  auth = curl_maprintf("%s%c%s%c%s",
   66|      8|                       Curl_creds_sasl_authzid(creds), '\0',
  ------------------
  |  |   78|      8|#define Curl_creds_sasl_authzid(c)       ((c) ? (c)->sasl_authzid : "")
  |  |  ------------------
  |  |  |  Branch (78:43): [True: 8, False: 0]
  |  |  ------------------
  ------------------
   67|      8|                       Curl_creds_user(creds), '\0',
  ------------------
  |  |   75|      8|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 8, False: 0]
  |  |  ------------------
  ------------------
   68|      8|                       Curl_creds_passwd(creds));
  ------------------
  |  |   76|      8|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 8, False: 0]
  |  |  ------------------
  ------------------
   69|      8|  if(!auth)
  ------------------
  |  Branch (69:6): [True: 0, False: 8]
  ------------------
   70|      0|    return CURLE_OUT_OF_MEMORY;
   71|      8|  Curl_bufref_set(out, auth, len, curl_free);
   72|      8|  return CURLE_OK;
   73|      8|}
Curl_auth_create_login_message:
   89|     31|{
   90|       |  Curl_bufref_set(out, value, strlen(value), NULL);
   91|     31|}

Curl_auth_create_cram_md5_message:
   52|     35|{
   53|     35|  struct HMAC_context *ctxt;
   54|     35|  unsigned char digest[MD5_DIGEST_LEN];
   55|     35|  char *response;
   56|     35|  const char *user = Curl_creds_user(creds);
  ------------------
  |  |   75|     35|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 35, False: 0]
  |  |  ------------------
  ------------------
   57|     35|  const char *passwd = Curl_creds_passwd(creds);
  ------------------
  |  |   76|     35|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 35, False: 0]
  |  |  ------------------
  ------------------
   58|       |
   59|       |  /* Compute the digest using the password as the key */
   60|     35|  ctxt = Curl_HMAC_init(&Curl_HMAC_MD5,
   61|     35|                        (const unsigned char *)passwd,
   62|     35|                        curlx_uztoui(strlen(passwd)));
   63|     35|  if(!ctxt)
  ------------------
  |  Branch (63:6): [True: 0, False: 35]
  ------------------
   64|      0|    return CURLE_OUT_OF_MEMORY;
   65|       |
   66|       |  /* Update the digest with the given challenge */
   67|     35|  if(Curl_bufref_len(chlg))
  ------------------
  |  Branch (67:6): [True: 3, False: 32]
  ------------------
   68|      3|    Curl_HMAC_update(ctxt, Curl_bufref_uptr(chlg),
   69|      3|                     curlx_uztoui(Curl_bufref_len(chlg)));
   70|       |
   71|       |  /* Finalise the digest */
   72|     35|  Curl_HMAC_final(ctxt, digest);
   73|       |
   74|       |  /* Generate the response */
   75|     35|  response = curl_maprintf(
   76|     35|    "%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
   77|     35|    user, digest[0], digest[1], digest[2], digest[3], digest[4],
   78|     35|    digest[5], digest[6], digest[7], digest[8], digest[9], digest[10],
   79|     35|    digest[11], digest[12], digest[13], digest[14], digest[15]);
   80|     35|  if(!response)
  ------------------
  |  Branch (80:6): [True: 0, False: 35]
  ------------------
   81|      0|    return CURLE_OUT_OF_MEMORY;
   82|       |
   83|     35|  Curl_bufref_set(out, response, strlen(response), curl_free);
   84|     35|  return CURLE_OK;
   85|     35|}

Curl_auth_is_digest_supported:
  312|     72|{
  313|       |  return TRUE;
  ------------------
  |  | 1055|     72|#define TRUE true
  ------------------
  314|     72|}
Curl_auth_create_digest_md5_message:
  338|     32|{
  339|     32|  const char *service = Curl_creds_has_sasl_service(creds) ?
  ------------------
  |  |   74|     32|#define Curl_creds_has_sasl_service(c)   ((c) && (c)->sasl_service[0])
  |  |  ------------------
  |  |  |  Branch (74:43): [True: 32, False: 0]
  |  |  |  Branch (74:50): [True: 1, False: 31]
  |  |  ------------------
  ------------------
  340|     31|    Curl_creds_sasl_service(creds) : default_service;
  ------------------
  |  |   79|      1|#define Curl_creds_sasl_service(c)       ((c) ? (c)->sasl_service : "")
  |  |  ------------------
  |  |  |  Branch (79:43): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  341|     32|  size_t i;
  342|     32|  struct MD5_context *ctxt;
  343|     32|  const char *userp = Curl_creds_user(creds);
  ------------------
  |  |   75|     32|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 32, False: 0]
  |  |  ------------------
  ------------------
  344|     32|  const char *passwdp = Curl_creds_passwd(creds);
  ------------------
  |  |   76|     32|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 32, False: 0]
  |  |  ------------------
  ------------------
  345|     32|  char *response = NULL;
  346|     32|  unsigned char digest[MD5_DIGEST_LEN];
  347|     32|  char HA1_hex[(2 * MD5_DIGEST_LEN) + 1];
  348|     32|  char HA2_hex[(2 * MD5_DIGEST_LEN) + 1];
  349|     32|  char resp_hash_hex[(2 * MD5_DIGEST_LEN) + 1];
  350|     32|  char nonce[64];
  351|     32|  char realm[128];
  352|     32|  char algorithm[64];
  353|     32|  char qop_options[64];
  354|     32|  int qop_values;
  355|     32|  char cnonce[33];
  356|     32|  char nonceCount[] = "00000001";
  357|     32|  char method[]     = "AUTHENTICATE";
  358|     32|  char qop[]        = DIGEST_QOP_VALUE_STRING_AUTH;
  ------------------
  |  |   54|     32|#define DIGEST_QOP_VALUE_STRING_AUTH      "auth"
  ------------------
  359|     32|  char *spn         = NULL;
  360|     32|  char *qrealm;
  361|     32|  char *qnonce;
  362|     32|  char *quserp;
  363|       |
  364|       |  /* Decode the challenge message */
  365|     32|  CURLcode result = auth_decode_digest_md5_message(chlg,
  366|     32|                                                   nonce, sizeof(nonce),
  367|     32|                                                   realm, sizeof(realm),
  368|     32|                                                   algorithm,
  369|     32|                                                   sizeof(algorithm),
  370|     32|                                                   qop_options,
  371|     32|                                                   sizeof(qop_options));
  372|     32|  if(result)
  ------------------
  |  Branch (372:6): [True: 32, False: 0]
  ------------------
  373|     32|    return result;
  374|       |
  375|       |  /* We only support md5 sessions */
  376|      0|  if(strcmp(algorithm, "md5-sess") != 0)
  ------------------
  |  Branch (376:6): [True: 0, False: 0]
  ------------------
  377|      0|    return CURLE_BAD_CONTENT_ENCODING;
  378|       |
  379|       |  /* Get the qop-values from the qop-options */
  380|      0|  auth_digest_get_qop_values(qop_options, &qop_values);
  381|       |
  382|       |  /* We only support auth quality-of-protection */
  383|      0|  if(!(qop_values & DIGEST_QOP_VALUE_AUTH))
  ------------------
  |  |   50|      0|#define DIGEST_QOP_VALUE_AUTH             (1 << 0)
  ------------------
  |  Branch (383:6): [True: 0, False: 0]
  ------------------
  384|      0|    return CURLE_BAD_CONTENT_ENCODING;
  385|       |
  386|       |  /* Generate 32 random hex chars, 32 bytes + 1 null-termination */
  387|      0|  result = Curl_rand_hex(data, (unsigned char *)cnonce, sizeof(cnonce));
  388|      0|  if(result)
  ------------------
  |  Branch (388:6): [True: 0, False: 0]
  ------------------
  389|      0|    return result;
  390|       |
  391|       |  /* Good so far, now calculate A1 and H(A1) according to RFC 2831 */
  392|      0|  ctxt = Curl_MD5_init(&Curl_DIGEST_MD5);
  393|      0|  if(!ctxt)
  ------------------
  |  Branch (393:6): [True: 0, False: 0]
  ------------------
  394|      0|    return CURLE_OUT_OF_MEMORY;
  395|       |
  396|      0|  Curl_MD5_update(ctxt, (const unsigned char *)userp,
  397|      0|                  curlx_uztoui(strlen(userp)));
  398|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  399|      0|  Curl_MD5_update(ctxt, (const unsigned char *)realm,
  400|      0|                  curlx_uztoui(strlen(realm)));
  401|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  402|      0|  Curl_MD5_update(ctxt, (const unsigned char *)passwdp,
  403|      0|                  curlx_uztoui(strlen(passwdp)));
  404|      0|  Curl_MD5_final(ctxt, digest);
  405|       |
  406|      0|  ctxt = Curl_MD5_init(&Curl_DIGEST_MD5);
  407|      0|  if(!ctxt)
  ------------------
  |  Branch (407:6): [True: 0, False: 0]
  ------------------
  408|      0|    return CURLE_OUT_OF_MEMORY;
  409|       |
  410|      0|  Curl_MD5_update(ctxt, (const unsigned char *)digest, MD5_DIGEST_LEN);
  ------------------
  |  |   32|      0|#define MD5_DIGEST_LEN  16
  ------------------
  411|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  412|      0|  Curl_MD5_update(ctxt, (const unsigned char *)nonce,
  413|      0|                  curlx_uztoui(strlen(nonce)));
  414|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  415|      0|  Curl_MD5_update(ctxt, (const unsigned char *)cnonce,
  416|      0|                  curlx_uztoui(strlen(cnonce)));
  417|      0|  Curl_MD5_final(ctxt, digest);
  418|       |
  419|       |  /* Convert calculated 16 octet hex into 32 bytes string */
  420|      0|  for(i = 0; i < MD5_DIGEST_LEN; i++)
  ------------------
  |  |   32|      0|#define MD5_DIGEST_LEN  16
  ------------------
  |  Branch (420:14): [True: 0, False: 0]
  ------------------
  421|      0|    curl_msnprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]);
  422|       |
  423|       |  /* Generate our SPN */
  424|      0|  spn = Curl_auth_build_spn(service, data->conn->origin->hostname, NULL);
  425|      0|  if(!spn)
  ------------------
  |  Branch (425:6): [True: 0, False: 0]
  ------------------
  426|      0|    return CURLE_OUT_OF_MEMORY;
  427|       |
  428|       |  /* Calculate H(A2) */
  429|      0|  ctxt = Curl_MD5_init(&Curl_DIGEST_MD5);
  430|      0|  if(!ctxt) {
  ------------------
  |  Branch (430:6): [True: 0, False: 0]
  ------------------
  431|      0|    curlx_free(spn);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  432|       |
  433|      0|    return CURLE_OUT_OF_MEMORY;
  434|      0|  }
  435|       |
  436|      0|  Curl_MD5_update(ctxt, (const unsigned char *)method,
  437|      0|                  curlx_uztoui(strlen(method)));
  438|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  439|      0|  Curl_MD5_update(ctxt, (const unsigned char *)spn,
  440|      0|                  curlx_uztoui(strlen(spn)));
  441|      0|  Curl_MD5_final(ctxt, digest);
  442|       |
  443|      0|  for(i = 0; i < MD5_DIGEST_LEN; i++)
  ------------------
  |  |   32|      0|#define MD5_DIGEST_LEN  16
  ------------------
  |  Branch (443:14): [True: 0, False: 0]
  ------------------
  444|      0|    curl_msnprintf(&HA2_hex[2 * i], 3, "%02x", digest[i]);
  445|       |
  446|       |  /* Now calculate the response hash */
  447|      0|  ctxt = Curl_MD5_init(&Curl_DIGEST_MD5);
  448|      0|  if(!ctxt) {
  ------------------
  |  Branch (448:6): [True: 0, False: 0]
  ------------------
  449|      0|    curlx_free(spn);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  450|       |
  451|      0|    return CURLE_OUT_OF_MEMORY;
  452|      0|  }
  453|       |
  454|      0|  Curl_MD5_update(ctxt, (const unsigned char *)HA1_hex, 2 * MD5_DIGEST_LEN);
  ------------------
  |  |   32|      0|#define MD5_DIGEST_LEN  16
  ------------------
  455|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  456|      0|  Curl_MD5_update(ctxt, (const unsigned char *)nonce,
  457|      0|                  curlx_uztoui(strlen(nonce)));
  458|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  459|       |
  460|      0|  Curl_MD5_update(ctxt, (const unsigned char *)nonceCount,
  461|      0|                  curlx_uztoui(strlen(nonceCount)));
  462|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  463|      0|  Curl_MD5_update(ctxt, (const unsigned char *)cnonce,
  464|      0|                  curlx_uztoui(strlen(cnonce)));
  465|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  466|      0|  Curl_MD5_update(ctxt, (const unsigned char *)qop,
  467|      0|                  curlx_uztoui(strlen(qop)));
  468|      0|  Curl_MD5_update(ctxt, (const unsigned char *)":", 1);
  469|       |
  470|      0|  Curl_MD5_update(ctxt, (const unsigned char *)HA2_hex, 2 * MD5_DIGEST_LEN);
  ------------------
  |  |   32|      0|#define MD5_DIGEST_LEN  16
  ------------------
  471|      0|  Curl_MD5_final(ctxt, digest);
  472|       |
  473|      0|  for(i = 0; i < MD5_DIGEST_LEN; i++)
  ------------------
  |  |   32|      0|#define MD5_DIGEST_LEN  16
  ------------------
  |  Branch (473:14): [True: 0, False: 0]
  ------------------
  474|      0|    curl_msnprintf(&resp_hash_hex[2 * i], 3, "%02x", digest[i]);
  475|       |
  476|       |  /* escape double quotes and backslashes in the username, realm and nonce as
  477|       |     necessary */
  478|      0|  qrealm = auth_digest_string_quoted(realm);
  479|      0|  qnonce = auth_digest_string_quoted(nonce);
  480|      0|  quserp = auth_digest_string_quoted(userp);
  481|      0|  if(qrealm && qnonce && quserp)
  ------------------
  |  Branch (481:6): [True: 0, False: 0]
  |  Branch (481:16): [True: 0, False: 0]
  |  Branch (481:26): [True: 0, False: 0]
  ------------------
  482|       |    /* Generate the response */
  483|      0|    response = curl_maprintf("username=\"%s\",realm=\"%s\",nonce=\"%s\","
  484|      0|                             "cnonce=\"%s\",nc=\"%s\",digest-uri=\"%s\","
  485|      0|                             "response=%s,qop=%s",
  486|      0|                             quserp, qrealm, qnonce,
  487|      0|                             cnonce, nonceCount, spn, resp_hash_hex, qop);
  488|       |
  489|      0|  curlx_free(qrealm);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  490|      0|  curlx_free(qnonce);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  491|      0|  curlx_free(quserp);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  492|      0|  curlx_free(spn);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  493|      0|  if(!response)
  ------------------
  |  Branch (493:6): [True: 0, False: 0]
  ------------------
  494|      0|    return CURLE_OUT_OF_MEMORY;
  495|       |
  496|       |  /* Return the response. */
  497|      0|  Curl_bufref_set(out, response, strlen(response), curl_free);
  498|      0|  return result;
  499|      0|}
Curl_auth_digest_cleanup:
 1035|  47.7k|{
 1036|  47.7k|  curlx_safefree(digest->nonce);
  ------------------
  |  | 1327|  47.7k|  do {                      \
  |  | 1328|  47.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  47.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  47.7k|    (ptr) = NULL;           \
  |  | 1330|  47.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 47.7k]
  |  |  ------------------
  ------------------
 1037|  47.7k|  curlx_safefree(digest->cnonce);
  ------------------
  |  | 1327|  47.7k|  do {                      \
  |  | 1328|  47.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  47.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  47.7k|    (ptr) = NULL;           \
  |  | 1330|  47.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 47.7k]
  |  |  ------------------
  ------------------
 1038|  47.7k|  curlx_safefree(digest->realm);
  ------------------
  |  | 1327|  47.7k|  do {                      \
  |  | 1328|  47.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  47.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  47.7k|    (ptr) = NULL;           \
  |  | 1330|  47.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 47.7k]
  |  |  ------------------
  ------------------
 1039|  47.7k|  curlx_safefree(digest->opaque);
  ------------------
  |  | 1327|  47.7k|  do {                      \
  |  | 1328|  47.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  47.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  47.7k|    (ptr) = NULL;           \
  |  | 1330|  47.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 47.7k]
  |  |  ------------------
  ------------------
 1040|  47.7k|  curlx_safefree(digest->qop);
  ------------------
  |  | 1327|  47.7k|  do {                      \
  |  | 1328|  47.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  47.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  47.7k|    (ptr) = NULL;           \
  |  | 1330|  47.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 47.7k]
  |  |  ------------------
  ------------------
 1041|  47.7k|  curlx_safefree(digest->algorithm);
  ------------------
  |  | 1327|  47.7k|  do {                      \
  |  | 1328|  47.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  47.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  47.7k|    (ptr) = NULL;           \
  |  | 1330|  47.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 47.7k]
  |  |  ------------------
  ------------------
 1042|       |
 1043|  47.7k|  digest->nc = 0;
 1044|  47.7k|  digest->algo = ALGO_MD5; /* default algorithm */
  ------------------
  |  |   43|  47.7k|#define ALGO_MD5 0
  ------------------
 1045|  47.7k|  digest->stale = FALSE;   /* default means normal, not stale */
  ------------------
  |  | 1058|  47.7k|#define FALSE false
  ------------------
 1046|       |  digest->userhash = FALSE;
  ------------------
  |  | 1058|  47.7k|#define FALSE false
  ------------------
 1047|  47.7k|}
digest.c:auth_decode_digest_md5_message:
  274|     32|{
  275|     32|  const char *chlg = Curl_bufref_ptr(chlgref);
  276|       |
  277|       |  /* Ensure we have a valid challenge message */
  278|     32|  if(!Curl_bufref_len(chlgref))
  ------------------
  |  Branch (278:6): [True: 13, False: 19]
  ------------------
  279|     13|    return CURLE_BAD_CONTENT_ENCODING;
  280|       |
  281|       |  /* Retrieve nonce string from the challenge */
  282|     19|  if(!auth_digest_get_key_value(chlg, "nonce", nonce, nlen))
  ------------------
  |  Branch (282:6): [True: 19, False: 0]
  ------------------
  283|     19|    return CURLE_BAD_CONTENT_ENCODING;
  284|       |
  285|       |  /* Retrieve realm string from the challenge */
  286|      0|  if(!auth_digest_get_key_value(chlg, "realm", realm, rlen)) {
  ------------------
  |  Branch (286:6): [True: 0, False: 0]
  ------------------
  287|       |    /* Challenge does not have a realm, set empty string [RFC2831] page 6 */
  288|      0|    *realm = '\0';
  289|      0|  }
  290|       |
  291|       |  /* Retrieve algorithm string from the challenge */
  292|      0|  if(!auth_digest_get_key_value(chlg, "algorithm", alg, alen))
  ------------------
  |  Branch (292:6): [True: 0, False: 0]
  ------------------
  293|      0|    return CURLE_BAD_CONTENT_ENCODING;
  294|       |
  295|       |  /* Retrieve qop-options string from the challenge */
  296|      0|  if(!auth_digest_get_key_value(chlg, "qop", qop, qlen))
  ------------------
  |  Branch (296:6): [True: 0, False: 0]
  ------------------
  297|      0|    return CURLE_BAD_CONTENT_ENCODING;
  298|       |
  299|      0|  return CURLE_OK;
  300|      0|}
digest.c:auth_digest_get_key_value:
  180|     19|{
  181|       |  /* keyword=[value],keyword2=[value]
  182|       |     The values may or may not be quoted.
  183|       |   */
  184|       |
  185|     29|  do {
  186|     29|    struct Curl_str data;
  187|     29|    struct Curl_str name;
  188|       |
  189|     29|    curlx_str_passblanks(&chlg);
  190|       |
  191|     29|    if(!curlx_str_until(&chlg, &name, 64, '=') &&
  ------------------
  |  Branch (191:8): [True: 28, False: 1]
  ------------------
  192|     28|       !curlx_str_single(&chlg, '=')) {
  ------------------
  |  Branch (192:8): [True: 19, False: 9]
  ------------------
  193|       |      /* this is the key, get the value, possibly quoted */
  194|     19|      int rc = curlx_str_quotedword(&chlg, &data, 256);
  195|     19|      if(rc == STRE_BEGQUOTE)
  ------------------
  |  |   31|     19|#define STRE_BEGQUOTE 3
  ------------------
  |  Branch (195:10): [True: 11, False: 8]
  ------------------
  196|       |        /* try unquoted until comma */
  197|     11|        rc = curlx_str_until(&chlg, &data, 256, ',');
  198|     19|      if(rc)
  ------------------
  |  Branch (198:10): [True: 7, False: 12]
  ------------------
  199|      7|        return FALSE; /* weird */
  ------------------
  |  | 1058|      7|#define FALSE false
  ------------------
  200|       |
  201|     12|      if(curlx_str_cmp(&name, key)) {
  ------------------
  |  Branch (201:10): [True: 0, False: 12]
  ------------------
  202|       |        /* if this is our key, return the value */
  203|      0|        size_t len = curlx_strlen(&data);
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  204|      0|        const char *src = curlx_str(&data);
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  205|      0|        size_t i;
  206|      0|        size_t outlen = 0;
  207|       |
  208|      0|        if(len >= buflen)
  ------------------
  |  Branch (208:12): [True: 0, False: 0]
  ------------------
  209|       |          /* does not fit */
  210|      0|          return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  211|       |
  212|      0|        for(i = 0; i < len; i++) {
  ------------------
  |  Branch (212:20): [True: 0, False: 0]
  ------------------
  213|      0|          if(src[i] == '\\' && i + 1 < len) {
  ------------------
  |  Branch (213:14): [True: 0, False: 0]
  |  Branch (213:32): [True: 0, False: 0]
  ------------------
  214|      0|            i++; /* skip backslash */
  215|      0|          }
  216|      0|          buf[outlen++] = src[i];
  217|      0|        }
  218|      0|        buf[outlen] = 0;
  219|      0|        return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  220|      0|      }
  221|     12|      if(curlx_str_single(&chlg, ','))
  ------------------
  |  Branch (221:10): [True: 2, False: 10]
  ------------------
  222|      2|        return FALSE;
  ------------------
  |  | 1058|      2|#define FALSE false
  ------------------
  223|     12|    }
  224|     10|    else /* odd syntax */
  225|     10|      break;
  226|     29|  } while(1);
  ------------------
  |  Branch (226:11): [True: 10, Folded]
  ------------------
  227|       |
  228|     10|  return FALSE;
  ------------------
  |  | 1058|     10|#define FALSE false
  ------------------
  229|     19|}

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

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|  1.95k|{
   69|       |  return keylog_file_fp != NULL;
   70|  1.95k|}

Curl_ssl_setup_x509_store:
 3289|  3.36k|{
 3290|  3.36k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3291|  3.36k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3292|  3.36k|  CURLcode result = CURLE_OK;
 3293|  3.36k|  X509_STORE *cached_store;
 3294|  3.36k|  bool cache_criteria_met, is_empty;
 3295|       |
 3296|       |  /* Consider the X509 store cacheable if it comes exclusively from a CAfile,
 3297|       |     or no source is provided and we are falling back to OpenSSL's built-in
 3298|       |     default. */
 3299|  3.36k|  cache_criteria_met = (data->set.general_ssl.ca_cache_timeout != 0) &&
  ------------------
  |  Branch (3299:24): [True: 3.36k, False: 3]
  ------------------
 3300|  3.36k|    conn_config->verifypeer &&
  ------------------
  |  Branch (3300:5): [True: 3.22k, False: 139]
  ------------------
 3301|  3.22k|    !conn_config->CApath &&
  ------------------
  |  Branch (3301:5): [True: 0, False: 3.22k]
  ------------------
 3302|      0|    !conn_config->ca_info_blob &&
  ------------------
  |  Branch (3302:5): [True: 0, False: 0]
  ------------------
 3303|      0|    !ssl_config->primary.CRLfile &&
  ------------------
  |  Branch (3303:5): [True: 0, False: 0]
  ------------------
 3304|      0|    !ssl_config->native_ca_store;
  ------------------
  |  Branch (3304:5): [True: 0, False: 0]
  ------------------
 3305|       |
 3306|  3.36k|  ERR_set_mark();
 3307|       |
 3308|  3.36k|  cached_store = ossl_get_cached_x509_store(cf, data, &is_empty);
 3309|  3.36k|  if(cached_store && cache_criteria_met && X509_STORE_up_ref(cached_store)) {
  ------------------
  |  Branch (3309:6): [True: 0, False: 3.36k]
  |  Branch (3309:22): [True: 0, False: 0]
  |  Branch (3309:44): [True: 0, False: 0]
  ------------------
 3310|      0|    SSL_CTX_set_cert_store(octx->ssl_ctx, cached_store);
 3311|      0|    octx->store_is_empty = is_empty;
 3312|      0|  }
 3313|  3.36k|  else {
 3314|  3.36k|    X509_STORE *store = SSL_CTX_get_cert_store(octx->ssl_ctx);
 3315|       |
 3316|  3.36k|    result = ossl_populate_x509_store(cf, data, octx, store);
 3317|  3.36k|    if(result == CURLE_OK && cache_criteria_met) {
  ------------------
  |  Branch (3317:8): [True: 423, False: 2.94k]
  |  Branch (3317:30): [True: 0, False: 423]
  ------------------
 3318|      0|      ossl_set_cached_x509_store(cf, data, store, (bool)octx->store_is_empty);
 3319|      0|    }
 3320|  3.36k|  }
 3321|       |
 3322|  3.36k|  ERR_pop_to_mark();
 3323|       |
 3324|  3.36k|  return result;
 3325|  3.36k|}
Curl_ossl_need_httpsrr:
 3557|  2.78k|{
 3558|  2.78k|  (void)data;
 3559|       |  return FALSE;
  ------------------
  |  | 1058|  2.78k|#define FALSE false
  ------------------
 3560|  2.78k|}
Curl_ossl_ctx_init:
 3671|  2.78k|{
 3672|  2.78k|  CURLcode result = CURLE_OK;
 3673|  2.78k|  const char *ciphers;
 3674|  2.78k|  const SSL_METHOD *req_method = NULL;
 3675|  2.78k|  ctx_option_t ctx_options = 0;
 3676|  2.78k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3677|  2.78k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3678|  2.78k|  char * const ssl_cert = ssl_config->primary.clientcert;
 3679|  2.78k|  const struct curl_blob *ssl_cert_blob = ssl_config->primary.cert_blob;
 3680|  2.78k|  const char * const ssl_cert_type = ssl_config->primary.cert_type;
 3681|  2.78k|  unsigned int ssl_version_min;
 3682|  2.78k|  char error_buffer[256];
 3683|       |
 3684|       |  /* Make funny stuff to get random input */
 3685|  2.78k|  result = ossl_seed(data);
 3686|  2.78k|  if(result)
  ------------------
  |  Branch (3686:6): [True: 0, False: 2.78k]
  ------------------
 3687|      0|    return result;
 3688|       |
 3689|  2.78k|  ssl_config->certverifyresult = !X509_V_OK;
 3690|       |
 3691|  2.78k|  result = ossl_init_method(cf, data, peer, &req_method, &ssl_version_min);
 3692|  2.78k|  if(result)
  ------------------
  |  Branch (3692:6): [True: 0, False: 2.78k]
  ------------------
 3693|      0|    return result;
 3694|  2.78k|  DEBUGASSERT(req_method);
  ------------------
  |  | 1081|  2.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3694:3): [True: 0, False: 2.78k]
  |  Branch (3694:3): [True: 2.78k, False: 0]
  ------------------
 3695|       |
 3696|  2.78k|  DEBUGASSERT(!octx->ssl_ctx);
  ------------------
  |  | 1081|  2.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3696:3): [True: 0, False: 2.78k]
  |  Branch (3696:3): [True: 2.78k, False: 0]
  ------------------
 3697|  2.78k|  octx->ssl_ctx =
 3698|  2.78k|#ifdef OPENSSL_HAS_PROVIDERS
 3699|  2.78k|    data->state.libctx ?
  ------------------
  |  Branch (3699:5): [True: 629, False: 2.15k]
  ------------------
 3700|    629|    SSL_CTX_new_ex(data->state.libctx, data->state.propq, req_method):
 3701|  2.78k|#endif
 3702|  2.78k|    SSL_CTX_new(req_method);
 3703|       |
 3704|  2.78k|  if(!octx->ssl_ctx) {
  ------------------
  |  Branch (3704:6): [True: 79, False: 2.70k]
  ------------------
 3705|     79|    failf(data, "SSL: could not create a context: %s",
  ------------------
  |  |   62|     79|#define failf Curl_failf
  ------------------
 3706|     79|          ossl_strerror(ERR_peek_error(), error_buffer, sizeof(error_buffer)));
 3707|     79|    return CURLE_OUT_OF_MEMORY;
 3708|     79|  }
 3709|       |
 3710|  2.70k|  if(cb_setup) {
  ------------------
  |  Branch (3710:6): [True: 0, False: 2.70k]
  ------------------
 3711|      0|    result = cb_setup(cf, data, cb_user_data);
 3712|      0|    if(result)
  ------------------
  |  Branch (3712:8): [True: 0, False: 0]
  ------------------
 3713|      0|      return result;
 3714|      0|  }
 3715|       |
 3716|  2.70k|  if(data->set.fdebug && data->set.verbose &&
  ------------------
  |  Branch (3716:6): [True: 0, False: 2.70k]
  |  Branch (3716:26): [True: 0, False: 0]
  ------------------
 3717|      0|     (peer->transport != TRNSPRT_QUIC)) {
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3717:6): [True: 0, False: 0]
  ------------------
 3718|       |    /* the SSL trace callback is only used for verbose logging;
 3719|       |     * QUIC connections use a different TLS record format that
 3720|       |     * ossl_trace cannot handle */
 3721|      0|    SSL_CTX_set_msg_callback(octx->ssl_ctx, ossl_trace);
 3722|      0|    SSL_CTX_set_msg_callback_arg(octx->ssl_ctx, cf);
 3723|      0|  }
 3724|       |
 3725|       |  /* OpenSSL contains code to work around lots of bugs and flaws in various
 3726|       |     SSL-implementations. SSL_CTX_set_options() is used to enabled those
 3727|       |     work-arounds. The man page for this option states that SSL_OP_ALL enables
 3728|       |     all the work-arounds and that "It is usually safe to use SSL_OP_ALL to
 3729|       |     enable the bug workaround options if compatibility with somewhat broken
 3730|       |     implementations is desired."
 3731|       |
 3732|       |     The "-no_ticket" option was introduced in OpenSSL 0.9.8j. it is a flag to
 3733|       |     disable "rfc4507bis session ticket support". rfc4507bis was later turned
 3734|       |     into the proper RFC5077: https://datatracker.ietf.org/doc/html/rfc5077
 3735|       |
 3736|       |     The enabled extension concerns the session management. I wonder how often
 3737|       |     libcurl stops a connection and then resumes a TLS session. Also, sending
 3738|       |     the session data is some overhead. I suggest that you use your proposed
 3739|       |     patch (which explicitly disables TICKET).
 3740|       |
 3741|       |     If someone writes an application with libcurl and OpenSSL who wants to
 3742|       |     enable the feature, one can do this in the SSL callback.
 3743|       |
 3744|       |     SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option enabling allowed proper
 3745|       |     interoperability with web server Netscape Enterprise Server 2.0.1 which
 3746|       |     was released back in 1996.
 3747|       |
 3748|       |     Due to CVE-2010-4180, option SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG has
 3749|       |     become ineffective as of OpenSSL 0.9.8q and 1.0.0c. In order to mitigate
 3750|       |     CVE-2010-4180 when using previous OpenSSL versions we no longer enable
 3751|       |     this option regardless of OpenSSL version and SSL_OP_ALL definition.
 3752|       |
 3753|       |     OpenSSL added a work-around for an SSL 3.0/TLS 1.0 CBC vulnerability:
 3754|       |     https://web.archive.org/web/20240114184648/openssl.org/~bodo/tls-cbc.txt.
 3755|       |     In 0.9.6e they added a bit to SSL_OP_ALL that _disables_ that work-around
 3756|       |     despite the fact that SSL_OP_ALL is documented to do "rather harmless"
 3757|       |     workarounds. In order to keep the secure work-around, the
 3758|       |     SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit must not be set.
 3759|       |  */
 3760|       |
 3761|  2.70k|  ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET | SSL_OP_NO_COMPRESSION;
 3762|       |
 3763|       |  /* mitigate CVE-2010-4180 */
 3764|  2.70k|  ctx_options &= ~(ctx_option_t)SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG;
 3765|       |
 3766|       |  /* unless the user explicitly asks to allow the protocol vulnerability we
 3767|       |     use the work-around */
 3768|  2.70k|  if(!ssl_config->enable_beast)
  ------------------
  |  Branch (3768:6): [True: 2.70k, False: 3]
  ------------------
 3769|  2.70k|    ctx_options &= ~(ctx_option_t)SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
 3770|       |
 3771|  2.70k|  DEBUGASSERT(ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1081|  2.70k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3771:3): [True: 0, False: 2.70k]
  |  Branch (3771:3): [True: 2.70k, False: 0]
  ------------------
 3772|  2.70k|  switch(ssl_version_min) {
 3773|      0|  case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2370|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3773:3): [True: 0, False: 2.70k]
  ------------------
 3774|      0|  case CURL_SSLVERSION_SSLv3:
  ------------------
  |  | 2371|      0|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (3774:3): [True: 0, False: 2.70k]
  ------------------
 3775|      0|    return CURLE_NOT_BUILT_IN;
 3776|       |
 3777|       |    /* "--tlsv<x.y>" options mean TLS >= version <x.y> */
 3778|     14|  case CURL_SSLVERSION_TLSv1:   /* TLS >= version 1.0 */
  ------------------
  |  | 2369|     14|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3778:3): [True: 14, False: 2.69k]
  ------------------
 3779|     16|  case CURL_SSLVERSION_TLSv1_0: /* TLS >= version 1.0 */
  ------------------
  |  | 2372|     16|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3779:3): [True: 2, False: 2.70k]
  ------------------
 3780|     30|  case CURL_SSLVERSION_TLSv1_1: /* TLS >= version 1.1 */
  ------------------
  |  | 2373|     30|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3780:3): [True: 14, False: 2.69k]
  ------------------
 3781|  2.69k|  case CURL_SSLVERSION_TLSv1_2: /* TLS >= version 1.2 */
  ------------------
  |  | 2374|  2.69k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3781:3): [True: 2.66k, False: 40]
  ------------------
 3782|  2.70k|  case CURL_SSLVERSION_TLSv1_3: /* TLS >= version 1.3 */
  ------------------
  |  | 2375|  2.70k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3782:3): [True: 10, False: 2.69k]
  ------------------
 3783|       |    /* asking for any TLS version as the minimum, means no SSL versions
 3784|       |       allowed */
 3785|  2.70k|    ctx_options |= SSL_OP_NO_SSLv2;
 3786|  2.70k|    ctx_options |= SSL_OP_NO_SSLv3;
 3787|       |
 3788|  2.70k|    result = ossl_set_ssl_version_min_max(cf, octx->ssl_ctx, ssl_version_min);
 3789|  2.70k|    if(result)
  ------------------
  |  Branch (3789:8): [True: 0, False: 2.70k]
  ------------------
 3790|      0|      return result;
 3791|  2.70k|    break;
 3792|       |
 3793|  2.70k|  default:
  ------------------
  |  Branch (3793:3): [True: 0, False: 2.70k]
  ------------------
 3794|      0|    failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3795|      0|    return CURLE_SSL_CONNECT_ERROR;
 3796|  2.70k|  }
 3797|       |
 3798|  2.70k|  SSL_CTX_set_options(octx->ssl_ctx, ctx_options);
 3799|  2.70k|  SSL_CTX_set_read_ahead(octx->ssl_ctx, 1);
 3800|       |
 3801|       |  /* Max TLS1.2 record size 0x4000 + 0x800.
 3802|       |     OpenSSL supports processing "jumbo TLS record" (8 TLS records) in one go
 3803|       |     for some algorithms, so match that here.
 3804|       |     Experimentation shows that a slightly larger buffer is needed
 3805|       |     to avoid short reads.
 3806|       |
 3807|       |     However using a large buffer (8 packets) actually decreases performance.
 3808|       |     4 packets is better.
 3809|       |   */
 3810|  2.70k|#ifdef HAVE_SSL_CTX_SET_DEFAULT_READ_BUFFER_LEN
 3811|  2.70k|  SSL_CTX_set_default_read_buffer_len(octx->ssl_ctx, 0x401e * 4);
 3812|  2.70k|#endif
 3813|       |
 3814|       |  /* We do retry writes sometimes from another buffer address */
 3815|  2.70k|  SSL_CTX_set_mode(octx->ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
 3816|       |
 3817|  2.70k|  ciphers = conn_config->cipher_list;
 3818|  2.70k|  if(!ciphers && (peer->transport != TRNSPRT_QUIC))
  ------------------
  |  |  309|  1.87k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3818:6): [True: 1.87k, False: 835]
  |  Branch (3818:18): [True: 1.87k, False: 0]
  ------------------
 3819|  1.87k|    ciphers = NULL;
 3820|  2.70k|  if(ciphers && (ssl_version_min < CURL_SSLVERSION_TLSv1_3)) {
  ------------------
  |  | 2375|    835|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3820:6): [True: 835, False: 1.87k]
  |  Branch (3820:17): [True: 834, False: 1]
  ------------------
 3821|    834|    if(!SSL_CTX_set_cipher_list(octx->ssl_ctx, ciphers)) {
  ------------------
  |  Branch (3821:8): [True: 579, False: 255]
  ------------------
 3822|    579|      failf(data, "failed setting cipher list: %s", ciphers);
  ------------------
  |  |   62|    579|#define failf Curl_failf
  ------------------
 3823|    579|      return CURLE_SSL_CIPHER;
 3824|    579|    }
 3825|    255|    infof(data, "Cipher selection: %s", ciphers);
  ------------------
  |  |  143|    255|  do {                               \
  |  |  144|    255|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    255|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 255, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 255]
  |  |  |  |  ------------------
  |  |  |  |  320|    255|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    255|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    255|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 255]
  |  |  ------------------
  ------------------
 3826|    255|  }
 3827|       |
 3828|  2.12k|#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
 3829|  2.12k|  {
 3830|  2.12k|    const char *ciphers13 = conn_config->cipher_list13;
 3831|  2.12k|    if(ciphers13 &&
  ------------------
  |  Branch (3831:8): [True: 151, False: 1.97k]
  ------------------
 3832|    151|       (!conn_config->version_max ||
  ------------------
  |  Branch (3832:9): [True: 143, False: 8]
  ------------------
 3833|      8|        (conn_config->version_max == CURL_SSLVERSION_MAX_DEFAULT) ||
  ------------------
  |  | 2380|      8|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2369|      8|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (3833:9): [True: 2, False: 6]
  ------------------
 3834|    150|        (conn_config->version_max >= CURL_SSLVERSION_MAX_TLSv1_3))) {
  ------------------
  |  | 2384|      6|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2375|      6|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (3834:9): [True: 5, False: 1]
  ------------------
 3835|    150|      if(!SSL_CTX_set_ciphersuites(octx->ssl_ctx, ciphers13)) {
  ------------------
  |  Branch (3835:10): [True: 83, False: 67]
  ------------------
 3836|     83|        failf(data, "failed setting TLS 1.3 cipher suite: %s", ciphers13);
  ------------------
  |  |   62|     83|#define failf Curl_failf
  ------------------
 3837|     83|        return CURLE_SSL_CIPHER;
 3838|     83|      }
 3839|     67|      infof(data, "TLS 1.3 cipher selection: %s", ciphers13);
  ------------------
  |  |  143|     67|  do {                               \
  |  |  144|     67|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     67|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 67, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 67]
  |  |  |  |  ------------------
  |  |  |  |  320|     67|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     67|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     67|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 67]
  |  |  ------------------
  ------------------
 3840|     67|    }
 3841|  2.12k|  }
 3842|  2.04k|#endif
 3843|       |
 3844|  2.04k|  if(ssl_cert || ssl_cert_blob || ssl_cert_type) {
  ------------------
  |  Branch (3844:6): [True: 9, False: 2.03k]
  |  Branch (3844:18): [True: 0, False: 2.03k]
  |  Branch (3844:35): [True: 10, False: 2.02k]
  ------------------
 3845|     19|    result = client_cert(data, octx->ssl_ctx,
 3846|     19|                         ssl_cert, ssl_cert_blob, ssl_cert_type,
 3847|     19|                         ssl_config->primary.key, ssl_config->primary.key_blob,
 3848|     19|                         ssl_config->primary.key_type,
 3849|     19|                         ssl_config->primary.key_passwd);
 3850|     19|    if(result)
  ------------------
  |  Branch (3850:8): [True: 9, False: 10]
  ------------------
 3851|       |      /* failf() is already done in client_cert() */
 3852|      9|      return result;
 3853|     19|  }
 3854|       |
 3855|  2.03k|#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
 3856|       |  /* OpenSSL 1.1.1 requires clients to opt-in for PHA */
 3857|  2.03k|  SSL_CTX_set_post_handshake_auth(octx->ssl_ctx, 1);
 3858|  2.03k|#endif
 3859|       |
 3860|  2.03k|  {
 3861|  2.03k|    const char *curves = conn_config->curves;
 3862|  2.03k|    if(curves) {
  ------------------
  |  Branch (3862:8): [True: 565, False: 1.46k]
  ------------------
 3863|       |#ifdef HAVE_BORINGSSL_LIKE
 3864|       |#define OSSL_CURVE_CAST(x) (x)
 3865|       |#else
 3866|    565|#define OSSL_CURVE_CAST(x) (char *)CURL_UNCONST(x)
 3867|    565|#endif
 3868|    565|      if(!SSL_CTX_set1_curves_list(octx->ssl_ctx, OSSL_CURVE_CAST(curves))) {
  ------------------
  |  Branch (3868:10): [True: 74, False: 491]
  ------------------
 3869|     74|        failf(data, "failed setting curves list: '%s'", curves);
  ------------------
  |  |   62|     74|#define failf Curl_failf
  ------------------
 3870|     74|        return CURLE_SSL_CIPHER;
 3871|     74|      }
 3872|    565|    }
 3873|  2.03k|  }
 3874|       |
 3875|  1.96k|#ifdef HAVE_SSL_CTX_SET1_SIGALGS
 3876|  1.96k|#define OSSL_SIGALG_CAST(x) OSSL_CURVE_CAST(x)
 3877|  1.96k|  {
 3878|  1.96k|    const char *signature_algorithms = conn_config->signature_algorithms;
 3879|  1.96k|    if(signature_algorithms) {
  ------------------
  |  Branch (3879:8): [True: 0, False: 1.96k]
  ------------------
 3880|      0|      if(!SSL_CTX_set1_sigalgs_list(octx->ssl_ctx,
  ------------------
  |  Branch (3880:10): [True: 0, False: 0]
  ------------------
 3881|      0|                                    OSSL_SIGALG_CAST(signature_algorithms))) {
 3882|      0|        failf(data, "failed setting signature algorithms: '%s'",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3883|      0|              signature_algorithms);
 3884|      0|        return CURLE_SSL_CIPHER;
 3885|      0|      }
 3886|      0|    }
 3887|  1.96k|  }
 3888|  1.96k|#endif
 3889|       |
 3890|  1.96k|#if defined(HAVE_OPENSSL_SRP) && defined(USE_TLS_SRP)
 3891|  1.96k|  if(ssl_config->primary.username && Curl_auth_allowed_to_host(data)) {
  ------------------
  |  Branch (3891:6): [True: 6, False: 1.95k]
  |  Branch (3891:38): [True: 6, False: 0]
  ------------------
 3892|      6|    char * const ssl_username = ssl_config->primary.username;
 3893|      6|    char * const ssl_password = ssl_config->primary.password;
 3894|      6|    infof(data, "Using TLS-SRP username: %s", ssl_username);
  ------------------
  |  |  143|      6|  do {                               \
  |  |  144|      6|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      6|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 6, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  320|      6|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      6|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      6|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 6]
  |  |  ------------------
  ------------------
 3895|       |
 3896|      6|    if(!SSL_CTX_set_srp_username(octx->ssl_ctx, ssl_username)) {
  ------------------
  |  Branch (3896:8): [True: 2, False: 4]
  ------------------
 3897|      2|      failf(data, "Unable to set SRP username");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
 3898|      2|      return CURLE_BAD_FUNCTION_ARGUMENT;
 3899|      2|    }
 3900|      4|    if(!SSL_CTX_set_srp_password(octx->ssl_ctx, ssl_password)) {
  ------------------
  |  Branch (3900:8): [True: 2, False: 2]
  ------------------
 3901|      2|      failf(data, "failed setting SRP password");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
 3902|      2|      return CURLE_BAD_FUNCTION_ARGUMENT;
 3903|      2|    }
 3904|      2|    if(!conn_config->cipher_list) {
  ------------------
  |  Branch (3904:8): [True: 1, False: 1]
  ------------------
 3905|      1|      infof(data, "Setting cipher list SRP");
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  320|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 3906|       |
 3907|      1|      if(!SSL_CTX_set_cipher_list(octx->ssl_ctx, "SRP")) {
  ------------------
  |  Branch (3907:10): [True: 0, False: 1]
  ------------------
 3908|      0|        failf(data, "failed setting SRP cipher list");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3909|      0|        return CURLE_SSL_CIPHER;
 3910|      0|      }
 3911|      1|    }
 3912|      2|  }
 3913|  1.95k|#endif /* HAVE_OPENSSL_SRP && USE_TLS_SRP */
 3914|       |
 3915|       |  /* OpenSSL always tries to verify the peer. By setting the failure mode
 3916|       |   * to NONE, we allow the connect to complete, regardless of the outcome.
 3917|       |   * We then explicitly check the result and may try alternatives like
 3918|       |   * Apple's SecTrust for verification. */
 3919|  1.95k|  SSL_CTX_set_verify(octx->ssl_ctx, SSL_VERIFY_NONE, NULL);
 3920|       |
 3921|       |  /* Enable logging of secrets to the file specified in env SSLKEYLOGFILE. */
 3922|  1.95k|#if !defined(HAVE_KEYLOG_UPSTREAM) && defined(HAVE_KEYLOG_CALLBACK)
 3923|  1.95k|  if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (3923:6): [True: 0, False: 1.95k]
  ------------------
 3924|      0|    SSL_CTX_set_keylog_callback(octx->ssl_ctx, ossl_keylog_callback);
 3925|      0|  }
 3926|  1.95k|#endif
 3927|       |
 3928|  1.95k|  if(cb_new_session) {
  ------------------
  |  Branch (3928:6): [True: 1.95k, False: 0]
  ------------------
 3929|       |    /* Enable the session cache because it is a prerequisite for the
 3930|       |     * "new session" callback. Use the "external storage" mode to prevent
 3931|       |     * OpenSSL from creating an internal session cache.
 3932|       |     */
 3933|  1.95k|    SSL_CTX_set_session_cache_mode(octx->ssl_ctx,
 3934|  1.95k|                                   SSL_SESS_CACHE_CLIENT |
 3935|  1.95k|                                   SSL_SESS_CACHE_NO_INTERNAL);
 3936|  1.95k|    SSL_CTX_sess_set_new_cb(octx->ssl_ctx, cb_new_session);
 3937|  1.95k|  }
 3938|       |
 3939|       |  /* give application a chance to interfere with SSL set up. */
 3940|  1.95k|  if(data->set.ssl.fsslctx) {
  ------------------
  |  Branch (3940:6): [True: 0, False: 1.95k]
  ------------------
 3941|       |    /* When a user callback is installed to modify the SSL_CTX,
 3942|       |     * we need to do the full initialization before calling it.
 3943|       |     * See: #11800 */
 3944|      0|    if(!octx->x509_store_setup) {
  ------------------
  |  Branch (3944:8): [True: 0, False: 0]
  ------------------
 3945|      0|      result = Curl_ssl_setup_x509_store(cf, data, octx);
 3946|      0|      if(result)
  ------------------
  |  Branch (3946:10): [True: 0, False: 0]
  ------------------
 3947|      0|        return result;
 3948|      0|      octx->x509_store_setup = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3949|      0|    }
 3950|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3951|      0|    result = (*data->set.ssl.fsslctx)(data, octx->ssl_ctx,
 3952|      0|                                      data->set.ssl.fsslctxp);
 3953|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 3954|      0|    if(result) {
  ------------------
  |  Branch (3954:8): [True: 0, False: 0]
  ------------------
 3955|      0|      failf(data, "error signaled by SSL ctx callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3956|      0|      return result;
 3957|      0|    }
 3958|      0|  }
 3959|       |
 3960|  1.95k|  return ossl_init_ssl(octx, cf, data, peer, alpns_requested,
 3961|  1.95k|                       ssl_user_data, sess_reuse_cb);
 3962|  1.95k|}
Curl_ossl_version:
 5408|  3.44k|{
 5409|       |#ifdef LIBRESSL_VERSION_NUMBER
 5410|       |  char *p;
 5411|       |  size_t count;
 5412|       |  const char *ver = OpenSSL_version(OPENSSL_VERSION);
 5413|       |  const char expected[] = OSSL_PACKAGE " "; /* ie "LibreSSL " */
 5414|       |  if(curl_strnequal(ver, expected, sizeof(expected) - 1)) {
 5415|       |    ver += sizeof(expected) - 1;
 5416|       |  }
 5417|       |  count = curl_msnprintf(buffer, size, "%s/%s", OSSL_PACKAGE, ver);
 5418|       |  for(p = buffer; *p; ++p) {
 5419|       |    if(ISBLANK(*p))
 5420|       |      *p = '_';
 5421|       |  }
 5422|       |  return count;
 5423|       |#elif defined(OPENSSL_IS_AWSLC)
 5424|       |  return curl_msnprintf(buffer, size, "%s/%s",
 5425|       |                        OSSL_PACKAGE, AWSLC_VERSION_NUMBER_STRING);
 5426|       |#elif defined(OPENSSL_IS_BORINGSSL)
 5427|       |#ifdef CURL_BORINGSSL_VERSION
 5428|       |  return curl_msnprintf(buffer, size, "%s/%s",
 5429|       |                        OSSL_PACKAGE, CURL_BORINGSSL_VERSION);
 5430|       |#else
 5431|       |  return curl_msnprintf(buffer, size, OSSL_PACKAGE);
 5432|       |#endif
 5433|       |#else /* OpenSSL 3+ */
 5434|  3.44k|  return curl_msnprintf(buffer, size, "%s/%s",
 5435|  3.44k|                        OSSL_PACKAGE, OpenSSL_version(OPENSSL_VERSION_STRING));
  ------------------
  |  |  163|  3.44k|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 5436|  3.44k|#endif
 5437|  3.44k|}
openssl.c:ossl_get_cached_x509_store:
 3211|  3.36k|{
 3212|  3.36k|  struct Curl_multi *multi = data->multi;
 3213|  3.36k|  struct ossl_x509_share *share;
 3214|  3.36k|  X509_STORE *store = NULL;
 3215|       |
 3216|  3.36k|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|  3.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3216:3): [True: 0, False: 3.36k]
  |  Branch (3216:3): [True: 3.36k, False: 0]
  ------------------
 3217|  3.36k|  *pempty = TRUE;
  ------------------
  |  | 1055|  3.36k|#define TRUE true
  ------------------
 3218|  3.36k|  share = multi ? Curl_hash_pick(&multi->proto_hash,
  ------------------
  |  Branch (3218:11): [True: 3.36k, False: 0]
  ------------------
 3219|  3.36k|                                 CURL_UNCONST(MPROTO_OSSL_X509_KEY),
  ------------------
  |  |  866|  3.36k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3220|  3.36k|                                 sizeof(MPROTO_OSSL_X509_KEY) - 1) : NULL;
  ------------------
  |  | 3156|  3.36k|#define MPROTO_OSSL_X509_KEY  "tls:ossl:x509:share"
  ------------------
 3221|  3.36k|  if(share && share->store &&
  ------------------
  |  Branch (3221:6): [True: 0, False: 3.36k]
  |  Branch (3221:15): [True: 0, False: 0]
  ------------------
 3222|      0|     !ossl_cached_x509_store_expired(data, share) &&
  ------------------
  |  Branch (3222:6): [True: 0, False: 0]
  ------------------
 3223|      0|     !ossl_cached_x509_store_different(cf, data, share)) {
  ------------------
  |  Branch (3223:6): [True: 0, False: 0]
  ------------------
 3224|      0|    store = share->store;
 3225|      0|    *pempty = (bool)share->store_is_empty;
 3226|      0|  }
 3227|       |
 3228|  3.36k|  return store;
 3229|  3.36k|}
openssl.c:ossl_populate_x509_store:
 3095|  3.36k|{
 3096|  3.36k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3097|  3.36k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3098|  3.36k|  CURLcode result = CURLE_OK;
 3099|  3.36k|  X509_LOOKUP *lookup = NULL;
 3100|  3.36k|  const char * const ssl_crlfile = ssl_config->primary.CRLfile;
 3101|  3.36k|  unsigned long x509flags = 0;
 3102|       |
 3103|  3.36k|  CURL_TRC_CF(data, cf, "configuring OpenSSL's x509 trust store");
  ------------------
  |  |  153|  3.36k|  do {                                          \
  |  |  154|  3.36k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.36k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  6.73k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.36k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  6.73k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.36k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.36k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.36k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.36k]
  |  |  ------------------
  ------------------
 3104|  3.36k|  if(!store)
  ------------------
  |  Branch (3104:6): [True: 0, False: 3.36k]
  ------------------
 3105|      0|    return CURLE_OUT_OF_MEMORY;
 3106|       |
 3107|  3.36k|  if(!conn_config->verifypeer) {
  ------------------
  |  Branch (3107:6): [True: 139, False: 3.23k]
  ------------------
 3108|    139|    infof(data, "SSL Trust: peer verification disabled");
  ------------------
  |  |  143|    139|  do {                               \
  |  |  144|    139|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    139|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 139, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 139]
  |  |  |  |  ------------------
  |  |  |  |  320|    139|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    139|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    139|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 139]
  |  |  ------------------
  ------------------
 3109|    139|    return CURLE_OK;
 3110|    139|  }
 3111|       |
 3112|  3.23k|  infof(data, "SSL Trust Anchors:");
  ------------------
  |  |  143|  3.23k|  do {                               \
  |  |  144|  3.23k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  3.23k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 3.23k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.23k]
  |  |  |  |  ------------------
  |  |  |  |  320|  3.23k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.23k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.23k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.23k]
  |  |  ------------------
  ------------------
 3113|  3.23k|  result = ossl_load_trust_anchors(cf, data, octx, store);
 3114|  3.23k|  if(result)
  ------------------
  |  Branch (3114:6): [True: 244, False: 2.98k]
  ------------------
 3115|    244|    return result;
 3116|       |
 3117|       |  /* Does not make sense to load a CRL file without peer verification */
 3118|  2.98k|  if(ssl_crlfile) {
  ------------------
  |  Branch (3118:6): [True: 2.70k, False: 284]
  ------------------
 3119|       |    /* tell OpenSSL where to find CRL file that is used to check certificate
 3120|       |     * revocation */
 3121|  2.70k|    lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
 3122|  2.70k|    if(!lookup ||
  ------------------
  |  Branch (3122:8): [True: 0, False: 2.70k]
  ------------------
 3123|  2.70k|       (!X509_load_crl_file(lookup, ssl_crlfile, X509_FILETYPE_PEM))) {
  ------------------
  |  Branch (3123:8): [True: 2.70k, False: 0]
  ------------------
 3124|  2.70k|      failf(data, "error loading CRL file: %s", ssl_crlfile);
  ------------------
  |  |   62|  2.70k|#define failf Curl_failf
  ------------------
 3125|  2.70k|      return CURLE_SSL_CRL_BADFILE;
 3126|  2.70k|    }
 3127|      0|    x509flags = X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL;
 3128|      0|    infof(data, " CRLfile: %s", ssl_crlfile);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3129|      0|  }
 3130|       |
 3131|       |  /* Try building a chain using issuers in the trusted store first to avoid
 3132|       |     problems with server-sent legacy intermediates. Newer versions of
 3133|       |     OpenSSL do alternate chain checking by default but we do not know how to
 3134|       |     determine that in a reliable manner.
 3135|       |     https://web.archive.org/web/20190422050538/rt.openssl.org/Ticket/Display.html?id=3621
 3136|       |  */
 3137|    284|  x509flags |= X509_V_FLAG_TRUSTED_FIRST;
 3138|       |
 3139|    284|  if(!ssl_config->no_partialchain && !ssl_crlfile) {
  ------------------
  |  Branch (3139:6): [True: 283, False: 1]
  |  Branch (3139:38): [True: 283, False: 0]
  ------------------
 3140|       |    /* Have intermediate certificates in the trust store be treated as
 3141|       |       trust-anchors, in the same way as self-signed root CA certificates are.
 3142|       |       This allows users to verify servers using the intermediate cert only,
 3143|       |       instead of needing the whole chain.
 3144|       |
 3145|       |       Due to OpenSSL bug https://github.com/openssl/openssl/issues/5081 we
 3146|       |       cannot do partial chains with a CRL check.
 3147|       |    */
 3148|    283|    x509flags |= X509_V_FLAG_PARTIAL_CHAIN;
 3149|    283|  }
 3150|    284|  (void)X509_STORE_set_flags(store, x509flags);
 3151|       |
 3152|    284|  return result;
 3153|  2.98k|}
openssl.c:ossl_load_trust_anchors:
 2984|  3.23k|{
 2985|  3.23k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 2986|  3.23k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 2987|  3.23k|  CURLcode result = CURLE_OK;
 2988|  3.23k|  const char * const ssl_cafile =
 2989|       |    /* CURLOPT_CAINFO_BLOB overrides CURLOPT_CAINFO */
 2990|  3.23k|    (conn_config->ca_info_blob ? NULL : conn_config->CAfile);
  ------------------
  |  Branch (2990:6): [True: 0, False: 3.23k]
  ------------------
 2991|  3.23k|  const char * const ssl_capath = conn_config->CApath;
 2992|  3.23k|  bool have_native_check = FALSE;
  ------------------
  |  | 1058|  3.23k|#define FALSE false
  ------------------
 2993|       |
 2994|  3.23k|  octx->store_is_empty = TRUE;
  ------------------
  |  | 1055|  3.23k|#define TRUE true
  ------------------
 2995|  3.23k|  if(ssl_config->native_ca_store) {
  ------------------
  |  Branch (2995:6): [True: 2, False: 3.22k]
  ------------------
 2996|       |#ifdef USE_WIN32_CRYPTO
 2997|       |    bool added = FALSE;
 2998|       |    result = ossl_windows_load_anchors(cf, data, store, &added);
 2999|       |    if(result)
 3000|       |      return result;
 3001|       |    if(added) {
 3002|       |      infof(data, "  Native: Windows System Stores ROOT+CA");
 3003|       |      octx->store_is_empty = FALSE;
 3004|       |    }
 3005|       |#elif defined(USE_APPLE_SECTRUST)
 3006|       |    infof(data, "  Native: Apple SecTrust");
 3007|       |    have_native_check = TRUE;
 3008|       |#endif
 3009|      2|  }
 3010|       |
 3011|  3.23k|  if(conn_config->ca_info_blob) {
  ------------------
  |  Branch (3011:6): [True: 0, False: 3.23k]
  ------------------
 3012|      0|    result = load_cacert_from_memory(store, conn_config->ca_info_blob);
 3013|      0|    if(result) {
  ------------------
  |  Branch (3013:8): [True: 0, False: 0]
  ------------------
 3014|      0|      failf(data, "error adding trust anchors from certificate blob: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3015|      0|            result);
 3016|      0|      return result;
 3017|      0|    }
 3018|      0|    infof(data, "  CA Blob from configuration");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3019|      0|    octx->store_is_empty = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 3020|      0|  }
 3021|       |
 3022|  3.23k|  if(ssl_cafile || ssl_capath) {
  ------------------
  |  Branch (3022:6): [True: 3.23k, False: 0]
  |  Branch (3022:20): [True: 0, False: 0]
  ------------------
 3023|  3.23k|#ifdef HAVE_OPENSSL3
 3024|       |    /* OpenSSL 3.0.0 has deprecated SSL_CTX_load_verify_locations */
 3025|  3.23k|    if(ssl_cafile) {
  ------------------
  |  Branch (3025:8): [True: 3.23k, False: 0]
  ------------------
 3026|  3.23k|      if(!X509_STORE_load_file(store, ssl_cafile)) {
  ------------------
  |  Branch (3026:10): [True: 244, False: 2.98k]
  ------------------
 3027|    244|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3027:12): [True: 244, False: 0]
  |  Branch (3027:36): [True: 244, False: 0]
  ------------------
 3028|       |          /* Fail if we insist on successfully verifying the server. */
 3029|    244|          failf(data, "error adding trust anchors from file: %s", ssl_cafile);
  ------------------
  |  |   62|    244|#define failf Curl_failf
  ------------------
 3030|    244|          return CURLE_SSL_CACERT_BADFILE;
 3031|    244|        }
 3032|      0|        else
 3033|      0|          infof(data, "error setting certificate file, continuing anyway");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3034|    244|      }
 3035|  2.98k|      infof(data, "  CAfile: %s", ssl_cafile);
  ------------------
  |  |  143|  2.98k|  do {                               \
  |  |  144|  2.98k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.98k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.98k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.98k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.98k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.98k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.98k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.98k]
  |  |  ------------------
  ------------------
 3036|  2.98k|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1058|  2.98k|#define FALSE false
  ------------------
 3037|  2.98k|    }
 3038|  2.98k|    if(ssl_capath) {
  ------------------
  |  Branch (3038:8): [True: 2.98k, False: 0]
  ------------------
 3039|  2.98k|      if(!X509_STORE_load_path(store, ssl_capath)) {
  ------------------
  |  Branch (3039:10): [True: 6, False: 2.98k]
  ------------------
 3040|      6|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3040:12): [True: 0, False: 6]
  |  Branch (3040:36): [True: 0, False: 0]
  ------------------
 3041|       |          /* Fail if we insist on successfully verifying the server. */
 3042|      0|          failf(data, "error adding trust anchors from path: %s", ssl_capath);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3043|      0|          return CURLE_SSL_CACERT_BADFILE;
 3044|      0|        }
 3045|      6|        else
 3046|      6|          infof(data, "error setting certificate path, continuing anyway");
  ------------------
  |  |  143|      6|  do {                               \
  |  |  144|      6|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      6|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 6, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  320|      6|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      6|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      6|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 6]
  |  |  ------------------
  ------------------
 3047|      6|      }
 3048|  2.98k|      infof(data, "  CApath: %s", ssl_capath);
  ------------------
  |  |  143|  2.98k|  do {                               \
  |  |  144|  2.98k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.98k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.98k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.98k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.98k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.98k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.98k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.98k]
  |  |  ------------------
  ------------------
 3049|  2.98k|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1058|  2.98k|#define FALSE false
  ------------------
 3050|  2.98k|    }
 3051|       |#else
 3052|       |    /* tell OpenSSL where to find CA certificates that are used to verify the
 3053|       |       server's certificate. */
 3054|       |    if(!X509_STORE_load_locations(store, ssl_cafile, ssl_capath)) {
 3055|       |      if(octx->store_is_empty && !have_native_check) {
 3056|       |        /* Fail if we insist on successfully verifying the server. */
 3057|       |        failf(data, "error adding trust anchors from locations:"
 3058|       |              "  CAfile: %s CApath: %s",
 3059|       |              ssl_cafile ? ssl_cafile : "none",
 3060|       |              ssl_capath ? ssl_capath : "none");
 3061|       |        return CURLE_SSL_CACERT_BADFILE;
 3062|       |      }
 3063|       |      else {
 3064|       |        infof(data, "error setting certificate verify locations,"
 3065|       |              " continuing anyway");
 3066|       |      }
 3067|       |    }
 3068|       |    if(ssl_cafile)
 3069|       |      infof(data, "  CAfile: %s", ssl_cafile);
 3070|       |    if(ssl_capath)
 3071|       |      infof(data, "  CApath: %s", ssl_capath);
 3072|       |    octx->store_is_empty = FALSE;
 3073|       |#endif
 3074|  2.98k|  }
 3075|       |
 3076|       |#ifdef CURL_CA_FALLBACK
 3077|       |  if(octx->store_is_empty) {
 3078|       |    /* verifying the peer without any CA certificates does not
 3079|       |       work so use OpenSSL's built-in default as fallback */
 3080|       |    X509_STORE_set_default_paths(store);
 3081|       |    infof(data, "  OpenSSL default paths (fallback)");
 3082|       |    octx->store_is_empty = FALSE;
 3083|       |  }
 3084|       |#endif
 3085|  2.98k|  if(octx->store_is_empty && !have_native_check)
  ------------------
  |  Branch (3085:6): [True: 0, False: 2.98k]
  |  Branch (3085:30): [True: 0, False: 0]
  ------------------
 3086|      0|    infof(data, "  no trust anchors configured");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3087|       |
 3088|  2.98k|  return result;
 3089|  3.23k|}
openssl.c:ossl_seed:
  801|  6.04k|{
  802|       |  /* This might get called before it has been added to a multi handle */
  803|  6.04k|  if(data->multi && data->multi->ssl_seeded)
  ------------------
  |  Branch (803:6): [True: 2.88k, False: 3.16k]
  |  Branch (803:21): [True: 76, False: 2.80k]
  ------------------
  804|     76|    return CURLE_OK;
  805|       |
  806|  5.97k|  if(rand_enough()) {
  ------------------
  |  Branch (806:6): [True: 5.97k, False: 0]
  ------------------
  807|       |    /* OpenSSL 1.1.0+ should return here */
  808|  5.97k|    if(data->multi)
  ------------------
  |  Branch (808:8): [True: 2.80k, False: 3.16k]
  ------------------
  809|  2.80k|      data->multi->ssl_seeded = TRUE;
  ------------------
  |  | 1055|  2.80k|#define TRUE true
  ------------------
  810|  5.97k|    return CURLE_OK;
  811|  5.97k|  }
  812|      0|  failf(data, "Insufficient randomness");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  813|      0|  return CURLE_SSL_CONNECT_ERROR;
  814|  5.97k|}
openssl.c:rand_enough:
  796|  5.97k|{
  797|  5.97k|  return RAND_status() != 0;
  798|  5.97k|}
openssl.c:ossl_init_method:
 3613|  2.78k|{
 3614|  2.78k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3615|       |
 3616|  2.78k|  *pmethod = NULL;
 3617|  2.78k|  *pssl_version_min = conn_config->version;
 3618|  2.78k|  DEBUGASSERT(conn_config->version != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1081|  2.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3618:3): [True: 0, False: 2.78k]
  |  Branch (3618:3): [True: 2.78k, False: 0]
  ------------------
 3619|  2.78k|  switch(peer->transport) {
 3620|  2.78k|  case TRNSPRT_TCP:
  ------------------
  |  |  307|  2.78k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (3620:3): [True: 2.78k, False: 0]
  ------------------
 3621|       |    /* check to see if we have been told to use an explicit SSL/TLS version */
 3622|  2.78k|    switch(*pssl_version_min) {
 3623|     14|    case CURL_SSLVERSION_TLSv1:
  ------------------
  |  | 2369|     14|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3623:5): [True: 14, False: 2.77k]
  ------------------
 3624|     16|    case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2372|     16|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3624:5): [True: 2, False: 2.78k]
  ------------------
 3625|     30|    case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2373|     30|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3625:5): [True: 14, False: 2.77k]
  ------------------
 3626|  2.77k|    case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2374|  2.77k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3626:5): [True: 2.74k, False: 40]
  ------------------
 3627|  2.78k|    case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2375|  2.78k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3627:5): [True: 10, False: 2.77k]
  ------------------
 3628|       |      /* it is handled later with the context options */
 3629|  2.78k|      *pmethod = TLS_client_method();
 3630|  2.78k|      break;
 3631|      0|    case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2370|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3631:5): [True: 0, False: 2.78k]
  ------------------
 3632|      0|      failf(data, "No SSLv2 support");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3633|      0|      return CURLE_NOT_BUILT_IN;
 3634|      0|    case CURL_SSLVERSION_SSLv3:
  ------------------
  |  | 2371|      0|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (3634:5): [True: 0, False: 2.78k]
  ------------------
 3635|      0|      failf(data, "No SSLv3 support");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3636|      0|      return CURLE_NOT_BUILT_IN;
 3637|      0|    default:
  ------------------
  |  Branch (3637:5): [True: 0, False: 2.78k]
  ------------------
 3638|      0|      failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3639|      0|      return CURLE_SSL_CONNECT_ERROR;
 3640|  2.78k|    }
 3641|  2.78k|    break;
 3642|  2.78k|  case TRNSPRT_QUIC:
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3642:3): [True: 0, False: 2.78k]
  ------------------
 3643|      0|    *pssl_version_min = CURL_SSLVERSION_TLSv1_3;
  ------------------
  |  | 2375|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
 3644|      0|    if(conn_config->version_max &&
  ------------------
  |  Branch (3644:8): [True: 0, False: 0]
  ------------------
 3645|      0|       (conn_config->version_max != CURL_SSLVERSION_MAX_DEFAULT) &&
  ------------------
  |  | 2380|      0|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2369|      0|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (3645:8): [True: 0, False: 0]
  ------------------
 3646|      0|       (conn_config->version_max != CURL_SSLVERSION_MAX_TLSv1_3)) {
  ------------------
  |  | 2384|      0|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2375|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (3646:8): [True: 0, False: 0]
  ------------------
 3647|      0|      failf(data, "QUIC needs at least TLS version 1.3");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3648|      0|      return CURLE_SSL_CONNECT_ERROR;
 3649|      0|    }
 3650|       |
 3651|      0|    *pmethod = TLS_method();
 3652|      0|    break;
 3653|      0|  default:
  ------------------
  |  Branch (3653:3): [True: 0, False: 2.78k]
  ------------------
 3654|      0|    failf(data, "unsupported transport %d in SSL init", peer->transport);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3655|      0|    return CURLE_SSL_CONNECT_ERROR;
 3656|  2.78k|  }
 3657|       |
 3658|  2.78k|  return *pmethod ? CURLE_OK : CURLE_SSL_CONNECT_ERROR;
  ------------------
  |  Branch (3658:10): [True: 2.78k, False: 0]
  ------------------
 3659|  2.78k|}
openssl.c:ossl_strerror:
  749|    650|{
  750|    650|  size_t len;
  751|    650|  DEBUGASSERT(size);
  ------------------
  |  | 1081|    650|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (751:3): [True: 0, False: 650]
  |  Branch (751:3): [True: 650, False: 0]
  ------------------
  752|    650|  *buf = '\0';
  753|       |
  754|    650|  len = Curl_ossl_version(buf, size);
  755|    650|  DEBUGASSERT(len < (size - 2));
  ------------------
  |  | 1081|    650|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (755:3): [True: 0, False: 650]
  |  Branch (755:3): [True: 650, False: 0]
  ------------------
  756|    650|  if(len < (size - 2)) {
  ------------------
  |  Branch (756:6): [True: 650, False: 0]
  ------------------
  757|    650|    buf += len;
  758|    650|    size -= (len + 2);
  759|    650|    *buf++ = ':';
  760|    650|    *buf++ = ' ';
  761|    650|    *buf = '\0';
  762|    650|  }
  763|       |
  764|       |#ifdef HAVE_BORINGSSL_LIKE
  765|       |  ERR_error_string_n((uint32_t)error, buf, size);
  766|       |#else
  767|    650|  ERR_error_string_n(error, buf, size);
  768|    650|#endif
  769|       |
  770|    650|  if(!*buf) {
  ------------------
  |  Branch (770:6): [True: 0, False: 650]
  ------------------
  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|    650|  return buf;
  776|    650|}
openssl.c:ossl_set_ssl_version_min_max:
 2567|  2.70k|{
 2568|  2.70k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 2569|       |  /* first, TLS min version... */
 2570|  2.70k|  long curl_ssl_version_min = (long)ssl_version_min;
 2571|  2.70k|  long curl_ssl_version_max;
 2572|       |
 2573|       |  /* convert curl min SSL version option to OpenSSL constant */
 2574|       |#if defined(HAVE_BORINGSSL_LIKE) || defined(LIBRESSL_VERSION_NUMBER)
 2575|       |  uint16_t ossl_ssl_version_min = 0;
 2576|       |  uint16_t ossl_ssl_version_max = 0;
 2577|       |#else
 2578|  2.70k|  long ossl_ssl_version_min = 0;
 2579|  2.70k|  long ossl_ssl_version_max = 0;
 2580|  2.70k|#endif
 2581|       |  /* it cannot be default here */
 2582|  2.70k|  DEBUGASSERT(curl_ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1081|  2.70k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2582:3): [True: 0, False: 2.70k]
  |  Branch (2582:3): [True: 2.70k, False: 0]
  ------------------
 2583|  2.70k|  switch(curl_ssl_version_min) {
  ------------------
  |  Branch (2583:10): [True: 2.70k, False: 0]
  ------------------
 2584|     14|  case CURL_SSLVERSION_TLSv1: /* TLS 1.x */
  ------------------
  |  | 2369|     14|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (2584:3): [True: 14, False: 2.69k]
  ------------------
 2585|     16|  case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2372|     16|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (2585:3): [True: 2, False: 2.70k]
  ------------------
 2586|     16|    ossl_ssl_version_min = TLS1_VERSION;
 2587|     16|    break;
 2588|     14|  case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2373|     14|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (2588:3): [True: 14, False: 2.69k]
  ------------------
 2589|     14|    ossl_ssl_version_min = TLS1_1_VERSION;
 2590|     14|    break;
 2591|  2.66k|  case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2374|  2.66k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (2591:3): [True: 2.66k, False: 40]
  ------------------
 2592|  2.66k|    ossl_ssl_version_min = TLS1_2_VERSION;
 2593|  2.66k|    break;
 2594|     10|  case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2375|     10|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (2594:3): [True: 10, False: 2.69k]
  ------------------
 2595|     10|    ossl_ssl_version_min = TLS1_3_VERSION;
 2596|     10|    break;
 2597|  2.70k|  }
 2598|       |
 2599|       |  /* ... then, TLS max version */
 2600|  2.70k|  curl_ssl_version_max = (long)conn_config->version_max;
 2601|       |
 2602|       |  /* convert curl max SSL version option to OpenSSL constant */
 2603|  2.70k|  switch(curl_ssl_version_max) {
 2604|      3|  case CURL_SSLVERSION_MAX_TLSv1_0:
  ------------------
  |  | 2381|      3|#define CURL_SSLVERSION_MAX_TLSv1_0 (CURL_SSLVERSION_TLSv1_0 << 16)
  |  |  ------------------
  |  |  |  | 2372|      3|#define CURL_SSLVERSION_TLSv1_0 4L
  |  |  ------------------
  ------------------
  |  Branch (2604:3): [True: 3, False: 2.70k]
  ------------------
 2605|      3|    ossl_ssl_version_max = TLS1_VERSION;
 2606|      3|    break;
 2607|      6|  case CURL_SSLVERSION_MAX_TLSv1_1:
  ------------------
  |  | 2382|      6|#define CURL_SSLVERSION_MAX_TLSv1_1 (CURL_SSLVERSION_TLSv1_1 << 16)
  |  |  ------------------
  |  |  |  | 2373|      6|#define CURL_SSLVERSION_TLSv1_1 5L
  |  |  ------------------
  ------------------
  |  Branch (2607:3): [True: 6, False: 2.69k]
  ------------------
 2608|      6|    ossl_ssl_version_max = TLS1_1_VERSION;
 2609|      6|    break;
 2610|     13|  case CURL_SSLVERSION_MAX_TLSv1_2:
  ------------------
  |  | 2383|     13|#define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
  |  |  ------------------
  |  |  |  | 2374|     13|#define CURL_SSLVERSION_TLSv1_2 6L
  |  |  ------------------
  ------------------
  |  Branch (2610:3): [True: 13, False: 2.69k]
  ------------------
 2611|     13|    ossl_ssl_version_max = TLS1_2_VERSION;
 2612|     13|    break;
 2613|      8|  case CURL_SSLVERSION_MAX_TLSv1_3:
  ------------------
  |  | 2384|      8|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2375|      8|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (2613:3): [True: 8, False: 2.69k]
  ------------------
 2614|      8|    ossl_ssl_version_max = TLS1_3_VERSION;
 2615|      8|    break;
 2616|  2.66k|  case CURL_SSLVERSION_MAX_NONE:  /* none selected */
  ------------------
  |  | 2379|  2.66k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (2616:3): [True: 2.66k, False: 39]
  ------------------
 2617|  2.67k|  case CURL_SSLVERSION_MAX_DEFAULT:  /* max selected */
  ------------------
  |  | 2380|  2.67k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2369|  2.67k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (2617:3): [True: 9, False: 2.69k]
  ------------------
 2618|  2.67k|  default:
  ------------------
  |  Branch (2618:3): [True: 0, False: 2.70k]
  ------------------
 2619|       |    /* SSL_CTX_set_max_proto_version states that: setting the maximum to 0
 2620|       |       enables protocol versions up to the highest version supported by
 2621|       |       the library */
 2622|  2.67k|    ossl_ssl_version_max = 0;
 2623|  2.67k|    break;
 2624|  2.70k|  }
 2625|       |
 2626|  2.70k|  if(!SSL_CTX_set_min_proto_version(ctx, ossl_ssl_version_min) ||
  ------------------
  |  Branch (2626:6): [True: 0, False: 2.70k]
  ------------------
 2627|  2.70k|     !SSL_CTX_set_max_proto_version(ctx, ossl_ssl_version_max))
  ------------------
  |  Branch (2627:6): [True: 0, False: 2.70k]
  ------------------
 2628|      0|    return CURLE_SSL_CONNECT_ERROR;
 2629|       |
 2630|  2.70k|  return CURLE_OK;
 2631|  2.70k|}
openssl.c:client_cert:
 1431|     19|{
 1432|     19|  char error_buffer[256];
 1433|     19|  bool check_privkey = TRUE;
  ------------------
  |  | 1055|     19|#define TRUE true
  ------------------
 1434|     19|  int file_type = ossl_do_file_type(cert_type);
 1435|       |
 1436|     19|  if(cert_file || cert_blob || (file_type == SSL_FILETYPE_ENGINE) ||
  ------------------
  |  |  817|     10|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1436:6): [True: 9, False: 10]
  |  Branch (1436:19): [True: 0, False: 10]
  |  Branch (1436:32): [True: 0, False: 10]
  ------------------
 1437|     10|     (file_type == SSL_FILETYPE_PROVIDER)) {
  ------------------
  |  |  823|     10|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  |  Branch (1437:6): [True: 0, False: 10]
  ------------------
 1438|      9|    SSL *ssl;
 1439|      9|    X509 *x509;
 1440|      9|    bool pcks12_done = FALSE;
  ------------------
  |  | 1058|      9|#define FALSE false
  ------------------
 1441|      9|    int cert_use_result;
 1442|       |
 1443|      9|    if(key_passwd) {
  ------------------
  |  Branch (1443:8): [True: 1, False: 8]
  ------------------
 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|      9|    switch(file_type) {
 1451|      8|    case SSL_FILETYPE_PEM:
  ------------------
  |  Branch (1451:5): [True: 8, False: 1]
  ------------------
 1452|       |      /* SSL_CTX_use_certificate_chain_file() only works on PEM files */
 1453|      8|      cert_use_result = cert_blob ?
  ------------------
  |  Branch (1453:25): [True: 0, False: 8]
  ------------------
 1454|      0|        use_certificate_chain_blob(ctx, cert_blob, key_passwd) :
 1455|      8|        SSL_CTX_use_certificate_chain_file(ctx, cert_file);
 1456|      8|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1456:10): [True: 8, False: 0]
  ------------------
 1457|      8|        failf(data,
  ------------------
  |  |   62|      8|#define failf Curl_failf
  ------------------
 1458|      8|              "could not load PEM client certificate from %s, " OSSL_PACKAGE
 1459|      8|              " error %s, "
 1460|      8|              "(no key found, wrong passphrase, or wrong file format?)",
 1461|      8|              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
  ------------------
  |  Branch (1461:16): [True: 0, False: 8]
  ------------------
 1462|      8|              ossl_strerror(ERR_get_error(), error_buffer,
 1463|      8|                            sizeof(error_buffer)));
 1464|      8|        return CURLE_SSL_CERTPROBLEM;
 1465|      8|      }
 1466|      0|      break;
 1467|       |
 1468|      0|    case SSL_FILETYPE_ASN1:
  ------------------
  |  Branch (1468:5): [True: 0, False: 9]
  ------------------
 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|      0|      cert_use_result = cert_blob ?
  ------------------
  |  Branch (1473:25): [True: 0, False: 0]
  ------------------
 1474|      0|        use_certificate_blob(ctx, cert_blob, file_type, key_passwd) :
 1475|      0|      SSL_CTX_use_certificate_file(ctx, cert_file, file_type);
 1476|      0|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1476:10): [True: 0, False: 0]
  ------------------
 1477|      0|        failf(data,
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1478|      0|              "could not load ASN1 client certificate from %s, " OSSL_PACKAGE
 1479|      0|              " error %s, "
 1480|      0|              "(no key found, wrong passphrase, or wrong file format?)",
 1481|      0|              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
  ------------------
  |  Branch (1481:16): [True: 0, False: 0]
  ------------------
 1482|      0|              ossl_strerror(ERR_get_error(), error_buffer,
 1483|      0|                            sizeof(error_buffer)));
 1484|      0|        return CURLE_SSL_CERTPROBLEM;
 1485|      0|      }
 1486|      0|      break;
 1487|       |
 1488|      0|    case SSL_FILETYPE_ENGINE:
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1488:5): [True: 0, False: 9]
  ------------------
 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: 9]
  ------------------
 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: 9]
  ------------------
 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;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1502|      0|      break;
 1503|       |
 1504|      1|    default:
  ------------------
  |  Branch (1504:5): [True: 1, False: 8]
  ------------------
 1505|      1|      failf(data, "not supported file type '%s' for certificate", cert_type);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1506|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1507|      9|    }
 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;
  ------------------
  |  | 1058|      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) {
  ------------------
  |  | 1055|      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|     10|  return CURLE_OK;
 1593|     19|}
openssl.c:ossl_do_file_type:
  826|     19|{
  827|     19|  if(!type || !type[0])
  ------------------
  |  Branch (827:6): [True: 8, False: 11]
  |  Branch (827:15): [True: 2, False: 9]
  ------------------
  828|     10|    return SSL_FILETYPE_PEM;
  829|      9|  if(curl_strequal(type, "PEM"))
  ------------------
  |  Branch (829:6): [True: 0, False: 9]
  ------------------
  830|      0|    return SSL_FILETYPE_PEM;
  831|      9|  if(curl_strequal(type, "DER"))
  ------------------
  |  Branch (831:6): [True: 0, False: 9]
  ------------------
  832|      0|    return SSL_FILETYPE_ASN1;
  833|      9|  if(curl_strequal(type, "PROV"))
  ------------------
  |  Branch (833:6): [True: 0, False: 9]
  ------------------
  834|      0|    return SSL_FILETYPE_PROVIDER;
  ------------------
  |  |  823|      0|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  835|      9|  if(curl_strequal(type, "ENG"))
  ------------------
  |  Branch (835:6): [True: 0, False: 9]
  ------------------
  836|      0|    return SSL_FILETYPE_ENGINE;
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  837|      9|  if(curl_strequal(type, "P12"))
  ------------------
  |  Branch (837:6): [True: 0, False: 9]
  ------------------
  838|      0|    return SSL_FILETYPE_PKCS12;
  ------------------
  |  |  820|      0|#define SSL_FILETYPE_PKCS12 43
  ------------------
  839|      9|  return -1;
  840|      9|}
openssl.c:ossl_set_provider:
 1768|    829|{
 1769|    829|  char name[MAX_PROVIDER_LEN + 1];
 1770|    829|  struct Curl_str prov;
 1771|    829|  const char *propq = NULL;
 1772|       |
 1773|    829|  if(!iname) {
  ------------------
  |  Branch (1773:6): [True: 0, False: 829]
  ------------------
 1774|       |    /* clear and cleanup provider use */
 1775|      0|    ossl_provider_cleanup(data);
 1776|      0|    return CURLE_OK;
 1777|      0|  }
 1778|    829|  if(curlx_str_until(&iname, &prov, MAX_PROVIDER_LEN, ':'))
  ------------------
  |  | 1757|    829|#define MAX_PROVIDER_LEN 128 /* reasonable */
  ------------------
  |  Branch (1778:6): [True: 45, False: 784]
  ------------------
 1779|     45|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1780|       |
 1781|    784|  if(!curlx_str_single(&iname, ':'))
  ------------------
  |  Branch (1781:6): [True: 636, False: 148]
  ------------------
 1782|       |    /* there was a colon, get the propq until the end of string */
 1783|    636|    propq = iname;
 1784|       |
 1785|       |  /* we need the name in a buffer, null-terminated */
 1786|    784|  memcpy(name, curlx_str(&prov), curlx_strlen(&prov));
  ------------------
  |  |   49|    784|#define curlx_str(x)    ((x)->str)
  ------------------
                memcpy(name, curlx_str(&prov), curlx_strlen(&prov));
  ------------------
  |  |   50|    784|#define curlx_strlen(x) ((x)->len)
  ------------------
 1787|    784|  name[curlx_strlen(&prov)] = 0;
  ------------------
  |  |   50|    784|#define curlx_strlen(x) ((x)->len)
  ------------------
 1788|       |
 1789|    784|  if(!data->state.libctx) {
  ------------------
  |  Branch (1789:6): [True: 784, False: 0]
  ------------------
 1790|    784|    OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new();
 1791|    784|    if(!libctx)
  ------------------
  |  Branch (1791:8): [True: 0, False: 784]
  ------------------
 1792|      0|      return CURLE_OUT_OF_MEMORY;
 1793|    784|    if(propq) {
  ------------------
  |  Branch (1793:8): [True: 636, False: 148]
  ------------------
 1794|    636|      data->state.propq = curlx_strdup(propq);
  ------------------
  |  | 1477|    636|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1795|    636|      if(!data->state.propq) {
  ------------------
  |  Branch (1795:10): [True: 0, False: 636]
  ------------------
 1796|      0|        OSSL_LIB_CTX_free(libctx);
 1797|      0|        return CURLE_OUT_OF_MEMORY;
 1798|      0|      }
 1799|    636|    }
 1800|    784|    data->state.libctx = libctx;
 1801|    784|  }
 1802|       |
 1803|    784|#ifndef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
 1804|       |  /* load the configuration file into the library context before checking the
 1805|       |   * provider availability */
 1806|    784|  if(!OSSL_LIB_CTX_load_config(data->state.libctx, NULL)) {
  ------------------
  |  Branch (1806:6): [True: 784, False: 0]
  ------------------
 1807|    784|    infof(data, "Failed to load default openssl config. Proceeding.");
  ------------------
  |  |  143|    784|  do {                               \
  |  |  144|    784|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    784|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 784, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 784]
  |  |  |  |  ------------------
  |  |  |  |  320|    784|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    784|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    784|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 784]
  |  |  ------------------
  ------------------
 1808|    784|  }
 1809|    784|#endif
 1810|       |
 1811|    784|  if(OSSL_PROVIDER_available(data->state.libctx, name)) {
  ------------------
  |  Branch (1811:6): [True: 9, False: 775]
  ------------------
 1812|       |    /* already loaded through the configuration - no action needed */
 1813|      9|    data->state.provider_loaded = TRUE;
  ------------------
  |  | 1055|      9|#define TRUE true
  ------------------
 1814|      9|    return CURLE_OK;
 1815|      9|  }
 1816|       |
 1817|    775|  data->state.provider = OSSL_PROVIDER_try_load(data->state.libctx, name, 1);
 1818|    775|  if(!data->state.provider) {
  ------------------
  |  Branch (1818:6): [True: 144, False: 631]
  ------------------
 1819|    144|    char error_buffer[256];
 1820|    144|    failf(data, "Failed to initialize provider: %s",
  ------------------
  |  |   62|    144|#define failf Curl_failf
  ------------------
 1821|    144|          ossl_strerror(ERR_get_error(), error_buffer, sizeof(error_buffer)));
 1822|    144|    ossl_provider_cleanup(data);
 1823|    144|    return CURLE_SSL_ENGINE_NOTFOUND;
 1824|    144|  }
 1825|       |
 1826|       |  /* load the base provider as well */
 1827|    631|  data->state.baseprov = OSSL_PROVIDER_try_load(data->state.libctx, "base", 1);
 1828|    631|  if(!data->state.baseprov) {
  ------------------
  |  Branch (1828:6): [True: 0, False: 631]
  ------------------
 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|    631|  else
 1834|    631|    data->state.provider_loaded = TRUE;
  ------------------
  |  | 1055|    631|#define TRUE true
  ------------------
 1835|    631|  return CURLE_OK;
 1836|    631|}
openssl.c:ossl_provider_cleanup:
 1742|  22.6k|{
 1743|  22.6k|  if(data->state.baseprov) {
  ------------------
  |  Branch (1743:6): [True: 631, False: 21.9k]
  ------------------
 1744|    631|    OSSL_PROVIDER_unload(data->state.baseprov);
 1745|    631|    data->state.baseprov = NULL;
 1746|    631|  }
 1747|  22.6k|  if(data->state.provider) {
  ------------------
  |  Branch (1747:6): [True: 631, False: 21.9k]
  ------------------
 1748|    631|    OSSL_PROVIDER_unload(data->state.provider);
 1749|    631|    data->state.provider = NULL;
 1750|    631|  }
 1751|  22.6k|  OSSL_LIB_CTX_free(data->state.libctx);
 1752|  22.6k|  data->state.libctx = NULL;
 1753|  22.6k|  curlx_safefree(data->state.propq);
  ------------------
  |  | 1327|  22.6k|  do {                      \
  |  | 1328|  22.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.6k|    (ptr) = NULL;           \
  |  | 1330|  22.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.6k]
  |  |  ------------------
  ------------------
 1754|       |  data->state.provider_loaded = FALSE;
  ------------------
  |  | 1058|  22.6k|#define FALSE false
  ------------------
 1755|  22.6k|}
openssl.c:ossl_init_ssl:
 3570|  1.95k|{
 3571|       |  /* Let's make an SSL structure */
 3572|  1.95k|  if(octx->ssl)
  ------------------
  |  Branch (3572:6): [True: 0, False: 1.95k]
  ------------------
 3573|      0|    SSL_free(octx->ssl);
 3574|  1.95k|  octx->ssl = SSL_new(octx->ssl_ctx);
 3575|  1.95k|  if(!octx->ssl) {
  ------------------
  |  Branch (3575:6): [True: 0, False: 1.95k]
  ------------------
 3576|      0|    failf(data, "SSL: could not create a context (handle)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3577|      0|    return CURLE_OUT_OF_MEMORY;
 3578|      0|  }
 3579|       |
 3580|  1.95k|  SSL_set_app_data(octx->ssl, ssl_user_data);
 3581|       |
 3582|  1.95k|#ifndef OPENSSL_NO_OCSP
 3583|  1.95k|  if(Curl_ssl_cf_get_primary_config(cf)->verifystatus)
  ------------------
  |  Branch (3583:6): [True: 1, False: 1.95k]
  ------------------
 3584|  1.95k|    SSL_set_tlsext_status_type(octx->ssl, TLSEXT_STATUSTYPE_ocsp);
 3585|  1.95k|#endif
 3586|       |
 3587|  1.95k|  SSL_set_connect_state(octx->ssl);
 3588|       |
 3589|  1.95k|  if(peer->sni) {
  ------------------
  |  Branch (3589:6): [True: 1.05k, False: 900]
  ------------------
 3590|  1.05k|    if(!SSL_set_tlsext_host_name(octx->ssl, peer->sni)) {
  ------------------
  |  Branch (3590:8): [True: 0, False: 1.05k]
  ------------------
 3591|      0|      failf(data, "Failed set SNI");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3592|      0|      return CURLE_SSL_CONNECT_ERROR;
 3593|      0|    }
 3594|  1.05k|  }
 3595|       |
 3596|       |#ifdef HAVE_SSL_SET1_ECH_CONFIG_LIST
 3597|       |  {
 3598|       |    CURLcode result = ossl_init_ech(octx, cf, data, peer);
 3599|       |    if(result)
 3600|       |      return result;
 3601|       |  }
 3602|       |#endif /* HAVE_SSL_SET1_ECH_CONFIG_LIST */
 3603|       |
 3604|  1.95k|  return ossl_init_session_and_alpns(octx, cf, data, peer,
 3605|  1.95k|                                     alpns_requested, sess_reuse_cb);
 3606|  1.95k|}
openssl.c:ossl_init_session_and_alpns:
 3334|  1.95k|{
 3335|  1.95k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3336|  1.95k|  struct ssl_primary_config *conn_cfg = Curl_ssl_cf_get_primary_config(cf);
 3337|  1.95k|  struct alpn_spec alpns;
 3338|  1.95k|  CURLcode result;
 3339|       |
 3340|  1.95k|  Curl_alpn_copy(&alpns, alpns_requested);
 3341|       |
 3342|  1.95k|  octx->reused_session = FALSE;
  ------------------
  |  | 1058|  1.95k|#define FALSE false
  ------------------
 3343|  1.95k|  if(Curl_ssl_scache_use(cf, data) && !conn_cfg->verifystatus) {
  ------------------
  |  Branch (3343:6): [True: 1.95k, False: 1]
  |  Branch (3343:39): [True: 1.95k, False: 1]
  ------------------
 3344|  1.95k|    struct Curl_ssl_session *scs = NULL;
 3345|       |
 3346|  1.95k|    result = Curl_ssl_scache_take(cf, data, peer->scache_key, &scs);
 3347|  1.95k|    if(!result && scs && scs->sdata && scs->sdata_len) {
  ------------------
  |  Branch (3347:8): [True: 1.95k, False: 0]
  |  Branch (3347:19): [True: 0, False: 1.95k]
  |  Branch (3347:26): [True: 0, False: 0]
  |  Branch (3347:40): [True: 0, False: 0]
  ------------------
 3348|      0|      const unsigned char *der_sessionid = scs->sdata;
 3349|      0|      size_t der_sessionid_size = scs->sdata_len;
 3350|      0|      SSL_SESSION *ssl_session = NULL;
 3351|       |
 3352|       |      /* If OpenSSL does not accept the session from the cache, this
 3353|       |       * is not an error. We continue without it. */
 3354|      0|      ssl_session = d2i_SSL_SESSION(NULL, &der_sessionid,
 3355|      0|                                    (long)der_sessionid_size);
 3356|      0|      if(ssl_session) {
  ------------------
  |  Branch (3356:10): [True: 0, False: 0]
  ------------------
 3357|      0|        if(!SSL_set_session(octx->ssl, ssl_session)) {
  ------------------
  |  Branch (3357:12): [True: 0, False: 0]
  ------------------
 3358|      0|          VERBOSE(char error_buffer[256]);
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
 3359|      0|          infof(data, "SSL: SSL_set_session not accepted, "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3360|      0|                "continuing without: %s",
 3361|      0|                ossl_strerror(ERR_get_error(), error_buffer,
 3362|      0|                              sizeof(error_buffer)));
 3363|      0|        }
 3364|      0|        else {
 3365|      0|          if(conn_cfg->verifypeer &&
  ------------------
  |  Branch (3365:14): [True: 0, False: 0]
  ------------------
 3366|      0|             (SSL_get_verify_result(octx->ssl) != X509_V_OK)) {
  ------------------
  |  Branch (3366:14): [True: 0, False: 0]
  ------------------
 3367|       |            /* Session was from unverified connection, cannot reuse here */
 3368|      0|            SSL_set_session(octx->ssl, NULL);
 3369|      0|            infof(data, "SSL session not peer verified, not reusing");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3370|      0|          }
 3371|      0|          else {
 3372|      0|            infof(data, "SSL reusing session with ALPN '%s'",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321: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]
  |  |  ------------------
  ------------------
 3373|      0|                  scs->alpn ? scs->alpn : "-");
 3374|      0|            octx->reused_session = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3375|      0|            infof(data, "SSL verify result: %lx",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3376|      0|                  SSL_get_verify_result(octx->ssl));
 3377|      0|#ifdef HAVE_OPENSSL_EARLYDATA
 3378|      0|            if(ssl_config->earlydata && scs->alpn &&
  ------------------
  |  Branch (3378:16): [True: 0, False: 0]
  |  Branch (3378:41): [True: 0, False: 0]
  ------------------
 3379|      0|               SSL_SESSION_get_max_early_data(ssl_session) &&
  ------------------
  |  Branch (3379:16): [True: 0, False: 0]
  ------------------
 3380|      0|               !cf->conn->bits.connect_only &&
  ------------------
  |  Branch (3380:16): [True: 0, False: 0]
  ------------------
 3381|      0|               (SSL_version(octx->ssl) == TLS1_3_VERSION)) {
  ------------------
  |  Branch (3381:16): [True: 0, False: 0]
  ------------------
 3382|      0|              bool do_early_data = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 3383|      0|              if(sess_reuse_cb) {
  ------------------
  |  Branch (3383:18): [True: 0, False: 0]
  ------------------
 3384|      0|                result = sess_reuse_cb(cf, data, &alpns, scs, &do_early_data);
 3385|      0|                if(result) {
  ------------------
  |  Branch (3385:20): [True: 0, False: 0]
  ------------------
 3386|      0|                  SSL_SESSION_free(ssl_session);
 3387|      0|                  return result;
 3388|      0|                }
 3389|      0|              }
 3390|      0|              if(do_early_data) {
  ------------------
  |  Branch (3390:18): [True: 0, False: 0]
  ------------------
 3391|       |                /* We only try the ALPN protocol the session used before,
 3392|       |                 * otherwise we might send early data for the wrong protocol */
 3393|      0|                Curl_alpn_restrict_to(&alpns, scs->alpn);
 3394|      0|              }
 3395|      0|            }
 3396|       |#else
 3397|       |            (void)ssl_config;
 3398|       |            (void)sess_reuse_cb;
 3399|       |#endif
 3400|      0|          }
 3401|      0|        }
 3402|      0|        SSL_SESSION_free(ssl_session);
 3403|      0|      }
 3404|      0|      else {
 3405|      0|        infof(data, "SSL session not accepted by OpenSSL, continuing without");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3406|      0|      }
 3407|      0|    }
 3408|  1.95k|    Curl_ssl_scache_return(cf, data, peer->scache_key, scs);
 3409|  1.95k|  }
 3410|       |
 3411|  1.95k|  if(alpns.count) {
  ------------------
  |  Branch (3411:6): [True: 294, False: 1.66k]
  ------------------
 3412|    294|    struct alpn_proto_buf proto;
 3413|    294|    memset(&proto, 0, sizeof(proto));
 3414|    294|    result = Curl_alpn_to_proto_buf(&proto, &alpns);
 3415|    294|    if(result) {
  ------------------
  |  Branch (3415:8): [True: 0, False: 294]
  ------------------
 3416|      0|      failf(data, "Error determining ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3417|      0|      return CURLE_SSL_CONNECT_ERROR;
 3418|      0|    }
 3419|    294|    if(SSL_set_alpn_protos(octx->ssl, proto.data, proto.len)) {
  ------------------
  |  Branch (3419:8): [True: 0, False: 294]
  ------------------
 3420|      0|      failf(data, "Error setting ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3421|      0|      return CURLE_SSL_CONNECT_ERROR;
 3422|      0|    }
 3423|    294|  }
 3424|       |
 3425|  1.95k|  return CURLE_OK;
 3426|  1.95k|}
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:
 5442|  3.26k|{
 5443|  3.26k|  int rc;
 5444|  3.26k|  if(data) {
  ------------------
  |  Branch (5444:6): [True: 3.26k, False: 0]
  ------------------
 5445|  3.26k|    if(ossl_seed(data)) /* Initiate the seed if not already done */
  ------------------
  |  Branch (5445:8): [True: 0, False: 3.26k]
  ------------------
 5446|      0|      return CURLE_FAILED_INIT; /* could not seed for some reason */
 5447|  3.26k|  }
 5448|      0|  else {
 5449|      0|    if(!rand_enough())
  ------------------
  |  Branch (5449:8): [True: 0, False: 0]
  ------------------
 5450|      0|      return CURLE_FAILED_INIT;
 5451|      0|  }
 5452|       |  /* RAND_bytes() returns 1 on success, 0 otherwise. */
 5453|  3.26k|  rc = RAND_bytes(entropy, (ossl_valsize_t)curlx_uztosi(length));
 5454|  3.26k|  return rc == 1 ? CURLE_OK : CURLE_FAILED_INIT;
  ------------------
  |  Branch (5454:10): [True: 3.26k, False: 0]
  ------------------
 5455|  3.26k|}
openssl.c:ossl_cert_status_request:
 5482|    721|{
 5483|    721|#ifndef OPENSSL_NO_OCSP
 5484|    721|  return TRUE;
  ------------------
  |  | 1055|    721|#define TRUE true
  ------------------
 5485|       |#else
 5486|       |  return FALSE;
 5487|       |#endif
 5488|    721|}
openssl.c:ossl_connect:
 4964|  3.08k|{
 4965|  3.08k|  CURLcode result = CURLE_OK;
 4966|  3.08k|  struct ssl_connect_data *connssl = cf->ctx;
 4967|       |
 4968|       |  /* check if the connection has already been established */
 4969|  3.08k|  if(ssl_connection_complete == connssl->state) {
  ------------------
  |  Branch (4969:6): [True: 0, False: 3.08k]
  ------------------
 4970|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 4971|      0|    return CURLE_OK;
 4972|      0|  }
 4973|       |
 4974|  3.08k|  *done = FALSE;
  ------------------
  |  | 1058|  3.08k|#define FALSE false
  ------------------
 4975|  3.08k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  3.08k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4976|       |
 4977|  3.08k|  if(ssl_connect_1 == connssl->connecting_state) {
  ------------------
  |  Branch (4977:6): [True: 2.78k, False: 298]
  ------------------
 4978|  2.78k|    if(Curl_ossl_need_httpsrr(data) &&
  ------------------
  |  Branch (4978:8): [True: 0, False: 2.78k]
  ------------------
 4979|      0|       !Curl_conn_dns_resolved_https(data, cf->sockindex)) {
  ------------------
  |  |   66|      0|#define Curl_conn_dns_resolved_https(a, b)   TRUE
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (4979:8): [Folded, False: 0]
  ------------------
 4980|      0|      CURL_TRC_CF(data, cf, "need HTTPS-RR, delaying connect");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 4981|      0|      return CURLE_OK;
 4982|      0|    }
 4983|  2.78k|    CURL_TRC_CF(data, cf, "ossl_connect, step1");
  ------------------
  |  |  153|  2.78k|  do {                                          \
  |  |  154|  2.78k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.78k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.56k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.78k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.56k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.78k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.78k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.78k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.78k]
  |  |  ------------------
  ------------------
 4984|  2.78k|    result = ossl_connect_step1(cf, data);
 4985|  2.78k|    if(result)
  ------------------
  |  Branch (4985:8): [True: 828, False: 1.95k]
  ------------------
 4986|    828|      goto out;
 4987|  2.78k|  }
 4988|       |
 4989|  2.25k|  if(ssl_connect_2 == connssl->connecting_state) {
  ------------------
  |  Branch (4989:6): [True: 2.25k, False: 0]
  ------------------
 4990|  2.25k|    CURL_TRC_CF(data, cf, "ossl_connect, step2");
  ------------------
  |  |  153|  2.25k|  do {                                          \
  |  |  154|  2.25k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.25k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.50k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.25k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.50k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.25k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.25k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
 4991|  2.25k|#ifdef HAVE_OPENSSL_EARLYDATA
 4992|  2.25k|    if(connssl->earlydata_state == ssl_earlydata_await) {
  ------------------
  |  Branch (4992:8): [True: 0, False: 2.25k]
  ------------------
 4993|      0|      goto out;
 4994|      0|    }
 4995|  2.25k|    else if(connssl->earlydata_state == ssl_earlydata_sending) {
  ------------------
  |  Branch (4995:13): [True: 0, False: 2.25k]
  ------------------
 4996|      0|      result = ossl_send_earlydata(cf, data);
 4997|      0|      if(result)
  ------------------
  |  Branch (4997:10): [True: 0, False: 0]
  ------------------
 4998|      0|        goto out;
 4999|      0|      connssl->earlydata_state = ssl_earlydata_sent;
 5000|      0|    }
 5001|  2.25k|#endif
 5002|  2.25k|    DEBUGASSERT((connssl->earlydata_state == ssl_earlydata_none) ||
  ------------------
  |  | 1081|  2.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5002:5): [True: 2.25k, False: 0]
  |  Branch (5002:5): [True: 0, False: 0]
  |  Branch (5002:5): [True: 2.25k, False: 0]
  |  Branch (5002:5): [True: 0, False: 0]
  ------------------
 5003|  2.25k|                (connssl->earlydata_state == ssl_earlydata_sent));
 5004|       |
 5005|  2.25k|    result = ossl_connect_step2(cf, data);
 5006|  2.25k|    if(result)
  ------------------
  |  Branch (5006:8): [True: 2.25k, False: 0]
  ------------------
 5007|  2.25k|      goto out;
 5008|  2.25k|  }
 5009|       |
 5010|      0|  if(ssl_connect_3 == connssl->connecting_state) {
  ------------------
  |  Branch (5010:6): [True: 0, False: 0]
  ------------------
 5011|      0|    CURL_TRC_CF(data, cf, "ossl_connect, step3");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 5012|      0|    result = ossl_connect_step3(cf, data);
 5013|      0|    if(result)
  ------------------
  |  Branch (5013:8): [True: 0, False: 0]
  ------------------
 5014|      0|      goto out;
 5015|      0|    connssl->connecting_state = ssl_connect_done;
 5016|      0|#ifdef HAVE_OPENSSL_EARLYDATA
 5017|      0|    if(connssl->earlydata_state > ssl_earlydata_none) {
  ------------------
  |  Branch (5017:8): [True: 0, False: 0]
  ------------------
 5018|      0|      struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 5019|       |      /* We should be in this state by now */
 5020|      0|      DEBUGASSERT(connssl->earlydata_state == ssl_earlydata_sent);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5020:7): [True: 0, False: 0]
  |  Branch (5020:7): [True: 0, False: 0]
  ------------------
 5021|      0|      connssl->earlydata_state =
 5022|      0|        (SSL_get_early_data_status(octx->ssl) == SSL_EARLY_DATA_ACCEPTED) ?
  ------------------
  |  Branch (5022:9): [True: 0, False: 0]
  ------------------
 5023|      0|        ssl_earlydata_accepted : ssl_earlydata_rejected;
 5024|      0|    }
 5025|      0|#endif
 5026|      0|  }
 5027|       |
 5028|      0|  if(ssl_connect_done == connssl->connecting_state) {
  ------------------
  |  Branch (5028:6): [True: 0, False: 0]
  ------------------
 5029|      0|    CURL_TRC_CF(data, cf, "ossl_connect, done");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 5030|      0|    connssl->state = ssl_connection_complete;
 5031|      0|  }
 5032|       |
 5033|  3.08k|out:
 5034|  3.08k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (5034:6): [True: 306, False: 2.77k]
  ------------------
 5035|    306|    *done = FALSE;
  ------------------
  |  | 1058|    306|#define FALSE false
  ------------------
 5036|    306|    return CURLE_OK;
 5037|    306|  }
 5038|  2.77k|  *done = ((connssl->state == ssl_connection_complete) ||
  ------------------
  |  Branch (5038:12): [True: 0, False: 2.77k]
  ------------------
 5039|  2.77k|           (connssl->state == ssl_connection_deferred));
  ------------------
  |  Branch (5039:12): [True: 0, False: 2.77k]
  ------------------
 5040|  2.77k|  return result;
 5041|  3.08k|}
openssl.c:ossl_connect_step1:
 4010|  2.78k|{
 4011|  2.78k|  struct ssl_connect_data *connssl = cf->ctx;
 4012|  2.78k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4013|  2.78k|  char tls_id[80];
 4014|  2.78k|  BIO *bio;
 4015|  2.78k|  CURLcode result;
 4016|       |
 4017|  2.78k|  DEBUGASSERT(ssl_connect_1 == connssl->connecting_state);
  ------------------
  |  | 1081|  2.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4017:3): [True: 0, False: 2.78k]
  |  Branch (4017:3): [True: 2.78k, False: 0]
  ------------------
 4018|  2.78k|  DEBUGASSERT(octx);
  ------------------
  |  | 1081|  2.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4018:3): [True: 0, False: 2.78k]
  |  Branch (4018:3): [True: 2.78k, False: 0]
  ------------------
 4019|       |
 4020|  2.78k|  if(!connssl->peer.dest) {
  ------------------
  |  Branch (4020:6): [True: 0, False: 2.78k]
  ------------------
 4021|      0|    Curl_ossl_version(tls_id, sizeof(tls_id));
 4022|      0|    result = Curl_ssl_peer_init(&connssl->peer, cf, tls_id, TRNSPRT_TCP);
  ------------------
  |  |  307|      0|#define TRNSPRT_TCP  3
  ------------------
 4023|      0|    if(result)
  ------------------
  |  Branch (4023:8): [True: 0, False: 0]
  ------------------
 4024|      0|      return result;
 4025|      0|  }
 4026|       |
 4027|  2.78k|  result = Curl_ossl_ctx_init(octx, cf, data, &connssl->peer,
 4028|  2.78k|                              connssl->alpn, NULL, NULL,
 4029|  2.78k|                              ossl_new_session_cb, cf,
 4030|  2.78k|                              ossl_on_session_reuse);
 4031|  2.78k|  if(result)
  ------------------
  |  Branch (4031:6): [True: 828, False: 1.95k]
  ------------------
 4032|    828|    return result;
 4033|       |
 4034|  1.95k|  octx->bio_method = ossl_bio_cf_method_create();
 4035|  1.95k|  if(!octx->bio_method)
  ------------------
  |  Branch (4035:6): [True: 0, False: 1.95k]
  ------------------
 4036|      0|    return CURLE_OUT_OF_MEMORY;
 4037|  1.95k|  bio = BIO_new(octx->bio_method);
 4038|  1.95k|  if(!bio)
  ------------------
  |  Branch (4038:6): [True: 0, False: 1.95k]
  ------------------
 4039|      0|    return CURLE_OUT_OF_MEMORY;
 4040|       |
 4041|  1.95k|  BIO_set_data(bio, cf);
 4042|  1.95k|#ifdef HAVE_SSL_SET0_WBIO
 4043|       |  /* with OpenSSL v1.1.1 we get an alternative to SSL_set_bio() that works
 4044|       |   * without backward compat quirks. Every call takes one reference, so we
 4045|       |   * up it and pass. SSL* then owns and frees it.
 4046|       |   * We check on the function in configure, since LibreSSL and friends
 4047|       |   * each have their own versions to add support for this. */
 4048|  1.95k|  BIO_up_ref(bio);
 4049|  1.95k|  SSL_set0_rbio(octx->ssl, bio);
 4050|  1.95k|  SSL_set0_wbio(octx->ssl, bio);
 4051|       |#else
 4052|       |  SSL_set_bio(octx->ssl, bio, bio);
 4053|       |#endif
 4054|       |
 4055|  1.95k|  if(connssl->alpn && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (4055:6): [True: 294, False: 1.66k]
  |  Branch (4055:23): [True: 294, False: 0]
  ------------------
 4056|    294|    struct alpn_proto_buf proto;
 4057|    294|    memset(&proto, 0, sizeof(proto));
 4058|    294|    Curl_alpn_to_proto_str(&proto, connssl->alpn);
 4059|    294|    infof(data, VTLS_INFOF_ALPN_OFFER_1STR, proto.data);
  ------------------
  |  |  143|    294|  do {                               \
  |  |  144|    294|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    294|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 294, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 294]
  |  |  |  |  ------------------
  |  |  |  |  320|    294|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    294|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    294|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 294]
  |  |  ------------------
  ------------------
 4060|    294|  }
 4061|       |
 4062|  1.95k|  connssl->connecting_state = ssl_connect_2;
 4063|  1.95k|  return CURLE_OK;
 4064|  1.95k|}
openssl.c:ossl_bio_cf_method_create:
  642|  1.95k|{
  643|  1.95k|  BIO_METHOD *m = BIO_meth_new(BIO_TYPE_MEM, "OpenSSL CF BIO");
  644|  1.95k|  if(m) {
  ------------------
  |  Branch (644:6): [True: 1.95k, False: 0]
  ------------------
  645|  1.95k|    BIO_meth_set_write(m, &ossl_bio_cf_out_write);
  646|  1.95k|    BIO_meth_set_read(m, &ossl_bio_cf_in_read);
  647|  1.95k|    BIO_meth_set_ctrl(m, &ossl_bio_cf_ctrl);
  648|  1.95k|    BIO_meth_set_create(m, &ossl_bio_cf_create);
  649|  1.95k|    BIO_meth_set_destroy(m, &ossl_bio_cf_destroy);
  650|  1.95k|  }
  651|  1.95k|  return m;
  652|  1.95k|}
openssl.c:ossl_bio_cf_out_write:
  568|  3.63k|{
  569|  3.63k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  570|  3.63k|  struct ssl_connect_data *connssl = cf->ctx;
  571|  3.63k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  572|  3.63k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  699|  3.63k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  213|  3.63k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (699:30): [True: 3.63k, False: 0]
  |  |  ------------------
  ------------------
  573|  3.63k|  size_t nwritten;
  574|  3.63k|  CURLcode result;
  575|       |
  576|  3.63k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  3.63k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:3): [True: 0, False: 3.63k]
  |  Branch (576:3): [True: 3.63k, False: 0]
  ------------------
  577|  3.63k|  if(blen < 0)
  ------------------
  |  Branch (577:6): [True: 0, False: 3.63k]
  ------------------
  578|      0|    return 0;
  579|       |
  580|  3.63k|  result = Curl_conn_cf_send(cf->next, data,
  581|  3.63k|                             (const uint8_t *)buf, (size_t)blen, FALSE,
  ------------------
  |  | 1058|  3.63k|#define FALSE false
  ------------------
  582|  3.63k|                             &nwritten);
  583|  3.63k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_out_write(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  3.63k|  do {                                          \
  |  |  154|  3.63k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.63k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  7.27k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.63k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  7.27k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.63k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.63k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.63k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.63k]
  |  |  ------------------
  ------------------
  584|  3.63k|              blen, result, nwritten);
  585|  3.63k|  BIO_clear_retry_flags(bio);
  586|  3.63k|  octx->io_result = result;
  587|  3.63k|  if(result) {
  ------------------
  |  Branch (587:6): [True: 0, False: 3.63k]
  ------------------
  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|  3.63k|  return (int)nwritten;
  593|  3.63k|}
openssl.c:ossl_bio_cf_in_read:
  596|  2.55k|{
  597|  2.55k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  598|  2.55k|  struct ssl_connect_data *connssl = cf->ctx;
  599|  2.55k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  600|  2.55k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  699|  2.55k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  213|  2.55k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (699:30): [True: 2.55k, False: 0]
  |  |  ------------------
  ------------------
  601|  2.55k|  size_t nread;
  602|  2.55k|  CURLcode result, r2;
  603|       |
  604|  2.55k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  2.55k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (604:3): [True: 0, False: 2.55k]
  |  Branch (604:3): [True: 2.55k, False: 0]
  ------------------
  605|       |  /* OpenSSL catches this case, so should we. */
  606|  2.55k|  if(!buf)
  ------------------
  |  Branch (606:6): [True: 0, False: 2.55k]
  ------------------
  607|      0|    return 0;
  608|  2.55k|  if(blen < 0)
  ------------------
  |  Branch (608:6): [True: 0, False: 2.55k]
  ------------------
  609|      0|    return 0;
  610|       |
  611|  2.55k|  result = Curl_conn_cf_recv(cf->next, data, buf, (size_t)blen, &nread);
  612|  2.55k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_in_read(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  2.55k|  do {                                          \
  |  |  154|  2.55k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.55k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.11k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.55k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.11k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.55k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.55k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.55k]
  |  |  ------------------
  ------------------
  613|  2.55k|              blen, result, nread);
  614|  2.55k|  BIO_clear_retry_flags(bio);
  615|  2.55k|  octx->io_result = result;
  616|  2.55k|  if(result) {
  ------------------
  |  Branch (616:6): [True: 317, False: 2.24k]
  ------------------
  617|    317|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (617:8): [True: 317, False: 0]
  ------------------
  618|    317|      BIO_set_retry_read(bio);
  619|    317|  }
  620|  2.24k|  else {
  621|       |    /* feeding data to OpenSSL means SSL_read() might succeed */
  622|  2.24k|    connssl->input_pending = TRUE;
  ------------------
  |  | 1055|  2.24k|#define TRUE true
  ------------------
  623|  2.24k|    if(nread == 0)
  ------------------
  |  Branch (623:8): [True: 1.45k, False: 784]
  ------------------
  624|  1.45k|      connssl->peer_closed = TRUE;
  ------------------
  |  | 1055|  1.45k|#define TRUE true
  ------------------
  625|  2.24k|  }
  626|       |
  627|       |  /* Before returning server replies to the SSL instance, we need
  628|       |   * to have setup the x509 store or verification fails. */
  629|  2.55k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (629:6): [True: 1.83k, False: 725]
  ------------------
  630|  1.83k|    r2 = Curl_ssl_setup_x509_store(cf, data, octx);
  631|  1.83k|    if(r2) {
  ------------------
  |  Branch (631:8): [True: 1.41k, False: 420]
  ------------------
  632|  1.41k|      BIO_clear_retry_flags(bio);
  633|  1.41k|      octx->io_result = r2;
  634|  1.41k|      return -1;
  635|  1.41k|    }
  636|    420|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1055|    420|#define TRUE true
  ------------------
  637|    420|  }
  638|  1.14k|  return result ? -1 : (int)nread;
  ------------------
  |  Branch (638:10): [True: 306, False: 839]
  ------------------
  639|  2.55k|}
openssl.c:ossl_bio_cf_ctrl:
  534|  9.01k|{
  535|  9.01k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  536|  9.01k|  long ret = 1;
  537|       |
  538|  9.01k|  (void)cf;
  539|  9.01k|  (void)ptr;
  540|  9.01k|  switch(cmd) {
  541|      0|  case BIO_CTRL_GET_CLOSE:
  ------------------
  |  Branch (541:3): [True: 0, False: 9.01k]
  ------------------
  542|      0|    ret = (long)BIO_get_shutdown(bio);
  543|      0|    break;
  544|      0|  case BIO_CTRL_SET_CLOSE:
  ------------------
  |  Branch (544:3): [True: 0, False: 9.01k]
  ------------------
  545|      0|    BIO_set_shutdown(bio, (int)num);
  546|      0|    break;
  547|  3.63k|  case BIO_CTRL_FLUSH:
  ------------------
  |  Branch (547:3): [True: 3.63k, False: 5.38k]
  ------------------
  548|       |    /* we do no delayed writes, but if we ever would, this
  549|       |     * needs to trigger it. */
  550|  3.63k|    ret = 1;
  551|  3.63k|    break;
  552|      0|  case BIO_CTRL_DUP:
  ------------------
  |  Branch (552:3): [True: 0, False: 9.01k]
  ------------------
  553|      0|    ret = 1;
  554|      0|    break;
  555|  1.47k|  case BIO_CTRL_EOF: {
  ------------------
  |  Branch (555:3): [True: 1.47k, False: 7.54k]
  ------------------
  556|       |    /* EOF has been reached on input? */
  557|  1.47k|    struct ssl_connect_data *connssl = cf->ctx;
  558|  1.47k|    return connssl->peer_closed;
  559|      0|  }
  560|  3.91k|  default:
  ------------------
  |  Branch (560:3): [True: 3.91k, False: 5.10k]
  ------------------
  561|  3.91k|    ret = 0;
  562|  3.91k|    break;
  563|  9.01k|  }
  564|  7.54k|  return ret;
  565|  9.01k|}
openssl.c:ossl_bio_cf_create:
  519|  1.95k|{
  520|  1.95k|  BIO_set_shutdown(bio, 1);
  521|  1.95k|  BIO_set_init(bio, 1);
  522|       |  BIO_set_data(bio, NULL);
  523|  1.95k|  return 1;
  524|  1.95k|}
openssl.c:ossl_bio_cf_destroy:
  527|  1.95k|{
  528|  1.95k|  if(!bio)
  ------------------
  |  Branch (528:6): [True: 0, False: 1.95k]
  ------------------
  529|      0|    return 0;
  530|  1.95k|  return 1;
  531|  1.95k|}
openssl.c:ossl_connect_step2:
 4133|  2.25k|{
 4134|  2.25k|  int err;
 4135|  2.25k|  struct ssl_connect_data *connssl = cf->ctx;
 4136|  2.25k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4137|  2.25k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 4138|  2.25k|  DEBUGASSERT(ssl_connect_2 == connssl->connecting_state);
  ------------------
  |  | 1081|  2.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4138:3): [True: 0, False: 2.25k]
  |  Branch (4138:3): [True: 2.25k, False: 0]
  ------------------
 4139|  2.25k|  DEBUGASSERT(octx);
  ------------------
  |  | 1081|  2.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4139:3): [True: 0, False: 2.25k]
  |  Branch (4139:3): [True: 2.25k, False: 0]
  ------------------
 4140|       |
 4141|  2.25k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  2.25k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4142|  2.25k|  ERR_clear_error();
 4143|       |
 4144|  2.25k|  err = SSL_connect(octx->ssl);
 4145|       |
 4146|  2.25k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (4146:6): [True: 1.53k, False: 718]
  ------------------
 4147|       |    /* After having send off the ClientHello, we prepare the x509
 4148|       |     * store to verify the coming certificate from the server */
 4149|  1.53k|    CURLcode result = Curl_ssl_setup_x509_store(cf, data, octx);
 4150|  1.53k|    if(result)
  ------------------
  |  Branch (4150:8): [True: 1.53k, False: 3]
  ------------------
 4151|  1.53k|      return result;
 4152|      3|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1055|      3|#define TRUE true
  ------------------
 4153|      3|  }
 4154|       |
 4155|       |#if !defined(HAVE_KEYLOG_UPSTREAM) && !defined(HAVE_KEYLOG_CALLBACK)
 4156|       |  /* If key logging is enabled, wait for the handshake to complete and then
 4157|       |   * proceed with logging secrets (for TLS 1.2 or older).
 4158|       |   */
 4159|       |  if(Curl_tls_keylog_enabled() && !octx->keylog_done)
 4160|       |    ossl_log_tls12_secret(octx->ssl, &octx->keylog_done);
 4161|       |#endif
 4162|       |
 4163|       |  /* 1  is fine
 4164|       |     0  is "not successful but was shut down controlled"
 4165|       |     <0 is "handshake was not successful, because a fatal error occurred" */
 4166|    721|  if(err != 1) {
  ------------------
  |  Branch (4166:6): [True: 721, False: 0]
  ------------------
 4167|    721|    int detail = SSL_get_error(octx->ssl, err);
 4168|    721|    CURL_TRC_CF(data, cf, "SSL_connect() -> err=%d, detail=%d", err, detail);
  ------------------
  |  |  153|    721|  do {                                          \
  |  |  154|    721|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    721|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.44k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 721, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 721]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.44k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    721|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    721|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    721|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 721]
  |  |  ------------------
  ------------------
 4169|       |
 4170|    721|    if(SSL_ERROR_WANT_READ == detail) {
  ------------------
  |  Branch (4170:8): [True: 306, False: 415]
  ------------------
 4171|    306|      CURL_TRC_CF(data, cf, "SSL_connect() -> want recv");
  ------------------
  |  |  153|    306|  do {                                          \
  |  |  154|    306|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    306|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    612|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 306, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 306]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    612|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    306|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    306|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    306|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 306]
  |  |  ------------------
  ------------------
 4172|    306|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|    306|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 4173|    306|      return CURLE_AGAIN;
 4174|    306|    }
 4175|    415|    if(SSL_ERROR_WANT_WRITE == detail) {
  ------------------
  |  Branch (4175:8): [True: 0, False: 415]
  ------------------
 4176|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want send");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 4177|      0|      connssl->io_need = CURL_SSL_IO_NEED_SEND;
  ------------------
  |  |  107|      0|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
 4178|      0|      return CURLE_AGAIN;
 4179|      0|    }
 4180|    415|#ifdef SSL_ERROR_WANT_ASYNC
 4181|    415|    if(SSL_ERROR_WANT_ASYNC == detail) {
  ------------------
  |  Branch (4181:8): [True: 0, False: 415]
  ------------------
 4182|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want async");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 4183|      0|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|      0|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 4184|      0|      return CURLE_AGAIN;
 4185|      0|    }
 4186|    415|#endif
 4187|    415|#ifdef SSL_ERROR_WANT_RETRY_VERIFY
 4188|    415|    if(SSL_ERROR_WANT_RETRY_VERIFY == detail) {
  ------------------
  |  Branch (4188:8): [True: 0, False: 415]
  ------------------
 4189|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want retry_verify");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 4190|      0|      Curl_xfer_pause_recv(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 4191|      0|      return CURLE_AGAIN;
 4192|      0|    }
 4193|    415|#endif
 4194|    415|    else {
 4195|       |      /* untreated error */
 4196|    415|      sslerr_t errdetail;
 4197|    415|      char error_buffer[256] = "";
 4198|    415|      CURLcode result;
 4199|    415|      long lerr;
 4200|    415|      int lib;
 4201|    415|      int reason;
 4202|       |
 4203|       |      /* the connection failed, we are not waiting for anything else. */
 4204|    415|      connssl->connecting_state = ssl_connect_2;
 4205|       |
 4206|       |      /* Get the earliest error code from the thread's error queue and remove
 4207|       |         the entry. */
 4208|    415|      errdetail = ERR_get_error();
 4209|       |
 4210|       |      /* Extract which lib and reason */
 4211|    415|      lib = ERR_GET_LIB(errdetail);
 4212|    415|      reason = ERR_GET_REASON(errdetail);
 4213|       |
 4214|    415|      if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4214:10): [True: 414, False: 1]
  ------------------
 4215|    414|         ((reason == SSL_R_CERTIFICATE_VERIFY_FAILED)
  ------------------
  |  Branch (4215:11): [True: 0, False: 414]
  ------------------
 4216|       |/* Missing from OpenSSL 4+ OPENSSL_NO_DEPRECATED_3_0 builds */
 4217|    414|#ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
 4218|    414|          || (reason == SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED)
  ------------------
  |  Branch (4218:14): [True: 0, False: 414]
  ------------------
 4219|    414|#endif
 4220|    414|         )) {
 4221|      0|        result = CURLE_PEER_FAILED_VERIFICATION;
 4222|       |
 4223|      0|        lerr = SSL_get_verify_result(octx->ssl);
 4224|      0|        if(lerr != X509_V_OK) {
  ------------------
  |  Branch (4224:12): [True: 0, False: 0]
  ------------------
 4225|      0|          ssl_config->certverifyresult = lerr;
 4226|      0|          failf(data, "SSL certificate problem: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4227|      0|                X509_verify_cert_error_string(lerr));
 4228|      0|        }
 4229|      0|        else
 4230|      0|          failf(data, "%s", "SSL certificate verification failed");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4231|      0|      }
 4232|    415|#ifdef SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED
 4233|       |      /* SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED is only available on
 4234|       |         OpenSSL version above v1.1.1, not AWS-LC, BoringSSL, or LibreSSL */
 4235|    415|      else if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4235:15): [True: 414, False: 1]
  ------------------
 4236|    414|              (reason == SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED)) {
  ------------------
  |  Branch (4236:15): [True: 0, False: 414]
  ------------------
 4237|       |        /* If client certificate is required, communicate the
 4238|       |           error to client */
 4239|      0|        result = CURLE_SSL_CLIENTCERT;
 4240|      0|        failf(data, "TLS cert problem: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4241|      0|              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4242|      0|      }
 4243|    415|#endif
 4244|       |#ifdef HAVE_SSL_SET1_ECH_CONFIG_LIST
 4245|       |      else if((lib == ERR_LIB_SSL) &&
 4246|       |#ifndef HAVE_BORINGSSL_LIKE
 4247|       |              (reason == SSL_R_ECH_REQUIRED)) {
 4248|       |#else
 4249|       |              (reason == SSL_R_ECH_REJECTED)) {
 4250|       |#endif /* HAVE_BORINGSSL_LIKE */
 4251|       |
 4252|       |        /* trace retry_configs if we got some */
 4253|       |        ossl_trace_ech_retry_configs(data, octx->ssl, reason);
 4254|       |
 4255|       |        result = CURLE_ECH_REQUIRED;
 4256|       |        failf(data, "ECH required: %s",
 4257|       |              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4258|       |      }
 4259|       |#endif
 4260|    415|      else {
 4261|    415|        result = CURLE_SSL_CONNECT_ERROR;
 4262|    415|        failf(data, "TLS connect error: %s",
  ------------------
  |  |   62|    415|#define failf Curl_failf
  ------------------
 4263|    415|              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4264|    415|      }
 4265|       |
 4266|       |      /* detail is already set to the SSL error above */
 4267|       |
 4268|       |      /* If we e.g. use SSLv2 request-method and the server does not like us
 4269|       |       * (RST connection, etc.), OpenSSL gives no explanation whatsoever and
 4270|       |       * the SO_ERROR is also lost.
 4271|       |       */
 4272|    415|      if(result == CURLE_SSL_CONNECT_ERROR && errdetail == 0) {
  ------------------
  |  Branch (4272:10): [True: 415, False: 0]
  |  Branch (4272:47): [True: 1, False: 414]
  ------------------
 4273|      1|        char extramsg[80] = "";
 4274|      1|        int sockerr = SOCKERRNO;
  ------------------
  |  | 1095|      1|#define SOCKERRNO         errno
  ------------------
 4275|       |
 4276|      1|        if(sockerr && detail == SSL_ERROR_SYSCALL)
  ------------------
  |  Branch (4276:12): [True: 0, False: 1]
  |  Branch (4276:23): [True: 0, False: 0]
  ------------------
 4277|      0|          curlx_strerror(sockerr, extramsg, sizeof(extramsg));
 4278|      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"
  ------------------
 4279|      1|              extramsg[0] ? extramsg : SSL_ERROR_to_str(detail),
  ------------------
  |  Branch (4279:15): [True: 0, False: 1]
  ------------------
 4280|      1|              connssl->peer.dest->hostname, connssl->peer.dest->port);
 4281|      1|      }
 4282|       |
 4283|    415|      return result;
 4284|    415|    }
 4285|    415|  }
 4286|      0|  else {
 4287|       |    /* we connected fine, we are not waiting for anything else. */
 4288|      0|    connssl->connecting_state = ssl_connect_3;
 4289|      0|    Curl_ossl_report_handshake(data, octx);
 4290|       |
 4291|       |#if defined(HAVE_SSL_SET1_ECH_CONFIG_LIST) && !defined(HAVE_BORINGSSL_LIKE)
 4292|       |    if(CURLECH_ENABLED(data)) {
 4293|       |      char *inner = NULL, *outer = NULL;
 4294|       |      int rv;
 4295|       |      VERBOSE(const char *status);
 4296|       |
 4297|       |      rv = SSL_ech_get1_status(octx->ssl, &inner, &outer);
 4298|       |      switch(rv) {
 4299|       |      case SSL_ECH_STATUS_SUCCESS:
 4300|       |        VERBOSE(status = "succeeded");
 4301|       |        break;
 4302|       |      case SSL_ECH_STATUS_GREASE_ECH:
 4303|       |        VERBOSE(status = "sent GREASE, got retry-configs");
 4304|       |        break;
 4305|       |      case SSL_ECH_STATUS_GREASE:
 4306|       |        VERBOSE(status = "sent GREASE");
 4307|       |        break;
 4308|       |      case SSL_ECH_STATUS_NOT_TRIED:
 4309|       |        VERBOSE(status = "not attempted");
 4310|       |        break;
 4311|       |      case SSL_ECH_STATUS_NOT_CONFIGURED:
 4312|       |        VERBOSE(status = "not configured");
 4313|       |        break;
 4314|       |      case SSL_ECH_STATUS_BACKEND:
 4315|       |        VERBOSE(status = "backend (unexpected)");
 4316|       |        break;
 4317|       |      case SSL_ECH_STATUS_FAILED:
 4318|       |        VERBOSE(status = "failed");
 4319|       |        break;
 4320|       |      case SSL_ECH_STATUS_BAD_CALL:
 4321|       |        VERBOSE(status = "bad call (unexpected)");
 4322|       |        break;
 4323|       |      case SSL_ECH_STATUS_BAD_NAME: {
 4324|       |        struct ssl_primary_config *conn_config =
 4325|       |          Curl_ssl_cf_get_primary_config(cf);
 4326|       |        if(!conn_config->verifypeer && !conn_config->verifyhost &&
 4327|       |           inner && !strcmp(inner, connssl->peer.dest->hostname)) {
 4328|       |          VERBOSE(status = "bad name (tolerated without peer verification)");
 4329|       |          rv = SSL_ECH_STATUS_SUCCESS;
 4330|       |        }
 4331|       |        else {
 4332|       |          VERBOSE(status = "bad name (unexpected)");
 4333|       |        }
 4334|       |        break;
 4335|       |      }
 4336|       |      default:
 4337|       |        VERBOSE(status = "unexpected status");
 4338|       |        infof(data, "ECH: unexpected status %d", rv);
 4339|       |      }
 4340|       |      infof(data, "ECH: result: status is %s, inner is %s, outer is %s",
 4341|       |            (status ? status : "NULL"),
 4342|       |            (inner ? inner : "NULL"),
 4343|       |            (outer ? outer : "NULL"));
 4344|       |      OPENSSL_free(inner);
 4345|       |      OPENSSL_free(outer);
 4346|       |      if(rv == SSL_ECH_STATUS_GREASE_ECH) {
 4347|       |        /* trace retry_configs if we got some */
 4348|       |        ossl_trace_ech_retry_configs(data, octx->ssl, 0);
 4349|       |      }
 4350|       |      if(rv != SSL_ECH_STATUS_SUCCESS && (data->set.tls_ech == CURLECH_HARD)) {
 4351|       |        infof(data, "ECH: ech-hard failed");
 4352|       |        return CURLE_SSL_CONNECT_ERROR;
 4353|       |      }
 4354|       |    }
 4355|       |    else {
 4356|       |      infof(data, "ECH: result: status is not attempted");
 4357|       |    }
 4358|       |#endif /* HAVE_SSL_SET1_ECH_CONFIG_LIST && !HAVE_BORINGSSL_LIKE */
 4359|       |
 4360|       |    /* Sets data and len to negotiated protocol, len is 0 if no protocol was
 4361|       |     * negotiated
 4362|       |     */
 4363|      0|    if(connssl->alpn) {
  ------------------
  |  Branch (4363:8): [True: 0, False: 0]
  ------------------
 4364|      0|      const unsigned char *neg_protocol;
 4365|      0|      unsigned int len;
 4366|      0|      SSL_get0_alpn_selected(octx->ssl, &neg_protocol, &len);
 4367|       |
 4368|      0|      return Curl_alpn_set_negotiated(cf, data, connssl, neg_protocol, len);
 4369|      0|    }
 4370|       |
 4371|      0|    return CURLE_OK;
 4372|      0|  }
 4373|    721|}
openssl.c:ossl_close:
 1961|  5.59k|{
 1962|  5.59k|  struct ssl_connect_data *connssl = cf->ctx;
 1963|  5.59k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 1964|       |
 1965|  5.59k|  (void)data;
 1966|  5.59k|  DEBUGASSERT(octx);
  ------------------
  |  | 1081|  5.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1966:3): [True: 0, False: 5.59k]
  |  Branch (1966:3): [True: 5.59k, False: 0]
  ------------------
 1967|       |
 1968|  5.59k|  connssl->input_pending = FALSE;
  ------------------
  |  | 1058|  5.59k|#define FALSE false
  ------------------
 1969|  5.59k|  if(octx->ssl) {
  ------------------
  |  Branch (1969:6): [True: 1.95k, False: 3.63k]
  ------------------
 1970|  1.95k|    SSL_free(octx->ssl);
 1971|  1.95k|    octx->ssl = NULL;
 1972|  1.95k|  }
 1973|  5.59k|  if(octx->ssl_ctx) {
  ------------------
  |  Branch (1973:6): [True: 2.70k, False: 2.88k]
  ------------------
 1974|  2.70k|    SSL_CTX_free(octx->ssl_ctx);
 1975|  2.70k|    octx->ssl_ctx = NULL;
 1976|  2.70k|    octx->x509_store_setup = FALSE;
  ------------------
  |  | 1058|  2.70k|#define FALSE false
  ------------------
 1977|  2.70k|  }
 1978|  5.59k|  if(octx->bio_method) {
  ------------------
  |  Branch (1978:6): [True: 1.95k, False: 3.63k]
  ------------------
 1979|  1.95k|    ossl_bio_cf_method_free(octx->bio_method);
 1980|       |    octx->bio_method = NULL;
 1981|  1.95k|  }
 1982|  5.59k|}
openssl.c:ossl_bio_cf_method_free:
  655|  1.95k|{
  656|  1.95k|  if(m)
  ------------------
  |  Branch (656:6): [True: 1.95k, False: 0]
  ------------------
  657|  1.95k|    BIO_meth_free(m);
  658|  1.95k|}
openssl.c:ossl_close_all:
 1989|  22.4k|{
 1990|  22.4k|#ifdef USE_OPENSSL_ENGINE
 1991|  22.4k|  if(data->state.engine) {
  ------------------
  |  Branch (1991:6): [True: 3, False: 22.4k]
  ------------------
 1992|      3|    ENGINE_finish(data->state.engine);
 1993|      3|    ENGINE_free(data->state.engine);
 1994|      3|    data->state.engine = NULL;
 1995|      3|  }
 1996|       |#else
 1997|       |  (void)data;
 1998|       |#endif
 1999|  22.4k|#ifdef OPENSSL_HAS_PROVIDERS
 2000|  22.4k|  ossl_provider_cleanup(data);
 2001|  22.4k|#endif
 2002|  22.4k|}
openssl.c:ossl_set_engine:
 1658|    836|{
 1659|    836|#ifdef USE_OPENSSL_ENGINE
 1660|    836|  CURLcode result = CURLE_SSL_ENGINE_NOTFOUND;
 1661|    836|  ENGINE *e = ENGINE_by_id(name);
 1662|       |
 1663|    836|  if(e) {
  ------------------
  |  Branch (1663:6): [True: 7, False: 829]
  ------------------
 1664|       |
 1665|      7|    if(data->state.engine) {
  ------------------
  |  Branch (1665:8): [True: 0, False: 7]
  ------------------
 1666|      0|      ENGINE_finish(data->state.engine);
 1667|      0|      ENGINE_free(data->state.engine);
 1668|      0|      data->state.engine = NULL;
 1669|      0|    }
 1670|      7|    if(!ENGINE_init(e)) {
  ------------------
  |  Branch (1670:8): [True: 4, False: 3]
  ------------------
 1671|      4|      char buf[256];
 1672|       |
 1673|      4|      ENGINE_free(e);
 1674|      4|      failf(data, "Failed to initialize SSL Engine '%s': %s",
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
 1675|      4|            name, ossl_strerror(ERR_get_error(), buf, sizeof(buf)));
 1676|      4|      result = CURLE_SSL_ENGINE_INITFAILED;
 1677|      4|      e = NULL;
 1678|      4|    }
 1679|      3|    else {
 1680|      3|      result = CURLE_OK;
 1681|      3|    }
 1682|      7|    data->state.engine = e;
 1683|      7|    return result;
 1684|      7|  }
 1685|    829|#endif
 1686|    829|#ifdef OPENSSL_HAS_PROVIDERS
 1687|    829|  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|    836|}
openssl.c:ossl_set_engine_default:
 1698|      4|{
 1699|      4|#ifdef USE_OPENSSL_ENGINE
 1700|      4|  if(data->state.engine) {
  ------------------
  |  Branch (1700:6): [True: 2, False: 2]
  ------------------
 1701|      2|    if(ENGINE_set_default(data->state.engine, ENGINE_METHOD_ALL) > 0) {
  ------------------
  |  Branch (1701:8): [True: 2, False: 0]
  ------------------
 1702|      2|      infof(data, "set default crypto engine '%s'",
  ------------------
  |  |  143|      2|  do {                               \
  |  |  144|      2|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      2|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1703|      2|            ENGINE_get_id(data->state.engine));
 1704|      2|    }
 1705|      0|    else {
 1706|      0|      failf(data, "set default crypto engine '%s' failed",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1707|      0|            ENGINE_get_id(data->state.engine));
 1708|      0|      return CURLE_SSL_ENGINE_SETFAILED;
 1709|      0|    }
 1710|      2|  }
 1711|       |#else
 1712|       |  (void)data;
 1713|       |#endif
 1714|      4|  return CURLE_OK;
 1715|      4|}

Curl_ssl_easy_config_init:
  181|  22.4k|{
  182|       |  /*
  183|       |   * libcurl 7.10 introduced SSL verification *by default*! This needs to be
  184|       |   * switched off unless wanted.
  185|       |   */
  186|  22.4k|  data->set.ssl.primary.verifypeer = TRUE;
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  187|  22.4k|  data->set.ssl.primary.verifyhost = TRUE;
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  188|       |  data->set.ssl.primary.cache_session = TRUE; /* caching by default */
  ------------------
  |  | 1055|  22.4k|#define TRUE true
  ------------------
  189|  22.4k|#ifndef CURL_DISABLE_PROXY
  190|  22.4k|  data->set.proxy_ssl = data->set.ssl;
  191|  22.4k|#endif
  192|  22.4k|}
Curl_ssl_easy_config_complete:
  311|  6.26k|{
  312|  6.26k|  struct ssl_config_data *sslc = &data->set.ssl;
  313|  6.26k|#if defined(CURL_CA_PATH) || defined(CURL_CA_BUNDLE)
  314|  6.26k|  struct UserDefined *set = &data->set;
  315|  6.26k|  CURLcode result;
  316|  6.26k|#endif
  317|       |
  318|  6.26k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (318:6): [True: 6.26k, False: 0]
  ------------------
  319|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  320|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  321|       |      sslc->native_ca_store = TRUE;
  322|       |#endif
  323|  6.26k|#ifdef CURL_CA_PATH
  324|  6.26k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (324:8): [True: 5.55k, False: 713]
  |  Branch (324:32): [True: 5.55k, False: 0]
  ------------------
  325|  5.55k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH], CURL_CA_PATH);
  ------------------
  |  |   32|  5.55k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  326|  5.55k|      if(result)
  ------------------
  |  Branch (326:10): [True: 0, False: 5.55k]
  ------------------
  327|      0|        return result;
  328|  5.55k|    }
  329|  6.26k|#endif
  330|  6.26k|#ifdef CURL_CA_BUNDLE
  331|  6.26k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (331:8): [True: 5.57k, False: 692]
  |  Branch (331:32): [True: 5.57k, False: 0]
  ------------------
  332|  5.57k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE], CURL_CA_BUNDLE);
  ------------------
  |  |   26|  5.57k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  333|  5.57k|      if(result)
  ------------------
  |  Branch (333:10): [True: 0, False: 5.57k]
  ------------------
  334|      0|        return result;
  335|  5.57k|    }
  336|  6.26k|#endif
  337|  6.26k|  }
  338|  6.26k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE];
  339|  6.26k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE];
  340|  6.26k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH];
  341|  6.26k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT];
  342|  6.26k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT];
  343|  6.26k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST];
  344|  6.26k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST];
  345|  6.26k|  sslc->primary.signature_algorithms =
  346|  6.26k|    data->set.str[STRING_SSL_SIGNATURE_ALGORITHMS];
  347|  6.26k|  sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY];
  348|  6.26k|  sslc->primary.cert_blob = data->set.blobs[BLOB_CERT];
  349|  6.26k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO];
  350|  6.26k|  sslc->primary.curves = data->set.str[STRING_SSL_EC_CURVES];
  351|  6.26k|#ifdef USE_TLS_SRP
  352|  6.26k|  sslc->primary.username = data->set.str[STRING_TLSAUTH_USERNAME];
  353|  6.26k|  sslc->primary.password = data->set.str[STRING_TLSAUTH_PASSWORD];
  354|  6.26k|#endif
  355|  6.26k|  sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE];
  356|  6.26k|  sslc->primary.key = data->set.str[STRING_KEY];
  357|  6.26k|  sslc->primary.key_type = data->set.str[STRING_KEY_TYPE];
  358|  6.26k|  sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD];
  359|  6.26k|  sslc->primary.clientcert = data->set.str[STRING_CERT];
  360|  6.26k|  sslc->primary.key_blob = data->set.blobs[BLOB_KEY];
  361|       |
  362|  6.26k|#ifndef CURL_DISABLE_PROXY
  363|  6.26k|  sslc = &data->set.proxy_ssl;
  364|  6.26k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (364:6): [True: 6.26k, False: 0]
  ------------------
  365|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  366|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  367|       |      sslc->native_ca_store = TRUE;
  368|       |#endif
  369|  6.26k|#ifdef CURL_CA_PATH
  370|  6.26k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH_PROXY]) {
  ------------------
  |  Branch (370:8): [True: 6.26k, False: 5]
  |  Branch (370:32): [True: 6.16k, False: 95]
  ------------------
  371|  6.16k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY],
  372|  6.16k|                              CURL_CA_PATH);
  ------------------
  |  |   32|  6.16k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  373|  6.16k|      if(result)
  ------------------
  |  Branch (373:10): [True: 0, False: 6.16k]
  ------------------
  374|      0|        return result;
  375|  6.16k|    }
  376|  6.26k|#endif
  377|  6.26k|#ifdef CURL_CA_BUNDLE
  378|  6.26k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE_PROXY]) {
  ------------------
  |  Branch (378:8): [True: 6.26k, False: 3]
  |  Branch (378:32): [True: 6.17k, False: 95]
  ------------------
  379|  6.17k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY],
  380|  6.17k|                              CURL_CA_BUNDLE);
  ------------------
  |  |   26|  6.17k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  381|  6.17k|      if(result)
  ------------------
  |  Branch (381:10): [True: 0, False: 6.17k]
  ------------------
  382|      0|        return result;
  383|  6.17k|    }
  384|  6.26k|#endif
  385|  6.26k|  }
  386|  6.26k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE_PROXY];
  387|  6.26k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH_PROXY];
  388|  6.26k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST_PROXY];
  389|  6.26k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST_PROXY];
  390|  6.26k|  sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY];
  391|  6.26k|  sslc->primary.cert_blob = data->set.blobs[BLOB_CERT_PROXY];
  392|  6.26k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO_PROXY];
  393|  6.26k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT_PROXY];
  394|  6.26k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT_PROXY];
  395|  6.26k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY];
  396|  6.26k|  sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE_PROXY];
  397|  6.26k|  sslc->primary.key = data->set.str[STRING_KEY_PROXY];
  398|  6.26k|  sslc->primary.key_type = data->set.str[STRING_KEY_TYPE_PROXY];
  399|  6.26k|  sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD_PROXY];
  400|  6.26k|  sslc->primary.clientcert = data->set.str[STRING_CERT_PROXY];
  401|  6.26k|  sslc->primary.key_blob = data->set.blobs[BLOB_KEY_PROXY];
  402|  6.26k|#ifdef USE_TLS_SRP
  403|  6.26k|  sslc->primary.username = data->set.str[STRING_TLSAUTH_USERNAME_PROXY];
  404|  6.26k|  sslc->primary.password = data->set.str[STRING_TLSAUTH_PASSWORD_PROXY];
  405|  6.26k|#endif
  406|  6.26k|#endif /* CURL_DISABLE_PROXY */
  407|       |
  408|  6.26k|  return CURLE_OK;
  409|  6.26k|}
Curl_ssl_conn_config_init:
  413|  6.06k|{
  414|       |  /* Clone "primary" SSL configurations from the easy handle to
  415|       |   * the connection. They are used for connection cache matching and
  416|       |   * probably outlive the easy handle */
  417|  6.06k|  if(!clone_ssl_primary_config(&data->set.ssl.primary, &conn->ssl_config))
  ------------------
  |  Branch (417:6): [True: 0, False: 6.06k]
  ------------------
  418|      0|    return CURLE_OUT_OF_MEMORY;
  419|  6.06k|#ifndef CURL_DISABLE_PROXY
  420|  6.06k|  if(!clone_ssl_primary_config(&data->set.proxy_ssl.primary,
  ------------------
  |  Branch (420:6): [True: 0, False: 6.06k]
  ------------------
  421|  6.06k|                               &conn->proxy_ssl_config))
  422|      0|    return CURLE_OUT_OF_MEMORY;
  423|  6.06k|#endif
  424|  6.06k|  return CURLE_OK;
  425|  6.06k|}
Curl_ssl_conn_config_cleanup:
  428|  7.59k|{
  429|  7.59k|  free_primary_ssl_config(&conn->ssl_config);
  430|  7.59k|#ifndef CURL_DISABLE_PROXY
  431|  7.59k|  free_primary_ssl_config(&conn->proxy_ssl_config);
  432|  7.59k|#endif
  433|  7.59k|}
Curl_ssl_conn_config_update:
  436|  2.30k|{
  437|       |  /* May be called on an easy that has no connection yet */
  438|  2.30k|  if(data->conn) {
  ------------------
  |  Branch (438:6): [True: 0, False: 2.30k]
  ------------------
  439|      0|    struct ssl_primary_config *src, *dest;
  440|      0|#ifndef CURL_DISABLE_PROXY
  441|      0|    src = for_proxy ? &data->set.proxy_ssl.primary : &data->set.ssl.primary;
  ------------------
  |  Branch (441:11): [True: 0, False: 0]
  ------------------
  442|      0|    dest = for_proxy ? &data->conn->proxy_ssl_config : &data->conn->ssl_config;
  ------------------
  |  Branch (442:12): [True: 0, False: 0]
  ------------------
  443|       |#else
  444|       |    (void)for_proxy;
  445|       |    src = &data->set.ssl.primary;
  446|       |    dest = &data->conn->ssl_config;
  447|       |#endif
  448|      0|    dest->verifyhost = src->verifyhost;
  449|      0|    dest->verifypeer = src->verifypeer;
  450|      0|    dest->verifystatus = src->verifystatus;
  451|      0|  }
  452|  2.30k|}
Curl_ssl_backend:
  459|  12.5k|{
  460|  12.5k|#ifdef USE_SSL
  461|  12.5k|  multissl_setup(NULL);
  462|  12.5k|  return Curl_ssl->info.id;
  463|       |#else
  464|       |  return CURLSSLBACKEND_NONE;
  465|       |#endif
  466|  12.5k|}
Curl_ssl_init:
  480|      1|{
  481|       |  /* make sure this is only done once */
  482|      1|  if(init_ssl)
  ------------------
  |  Branch (482:6): [True: 0, False: 1]
  ------------------
  483|      0|    return 1;
  484|      1|  init_ssl = TRUE; /* never again */
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  485|       |
  486|      1|  if(Curl_ssl->init)
  ------------------
  |  Branch (486:6): [True: 1, False: 0]
  ------------------
  487|      1|    return Curl_ssl->init();
  488|      0|  return 1;
  489|      1|}
Curl_ssl_close_all:
  555|  22.4k|{
  556|  22.4k|  if(Curl_ssl->close_all)
  ------------------
  |  Branch (556:6): [True: 22.4k, False: 0]
  ------------------
  557|  22.4k|    Curl_ssl->close_all(data);
  558|  22.4k|}
Curl_ssl_adjust_pollset:
  563|    306|{
  564|    306|  struct ssl_connect_data *connssl = cf->ctx;
  565|       |
  566|    306|  if(connssl->io_need) {
  ------------------
  |  Branch (566:6): [True: 306, False: 0]
  ------------------
  567|    306|    curl_socket_t sock = Curl_conn_cf_get_socket(cf->next, data);
  568|    306|    CURLcode result = CURLE_OK;
  569|    306|    if(sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    306|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (569:8): [True: 306, False: 0]
  ------------------
  570|    306|      if(connssl->io_need & CURL_SSL_IO_NEED_SEND) {
  ------------------
  |  |  107|    306|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
  |  Branch (570:10): [True: 0, False: 306]
  ------------------
  571|      0|        result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  174|      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
  |  |  ------------------
  ------------------
  572|      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))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  573|      0|                    sock);
  574|      0|      }
  575|    306|      else {
  576|    306|        result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  172|    306|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|    306|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|    306|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
  577|    306|        CURL_TRC_CF(data, cf, "adjust_pollset, POLLIN fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|    306|  do {                                          \
  |  |  154|    306|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    306|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    612|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 306, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 306]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    612|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    306|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    306|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    306|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 306]
  |  |  ------------------
  ------------------
  578|    306|                    sock);
  579|    306|      }
  580|    306|    }
  581|    306|    return result;
  582|    306|  }
  583|      0|  return CURLE_OK;
  584|    306|}
Curl_ssl_set_engine:
  589|    836|{
  590|    836|  if(Curl_ssl->set_engine)
  ------------------
  |  Branch (590:6): [True: 836, False: 0]
  ------------------
  591|    836|    return Curl_ssl->set_engine(data, engine);
  592|      0|  return CURLE_NOT_BUILT_IN;
  593|    836|}
Curl_ssl_set_engine_default:
  598|      4|{
  599|      4|  if(Curl_ssl->set_engine_default)
  ------------------
  |  Branch (599:6): [True: 4, False: 0]
  ------------------
  600|      4|    return Curl_ssl->set_engine_default(data);
  601|      0|  return CURLE_NOT_BUILT_IN;
  602|      4|}
Curl_ssl_free_certinfo:
  624|  52.4k|{
  625|  52.4k|  struct curl_certinfo *ci = &data->info.certs;
  626|       |
  627|  52.4k|  if(ci->num_of_certs) {
  ------------------
  |  Branch (627:6): [True: 0, False: 52.4k]
  ------------------
  628|       |    /* free all individual lists used */
  629|      0|    int i;
  630|      0|    for(i = 0; i < ci->num_of_certs; i++) {
  ------------------
  |  Branch (630:16): [True: 0, False: 0]
  ------------------
  631|      0|      curl_slist_free_all(ci->certinfo[i]);
  632|      0|      ci->certinfo[i] = NULL;
  633|      0|    }
  634|       |
  635|       |    curlx_safefree(ci->certinfo); /* free the actual array too */
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  636|      0|    ci->num_of_certs = 0;
  637|      0|  }
  638|  52.4k|}
Curl_ssl_random:
  696|  3.26k|{
  697|  3.26k|  DEBUGASSERT(length == sizeof(int));
  ------------------
  |  | 1081|  3.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (697:3): [True: 0, False: 3.26k]
  |  Branch (697:3): [True: 3.26k, False: 0]
  ------------------
  698|  3.26k|  if(Curl_ssl->random)
  ------------------
  |  Branch (698:6): [True: 3.26k, False: 0]
  ------------------
  699|  3.26k|    return Curl_ssl->random(data, buffer, length);
  700|      0|  else
  701|      0|    return CURLE_NOT_BUILT_IN;
  702|  3.26k|}
Curl_ssl_cert_status_request:
  914|    721|{
  915|    721|  if(Curl_ssl->cert_status_request)
  ------------------
  |  Branch (915:6): [True: 721, False: 0]
  ------------------
  916|    721|    return Curl_ssl->cert_status_request();
  917|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  918|    721|}
Curl_ssl_peer_cleanup:
 1196|  5.60k|{
 1197|  5.60k|  Curl_peer_unlink(&peer->dest);
 1198|  5.60k|  curlx_safefree(peer->sni);
  ------------------
  |  | 1327|  5.60k|  do {                      \
  |  | 1328|  5.60k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  5.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  5.60k|    (ptr) = NULL;           \
  |  | 1330|  5.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 5.60k]
  |  |  ------------------
  ------------------
 1199|  5.60k|  curlx_safefree(peer->scache_key);
  ------------------
  |  | 1327|  5.60k|  do {                      \
  |  | 1328|  5.60k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  5.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  5.60k|    (ptr) = NULL;           \
  |  | 1330|  5.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 5.60k]
  |  |  ------------------
  ------------------
 1200|  5.60k|  peer->transport = TRNSPRT_NONE;
  ------------------
  |  |  306|  5.60k|#define TRNSPRT_NONE 0
  ------------------
 1201|  5.60k|  peer->type = CURL_SSL_PEER_DNS;
 1202|  5.60k|}
Curl_ssl_peer_init:
 1240|  2.79k|{
 1241|  2.79k|  struct Curl_peer *dest = NULL;
 1242|  2.79k|  CURLcode result = CURLE_OUT_OF_MEMORY;
 1243|       |
 1244|       |  /* We expect a clean struct, e.g. called only ONCE */
 1245|  2.79k|  DEBUGASSERT(peer);
  ------------------
  |  | 1081|  2.79k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1245:3): [True: 0, False: 2.79k]
  |  Branch (1245:3): [True: 2.79k, False: 0]
  ------------------
 1246|  2.79k|  DEBUGASSERT(!peer->dest);
  ------------------
  |  | 1081|  2.79k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1246:3): [True: 0, False: 2.79k]
  |  Branch (1246:3): [True: 2.79k, False: 0]
  ------------------
 1247|  2.79k|  DEBUGASSERT(!peer->sni);
  ------------------
  |  | 1081|  2.79k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1247:3): [True: 0, False: 2.79k]
  |  Branch (1247:3): [True: 2.79k, False: 0]
  ------------------
 1248|       |  /* We need the hostname for SNI negotiation. Once handshaked, this remains
 1249|       |   * the SNI hostname for the TLS connection. When the connection is reused,
 1250|       |   * the settings in cf->conn might change. We keep a copy of the hostname we
 1251|       |   * use for SNI.
 1252|       |   */
 1253|  2.79k|  peer->transport = transport;
 1254|  2.79k|#ifndef CURL_DISABLE_PROXY
 1255|  2.79k|  if(Curl_ssl_cf_is_proxy(cf)) {
  ------------------
  |  Branch (1255:6): [True: 298, False: 2.49k]
  ------------------
 1256|    298|    dest = cf->conn->http_proxy.peer;
 1257|    298|  }
 1258|  2.49k|  else
 1259|  2.49k|#endif
 1260|  2.49k|  {
 1261|  2.49k|    dest = cf->conn->origin;
 1262|  2.49k|  }
 1263|       |
 1264|       |  /* hostname MUST exist and not be empty */
 1265|  2.79k|  if(!dest) {
  ------------------
  |  Branch (1265:6): [True: 0, False: 2.79k]
  ------------------
 1266|      0|    result = CURLE_FAILED_INIT;
 1267|      0|    goto out;
 1268|      0|  }
 1269|       |
 1270|  2.79k|  Curl_peer_link(&peer->dest, dest);
 1271|  2.79k|  peer->type = get_peer_type(dest->hostname);
 1272|  2.79k|  if(peer->type == CURL_SSL_PEER_DNS) {
  ------------------
  |  Branch (1272:6): [True: 1.45k, False: 1.34k]
  ------------------
 1273|       |    /* not an IP address, normalize according to RCC 6066 ch. 3,
 1274|       |     * max len of SNI is 2^16-1, no trailing dot */
 1275|  1.45k|    size_t len = strlen(dest->hostname);
 1276|  1.45k|    if(len && (dest->hostname[len - 1] == '.'))
  ------------------
  |  Branch (1276:8): [True: 1.45k, False: 0]
  |  Branch (1276:15): [True: 2, False: 1.45k]
  ------------------
 1277|      2|      len--;
 1278|  1.45k|    if(len < USHRT_MAX) {
  ------------------
  |  Branch (1278:8): [True: 1.45k, False: 0]
  ------------------
 1279|  1.45k|      peer->sni = curlx_calloc(1, len + 1);
  ------------------
  |  | 1480|  1.45k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1280|  1.45k|      if(!peer->sni)
  ------------------
  |  Branch (1280:10): [True: 0, False: 1.45k]
  ------------------
 1281|      0|        goto out;
 1282|  1.45k|      Curl_strntolower(peer->sni, dest->hostname, len);
 1283|  1.45k|      peer->sni[len] = 0;
 1284|  1.45k|    }
 1285|  1.45k|  }
 1286|       |
 1287|  2.79k|  result = Curl_ssl_peer_key_make(cf, peer, tls_id, &peer->scache_key);
 1288|       |
 1289|  2.79k|out:
 1290|  2.79k|  if(result)
  ------------------
  |  Branch (1290:6): [True: 11, False: 2.78k]
  ------------------
 1291|     11|    Curl_ssl_peer_cleanup(peer);
 1292|  2.79k|  return result;
 1293|  2.79k|}
Curl_cf_ssl_insert_after:
 1763|  2.49k|{
 1764|  2.49k|  struct Curl_cfilter *cf;
 1765|  2.49k|  CURLcode result;
 1766|       |
 1767|  2.49k|  result = cf_ssl_create(&cf, data, cf_at->conn);
 1768|  2.49k|  if(!result)
  ------------------
  |  Branch (1768:6): [True: 2.49k, False: 0]
  ------------------
 1769|  2.49k|    Curl_conn_cf_insert_after(cf_at, cf);
 1770|  2.49k|  return result;
 1771|  2.49k|}
Curl_cf_ssl_proxy_insert_after:
 1810|    298|{
 1811|    298|  struct Curl_cfilter *cf;
 1812|    298|  CURLcode result;
 1813|       |
 1814|    298|  result = cf_ssl_proxy_create(&cf, data, cf_at->conn);
 1815|    298|  if(!result)
  ------------------
  |  Branch (1815:6): [True: 298, False: 0]
  ------------------
 1816|    298|    Curl_conn_cf_insert_after(cf_at, cf);
 1817|    298|  return result;
 1818|    298|}
Curl_ssl_supports:
 1823|  13.7k|{
 1824|  13.7k|  (void)data;
 1825|  13.7k|  return (Curl_ssl->supports & ssl_option);
 1826|  13.7k|}
Curl_ssl_cf_is_proxy:
 1907|  48.6k|{
 1908|  48.6k|  return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  207|  48.6k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  209|  48.6k|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (1908:10): [True: 48.6k, False: 0]
  |  Branch (1908:44): [True: 5.53k, False: 43.0k]
  ------------------
 1909|  48.6k|}
Curl_ssl_cf_get_config:
 1913|  18.9k|{
 1914|       |#ifdef CURL_DISABLE_PROXY
 1915|       |  (void)cf;
 1916|       |  return &data->set.ssl;
 1917|       |#else
 1918|  18.9k|  return Curl_ssl_cf_is_proxy(cf) ? &data->set.proxy_ssl : &data->set.ssl;
  ------------------
  |  Branch (1918:10): [True: 2.26k, False: 16.6k]
  ------------------
 1919|  18.9k|#endif
 1920|  18.9k|}
Curl_ssl_cf_get_primary_config:
 1924|  26.9k|{
 1925|       |#ifdef CURL_DISABLE_PROXY
 1926|       |  return &cf->conn->ssl_config;
 1927|       |#else
 1928|  26.9k|  return Curl_ssl_cf_is_proxy(cf) ?
  ------------------
  |  Branch (1928:10): [True: 2.97k, False: 23.9k]
  ------------------
 1929|  23.9k|    &cf->conn->proxy_ssl_config : &cf->conn->ssl_config;
 1930|  26.9k|#endif
 1931|  26.9k|}
Curl_alpn_to_proto_buf:
 1935|    294|{
 1936|    294|  size_t i, len;
 1937|    294|  int off = 0;
 1938|    294|  unsigned char blen;
 1939|       |
 1940|    294|  memset(buf, 0, sizeof(*buf));
 1941|    745|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1941:14): [True: 745, False: 0]
  |  Branch (1941:22): [True: 451, False: 294]
  ------------------
 1942|    451|    len = strlen(spec->entries[i]);
 1943|    451|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|    451|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1943:8): [True: 0, False: 451]
  ------------------
 1944|      0|      return CURLE_FAILED_INIT;
 1945|    451|    blen = (unsigned char)len;
 1946|    451|    if(off + blen + 1 >= (int)sizeof(buf->data))
  ------------------
  |  Branch (1946:8): [True: 0, False: 451]
  ------------------
 1947|      0|      return CURLE_FAILED_INIT;
 1948|    451|    buf->data[off++] = blen;
 1949|    451|    memcpy(buf->data + off, spec->entries[i], blen);
 1950|    451|    off += blen;
 1951|    451|  }
 1952|    294|  buf->len = off;
 1953|    294|  return CURLE_OK;
 1954|    294|}
Curl_alpn_to_proto_str:
 1958|    294|{
 1959|    294|  size_t i, len;
 1960|    294|  size_t off = 0;
 1961|       |
 1962|    294|  memset(buf, 0, sizeof(*buf));
 1963|    745|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1963:14): [True: 745, False: 0]
  |  Branch (1963:22): [True: 451, False: 294]
  ------------------
 1964|    451|    len = strlen(spec->entries[i]);
 1965|    451|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|    451|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1965:8): [True: 0, False: 451]
  ------------------
 1966|      0|      return CURLE_FAILED_INIT;
 1967|    451|    if(off + len + 2 >= sizeof(buf->data))
  ------------------
  |  Branch (1967:8): [True: 0, False: 451]
  ------------------
 1968|      0|      return CURLE_FAILED_INIT;
 1969|    451|    if(off)
  ------------------
  |  Branch (1969:8): [True: 157, False: 294]
  ------------------
 1970|    157|      buf->data[off++] = ',';
 1971|    451|    memcpy(buf->data + off, spec->entries[i], len);
 1972|    451|    off += len;
 1973|    451|  }
 1974|    294|  buf->data[off] = '\0';
 1975|    294|  buf->len = (int)off;
 1976|    294|  return CURLE_OK;
 1977|    294|}
Curl_alpn_copy:
 2002|  1.95k|{
 2003|  1.95k|  if(src)
  ------------------
  |  Branch (2003:6): [True: 294, False: 1.66k]
  ------------------
 2004|    294|    memcpy(dest, src, sizeof(*dest));
 2005|  1.66k|  else
 2006|  1.66k|    memset(dest, 0, sizeof(*dest));
 2007|  1.95k|}
vtls.c:clone_ssl_primary_config:
  249|  12.1k|{
  250|  12.1k|  dest->version = source->version;
  251|  12.1k|  dest->version_max = source->version_max;
  252|  12.1k|  dest->verifypeer = source->verifypeer;
  253|  12.1k|  dest->verifyhost = source->verifyhost;
  254|  12.1k|  dest->verifystatus = source->verifystatus;
  255|  12.1k|  dest->cache_session = source->cache_session;
  256|  12.1k|  dest->ssl_options = source->ssl_options;
  257|       |
  258|  12.1k|  CLONE_BLOB(cert_blob);
  ------------------
  |  |   94|  12.1k|  do {                                   \
  |  |   95|  12.1k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (95:8): [True: 0, False: 12.1k]
  |  |  ------------------
  |  |   96|  12.1k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   97|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (97:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  259|  12.1k|  CLONE_BLOB(ca_info_blob);
  ------------------
  |  |   94|  12.1k|  do {                                   \
  |  |   95|  12.1k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (95:8): [True: 0, False: 12.1k]
  |  |  ------------------
  |  |   96|  12.1k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   97|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (97:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  260|  12.1k|  CLONE_BLOB(issuercert_blob);
  ------------------
  |  |   94|  12.1k|  do {                                   \
  |  |   95|  12.1k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (95:8): [True: 0, False: 12.1k]
  |  |  ------------------
  |  |   96|  12.1k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   97|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (97:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  261|  12.1k|  CLONE_BLOB(key_blob);
  ------------------
  |  |   94|  12.1k|  do {                                   \
  |  |   95|  12.1k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (95:8): [True: 0, False: 12.1k]
  |  |  ------------------
  |  |   96|  12.1k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   97|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (97:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  262|  12.1k|  CLONE_STRING(CApath);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 12.1k, False: 0]
  |  |  ------------------
  |  |   85|  12.1k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|  12.1k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|  12.1k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 12.1k]
  |  |  ------------------
  |  |   87|  12.1k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|  12.1k|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  263|  12.1k|  CLONE_STRING(CAfile);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 12.1k, False: 0]
  |  |  ------------------
  |  |   85|  12.1k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|  12.1k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|  12.1k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 12.1k]
  |  |  ------------------
  |  |   87|  12.1k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|  12.1k|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  264|  12.1k|  CLONE_STRING(issuercert);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 13, False: 12.1k]
  |  |  ------------------
  |  |   85|     13|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     13|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     13|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 13]
  |  |  ------------------
  |  |   87|     13|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     13|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  265|  12.1k|  CLONE_STRING(clientcert);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 16, False: 12.1k]
  |  |  ------------------
  |  |   85|     16|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     16|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     16|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 16]
  |  |  ------------------
  |  |   87|     16|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     16|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  266|  12.1k|  CLONE_STRING(cipher_list);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 842, False: 11.2k]
  |  |  ------------------
  |  |   85|    842|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|    842|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|    842|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 842]
  |  |  ------------------
  |  |   87|    842|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|    842|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  267|  12.1k|  CLONE_STRING(cipher_list13);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 162, False: 11.9k]
  |  |  ------------------
  |  |   85|    162|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|    162|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|    162|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 162]
  |  |  ------------------
  |  |   87|    162|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|    162|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  268|  12.1k|  CLONE_STRING(pinned_key);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 18, False: 12.1k]
  |  |  ------------------
  |  |   85|     18|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     18|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     18|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   87|     18|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     18|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  269|  12.1k|  CLONE_STRING(curves);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 604, False: 11.5k]
  |  |  ------------------
  |  |   85|    604|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|    604|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|    604|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 604]
  |  |  ------------------
  |  |   87|    604|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|    604|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  270|  12.1k|  CLONE_STRING(signature_algorithms);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 0, False: 12.1k]
  |  |  ------------------
  |  |   85|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|      0|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  271|  12.1k|  CLONE_STRING(CRLfile);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 6.07k, False: 6.05k]
  |  |  ------------------
  |  |   85|  6.07k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|  6.07k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|  6.07k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 6.07k]
  |  |  ------------------
  |  |   87|  6.07k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|  6.07k|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  272|  12.1k|  CLONE_STRING(cert_type);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 13, False: 12.1k]
  |  |  ------------------
  |  |   85|     13|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     13|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     13|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 13]
  |  |  ------------------
  |  |   87|     13|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     13|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  273|  12.1k|  CLONE_STRING(key);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 7, False: 12.1k]
  |  |  ------------------
  |  |   85|      7|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|      7|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|      7|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 7]
  |  |  ------------------
  |  |   87|      7|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|      7|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  274|  12.1k|  CLONE_STRING(key_type);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 19, False: 12.1k]
  |  |  ------------------
  |  |   85|     19|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     19|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     19|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 19]
  |  |  ------------------
  |  |   87|     19|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     19|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  275|  12.1k|  CLONE_STRING(key_passwd);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 4, False: 12.1k]
  |  |  ------------------
  |  |   85|      4|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|      4|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|      4|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 4]
  |  |  ------------------
  |  |   87|      4|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|      4|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  276|  12.1k|#ifdef USE_TLS_SRP
  277|  12.1k|  CLONE_STRING(username);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 12, False: 12.1k]
  |  |  ------------------
  |  |   85|     12|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     12|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     12|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 12]
  |  |  ------------------
  |  |   87|     12|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     12|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  278|  12.1k|  CLONE_STRING(password);
  ------------------
  |  |   83|  12.1k|  do {                                       \
  |  |   84|  12.1k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 16, False: 12.1k]
  |  |  ------------------
  |  |   85|     16|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     16|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     16|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 16]
  |  |  ------------------
  |  |   87|     16|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     16|    }                                        \
  |  |   89|  12.1k|    else                                     \
  |  |   90|  12.1k|      dest->var = NULL;                      \
  |  |   91|  12.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
  279|  12.1k|#endif
  280|       |
  281|  12.1k|  return TRUE;
  ------------------
  |  | 1055|  12.1k|#define TRUE true
  ------------------
  282|  12.1k|}
vtls.c:blobdup:
  100|  48.5k|{
  101|  48.5k|  DEBUGASSERT(dest);
  ------------------
  |  | 1081|  48.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (101:3): [True: 0, False: 48.5k]
  |  Branch (101:3): [True: 48.5k, False: 0]
  ------------------
  102|  48.5k|  DEBUGASSERT(!*dest);
  ------------------
  |  | 1081|  48.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (102:3): [True: 0, False: 48.5k]
  |  Branch (102:3): [True: 48.5k, False: 0]
  ------------------
  103|  48.5k|  if(src) {
  ------------------
  |  Branch (103:6): [True: 0, False: 48.5k]
  ------------------
  104|       |    /* only if there is data to dupe! */
  105|      0|    struct curl_blob *d;
  106|      0|    d = curlx_malloc(sizeof(struct curl_blob) + src->len);
  ------------------
  |  | 1478|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  107|      0|    if(!d)
  ------------------
  |  Branch (107:8): [True: 0, False: 0]
  ------------------
  108|      0|      return CURLE_OUT_OF_MEMORY;
  109|      0|    d->len = src->len;
  110|       |    /* Always duplicate because the connection may survive longer than the
  111|       |       handle that passed in the blob. */
  112|      0|    d->flags = CURL_BLOB_COPY;
  ------------------
  |  |   31|      0|#define CURL_BLOB_COPY   1 /* tell libcurl to copy the data */
  ------------------
  113|      0|    d->data = (void *)((char *)d + sizeof(struct curl_blob));
  114|      0|    memcpy(d->data, src->data, src->len);
  115|      0|    *dest = d;
  116|      0|  }
  117|  48.5k|  return CURLE_OK;
  118|  48.5k|}
vtls.c:free_primary_ssl_config:
  285|  15.1k|{
  286|  15.1k|  curlx_safefree(sslc->CApath);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  287|  15.1k|  curlx_safefree(sslc->CAfile);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  288|  15.1k|  curlx_safefree(sslc->issuercert);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  289|  15.1k|  curlx_safefree(sslc->clientcert);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  290|  15.1k|  curlx_safefree(sslc->cipher_list);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  291|  15.1k|  curlx_safefree(sslc->cipher_list13);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  292|  15.1k|  curlx_safefree(sslc->pinned_key);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  293|  15.1k|  curlx_safefree(sslc->cert_blob);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  294|  15.1k|  curlx_safefree(sslc->ca_info_blob);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  295|  15.1k|  curlx_safefree(sslc->issuercert_blob);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  296|  15.1k|  curlx_safefree(sslc->key_blob);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  297|  15.1k|  curlx_safefree(sslc->curves);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  298|  15.1k|  curlx_safefree(sslc->signature_algorithms);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  299|  15.1k|  curlx_safefree(sslc->CRLfile);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  300|  15.1k|  curlx_safefree(sslc->cert_type);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  301|  15.1k|  curlx_safefree(sslc->key);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  302|  15.1k|  curlx_safefree(sslc->key_type);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  303|  15.1k|  curlx_safefree(sslc->key_passwd);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  304|  15.1k|#ifdef USE_TLS_SRP
  305|  15.1k|  curlx_safefree(sslc->username);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  306|       |  curlx_safefree(sslc->password);
  ------------------
  |  | 1327|  15.1k|  do {                      \
  |  | 1328|  15.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.1k|    (ptr) = NULL;           \
  |  | 1330|  15.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  307|  15.1k|#endif
  308|  15.1k|}
vtls.c:multissl_setup:
 1107|  12.5k|{
 1108|  12.5k|  int i;
 1109|  12.5k|  char *env;
 1110|       |
 1111|  12.5k|  if(Curl_ssl != &Curl_ssl_multi)
  ------------------
  |  Branch (1111:6): [True: 12.5k, False: 0]
  ------------------
 1112|  12.5k|    return 1;
 1113|       |
 1114|      0|  if(backend) {
  ------------------
  |  Branch (1114:6): [True: 0, False: 0]
  ------------------
 1115|      0|    Curl_ssl = backend;
 1116|      0|    return 0;
 1117|      0|  }
 1118|       |
 1119|      0|  if(!available_backends[0])
  ------------------
  |  Branch (1119:6): [True: 0, False: 0]
  ------------------
 1120|      0|    return 1;
 1121|       |
 1122|      0|  env = curl_getenv("CURL_SSL_BACKEND");
 1123|      0|  if(env) {
  ------------------
  |  Branch (1123:6): [True: 0, False: 0]
  ------------------
 1124|      0|    for(i = 0; available_backends[i]; i++) {
  ------------------
  |  Branch (1124:16): [True: 0, False: 0]
  ------------------
 1125|      0|      if(curl_strequal(env, available_backends[i]->info.name)) {
  ------------------
  |  Branch (1125:10): [True: 0, False: 0]
  ------------------
 1126|      0|        Curl_ssl = available_backends[i];
 1127|      0|        curlx_free(env);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1128|      0|        return 0;
 1129|      0|      }
 1130|      0|    }
 1131|      0|  }
 1132|       |
 1133|       |#ifdef CURL_DEFAULT_SSL_BACKEND
 1134|       |  for(i = 0; available_backends[i]; i++) {
 1135|       |    if(curl_strequal(CURL_DEFAULT_SSL_BACKEND,
 1136|       |                     available_backends[i]->info.name)) {
 1137|       |      Curl_ssl = available_backends[i];
 1138|       |      curlx_free(env);
 1139|       |      return 0;
 1140|       |    }
 1141|       |  }
 1142|       |#endif
 1143|       |
 1144|       |  /* Fall back to first available backend */
 1145|      0|  Curl_ssl = available_backends[0];
 1146|      0|  curlx_free(env);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1147|      0|  return 0;
 1148|      0|}
vtls.c:get_peer_type:
 1218|  2.79k|{
 1219|  2.79k|  if(hostname && hostname[0]) {
  ------------------
  |  Branch (1219:6): [True: 2.79k, False: 0]
  |  Branch (1219:18): [True: 2.79k, False: 0]
  ------------------
 1220|  2.79k|#ifdef USE_IPV6
 1221|  2.79k|    struct in6_addr addr;
 1222|       |#else
 1223|       |    struct in_addr addr;
 1224|       |#endif
 1225|  2.79k|    if(curlx_inet_pton(AF_INET, hostname, &addr))
  ------------------
  |  |   43|  2.79k|  inet_pton(x, y, z)
  |  |  ------------------
  |  |  |  Branch (43:3): [True: 1.33k, False: 1.45k]
  |  |  ------------------
  ------------------
 1226|  1.33k|      return CURL_SSL_PEER_IPV4;
 1227|  1.45k|#ifdef USE_IPV6
 1228|  1.45k|    else if(curlx_inet_pton(AF_INET6, hostname, &addr)) {
  ------------------
  |  |   43|  1.45k|  inet_pton(x, y, z)
  |  |  ------------------
  |  |  |  Branch (43:3): [True: 1, False: 1.45k]
  |  |  ------------------
  ------------------
 1229|      1|      return CURL_SSL_PEER_IPV6;
 1230|      1|    }
 1231|  2.79k|#endif
 1232|  2.79k|  }
 1233|  1.45k|  return CURL_SSL_PEER_DNS;
 1234|  2.79k|}
vtls.c:ssl_cf_destroy:
 1296|  2.79k|{
 1297|  2.79k|  struct cf_call_data save;
 1298|       |
 1299|  2.79k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|  2.79k|  do { \
  |  |  671|  2.79k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|  2.79k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|  2.79k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.79k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|  2.79k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|  2.79k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|  2.79k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|  2.79k|#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); \
  |  |  ------------------
  |  |  |  |  866|  2.79k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|  2.79k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 2.79k]
  |  |  ------------------
  ------------------
  |  Branch (1299:3): [True: 2.79k, False: 0]
  |  Branch (1299:3): [True: 0, False: 0]
  |  Branch (1299:3): [True: 2.79k, False: 0]
  |  Branch (1299:3): [True: 0, False: 0]
  ------------------
 1300|  2.79k|  cf_close(cf, data);
 1301|  2.79k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|  2.79k|  do { \
  |  |  679|  2.79k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|  2.79k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  2.79k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.79k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|  2.79k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|  2.79k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|  2.79k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 2.79k]
  |  |  ------------------
  ------------------
  |  Branch (1301:3): [True: 0, False: 2.79k]
  |  Branch (1301:3): [True: 2.79k, False: 0]
  |  Branch (1301:3): [True: 2.79k, False: 0]
  |  Branch (1301:3): [True: 0, False: 0]
  |  Branch (1301:3): [True: 2.79k, False: 0]
  |  Branch (1301:3): [True: 0, False: 0]
  ------------------
 1302|  2.79k|  cf_ctx_free(cf->ctx);
 1303|       |  cf->ctx = NULL;
 1304|  2.79k|}
vtls.c:cf_close:
 1205|  5.59k|{
 1206|  5.59k|  struct ssl_connect_data *connssl = cf->ctx;
 1207|  5.59k|  if(connssl) {
  ------------------
  |  Branch (1207:6): [True: 5.59k, False: 0]
  ------------------
 1208|  5.59k|    connssl->ssl_impl->close(cf, data);
 1209|  5.59k|    connssl->state = ssl_connection_none;
 1210|  5.59k|    connssl->connecting_state = ssl_connect_1;
 1211|  5.59k|    connssl->prefs_checked = FALSE;
  ------------------
  |  | 1058|  5.59k|#define FALSE false
  ------------------
 1212|  5.59k|    Curl_ssl_peer_cleanup(&connssl->peer);
 1213|  5.59k|  }
 1214|       |  cf->connected = FALSE;
  ------------------
  |  | 1058|  5.59k|#define FALSE false
  ------------------
 1215|  5.59k|}
vtls.c:cf_ctx_free:
  537|  2.79k|{
  538|  2.79k|  if(ctx) {
  ------------------
  |  Branch (538:6): [True: 2.79k, False: 0]
  ------------------
  539|  2.79k|    curlx_safefree(ctx->negotiated.alpn);
  ------------------
  |  | 1327|  2.79k|  do {                      \
  |  | 1328|  2.79k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  2.79k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  2.79k|    (ptr) = NULL;           \
  |  | 1330|  2.79k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 2.79k]
  |  |  ------------------
  ------------------
  540|  2.79k|    Curl_bufq_free(&ctx->earlydata);
  541|  2.79k|    curlx_free(ctx->backend);
  ------------------
  |  | 1483|  2.79k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  542|  2.79k|    curlx_free(ctx);
  ------------------
  |  | 1483|  2.79k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  543|  2.79k|  }
  544|  2.79k|}
vtls.c:ssl_cf_connect:
 1321|  3.09k|{
 1322|  3.09k|  struct ssl_connect_data *connssl = cf->ctx;
 1323|  3.09k|  struct cf_call_data save;
 1324|  3.09k|  CURLcode result;
 1325|       |
 1326|  3.09k|  if(cf->connected && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (1326:6): [True: 0, False: 3.09k]
  |  Branch (1326:23): [True: 0, False: 0]
  ------------------
 1327|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1328|      0|    return CURLE_OK;
 1329|      0|  }
 1330|       |
 1331|  3.09k|  if(!cf->next) {
  ------------------
  |  Branch (1331:6): [True: 0, False: 3.09k]
  ------------------
 1332|      0|    *done = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1333|      0|    return CURLE_FAILED_INIT;
 1334|      0|  }
 1335|       |
 1336|  3.09k|  if(!cf->next->connected) {
  ------------------
  |  Branch (1336:6): [True: 0, False: 3.09k]
  ------------------
 1337|      0|    result = cf->next->cft->do_connect(cf->next, data, done);
 1338|      0|    if(result || !*done)
  ------------------
  |  Branch (1338:8): [True: 0, False: 0]
  |  Branch (1338:18): [True: 0, False: 0]
  ------------------
 1339|      0|      return result;
 1340|      0|  }
 1341|       |
 1342|  3.09k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|  3.09k|  do { \
  |  |  671|  3.09k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|  3.09k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|  3.09k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  3.09k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|  3.09k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|  3.09k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|  3.09k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|  3.09k|#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); \
  |  |  ------------------
  |  |  |  |  866|  3.09k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|  3.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 3.09k]
  |  |  ------------------
  ------------------
  |  Branch (1342:3): [True: 3.09k, False: 0]
  |  Branch (1342:3): [True: 0, False: 0]
  |  Branch (1342:3): [True: 3.09k, False: 0]
  |  Branch (1342:3): [True: 0, False: 0]
  ------------------
 1343|  3.09k|  CURL_TRC_CF(data, cf, "cf_connect()");
  ------------------
  |  |  153|  3.09k|  do {                                          \
  |  |  154|  3.09k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.09k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  6.18k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.09k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  6.18k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.09k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.09k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.09k]
  |  |  ------------------
  ------------------
 1344|  3.09k|  DEBUGASSERT(connssl);
  ------------------
  |  | 1081|  3.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1344:3): [True: 0, False: 3.09k]
  |  Branch (1344:3): [True: 3.09k, False: 0]
  ------------------
 1345|       |
 1346|  3.09k|  *done = FALSE;
  ------------------
  |  | 1058|  3.09k|#define FALSE false
  ------------------
 1347|       |
 1348|  3.09k|  if(!connssl->prefs_checked) {
  ------------------
  |  Branch (1348:6): [True: 2.79k, False: 298]
  ------------------
 1349|  2.79k|    if(!ssl_prefs_check(data)) {
  ------------------
  |  Branch (1349:8): [True: 1, False: 2.79k]
  ------------------
 1350|      1|      result = CURLE_SSL_CONNECT_ERROR;
 1351|      1|      goto out;
 1352|      1|    }
 1353|  2.79k|    connssl->prefs_checked = TRUE;
  ------------------
  |  | 1055|  2.79k|#define TRUE true
  ------------------
 1354|  2.79k|  }
 1355|       |
 1356|  3.09k|  if(!connssl->peer.dest) {
  ------------------
  |  Branch (1356:6): [True: 2.79k, False: 298]
  ------------------
 1357|  2.79k|    char tls_id[80];
 1358|  2.79k|    connssl->ssl_impl->version(tls_id, sizeof(tls_id) - 1);
 1359|  2.79k|    result = Curl_ssl_peer_init(&connssl->peer, cf, tls_id, TRNSPRT_TCP);
  ------------------
  |  |  307|  2.79k|#define TRNSPRT_TCP  3
  ------------------
 1360|  2.79k|    if(result)
  ------------------
  |  Branch (1360:8): [True: 11, False: 2.78k]
  ------------------
 1361|     11|      goto out;
 1362|  2.79k|  }
 1363|       |
 1364|  3.08k|  result = connssl->ssl_impl->do_connect(cf, data, done);
 1365|       |
 1366|  3.08k|  if(!result && *done) {
  ------------------
  |  Branch (1366:6): [True: 306, False: 2.77k]
  |  Branch (1366:17): [True: 0, False: 306]
  ------------------
 1367|      0|    cf->connected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1368|      0|    if(connssl->state == ssl_connection_complete) {
  ------------------
  |  Branch (1368:8): [True: 0, False: 0]
  ------------------
 1369|      0|      connssl->handshake_done = *Curl_pgrs_now(data);
 1370|      0|    }
 1371|      0|    if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (1371:8): [True: 0, False: 0]
  ------------------
 1372|      0|      infof(data, "SSLKEYLOGFILE set, all TLS secrets are logged to '%s'",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1373|      0|            Curl_tls_keylog_file_name());
 1374|       |#ifdef LIBRESSL_VERSION_NUMBER
 1375|       |      infof(data, "Note LibreSSL only supports SSLKEYLOGFILE for TLS <= 1.2");
 1376|       |#endif
 1377|      0|    }
 1378|       |    /* Connection can be deferred when sending early data */
 1379|      0|    DEBUGASSERT(connssl->state == ssl_connection_complete ||
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1379:5): [True: 0, False: 0]
  |  Branch (1379:5): [True: 0, False: 0]
  |  Branch (1379:5): [True: 0, False: 0]
  |  Branch (1379:5): [True: 0, False: 0]
  ------------------
 1380|      0|                connssl->state == ssl_connection_deferred);
 1381|      0|    DEBUGASSERT(connssl->state != ssl_connection_deferred ||
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1381:5): [True: 0, False: 0]
  |  Branch (1381:5): [True: 0, False: 0]
  |  Branch (1381:5): [True: 0, False: 0]
  |  Branch (1381:5): [True: 0, False: 0]
  ------------------
 1382|      0|                connssl->earlydata_state > ssl_earlydata_none);
 1383|      0|  }
 1384|  3.09k|out:
 1385|  3.09k|  CURL_TRC_CF(data, cf, "cf_connect() -> %d, done=%d", result, *done);
  ------------------
  |  |  153|  3.09k|  do {                                          \
  |  |  154|  3.09k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.09k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  6.18k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.09k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  6.18k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.09k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.09k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.09k]
  |  |  ------------------
  ------------------
 1386|  3.09k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|  3.09k|  do { \
  |  |  679|  3.09k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|  3.09k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  3.09k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  3.09k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|  3.09k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|  3.09k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|  3.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 3.09k]
  |  |  ------------------
  ------------------
  |  Branch (1386:3): [True: 0, False: 3.09k]
  |  Branch (1386:3): [True: 3.09k, False: 0]
  |  Branch (1386:3): [True: 3.09k, False: 0]
  |  Branch (1386:3): [True: 0, False: 0]
  |  Branch (1386:3): [True: 3.09k, False: 0]
  |  Branch (1386:3): [True: 0, False: 0]
  ------------------
 1387|  3.09k|  return result;
 1388|  3.09k|}
vtls.c:ssl_prefs_check:
  492|  2.79k|{
  493|       |  /* check for CURLOPT_SSLVERSION invalid parameter value */
  494|  2.79k|  const unsigned char sslver = data->set.ssl.primary.version;
  495|  2.79k|  if(sslver >= CURL_SSLVERSION_LAST) {
  ------------------
  |  | 2377|  2.79k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (495:6): [True: 0, False: 2.79k]
  ------------------
  496|      0|    failf(data, "Unrecognized parameter value passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  497|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  498|      0|  }
  499|       |
  500|  2.79k|  switch(data->set.ssl.primary.version_max) {
  501|  2.75k|  case CURL_SSLVERSION_MAX_NONE:
  ------------------
  |  | 2379|  2.75k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (501:3): [True: 2.75k, False: 38]
  ------------------
  502|  2.76k|  case CURL_SSLVERSION_MAX_DEFAULT:
  ------------------
  |  | 2380|  2.76k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2369|  2.76k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (502:3): [True: 9, False: 2.78k]
  ------------------
  503|  2.76k|    break;
  504|       |
  505|     29|  default:
  ------------------
  |  Branch (505:3): [True: 29, False: 2.76k]
  ------------------
  506|     29|    if((data->set.ssl.primary.version_max >> 16) < sslver) {
  ------------------
  |  Branch (506:8): [True: 1, False: 28]
  ------------------
  507|      1|      failf(data, "CURL_SSLVERSION_MAX incompatible with CURL_SSLVERSION");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  508|      1|      return FALSE;
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
  509|      1|    }
  510|  2.79k|  }
  511|       |
  512|  2.79k|  return TRUE;
  ------------------
  |  | 1055|  2.79k|#define TRUE true
  ------------------
  513|  2.79k|}
vtls.c:ssl_cf_close:
 1308|  2.79k|{
 1309|  2.79k|  struct cf_call_data save;
 1310|       |
 1311|  2.79k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|  2.79k|  do { \
  |  |  671|  2.79k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|  2.79k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|  2.79k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.79k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|  2.79k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|  2.79k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|  2.79k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|  2.79k|#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); \
  |  |  ------------------
  |  |  |  |  866|  2.79k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|  2.79k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 2.79k]
  |  |  ------------------
  ------------------
  |  Branch (1311:3): [True: 2.79k, False: 0]
  |  Branch (1311:3): [True: 0, False: 0]
  |  Branch (1311:3): [True: 2.79k, False: 0]
  |  Branch (1311:3): [True: 0, False: 0]
  ------------------
 1312|  2.79k|  cf_close(cf, data);
 1313|  2.79k|  if(cf->next)
  ------------------
  |  Branch (1313:6): [True: 2.79k, False: 0]
  ------------------
 1314|  2.79k|    cf->next->cft->do_close(cf->next, data);
 1315|       |  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|  2.79k|  do { \
  |  |  679|  2.79k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|  2.79k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  2.79k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.79k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|  2.79k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|  2.79k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|  2.79k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 2.79k]
  |  |  ------------------
  ------------------
  |  Branch (1315:3): [True: 0, False: 2.79k]
  |  Branch (1315:3): [True: 2.79k, False: 0]
  |  Branch (1315:3): [True: 2.79k, False: 0]
  |  Branch (1315:3): [True: 0, False: 0]
  |  Branch (1315:3): [True: 2.79k, False: 0]
  |  Branch (1315:3): [True: 0, False: 0]
  ------------------
 1316|  2.79k|}
vtls.c:ssl_cf_adjust_pollset:
 1585|    306|{
 1586|    306|  struct ssl_connect_data *connssl = cf->ctx;
 1587|    306|  struct cf_call_data save;
 1588|    306|  CURLcode result;
 1589|       |
 1590|    306|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|    306|  do { \
  |  |  671|    306|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|    306|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|    306|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|    306|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|    306|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|    306|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|    306|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|    306|#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); \
  |  |  ------------------
  |  |  |  |  866|    306|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|    306|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 306]
  |  |  ------------------
  ------------------
  |  Branch (1590:3): [True: 306, False: 0]
  |  Branch (1590:3): [True: 0, False: 0]
  |  Branch (1590:3): [True: 306, False: 0]
  |  Branch (1590:3): [True: 0, False: 0]
  ------------------
 1591|    306|  result = connssl->ssl_impl->adjust_pollset(cf, data, ps);
 1592|    306|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|    306|  do { \
  |  |  679|    306|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|    306|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|    306|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|    306|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|    306|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|    306|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|    306|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 306]
  |  |  ------------------
  ------------------
  |  Branch (1592:3): [True: 0, False: 306]
  |  Branch (1592:3): [True: 306, False: 0]
  |  Branch (1592:3): [True: 306, False: 0]
  |  Branch (1592:3): [True: 0, False: 0]
  |  Branch (1592:3): [True: 306, False: 0]
  |  Branch (1592:3): [True: 0, False: 0]
  ------------------
 1593|    306|  return result;
 1594|    306|}
vtls.c:ssl_cf_cntrl:
 1641|  2.49k|{
 1642|  2.49k|  struct ssl_connect_data *connssl = cf->ctx;
 1643|       |
 1644|  2.49k|  (void)arg1;
 1645|  2.49k|  (void)arg2;
 1646|  2.49k|  (void)data;
 1647|  2.49k|  switch(event) {
  ------------------
  |  Branch (1647:10): [True: 0, False: 2.49k]
  ------------------
 1648|      0|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  125|      0|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (1648:3): [True: 0, False: 2.49k]
  ------------------
 1649|      0|    if(connssl->negotiated.alpn && !cf->sockindex) {
  ------------------
  |  Branch (1649:8): [True: 0, False: 0]
  |  Branch (1649:36): [True: 0, False: 0]
  ------------------
 1650|      0|      if(!strcmp("http/1.1", connssl->negotiated.alpn))
  ------------------
  |  Branch (1650:10): [True: 0, False: 0]
  ------------------
 1651|      0|        cf->conn->httpversion_seen = 11;
 1652|      0|      else if(!strcmp("h2", connssl->negotiated.alpn))
  ------------------
  |  Branch (1652:15): [True: 0, False: 0]
  ------------------
 1653|      0|        cf->conn->httpversion_seen = 20;
 1654|      0|      else if(!strcmp("h3", connssl->negotiated.alpn))
  ------------------
  |  Branch (1654:15): [True: 0, False: 0]
  ------------------
 1655|      0|        cf->conn->httpversion_seen = 30;
 1656|      0|    }
 1657|      0|    break;
 1658|  2.49k|  }
 1659|  2.49k|  return CURLE_OK;
 1660|  2.49k|}
vtls.c:ssl_cf_query:
 1599|  6.18k|{
 1600|  6.18k|  struct ssl_connect_data *connssl = cf->ctx;
 1601|       |
 1602|  6.18k|  switch(query) {
 1603|  2.78k|  case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  169|  2.78k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (1603:3): [True: 2.78k, False: 3.39k]
  ------------------
 1604|  2.78k|    struct curltime *when = pres2;
 1605|  2.78k|    if(cf->connected && !Curl_ssl_cf_is_proxy(cf))
  ------------------
  |  Branch (1605:8): [True: 0, False: 2.78k]
  |  Branch (1605:25): [True: 0, False: 0]
  ------------------
 1606|      0|      *when = connssl->handshake_done;
 1607|  2.78k|    return CURLE_OK;
 1608|      0|  }
 1609|      0|  case CF_QUERY_SSL_INFO:
  ------------------
  |  |  178|      0|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1609:3): [True: 0, False: 6.18k]
  ------------------
 1610|      0|  case CF_QUERY_SSL_CTX_INFO:
  ------------------
  |  |  179|      0|#define CF_QUERY_SSL_CTX_INFO      13  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1610:3): [True: 0, False: 6.18k]
  ------------------
 1611|      0|    if(!Curl_ssl_cf_is_proxy(cf)) {
  ------------------
  |  Branch (1611:8): [True: 0, False: 0]
  ------------------
 1612|      0|      struct curl_tlssessioninfo *info = pres2;
 1613|      0|      struct cf_call_data save;
 1614|      0|      CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|      0|  do { \
  |  |  671|      0|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|      0|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|      0|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|      0|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|      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); \
  |  |  ------------------
  |  |  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1614:7): [True: 0, False: 0]
  |  Branch (1614:7): [True: 0, False: 0]
  |  Branch (1614:7): [True: 0, False: 0]
  |  Branch (1614:7): [True: 0, False: 0]
  ------------------
 1615|      0|      info->backend = Curl_ssl_backend();
 1616|      0|      info->internals = connssl->ssl_impl->get_internals(
 1617|      0|        cf->ctx, (query == CF_QUERY_SSL_INFO) ?
  ------------------
  |  |  178|      0|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1617:18): [True: 0, False: 0]
  ------------------
 1618|      0|        CURLINFO_TLS_SSL_PTR : CURLINFO_TLS_SESSION);
 1619|      0|      CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|      0|  do { \
  |  |  679|      0|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|      0|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|      0|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  ------------------
 1620|      0|      return CURLE_OK;
 1621|      0|    }
 1622|      0|    break;
 1623|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  181|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1623:3): [True: 0, False: 6.18k]
  ------------------
 1624|      0|    const char **palpn = pres2;
 1625|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1625:5): [True: 0, False: 0]
  |  Branch (1625:5): [True: 0, False: 0]
  ------------------
 1626|      0|    *palpn = connssl->negotiated.alpn;
 1627|      0|    CURL_TRC_CF(data, cf, "query ALPN: returning '%s'", *palpn);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 1628|      0|    return CURLE_OK;
 1629|      0|  }
 1630|  3.39k|  default:
  ------------------
  |  Branch (1630:3): [True: 3.39k, False: 2.78k]
  ------------------
 1631|  3.39k|    break;
 1632|  6.18k|  }
 1633|  3.39k|  return cf->next ?
  ------------------
  |  Branch (1633:10): [True: 3.39k, False: 0]
  ------------------
 1634|  3.39k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1635|  3.39k|    CURLE_UNKNOWN_OPTION;
 1636|  6.18k|}
vtls.c:cf_ssl_create:
 1716|  2.49k|{
 1717|  2.49k|  struct Curl_cfilter *cf = NULL;
 1718|  2.49k|  struct ssl_connect_data *ctx;
 1719|  2.49k|  CURLcode result;
 1720|       |
 1721|  2.49k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  2.49k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1721:3): [True: 0, False: 2.49k]
  |  Branch (1721:3): [True: 2.49k, False: 0]
  ------------------
 1722|       |
 1723|       |#ifdef CURL_DISABLE_HTTP
 1724|       |  (void)conn;
 1725|       |  /* We only support ALPN for HTTP so far. */
 1726|       |  DEBUGASSERT(!conn->bits.tls_enable_alpn);
 1727|       |  ctx = cf_ctx_new(data, NULL);
 1728|       |#else
 1729|  2.49k|  ctx = cf_ctx_new(data, alpn_get_spec(data->state.http_neg.wanted,
 1730|  2.49k|                                       data->state.http_neg.preferred,
 1731|  2.49k|                                       (bool)data->state.http_neg.only_10,
 1732|  2.49k|                                       (bool)conn->bits.tls_enable_alpn));
 1733|  2.49k|#endif
 1734|  2.49k|  if(!ctx) {
  ------------------
  |  Branch (1734:6): [True: 0, False: 2.49k]
  ------------------
 1735|      0|    result = CURLE_OUT_OF_MEMORY;
 1736|      0|    goto out;
 1737|      0|  }
 1738|       |
 1739|  2.49k|  result = Curl_cf_create(&cf, &Curl_cft_ssl, ctx);
 1740|       |
 1741|  2.49k|out:
 1742|  2.49k|  if(result)
  ------------------
  |  Branch (1742:6): [True: 0, False: 2.49k]
  ------------------
 1743|      0|    cf_ctx_free(ctx);
 1744|  2.49k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1744:10): [True: 0, False: 2.49k]
  ------------------
 1745|  2.49k|  return result;
 1746|  2.49k|}
vtls.c:cf_ctx_new:
  517|  2.79k|{
  518|  2.79k|  struct ssl_connect_data *ctx;
  519|       |
  520|  2.79k|  (void)data;
  521|  2.79k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  2.79k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  522|  2.79k|  if(!ctx)
  ------------------
  |  Branch (522:6): [True: 0, False: 2.79k]
  ------------------
  523|      0|    return NULL;
  524|       |
  525|  2.79k|  ctx->ssl_impl = Curl_ssl;
  526|  2.79k|  ctx->alpn = alpn;
  527|  2.79k|  Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  110|  2.79k|#define CURL_SSL_EARLY_MAX      (64 * 1024)
  ------------------
                Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  115|  2.79k|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  528|  2.79k|  ctx->backend = curlx_calloc(1, ctx->ssl_impl->sizeof_ssl_backend_data);
  ------------------
  |  | 1480|  2.79k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  529|  2.79k|  if(!ctx->backend) {
  ------------------
  |  Branch (529:6): [True: 0, False: 2.79k]
  ------------------
  530|      0|    curlx_free(ctx);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  531|      0|    return NULL;
  532|      0|  }
  533|  2.79k|  return ctx;
  534|  2.79k|}
vtls.c:alpn_get_spec:
  156|  2.79k|{
  157|  2.79k|  if(!use_alpn)
  ------------------
  |  Branch (157:6): [True: 2.50k, False: 296]
  ------------------
  158|  2.50k|    return NULL;
  159|       |  /* If HTTP/1.0 is the wanted protocol then use ALPN http/1.0 and http/1.1.
  160|       |     This is for compatibility reasons since some HTTP/1.0 servers with old
  161|       |     ALPN implementations understand ALPN http/1.1 but not http/1.0. */
  162|    296|  if(only_http_10 && (wanted & CURL_HTTP_V1x))
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (162:6): [True: 0, False: 296]
  |  Branch (162:22): [True: 0, False: 0]
  ------------------
  163|      0|    return &ALPN_SPEC_H10_H11;
  164|    296|#ifdef USE_HTTP2
  165|    296|  if(wanted & CURL_HTTP_V2x) {
  ------------------
  |  |   41|    296|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (165:6): [True: 159, False: 137]
  ------------------
  166|    159|    if(wanted & CURL_HTTP_V1x)
  ------------------
  |  |   40|    159|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (166:8): [True: 159, False: 0]
  ------------------
  167|    159|      return (preferred == CURL_HTTP_V1x) ?
  ------------------
  |  |   40|    159|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (167:14): [True: 0, False: 159]
  ------------------
  168|    159|        &ALPN_SPEC_H11_H2 : &ALPN_SPEC_H2_H11;
  169|      0|    return &ALPN_SPEC_H2;
  170|    159|  }
  171|       |#else
  172|       |  (void)wanted;
  173|       |  (void)preferred;
  174|       |#endif
  175|    137|  return &ALPN_SPEC_H11;
  176|    296|}
vtls.c:cf_ssl_proxy_create:
 1778|    298|{
 1779|    298|  struct Curl_cfilter *cf = NULL;
 1780|    298|  struct ssl_connect_data *ctx;
 1781|    298|  CURLcode result;
 1782|       |  /* ALPN is default, but if user explicitly disables it, obey */
 1783|    298|  bool use_alpn = (bool)data->set.ssl_enable_alpn;
 1784|    298|  http_majors wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|    298|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1785|       |
 1786|    298|  (void)conn;
 1787|    298|#ifdef USE_HTTP2
 1788|    298|  if(conn->http_proxy.proxytype == CURLPROXY_HTTPS2) {
  ------------------
  |  |  796|    298|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (1788:6): [True: 159, False: 139]
  ------------------
 1789|    159|    use_alpn = TRUE;
  ------------------
  |  | 1055|    159|#define TRUE true
  ------------------
 1790|    159|    wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|    159|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|    159|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1791|    159|  }
 1792|    298|#endif
 1793|       |
 1794|    298|  ctx = cf_ctx_new(data, alpn_get_spec(wanted, 0, false, use_alpn));
 1795|    298|  if(!ctx) {
  ------------------
  |  Branch (1795:6): [True: 0, False: 298]
  ------------------
 1796|      0|    result = CURLE_OUT_OF_MEMORY;
 1797|      0|    goto out;
 1798|      0|  }
 1799|    298|  result = Curl_cf_create(&cf, &Curl_cft_ssl_proxy, ctx);
 1800|       |
 1801|    298|out:
 1802|    298|  if(result)
  ------------------
  |  Branch (1802:6): [True: 0, False: 298]
  ------------------
 1803|      0|    cf_ctx_free(ctx);
 1804|    298|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1804:10): [True: 0, False: 298]
  ------------------
 1805|    298|  return result;
 1806|    298|}

Curl_ssl_peer_key_build:
  185|  2.79k|{
  186|  2.79k|  struct dynbuf buf;
  187|  2.79k|  size_t key_len;
  188|  2.79k|  bool is_local = FALSE;
  ------------------
  |  | 1058|  2.79k|#define FALSE false
  ------------------
  189|  2.79k|  CURLcode result;
  190|       |
  191|  2.79k|  *ppeer_key = NULL;
  192|  2.79k|  curlx_dyn_init(&buf, 10 * 1024);
  193|       |
  194|  2.79k|  result = curlx_dyn_addf(&buf, "%s:%d",
  195|  2.79k|                          peer->dest->hostname, peer->dest->port);
  196|  2.79k|  if(result)
  ------------------
  |  Branch (196:6): [True: 0, False: 2.79k]
  ------------------
  197|      0|    goto out;
  198|       |
  199|  2.79k|  switch(peer->transport) {
  200|  2.79k|  case TRNSPRT_TCP:
  ------------------
  |  |  307|  2.79k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (200:3): [True: 2.79k, False: 0]
  ------------------
  201|  2.79k|    break;
  202|      0|  case TRNSPRT_UDP:
  ------------------
  |  |  308|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (202:3): [True: 0, False: 2.79k]
  ------------------
  203|      0|    result = curlx_dyn_add(&buf, ":UDP");
  204|      0|    break;
  205|      0|  case TRNSPRT_QUIC:
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (205:3): [True: 0, False: 2.79k]
  ------------------
  206|      0|    result = curlx_dyn_add(&buf, ":QUIC");
  207|      0|    break;
  208|      0|  case TRNSPRT_UNIX:
  ------------------
  |  |  310|      0|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (208:3): [True: 0, False: 2.79k]
  ------------------
  209|      0|    result = curlx_dyn_add(&buf, ":UNIX");
  210|      0|    break;
  211|      0|  default:
  ------------------
  |  Branch (211:3): [True: 0, False: 2.79k]
  ------------------
  212|      0|    result = curlx_dyn_addf(&buf, ":TRNSPRT-%d", peer->transport);
  213|      0|    break;
  214|  2.79k|  }
  215|  2.79k|  if(result)
  ------------------
  |  Branch (215:6): [True: 0, False: 2.79k]
  ------------------
  216|      0|    goto out;
  217|       |
  218|  2.79k|  if(!ssl->verifypeer) {
  ------------------
  |  Branch (218:6): [True: 140, False: 2.65k]
  ------------------
  219|    140|    result = curlx_dyn_add(&buf, ":NO-VRFY-PEER");
  220|    140|    if(result)
  ------------------
  |  Branch (220:8): [True: 0, False: 140]
  ------------------
  221|      0|      goto out;
  222|    140|  }
  223|  2.79k|  if(!ssl->verifyhost) {
  ------------------
  |  Branch (223:6): [True: 1, False: 2.79k]
  ------------------
  224|      1|    result = curlx_dyn_add(&buf, ":NO-VRFY-HOST");
  225|      1|    if(result)
  ------------------
  |  Branch (225:8): [True: 0, False: 1]
  ------------------
  226|      0|      goto out;
  227|      1|  }
  228|  2.79k|  if(ssl->verifystatus) {
  ------------------
  |  Branch (228:6): [True: 1, False: 2.79k]
  ------------------
  229|      1|    result = curlx_dyn_add(&buf, ":VRFY-STATUS");
  230|      1|    if(result)
  ------------------
  |  Branch (230:8): [True: 0, False: 1]
  ------------------
  231|      0|      goto out;
  232|      1|  }
  233|  2.79k|  if(!ssl->verifypeer || !ssl->verifyhost) {
  ------------------
  |  Branch (233:6): [True: 140, False: 2.65k]
  |  Branch (233:26): [True: 1, False: 2.65k]
  ------------------
  234|    141|    if(via_peer) {
  ------------------
  |  Branch (234:8): [True: 141, False: 0]
  ------------------
  235|    141|      result = curlx_dyn_addf(&buf, ":CHOST-%s:CPORT-%u",
  236|    141|                              via_peer->hostname,
  237|    141|                              via_peer->port);
  238|    141|      if(result)
  ------------------
  |  Branch (238:10): [True: 0, False: 141]
  ------------------
  239|      0|        goto out;
  240|    141|    }
  241|    141|  }
  242|       |
  243|  2.79k|  if(ssl->version || ssl->version_max) {
  ------------------
  |  Branch (243:6): [True: 2.79k, False: 0]
  |  Branch (243:22): [True: 0, False: 0]
  ------------------
  244|  2.79k|    result = curlx_dyn_addf(&buf, ":TLSVER-%d-%u", ssl->version,
  245|  2.79k|                            (ssl->version_max >> 16));
  246|  2.79k|    if(result)
  ------------------
  |  Branch (246:8): [True: 0, False: 2.79k]
  ------------------
  247|      0|      goto out;
  248|  2.79k|  }
  249|  2.79k|  if(ssl->ssl_options) {
  ------------------
  |  Branch (249:6): [True: 4, False: 2.79k]
  ------------------
  250|      4|    result = curlx_dyn_addf(&buf, ":TLSOPT-%x", ssl->ssl_options);
  251|      4|    if(result)
  ------------------
  |  Branch (251:8): [True: 0, False: 4]
  ------------------
  252|      0|      goto out;
  253|      4|  }
  254|  2.79k|  if(ssl->cipher_list) {
  ------------------
  |  Branch (254:6): [True: 838, False: 1.95k]
  ------------------
  255|    838|    result = curlx_dyn_addf(&buf, ":CIPHER-%s", ssl->cipher_list);
  256|    838|    if(result)
  ------------------
  |  Branch (256:8): [True: 1, False: 837]
  ------------------
  257|      1|      goto out;
  258|    838|  }
  259|  2.79k|  if(ssl->cipher_list13) {
  ------------------
  |  Branch (259:6): [True: 158, False: 2.63k]
  ------------------
  260|    158|    result = curlx_dyn_addf(&buf, ":CIPHER13-%s", ssl->cipher_list13);
  261|    158|    if(result)
  ------------------
  |  Branch (261:8): [True: 1, False: 157]
  ------------------
  262|      1|      goto out;
  263|    158|  }
  264|  2.79k|  if(ssl->curves) {
  ------------------
  |  Branch (264:6): [True: 583, False: 2.21k]
  ------------------
  265|    583|    result = curlx_dyn_addf(&buf, ":CURVES-%s", ssl->curves);
  266|    583|    if(result)
  ------------------
  |  Branch (266:8): [True: 1, False: 582]
  ------------------
  267|      1|      goto out;
  268|    583|  }
  269|  2.79k|  if(ssl->signature_algorithms) {
  ------------------
  |  Branch (269:6): [True: 0, False: 2.79k]
  ------------------
  270|      0|    result = curlx_dyn_addf(&buf, ":SIGALGS-%s",
  271|      0|                            ssl->signature_algorithms);
  272|      0|    if(result)
  ------------------
  |  Branch (272:8): [True: 0, False: 0]
  ------------------
  273|      0|      goto out;
  274|      0|  }
  275|  2.79k|  if(ssl->verifypeer) {
  ------------------
  |  Branch (275:6): [True: 2.65k, False: 140]
  ------------------
  276|  2.65k|    result = cf_ssl_peer_key_add_path(&buf, "CA", ssl->CAfile, &is_local);
  277|  2.65k|    if(result)
  ------------------
  |  Branch (277:8): [True: 1, False: 2.65k]
  ------------------
  278|      1|      goto out;
  279|  2.65k|    result = cf_ssl_peer_key_add_path(&buf, "CApath", ssl->CApath, &is_local);
  280|  2.65k|    if(result)
  ------------------
  |  Branch (280:8): [True: 1, False: 2.65k]
  ------------------
  281|      1|      goto out;
  282|  2.65k|    result = cf_ssl_peer_key_add_path(&buf, "CRL", ssl->CRLfile, &is_local);
  283|  2.65k|    if(result)
  ------------------
  |  Branch (283:8): [True: 1, False: 2.64k]
  ------------------
  284|      1|      goto out;
  285|  2.64k|    result = cf_ssl_peer_key_add_path(&buf, "Issuer", ssl->issuercert,
  286|  2.64k|                                      &is_local);
  287|  2.64k|    if(result)
  ------------------
  |  Branch (287:8): [True: 1, False: 2.64k]
  ------------------
  288|      1|      goto out;
  289|  2.64k|    if(ssl->ca_info_blob) {
  ------------------
  |  Branch (289:8): [True: 0, False: 2.64k]
  ------------------
  290|      0|      result = cf_ssl_peer_key_add_hash(&buf, "CAInfoBlob", ssl->ca_info_blob);
  291|      0|      if(result)
  ------------------
  |  Branch (291:10): [True: 0, False: 0]
  ------------------
  292|      0|        goto out;
  293|      0|    }
  294|  2.64k|    if(ssl->issuercert_blob) {
  ------------------
  |  Branch (294:8): [True: 0, False: 2.64k]
  ------------------
  295|      0|      result = cf_ssl_peer_key_add_hash(&buf, "IssuerBlob",
  296|      0|                                        ssl->issuercert_blob);
  297|      0|      if(result)
  ------------------
  |  Branch (297:10): [True: 0, False: 0]
  ------------------
  298|      0|        goto out;
  299|      0|    }
  300|  2.64k|  }
  301|  2.78k|  if(ssl->cert_blob) {
  ------------------
  |  Branch (301:6): [True: 0, False: 2.78k]
  ------------------
  302|      0|    result = cf_ssl_peer_key_add_hash(&buf, "CertBlob", ssl->cert_blob);
  303|      0|    if(result)
  ------------------
  |  Branch (303:8): [True: 0, False: 0]
  ------------------
  304|      0|      goto out;
  305|      0|  }
  306|  2.78k|  if(ssl->pinned_key && ssl->pinned_key[0]) {
  ------------------
  |  Branch (306:6): [True: 4, False: 2.78k]
  |  Branch (306:25): [True: 2, False: 2]
  ------------------
  307|      2|    result = curlx_dyn_addf(&buf, ":Pinned-%s", ssl->pinned_key);
  308|      2|    if(result)
  ------------------
  |  Branch (308:8): [True: 1, False: 1]
  ------------------
  309|      1|      goto out;
  310|      2|  }
  311|       |
  312|  2.78k|  result = cf_ssl_peer_key_add_mtls(&buf, ssl, &is_local);
  313|  2.78k|  if(result)
  ------------------
  |  Branch (313:6): [True: 1, False: 2.78k]
  ------------------
  314|      1|    goto out;
  315|  2.78k|#ifdef USE_TLS_SRP
  316|  2.78k|  if(ssl->username || ssl->password) {
  ------------------
  |  Branch (316:6): [True: 6, False: 2.78k]
  |  Branch (316:23): [True: 5, False: 2.77k]
  ------------------
  317|     11|    result = curlx_dyn_add(&buf, ":SRP-AUTH");
  318|     11|    if(result)
  ------------------
  |  Branch (318:8): [True: 0, False: 11]
  ------------------
  319|      0|      goto out;
  320|     11|  }
  321|  2.78k|#endif
  322|       |
  323|  2.78k|  if(!tls_id || !tls_id[0]) {
  ------------------
  |  Branch (323:6): [True: 0, False: 2.78k]
  |  Branch (323:17): [True: 0, False: 2.78k]
  ------------------
  324|      0|    result = CURLE_FAILED_INIT;
  325|      0|    goto out;
  326|      0|  }
  327|  2.78k|  result = curlx_dyn_addf(&buf, ":IMPL-%s", tls_id);
  328|  2.78k|  if(result)
  ------------------
  |  Branch (328:6): [True: 1, False: 2.78k]
  ------------------
  329|      1|    goto out;
  330|       |
  331|  2.78k|  result = curlx_dyn_addf(&buf, is_local ?
  ------------------
  |  Branch (331:33): [True: 133, False: 2.65k]
  ------------------
  332|  2.65k|                          CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  169|    133|#define CURL_SSLS_LOCAL_SUFFIX     ":L"
  ------------------
                                        CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  170|  2.65k|#define CURL_SSLS_GLOBAL_SUFFIX    ":G"
  ------------------
  333|  2.78k|  if(result)
  ------------------
  |  Branch (333:6): [True: 1, False: 2.78k]
  ------------------
  334|      1|    goto out;
  335|       |
  336|  2.78k|  *ppeer_key = curlx_dyn_take(&buf, &key_len);
  337|       |  /* we added printable char, and dynbuf always null-terminates, no need
  338|       |   * to track length */
  339|       |
  340|  2.79k|out:
  341|  2.79k|  curlx_dyn_free(&buf);
  342|  2.79k|  return result;
  343|  2.78k|}
Curl_ssl_peer_key_make:
  349|  2.79k|{
  350|  2.79k|  struct ssl_primary_config *ssl = Curl_ssl_cf_get_primary_config(cf);
  351|  2.79k|  return Curl_ssl_peer_key_build(ssl, peer, cf->conn->via_peer, tls_id,
  352|  2.79k|                                 ppeer_key);
  353|  2.79k|}
Curl_ssl_session_destroy:
  441|  1.95k|{
  442|  1.95k|  if(s) {
  ------------------
  |  Branch (442:6): [True: 0, False: 1.95k]
  ------------------
  443|       |    /* if in the list, the list destructor takes care of it */
  444|      0|    if(Curl_node_llist(&s->list))
  ------------------
  |  Branch (444:8): [True: 0, False: 0]
  ------------------
  445|      0|      Curl_node_remove(&s->list);
  446|      0|    else {
  447|       |      cf_ssl_scache_session_ldestroy(NULL, s);
  448|      0|    }
  449|      0|  }
  450|  1.95k|}
Curl_ssl_scache_create:
  594|  10.0k|{
  595|  10.0k|  struct Curl_ssl_scache *scache;
  596|  10.0k|  struct Curl_ssl_scache_peer *peers;
  597|  10.0k|  size_t i;
  598|       |
  599|  10.0k|  *pscache = NULL;
  600|  10.0k|  peers = curlx_calloc(max_peers, sizeof(*peers));
  ------------------
  |  | 1480|  10.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  601|  10.0k|  if(!peers)
  ------------------
  |  Branch (601:6): [True: 0, False: 10.0k]
  ------------------
  602|      0|    return CURLE_OUT_OF_MEMORY;
  603|       |
  604|  10.0k|  scache = curlx_calloc(1, sizeof(*scache));
  ------------------
  |  | 1480|  10.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  605|  10.0k|  if(!scache) {
  ------------------
  |  Branch (605:6): [True: 0, False: 10.0k]
  ------------------
  606|      0|    curlx_free(peers);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  607|      0|    return CURLE_OUT_OF_MEMORY;
  608|      0|  }
  609|       |
  610|  10.0k|  scache->magic = CURL_SCACHE_MAGIC;
  ------------------
  |  |   67|  10.0k|#define CURL_SCACHE_MAGIC 0x000e1551
  ------------------
  611|  10.0k|  scache->default_lifetime_secs = (24 * 60 * 60); /* 1 day */
  612|  10.0k|  scache->peer_count = max_peers;
  613|  10.0k|  scache->peers = peers;
  614|  10.0k|  scache->age = 1;
  615|   261k|  for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (615:14): [True: 251k, False: 10.0k]
  ------------------
  616|   251k|    scache->peers[i].max_sessions = max_sessions_per_peer;
  617|   251k|    Curl_llist_init(&scache->peers[i].sessions,
  618|   251k|                    cf_ssl_scache_session_ldestroy);
  619|   251k|  }
  620|       |
  621|  10.0k|  *pscache = scache;
  622|  10.0k|  return CURLE_OK;
  623|  10.0k|}
Curl_ssl_scache_destroy:
  626|  10.0k|{
  627|  10.0k|  if(GOOD_SCACHE(scache)) {
  ------------------
  |  |   69|  10.0k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   67|  10.0k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (69:25): [True: 10.0k, False: 0]
  |  |  |  Branch (69:32): [True: 10.0k, False: 0]
  |  |  ------------------
  ------------------
  628|  10.0k|    size_t i;
  629|  10.0k|    scache->magic = 0;
  630|   261k|    for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (630:16): [True: 251k, False: 10.0k]
  ------------------
  631|   251k|      cf_ssl_scache_clear_peer(&scache->peers[i]);
  632|   251k|    }
  633|  10.0k|    curlx_free(scache->peers);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  634|  10.0k|    curlx_free(scache);
  ------------------
  |  | 1483|  10.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  635|  10.0k|  }
  636|  10.0k|}
Curl_ssl_scache_use:
  639|  1.95k|{
  640|  1.95k|  if(cf_ssl_scache_get(data)) {
  ------------------
  |  Branch (640:6): [True: 1.95k, False: 0]
  ------------------
  641|  1.95k|    struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
  642|  1.95k|    return ssl_config ? ssl_config->primary.cache_session : FALSE;
  ------------------
  |  | 1058|  1.95k|#define FALSE false
  ------------------
  |  Branch (642:12): [True: 1.95k, False: 0]
  ------------------
  643|  1.95k|  }
  644|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  645|  1.95k|}
Curl_ssl_scache_lock:
  649|  1.95k|{
  650|  1.95k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  651|  1.95k|  if(scache) {
  ------------------
  |  Branch (651:6): [True: 1.95k, False: 0]
  ------------------
  652|  1.95k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  1.95k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 1.95k]
  |  |  ------------------
  |  |   86|  1.95k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (86:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  653|      0|      Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION,
  654|      0|                      CURL_LOCK_ACCESS_SINGLE);
  655|  1.95k|    DEBUGASSERT(!scache->is_locked);
  ------------------
  |  | 1081|  1.95k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (655:5): [True: 0, False: 1.95k]
  |  Branch (655:5): [True: 1.95k, False: 0]
  ------------------
  656|  1.95k|    scache->is_locked = TRUE;
  ------------------
  |  | 1055|  1.95k|#define TRUE true
  ------------------
  657|  1.95k|  }
  658|  1.95k|}
Curl_ssl_scache_unlock:
  662|  1.95k|{
  663|  1.95k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  664|  1.95k|  if(scache) {
  ------------------
  |  Branch (664:6): [True: 1.95k, False: 0]
  ------------------
  665|  1.95k|    DEBUGASSERT(scache->is_locked);
  ------------------
  |  | 1081|  1.95k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (665:5): [True: 0, False: 1.95k]
  |  Branch (665:5): [True: 1.95k, False: 0]
  ------------------
  666|  1.95k|    scache->is_locked = FALSE;
  ------------------
  |  | 1058|  1.95k|#define FALSE false
  ------------------
  667|  1.95k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  1.95k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 1.95k]
  |  |  ------------------
  |  |   86|  1.95k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (86:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  668|      0|      Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
  669|  1.95k|  }
  670|  1.95k|}
Curl_ssl_scache_return:
  945|  1.95k|{
  946|       |  /* See RFC 8446 C.4:
  947|       |   * "Clients SHOULD NOT reuse a ticket for multiple connections." */
  948|  1.95k|  if(s && s->ietf_tls_id < 0x304)
  ------------------
  |  Branch (948:6): [True: 0, False: 1.95k]
  |  Branch (948:11): [True: 0, False: 0]
  ------------------
  949|      0|    (void)Curl_ssl_scache_put(cf, data, ssl_peer_key, s);
  950|  1.95k|  else
  951|  1.95k|    Curl_ssl_session_destroy(s);
  952|  1.95k|}
Curl_ssl_scache_take:
  958|  1.95k|{
  959|  1.95k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  960|  1.95k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
  961|  1.95k|  struct Curl_ssl_scache_peer *peer = NULL;
  962|  1.95k|  struct Curl_llist_node *n;
  963|  1.95k|  struct Curl_ssl_session *s = NULL;
  964|  1.95k|  CURLcode result;
  965|       |
  966|  1.95k|  *ps = NULL;
  967|  1.95k|  if(!scache)
  ------------------
  |  Branch (967:6): [True: 0, False: 1.95k]
  ------------------
  968|      0|    return CURLE_OK;
  969|       |
  970|  1.95k|  Curl_ssl_scache_lock(data);
  971|  1.95k|  result = cf_ssl_find_peer_by_key(data, scache, ssl_peer_key, conn_config,
  972|  1.95k|                                   &peer);
  973|  1.95k|  if(!result && peer) {
  ------------------
  |  Branch (973:6): [True: 1.95k, False: 0]
  |  Branch (973:17): [True: 0, False: 1.95k]
  ------------------
  974|      0|    cf_scache_peer_remove_expired(peer, (curl_off_t)time(NULL));
  975|      0|    n = Curl_llist_head(&peer->sessions);
  976|      0|    if(n) {
  ------------------
  |  Branch (976:8): [True: 0, False: 0]
  ------------------
  977|      0|      s = Curl_node_take_elem(n);
  978|      0|      (scache->age)++;            /* increase general age */
  979|      0|      peer->age = scache->age; /* set this as used in this age */
  980|      0|    }
  981|      0|  }
  982|  1.95k|  if(s) {
  ------------------
  |  Branch (982:6): [True: 0, False: 1.95k]
  ------------------
  983|      0|    *ps = s;
  984|      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)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  985|      0|                  "alpn=%s, earlydata=%zu, quic_tp=%s], %zu sessions remain",
  986|      0|                  ssl_peer_key, s->ietf_tls_id, s->alpn,
  987|      0|                  s->earlydata_max, s->quic_tp ? "yes" : "no",
  988|      0|                  Curl_llist_count(&peer->sessions));
  989|      0|  }
  990|  1.95k|  else {
  991|  1.95k|    CURL_TRC_SSLS(data, "no cached session for %s", ssl_peer_key);
  ------------------
  |  |  194|  1.95k|  do {                                                    \
  |  |  195|  1.95k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  1.95k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.90k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.95k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.90k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.95k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  1.95k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  1.95k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 1.95k]
  |  |  ------------------
  ------------------
  992|  1.95k|  }
  993|  1.95k|  Curl_ssl_scache_unlock(data);
  994|  1.95k|  return result;
  995|  1.95k|}
vtls_scache.c:cf_ssl_peer_key_add_path:
   75|  10.6k|{
   76|  10.6k|  if(path && path[0]) {
  ------------------
  |  Branch (76:6): [True: 7.68k, False: 2.93k]
  |  Branch (76:14): [True: 7.57k, False: 107]
  ------------------
   77|       |    /* We try to add absolute paths, so that the session key can stay valid
   78|       |     * when used in another process with different CWD. When a path does not
   79|       |     * exist, this does not work. Then, we add the path as is. */
   80|       |#ifdef _WIN32
   81|       |    char abspath[_MAX_PATH];
   82|       |    if(_fullpath(abspath, path, _MAX_PATH))
   83|       |      return curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   84|       |    *is_local = TRUE;
   85|       |#elif defined(HAVE_REALPATH)
   86|  7.57k|    if(path[0] != '/') {
  ------------------
  |  Branch (86:8): [True: 149, False: 7.42k]
  ------------------
   87|    149|      char *abspath = realpath(path, NULL);
   88|    149|      if(abspath) {
  ------------------
  |  Branch (88:10): [True: 11, False: 138]
  ------------------
   89|     11|        CURLcode result = curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   90|       |        /* !checksrc! disable BANNEDFUNC 1 */
   91|     11|        free(abspath); /* allocated by libc, free without memdebug */
   92|     11|        return result;
   93|     11|      }
   94|    138|      *is_local = TRUE;
  ------------------
  |  | 1055|    138|#define TRUE true
  ------------------
   95|    138|    }
   96|  7.56k|#endif
   97|  7.56k|    return curlx_dyn_addf(buf, ":%s-%s", name, path);
   98|  7.57k|  }
   99|  3.03k|  return CURLE_OK;
  100|  10.6k|}
vtls_scache.c:cf_ssl_peer_key_add_mtls:
  130|  2.78k|{
  131|  2.78k|  CURLcode result = CURLE_OK;
  132|  2.78k|  if(ssl->clientcert && ssl->clientcert[0]) {
  ------------------
  |  Branch (132:6): [True: 10, False: 2.77k]
  |  Branch (132:25): [True: 7, False: 3]
  ------------------
  133|      7|    result = cf_ssl_peer_key_add_path(buf, "CCERT", ssl->clientcert, is_local);
  134|      7|    if(result)
  ------------------
  |  Branch (134:8): [True: 1, False: 6]
  ------------------
  135|      1|      goto out;
  136|      7|  }
  137|  2.78k|  if(ssl->key && ssl->key[0]) {
  ------------------
  |  Branch (137:6): [True: 5, False: 2.78k]
  |  Branch (137:18): [True: 3, False: 2]
  ------------------
  138|      3|    result = cf_ssl_peer_key_add_path(buf, "KEY", ssl->key, is_local);
  139|      3|    if(result)
  ------------------
  |  Branch (139:8): [True: 0, False: 3]
  ------------------
  140|      0|      goto out;
  141|      3|  }
  142|  2.78k|  if(ssl->key_blob) {
  ------------------
  |  Branch (142:6): [True: 0, False: 2.78k]
  ------------------
  143|      0|    result = cf_ssl_peer_key_add_hash(buf, "KEYBlob", ssl->key_blob);
  144|      0|    if(result)
  ------------------
  |  Branch (144:8): [True: 0, False: 0]
  ------------------
  145|      0|      goto out;
  146|      0|  }
  147|  2.78k|  if(ssl->cert_type && ssl->cert_type[0]) {
  ------------------
  |  Branch (147:6): [True: 11, False: 2.77k]
  |  Branch (147:24): [True: 9, False: 2]
  ------------------
  148|      9|    size_t i;
  149|      9|    result = curlx_dyn_add(buf, ":CT-");
  150|    218|    for(i = 0; !result && ssl->cert_type[i]; i++) {
  ------------------
  |  Branch (150:16): [True: 218, False: 0]
  |  Branch (150:27): [True: 209, False: 9]
  ------------------
  151|    209|      char c = Curl_raw_toupper(ssl->cert_type[i]);
  152|    209|      result = curlx_dyn_addn(buf, &c, 1);
  153|    209|    }
  154|      9|    if(result)
  ------------------
  |  Branch (154:8): [True: 0, False: 9]
  ------------------
  155|      0|      goto out;
  156|      9|  }
  157|  2.78k|  if(ssl->key_type && ssl->key_type[0]) {
  ------------------
  |  Branch (157:6): [True: 16, False: 2.77k]
  |  Branch (157:23): [True: 14, False: 2]
  ------------------
  158|     14|    size_t i;
  159|     14|    result = curlx_dyn_add(buf, ":KT-");
  160|  1.17k|    for(i = 0; !result && ssl->key_type[i]; i++) {
  ------------------
  |  Branch (160:16): [True: 1.17k, False: 0]
  |  Branch (160:27): [True: 1.15k, False: 14]
  ------------------
  161|  1.15k|      char c = Curl_raw_toupper(ssl->key_type[i]);
  162|  1.15k|      result = curlx_dyn_addn(buf, &c, 1);
  163|  1.15k|    }
  164|     14|  }
  165|  2.78k|out:
  166|  2.78k|  return result;
  167|  2.78k|}
vtls_scache.c:cf_ssl_scache_clear_peer:
  453|   251k|{
  454|   251k|  Curl_llist_destroy(&peer->sessions, NULL);
  455|   251k|  if(peer->sobj) {
  ------------------
  |  Branch (455:6): [True: 0, False: 251k]
  ------------------
  456|      0|    DEBUGASSERT(peer->sobj_free);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (456:5): [True: 0, False: 0]
  |  Branch (456:5): [True: 0, False: 0]
  ------------------
  457|      0|    if(peer->sobj_free)
  ------------------
  |  Branch (457:8): [True: 0, False: 0]
  ------------------
  458|      0|      peer->sobj_free(peer->sobj);
  459|      0|    peer->sobj = NULL;
  460|      0|  }
  461|   251k|  peer->sobj_free = NULL;
  462|   251k|  curlx_safefree(peer->clientcert);
  ------------------
  |  | 1327|   251k|  do {                      \
  |  | 1328|   251k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   251k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   251k|    (ptr) = NULL;           \
  |  | 1330|   251k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  463|   251k|  curlx_safefree(peer->key_passwd);
  ------------------
  |  | 1327|   251k|  do {                      \
  |  | 1328|   251k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   251k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   251k|    (ptr) = NULL;           \
  |  | 1330|   251k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  464|   251k|#ifdef USE_TLS_SRP
  465|   251k|  curlx_safefree(peer->srp_username);
  ------------------
  |  | 1327|   251k|  do {                      \
  |  | 1328|   251k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   251k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   251k|    (ptr) = NULL;           \
  |  | 1330|   251k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  466|   251k|  curlx_safefree(peer->srp_password);
  ------------------
  |  | 1327|   251k|  do {                      \
  |  | 1328|   251k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   251k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   251k|    (ptr) = NULL;           \
  |  | 1330|   251k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  467|   251k|#endif
  468|   251k|  curlx_safefree(peer->ssl_peer_key);
  ------------------
  |  | 1327|   251k|  do {                      \
  |  | 1328|   251k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   251k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   251k|    (ptr) = NULL;           \
  |  | 1330|   251k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  469|   251k|  peer->age = 0;
  470|       |  peer->hmac_set = FALSE;
  ------------------
  |  | 1058|   251k|#define FALSE false
  ------------------
  471|   251k|}
vtls_scache.c:cf_ssl_scache_get:
  365|  7.81k|{
  366|  7.81k|  struct Curl_ssl_scache *scache = NULL;
  367|       |  /* If a share is present, its ssl_scache has preference over the multi */
  368|  7.81k|  if(data->share && data->share->ssl_scache)
  ------------------
  |  Branch (368:6): [True: 0, False: 7.81k]
  |  Branch (368:21): [True: 0, False: 0]
  ------------------
  369|      0|    scache = data->share->ssl_scache;
  370|  7.81k|  else if(data->multi && data->multi->ssl_scache)
  ------------------
  |  Branch (370:11): [True: 7.81k, False: 0]
  |  Branch (370:26): [True: 7.81k, False: 0]
  ------------------
  371|  7.81k|    scache = data->multi->ssl_scache;
  372|  7.81k|  if(scache && !GOOD_SCACHE(scache)) {
  ------------------
  |  |   69|  7.81k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   67|  7.81k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (69:25): [True: 7.81k, False: 0]
  |  |  |  Branch (69:32): [True: 7.81k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (372:6): [True: 7.81k, False: 0]
  ------------------
  373|      0|    failf(data, "transfer would use an invalid scache at %p, denied",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  374|      0|          (void *)scache);
  375|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (375:5): [Folded, False: 0]
  |  Branch (375:5): [Folded, False: 0]
  ------------------
  376|      0|    return NULL;
  377|      0|  }
  378|  7.81k|  return scache;
  379|  7.81k|}
vtls_scache.c:cf_ssl_find_peer_by_key:
  701|  1.95k|{
  702|  1.95k|  size_t i, peer_key_len = 0;
  703|  1.95k|  CURLcode result = CURLE_OK;
  704|       |
  705|  1.95k|  *ppeer = NULL;
  706|  1.95k|  if(!GOOD_SCACHE(scache)) {
  ------------------
  |  |   69|  1.95k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   67|  1.95k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (69:25): [True: 1.95k, False: 0]
  |  |  |  Branch (69:32): [True: 1.95k, False: 0]
  |  |  ------------------
  ------------------
  707|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  708|      0|  }
  709|       |
  710|  1.95k|  CURL_TRC_SSLS(data, "find peer slot for %s among %zu slots",
  ------------------
  |  |  194|  1.95k|  do {                                                    \
  |  |  195|  1.95k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  1.95k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.90k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.95k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.90k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.95k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  1.95k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  1.95k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 1.95k]
  |  |  ------------------
  ------------------
  711|  1.95k|                ssl_peer_key, scache->peer_count);
  712|       |
  713|       |  /* check for entries with known peer_key */
  714|  50.8k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (714:14): [True: 50.8k, False: 0]
  |  Branch (714:24): [True: 48.8k, False: 1.95k]
  ------------------
  715|  48.8k|    if(scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (715:8): [True: 0, False: 48.8k]
  ------------------
  716|      0|       curl_strequal(ssl_peer_key, scache->peers[i].ssl_peer_key) &&
  ------------------
  |  Branch (716:8): [True: 0, False: 0]
  ------------------
  717|      0|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (717:8): [True: 0, False: 0]
  ------------------
  718|       |      /* yes, we have a cached session for this! */
  719|      0|      *ppeer = &scache->peers[i];
  720|      0|      goto out;
  721|      0|    }
  722|  48.8k|  }
  723|       |  /* check for entries with HMAC set but no known peer_key */
  724|  50.8k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (724:14): [True: 50.8k, False: 0]
  |  Branch (724:24): [True: 48.8k, False: 1.95k]
  ------------------
  725|  48.8k|    if(!scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (725:8): [True: 48.8k, False: 0]
  ------------------
  726|  48.8k|       scache->peers[i].hmac_set &&
  ------------------
  |  Branch (726:8): [True: 0, False: 48.8k]
  ------------------
  727|      0|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (727:8): [True: 0, False: 0]
  ------------------
  728|       |      /* possible entry with unknown peer_key, check hmac */
  729|      0|      unsigned char my_hmac[CURL_SHA256_DIGEST_LENGTH];
  730|      0|      if(!peer_key_len) /* we are lazy */
  ------------------
  |  Branch (730:10): [True: 0, False: 0]
  ------------------
  731|      0|        peer_key_len = strlen(ssl_peer_key);
  732|      0|      result = Curl_hmacit(&Curl_HMAC_SHA256,
  733|      0|                           scache->peers[i].key_salt,
  734|      0|                           sizeof(scache->peers[i].key_salt),
  735|      0|                           (const unsigned char *)ssl_peer_key,
  736|      0|                           peer_key_len,
  737|      0|                           my_hmac);
  738|      0|      if(result)
  ------------------
  |  Branch (738:10): [True: 0, False: 0]
  ------------------
  739|      0|        goto out;
  740|      0|      if(!memcmp(scache->peers[i].key_hmac, my_hmac, sizeof(my_hmac))) {
  ------------------
  |  Branch (740:10): [True: 0, False: 0]
  ------------------
  741|       |        /* remember peer_key for future lookups */
  742|      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)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|      0|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  743|      0|                      i, ssl_peer_key);
  744|      0|        scache->peers[i].ssl_peer_key = curlx_strdup(ssl_peer_key);
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  745|      0|        if(!scache->peers[i].ssl_peer_key) {
  ------------------
  |  Branch (745:12): [True: 0, False: 0]
  ------------------
  746|      0|          result = CURLE_OUT_OF_MEMORY;
  747|      0|          goto out;
  748|      0|        }
  749|      0|        cf_ssl_cache_peer_update(&scache->peers[i]);
  750|      0|        *ppeer = &scache->peers[i];
  751|      0|        goto out;
  752|      0|      }
  753|      0|    }
  754|  48.8k|  }
  755|  1.95k|  CURL_TRC_SSLS(data, "peer not found for %s", ssl_peer_key);
  ------------------
  |  |  194|  1.95k|  do {                                                    \
  |  |  195|  1.95k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  1.95k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.90k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.95k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.90k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.95k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  1.95k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  1.95k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 1.95k]
  |  |  ------------------
  ------------------
  756|  1.95k|out:
  757|  1.95k|  return result;
  758|  1.95k|}

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|    266|    while (insize > 0)
  ------------------
  |  Branch (401:12): [True: 266, False: 0]
  ------------------
  402|    266|      {
  403|    266|        char *outptr = result + length;
  404|    266|        size_t outsize = allocated - extra_alloc - length;
  405|    266|        bool incremented;
  406|    266|        size_t res;
  407|    266|        bool grow;
  408|       |
  409|    266|        if (offsets != NULL)
  ------------------
  |  Branch (409:13): [True: 0, False: 266]
  ------------------
  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|    266|        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|    266|          res = iconv_carefully (cd,
  ------------------
  |  |  201|    266|     (*(incremented) = false, \
  |  |  202|    266|      iconv (cd, (ICONV_CONST char **) (inbuf), inbytesleft, outbuf, outbytesleft))
  ------------------
  429|    266|                                 &inptr, &insize,
  430|    266|                                 &outptr, &outsize,
  431|    266|                                 &incremented);
  432|       |
  433|    266|        length = outptr - result;
  434|    266|        grow = (length + extra_alloc > allocated / 2);
  435|    266|        if (res == (size_t)(-1))
  ------------------
  |  Branch (435:13): [True: 266, False: 0]
  ------------------
  436|    266|          {
  437|    266|            if (errno == E2BIG)
  ------------------
  |  Branch (437:17): [True: 20, False: 246]
  ------------------
  438|     20|              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|    266|          }
  508|     20|        if (insize == 0)
  ------------------
  |  Branch (508:13): [True: 0, False: 20]
  ------------------
  509|      0|          break;
  510|     20|        if (grow)
  ------------------
  |  Branch (510:13): [True: 20, False: 0]
  ------------------
  511|     20|          {
  512|     20|            char *memory;
  513|       |
  514|     20|            allocated = 2 * allocated;
  515|     20|            if (result == initial_result)
  ------------------
  |  Branch (515:17): [True: 10, False: 10]
  ------------------
  516|     10|              memory = (char *) malloc (allocated);
  517|     10|            else
  518|     10|              memory = (char *) realloc (result, allocated);
  519|     20|            if (memory == NULL)
  ------------------
  |  Branch (519:17): [True: 0, False: 20]
  ------------------
  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|     20|            if (result == initial_result)
  ------------------
  |  Branch (526:17): [True: 10, False: 10]
  ------------------
  527|     10|              memcpy (memory, initial_result, length);
  528|     20|            result = memory;
  529|     20|          }
  530|     20|      }
  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|  1.14M|{
   20|  1.14M|    size_t bytes;
   21|       |
   22|  1.14M|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|  1.14M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.14M]
  |  |  ------------------
  ------------------
   23|      0|        return NULL;
   24|       |
   25|  1.14M|    return CRYPTO_malloc(bytes, file, line);
   26|  1.14M|}
CRYPTO_calloc:
   29|  20.5M|{
   30|  20.5M|    size_t bytes;
   31|       |
   32|  20.5M|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|  20.5M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 20.5M]
  |  |  ------------------
  ------------------
   33|      0|        return NULL;
   34|       |
   35|  20.5M|    return CRYPTO_zalloc(bytes, file, line);
   36|  20.5M|}
CRYPTO_aligned_alloc_array:
   40|  1.57k|{
   41|  1.57k|    size_t bytes;
   42|       |
   43|  1.57k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line))) {
  ------------------
  |  |   23|  1.57k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.57k]
  |  |  ------------------
  ------------------
   44|      0|        *freeptr = NULL;
   45|       |
   46|      0|        return NULL;
   47|      0|    }
   48|       |
   49|  1.57k|    return CRYPTO_aligned_alloc(bytes, align, freeptr, file, line);
   50|  1.57k|}
CRYPTO_realloc_array:
   54|   654k|{
   55|   654k|    size_t bytes;
   56|       |
   57|   654k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|   654k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 654k]
  |  |  ------------------
  ------------------
   58|      0|        return NULL;
   59|       |
   60|   654k|    return CRYPTO_realloc(addr, bytes, file, line);
   61|   654k|}
CRYPTO_secure_calloc:
   87|  12.3k|{
   88|  12.3k|    size_t bytes;
   89|       |
   90|  12.3k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|  12.3k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.3k]
  |  |  ------------------
  ------------------
   91|      0|        return NULL;
   92|       |
   93|  12.3k|    return CRYPTO_secure_zalloc(bytes, file, line);
   94|  12.3k|}

ossl_i2c_ASN1_BIT_STRING:
   22|  1.51M|{
   23|  1.51M|    int ret, j, bits, len;
   24|  1.51M|    unsigned char *p, *d;
   25|       |
   26|  1.51M|    if (a == NULL)
  ------------------
  |  Branch (26:9): [True: 0, False: 1.51M]
  ------------------
   27|      0|        return 0;
   28|       |
   29|  1.51M|    len = a->length;
   30|       |
   31|  1.51M|    if (len > 0) {
  ------------------
  |  Branch (31:9): [True: 1.51M, False: 0]
  ------------------
   32|  1.51M|        if (a->flags & ASN1_STRING_FLAG_BITS_LEFT) {
  ------------------
  |  |  164|  1.51M|#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
  ------------------
  |  Branch (32:13): [True: 1.51M, False: 0]
  ------------------
   33|  1.51M|            bits = (int)a->flags & 0x07;
   34|  1.51M|        } else {
   35|      0|            for (; len > 0; len--) {
  ------------------
  |  Branch (35:20): [True: 0, False: 0]
  ------------------
   36|      0|                if (a->data[len - 1])
  ------------------
  |  Branch (36:21): [True: 0, False: 0]
  ------------------
   37|      0|                    break;
   38|      0|            }
   39|       |
   40|      0|            if (len == 0) {
  ------------------
  |  Branch (40:17): [True: 0, False: 0]
  ------------------
   41|      0|                bits = 0;
   42|      0|            } else {
   43|      0|                j = a->data[len - 1];
   44|      0|                if (j & 0x01)
  ------------------
  |  Branch (44:21): [True: 0, False: 0]
  ------------------
   45|      0|                    bits = 0;
   46|      0|                else if (j & 0x02)
  ------------------
  |  Branch (46:26): [True: 0, False: 0]
  ------------------
   47|      0|                    bits = 1;
   48|      0|                else if (j & 0x04)
  ------------------
  |  Branch (48:26): [True: 0, False: 0]
  ------------------
   49|      0|                    bits = 2;
   50|      0|                else if (j & 0x08)
  ------------------
  |  Branch (50:26): [True: 0, False: 0]
  ------------------
   51|      0|                    bits = 3;
   52|      0|                else if (j & 0x10)
  ------------------
  |  Branch (52:26): [True: 0, False: 0]
  ------------------
   53|      0|                    bits = 4;
   54|      0|                else if (j & 0x20)
  ------------------
  |  Branch (54:26): [True: 0, False: 0]
  ------------------
   55|      0|                    bits = 5;
   56|      0|                else if (j & 0x40)
  ------------------
  |  Branch (56:26): [True: 0, False: 0]
  ------------------
   57|      0|                    bits = 6;
   58|      0|                else if (j & 0x80)
  ------------------
  |  Branch (58:26): [True: 0, False: 0]
  ------------------
   59|      0|                    bits = 7;
   60|      0|                else
   61|      0|                    bits = 0; /* should not happen */
   62|      0|            }
   63|      0|        }
   64|  1.51M|    } else
   65|      0|        bits = 0;
   66|       |
   67|  1.51M|    ret = 1 + len;
   68|  1.51M|    if (pp == NULL)
  ------------------
  |  Branch (68:9): [True: 1.13M, False: 378k]
  ------------------
   69|  1.13M|        return ret;
   70|       |
   71|   378k|    p = *pp;
   72|       |
   73|   378k|    *(p++) = (unsigned char)bits;
   74|   378k|    d = a->data;
   75|   378k|    if (len > 0) {
  ------------------
  |  Branch (75:9): [True: 378k, False: 0]
  ------------------
   76|   378k|        memcpy(p, d, len);
   77|   378k|        p += len;
   78|   378k|        p[-1] &= (0xff << bits);
   79|   378k|    }
   80|   378k|    *pp = p;
   81|   378k|    return ret;
   82|  1.51M|}
ossl_c2i_ASN1_BIT_STRING:
   86|  2.11M|{
   87|  2.11M|    ASN1_BIT_STRING *ret = NULL;
   88|  2.11M|    const unsigned char *p;
   89|  2.11M|    unsigned char *s;
   90|  2.11M|    int i = 0;
   91|       |
   92|  2.11M|    if (len < 1) {
  ------------------
  |  Branch (92:9): [True: 0, False: 2.11M]
  ------------------
   93|      0|        i = ASN1_R_STRING_TOO_SHORT;
  ------------------
  |  |  114|      0|#define ASN1_R_STRING_TOO_SHORT 152
  ------------------
   94|      0|        goto err;
   95|      0|    }
   96|       |
   97|  2.11M|    if (len > INT_MAX) {
  ------------------
  |  Branch (97:9): [True: 0, False: 2.11M]
  ------------------
   98|      0|        i = ASN1_R_STRING_TOO_LONG;
  ------------------
  |  |  113|      0|#define ASN1_R_STRING_TOO_LONG 151
  ------------------
   99|      0|        goto err;
  100|      0|    }
  101|       |
  102|  2.11M|    if ((a == NULL) || ((*a) == NULL)) {
  ------------------
  |  Branch (102:9): [True: 0, False: 2.11M]
  |  Branch (102:24): [True: 809k, False: 1.30M]
  ------------------
  103|   809k|        if ((ret = ASN1_BIT_STRING_new()) == NULL)
  ------------------
  |  Branch (103:13): [True: 0, False: 809k]
  ------------------
  104|      0|            return NULL;
  105|   809k|    } else
  106|  1.30M|        ret = (*a);
  107|       |
  108|  2.11M|    p = *pp;
  109|  2.11M|    i = *(p++);
  110|  2.11M|    if (i > 7) {
  ------------------
  |  Branch (110:9): [True: 0, False: 2.11M]
  ------------------
  111|      0|        i = ASN1_R_INVALID_BIT_STRING_BITS_LEFT;
  ------------------
  |  |   70|      0|#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220
  ------------------
  112|      0|        goto err;
  113|      0|    }
  114|       |    /*
  115|       |     * We do this to preserve the settings.  If we modify the settings, via
  116|       |     * the _set_bit function, we will recalculate on output
  117|       |     */
  118|  2.11M|    ossl_asn1_string_set_bits_left(ret, i);
  119|       |
  120|  2.11M|    if (len-- > 1) { /* using one because of the bits left byte */
  ------------------
  |  Branch (120:9): [True: 2.11M, False: 0]
  ------------------
  121|  2.11M|        s = OPENSSL_malloc((int)len);
  ------------------
  |  |  106|  2.11M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  122|  2.11M|        if (s == NULL) {
  ------------------
  |  Branch (122:13): [True: 0, False: 2.11M]
  ------------------
  123|      0|            goto err;
  124|      0|        }
  125|  2.11M|        memcpy(s, p, (int)len);
  126|  2.11M|        s[len - 1] &= (0xff << i);
  127|  2.11M|        p += len;
  128|  2.11M|    } else
  129|      0|        s = NULL;
  130|       |
  131|  2.11M|    ASN1_STRING_set0(ret, s, (int)len);
  132|  2.11M|    ret->type = V_ASN1_BIT_STRING;
  ------------------
  |  |   67|  2.11M|#define V_ASN1_BIT_STRING 3
  ------------------
  133|  2.11M|    if (a != NULL)
  ------------------
  |  Branch (133:9): [True: 2.11M, False: 0]
  ------------------
  134|  2.11M|        (*a) = ret;
  135|  2.11M|    *pp = p;
  136|  2.11M|    return ret;
  137|      0|err:
  138|      0|    if (i != 0)
  ------------------
  |  Branch (138:9): [True: 0, False: 0]
  ------------------
  139|      0|        ERR_raise(ERR_LIB_ASN1, i);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  140|      0|    if ((a == NULL) || (*a != ret))
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  |  Branch (140:24): [True: 0, False: 0]
  ------------------
  141|      0|        ASN1_BIT_STRING_free(ret);
  142|       |    return NULL;
  143|  2.11M|}

asn1_d2i_read_bio:
  110|   871k|{
  111|   871k|    BUF_MEM *b;
  112|   871k|    unsigned char *p;
  113|   871k|    size_t want = HEADER_SIZE;
  ------------------
  |  |  107|   871k|#define HEADER_SIZE 8
  ------------------
  114|   871k|    uint32_t eos = 0;
  115|   871k|    size_t off = 0;
  116|   871k|    size_t len = 0;
  117|   871k|    size_t diff;
  118|       |
  119|   871k|    const unsigned char *q;
  120|   871k|    long slen;
  121|   871k|    int inf, tag, xclass;
  122|       |
  123|   871k|    b = BUF_MEM_new();
  124|   871k|    if (b == NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 871k]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return -1;
  127|      0|    }
  128|       |
  129|   871k|    ERR_set_mark();
  130|   871k|    for (;;) {
  131|   871k|        diff = len - off;
  132|   871k|        if (want >= diff) {
  ------------------
  |  Branch (132:13): [True: 871k, False: 0]
  ------------------
  133|   871k|            int i;
  134|       |
  135|   871k|            want -= diff;
  136|       |
  137|   871k|            if (len + want < len || !BUF_MEM_grow_clean(b, len + want)) {
  ------------------
  |  Branch (137:17): [True: 0, False: 871k]
  |  Branch (137:37): [True: 0, False: 871k]
  ------------------
  138|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  139|      0|                goto err;
  140|      0|            }
  141|   871k|            i = BIO_read(in, &(b->data[len]), (int)want);
  142|   871k|            if (i < 0 && diff == 0) {
  ------------------
  |  Branch (142:17): [True: 0, False: 871k]
  |  Branch (142:26): [True: 0, False: 0]
  ------------------
  143|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  144|      0|                goto err;
  145|      0|            }
  146|   871k|            if (i > 0) {
  ------------------
  |  Branch (146:17): [True: 871k, False: 0]
  ------------------
  147|   871k|                if (len + i < len) {
  ------------------
  |  Branch (147:21): [True: 0, False: 871k]
  ------------------
  148|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  149|      0|                    goto err;
  150|      0|                }
  151|   871k|                len += i;
  152|   871k|                if ((size_t)i < want)
  ------------------
  |  Branch (152:21): [True: 0, False: 871k]
  ------------------
  153|      0|                    continue;
  154|   871k|            }
  155|   871k|        }
  156|       |        /* else data already loaded */
  157|       |
  158|   871k|        p = (unsigned char *)&(b->data[off]);
  159|   871k|        q = p;
  160|   871k|        diff = len - off;
  161|   871k|        if (diff == 0)
  ------------------
  |  Branch (161:13): [True: 0, False: 871k]
  ------------------
  162|      0|            goto err;
  163|   871k|        inf = ASN1_get_object(&q, &slen, &tag, &xclass, (int)diff);
  164|   871k|        if (inf & 0x80) {
  ------------------
  |  Branch (164:13): [True: 871k, False: 0]
  ------------------
  165|   871k|            unsigned long e;
  166|       |
  167|   871k|            e = ERR_GET_REASON(ERR_peek_last_error());
  168|   871k|            if (e != ASN1_R_TOO_LONG)
  ------------------
  |  |  118|   871k|#define ASN1_R_TOO_LONG 155
  ------------------
  |  Branch (168:17): [True: 0, False: 871k]
  ------------------
  169|      0|                goto err;
  170|   871k|            ERR_pop_to_mark();
  171|   871k|            ERR_set_mark();
  172|   871k|        }
  173|   871k|        off += q - p; /* end of data */
  174|       |
  175|   871k|        if (inf & 1) {
  ------------------
  |  Branch (175:13): [True: 0, False: 871k]
  ------------------
  176|       |            /* no data body so go round again */
  177|      0|            if (eos == UINT32_MAX) {
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|                goto err;
  180|      0|            }
  181|      0|            eos++;
  182|      0|            want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 8
  ------------------
  183|   871k|        } else if (eos && (slen == 0) && (tag == V_ASN1_EOC)) {
  ------------------
  |  |   64|      0|#define V_ASN1_EOC 0
  ------------------
  |  Branch (183:20): [True: 0, False: 871k]
  |  Branch (183:27): [True: 0, False: 0]
  |  Branch (183:42): [True: 0, False: 0]
  ------------------
  184|       |            /* eos value, so go back and read another header */
  185|      0|            eos--;
  186|      0|            if (eos == 0)
  ------------------
  |  Branch (186:17): [True: 0, False: 0]
  ------------------
  187|      0|                break;
  188|      0|            else
  189|      0|                want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 8
  ------------------
  190|   871k|        } else {
  191|       |            /* suck in slen bytes of data */
  192|   871k|            want = slen;
  193|   871k|            if (want > (len - off)) {
  ------------------
  |  Branch (193:17): [True: 871k, False: 0]
  ------------------
  194|   871k|                size_t chunk_max = ASN1_CHUNK_INITIAL_SIZE;
  ------------------
  |  |  108|   871k|#define ASN1_CHUNK_INITIAL_SIZE (16 * 1024)
  ------------------
  195|       |
  196|   871k|                want -= (len - off);
  197|   871k|                if (want > INT_MAX /* BIO_read takes an int length */ || len + want < len) {
  ------------------
  |  Branch (197:21): [True: 0, False: 871k]
  |  Branch (197:74): [True: 0, False: 871k]
  ------------------
  198|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  199|      0|                    goto err;
  200|      0|                }
  201|  1.74M|                while (want > 0) {
  ------------------
  |  Branch (201:24): [True: 871k, False: 871k]
  ------------------
  202|       |                    /*
  203|       |                     * Read content in chunks of increasing size
  204|       |                     * so we can return an error for EOF without
  205|       |                     * having to allocate the entire content length
  206|       |                     * in one go.
  207|       |                     */
  208|   871k|                    size_t chunk = want > chunk_max ? chunk_max : want;
  ------------------
  |  Branch (208:36): [True: 0, False: 871k]
  ------------------
  209|   871k|                    int i;
  210|       |
  211|   871k|                    if (!BUF_MEM_grow_clean(b, len + chunk)) {
  ------------------
  |  Branch (211:25): [True: 0, False: 871k]
  ------------------
  212|      0|                        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|                        goto err;
  214|      0|                    }
  215|   871k|                    want -= chunk;
  216|  1.74M|                    while (chunk > 0) {
  ------------------
  |  Branch (216:28): [True: 871k, False: 871k]
  ------------------
  217|   871k|                        i = BIO_read(in, &(b->data[len]), (int)chunk);
  218|   871k|                        if (i <= 0) {
  ------------------
  |  Branch (218:29): [True: 0, False: 871k]
  ------------------
  219|      0|                            ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  220|      0|                            goto err;
  221|      0|                        }
  222|       |                        /*
  223|       |                         * This can't overflow because |len+want| didn't
  224|       |                         * overflow.
  225|       |                         */
  226|   871k|                        len += i;
  227|   871k|                        chunk -= i;
  228|   871k|                    }
  229|   871k|                    if (chunk_max < INT_MAX / 2)
  ------------------
  |  Branch (229:25): [True: 871k, False: 0]
  ------------------
  230|   871k|                        chunk_max *= 2;
  231|   871k|                }
  232|   871k|            }
  233|   871k|            if (off + slen < off) {
  ------------------
  |  Branch (233:17): [True: 0, False: 871k]
  ------------------
  234|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  235|      0|                goto err;
  236|      0|            }
  237|   871k|            off += slen;
  238|   871k|            if (eos == 0) {
  ------------------
  |  Branch (238:17): [True: 871k, False: 0]
  ------------------
  239|   871k|                break;
  240|   871k|            } else
  241|      0|                want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 8
  ------------------
  242|   871k|        }
  243|   871k|    }
  244|       |
  245|   871k|    if (off > INT_MAX) {
  ------------------
  |  Branch (245:9): [True: 0, False: 871k]
  ------------------
  246|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  247|      0|        goto err;
  248|      0|    }
  249|       |
  250|   871k|    *pb = b;
  251|   871k|    ERR_clear_last_mark();
  252|   871k|    return (int)off;
  253|      0|err:
  254|      0|    ERR_clear_last_mark();
  255|      0|    BUF_MEM_free(b);
  256|      0|    return -1;
  257|   871k|}

ossl_asn1_item_digest_ex:
   57|   378k|{
   58|   378k|    int i, ret = 0;
   59|   378k|    unsigned char *str = NULL;
   60|   378k|    EVP_MD *fetched_md = (EVP_MD *)md;
   61|       |
   62|   378k|    i = ASN1_item_i2d(asn, &str, it);
   63|   378k|    if (i < 0 || str == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 378k]
  |  Branch (63:18): [True: 0, False: 378k]
  ------------------
   64|      0|        return 0;
   65|       |
   66|   378k|    if (EVP_MD_get0_provider(md) == NULL) {
  ------------------
  |  Branch (66:9): [True: 378k, False: 0]
  ------------------
   67|   378k|#if !defined(OPENSSL_NO_ENGINE)
   68|   378k|        ENGINE *tmpeng = ENGINE_get_digest_engine(EVP_MD_get_type(md));
   69|       |
   70|   378k|        if (tmpeng != NULL)
  ------------------
  |  Branch (70:13): [True: 0, False: 378k]
  ------------------
   71|      0|            ENGINE_finish(tmpeng);
   72|   378k|        else
   73|   378k|#endif
   74|   378k|            fetched_md = EVP_MD_fetch(libctx, EVP_MD_get0_name(md), propq);
   75|   378k|    }
   76|   378k|    if (fetched_md == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 378k]
  ------------------
   77|      0|        goto err;
   78|       |
   79|   378k|    ret = EVP_Digest(str, i, data, len, fetched_md, NULL);
   80|   378k|err:
   81|   378k|    OPENSSL_free(str);
  ------------------
  |  |  131|   378k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|   378k|    if (fetched_md != md)
  ------------------
  |  Branch (82:9): [True: 378k, False: 0]
  ------------------
   83|   378k|        EVP_MD_free(fetched_md);
   84|   378k|    return ret;
   85|   378k|}

ASN1_INTEGER_cmp:
   24|  12.9k|{
   25|  12.9k|    int neg, ret;
   26|       |    /* Compare signs */
   27|  12.9k|    neg = x->type & V_ASN1_NEG;
  ------------------
  |  |   99|  12.9k|#define V_ASN1_NEG 0x100
  ------------------
   28|  12.9k|    if (neg != (y->type & V_ASN1_NEG)) {
  ------------------
  |  |   99|  12.9k|#define V_ASN1_NEG 0x100
  ------------------
  |  Branch (28:9): [True: 0, False: 12.9k]
  ------------------
   29|      0|        if (neg)
  ------------------
  |  Branch (29:13): [True: 0, False: 0]
  ------------------
   30|      0|            return -1;
   31|      0|        else
   32|      0|            return 1;
   33|      0|    }
   34|       |
   35|  12.9k|    ret = ASN1_STRING_cmp(x, y);
   36|       |
   37|  12.9k|    if (neg)
  ------------------
  |  Branch (37:9): [True: 0, False: 12.9k]
  ------------------
   38|      0|        return -ret;
   39|  12.9k|    else
   40|  12.9k|        return ret;
   41|  12.9k|}
ossl_c2i_ASN1_INTEGER:
  301|   892k|{
  302|   892k|    ASN1_INTEGER *ret = NULL;
  303|   892k|    size_t r;
  304|   892k|    int neg;
  305|       |
  306|   892k|    r = c2i_ibuf(NULL, NULL, *pp, len);
  307|       |
  308|   892k|    if (r == 0)
  ------------------
  |  Branch (308:9): [True: 0, False: 892k]
  ------------------
  309|      0|        return NULL;
  310|       |
  311|   892k|    if ((a == NULL) || ((*a) == NULL)) {
  ------------------
  |  Branch (311:9): [True: 0, False: 892k]
  |  Branch (311:24): [True: 456k, False: 435k]
  ------------------
  312|   456k|        ret = ASN1_INTEGER_new();
  313|   456k|        if (ret == NULL)
  ------------------
  |  Branch (313:13): [True: 0, False: 456k]
  ------------------
  314|      0|            return NULL;
  315|   456k|        ret->type = V_ASN1_INTEGER;
  ------------------
  |  |   66|   456k|#define V_ASN1_INTEGER 2
  ------------------
  316|   456k|    } else
  317|   435k|        ret = *a;
  318|       |
  319|   892k|    if (r > INT_MAX || ASN1_STRING_set(ret, NULL, (int)r) == 0) {
  ------------------
  |  Branch (319:9): [True: 0, False: 892k]
  |  Branch (319:24): [True: 0, False: 892k]
  ------------------
  320|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  321|      0|        goto err;
  322|      0|    }
  323|       |
  324|   892k|    c2i_ibuf(ret->data, &neg, *pp, len);
  325|       |
  326|   892k|    if (neg != 0)
  ------------------
  |  Branch (326:9): [True: 0, False: 892k]
  ------------------
  327|      0|        ret->type |= V_ASN1_NEG;
  ------------------
  |  |   99|      0|#define V_ASN1_NEG 0x100
  ------------------
  328|   892k|    else
  329|   892k|        ret->type &= ~V_ASN1_NEG;
  ------------------
  |  |   99|   892k|#define V_ASN1_NEG 0x100
  ------------------
  330|       |
  331|   892k|    *pp += len;
  332|   892k|    if (a != NULL)
  ------------------
  |  Branch (332:9): [True: 892k, False: 0]
  ------------------
  333|   892k|        (*a) = ret;
  334|   892k|    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|   892k|}
ASN1_INTEGER_get_int64:
  539|   386k|{
  540|   386k|    return asn1_string_get_int64(pr, a, V_ASN1_INTEGER);
  ------------------
  |  |   66|   386k|#define V_ASN1_INTEGER 2
  ------------------
  541|   386k|}
ASN1_INTEGER_get:
  564|   386k|{
  565|   386k|    int i;
  566|   386k|    int64_t r;
  567|   386k|    if (a == NULL)
  ------------------
  |  Branch (567:9): [True: 0, False: 386k]
  ------------------
  568|      0|        return 0;
  569|   386k|    i = ASN1_INTEGER_get_int64(&r, a);
  570|   386k|    if (i == 0)
  ------------------
  |  Branch (570:9): [True: 0, False: 386k]
  ------------------
  571|      0|        return -1;
  572|   386k|    if (r > LONG_MAX || r < LONG_MIN)
  ------------------
  |  Branch (572:9): [True: 0, False: 386k]
  |  Branch (572:25): [True: 0, False: 386k]
  ------------------
  573|      0|        return -1;
  574|   386k|    return (long)r;
  575|   386k|}
a_int.c:twos_complement:
   78|   392k|{
   79|   392k|    unsigned int carry = pad & 1;
   80|       |
   81|       |    /* Begin at the end of the encoding */
   82|   392k|    if (len != 0) {
  ------------------
  |  Branch (82:9): [True: 392k, False: 0]
  ------------------
   83|       |        /*
   84|       |         * if len == 0 then src/dst could be NULL, and this would be undefined
   85|       |         * behaviour.
   86|       |         */
   87|   392k|        dst += len;
   88|   392k|        src += len;
   89|   392k|    }
   90|       |    /* two's complement value: ~value + 1 */
   91|  5.57M|    while (len-- != 0) {
  ------------------
  |  Branch (91:12): [True: 5.18M, False: 392k]
  ------------------
   92|  5.18M|        *(--dst) = (unsigned char)(carry += *(--src) ^ pad);
   93|  5.18M|        carry >>= 8;
   94|  5.18M|    }
   95|   392k|}
a_int.c:c2i_ibuf:
  156|  1.78M|{
  157|  1.78M|    int neg, pad;
  158|       |    /* Zero content length is illegal */
  159|  1.78M|    if (plen == 0) {
  ------------------
  |  Branch (159:9): [True: 0, False: 1.78M]
  ------------------
  160|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|        return 0;
  162|      0|    }
  163|  1.78M|    neg = p[0] & 0x80;
  164|  1.78M|    if (pneg)
  ------------------
  |  Branch (164:9): [True: 892k, False: 892k]
  ------------------
  165|   892k|        *pneg = neg;
  166|       |    /* Handle common case where length is 1 octet separately */
  167|  1.78M|    if (plen == 1) {
  ------------------
  |  Branch (167:9): [True: 999k, False: 785k]
  ------------------
  168|   999k|        if (b != NULL) {
  ------------------
  |  Branch (168:13): [True: 499k, False: 499k]
  ------------------
  169|   499k|            if (neg)
  ------------------
  |  Branch (169:17): [True: 0, False: 499k]
  ------------------
  170|      0|                b[0] = (p[0] ^ 0xFF) + 1;
  171|   499k|            else
  172|   499k|                b[0] = p[0];
  173|   499k|        }
  174|   999k|        return 1;
  175|   999k|    }
  176|       |
  177|   785k|    pad = 0;
  178|   785k|    if (p[0] == 0) {
  ------------------
  |  Branch (178:9): [True: 88.7k, False: 697k]
  ------------------
  179|  88.7k|        pad = 1;
  180|   697k|    } else if (p[0] == 0xFF) {
  ------------------
  |  Branch (180:16): [True: 0, False: 697k]
  ------------------
  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|   785k|    if (pad && (neg == (p[1] & 0x80))) {
  ------------------
  |  Branch (192:9): [True: 88.7k, False: 697k]
  |  Branch (192:16): [True: 0, False: 88.7k]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_PADDING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        return 0;
  195|      0|    }
  196|       |
  197|       |    /* skip over pad */
  198|   785k|    p += pad;
  199|   785k|    plen -= pad;
  200|       |
  201|   785k|    if (b != NULL)
  ------------------
  |  Branch (201:9): [True: 392k, False: 392k]
  ------------------
  202|   392k|        twos_complement(b, p, plen, neg ? 0xffU : 0);
  ------------------
  |  Branch (202:37): [True: 0, False: 392k]
  ------------------
  203|       |
  204|   785k|    return plen;
  205|   785k|}
a_int.c:asn1_string_get_int64:
  342|   386k|{
  343|   386k|    if (a == NULL) {
  ------------------
  |  Branch (343:9): [True: 0, False: 386k]
  ------------------
  344|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  345|      0|        return 0;
  346|      0|    }
  347|   386k|    if ((a->type & ~V_ASN1_NEG) != itype) {
  ------------------
  |  |   99|   386k|#define V_ASN1_NEG 0x100
  ------------------
  |  Branch (347:9): [True: 0, False: 386k]
  ------------------
  348|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_WRONG_INTEGER_TYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|        return 0;
  350|      0|    }
  351|   386k|    return asn1_get_int64(pr, a->data, a->length, a->type & V_ASN1_NEG);
  ------------------
  |  |   99|   386k|#define V_ASN1_NEG 0x100
  ------------------
  352|   386k|}
a_int.c:asn1_get_int64:
  266|   386k|{
  267|   386k|    uint64_t r;
  268|   386k|    if (asn1_get_uint64(&r, b, blen) == 0)
  ------------------
  |  Branch (268:9): [True: 0, False: 386k]
  ------------------
  269|      0|        return 0;
  270|   386k|    if (neg) {
  ------------------
  |  Branch (270:9): [True: 0, False: 386k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|            return 0;
  286|      0|        }
  287|   386k|    } else {
  288|   386k|        if (r <= INT64_MAX) {
  ------------------
  |  Branch (288:13): [True: 386k, False: 0]
  ------------------
  289|   386k|            *pr = (int64_t)r;
  290|   386k|        } else {
  291|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  292|      0|            return 0;
  293|      0|        }
  294|   386k|    }
  295|   386k|    return 1;
  296|   386k|}
a_int.c:asn1_get_uint64:
  223|   386k|{
  224|   386k|    size_t i;
  225|   386k|    uint64_t r;
  226|       |
  227|   386k|    if (blen > sizeof(*pr)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 386k]
  ------------------
  228|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  229|      0|        return 0;
  230|      0|    }
  231|   386k|    if (b == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 386k]
  ------------------
  232|      0|        return 0;
  233|   772k|    for (r = 0, i = 0; i < blen; i++) {
  ------------------
  |  Branch (233:24): [True: 386k, False: 386k]
  ------------------
  234|   386k|        r <<= 8;
  235|   386k|        r |= b[i];
  236|   386k|    }
  237|   386k|    *pr = r;
  238|   386k|    return 1;
  239|   386k|}

ASN1_mbstring_copy:
   38|  3.16M|{
   39|  3.16M|    return ASN1_mbstring_ncopy(out, in, len, inform, mask, 0, 0);
   40|  3.16M|}
ASN1_mbstring_ncopy:
   45|  3.16M|{
   46|  3.16M|    int str_type;
   47|  3.16M|    int ret;
   48|  3.16M|    char free_out;
   49|  3.16M|    int outform, outlen = 0;
   50|  3.16M|    ASN1_STRING *dest;
   51|  3.16M|    unsigned char *p;
   52|  3.16M|    int nchar;
   53|  3.16M|    int (*cpyfunc)(unsigned long, void *) = NULL;
   54|  3.16M|    if (len == -1) {
  ------------------
  |  Branch (54:9): [True: 0, False: 3.16M]
  ------------------
   55|      0|        size_t len_s = strlen((const char *)in);
   56|       |
   57|      0|        if (len_s >= INT_MAX) {
  ------------------
  |  Branch (57:13): [True: 0, False: 0]
  ------------------
   58|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   59|      0|            return -1;
   60|      0|        }
   61|      0|        len = (int)len_s;
   62|      0|    }
   63|  3.16M|    if (!mask)
  ------------------
  |  Branch (63:9): [True: 0, False: 3.16M]
  ------------------
   64|      0|        mask = DIRSTRING_TYPE;
  ------------------
  |  |  226|      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
  |  |  ------------------
  ------------------
   65|  3.16M|    if (len < 0) {
  ------------------
  |  Branch (65:9): [True: 0, False: 3.16M]
  ------------------
   66|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   67|      0|        return -1;
   68|      0|    }
   69|       |
   70|       |    /* First do a string check and work out the number of characters */
   71|  3.16M|    switch (inform) {
   72|       |
   73|      0|    case MBSTRING_BMP:
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (73:5): [True: 0, False: 3.16M]
  ------------------
   74|      0|        if (len & 1) {
  ------------------
  |  Branch (74:13): [True: 0, False: 0]
  ------------------
   75|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_BMPSTRING_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   76|      0|            return -1;
   77|      0|        }
   78|      0|        nchar = len >> 1;
   79|      0|        break;
   80|       |
   81|      0|    case MBSTRING_UNIV:
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (81:5): [True: 0, False: 3.16M]
  ------------------
   82|      0|        if (len & 3) {
  ------------------
  |  Branch (82:13): [True: 0, False: 0]
  ------------------
   83|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UNIVERSALSTRING_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   84|      0|            return -1;
   85|      0|        }
   86|      0|        nchar = len >> 2;
   87|      0|        break;
   88|       |
   89|   798k|    case MBSTRING_UTF8:
  ------------------
  |  |  125|   798k|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|   798k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (89:5): [True: 798k, False: 2.36M]
  ------------------
   90|   798k|        nchar = 0;
   91|       |        /* This counts the characters and does utf8 syntax checking */
   92|   798k|        ret = traverse_string(in, len, MBSTRING_UTF8, in_utf8, &nchar);
  ------------------
  |  |  125|   798k|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|   798k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
   93|   798k|        if (ret < 0) {
  ------------------
  |  Branch (93:13): [True: 0, False: 798k]
  ------------------
   94|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UTF8STRING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   95|      0|            return -1;
   96|      0|        }
   97|   798k|        break;
   98|       |
   99|  2.36M|    case MBSTRING_ASC:
  ------------------
  |  |  126|  2.36M|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|  2.36M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (99:5): [True: 2.36M, False: 798k]
  ------------------
  100|  2.36M|        nchar = len;
  101|  2.36M|        break;
  102|       |
  103|      0|    default:
  ------------------
  |  Branch (103:5): [True: 0, False: 3.16M]
  ------------------
  104|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_UNKNOWN_FORMAT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  105|      0|        return -1;
  106|  3.16M|    }
  107|       |
  108|  3.16M|    if ((minsize > 0) && (nchar < minsize)) {
  ------------------
  |  Branch (108:9): [True: 0, False: 3.16M]
  |  Branch (108:26): [True: 0, False: 0]
  ------------------
  109|      0|        ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |   85|      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
  ------------------
  110|      0|            "minsize=%ld", minsize);
  111|      0|        return -1;
  112|      0|    }
  113|       |
  114|  3.16M|    if ((maxsize > 0) && (nchar > maxsize)) {
  ------------------
  |  Branch (114:9): [True: 0, False: 3.16M]
  |  Branch (114:26): [True: 0, False: 0]
  ------------------
  115|      0|        ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |   85|      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
  ------------------
  116|      0|            "maxsize=%ld", maxsize);
  117|      0|        return -1;
  118|      0|    }
  119|       |
  120|       |    /* Now work out minimal type (if any) */
  121|  3.16M|    if (traverse_string(in, len, inform, type_str, &mask) < 0) {
  ------------------
  |  Branch (121:9): [True: 0, False: 3.16M]
  ------------------
  122|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_CHARACTERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  123|      0|        return -1;
  124|      0|    }
  125|       |
  126|       |    /*
  127|       |     * Now work out output format and string type.
  128|       |     * These checks should be in sync with the checks in type_str.
  129|       |     */
  130|  3.16M|    outform = MBSTRING_ASC;
  ------------------
  |  |  126|  3.16M|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|  3.16M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  131|  3.16M|    if (mask & B_ASN1_NUMERICSTRING)
  ------------------
  |  |  104|  3.16M|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  |  Branch (131:9): [True: 0, False: 3.16M]
  ------------------
  132|      0|        str_type = V_ASN1_NUMERICSTRING;
  ------------------
  |  |   78|      0|#define V_ASN1_NUMERICSTRING 18
  ------------------
  133|  3.16M|    else if (mask & B_ASN1_PRINTABLESTRING)
  ------------------
  |  |  105|  3.16M|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  |  Branch (133:14): [True: 0, False: 3.16M]
  ------------------
  134|      0|        str_type = V_ASN1_PRINTABLESTRING;
  ------------------
  |  |   79|      0|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  135|  3.16M|    else if (mask & B_ASN1_IA5STRING)
  ------------------
  |  |  109|  3.16M|#define B_ASN1_IA5STRING 0x0010
  ------------------
  |  Branch (135:14): [True: 0, False: 3.16M]
  ------------------
  136|      0|        str_type = V_ASN1_IA5STRING;
  ------------------
  |  |   83|      0|#define V_ASN1_IA5STRING 22
  ------------------
  137|  3.16M|    else if (mask & B_ASN1_T61STRING)
  ------------------
  |  |  106|  3.16M|#define B_ASN1_T61STRING 0x0004
  ------------------
  |  Branch (137:14): [True: 0, False: 3.16M]
  ------------------
  138|      0|        str_type = V_ASN1_T61STRING;
  ------------------
  |  |   80|      0|#define V_ASN1_T61STRING 20
  ------------------
  139|  3.16M|    else if (mask & B_ASN1_BMPSTRING) {
  ------------------
  |  |  117|  3.16M|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  |  Branch (139:14): [True: 0, False: 3.16M]
  ------------------
  140|      0|        str_type = V_ASN1_BMPSTRING;
  ------------------
  |  |   91|      0|#define V_ASN1_BMPSTRING 30
  ------------------
  141|      0|        outform = MBSTRING_BMP;
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  142|  3.16M|    } else if (mask & B_ASN1_UNIVERSALSTRING) {
  ------------------
  |  |  114|  3.16M|#define B_ASN1_UNIVERSALSTRING 0x0100
  ------------------
  |  Branch (142:16): [True: 0, False: 3.16M]
  ------------------
  143|      0|        str_type = V_ASN1_UNIVERSALSTRING;
  ------------------
  |  |   90|      0|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  144|      0|        outform = MBSTRING_UNIV;
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  145|  3.16M|    } else {
  146|  3.16M|        str_type = V_ASN1_UTF8STRING;
  ------------------
  |  |   75|  3.16M|#define V_ASN1_UTF8STRING 12
  ------------------
  147|  3.16M|        outform = MBSTRING_UTF8;
  ------------------
  |  |  125|  3.16M|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|  3.16M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  148|  3.16M|    }
  149|  3.16M|    if (!out)
  ------------------
  |  Branch (149:9): [True: 0, False: 3.16M]
  ------------------
  150|      0|        return str_type;
  151|  3.16M|    if (*out) {
  ------------------
  |  Branch (151:9): [True: 3.16M, False: 0]
  ------------------
  152|  3.16M|        free_out = 0;
  153|  3.16M|        dest = *out;
  154|  3.16M|        ASN1_STRING_set0(dest, NULL, 0);
  155|  3.16M|        dest->type = str_type;
  156|  3.16M|    } else {
  157|      0|        free_out = 1;
  158|      0|        dest = ASN1_STRING_type_new(str_type);
  159|      0|        if (dest == NULL) {
  ------------------
  |  Branch (159:13): [True: 0, False: 0]
  ------------------
  160|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|            return -1;
  162|      0|        }
  163|      0|        *out = dest;
  164|      0|    }
  165|       |    /* If both the same type just copy across */
  166|  3.16M|    if (inform == outform) {
  ------------------
  |  Branch (166:9): [True: 798k, False: 2.36M]
  ------------------
  167|   798k|        if (!ASN1_STRING_set(dest, in, len)) {
  ------------------
  |  Branch (167:13): [True: 0, False: 798k]
  ------------------
  168|      0|            if (free_out) {
  ------------------
  |  Branch (168:17): [True: 0, False: 0]
  ------------------
  169|      0|                ASN1_STRING_free(dest);
  170|      0|                *out = NULL;
  171|      0|            }
  172|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  173|      0|            return -1;
  174|      0|        }
  175|   798k|        return str_type;
  176|   798k|    }
  177|       |
  178|       |    /* Work out how much space the destination will need */
  179|  2.36M|    switch (outform) {
  ------------------
  |  Branch (179:13): [True: 2.36M, False: 0]
  ------------------
  180|      0|    case MBSTRING_ASC:
  ------------------
  |  |  126|      0|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (180:5): [True: 0, False: 2.36M]
  ------------------
  181|      0|        outlen = nchar;
  182|      0|        cpyfunc = cpy_asc;
  183|      0|        break;
  184|       |
  185|      0|    case MBSTRING_BMP:
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (185:5): [True: 0, False: 2.36M]
  ------------------
  186|      0|        outlen = nchar << 1;
  187|      0|        cpyfunc = cpy_bmp;
  188|      0|        break;
  189|       |
  190|      0|    case MBSTRING_UNIV:
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (190:5): [True: 0, False: 2.36M]
  ------------------
  191|      0|        outlen = nchar << 2;
  192|      0|        cpyfunc = cpy_univ;
  193|      0|        break;
  194|       |
  195|  2.36M|    case MBSTRING_UTF8:
  ------------------
  |  |  125|  2.36M|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|  2.36M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (195:5): [True: 2.36M, False: 0]
  ------------------
  196|  2.36M|        outlen = 0;
  197|  2.36M|        ret = traverse_string(in, len, inform, out_utf8, &outlen);
  198|  2.36M|        if (ret < 0) {
  ------------------
  |  Branch (198:13): [True: 0, False: 2.36M]
  ------------------
  199|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UTF8STRING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  200|      0|            return -1;
  201|      0|        }
  202|  2.36M|        cpyfunc = cpy_utf8;
  203|  2.36M|        break;
  204|  2.36M|    }
  205|  2.36M|    if ((p = OPENSSL_malloc(outlen + 1)) == NULL) {
  ------------------
  |  |  106|  2.36M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (205:9): [True: 0, False: 2.36M]
  ------------------
  206|      0|        if (free_out) {
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|            ASN1_STRING_free(dest);
  208|      0|            *out = NULL;
  209|      0|        }
  210|      0|        return -1;
  211|      0|    }
  212|  2.36M|    dest->length = outlen;
  213|  2.36M|    dest->data = p;
  214|  2.36M|    p[outlen] = 0;
  215|  2.36M|    traverse_string(in, len, inform, cpyfunc, &p);
  216|  2.36M|    return str_type;
  217|  2.36M|}
a_mbstr.c:traverse_string:
  227|  8.68M|{
  228|  8.68M|    unsigned long value;
  229|  8.68M|    int ret;
  230|   143M|    while (len) {
  ------------------
  |  Branch (230:12): [True: 135M, False: 8.68M]
  ------------------
  231|   135M|        if (inform == MBSTRING_ASC) {
  ------------------
  |  |  126|   135M|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|   135M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (231:13): [True: 102M, False: 32.9M]
  ------------------
  232|   102M|            value = *p++;
  233|   102M|            len--;
  234|   102M|        } else if (inform == MBSTRING_BMP) {
  ------------------
  |  |  127|  32.9M|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|  32.9M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (234:20): [True: 0, False: 32.9M]
  ------------------
  235|      0|            value = *p++ << 8;
  236|      0|            value |= *p++;
  237|      0|            len -= 2;
  238|  32.9M|        } else if (inform == MBSTRING_UNIV) {
  ------------------
  |  |  128|  32.9M|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|  32.9M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (238:20): [True: 0, False: 32.9M]
  ------------------
  239|      0|            value = ((unsigned long)*p++) << 24;
  240|      0|            value |= ((unsigned long)*p++) << 16;
  241|      0|            value |= *p++ << 8;
  242|      0|            value |= *p++;
  243|      0|            len -= 4;
  244|  32.9M|        } else {
  245|  32.9M|            ret = UTF8_getc(p, len, &value);
  246|  32.9M|            if (ret < 0)
  ------------------
  |  Branch (246:17): [True: 0, False: 32.9M]
  ------------------
  247|      0|                return -1;
  248|  32.9M|            len -= ret;
  249|  32.9M|            p += ret;
  250|  32.9M|        }
  251|   135M|        if (rfunc) {
  ------------------
  |  Branch (251:13): [True: 135M, False: 0]
  ------------------
  252|   135M|            ret = rfunc(value, arg);
  253|   135M|            if (ret <= 0)
  ------------------
  |  Branch (253:17): [True: 0, False: 135M]
  ------------------
  254|      0|                return ret;
  255|   135M|        }
  256|   135M|    }
  257|  8.68M|    return 1;
  258|  8.68M|}
a_mbstr.c:in_utf8:
  265|  16.4M|{
  266|  16.4M|    int *nchar;
  267|       |
  268|  16.4M|    if (!is_unicode_valid(value))
  ------------------
  |  Branch (268:9): [True: 0, False: 16.4M]
  ------------------
  269|      0|        return -2;
  270|  16.4M|    nchar = arg;
  271|  16.4M|    (*nchar)++;
  272|  16.4M|    return 1;
  273|  16.4M|}
a_mbstr.c:out_utf8:
  278|  34.0M|{
  279|  34.0M|    int *outlen, len;
  280|       |
  281|  34.0M|    len = UTF8_putc(NULL, -1, value);
  282|  34.0M|    if (len <= 0)
  ------------------
  |  Branch (282:9): [True: 0, False: 34.0M]
  ------------------
  283|      0|        return len;
  284|  34.0M|    outlen = arg;
  285|  34.0M|    *outlen += len;
  286|  34.0M|    return 1;
  287|  34.0M|}
a_mbstr.c:type_str:
  295|  50.5M|{
  296|  50.5M|    unsigned long usable_types = *((unsigned long *)arg);
  297|  50.5M|    unsigned long types = usable_types;
  298|  50.5M|    const int native = value > INT_MAX ? INT_MAX : ossl_fromascii(value);
  ------------------
  |  |   57|   101M|#define ossl_fromascii(c) (c)
  ------------------
  |  Branch (298:24): [True: 0, False: 50.5M]
  ------------------
  299|       |
  300|       |    /*
  301|       |     * Clear out all the types which are not checked later. If any of those
  302|       |     * is present in the mask, then the UTF8 type will be added and checked
  303|       |     * below.
  304|       |     */
  305|  50.5M|    types &= B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING
  ------------------
  |  |  104|  50.5M|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
                  types &= B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING
  ------------------
  |  |  105|  50.5M|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  306|  50.5M|        | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  109|  50.5M|#define B_ASN1_IA5STRING 0x0010
  ------------------
                      | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  106|  50.5M|#define B_ASN1_T61STRING 0x0004
  ------------------
                      | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  117|  50.5M|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  307|  50.5M|        | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING;
  ------------------
  |  |  114|  50.5M|#define B_ASN1_UNIVERSALSTRING 0x0100
  ------------------
                      | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING;
  ------------------
  |  |  119|  50.5M|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  308|       |
  309|       |    /*
  310|       |     * If any other types were in the input mask, they're effectively treated
  311|       |     * as UTF8
  312|       |     */
  313|  50.5M|    if (types != usable_types)
  ------------------
  |  Branch (313:9): [True: 0, False: 50.5M]
  ------------------
  314|      0|        types |= B_ASN1_UTF8STRING;
  ------------------
  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  315|       |
  316|       |    /*
  317|       |     * These checks should be in sync with ASN1_mbstring_ncopy.
  318|       |     */
  319|  50.5M|    if ((types & B_ASN1_NUMERICSTRING) && !(ossl_isdigit(native) || native == ' '))
  ------------------
  |  |  104|  50.5M|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  |  Branch (319:9): [True: 0, False: 50.5M]
  |  Branch (319:45): [True: 0, False: 0]
  |  Branch (319:69): [True: 0, False: 0]
  ------------------
  320|      0|        types &= ~B_ASN1_NUMERICSTRING;
  ------------------
  |  |  104|      0|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  321|  50.5M|    if ((types & B_ASN1_PRINTABLESTRING) && !ossl_isasn1print(native))
  ------------------
  |  |  105|  50.5M|#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 (321:9): [True: 0, False: 50.5M]
  |  Branch (321:45): [True: 0, False: 0]
  ------------------
  322|      0|        types &= ~B_ASN1_PRINTABLESTRING;
  ------------------
  |  |  105|      0|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  323|  50.5M|    if ((types & B_ASN1_IA5STRING) && !ossl_isascii(native))
  ------------------
  |  |  109|  50.5M|#define B_ASN1_IA5STRING 0x0010
  ------------------
                  if ((types & B_ASN1_IA5STRING) && !ossl_isascii(native))
  ------------------
  |  |   75|      0|#define ossl_isascii(c) (((c) & ~127) == 0)
  ------------------
  |  Branch (323:9): [True: 0, False: 50.5M]
  |  Branch (323:39): [True: 0, False: 0]
  ------------------
  324|      0|        types &= ~B_ASN1_IA5STRING;
  ------------------
  |  |  109|      0|#define B_ASN1_IA5STRING 0x0010
  ------------------
  325|  50.5M|    if ((types & B_ASN1_T61STRING) && (value > 0xff))
  ------------------
  |  |  106|  50.5M|#define B_ASN1_T61STRING 0x0004
  ------------------
  |  Branch (325:9): [True: 0, False: 50.5M]
  |  Branch (325:39): [True: 0, False: 0]
  ------------------
  326|      0|        types &= ~B_ASN1_T61STRING;
  ------------------
  |  |  106|      0|#define B_ASN1_T61STRING 0x0004
  ------------------
  327|  50.5M|    if ((types & B_ASN1_BMPSTRING) && (value > 0xffff))
  ------------------
  |  |  117|  50.5M|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  |  Branch (327:9): [True: 0, False: 50.5M]
  |  Branch (327:39): [True: 0, False: 0]
  ------------------
  328|      0|        types &= ~B_ASN1_BMPSTRING;
  ------------------
  |  |  117|      0|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  329|  50.5M|    if ((types & B_ASN1_UTF8STRING) && !is_unicode_valid(value))
  ------------------
  |  |  119|  50.5M|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  |  Branch (329:9): [True: 50.5M, False: 0]
  |  Branch (329:40): [True: 0, False: 50.5M]
  ------------------
  330|      0|        types &= ~B_ASN1_UTF8STRING;
  ------------------
  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  331|  50.5M|    if (!types)
  ------------------
  |  Branch (331:9): [True: 0, False: 50.5M]
  ------------------
  332|      0|        return -1;
  333|  50.5M|    *((unsigned long *)arg) = types;
  334|  50.5M|    return 1;
  335|  50.5M|}
a_mbstr.c:cpy_utf8:
  380|  34.0M|{
  381|  34.0M|    unsigned char **p;
  382|  34.0M|    int ret;
  383|  34.0M|    p = arg;
  384|       |    /* We already know there is enough room so pass 0xff as the length */
  385|  34.0M|    ret = UTF8_putc(*p, 0xff, value);
  386|  34.0M|    if (ret < 0)
  ------------------
  |  Branch (386:9): [True: 0, False: 34.0M]
  ------------------
  387|      0|        return ret;
  388|  34.0M|    *p += ret;
  389|  34.0M|    return 1;
  390|  34.0M|}

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

ASN1_OCTET_STRING_cmp:
   21|  82.9k|{
   22|  82.9k|    return ASN1_STRING_cmp(a, b);
   23|  82.9k|}

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

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

UTF8_getc:
   29|  32.9M|{
   30|  32.9M|    const unsigned char *p;
   31|  32.9M|    unsigned long value;
   32|  32.9M|    int ret;
   33|  32.9M|    if (len <= 0)
  ------------------
  |  Branch (33:9): [True: 0, False: 32.9M]
  ------------------
   34|      0|        return 0;
   35|  32.9M|    p = str;
   36|       |
   37|       |    /* Check syntax and work out the encoded value (if correct) */
   38|  32.9M|    if ((*p & 0x80) == 0) {
  ------------------
  |  Branch (38:9): [True: 32.8M, False: 95.5k]
  ------------------
   39|  32.8M|        value = *p++ & 0x7f;
   40|  32.8M|        ret = 1;
   41|  32.8M|    } else if ((*p & 0xe0) == 0xc0) {
  ------------------
  |  Branch (41:16): [True: 95.5k, False: 0]
  ------------------
   42|  95.5k|        if (len < 2)
  ------------------
  |  Branch (42:13): [True: 0, False: 95.5k]
  ------------------
   43|      0|            return -1;
   44|  95.5k|        if ((p[1] & 0xc0) != 0x80)
  ------------------
  |  Branch (44:13): [True: 0, False: 95.5k]
  ------------------
   45|      0|            return -3;
   46|  95.5k|        value = (*p++ & 0x1f) << 6;
   47|  95.5k|        value |= *p++ & 0x3f;
   48|  95.5k|        if (value < 0x80)
  ------------------
  |  Branch (48:13): [True: 0, False: 95.5k]
  ------------------
   49|      0|            return -4;
   50|  95.5k|        ret = 2;
   51|  95.5k|    } 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|  32.9M|    *val = value;
   82|  32.9M|    return ret;
   83|  32.9M|}
UTF8_putc:
   94|  68.0M|{
   95|  68.0M|    if (!str)
  ------------------
  |  Branch (95:9): [True: 34.0M, False: 34.0M]
  ------------------
   96|  34.0M|        len = 4; /* Maximum we will need */
   97|  34.0M|    else if (len <= 0)
  ------------------
  |  Branch (97:14): [True: 0, False: 34.0M]
  ------------------
   98|      0|        return -1;
   99|  68.0M|    if (value < 0x80) {
  ------------------
  |  Branch (99:9): [True: 68.0M, False: 0]
  ------------------
  100|  68.0M|        if (str)
  ------------------
  |  Branch (100:13): [True: 34.0M, False: 34.0M]
  ------------------
  101|  34.0M|            *str = (unsigned char)value;
  102|  68.0M|        return 1;
  103|  68.0M|    }
  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:
   41|  2.09M|{
   42|  2.09M|    int num = OSSL_NELEM(standard_methods);
  ------------------
  |  |   14|  2.09M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   43|  2.09M|    if (app_methods)
  ------------------
  |  Branch (43:9): [True: 0, False: 2.09M]
  ------------------
   44|      0|        num += sk_EVP_PKEY_ASN1_METHOD_num(app_methods);
   45|  2.09M|    return num;
   46|  2.09M|}
EVP_PKEY_asn1_get0:
   49|  29.7M|{
   50|  29.7M|    int num = OSSL_NELEM(standard_methods);
  ------------------
  |  |   14|  29.7M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   51|  29.7M|    if (idx < 0)
  ------------------
  |  Branch (51:9): [True: 0, False: 29.7M]
  ------------------
   52|      0|        return NULL;
   53|  29.7M|    if (idx < num)
  ------------------
  |  Branch (53:9): [True: 29.7M, False: 0]
  ------------------
   54|  29.7M|        return standard_methods[idx];
   55|      0|    idx -= num;
   56|      0|    return sk_EVP_PKEY_ASN1_METHOD_value(app_methods, idx);
   57|  29.7M|}
EVP_PKEY_asn1_find:
   84|  1.11M|{
   85|  1.11M|    const EVP_PKEY_ASN1_METHOD *t;
   86|       |
   87|  1.11M|    for (;;) {
   88|  1.11M|        t = pkey_asn1_find(type);
   89|  1.11M|        if (!t || !(t->pkey_flags & ASN1_PKEY_ALIAS))
  ------------------
  |  | 1603|  1.01M|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (89:13): [True: 97.7k, False: 1.01M]
  |  Branch (89:19): [True: 1.01M, False: 0]
  ------------------
   90|  1.11M|            break;
   91|      0|        type = t->pkey_base_id;
   92|      0|    }
   93|  1.11M|    if (pe) {
  ------------------
  |  Branch (93:9): [True: 1.11M, False: 0]
  ------------------
   94|  1.11M|#ifndef OPENSSL_NO_ENGINE
   95|  1.11M|        ENGINE *e;
   96|       |        /* type will contain the final unaliased type */
   97|  1.11M|        e = ENGINE_get_pkey_asn1_meth_engine(type);
   98|  1.11M|        if (e) {
  ------------------
  |  Branch (98:13): [True: 0, False: 1.11M]
  ------------------
   99|      0|            *pe = e;
  100|      0|            return ENGINE_get_pkey_asn1_meth(e, type);
  101|      0|        }
  102|  1.11M|#endif
  103|  1.11M|        *pe = NULL;
  104|  1.11M|    }
  105|  1.11M|    return t;
  106|  1.11M|}
EVP_PKEY_asn1_find_str:
  110|  2.09M|{
  111|  2.09M|    int i;
  112|  2.09M|    const EVP_PKEY_ASN1_METHOD *ameth = NULL;
  113|       |
  114|  2.09M|    if (len == -1)
  ------------------
  |  Branch (114:9): [True: 19.4k, False: 2.07M]
  ------------------
  115|  19.4k|        len = (int)strlen(str);
  116|  2.09M|    if (pe) {
  ------------------
  |  Branch (116:9): [True: 2.09M, False: 0]
  ------------------
  117|  2.09M|#ifndef OPENSSL_NO_ENGINE
  118|  2.09M|        ENGINE *e;
  119|  2.09M|        ameth = ENGINE_pkey_asn1_find_str(&e, str, len);
  120|  2.09M|        if (ameth) {
  ------------------
  |  Branch (120:13): [True: 0, False: 2.09M]
  ------------------
  121|       |            /*
  122|       |             * Convert structural into functional reference
  123|       |             */
  124|      0|            if (!ENGINE_init(e))
  ------------------
  |  Branch (124:17): [True: 0, False: 0]
  ------------------
  125|      0|                ameth = NULL;
  126|      0|            ENGINE_free(e);
  127|      0|            *pe = e;
  128|      0|            return ameth;
  129|      0|        }
  130|  2.09M|#endif
  131|  2.09M|        *pe = NULL;
  132|  2.09M|    }
  133|  30.9M|    for (i = EVP_PKEY_asn1_get_count(); i-- > 0;) {
  ------------------
  |  Branch (133:41): [True: 29.7M, False: 1.21M]
  ------------------
  134|  29.7M|        ameth = EVP_PKEY_asn1_get0(i);
  135|  29.7M|        if (ameth->pkey_flags & ASN1_PKEY_ALIAS)
  ------------------
  |  | 1603|  29.7M|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (135:13): [True: 9.50M, False: 20.2M]
  ------------------
  136|  9.50M|            continue;
  137|  20.2M|        if ((int)strlen(ameth->pem_str) == len
  ------------------
  |  Branch (137:13): [True: 1.51M, False: 18.7M]
  ------------------
  138|  1.51M|            && OPENSSL_strncasecmp(ameth->pem_str, str, len) == 0)
  ------------------
  |  Branch (138:16): [True: 878k, False: 640k]
  ------------------
  139|   878k|            return ameth;
  140|  20.2M|    }
  141|  1.21M|    return NULL;
  142|  2.09M|}
EVP_PKEY_asn1_get0_info:
  203|  9.45k|{
  204|  9.45k|    if (!ameth)
  ------------------
  |  Branch (204:9): [True: 0, False: 9.45k]
  ------------------
  205|      0|        return 0;
  206|  9.45k|    if (ppkey_id)
  ------------------
  |  Branch (206:9): [True: 9.45k, False: 0]
  ------------------
  207|  9.45k|        *ppkey_id = ameth->pkey_id;
  208|  9.45k|    if (ppkey_base_id)
  ------------------
  |  Branch (208:9): [True: 9.45k, False: 0]
  ------------------
  209|  9.45k|        *ppkey_base_id = ameth->pkey_base_id;
  210|  9.45k|    if (ppkey_flags)
  ------------------
  |  Branch (210:9): [True: 9.45k, False: 0]
  ------------------
  211|  9.45k|        *ppkey_flags = ameth->pkey_flags;
  212|  9.45k|    if (pinfo)
  ------------------
  |  Branch (212:9): [True: 0, False: 9.45k]
  ------------------
  213|      0|        *pinfo = ameth->info;
  214|  9.45k|    if (ppem_str)
  ------------------
  |  Branch (214:9): [True: 9.45k, False: 0]
  ------------------
  215|  9.45k|        *ppem_str = ameth->pem_str;
  216|  9.45k|    return 1;
  217|  9.45k|}
ameth_lib.c:pkey_asn1_find:
   60|  1.11M|{
   61|  1.11M|    EVP_PKEY_ASN1_METHOD tmp;
   62|  1.11M|    const EVP_PKEY_ASN1_METHOD *t = &tmp, **ret;
   63|       |
   64|  1.11M|    tmp.pkey_id = type;
   65|  1.11M|    if (app_methods) {
  ------------------
  |  Branch (65:9): [True: 0, False: 1.11M]
  ------------------
   66|      0|        int idx;
   67|      0|        idx = sk_EVP_PKEY_ASN1_METHOD_find(app_methods, &tmp);
   68|      0|        if (idx >= 0)
  ------------------
  |  Branch (68:13): [True: 0, False: 0]
  ------------------
   69|      0|            return sk_EVP_PKEY_ASN1_METHOD_value(app_methods, idx);
   70|      0|    }
   71|  1.11M|    ret = OBJ_bsearch_ameth(&t, standard_methods, OSSL_NELEM(standard_methods));
  ------------------
  |  |   14|  1.11M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   72|  1.11M|    if (ret == NULL || *ret == NULL)
  ------------------
  |  Branch (72:9): [True: 97.7k, False: 1.01M]
  |  Branch (72:24): [True: 0, False: 1.01M]
  ------------------
   73|  97.7k|        return NULL;
   74|  1.01M|    return *ret;
   75|  1.11M|}
ameth_lib.c:ameth_cmp:
   33|  3.34M|{
   34|  3.34M|    return ((*a)->pkey_id - (*b)->pkey_id);
   35|  3.34M|}

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|  36.3M|{
   49|  36.3M|    int i, ret;
   50|  36.3M|    long len;
   51|  36.3M|    const unsigned char *p = *pp;
   52|  36.3M|    int tag, xclass, inf;
   53|  36.3M|    long max = omax;
   54|       |
   55|  36.3M|    if (omax <= 0) {
  ------------------
  |  Branch (55:9): [True: 0, False: 36.3M]
  ------------------
   56|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   57|      0|        return 0x80;
   58|      0|    }
   59|  36.3M|    ret = (*p & V_ASN1_CONSTRUCTED);
  ------------------
  |  |   54|  36.3M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
   60|  36.3M|    xclass = (*p & V_ASN1_PRIVATE);
  ------------------
  |  |   52|  36.3M|#define V_ASN1_PRIVATE 0xc0
  ------------------
   61|  36.3M|    i = *p & V_ASN1_PRIMITIVE_TAG;
  ------------------
  |  |   55|  36.3M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
   62|  36.3M|    if (i == V_ASN1_PRIMITIVE_TAG) { /* high-tag */
  ------------------
  |  |   55|  36.3M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  |  Branch (62:9): [True: 0, False: 36.3M]
  ------------------
   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|  36.3M|    } else {
   81|  36.3M|        tag = i;
   82|  36.3M|        p++;
   83|  36.3M|        if (--max == 0)
  ------------------
  |  Branch (83:13): [True: 0, False: 36.3M]
  ------------------
   84|      0|            goto err;
   85|  36.3M|    }
   86|  36.3M|    *ptag = tag;
   87|  36.3M|    *pclass = xclass;
   88|  36.3M|    if (!asn1_get_length(&p, &inf, plength, max))
  ------------------
  |  Branch (88:9): [True: 0, False: 36.3M]
  ------------------
   89|      0|        goto err;
   90|       |
   91|  36.3M|    if (inf && !(ret & V_ASN1_CONSTRUCTED))
  ------------------
  |  |   54|      0|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (91:9): [True: 0, False: 36.3M]
  |  Branch (91:16): [True: 0, False: 0]
  ------------------
   92|      0|        goto err;
   93|       |
   94|  36.3M|    if (*plength > (omax - (p - *pp))) {
  ------------------
  |  Branch (94:9): [True: 871k, False: 35.4M]
  ------------------
   95|   871k|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|   871k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|   871k|    (ERR_new(),                                                  \
  |  |  |  |  407|   871k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|   871k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|   871k|        ERR_set_error)
  |  |  ------------------
  ------------------
   96|       |        /*
   97|       |         * Set this so that even if things are not long enough the values are
   98|       |         * set correctly
   99|       |         */
  100|   871k|        ret |= 0x80;
  101|   871k|    }
  102|  36.3M|    *pp = p;
  103|  36.3M|    return ret | inf;
  104|      0|err:
  105|       |    ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  106|      0|    return 0x80;
  107|  36.3M|}
ASN1_put_object:
  162|  14.4M|{
  163|  14.4M|    unsigned char *p = *pp;
  164|  14.4M|    int i, ttag;
  165|       |
  166|  14.4M|    i = (constructed) ? V_ASN1_CONSTRUCTED : 0;
  ------------------
  |  |   54|  7.07M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (166:9): [True: 7.07M, False: 7.36M]
  ------------------
  167|  14.4M|    i |= (xclass & V_ASN1_PRIVATE);
  ------------------
  |  |   52|  14.4M|#define V_ASN1_PRIVATE 0xc0
  ------------------
  168|  14.4M|    if (tag < 31) {
  ------------------
  |  Branch (168:9): [True: 14.4M, False: 0]
  ------------------
  169|  14.4M|        *(p++) = i | (tag & V_ASN1_PRIMITIVE_TAG);
  ------------------
  |  |   55|  14.4M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  170|  14.4M|    } 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|  14.4M|    if (constructed == 2)
  ------------------
  |  Branch (183:9): [True: 0, False: 14.4M]
  ------------------
  184|      0|        *(p++) = 0x80;
  185|  14.4M|    else
  186|  14.4M|        asn1_put_length(&p, length);
  187|  14.4M|    *pp = p;
  188|  14.4M|}
ASN1_object_size:
  223|  46.7M|{
  224|  46.7M|    int ret = 1;
  225|       |
  226|  46.7M|    if (length < 0)
  ------------------
  |  Branch (226:9): [True: 0, False: 46.7M]
  ------------------
  227|      0|        return -1;
  228|  46.7M|    if (tag >= 31) {
  ------------------
  |  Branch (228:9): [True: 0, False: 46.7M]
  ------------------
  229|      0|        while (tag > 0) {
  ------------------
  |  Branch (229:16): [True: 0, False: 0]
  ------------------
  230|      0|            tag >>= 7;
  231|      0|            ret++;
  232|      0|        }
  233|      0|    }
  234|  46.7M|    if (constructed == 2) {
  ------------------
  |  Branch (234:9): [True: 0, False: 46.7M]
  ------------------
  235|      0|        ret += 3;
  236|  46.7M|    } else {
  237|  46.7M|        ret++;
  238|  46.7M|        if (length > 127) {
  ------------------
  |  Branch (238:13): [True: 1.58M, False: 45.1M]
  ------------------
  239|  1.58M|            int tmplen = length;
  240|  4.74M|            while (tmplen > 0) {
  ------------------
  |  Branch (240:20): [True: 3.16M, False: 1.58M]
  ------------------
  241|  3.16M|                tmplen >>= 8;
  242|  3.16M|                ret++;
  243|  3.16M|            }
  244|  1.58M|        }
  245|  46.7M|    }
  246|  46.7M|    if (ret >= INT_MAX - length)
  ------------------
  |  Branch (246:9): [True: 0, False: 46.7M]
  ------------------
  247|      0|        return -1;
  248|  46.7M|    return ret + length;
  249|  46.7M|}
ossl_asn1_string_set_bits_left:
  252|  2.11M|{
  253|  2.11M|    str->flags &= ~0x07;
  254|  2.11M|    str->flags |= ASN1_STRING_FLAG_BITS_LEFT | (num & 0x07);
  ------------------
  |  |  164|  2.11M|#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
  ------------------
  255|  2.11M|}
ASN1_STRING_set:
  287|  7.73M|{
  288|  7.73M|    unsigned char *c;
  289|  7.73M|    const char *data = _data;
  290|  7.73M|    size_t len;
  291|       |
  292|  7.73M|    if (len_in < 0) {
  ------------------
  |  Branch (292:9): [True: 0, False: 7.73M]
  ------------------
  293|      0|        if (data == NULL)
  ------------------
  |  Branch (293:13): [True: 0, False: 0]
  ------------------
  294|      0|            return 0;
  295|      0|        len = strlen(data);
  296|  7.73M|    } else {
  297|  7.73M|        len = (size_t)len_in;
  298|  7.73M|    }
  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|  7.73M|    if (len > INT_MAX - 1) {
  ------------------
  |  Branch (304:9): [True: 0, False: 7.73M]
  ------------------
  305|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  306|      0|        return 0;
  307|      0|    }
  308|  7.73M|    if ((size_t)str->length <= len || str->data == NULL) {
  ------------------
  |  Branch (308:9): [True: 7.73M, False: 0]
  |  Branch (308:39): [True: 0, False: 0]
  ------------------
  309|  7.73M|        c = str->data;
  310|  7.73M|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  311|       |        /* No NUL terminator in fuzzing builds */
  312|  7.73M|        str->data = OPENSSL_realloc(c, len != 0 ? len : 1);
  ------------------
  |  |  120|  15.4M|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (120:26): [True: 7.73M, False: 0]
  |  |  ------------------
  ------------------
  313|       |#else
  314|       |        str->data = OPENSSL_realloc(c, len + 1);
  315|       |#endif
  316|  7.73M|        if (str->data == NULL) {
  ------------------
  |  Branch (316:13): [True: 0, False: 7.73M]
  ------------------
  317|      0|            str->data = c;
  318|      0|            return 0;
  319|      0|        }
  320|  7.73M|    }
  321|  7.73M|    str->length = (int)len;
  322|  7.73M|    if (data != NULL) {
  ------------------
  |  Branch (322:9): [True: 6.84M, False: 892k]
  ------------------
  323|  6.84M|        memcpy(str->data, data, len);
  324|  6.84M|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  325|       |        /* Set the unused byte to something non NUL and printable. */
  326|  6.84M|        if (len == 0)
  ------------------
  |  Branch (326:13): [True: 0, False: 6.84M]
  ------------------
  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|  6.84M|    }
  336|  7.73M|    return 1;
  337|  7.73M|}
ASN1_STRING_set0:
  340|  5.27M|{
  341|  5.27M|    OPENSSL_free(str->data);
  ------------------
  |  |  131|  5.27M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  342|  5.27M|    str->data = data;
  343|  5.27M|    str->length = len;
  344|  5.27M|}
ASN1_STRING_type_new:
  352|  9.84M|{
  353|  9.84M|    ASN1_STRING *ret;
  354|       |
  355|  9.84M|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  9.84M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|  9.84M|    if (ret == NULL)
  ------------------
  |  Branch (356:9): [True: 0, False: 9.84M]
  ------------------
  357|      0|        return NULL;
  358|  9.84M|    ret->type = type;
  359|  9.84M|    return ret;
  360|  9.84M|}
ossl_asn1_string_embed_free:
  363|  12.2M|{
  364|  12.2M|    if (a == NULL)
  ------------------
  |  Branch (364:9): [True: 0, False: 12.2M]
  ------------------
  365|      0|        return;
  366|  12.2M|    if (!(a->flags & ASN1_STRING_FLAG_NDEF))
  ------------------
  |  |  170|  12.2M|#define ASN1_STRING_FLAG_NDEF 0x010
  ------------------
  |  Branch (366:9): [True: 12.2M, False: 0]
  ------------------
  367|  12.2M|        OPENSSL_free(a->data);
  ------------------
  |  |  131|  12.2M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  368|  12.2M|    if (embed == 0)
  ------------------
  |  Branch (368:9): [True: 9.84M, False: 2.37M]
  ------------------
  369|  9.84M|        OPENSSL_free(a);
  ------------------
  |  |  131|  9.84M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|  12.2M|}
ASN1_STRING_free:
  373|  2.98M|{
  374|  2.98M|    if (a == NULL)
  ------------------
  |  Branch (374:9): [True: 1.36M, False: 1.62M]
  ------------------
  375|  1.36M|        return;
  376|  1.62M|    ossl_asn1_string_embed_free(a, a->flags & ASN1_STRING_FLAG_EMBED);
  ------------------
  |  |  185|  1.62M|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  377|  1.62M|}
ASN1_STRING_cmp:
  389|  95.9k|{
  390|  95.9k|    int i;
  391|       |
  392|  95.9k|    i = (a->length - b->length);
  393|  95.9k|    if (i == 0) {
  ------------------
  |  Branch (393:9): [True: 95.9k, False: 0]
  ------------------
  394|  95.9k|        if (a->length != 0)
  ------------------
  |  Branch (394:13): [True: 95.9k, False: 0]
  ------------------
  395|  95.9k|            i = memcmp(a->data, b->data, a->length);
  396|  95.9k|        if (i == 0)
  ------------------
  |  Branch (396:13): [True: 95.9k, False: 0]
  ------------------
  397|  95.9k|            return a->type - b->type;
  398|      0|        else
  399|      0|            return i;
  400|  95.9k|    } else {
  401|      0|        return i;
  402|      0|    }
  403|  95.9k|}
ASN1_STRING_length:
  406|  1.24M|{
  407|  1.24M|    return x->length;
  408|  1.24M|}
ASN1_STRING_get0_data:
  423|  1.24M|{
  424|  1.24M|    return x->data;
  425|  1.24M|}
asn1_lib.c:asn1_get_length:
  118|  36.3M|{
  119|  36.3M|    const unsigned char *p = *pp;
  120|  36.3M|    unsigned long ret = 0;
  121|  36.3M|    int i;
  122|       |
  123|  36.3M|    if (max-- < 1)
  ------------------
  |  Branch (123:9): [True: 0, False: 36.3M]
  ------------------
  124|      0|        return 0;
  125|  36.3M|    if (*p == 0x80) {
  ------------------
  |  Branch (125:9): [True: 0, False: 36.3M]
  ------------------
  126|      0|        *inf = 1;
  127|      0|        p++;
  128|  36.3M|    } else {
  129|  36.3M|        *inf = 0;
  130|  36.3M|        i = *p & 0x7f;
  131|  36.3M|        if (*p++ & 0x80) {
  ------------------
  |  Branch (131:13): [True: 4.74M, False: 31.6M]
  ------------------
  132|  4.74M|            if (max < i + 1)
  ------------------
  |  Branch (132:17): [True: 0, False: 4.74M]
  ------------------
  133|      0|                return 0;
  134|       |            /* Skip leading zeroes */
  135|  4.74M|            while (i > 0 && *p == 0) {
  ------------------
  |  Branch (135:20): [True: 4.74M, False: 0]
  |  Branch (135:29): [True: 0, False: 4.74M]
  ------------------
  136|      0|                p++;
  137|      0|                i--;
  138|      0|            }
  139|  4.74M|            if (i > (int)sizeof(long))
  ------------------
  |  Branch (139:17): [True: 0, False: 4.74M]
  ------------------
  140|      0|                return 0;
  141|  13.8M|            while (i > 0) {
  ------------------
  |  Branch (141:20): [True: 9.14M, False: 4.74M]
  ------------------
  142|  9.14M|                ret <<= 8;
  143|  9.14M|                ret |= *p++;
  144|  9.14M|                i--;
  145|  9.14M|            }
  146|  4.74M|            if (ret > LONG_MAX)
  ------------------
  |  Branch (146:17): [True: 0, False: 4.74M]
  ------------------
  147|      0|                return 0;
  148|  31.6M|        } else {
  149|  31.6M|            ret = i;
  150|  31.6M|        }
  151|  36.3M|    }
  152|  36.3M|    *pp = p;
  153|  36.3M|    *rl = (long)ret;
  154|  36.3M|    return 1;
  155|  36.3M|}
asn1_lib.c:asn1_put_length:
  201|  14.4M|{
  202|  14.4M|    unsigned char *p = *pp;
  203|  14.4M|    int i, len;
  204|       |
  205|  14.4M|    if (length <= 127) {
  ------------------
  |  Branch (205:9): [True: 13.7M, False: 653k]
  ------------------
  206|  13.7M|        *(p++) = (unsigned char)length;
  207|  13.7M|    } else {
  208|   653k|        len = length;
  209|  1.95M|        for (i = 0; len > 0; i++)
  ------------------
  |  Branch (209:21): [True: 1.30M, False: 653k]
  ------------------
  210|  1.30M|            len >>= 8;
  211|   653k|        *(p++) = i | 0x80;
  212|   653k|        len = i;
  213|  1.95M|        while (i-- > 0) {
  ------------------
  |  Branch (213:16): [True: 1.30M, False: 653k]
  ------------------
  214|  1.30M|            p[i] = length & 0xff;
  215|  1.30M|            length >>= 8;
  216|  1.30M|        }
  217|   653k|        p += len;
  218|   653k|    }
  219|  14.4M|    *pp = p;
  220|  14.4M|}

ASN1_tag2bit:
  106|  7.19M|{
  107|  7.19M|    if ((tag < 0) || (tag > 30))
  ------------------
  |  Branch (107:9): [True: 0, False: 7.19M]
  |  Branch (107:22): [True: 0, False: 7.19M]
  ------------------
  108|      0|        return 0;
  109|  7.19M|    return tag2bit[tag];
  110|  7.19M|}
ASN1_item_ex_d2i:
  153|   887k|{
  154|   887k|    return asn1_item_ex_d2i_intern(pval, in, len, it, tag, aclass, opt, ctx,
  155|   887k|        NULL, NULL);
  156|   887k|}
ASN1_item_d2i_ex:
  162|  2.87M|{
  163|  2.87M|    ASN1_TLC c;
  164|  2.87M|    ASN1_VALUE *ptmpval = NULL;
  165|       |
  166|  2.87M|    if (pval == NULL)
  ------------------
  |  Branch (166:9): [True: 1.56M, False: 1.30M]
  ------------------
  167|  1.56M|        pval = &ptmpval;
  168|  2.87M|    asn1_tlc_clear_nc(&c);
  ------------------
  |  |  121|  2.87M|    do {                     \
  |  |  122|  2.87M|        (c)->valid = 0;      \
  |  |  123|  2.87M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (123:14): [Folded, False: 2.87M]
  |  |  ------------------
  ------------------
  169|  2.87M|    if (asn1_item_ex_d2i_intern(pval, in, len, it, -1, 0, 0, &c, libctx,
  ------------------
  |  Branch (169:9): [True: 2.87M, False: 0]
  ------------------
  170|  2.87M|            propq)
  171|  2.87M|        > 0)
  172|  2.87M|        return *pval;
  173|      0|    return NULL;
  174|  2.87M|}
ASN1_item_d2i:
  179|  2.43M|{
  180|  2.43M|    return ASN1_item_d2i_ex(pval, in, len, it, NULL, NULL);
  181|  2.43M|}
asn1_item_embed_d2i:
  193|  37.7M|{
  194|  37.7M|    const ASN1_TEMPLATE *tt, *errtt = NULL;
  195|  37.7M|    const ASN1_EXTERN_FUNCS *ef;
  196|  37.7M|    const ASN1_AUX *aux;
  197|  37.7M|    ASN1_aux_cb *asn1_cb;
  198|  37.7M|    const unsigned char *p = NULL, *q;
  199|  37.7M|    unsigned char oclass;
  200|  37.7M|    char seq_eoc, seq_nolen, cst, isopt;
  201|  37.7M|    long tmplen;
  202|  37.7M|    int i;
  203|  37.7M|    int otag;
  204|  37.7M|    int ret = 0;
  205|  37.7M|    ASN1_VALUE **pchptr;
  206|       |
  207|  37.7M|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 37.7M]
  |  Branch (207:25): [True: 0, False: 37.7M]
  ------------------
  208|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  209|      0|        return 0;
  210|      0|    }
  211|  37.7M|    if (len <= 0) {
  ------------------
  |  Branch (211:9): [True: 0, False: 37.7M]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return 0;
  214|      0|    }
  215|  37.7M|    aux = it->funcs;
  216|  37.7M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (216:9): [True: 3.62M, False: 34.1M]
  |  Branch (216:16): [True: 1.42M, False: 2.19M]
  ------------------
  217|  1.42M|        asn1_cb = aux->asn1_cb;
  218|  36.3M|    else
  219|  36.3M|        asn1_cb = 0;
  220|       |
  221|  37.7M|    if (++depth > ASN1_MAX_CONSTRUCTED_NEST) {
  ------------------
  |  |   27|  37.7M|#define ASN1_MAX_CONSTRUCTED_NEST 30
  ------------------
  |  Branch (221:9): [True: 0, False: 37.7M]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_NESTED_TOO_DEEP);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        goto err;
  224|      0|    }
  225|       |
  226|  37.7M|    switch (it->itype) {
  227|  21.4M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  21.4M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (227:5): [True: 21.4M, False: 16.2M]
  ------------------
  228|  21.4M|        if (it->templates) {
  ------------------
  |  Branch (228:13): [True: 4.08M, False: 17.3M]
  ------------------
  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.08M|            if ((tag != -1) || opt) {
  ------------------
  |  Branch (235:17): [True: 0, False: 4.08M]
  |  Branch (235:32): [True: 0, False: 4.08M]
  ------------------
  236|      0|                ERR_raise(ERR_LIB_ASN1,
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  237|      0|                    ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE);
  238|      0|                goto err;
  239|      0|            }
  240|  4.08M|            return asn1_template_ex_d2i(pval, in, len, it->templates, opt, ctx,
  241|  4.08M|                depth, libctx, propq);
  242|  4.08M|        }
  243|  17.3M|        return asn1_d2i_ex_primitive(pval, in, len, it,
  244|  17.3M|            tag, aclass, opt, ctx);
  245|       |
  246|  4.03M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  4.03M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (246:5): [True: 4.03M, False: 33.7M]
  ------------------
  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.03M|        if (tag != -1) {
  ------------------
  |  Branch (251:13): [True: 0, False: 4.03M]
  ------------------
  252|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|            goto err;
  254|      0|        }
  255|       |
  256|  4.03M|        p = *in;
  257|       |        /* Just read in tag and class */
  258|  4.03M|        ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL,
  259|  4.03M|            &p, len, -1, 0, 1, ctx);
  260|  4.03M|        if (!ret) {
  ------------------
  |  Branch (260:13): [True: 0, False: 4.03M]
  ------------------
  261|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  262|      0|            goto err;
  263|      0|        }
  264|       |
  265|       |        /* Must be UNIVERSAL class */
  266|  4.03M|        if (oclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|  4.03M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (266:13): [True: 0, False: 4.03M]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|            goto err;
  272|      0|        }
  273|       |
  274|       |        /* Check tag matches bit map */
  275|  4.03M|        if (!(ASN1_tag2bit(otag) & it->utype)) {
  ------------------
  |  Branch (275:13): [True: 0, False: 4.03M]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  280|      0|            goto err;
  281|      0|        }
  282|  4.03M|        return asn1_d2i_ex_primitive(pval, in, len, it, otag, 0, 0, ctx);
  283|       |
  284|  1.75M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  1.75M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (284:5): [True: 1.75M, False: 35.9M]
  ------------------
  285|       |        /* Use new style d2i */
  286|  1.75M|        ef = it->funcs;
  287|  1.75M|        if (ef->asn1_ex_d2i_ex != NULL)
  ------------------
  |  Branch (287:13): [True: 871k, False: 887k]
  ------------------
  288|   871k|            return ef->asn1_ex_d2i_ex(pval, in, len, it, tag, aclass, opt, ctx,
  289|   871k|                libctx, propq);
  290|   887k|        return ef->asn1_ex_d2i(pval, in, len, it, tag, aclass, opt, ctx);
  291|       |
  292|   111k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|   111k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (292:5): [True: 111k, False: 37.6M]
  ------------------
  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|   111k|        if (tag != -1) {
  ------------------
  |  Branch (297:13): [True: 0, False: 111k]
  ------------------
  298|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|            goto err;
  300|      0|        }
  301|       |
  302|   111k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|  44.0k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (302:13): [True: 44.0k, False: 67.3k]
  |  Branch (302:24): [True: 0, False: 44.0k]
  ------------------
  303|      0|            goto auxerr;
  304|   111k|        if (*pval) {
  ------------------
  |  Branch (304:13): [True: 0, False: 111k]
  ------------------
  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|   111k|        } else if (!ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (313:20): [True: 0, False: 111k]
  ------------------
  314|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  315|      0|            goto err;
  316|      0|        }
  317|       |        /* CHOICE type, try each possibility in turn */
  318|   111k|        p = *in;
  319|   445k|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (319:41): [True: 445k, False: 0]
  ------------------
  320|   445k|            pchptr = ossl_asn1_get_field_ptr(pval, tt);
  321|       |            /*
  322|       |             * We mark field as OPTIONAL so its absence can be recognised.
  323|       |             */
  324|   445k|            ret = asn1_template_ex_d2i(pchptr, &p, len, tt, 1, ctx, depth,
  325|   445k|                libctx, propq);
  326|       |            /* If field not present, try the next one */
  327|   445k|            if (ret == -1)
  ------------------
  |  Branch (327:17): [True: 334k, False: 111k]
  ------------------
  328|   334k|                continue;
  329|       |            /* If positive return, read OK, break loop */
  330|   111k|            if (ret > 0)
  ------------------
  |  Branch (330:17): [True: 111k, False: 0]
  ------------------
  331|   111k|                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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  339|      0|            goto err;
  340|   111k|        }
  341|       |
  342|       |        /* Did we fall off the end without reading anything? */
  343|   111k|        if (i == it->tcount) {
  ------------------
  |  Branch (343:13): [True: 0, False: 111k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|            goto err;
  352|      0|        }
  353|       |
  354|   111k|        ossl_asn1_set_choice_selector(pval, i, it);
  355|       |
  356|   111k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|  44.0k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (356:13): [True: 44.0k, False: 67.3k]
  |  Branch (356:24): [True: 0, False: 44.0k]
  ------------------
  357|      0|            goto auxerr;
  358|   111k|        *in = p;
  359|   111k|        return 1;
  360|       |
  361|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (361:5): [True: 0, False: 37.7M]
  ------------------
  362|  10.3M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  10.3M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (362:5): [True: 10.3M, False: 27.3M]
  ------------------
  363|  10.3M|        p = *in;
  364|  10.3M|        tmplen = len;
  365|       |
  366|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  367|  10.3M|        if (tag == -1) {
  ------------------
  |  Branch (367:13): [True: 10.2M, False: 111k]
  ------------------
  368|  10.2M|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  10.2M|#define V_ASN1_SEQUENCE 16
  ------------------
  369|  10.2M|            aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  10.2M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  370|  10.2M|        }
  371|       |        /* Get SEQUENCE length and update len, p */
  372|  10.3M|        ret = asn1_check_tlen(&len, NULL, NULL, &seq_eoc, &cst,
  373|  10.3M|            &p, len, tag, aclass, opt, ctx);
  374|  10.3M|        if (!ret) {
  ------------------
  |  Branch (374:13): [True: 0, False: 10.3M]
  ------------------
  375|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  376|      0|            goto err;
  377|  10.3M|        } else if (ret == -1)
  ------------------
  |  Branch (377:20): [True: 111k, False: 10.2M]
  ------------------
  378|   111k|            return -1;
  379|  10.2M|        if (aux && (aux->flags & ASN1_AFLG_BROKEN)) {
  ------------------
  |  |  725|  1.18M|#define ASN1_AFLG_BROKEN 4
  ------------------
  |  Branch (379:13): [True: 1.18M, False: 9.09M]
  |  Branch (379:20): [True: 0, False: 1.18M]
  ------------------
  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|  10.2M|        else
  385|  10.2M|            seq_nolen = seq_eoc;
  386|  10.2M|        if (!cst) {
  ------------------
  |  Branch (386:13): [True: 0, False: 10.2M]
  ------------------
  387|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_SEQUENCE_NOT_CONSTRUCTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  388|      0|            goto err;
  389|      0|        }
  390|       |
  391|  10.2M|        if (*pval == NULL
  ------------------
  |  Branch (391:13): [True: 5.92M, False: 4.35M]
  ------------------
  392|  5.92M|            && !ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (392:16): [True: 0, False: 5.92M]
  ------------------
  393|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  394|      0|            goto err;
  395|      0|        }
  396|       |
  397|  10.2M|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|   752k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (397:13): [True: 752k, False: 9.52M]
  |  Branch (397:24): [True: 0, False: 752k]
  ------------------
  398|      0|            goto auxerr;
  399|       |
  400|       |        /* Free up and zero any ADB found */
  401|  36.3M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (401:41): [True: 26.1M, False: 10.2M]
  ------------------
  402|  26.1M|            if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|  26.1M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (402:17): [True: 0, False: 26.1M]
  ------------------
  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|  26.1M|        }
  412|       |
  413|       |        /* Get each field entry */
  414|  35.5M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (414:41): [True: 26.0M, False: 9.55M]
  ------------------
  415|  26.0M|            const ASN1_TEMPLATE *seqtt;
  416|  26.0M|            ASN1_VALUE **pseqval;
  417|  26.0M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  418|  26.0M|            if (seqtt == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 26.0M]
  ------------------
  419|      0|                goto err;
  420|  26.0M|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  421|       |            /* Have we ran out of data? */
  422|  26.0M|            if (!len)
  ------------------
  |  Branch (422:17): [True: 723k, False: 25.2M]
  ------------------
  423|   723k|                break;
  424|  25.2M|            q = p;
  425|  25.2M|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (425:17): [True: 0, False: 25.2M]
  ------------------
  426|      0|                if (!seq_eoc) {
  ------------------
  |  Branch (426:21): [True: 0, False: 0]
  ------------------
  427|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_UNEXPECTED_EOC);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|  25.2M|            if (i == (it->tcount - 1))
  ------------------
  |  Branch (440:17): [True: 9.55M, False: 15.7M]
  ------------------
  441|  9.55M|                isopt = 0;
  442|  15.7M|            else
  443|  15.7M|                isopt = (char)(seqtt->flags & ASN1_TFLG_OPTIONAL);
  ------------------
  |  |  512|  15.7M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  444|       |            /*
  445|       |             * attempt to read in field, allowing each to be OPTIONAL
  446|       |             */
  447|       |
  448|  25.2M|            ret = asn1_template_ex_d2i(pseqval, &p, len, seqtt, isopt, ctx,
  449|  25.2M|                depth, libctx, propq);
  450|  25.2M|            if (!ret) {
  ------------------
  |  Branch (450:17): [True: 0, False: 25.2M]
  ------------------
  451|      0|                errtt = seqtt;
  452|      0|                goto err;
  453|  25.2M|            } else if (ret == -1) {
  ------------------
  |  Branch (453:24): [True: 1.54M, False: 23.7M]
  ------------------
  454|       |                /*
  455|       |                 * OPTIONAL component absent. Free and zero the field.
  456|       |                 */
  457|  1.54M|                ossl_asn1_template_free(pseqval, seqtt);
  458|  1.54M|                continue;
  459|  1.54M|            }
  460|       |            /* Update length */
  461|  23.7M|            len -= (long)(p - q);
  462|  23.7M|        }
  463|       |
  464|       |        /* Check for EOC if expecting one */
  465|  10.2M|        if (seq_eoc && !asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (465:13): [True: 0, False: 10.2M]
  |  Branch (465:24): [True: 0, False: 0]
  ------------------
  466|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|      0|            goto err;
  468|      0|        }
  469|       |        /* Check all data read */
  470|  10.2M|        if (!seq_nolen && len) {
  ------------------
  |  Branch (470:13): [True: 10.2M, False: 0]
  |  Branch (470:27): [True: 0, False: 10.2M]
  ------------------
  471|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_SEQUENCE_LENGTH_MISMATCH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|  11.1M|        for (; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (480:16): [True: 837k, False: 10.2M]
  ------------------
  481|   837k|            const ASN1_TEMPLATE *seqtt;
  482|   837k|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  483|   837k|            if (seqtt == NULL)
  ------------------
  |  Branch (483:17): [True: 0, False: 837k]
  ------------------
  484|      0|                goto err;
  485|   837k|            if (seqtt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|   837k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (485:17): [True: 837k, False: 0]
  ------------------
  486|   837k|                ASN1_VALUE **pseqval;
  487|   837k|                pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  488|   837k|                ossl_asn1_template_free(pseqval, seqtt);
  489|   837k|            } else {
  490|      0|                errtt = seqtt;
  491|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_FIELD_MISSING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  492|      0|                goto err;
  493|      0|            }
  494|   837k|        }
  495|       |        /* Save encoding */
  496|  10.2M|        if (!ossl_asn1_enc_save(pval, *in, (long)(p - *in), it))
  ------------------
  |  Branch (496:13): [True: 0, False: 10.2M]
  ------------------
  497|      0|            goto auxerr;
  498|  10.2M|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|   752k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (498:13): [True: 752k, False: 9.52M]
  |  Branch (498:24): [True: 0, False: 752k]
  ------------------
  499|      0|            goto auxerr;
  500|  10.2M|        *in = p;
  501|  10.2M|        return 1;
  502|       |
  503|      0|    default:
  ------------------
  |  Branch (503:5): [True: 0, False: 37.7M]
  ------------------
  504|      0|        return 0;
  505|  37.7M|    }
  506|      0|auxerr:
  507|      0|    ERR_raise(ERR_LIB_ASN1, ASN1_R_AUX_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|  3.75M|{
  137|  3.75M|    int rv;
  138|       |
  139|  3.75M|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (139:9): [True: 0, False: 3.75M]
  |  Branch (139:25): [True: 0, False: 3.75M]
  ------------------
  140|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  141|      0|        return 0;
  142|      0|    }
  143|  3.75M|    rv = asn1_item_embed_d2i(pval, in, len, it, tag, aclass, opt, ctx, 0,
  144|  3.75M|        libctx, propq);
  145|  3.75M|    if (rv <= 0)
  ------------------
  |  Branch (145:9): [True: 0, False: 3.75M]
  ------------------
  146|      0|        ASN1_item_ex_free(pval, it);
  147|  3.75M|    return rv;
  148|  3.75M|}
tasn_dec.c:asn1_template_ex_d2i:
  527|  29.8M|{
  528|  29.8M|    int flags, aclass;
  529|  29.8M|    int ret;
  530|  29.8M|    long len;
  531|  29.8M|    const unsigned char *p, *q;
  532|  29.8M|    char exp_eoc;
  533|  29.8M|    if (!val)
  ------------------
  |  Branch (533:9): [True: 0, False: 29.8M]
  ------------------
  534|      0|        return 0;
  535|  29.8M|    flags = tt->flags;
  536|  29.8M|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  29.8M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  537|       |
  538|  29.8M|    p = *in;
  539|       |
  540|       |    /* Check if EXPLICIT tag expected */
  541|  29.8M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  29.8M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (541:9): [True: 975k, False: 28.8M]
  ------------------
  542|   975k|        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|   975k|        ret = asn1_check_tlen(&len, NULL, NULL, &exp_eoc, &cst,
  548|   975k|            &p, inlen, tt->tag, aclass, opt, ctx);
  549|   975k|        q = p;
  550|   975k|        if (!ret) {
  ------------------
  |  Branch (550:13): [True: 0, False: 975k]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            return 0;
  553|   975k|        } else if (ret == -1)
  ------------------
  |  Branch (553:20): [True: 44.0k, False: 931k]
  ------------------
  554|  44.0k|            return -1;
  555|   931k|        if (!cst) {
  ------------------
  |  Branch (555:13): [True: 0, False: 931k]
  ------------------
  556|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  557|      0|            return 0;
  558|      0|        }
  559|       |        /* We've found the field so it can't be OPTIONAL now */
  560|   931k|        ret = asn1_template_noexp_d2i(val, &p, len, tt, 0, ctx, depth, libctx,
  561|   931k|            propq);
  562|   931k|        if (!ret) {
  ------------------
  |  Branch (562:13): [True: 0, False: 931k]
  ------------------
  563|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|            return 0;
  565|      0|        }
  566|       |        /* We read the field in OK so update length */
  567|   931k|        len -= (long)(p - q);
  568|   931k|        if (exp_eoc) {
  ------------------
  |  Branch (568:13): [True: 0, False: 931k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  572|      0|                goto err;
  573|      0|            }
  574|   931k|        } else {
  575|       |            /*
  576|       |             * Otherwise we must hit the EXPLICIT tag end or its an error
  577|       |             */
  578|   931k|            if (len) {
  ------------------
  |  Branch (578:17): [True: 0, False: 931k]
  ------------------
  579|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_EXPLICIT_LENGTH_MISMATCH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  580|      0|                goto err;
  581|      0|            }
  582|   931k|        }
  583|   931k|    } else
  584|  28.8M|        return asn1_template_noexp_d2i(val, in, inlen, tt, opt, ctx, depth,
  585|  28.8M|            libctx, propq);
  586|       |
  587|   931k|    *in = p;
  588|   931k|    return 1;
  589|       |
  590|      0|err:
  591|      0|    return 0;
  592|  29.8M|}
tasn_dec.c:asn1_template_noexp_d2i:
  599|  29.7M|{
  600|  29.7M|    int flags, aclass;
  601|  29.7M|    int ret;
  602|  29.7M|    ASN1_VALUE *tval;
  603|  29.7M|    const unsigned char *p, *q;
  604|  29.7M|    if (!val)
  ------------------
  |  Branch (604:9): [True: 0, False: 29.7M]
  ------------------
  605|      0|        return 0;
  606|  29.7M|    flags = tt->flags;
  607|  29.7M|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  29.7M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  608|       |
  609|  29.7M|    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|  29.7M|    if (tt->flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  29.7M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (615:9): [True: 4.11M, False: 25.6M]
  ------------------
  616|  4.11M|        tval = (ASN1_VALUE *)val;
  617|  4.11M|        val = &tval;
  618|  4.11M|    }
  619|       |
  620|  29.7M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  29.7M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (620:9): [True: 4.57M, False: 25.1M]
  ------------------
  621|       |        /* SET OF, SEQUENCE OF */
  622|  4.57M|        int sktag, skaclass;
  623|  4.57M|        char sk_eoc;
  624|       |        /* First work out expected inner tag value */
  625|  4.57M|        if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|  4.57M|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (625:13): [True: 57.0k, False: 4.52M]
  ------------------
  626|  57.0k|            sktag = tt->tag;
  627|  57.0k|            skaclass = aclass;
  628|  4.52M|        } else {
  629|  4.52M|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  4.52M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  630|  4.52M|            if (flags & ASN1_TFLG_SET_OF)
  ------------------
  |  |  515|  4.52M|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (630:17): [True: 3.16M, False: 1.35M]
  ------------------
  631|  3.16M|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  3.16M|#define V_ASN1_SET 17
  ------------------
  632|  1.35M|            else
  633|  1.35M|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  1.35M|#define V_ASN1_SEQUENCE 16
  ------------------
  634|  4.52M|        }
  635|       |        /* Get the tag */
  636|  4.57M|        ret = asn1_check_tlen(&len, NULL, NULL, &sk_eoc, NULL,
  637|  4.57M|            &p, len, sktag, skaclass, opt, ctx);
  638|  4.57M|        if (!ret) {
  ------------------
  |  Branch (638:13): [True: 0, False: 4.57M]
  ------------------
  639|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  640|      0|            return 0;
  641|  4.57M|        } else if (ret == -1)
  ------------------
  |  Branch (641:20): [True: 0, False: 4.57M]
  ------------------
  642|      0|            return -1;
  643|  4.57M|        if (*val == NULL)
  ------------------
  |  Branch (643:13): [True: 4.57M, False: 0]
  ------------------
  644|  4.57M|            *val = (ASN1_VALUE *)sk_ASN1_VALUE_new_null();
  ------------------
  |  |  890|  4.57M|#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_null())
  ------------------
  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));
  ------------------
  |  |  428|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  654|      0|            }
  655|      0|        }
  656|       |
  657|  4.57M|        if (*val == NULL) {
  ------------------
  |  Branch (657:13): [True: 0, False: 4.57M]
  ------------------
  658|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  659|      0|            goto err;
  660|      0|        }
  661|       |
  662|       |        /* Read as many items as we can */
  663|  12.5M|        while (len > 0) {
  ------------------
  |  Branch (663:16): [True: 7.93M, False: 4.57M]
  ------------------
  664|  7.93M|            ASN1_VALUE *skfield;
  665|  7.93M|            q = p;
  666|       |            /* See if EOC found */
  667|  7.93M|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (667:17): [True: 0, False: 7.93M]
  ------------------
  668|      0|                if (!sk_eoc) {
  ------------------
  |  Branch (668:21): [True: 0, False: 0]
  ------------------
  669|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_UNEXPECTED_EOC);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|  7.93M|            skfield = NULL;
  677|  7.93M|            if (asn1_item_embed_d2i(&skfield, &p, len,
  ------------------
  |  Branch (677:17): [True: 0, False: 7.93M]
  ------------------
  678|  7.93M|                    ASN1_ITEM_ptr(tt->item), -1, 0, 0, ctx,
  ------------------
  |  |  428|  7.93M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  679|  7.93M|                    depth, libctx, propq)
  680|  7.93M|                <= 0) {
  681|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  682|       |                /* |skfield| may be partially allocated despite failure. */
  683|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  428|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  684|      0|                goto err;
  685|      0|            }
  686|  7.93M|            len -= (long)(p - q);
  687|  7.93M|            if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val, skfield)) {
  ------------------
  |  |  897|  7.93M|#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: 7.93M]
  ------------------
  688|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  689|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  428|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  690|      0|                goto err;
  691|      0|            }
  692|  7.93M|        }
  693|  4.57M|        if (sk_eoc) {
  ------------------
  |  Branch (693:13): [True: 0, False: 4.57M]
  ------------------
  694|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  695|      0|            goto err;
  696|      0|        }
  697|  25.1M|    } else if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|  25.1M|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (697:16): [True: 1.30M, False: 23.8M]
  ------------------
  698|       |        /* IMPLICIT tagging */
  699|  1.30M|        ret = asn1_item_embed_d2i(val, &p, len,
  700|  1.30M|            ASN1_ITEM_ptr(tt->item), tt->tag, aclass, opt,
  ------------------
  |  |  428|  1.30M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  701|  1.30M|            ctx, depth, libctx, propq);
  702|  1.30M|        if (!ret) {
  ------------------
  |  Branch (702:13): [True: 0, False: 1.30M]
  ------------------
  703|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  704|      0|            goto err;
  705|  1.30M|        } else if (ret == -1)
  ------------------
  |  Branch (705:20): [True: 1.16M, False: 147k]
  ------------------
  706|  1.16M|            return -1;
  707|  23.8M|    } else {
  708|       |        /* Nothing special */
  709|  23.8M|        ret = asn1_item_embed_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  428|  23.8M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  710|  23.8M|            -1, 0, opt, ctx, depth, libctx, propq);
  711|  23.8M|        if (!ret) {
  ------------------
  |  Branch (711:13): [True: 0, False: 23.8M]
  ------------------
  712|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  713|      0|            goto err;
  714|  23.8M|        } else if (ret == -1)
  ------------------
  |  Branch (714:20): [True: 671k, False: 23.2M]
  ------------------
  715|   671k|            return -1;
  716|  23.8M|    }
  717|       |
  718|  27.9M|    *in = p;
  719|  27.9M|    return 1;
  720|       |
  721|      0|err:
  722|      0|    return 0;
  723|  29.7M|}
tasn_dec.c:asn1_d2i_ex_primitive:
  729|  21.4M|{
  730|  21.4M|    int ret = 0, utype;
  731|  21.4M|    long plen;
  732|  21.4M|    char cst, inf, free_cont = 0;
  733|  21.4M|    const unsigned char *p;
  734|  21.4M|    BUF_MEM buf = { 0, NULL, 0, 0 };
  735|  21.4M|    const unsigned char *cont = NULL;
  736|  21.4M|    long len;
  737|       |
  738|  21.4M|    if (pval == NULL) {
  ------------------
  |  Branch (738:9): [True: 0, False: 21.4M]
  ------------------
  739|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_NULL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  740|      0|        return 0; /* Should never happen */
  741|      0|    }
  742|       |
  743|  21.4M|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  21.4M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (743:9): [True: 4.03M, False: 17.3M]
  ------------------
  744|  4.03M|        utype = tag;
  745|  4.03M|        tag = -1;
  746|  4.03M|    } else
  747|  17.3M|        utype = it->utype;
  748|       |
  749|  21.4M|    if (utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  21.4M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (749:9): [True: 1.94M, False: 19.4M]
  ------------------
  750|       |        /* If type is ANY need to figure out type from tag */
  751|  1.94M|        unsigned char oclass;
  752|  1.94M|        if (tag >= 0) {
  ------------------
  |  Branch (752:13): [True: 0, False: 1.94M]
  ------------------
  753|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_TAGGED_ANY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  754|      0|            return 0;
  755|      0|        }
  756|  1.94M|        if (opt) {
  ------------------
  |  Branch (756:13): [True: 0, False: 1.94M]
  ------------------
  757|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_OPTIONAL_ANY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  758|      0|            return 0;
  759|      0|        }
  760|  1.94M|        p = *in;
  761|  1.94M|        ret = asn1_check_tlen(NULL, &utype, &oclass, NULL, NULL,
  762|  1.94M|            &p, inlen, -1, 0, 0, ctx);
  763|  1.94M|        if (!ret) {
  ------------------
  |  Branch (763:13): [True: 0, False: 1.94M]
  ------------------
  764|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  765|      0|            return 0;
  766|      0|        }
  767|  1.94M|        if (oclass != V_ASN1_UNIVERSAL)
  ------------------
  |  |   49|  1.94M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (767:13): [True: 0, False: 1.94M]
  ------------------
  768|      0|            utype = V_ASN1_OTHER;
  ------------------
  |  |   59|      0|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  769|  1.94M|    }
  770|  21.4M|    if (tag == -1) {
  ------------------
  |  Branch (770:9): [True: 20.2M, False: 1.19M]
  ------------------
  771|  20.2M|        tag = utype;
  772|  20.2M|        aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  20.2M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  773|  20.2M|    }
  774|  21.4M|    p = *in;
  775|       |    /* Check header */
  776|  21.4M|    ret = asn1_check_tlen(&plen, NULL, NULL, &inf, &cst,
  777|  21.4M|        &p, inlen, tag, aclass, opt, ctx);
  778|  21.4M|    if (!ret) {
  ------------------
  |  Branch (778:9): [True: 0, False: 21.4M]
  ------------------
  779|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  780|      0|        return 0;
  781|  21.4M|    } else if (ret == -1)
  ------------------
  |  Branch (781:16): [True: 1.72M, False: 19.6M]
  ------------------
  782|  1.72M|        return -1;
  783|  19.6M|    ret = 0;
  784|       |    /* SEQUENCE, SET and "OTHER" are left in encoded form */
  785|  19.6M|    if ((utype == V_ASN1_SEQUENCE)
  ------------------
  |  |   76|  19.6M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (785:9): [True: 0, False: 19.6M]
  ------------------
  786|  19.6M|        || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   77|  19.6M|#define V_ASN1_SET 17
  ------------------
                      || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   59|  19.6M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (786:12): [True: 0, False: 19.6M]
  |  Branch (786:37): [True: 0, False: 19.6M]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|  19.6M|    } else if (cst) {
  ------------------
  |  Branch (810:16): [True: 0, False: 19.6M]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|  19.6M|    } else {
  838|  19.6M|        cont = p;
  839|  19.6M|        len = plen;
  840|  19.6M|        p += plen;
  841|  19.6M|    }
  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|  19.6M|    if (!asn1_ex_c2i(pval, cont, len, utype, &free_cont, it))
  ------------------
  |  Branch (845:9): [True: 0, False: 19.6M]
  ------------------
  846|      0|        goto err;
  847|       |
  848|  19.6M|    *in = p;
  849|  19.6M|    ret = 1;
  850|  19.6M|err:
  851|  19.6M|    if (free_cont)
  ------------------
  |  Branch (851:9): [True: 0, False: 19.6M]
  ------------------
  852|      0|        OPENSSL_free(buf.data);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  853|  19.6M|    return ret;
  854|  19.6M|}
tasn_dec.c:asn1_ex_c2i:
  860|  19.6M|{
  861|  19.6M|    ASN1_VALUE **opval = NULL;
  862|  19.6M|    ASN1_STRING *stmp;
  863|  19.6M|    ASN1_TYPE *typ = NULL;
  864|  19.6M|    int ret = 0;
  865|  19.6M|    const ASN1_PRIMITIVE_FUNCS *pf;
  866|  19.6M|    ASN1_INTEGER **tint;
  867|  19.6M|    pf = it->funcs;
  868|       |
  869|  19.6M|    if (pf && pf->prim_c2i)
  ------------------
  |  Branch (869:9): [True: 633k, False: 19.0M]
  |  Branch (869:15): [True: 633k, False: 0]
  ------------------
  870|   633k|        return pf->prim_c2i(pval, cont, len, utype, free_cont, it);
  871|       |    /* If ANY type clear type and set pointer to internal value */
  872|  19.0M|    if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  19.0M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (872:9): [True: 1.94M, False: 17.1M]
  ------------------
  873|  1.94M|        if (*pval == NULL) {
  ------------------
  |  Branch (873:13): [True: 1.94M, False: 0]
  ------------------
  874|  1.94M|            typ = ASN1_TYPE_new();
  875|  1.94M|            if (typ == NULL)
  ------------------
  |  Branch (875:17): [True: 0, False: 1.94M]
  ------------------
  876|      0|                goto err;
  877|  1.94M|            *pval = (ASN1_VALUE *)typ;
  878|  1.94M|        } else
  879|      0|            typ = (ASN1_TYPE *)*pval;
  880|       |
  881|  1.94M|        if (utype != typ->type)
  ------------------
  |  Branch (881:13): [True: 1.94M, False: 0]
  ------------------
  882|  1.94M|            ASN1_TYPE_set(typ, utype, NULL);
  883|  1.94M|        opval = pval;
  884|  1.94M|        pval = &typ->value.asn1_value;
  885|  1.94M|    }
  886|  19.0M|    switch (utype) {
  887|  7.20M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  7.20M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (887:5): [True: 7.20M, False: 11.8M]
  ------------------
  888|  7.20M|        if (!ossl_c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, len))
  ------------------
  |  Branch (888:13): [True: 0, False: 7.20M]
  ------------------
  889|      0|            goto err;
  890|  7.20M|        break;
  891|       |
  892|  7.20M|    case V_ASN1_NULL:
  ------------------
  |  |   69|  1.58M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (892:5): [True: 1.58M, False: 17.4M]
  ------------------
  893|  1.58M|        if (len) {
  ------------------
  |  Branch (893:13): [True: 0, False: 1.58M]
  ------------------
  894|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_NULL_IS_WRONG_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  895|      0|            goto err;
  896|      0|        }
  897|  1.58M|        *pval = (ASN1_VALUE *)1;
  898|  1.58M|        break;
  899|       |
  900|  1.20M|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|  1.20M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (900:5): [True: 1.20M, False: 17.8M]
  ------------------
  901|  1.20M|        if (len != 1) {
  ------------------
  |  Branch (901:13): [True: 0, False: 1.20M]
  ------------------
  902|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  903|      0|            goto err;
  904|  1.20M|        } else {
  905|  1.20M|            ASN1_BOOLEAN *tbool;
  906|  1.20M|            tbool = (ASN1_BOOLEAN *)pval;
  907|  1.20M|            *tbool = *cont;
  908|  1.20M|        }
  909|  1.20M|        break;
  910|       |
  911|  2.11M|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|  2.11M|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (911:5): [True: 2.11M, False: 16.9M]
  ------------------
  912|  2.11M|        if (!ossl_c2i_ASN1_BIT_STRING((ASN1_BIT_STRING **)pval, &cont, len))
  ------------------
  |  Branch (912:13): [True: 0, False: 2.11M]
  ------------------
  913|      0|            goto err;
  914|  2.11M|        break;
  915|       |
  916|  2.11M|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|   892k|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (916:5): [True: 892k, False: 18.1M]
  ------------------
  917|   892k|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|   892k|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (917:5): [True: 0, False: 19.0M]
  ------------------
  918|   892k|        tint = (ASN1_INTEGER **)pval;
  919|   892k|        if (!ossl_c2i_ASN1_INTEGER(tint, &cont, len))
  ------------------
  |  Branch (919:13): [True: 0, False: 892k]
  ------------------
  920|      0|            goto err;
  921|       |        /* Fixup type to match the expected form */
  922|   892k|        (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG);
  ------------------
  |  |   99|   892k|#define V_ASN1_NEG 0x100
  ------------------
  923|   892k|        break;
  924|       |
  925|  1.96M|    case V_ASN1_OCTET_STRING:
  ------------------
  |  |   68|  1.96M|#define V_ASN1_OCTET_STRING 4
  ------------------
  |  Branch (925:5): [True: 1.96M, False: 17.0M]
  ------------------
  926|  1.96M|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|  1.96M|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (926:5): [True: 0, False: 19.0M]
  ------------------
  927|  4.31M|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|  4.31M|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (927:5): [True: 2.35M, False: 16.6M]
  ------------------
  928|  4.31M|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|  4.31M|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (928:5): [True: 5.97k, False: 19.0M]
  ------------------
  929|  4.31M|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|  4.31M|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (929:5): [True: 0, False: 19.0M]
  ------------------
  930|  4.37M|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|  4.37M|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (930:5): [True: 57.8k, False: 18.9M]
  ------------------
  931|  5.24M|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|  5.24M|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (931:5): [True: 865k, False: 18.1M]
  ------------------
  932|  5.24M|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|  5.24M|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (932:5): [True: 5.97k, False: 19.0M]
  ------------------
  933|  5.24M|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|  5.24M|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (933:5): [True: 0, False: 19.0M]
  ------------------
  934|  5.24M|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|  5.24M|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (934:5): [True: 0, False: 19.0M]
  ------------------
  935|  5.24M|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|  5.24M|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (935:5): [True: 0, False: 19.0M]
  ------------------
  936|  5.24M|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|  5.24M|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (936:5): [True: 0, False: 19.0M]
  ------------------
  937|  5.24M|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|  5.24M|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (937:5): [True: 0, False: 19.0M]
  ------------------
  938|  6.04M|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|  6.04M|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (938:5): [True: 798k, False: 18.2M]
  ------------------
  939|  6.04M|    case V_ASN1_OTHER:
  ------------------
  |  |   59|  6.04M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (939:5): [True: 0, False: 19.0M]
  ------------------
  940|  6.04M|    case V_ASN1_SET:
  ------------------
  |  |   77|  6.04M|#define V_ASN1_SET 17
  ------------------
  |  Branch (940:5): [True: 0, False: 19.0M]
  ------------------
  941|  6.04M|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|  6.04M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (941:5): [True: 0, False: 19.0M]
  ------------------
  942|  6.04M|    default:
  ------------------
  |  Branch (942:5): [True: 0, False: 19.0M]
  ------------------
  943|  6.04M|        if (utype == V_ASN1_BMPSTRING && (len & 1)) {
  ------------------
  |  |   91|  12.0M|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (943:13): [True: 0, False: 6.04M]
  |  Branch (943:42): [True: 0, False: 0]
  ------------------
  944|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  945|      0|            goto err;
  946|      0|        }
  947|  6.04M|        if (utype == V_ASN1_UNIVERSALSTRING && (len & 3)) {
  ------------------
  |  |   90|  12.0M|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (947:13): [True: 0, False: 6.04M]
  |  Branch (947:48): [True: 0, False: 0]
  ------------------
  948|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  949|      0|            goto err;
  950|      0|        }
  951|  6.04M|        if (utype == V_ASN1_GENERALIZEDTIME && (len < 15)) {
  ------------------
  |  |   85|  12.0M|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (951:13): [True: 5.97k, False: 6.03M]
  |  Branch (951:48): [True: 0, False: 5.97k]
  ------------------
  952|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  953|      0|            goto err;
  954|      0|        }
  955|  6.04M|        if (utype == V_ASN1_UTCTIME && (len < 13)) {
  ------------------
  |  |   84|  12.0M|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (955:13): [True: 865k, False: 5.18M]
  |  Branch (955:40): [True: 0, False: 865k]
  ------------------
  956|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UTCTIME_IS_TOO_SHORT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  957|      0|            goto err;
  958|      0|        }
  959|       |        /* All based on ASN1_STRING and handled the same */
  960|  6.04M|        if (*pval == NULL) {
  ------------------
  |  Branch (960:13): [True: 510k, False: 5.53M]
  ------------------
  961|   510k|            stmp = ASN1_STRING_type_new(utype);
  962|   510k|            if (stmp == NULL) {
  ------------------
  |  Branch (962:17): [True: 0, False: 510k]
  ------------------
  963|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  964|      0|                goto err;
  965|      0|            }
  966|   510k|            *pval = (ASN1_VALUE *)stmp;
  967|  5.53M|        } else {
  968|  5.53M|            stmp = (ASN1_STRING *)*pval;
  969|  5.53M|            stmp->type = utype;
  970|  5.53M|        }
  971|       |        /* If we've already allocated a buffer use it */
  972|  6.04M|        if (*free_cont) {
  ------------------
  |  Branch (972:13): [True: 0, False: 6.04M]
  ------------------
  973|      0|            ASN1_STRING_set0(stmp, (unsigned char *)cont /* UGLY CAST! */, len);
  974|      0|            *free_cont = 0;
  975|  6.04M|        } else {
  976|  6.04M|            if (!ASN1_STRING_set(stmp, cont, len)) {
  ------------------
  |  Branch (976:17): [True: 0, False: 6.04M]
  ------------------
  977|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  978|      0|                ASN1_STRING_free(stmp);
  979|      0|                *pval = NULL;
  980|      0|                goto err;
  981|      0|            }
  982|  6.04M|        }
  983|  6.04M|        break;
  984|  19.0M|    }
  985|       |    /* If ASN1_ANY and NULL type fix up value */
  986|  19.0M|    if (typ && (utype == V_ASN1_NULL))
  ------------------
  |  |   69|  1.94M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (986:9): [True: 1.94M, False: 17.1M]
  |  Branch (986:16): [True: 1.58M, False: 358k]
  ------------------
  987|  1.58M|        typ->value.ptr = NULL;
  988|       |
  989|  19.0M|    ret = 1;
  990|  19.0M|err:
  991|  19.0M|    if (!ret) {
  ------------------
  |  Branch (991:9): [True: 0, False: 19.0M]
  ------------------
  992|      0|        ASN1_TYPE_free(typ);
  993|      0|        if (opval)
  ------------------
  |  Branch (993:13): [True: 0, False: 0]
  ------------------
  994|      0|            *opval = NULL;
  995|      0|    }
  996|  19.0M|    return ret;
  997|  19.0M|}
tasn_dec.c:asn1_check_eoc:
 1153|  33.2M|{
 1154|  33.2M|    const unsigned char *p;
 1155|       |
 1156|  33.2M|    if (len < 2)
  ------------------
  |  Branch (1156:9): [True: 0, False: 33.2M]
  ------------------
 1157|      0|        return 0;
 1158|  33.2M|    p = *in;
 1159|  33.2M|    if (p[0] == '\0' && p[1] == '\0') {
  ------------------
  |  Branch (1159:9): [True: 0, False: 33.2M]
  |  Branch (1159:25): [True: 0, False: 0]
  ------------------
 1160|      0|        *in += 2;
 1161|      0|        return 1;
 1162|      0|    }
 1163|  33.2M|    return 0;
 1164|  33.2M|}
tasn_dec.c:asn1_check_tlen:
 1177|  43.3M|{
 1178|  43.3M|    int i;
 1179|  43.3M|    int ptag, pclass;
 1180|  43.3M|    long plen;
 1181|  43.3M|    const unsigned char *p, *q;
 1182|  43.3M|    p = *in;
 1183|  43.3M|    q = p;
 1184|       |
 1185|  43.3M|    if (len <= 0) {
  ------------------
  |  Branch (1185:9): [True: 0, False: 43.3M]
  ------------------
 1186|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1187|      0|        goto err;
 1188|      0|    }
 1189|  43.3M|    if (ctx != NULL && ctx->valid) {
  ------------------
  |  Branch (1189:9): [True: 43.3M, False: 0]
  |  Branch (1189:24): [True: 7.85M, False: 35.4M]
  ------------------
 1190|  7.85M|        i = ctx->ret;
 1191|  7.85M|        plen = ctx->plen;
 1192|  7.85M|        pclass = ctx->pclass;
 1193|  7.85M|        ptag = ctx->ptag;
 1194|  7.85M|        p += ctx->hdrlen;
 1195|  35.4M|    } else {
 1196|  35.4M|        i = ASN1_get_object(&p, &plen, &ptag, &pclass, len);
 1197|  35.4M|        if (ctx != NULL) {
  ------------------
  |  Branch (1197:13): [True: 35.4M, False: 0]
  ------------------
 1198|  35.4M|            ctx->ret = i;
 1199|  35.4M|            ctx->plen = plen;
 1200|  35.4M|            ctx->pclass = pclass;
 1201|  35.4M|            ctx->ptag = ptag;
 1202|  35.4M|            ctx->hdrlen = (int)(p - q);
 1203|  35.4M|            ctx->valid = 1;
 1204|       |            /*
 1205|       |             * If definite length, and no error, length + header can't exceed
 1206|       |             * total amount of data available.
 1207|       |             */
 1208|  35.4M|            if ((i & 0x81) == 0 && (plen + ctx->hdrlen) > len) {
  ------------------
  |  Branch (1208:17): [True: 35.4M, False: 0]
  |  Branch (1208:36): [True: 0, False: 35.4M]
  ------------------
 1209|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1210|      0|                goto err;
 1211|      0|            }
 1212|  35.4M|        }
 1213|  35.4M|    }
 1214|       |
 1215|  43.3M|    if ((i & 0x80) != 0) {
  ------------------
  |  Branch (1215:9): [True: 0, False: 43.3M]
  ------------------
 1216|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_OBJECT_HEADER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1217|      0|        goto err;
 1218|      0|    }
 1219|  43.3M|    if (exptag >= 0) {
  ------------------
  |  Branch (1219:9): [True: 37.3M, False: 5.97M]
  ------------------
 1220|  37.3M|        if (exptag != ptag || expclass != pclass) {
  ------------------
  |  Branch (1220:13): [True: 1.87M, False: 35.4M]
  |  Branch (1220:31): [True: 0, False: 35.4M]
  ------------------
 1221|       |            /*
 1222|       |             * If type is OPTIONAL, not an error: indicate missing type.
 1223|       |             */
 1224|  1.87M|            if (opt != 0)
  ------------------
  |  Branch (1224:17): [True: 1.87M, False: 0]
  ------------------
 1225|  1.87M|                return -1;
 1226|  1.87M|            ERR_raise(ERR_LIB_ASN1, ASN1_R_WRONG_TAG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1227|      0|            goto err;
 1228|  1.87M|        }
 1229|       |        /*
 1230|       |         * We have a tag and class match: assume we are going to do something
 1231|       |         * with it
 1232|       |         */
 1233|  35.4M|        asn1_tlc_clear(ctx);
  ------------------
  |  |  115|  35.4M|    do {                    \
  |  |  116|  35.4M|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 35.4M, False: 0]
  |  |  ------------------
  |  |  117|  35.4M|            (c)->valid = 0; \
  |  |  118|  35.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 35.4M]
  |  |  ------------------
  ------------------
 1234|  35.4M|    }
 1235|       |
 1236|  41.4M|    if ((i & 1) != 0)
  ------------------
  |  Branch (1236:9): [True: 0, False: 41.4M]
  ------------------
 1237|      0|        plen = len - (long)(p - q);
 1238|       |
 1239|  41.4M|    if (inf != NULL)
  ------------------
  |  Branch (1239:9): [True: 35.4M, False: 5.97M]
  ------------------
 1240|  35.4M|        *inf = i & 1;
 1241|       |
 1242|  41.4M|    if (cst != NULL)
  ------------------
  |  Branch (1242:9): [True: 30.8M, False: 10.5M]
  ------------------
 1243|  30.8M|        *cst = i & V_ASN1_CONSTRUCTED;
  ------------------
  |  |   54|  30.8M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
 1244|       |
 1245|  41.4M|    if (olen != NULL)
  ------------------
  |  Branch (1245:9): [True: 35.4M, False: 5.97M]
  ------------------
 1246|  35.4M|        *olen = plen;
 1247|       |
 1248|  41.4M|    if (oclass != NULL)
  ------------------
  |  Branch (1248:9): [True: 5.97M, False: 35.4M]
  ------------------
 1249|  5.97M|        *oclass = pclass;
 1250|       |
 1251|  41.4M|    if (otag != NULL)
  ------------------
  |  Branch (1251:9): [True: 5.97M, False: 35.4M]
  ------------------
 1252|  5.97M|        *otag = ptag;
 1253|       |
 1254|  41.4M|    *in = p;
 1255|  41.4M|    return 1;
 1256|       |
 1257|      0|err:
 1258|       |    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]
  |  |  ------------------
  ------------------
 1259|      0|    return 0;
 1260|  43.3M|}

ASN1_item_i2d:
   44|   378k|{
   45|   378k|    return asn1_item_flags_i2d(val, out, it, 0);
   46|   378k|}
ASN1_item_ex_i2d:
   83|  48.2M|{
   84|  48.2M|    const ASN1_TEMPLATE *tt = NULL;
   85|  48.2M|    int i, seqcontlen, seqlen, ndef = 1;
   86|  48.2M|    const ASN1_EXTERN_FUNCS *ef;
   87|  48.2M|    const ASN1_AUX *aux = it->funcs;
   88|  48.2M|    ASN1_aux_const_cb *asn1_cb = NULL;
   89|       |
   90|  48.2M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  48.2M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (90:9): [True: 25.1M, False: 23.1M]
  |  Branch (90:48): [True: 0, False: 25.1M]
  ------------------
   91|      0|        return 0;
   92|       |
   93|  48.2M|    if (aux != NULL) {
  ------------------
  |  Branch (93:9): [True: 1.89M, False: 46.3M]
  ------------------
   94|  1.89M|        asn1_cb = ((aux->flags & ASN1_AFLG_CONST_CB) != 0) ? aux->asn1_const_cb
  ------------------
  |  |  727|  1.89M|#define ASN1_AFLG_CONST_CB 8
  ------------------
  |  Branch (94:19): [True: 0, False: 1.89M]
  ------------------
   95|  1.89M|                                                           : (ASN1_aux_const_cb *)aux->asn1_cb; /* backward compatibility */
   96|  1.89M|    }
   97|       |
   98|  48.2M|    switch (it->itype) {
   99|       |
  100|  23.1M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  23.1M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (100:5): [True: 23.1M, False: 25.1M]
  ------------------
  101|  23.1M|        if (it->templates)
  ------------------
  |  Branch (101:13): [True: 6.32M, False: 16.8M]
  ------------------
  102|  6.32M|            return asn1_template_ex_i2d(pval, out, it->templates,
  103|  6.32M|                tag, aclass);
  104|  16.8M|        return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
  105|       |
  106|  12.6M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  12.6M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (106:5): [True: 12.6M, False: 35.6M]
  ------------------
  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|  12.6M|        if (tag != -1) {
  ------------------
  |  Branch (111:13): [True: 0, False: 12.6M]
  ------------------
  112|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|            return -1;
  114|      0|        }
  115|  12.6M|        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: 48.2M]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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: 48.2M]
  ------------------
  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: 48.2M]
  ------------------
  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|  12.5M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  12.5M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (152:5): [True: 12.5M, False: 35.7M]
  ------------------
  153|  12.5M|        i = ossl_asn1_enc_restore(&seqcontlen, out, pval, it);
  154|       |        /* An error occurred */
  155|  12.5M|        if (i < 0)
  ------------------
  |  Branch (155:13): [True: 0, False: 12.5M]
  ------------------
  156|      0|            return 0;
  157|       |        /* We have a valid cached encoding... */
  158|  12.5M|        if (i > 0)
  ------------------
  |  Branch (158:13): [True: 1.13M, False: 11.3M]
  ------------------
  159|  1.13M|            return seqcontlen;
  160|       |        /* Otherwise carry on */
  161|  11.3M|        seqcontlen = 0;
  162|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  163|  11.3M|        if (tag == -1) {
  ------------------
  |  Branch (163:13): [True: 11.3M, False: 0]
  ------------------
  164|  11.3M|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  11.3M|#define V_ASN1_SEQUENCE 16
  ------------------
  165|       |            /* Retain any other flags in aclass */
  166|  11.3M|            aclass = (aclass & ~ASN1_TFLG_TAG_CLASS)
  ------------------
  |  |  564|  11.3M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  167|  11.3M|                | V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  11.3M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  168|  11.3M|        }
  169|  11.3M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
  ------------------
  |  |  737|   756k|#define ASN1_OP_I2D_PRE 6
  ------------------
  |  Branch (169:13): [True: 756k, False: 10.6M]
  |  Branch (169:24): [True: 0, False: 756k]
  ------------------
  170|      0|            return 0;
  171|       |        /* First work out sequence content length */
  172|  34.8M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (172:41): [True: 23.5M, False: 11.3M]
  ------------------
  173|  23.5M|            const ASN1_TEMPLATE *seqtt;
  174|  23.5M|            const ASN1_VALUE **pseqval;
  175|  23.5M|            int tmplen;
  176|  23.5M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  177|  23.5M|            if (!seqtt)
  ------------------
  |  Branch (177:17): [True: 0, False: 23.5M]
  ------------------
  178|      0|                return 0;
  179|  23.5M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  180|  23.5M|            tmplen = asn1_template_ex_i2d(pseqval, NULL, seqtt, -1, aclass);
  181|  23.5M|            if (tmplen == -1 || (tmplen > INT_MAX - seqcontlen))
  ------------------
  |  Branch (181:17): [True: 0, False: 23.5M]
  |  Branch (181:33): [True: 0, False: 23.5M]
  ------------------
  182|      0|                return -1;
  183|  23.5M|            seqcontlen += tmplen;
  184|  23.5M|        }
  185|       |
  186|  11.3M|        seqlen = ASN1_object_size(ndef, seqcontlen, tag);
  187|  11.3M|        if (!out || seqlen == -1)
  ------------------
  |  Branch (187:13): [True: 7.45M, False: 3.91M]
  |  Branch (187:21): [True: 0, False: 3.91M]
  ------------------
  188|  7.45M|            return seqlen;
  189|       |        /* Output SEQUENCE header */
  190|  3.91M|        ASN1_put_object(out, ndef, seqcontlen, tag, aclass);
  191|  12.1M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (191:41): [True: 8.21M, False: 3.91M]
  ------------------
  192|  8.21M|            const ASN1_TEMPLATE *seqtt;
  193|  8.21M|            const ASN1_VALUE **pseqval;
  194|  8.21M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  195|  8.21M|            if (!seqtt)
  ------------------
  |  Branch (195:17): [True: 0, False: 8.21M]
  ------------------
  196|      0|                return 0;
  197|  8.21M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  198|       |            /* FIXME: check for errors in enhanced version */
  199|  8.21M|            asn1_template_ex_i2d(pseqval, out, seqtt, -1, aclass);
  200|  8.21M|        }
  201|  3.91M|        if (ndef == 2)
  ------------------
  |  Branch (201:13): [True: 0, False: 3.91M]
  ------------------
  202|      0|            ASN1_put_eoc(out);
  203|  3.91M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL))
  ------------------
  |  |  738|   378k|#define ASN1_OP_I2D_POST 7
  ------------------
  |  Branch (203:13): [True: 378k, False: 3.53M]
  |  Branch (203:24): [True: 0, False: 378k]
  ------------------
  204|      0|            return 0;
  205|  3.91M|        return seqlen;
  206|       |
  207|      0|    default:
  ------------------
  |  Branch (207:5): [True: 0, False: 48.2M]
  ------------------
  208|      0|        return 0;
  209|  48.2M|    }
  210|      0|    return 0;
  211|  48.2M|}
tasn_enc.c:asn1_item_flags_i2d:
   57|   378k|{
   58|   378k|    if (out != NULL && *out == NULL) {
  ------------------
  |  Branch (58:9): [True: 378k, False: 0]
  |  Branch (58:24): [True: 378k, False: 0]
  ------------------
   59|   378k|        unsigned char *p, *buf;
   60|   378k|        int len;
   61|       |
   62|   378k|        len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags);
   63|   378k|        if (len <= 0)
  ------------------
  |  Branch (63:13): [True: 0, False: 378k]
  ------------------
   64|      0|            return len;
   65|   378k|        if ((buf = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  106|   378k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (65:13): [True: 0, False: 378k]
  ------------------
   66|      0|            return -1;
   67|   378k|        p = buf;
   68|   378k|        ASN1_item_ex_i2d(&val, &p, it, -1, flags);
   69|   378k|        *out = buf;
   70|   378k|        return len;
   71|   378k|    }
   72|       |
   73|      0|    return ASN1_item_ex_i2d(&val, out, it, -1, flags);
   74|   378k|}
tasn_enc.c:asn1_template_ex_i2d:
  215|  38.0M|{
  216|  38.0M|    const int flags = tt->flags;
  217|  38.0M|    int i, ret, ttag, tclass, ndef, len;
  218|  38.0M|    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|  38.0M|    if (flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  38.0M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (224:9): [True: 3.40M, False: 34.6M]
  ------------------
  225|  3.40M|        tval = (ASN1_VALUE *)pval;
  226|  3.40M|        pval = &tval;
  227|  3.40M|    }
  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|  38.0M|    if (flags & ASN1_TFLG_TAG_MASK) {
  ------------------
  |  |  541|  38.0M|#define ASN1_TFLG_TAG_MASK (0x3 << 3)
  ------------------
  |  Branch (235:9): [True: 0, False: 38.0M]
  ------------------
  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|  38.0M|    } else if (tag != -1) {
  ------------------
  |  Branch (243:16): [True: 0, False: 38.0M]
  ------------------
  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|  38.0M|    } else {
  248|  38.0M|        ttag = -1;
  249|  38.0M|        tclass = 0;
  250|  38.0M|    }
  251|       |    /*
  252|       |     * Remove any class mask from iflag.
  253|       |     */
  254|  38.0M|    iclass &= ~ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  38.0M|#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|  38.0M|    if ((flags & ASN1_TFLG_NDEF) && (iclass & ASN1_TFLG_NDEF))
  ------------------
  |  |  583|  38.0M|#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: 38.0M]
  |  Branch (262:37): [True: 0, False: 0]
  ------------------
  263|      0|        ndef = 2;
  264|  38.0M|    else
  265|  38.0M|        ndef = 1;
  266|       |
  267|  38.0M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  38.0M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (267:9): [True: 6.32M, False: 31.7M]
  ------------------
  268|       |        /* SET OF, SEQUENCE OF */
  269|  6.32M|        STACK_OF(const_ASN1_VALUE) *sk = (STACK_OF(const_ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  6.32M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  270|  6.32M|        int isset, sktag, skaclass;
  271|  6.32M|        int skcontlen, sklen;
  272|  6.32M|        const ASN1_VALUE *skitem;
  273|       |
  274|  6.32M|        if (*pval == NULL)
  ------------------
  |  Branch (274:13): [True: 0, False: 6.32M]
  ------------------
  275|      0|            return 0;
  276|       |
  277|  6.32M|        if (flags & ASN1_TFLG_SET_OF) {
  ------------------
  |  |  515|  6.32M|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (277:13): [True: 6.32M, False: 0]
  ------------------
  278|  6.32M|            isset = 1;
  279|       |            /* 2 means we reorder */
  280|  6.32M|            if (flags & ASN1_TFLG_SEQUENCE_OF)
  ------------------
  |  |  518|  6.32M|#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
  ------------------
  |  Branch (280:17): [True: 0, False: 6.32M]
  ------------------
  281|      0|                isset = 2;
  282|  6.32M|        } else
  283|      0|            isset = 0;
  284|       |
  285|       |        /*
  286|       |         * Work out inner tag value: if EXPLICIT or no tagging use underlying
  287|       |         * type.
  288|       |         */
  289|  6.32M|        if ((ttag != -1) && !(flags & ASN1_TFLG_EXPTAG)) {
  ------------------
  |  |  539|      0|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (289:13): [True: 0, False: 6.32M]
  |  Branch (289:29): [True: 0, False: 0]
  ------------------
  290|      0|            sktag = ttag;
  291|      0|            skaclass = tclass;
  292|  6.32M|        } else {
  293|  6.32M|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  6.32M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  294|  6.32M|            if (isset)
  ------------------
  |  Branch (294:17): [True: 6.32M, False: 0]
  ------------------
  295|  6.32M|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  6.32M|#define V_ASN1_SET 17
  ------------------
  296|      0|            else
  297|      0|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  298|  6.32M|        }
  299|       |
  300|       |        /* Determine total length of items */
  301|  6.32M|        skcontlen = 0;
  302|  12.6M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (302:21): [True: 6.32M, False: 6.32M]
  ------------------
  303|  6.32M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  304|  6.32M|            len = ASN1_item_ex_i2d(&skitem, NULL, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  428|  6.32M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  305|  6.32M|                -1, iclass);
  306|  6.32M|            if (len == -1 || (skcontlen > INT_MAX - len))
  ------------------
  |  Branch (306:17): [True: 0, False: 6.32M]
  |  Branch (306:30): [True: 0, False: 6.32M]
  ------------------
  307|      0|                return -1;
  308|  6.32M|            if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|      0|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (308:17): [True: 0, False: 6.32M]
  |  Branch (308:29): [True: 0, False: 0]
  ------------------
  309|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|                return -1;
  311|      0|            }
  312|  6.32M|            skcontlen += len;
  313|  6.32M|        }
  314|  6.32M|        sklen = ASN1_object_size(ndef, skcontlen, sktag);
  315|  6.32M|        if (sklen == -1)
  ------------------
  |  Branch (315:13): [True: 0, False: 6.32M]
  ------------------
  316|      0|            return -1;
  317|       |        /* If EXPLICIT need length of surrounding tag */
  318|  6.32M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  6.32M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (318:13): [True: 0, False: 6.32M]
  ------------------
  319|      0|            ret = ASN1_object_size(ndef, sklen, ttag);
  320|  6.32M|        else
  321|  6.32M|            ret = sklen;
  322|       |
  323|  6.32M|        if (!out || ret == -1)
  ------------------
  |  Branch (323:13): [True: 3.16M, False: 3.16M]
  |  Branch (323:21): [True: 0, False: 3.16M]
  ------------------
  324|  3.16M|            return ret;
  325|       |
  326|       |        /* Now encode this lot... */
  327|       |        /* EXPLICIT tag */
  328|  3.16M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  3.16M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (328:13): [True: 0, False: 3.16M]
  ------------------
  329|      0|            ASN1_put_object(out, ndef, sklen, ttag, tclass);
  330|       |        /* SET or SEQUENCE and IMPLICIT tag */
  331|  3.16M|        ASN1_put_object(out, ndef, skcontlen, sktag, skaclass);
  332|       |        /* And the stuff itself */
  333|  3.16M|        asn1_set_seq_out(sk, out, skcontlen, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  428|  3.16M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  334|  3.16M|            isset, iclass);
  335|  3.16M|        if (ndef == 2) {
  ------------------
  |  Branch (335:13): [True: 0, False: 3.16M]
  ------------------
  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.16M|        return ret;
  342|  6.32M|    }
  343|       |
  344|  31.7M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  31.7M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (344:9): [True: 0, False: 31.7M]
  ------------------
  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);
  ------------------
  |  |  428|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  428|      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|  31.7M|    len = ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  428|  31.7M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  369|  31.7M|        ttag, tclass | iclass);
  370|  31.7M|    if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|   414k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (370:9): [True: 414k, False: 31.3M]
  |  Branch (370:21): [True: 0, False: 414k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        return -1;
  373|      0|    }
  374|  31.7M|    return len;
  375|  31.7M|}
tasn_enc.c:asn1_set_seq_out:
  402|  3.16M|{
  403|  3.16M|    int i, ret = 0;
  404|  3.16M|    const ASN1_VALUE *skitem;
  405|  3.16M|    unsigned char *tmpdat = NULL, *p = NULL;
  406|  3.16M|    DER_ENC *derlst = NULL, *tder;
  407|       |
  408|  3.16M|    if (do_sort) {
  ------------------
  |  Branch (408:9): [True: 3.16M, False: 0]
  ------------------
  409|       |        /* Don't need to sort less than 2 items */
  410|  3.16M|        if (sk_const_ASN1_VALUE_num(sk) < 2)
  ------------------
  |  Branch (410:13): [True: 3.16M, False: 0]
  ------------------
  411|  3.16M|            do_sort = 0;
  412|      0|        else {
  413|      0|            derlst = OPENSSL_malloc(sk_const_ASN1_VALUE_num(sk)
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  418|      0|            if (tmpdat == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|                goto err;
  420|      0|        }
  421|  3.16M|    }
  422|       |    /* If not sorting just output each item */
  423|  3.16M|    if (!do_sort) {
  ------------------
  |  Branch (423:9): [True: 3.16M, False: 0]
  ------------------
  424|  6.32M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (424:21): [True: 3.16M, False: 3.16M]
  ------------------
  425|  3.16M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  426|  3.16M|            ASN1_item_ex_i2d(&skitem, out, item, -1, iclass);
  427|  3.16M|        }
  428|  3.16M|        return 1;
  429|  3.16M|    }
  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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  457|      0|    OPENSSL_free(tmpdat);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  458|      0|    return ret;
  459|      0|}
tasn_enc.c:asn1_i2d_ex_primitive:
  463|  29.4M|{
  464|  29.4M|    int len;
  465|  29.4M|    int utype;
  466|  29.4M|    int usetag;
  467|  29.4M|    int ndef = 0;
  468|       |
  469|  29.4M|    utype = it->utype;
  470|       |
  471|       |    /*
  472|       |     * Get length of content octets and maybe find out the underlying type.
  473|       |     */
  474|       |
  475|  29.4M|    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|  29.4M|    if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   76|  29.4M|#define V_ASN1_SEQUENCE 16
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   77|  29.4M|#define V_ASN1_SET 17
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   59|  29.4M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (482:9): [True: 0, False: 29.4M]
  |  Branch (482:39): [True: 0, False: 29.4M]
  |  Branch (482:64): [True: 0, False: 29.4M]
  ------------------
  483|      0|        usetag = 0;
  484|  29.4M|    else
  485|  29.4M|        usetag = 1;
  486|       |
  487|       |    /* -1 means omit type */
  488|       |
  489|  29.4M|    if (len == -1)
  ------------------
  |  Branch (489:9): [True: 414k, False: 29.0M]
  ------------------
  490|   414k|        return 0;
  491|       |
  492|       |    /* -2 return is special meaning use ndef */
  493|  29.0M|    if (len == -2) {
  ------------------
  |  Branch (493:9): [True: 0, False: 29.0M]
  ------------------
  494|      0|        ndef = 2;
  495|      0|        len = 0;
  496|      0|    }
  497|       |
  498|       |    /* If not implicitly tagged get tag from underlying type */
  499|  29.0M|    if (tag == -1)
  ------------------
  |  Branch (499:9): [True: 29.0M, False: 0]
  ------------------
  500|  29.0M|        tag = utype;
  501|       |
  502|       |    /* Output tag+length followed by content octets */
  503|  29.0M|    if (out) {
  ------------------
  |  Branch (503:9): [True: 7.35M, False: 21.6M]
  ------------------
  504|  7.35M|        if (usetag)
  ------------------
  |  Branch (504:13): [True: 7.35M, False: 0]
  ------------------
  505|  7.35M|            ASN1_put_object(out, ndef, len, tag, aclass);
  506|  7.35M|        asn1_ex_i2c(pval, *out, &utype, it);
  507|  7.35M|        if (ndef)
  ------------------
  |  Branch (507:13): [True: 0, False: 7.35M]
  ------------------
  508|      0|            ASN1_put_eoc(out);
  509|  7.35M|        else
  510|  7.35M|            *out += len;
  511|  7.35M|    }
  512|       |
  513|  29.0M|    if (usetag)
  ------------------
  |  Branch (513:9): [True: 29.0M, False: 0]
  ------------------
  514|  29.0M|        return ASN1_object_size(ndef, len, tag);
  515|      0|    return len;
  516|  29.0M|}
tasn_enc.c:asn1_ex_i2c:
  522|  36.8M|{
  523|  36.8M|    ASN1_BOOLEAN *tbool = NULL;
  524|  36.8M|    ASN1_STRING *strtmp;
  525|  36.8M|    ASN1_OBJECT *otmp;
  526|  36.8M|    int utype;
  527|  36.8M|    const unsigned char *cont;
  528|  36.8M|    unsigned char c;
  529|  36.8M|    int len;
  530|  36.8M|    const ASN1_PRIMITIVE_FUNCS *pf;
  531|  36.8M|    pf = it->funcs;
  532|  36.8M|    if (pf && pf->prim_i2c)
  ------------------
  |  Branch (532:9): [True: 0, False: 36.8M]
  |  Branch (532:15): [True: 0, False: 0]
  ------------------
  533|      0|        return pf->prim_i2c(pval, cout, putype, it);
  534|       |
  535|       |    /* Should type be omitted? */
  536|  36.8M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE)
  ------------------
  |  |   82|  36.8M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (536:9): [True: 15.8M, False: 21.0M]
  ------------------
  537|  36.8M|        || (it->utype != V_ASN1_BOOLEAN)) {
  ------------------
  |  |   65|  21.0M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (537:12): [True: 21.0M, False: 0]
  ------------------
  538|  36.8M|        if (*pval == NULL)
  ------------------
  |  Branch (538:13): [True: 414k, False: 36.3M]
  ------------------
  539|   414k|            return -1;
  540|  36.8M|    }
  541|       |
  542|  36.3M|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  36.3M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (542:9): [True: 15.8M, False: 20.5M]
  ------------------
  543|       |        /* If MSTRING type set the underlying type */
  544|  15.8M|        strtmp = (ASN1_STRING *)*pval;
  545|  15.8M|        utype = strtmp->type;
  546|  15.8M|        *putype = utype;
  547|  20.5M|    } else if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  20.5M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (547:16): [True: 1.37M, False: 19.2M]
  ------------------
  548|       |        /* If ANY set type and pointer to value */
  549|  1.37M|        ASN1_TYPE *typ;
  550|  1.37M|        typ = (ASN1_TYPE *)*pval;
  551|  1.37M|        utype = typ->type;
  552|  1.37M|        *putype = utype;
  553|  1.37M|        pval = (const ASN1_VALUE **)&typ->value.asn1_value; /* actually is const */
  554|  1.37M|    } else
  555|  19.2M|        utype = *putype;
  556|       |
  557|  36.3M|    switch (utype) {
  558|  17.6M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  17.6M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (558:5): [True: 17.6M, False: 18.6M]
  ------------------
  559|  17.6M|        otmp = (ASN1_OBJECT *)*pval;
  560|  17.6M|        cont = otmp->data;
  561|  17.6M|        len = otmp->length;
  562|  17.6M|        if (cont == NULL || len == 0)
  ------------------
  |  Branch (562:13): [True: 0, False: 17.6M]
  |  Branch (562:29): [True: 0, False: 17.6M]
  ------------------
  563|      0|            return -1;
  564|  17.6M|        break;
  565|       |
  566|  17.6M|    case V_ASN1_UNDEF:
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
  |  Branch (566:5): [True: 0, False: 36.3M]
  ------------------
  567|      0|        return -2;
  568|       |
  569|  1.37M|    case V_ASN1_NULL:
  ------------------
  |  |   69|  1.37M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (569:5): [True: 1.37M, False: 35.0M]
  ------------------
  570|  1.37M|        cont = NULL;
  571|  1.37M|        len = 0;
  572|  1.37M|        break;
  573|       |
  574|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (574:5): [True: 0, False: 36.3M]
  ------------------
  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.51M|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|  1.51M|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (592:5): [True: 1.51M, False: 34.8M]
  ------------------
  593|  1.51M|        return ossl_i2c_ASN1_BIT_STRING((ASN1_BIT_STRING *)*pval,
  594|  1.51M|            cout ? &cout : NULL);
  ------------------
  |  Branch (594:13): [True: 378k, False: 1.13M]
  ------------------
  595|       |
  596|      0|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|      0|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (596:5): [True: 0, False: 36.3M]
  ------------------
  597|      0|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|      0|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (597:5): [True: 0, False: 36.3M]
  ------------------
  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: 36.3M]
  ------------------
  604|      0|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|      0|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (604:5): [True: 0, False: 36.3M]
  ------------------
  605|      0|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|      0|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (605:5): [True: 0, False: 36.3M]
  ------------------
  606|      0|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|      0|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (606:5): [True: 0, False: 36.3M]
  ------------------
  607|      0|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|      0|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (607:5): [True: 0, False: 36.3M]
  ------------------
  608|      0|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|      0|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (608:5): [True: 0, False: 36.3M]
  ------------------
  609|      0|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|      0|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (609:5): [True: 0, False: 36.3M]
  ------------------
  610|      0|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|      0|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (610:5): [True: 0, False: 36.3M]
  ------------------
  611|      0|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|      0|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (611:5): [True: 0, False: 36.3M]
  ------------------
  612|      0|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|      0|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (612:5): [True: 0, False: 36.3M]
  ------------------
  613|      0|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|      0|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (613:5): [True: 0, False: 36.3M]
  ------------------
  614|      0|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|      0|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (614:5): [True: 0, False: 36.3M]
  ------------------
  615|      0|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|      0|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (615:5): [True: 0, False: 36.3M]
  ------------------
  616|  15.8M|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|  15.8M|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (616:5): [True: 15.8M, False: 20.5M]
  ------------------
  617|  15.8M|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|  15.8M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (617:5): [True: 0, False: 36.3M]
  ------------------
  618|  15.8M|    case V_ASN1_SET:
  ------------------
  |  |   77|  15.8M|#define V_ASN1_SET 17
  ------------------
  |  Branch (618:5): [True: 0, False: 36.3M]
  ------------------
  619|  15.8M|    default:
  ------------------
  |  Branch (619:5): [True: 0, False: 36.3M]
  ------------------
  620|       |        /* All based on ASN1_STRING and handled the same */
  621|  15.8M|        strtmp = (ASN1_STRING *)*pval;
  622|       |        /* Special handling for NDEF */
  623|  15.8M|        if ((it->size == ASN1_TFLG_NDEF)
  ------------------
  |  |  583|  15.8M|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (623:13): [True: 0, False: 15.8M]
  ------------------
  624|      0|            && (strtmp->flags & ASN1_STRING_FLAG_NDEF)) {
  ------------------
  |  |  170|      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|  15.8M|        cont = strtmp->data;
  633|  15.8M|        len = strtmp->length;
  634|       |
  635|  15.8M|        break;
  636|  36.3M|    }
  637|  34.8M|    if (cout && len)
  ------------------
  |  Branch (637:9): [True: 6.97M, False: 27.9M]
  |  Branch (637:17): [True: 6.70M, False: 274k]
  ------------------
  638|  6.70M|        memcpy(cout, cont, len);
  639|  34.8M|    return len;
  640|  36.3M|}

ASN1_item_free:
   19|  17.1M|{
   20|  17.1M|    ossl_asn1_item_embed_free(&val, it, 0);
   21|  17.1M|}
ossl_asn1_item_embed_free:
   29|  50.6M|{
   30|  50.6M|    const ASN1_TEMPLATE *tt = NULL, *seqtt;
   31|  50.6M|    const ASN1_EXTERN_FUNCS *ef;
   32|  50.6M|    const ASN1_AUX *aux = it->funcs;
   33|  50.6M|    ASN1_aux_cb *asn1_cb;
   34|  50.6M|    int i;
   35|       |
   36|  50.6M|    if (pval == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 50.6M]
  ------------------
   37|      0|        return;
   38|  50.6M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  50.6M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (38:9): [True: 27.7M, False: 22.8M]
  |  Branch (38:48): [True: 6.02M, False: 21.7M]
  ------------------
   39|  6.02M|        return;
   40|  44.5M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (40:9): [True: 3.11M, False: 41.4M]
  |  Branch (40:16): [True: 915k, False: 2.19M]
  ------------------
   41|   915k|        asn1_cb = aux->asn1_cb;
   42|  43.6M|    else
   43|  43.6M|        asn1_cb = 0;
   44|       |
   45|  44.5M|    switch (it->itype) {
  ------------------
  |  Branch (45:13): [True: 44.5M, False: 0]
  ------------------
   46|       |
   47|  22.8M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  22.8M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (47:5): [True: 22.8M, False: 21.7M]
  ------------------
   48|  22.8M|        if (it->templates)
  ------------------
  |  Branch (48:13): [True: 1.74M, False: 21.0M]
  ------------------
   49|  1.74M|            ossl_asn1_template_free(pval, it->templates);
   50|  21.0M|        else
   51|  21.0M|            ossl_asn1_primitive_free(pval, it, embed);
   52|  22.8M|        break;
   53|       |
   54|  7.19M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  7.19M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (54:5): [True: 7.19M, False: 37.3M]
  ------------------
   55|  7.19M|        ossl_asn1_primitive_free(pval, it, embed);
   56|  7.19M|        break;
   57|       |
   58|   111k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|   111k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (58:5): [True: 111k, False: 44.4M]
  ------------------
   59|   111k|        if (asn1_cb) {
  ------------------
  |  Branch (59:13): [True: 44.0k, False: 67.3k]
  ------------------
   60|  44.0k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|  44.0k|#define ASN1_OP_FREE_PRE 2
  ------------------
   61|  44.0k|            if (i == 2)
  ------------------
  |  Branch (61:17): [True: 0, False: 44.0k]
  ------------------
   62|      0|                return;
   63|  44.0k|        }
   64|   111k|        i = ossl_asn1_get_choice_selector(pval, it);
   65|   111k|        if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (65:13): [True: 111k, False: 0]
  |  Branch (65:25): [True: 111k, False: 0]
  ------------------
   66|   111k|            ASN1_VALUE **pchval;
   67|       |
   68|   111k|            tt = it->templates + i;
   69|   111k|            pchval = ossl_asn1_get_field_ptr(pval, tt);
   70|   111k|            ossl_asn1_template_free(pchval, tt);
   71|   111k|        }
   72|   111k|        if (asn1_cb)
  ------------------
  |  Branch (72:13): [True: 44.0k, False: 67.3k]
  ------------------
   73|  44.0k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|  44.0k|#define ASN1_OP_FREE_POST 3
  ------------------
   74|   111k|        if (embed == 0) {
  ------------------
  |  Branch (74:13): [True: 111k, False: 0]
  ------------------
   75|   111k|            OPENSSL_free(*pval);
  ------------------
  |  |  131|   111k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|   111k|            *pval = NULL;
   77|   111k|        }
   78|   111k|        break;
   79|       |
   80|  1.75M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  1.75M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (80:5): [True: 1.75M, False: 42.8M]
  ------------------
   81|  1.75M|        ef = it->funcs;
   82|  1.75M|        if (ef && ef->asn1_ex_free)
  ------------------
  |  Branch (82:13): [True: 1.75M, False: 0]
  |  Branch (82:19): [True: 1.75M, False: 0]
  ------------------
   83|  1.75M|            ef->asn1_ex_free(pval, it);
   84|  1.75M|        break;
   85|       |
   86|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (86:5): [True: 0, False: 44.5M]
  ------------------
   87|  12.6M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  12.6M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (87:5): [True: 12.6M, False: 31.8M]
  ------------------
   88|  12.6M|        if (ossl_asn1_do_lock(pval, -1, it) != 0) {
  ------------------
  |  Branch (88:13): [True: 435k, False: 12.2M]
  ------------------
   89|       |            /* if error or ref-counter > 0 */
   90|   435k|            OPENSSL_assert(embed == 0);
  ------------------
  |  |  476|   435k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (476:12): [True: 435k, False: 0]
  |  |  ------------------
  ------------------
   91|   435k|            *pval = NULL;
   92|   435k|            return;
   93|   435k|        }
   94|  12.2M|        if (asn1_cb) {
  ------------------
  |  Branch (94:13): [True: 435k, False: 11.8M]
  ------------------
   95|   435k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|   435k|#define ASN1_OP_FREE_PRE 2
  ------------------
   96|   435k|            if (i == 2)
  ------------------
  |  Branch (96:17): [True: 0, False: 435k]
  ------------------
   97|      0|                return;
   98|   435k|        }
   99|  12.2M|        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|  12.2M|        tt = it->templates + it->tcount;
  106|  42.3M|        for (i = 0; i < it->tcount; i++) {
  ------------------
  |  Branch (106:21): [True: 30.0M, False: 12.2M]
  ------------------
  107|  30.0M|            ASN1_VALUE **pseqval;
  108|       |
  109|  30.0M|            tt--;
  110|  30.0M|            seqtt = ossl_asn1_do_adb(*pval, tt, 0);
  111|  30.0M|            if (!seqtt)
  ------------------
  |  Branch (111:17): [True: 0, False: 30.0M]
  ------------------
  112|      0|                continue;
  113|  30.0M|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  114|  30.0M|            ossl_asn1_template_free(pseqval, seqtt);
  115|  30.0M|        }
  116|  12.2M|        if (asn1_cb)
  ------------------
  |  Branch (116:13): [True: 435k, False: 11.8M]
  ------------------
  117|   435k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|   435k|#define ASN1_OP_FREE_POST 3
  ------------------
  118|  12.2M|        if (embed == 0) {
  ------------------
  |  Branch (118:13): [True: 10.5M, False: 1.74M]
  ------------------
  119|  10.5M|            OPENSSL_free(*pval);
  ------------------
  |  |  131|  10.5M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|       |            *pval = NULL;
  121|  10.5M|        }
  122|  12.2M|        break;
  123|  44.5M|    }
  124|  44.5M|}
ossl_asn1_template_free:
  127|  34.2M|{
  128|  34.2M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  34.2M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  129|  34.2M|    ASN1_VALUE *tval;
  130|  34.2M|    if (embed) {
  ------------------
  |  Branch (130:9): [True: 4.11M, False: 30.1M]
  ------------------
  131|  4.11M|        tval = (ASN1_VALUE *)pval;
  132|  4.11M|        pval = &tval;
  133|  4.11M|    }
  134|  34.2M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  34.2M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (134:9): [True: 2.46M, False: 31.8M]
  ------------------
  135|  2.46M|        STACK_OF(ASN1_VALUE) *sk = (STACK_OF(ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  2.46M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  136|  2.46M|        int i;
  137|       |
  138|  4.07M|        for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  |  887|  4.07M|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (138:21): [True: 1.61M, False: 2.46M]
  ------------------
  139|  1.61M|            ASN1_VALUE *vtmp = sk_ASN1_VALUE_value(sk, i);
  ------------------
  |  |  888|  1.61M|#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
  ------------------
  140|       |
  141|  1.61M|            ossl_asn1_item_embed_free(&vtmp, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  428|  1.61M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  142|  1.61M|        }
  143|  2.46M|        sk_ASN1_VALUE_free(sk);
  ------------------
  |  |  893|  2.46M|#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
  ------------------
  144|  2.46M|        *pval = NULL;
  145|  31.8M|    } else {
  146|  31.8M|        ossl_asn1_item_embed_free(pval, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  428|  31.8M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  147|  31.8M|    }
  148|  34.2M|}
ossl_asn1_primitive_free:
  151|  30.2M|{
  152|  30.2M|    int utype;
  153|       |
  154|       |    /* Special case: if 'it' is a primitive with a free_func, use that. */
  155|  30.2M|    if (it) {
  ------------------
  |  Branch (155:9): [True: 28.2M, False: 1.94M]
  ------------------
  156|  28.2M|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  157|       |
  158|  28.2M|        if (embed) {
  ------------------
  |  Branch (158:13): [True: 2.37M, False: 25.9M]
  ------------------
  159|  2.37M|            if (pf && pf->prim_clear) {
  ------------------
  |  Branch (159:17): [True: 0, False: 2.37M]
  |  Branch (159:23): [True: 0, False: 0]
  ------------------
  160|      0|                pf->prim_clear(pval, it);
  161|      0|                return;
  162|      0|            }
  163|  25.9M|        } else if (pf && pf->prim_free) {
  ------------------
  |  Branch (163:20): [True: 0, False: 25.9M]
  |  Branch (163:26): [True: 0, False: 0]
  ------------------
  164|      0|            pf->prim_free(pval, it);
  165|      0|            return;
  166|      0|        }
  167|  28.2M|    }
  168|       |
  169|       |    /* Special case: if 'it' is NULL, free contents of ASN1_TYPE */
  170|  30.2M|    if (!it) {
  ------------------
  |  Branch (170:9): [True: 1.94M, False: 28.2M]
  ------------------
  171|  1.94M|        ASN1_TYPE *typ = (ASN1_TYPE *)*pval;
  172|       |
  173|  1.94M|        utype = typ->type;
  174|  1.94M|        pval = &typ->value.asn1_value;
  175|  1.94M|        if (*pval == NULL)
  ------------------
  |  Branch (175:13): [True: 1.58M, False: 358k]
  ------------------
  176|  1.58M|            return;
  177|  28.2M|    } else if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  28.2M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (177:16): [True: 7.19M, False: 21.0M]
  ------------------
  178|  7.19M|        utype = -1;
  179|  7.19M|        if (*pval == NULL)
  ------------------
  |  Branch (179:13): [True: 0, False: 7.19M]
  ------------------
  180|      0|            return;
  181|  21.0M|    } else {
  182|  21.0M|        utype = it->utype;
  183|  21.0M|        if ((utype != V_ASN1_BOOLEAN) && *pval == NULL)
  ------------------
  |  |   65|  21.0M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (183:13): [True: 18.5M, False: 2.55M]
  |  Branch (183:42): [True: 3.19M, False: 15.3M]
  ------------------
  184|  3.19M|            return;
  185|  21.0M|    }
  186|       |
  187|  25.4M|    switch (utype) {
  188|  10.3M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  10.3M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (188:5): [True: 10.3M, False: 15.0M]
  ------------------
  189|  10.3M|        ASN1_OBJECT_free((ASN1_OBJECT *)*pval);
  190|  10.3M|        break;
  191|       |
  192|  2.55M|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|  2.55M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (192:5): [True: 2.55M, False: 22.8M]
  ------------------
  193|  2.55M|        if (it)
  ------------------
  |  Branch (193:13): [True: 2.55M, False: 0]
  ------------------
  194|  2.55M|            *(ASN1_BOOLEAN *)pval = it->size;
  195|      0|        else
  196|      0|            *(ASN1_BOOLEAN *)pval = -1;
  197|  2.55M|        return;
  198|       |
  199|      0|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (199:5): [True: 0, False: 25.4M]
  ------------------
  200|      0|        break;
  201|       |
  202|  1.94M|    case V_ASN1_ANY:
  ------------------
  |  |   60|  1.94M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (202:5): [True: 1.94M, False: 23.5M]
  ------------------
  203|  1.94M|        ossl_asn1_primitive_free(pval, NULL, 0);
  204|  1.94M|        OPENSSL_free(*pval);
  ------------------
  |  |  131|  1.94M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|  1.94M|        break;
  206|       |
  207|  10.5M|    default:
  ------------------
  |  Branch (207:5): [True: 10.5M, False: 14.8M]
  ------------------
  208|  10.5M|        ossl_asn1_string_embed_free((ASN1_STRING *)*pval, embed);
  209|  10.5M|        break;
  210|  25.4M|    }
  211|  22.8M|    *pval = NULL;
  212|  22.8M|}

ASN1_item_new:
   30|  5.97M|{
   31|  5.97M|    ASN1_VALUE *ret = NULL;
   32|  5.97M|    if (ASN1_item_ex_new(&ret, it) > 0)
  ------------------
  |  Branch (32:9): [True: 5.97M, False: 0]
  ------------------
   33|  5.97M|        return ret;
   34|      0|    return NULL;
   35|  5.97M|}
ASN1_item_new_ex:
   39|   435k|{
   40|   435k|    ASN1_VALUE *ret = NULL;
   41|   435k|    if (asn1_item_embed_new(&ret, it, 0, libctx, propq) > 0)
  ------------------
  |  Branch (41:9): [True: 435k, False: 0]
  ------------------
   42|   435k|        return ret;
   43|      0|    return NULL;
   44|   435k|}
ossl_asn1_item_ex_new_intern:
   50|  6.03M|{
   51|  6.03M|    return asn1_item_embed_new(pval, it, 0, libctx, propq);
   52|  6.03M|}
ASN1_item_ex_new:
   55|  5.97M|{
   56|  5.97M|    return asn1_item_embed_new(pval, it, 0, NULL, NULL);
   57|  5.97M|}
tasn_new.c:asn1_item_embed_new:
   61|  35.0M|{
   62|  35.0M|    const ASN1_TEMPLATE *tt = NULL;
   63|  35.0M|    const ASN1_EXTERN_FUNCS *ef;
   64|  35.0M|    const ASN1_AUX *aux = it->funcs;
   65|  35.0M|    ASN1_aux_cb *asn1_cb;
   66|  35.0M|    ASN1_VALUE **pseqval;
   67|  35.0M|    int i;
   68|  35.0M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (68:9): [True: 2.54M, False: 32.5M]
  |  Branch (68:16): [True: 796k, False: 1.74M]
  ------------------
   69|   796k|        asn1_cb = aux->asn1_cb;
   70|  34.2M|    else
   71|  34.2M|        asn1_cb = 0;
   72|       |
   73|  35.0M|    switch (it->itype) {
  ------------------
  |  Branch (73:13): [True: 35.0M, False: 0]
  ------------------
   74|       |
   75|  1.30M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  1.30M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (75:5): [True: 1.30M, False: 33.7M]
  ------------------
   76|  1.30M|        ef = it->funcs;
   77|  1.30M|        if (ef != NULL) {
  ------------------
  |  Branch (77:13): [True: 1.30M, False: 0]
  ------------------
   78|  1.30M|            if (ef->asn1_ex_new_ex != NULL) {
  ------------------
  |  Branch (78:17): [True: 435k, False: 871k]
  ------------------
   79|   435k|                if (!ef->asn1_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (79:21): [True: 0, False: 435k]
  ------------------
   80|      0|                    goto asn1err;
   81|   871k|            } else if (ef->asn1_ex_new != NULL) {
  ------------------
  |  Branch (81:24): [True: 871k, False: 0]
  ------------------
   82|   871k|                if (!ef->asn1_ex_new(pval, it))
  ------------------
  |  Branch (82:21): [True: 0, False: 871k]
  ------------------
   83|      0|                    goto asn1err;
   84|   871k|            }
   85|  1.30M|        }
   86|  1.30M|        break;
   87|       |
   88|  14.3M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  14.3M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (88:5): [True: 14.3M, False: 20.7M]
  ------------------
   89|  14.3M|        if (it->templates) {
  ------------------
  |  Branch (89:13): [True: 0, False: 14.3M]
  ------------------
   90|      0|            if (!asn1_template_new(pval, it->templates, libctx, propq))
  ------------------
  |  Branch (90:17): [True: 0, False: 0]
  ------------------
   91|      0|                goto asn1err;
   92|  14.3M|        } else if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (92:20): [True: 0, False: 14.3M]
  ------------------
   93|      0|            goto asn1err;
   94|  14.3M|        break;
   95|       |
   96|  14.3M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  7.19M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (96:5): [True: 7.19M, False: 27.8M]
  ------------------
   97|  7.19M|        if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (97:13): [True: 0, False: 7.19M]
  ------------------
   98|      0|            goto asn1err;
   99|  7.19M|        break;
  100|       |
  101|  7.19M|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|   111k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (101:5): [True: 111k, False: 34.9M]
  ------------------
  102|   111k|        if (asn1_cb) {
  ------------------
  |  Branch (102:13): [True: 44.0k, False: 67.3k]
  ------------------
  103|  44.0k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|  44.0k|#define ASN1_OP_NEW_PRE 0
  ------------------
  104|  44.0k|            if (!i)
  ------------------
  |  Branch (104:17): [True: 0, False: 44.0k]
  ------------------
  105|      0|                goto auxerr;
  106|  44.0k|            if (i == 2) {
  ------------------
  |  Branch (106:17): [True: 0, False: 44.0k]
  ------------------
  107|      0|                return 1;
  108|      0|            }
  109|  44.0k|        }
  110|   111k|        if (embed) {
  ------------------
  |  Branch (110:13): [True: 0, False: 111k]
  ------------------
  111|      0|            memset(*pval, 0, it->size);
  112|   111k|        } else {
  113|   111k|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  108|   111k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  114|   111k|            if (*pval == NULL)
  ------------------
  |  Branch (114:17): [True: 0, False: 111k]
  ------------------
  115|      0|                return 0;
  116|   111k|        }
  117|   111k|        ossl_asn1_set_choice_selector(pval, -1, it);
  118|   111k|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|  44.0k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (118:13): [True: 44.0k, False: 67.3k]
  |  Branch (118:24): [True: 0, False: 44.0k]
  ------------------
  119|      0|            goto auxerr2;
  120|   111k|        break;
  121|       |
  122|   111k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (122:5): [True: 0, False: 35.0M]
  ------------------
  123|  12.1M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  12.1M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (123:5): [True: 12.1M, False: 22.9M]
  ------------------
  124|  12.1M|        if (asn1_cb) {
  ------------------
  |  Branch (124:13): [True: 752k, False: 11.3M]
  ------------------
  125|   752k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|   752k|#define ASN1_OP_NEW_PRE 0
  ------------------
  126|   752k|            if (!i)
  ------------------
  |  Branch (126:17): [True: 0, False: 752k]
  ------------------
  127|      0|                goto auxerr;
  128|   752k|            if (i == 2) {
  ------------------
  |  Branch (128:17): [True: 316k, False: 435k]
  ------------------
  129|   316k|                return 1;
  130|   316k|            }
  131|   752k|        }
  132|  11.8M|        if (embed) {
  ------------------
  |  Branch (132:13): [True: 1.74M, False: 10.0M]
  ------------------
  133|  1.74M|            memset(*pval, 0, it->size);
  134|  10.0M|        } else {
  135|  10.0M|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  108|  10.0M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  136|  10.0M|            if (*pval == NULL)
  ------------------
  |  Branch (136:17): [True: 0, False: 10.0M]
  ------------------
  137|      0|                return 0;
  138|  10.0M|        }
  139|       |        /* 0 : init. lock */
  140|  11.8M|        if (ossl_asn1_do_lock(pval, 0, it) < 0) {
  ------------------
  |  Branch (140:13): [True: 0, False: 11.8M]
  ------------------
  141|      0|            if (!embed) {
  ------------------
  |  Branch (141:17): [True: 0, False: 0]
  ------------------
  142|      0|                OPENSSL_free(*pval);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  143|      0|                *pval = NULL;
  144|      0|            }
  145|      0|            goto asn1err;
  146|      0|        }
  147|  11.8M|        ossl_asn1_enc_init(pval, it);
  148|  41.0M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (148:41): [True: 29.1M, False: 11.8M]
  ------------------
  149|  29.1M|            pseqval = ossl_asn1_get_field_ptr(pval, tt);
  150|  29.1M|            if (!asn1_template_new(pseqval, tt, libctx, propq))
  ------------------
  |  Branch (150:17): [True: 0, False: 29.1M]
  ------------------
  151|      0|                goto asn1err2;
  152|  29.1M|        }
  153|  11.8M|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|   435k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (153:13): [True: 435k, False: 11.3M]
  |  Branch (153:24): [True: 0, False: 435k]
  ------------------
  154|      0|            goto auxerr2;
  155|  11.8M|        break;
  156|  35.0M|    }
  157|  34.7M|    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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  169|      0|    return 0;
  170|      0|}
tasn_new.c:asn1_template_new:
  207|  29.1M|{
  208|  29.1M|    const ASN1_ITEM *it = ASN1_ITEM_ptr(tt->item);
  ------------------
  |  |  428|  29.1M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  209|  29.1M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  29.1M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  210|  29.1M|    ASN1_VALUE *tval;
  211|  29.1M|    int ret;
  212|  29.1M|    if (embed) {
  ------------------
  |  Branch (212:9): [True: 4.11M, False: 25.0M]
  ------------------
  213|  4.11M|        tval = (ASN1_VALUE *)pval;
  214|  4.11M|        pval = &tval;
  215|  4.11M|    }
  216|  29.1M|    if (tt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|  29.1M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (216:9): [True: 6.56M, False: 22.6M]
  ------------------
  217|  6.56M|        asn1_template_clear(pval, tt);
  218|  6.56M|        return 1;
  219|  6.56M|    }
  220|       |    /* If ANY DEFINED BY nothing to do */
  221|       |
  222|  22.6M|    if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|  22.6M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (222:9): [True: 0, False: 22.6M]
  ------------------
  223|      0|        *pval = NULL;
  224|      0|        return 1;
  225|      0|    }
  226|       |    /* If SET OF or SEQUENCE OF, its a STACK */
  227|  22.6M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  22.6M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (227:9): [True: 0, False: 22.6M]
  ------------------
  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_new_null())
  ------------------
  230|      0|        if (!skval) {
  ------------------
  |  Branch (230:13): [True: 0, False: 0]
  ------------------
  231|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|  22.6M|    ret = asn1_item_embed_new(pval, it, embed, libctx, propq);
  241|  22.6M|done:
  242|  22.6M|    return ret;
  243|  22.6M|}
tasn_new.c:asn1_template_clear:
  246|  6.56M|{
  247|       |    /* If ADB or STACK just NULL the field */
  248|  6.56M|    if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  572|  6.56M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
                  if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  528|  6.56M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (248:9): [True: 562k, False: 6.00M]
  ------------------
  249|   562k|        *pval = NULL;
  250|  6.00M|    else
  251|  6.00M|        asn1_item_clear(pval, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  428|  6.00M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  252|  6.56M|}
tasn_new.c:asn1_item_clear:
  173|  6.00M|{
  174|  6.00M|    const ASN1_EXTERN_FUNCS *ef;
  175|       |
  176|  6.00M|    switch (it->itype) {
  ------------------
  |  Branch (176:13): [True: 6.00M, False: 0]
  ------------------
  177|       |
  178|      0|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|      0|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (178:5): [True: 0, False: 6.00M]
  ------------------
  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|  5.95M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  5.95M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (186:5): [True: 5.95M, False: 44.0k]
  ------------------
  187|  5.95M|        if (it->templates)
  ------------------
  |  Branch (187:13): [True: 0, False: 5.95M]
  ------------------
  188|      0|            asn1_template_clear(pval, it->templates);
  189|  5.95M|        else
  190|  5.95M|            asn1_primitive_clear(pval, it);
  191|  5.95M|        break;
  192|       |
  193|      0|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|      0|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (193:5): [True: 0, False: 6.00M]
  ------------------
  194|      0|        asn1_primitive_clear(pval, it);
  195|      0|        break;
  196|       |
  197|  44.0k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  44.0k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (197:5): [True: 44.0k, False: 5.95M]
  ------------------
  198|  44.0k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  44.0k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (198:5): [True: 0, False: 6.00M]
  ------------------
  199|  44.0k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|  44.0k|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (199:5): [True: 0, False: 6.00M]
  ------------------
  200|       |        *pval = NULL;
  201|  44.0k|        break;
  202|  6.00M|    }
  203|  6.00M|}
tasn_new.c:asn1_primitive_clear:
  326|  5.95M|{
  327|  5.95M|    int utype;
  328|  5.95M|    if (it && it->funcs) {
  ------------------
  |  Branch (328:9): [True: 5.95M, False: 0]
  |  Branch (328:15): [True: 0, False: 5.95M]
  ------------------
  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|  5.95M|    if (!it || (it->itype == ASN1_ITYPE_MSTRING))
  ------------------
  |  |   87|  5.95M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (336:9): [True: 0, False: 5.95M]
  |  Branch (336:16): [True: 0, False: 5.95M]
  ------------------
  337|      0|        utype = -1;
  338|  5.95M|    else
  339|  5.95M|        utype = it->utype;
  340|  5.95M|    if (utype == V_ASN1_BOOLEAN)
  ------------------
  |  |   65|  5.95M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (340:9): [True: 1.88M, False: 4.07M]
  ------------------
  341|  1.88M|        *(ASN1_BOOLEAN *)pval = it->size;
  342|  4.07M|    else
  343|  4.07M|        *pval = NULL;
  344|  5.95M|}
tasn_new.c:asn1_primitive_new:
  261|  21.5M|{
  262|  21.5M|    ASN1_TYPE *typ;
  263|  21.5M|    ASN1_STRING *str;
  264|  21.5M|    int utype;
  265|       |
  266|  21.5M|    if (!it)
  ------------------
  |  Branch (266:9): [True: 0, False: 21.5M]
  ------------------
  267|      0|        return 0;
  268|       |
  269|  21.5M|    if (it->funcs) {
  ------------------
  |  Branch (269:9): [True: 0, False: 21.5M]
  ------------------
  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|  21.5M|    if (it->itype == ASN1_ITYPE_MSTRING)
  ------------------
  |  |   87|  21.5M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (281:9): [True: 7.19M, False: 14.3M]
  ------------------
  282|  7.19M|        utype = -1;
  283|  14.3M|    else
  284|  14.3M|        utype = it->utype;
  285|  21.5M|    switch (utype) {
  286|  10.0M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  10.0M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (286:5): [True: 10.0M, False: 11.5M]
  ------------------
  287|  10.0M|        *pval = (ASN1_VALUE *)OBJ_nid2obj(NID_undef);
  ------------------
  |  |   18|  10.0M|#define NID_undef                       0
  ------------------
  288|  10.0M|        return 1;
  289|       |
  290|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (290:5): [True: 0, False: 21.5M]
  ------------------
  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: 21.5M]
  ------------------
  295|      0|        *pval = (ASN1_VALUE *)1;
  296|      0|        return 1;
  297|       |
  298|  1.94M|    case V_ASN1_ANY:
  ------------------
  |  |   60|  1.94M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (298:5): [True: 1.94M, False: 19.5M]
  ------------------
  299|  1.94M|        if ((typ = OPENSSL_malloc(sizeof(*typ))) == NULL)
  ------------------
  |  |  106|  1.94M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (299:13): [True: 0, False: 1.94M]
  ------------------
  300|      0|            return 0;
  301|  1.94M|        typ->value.ptr = NULL;
  302|  1.94M|        typ->type = -1;
  303|  1.94M|        *pval = (ASN1_VALUE *)typ;
  304|  1.94M|        break;
  305|       |
  306|  9.56M|    default:
  ------------------
  |  Branch (306:5): [True: 9.56M, False: 11.9M]
  ------------------
  307|  9.56M|        if (embed) {
  ------------------
  |  Branch (307:13): [True: 2.37M, False: 7.19M]
  ------------------
  308|  2.37M|            str = *(ASN1_STRING **)pval;
  309|  2.37M|            memset(str, 0, sizeof(*str));
  310|  2.37M|            str->type = utype;
  311|  2.37M|            str->flags = ASN1_STRING_FLAG_EMBED;
  ------------------
  |  |  185|  2.37M|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  312|  7.19M|        } else {
  313|  7.19M|            str = ASN1_STRING_type_new(utype);
  314|  7.19M|            *pval = (ASN1_VALUE *)str;
  315|  7.19M|        }
  316|  9.56M|        if (it->itype == ASN1_ITYPE_MSTRING && str)
  ------------------
  |  |   87|  19.1M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (316:13): [True: 7.19M, False: 2.37M]
  |  Branch (316:48): [True: 7.19M, False: 0]
  ------------------
  317|  7.19M|            str->flags |= ASN1_STRING_FLAG_MSTRING;
  ------------------
  |  |  183|  7.19M|#define ASN1_STRING_FLAG_MSTRING 0x040
  ------------------
  318|  9.56M|        break;
  319|  21.5M|    }
  320|  11.5M|    if (*pval)
  ------------------
  |  Branch (320:9): [True: 11.5M, False: 0]
  ------------------
  321|  11.5M|        return 1;
  322|      0|    return 0;
  323|  11.5M|}

ASN1_OCTET_STRING_free:
   24|  1.74M|    {                                                          \
   25|  1.74M|        ASN1_STRING_free(x);                                   \
   26|  1.74M|    }
ASN1_INTEGER_new:
   20|   456k|    {                                                          \
   21|   456k|        return ASN1_STRING_type_new(V_##sname);                \
  ------------------
  |  |   66|   456k|#define V_ASN1_INTEGER 2
  ------------------
   22|   456k|    }                                                          \
ASN1_BIT_STRING_new:
   20|  1.68M|    {                                                          \
   21|  1.68M|        return ASN1_STRING_type_new(V_##sname);                \
  ------------------
  |  |   67|  1.68M|#define V_ASN1_BIT_STRING 3
  ------------------
   22|  1.68M|    }                                                          \
ASN1_BIT_STRING_free:
   24|  1.24M|    {                                                          \
   25|  1.24M|        ASN1_STRING_free(x);                                   \
   26|  1.24M|    }

ossl_asn1_get_choice_selector:
   30|   111k|{
   31|   111k|    int *sel = offset2ptr(*pval, it->utype);
  ------------------
  |  |   23|   111k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   32|       |
   33|   111k|    return *sel;
   34|   111k|}
ossl_asn1_set_choice_selector:
   50|   222k|{
   51|   222k|    int *sel, ret;
   52|       |
   53|   222k|    sel = offset2ptr(*pval, it->utype);
  ------------------
  |  |   23|   222k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   54|   222k|    ret = *sel;
   55|   222k|    *sel = value;
   56|   222k|    return ret;
   57|   222k|}
ossl_asn1_do_lock:
   69|  24.5M|{
   70|  24.5M|    const ASN1_AUX *aux;
   71|  24.5M|    CRYPTO_RWLOCK **lock;
   72|  24.5M|    CRYPTO_REF_COUNT *refcnt;
   73|  24.5M|    int ret = -1;
   74|       |
   75|  24.5M|    if ((it->itype != ASN1_ITYPE_SEQUENCE)
  ------------------
  |  |   83|  24.5M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (75:9): [True: 0, False: 24.5M]
  ------------------
   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|  24.5M|    aux = it->funcs;
   79|  24.5M|    if (aux == NULL || (aux->flags & ASN1_AFLG_REFCOUNT) == 0)
  ------------------
  |  |  721|  2.17M|#define ASN1_AFLG_REFCOUNT 1
  ------------------
  |  Branch (79:9): [True: 22.3M, False: 2.17M]
  |  Branch (79:24): [True: 871k, False: 1.30M]
  ------------------
   80|  23.1M|        return 0;
   81|  1.30M|    lock = offset2ptr(*pval, aux->ref_lock);
  ------------------
  |  |   23|  1.30M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   82|  1.30M|    refcnt = offset2ptr(*pval, aux->ref_offset);
  ------------------
  |  |   23|  1.30M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   83|       |
   84|  1.30M|    switch (op) {
  ------------------
  |  Branch (84:13): [True: 1.30M, False: 0]
  ------------------
   85|   435k|    case 0:
  ------------------
  |  Branch (85:5): [True: 435k, False: 871k]
  ------------------
   86|   435k|        if (!CRYPTO_NEW_REF(refcnt, 1))
  ------------------
  |  Branch (86:13): [True: 0, False: 435k]
  ------------------
   87|      0|            return -1;
   88|   435k|        *lock = CRYPTO_THREAD_lock_new();
   89|   435k|        if (*lock == NULL) {
  ------------------
  |  Branch (89:13): [True: 0, False: 435k]
  ------------------
   90|      0|            CRYPTO_FREE_REF(refcnt);
   91|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   92|      0|            return -1;
   93|      0|        }
   94|   435k|        ret = 1;
   95|   435k|        break;
   96|      0|    case 1:
  ------------------
  |  Branch (96:5): [True: 0, False: 1.30M]
  ------------------
   97|      0|        if (!CRYPTO_UP_REF(refcnt, &ret))
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return -1;
   99|      0|        break;
  100|   871k|    case -1:
  ------------------
  |  Branch (100:5): [True: 871k, False: 435k]
  ------------------
  101|   871k|        if (!CRYPTO_DOWN_REF(refcnt, &ret))
  ------------------
  |  Branch (101:13): [True: 0, False: 871k]
  ------------------
  102|      0|            return -1; /* failed */
  103|   871k|        REF_PRINT_EX(it->sname, ret, (void *)it);
  ------------------
  |  |  299|   871k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  ------------------
  |  |  |  |  297|   871k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|   871k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  104|   871k|        REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|   871k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 871k]
  |  |  ------------------
  ------------------
  105|   871k|        if (ret == 0) {
  ------------------
  |  Branch (105:13): [True: 435k, False: 435k]
  ------------------
  106|   435k|            CRYPTO_THREAD_lock_free(*lock);
  107|   435k|            *lock = NULL;
  108|   435k|            CRYPTO_FREE_REF(refcnt);
  109|   435k|        }
  110|   871k|        break;
  111|  1.30M|    }
  112|       |
  113|  1.30M|    return ret;
  114|  1.30M|}
ossl_asn1_enc_init:
  142|  11.8M|{
  143|  11.8M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  144|       |
  145|  11.8M|    if (enc != NULL) {
  ------------------
  |  Branch (145:9): [True: 435k, False: 11.3M]
  ------------------
  146|       |        enc->enc = NULL;
  147|   435k|        enc->len = 0;
  148|   435k|        enc->modified = 1;
  149|   435k|    }
  150|  11.8M|}
ossl_asn1_enc_free:
  153|  12.2M|{
  154|  12.2M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  155|       |
  156|  12.2M|    if (enc != NULL) {
  ------------------
  |  Branch (156:9): [True: 435k, False: 11.8M]
  ------------------
  157|   435k|        OPENSSL_free(enc->enc);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  158|       |        enc->enc = NULL;
  159|   435k|        enc->len = 0;
  160|   435k|        enc->modified = 1;
  161|   435k|    }
  162|  12.2M|}
ossl_asn1_enc_save:
  166|  10.2M|{
  167|  10.2M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  168|       |
  169|  10.2M|    if (enc == NULL)
  ------------------
  |  Branch (169:9): [True: 9.84M, False: 435k]
  ------------------
  170|  9.84M|        return 1;
  171|       |
  172|   435k|    OPENSSL_free(enc->enc);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  173|   435k|    if (inlen <= 0) {
  ------------------
  |  Branch (173:9): [True: 0, False: 435k]
  ------------------
  174|      0|        enc->enc = NULL;
  175|      0|        return 0;
  176|      0|    }
  177|   435k|    if ((enc->enc = OPENSSL_malloc(inlen)) == NULL)
  ------------------
  |  |  106|   435k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (177:9): [True: 0, False: 435k]
  ------------------
  178|      0|        return 0;
  179|   435k|    memcpy(enc->enc, in, inlen);
  180|   435k|    enc->len = inlen;
  181|   435k|    enc->modified = 0;
  182|       |
  183|   435k|    return 1;
  184|   435k|}
ossl_asn1_enc_restore:
  188|  12.5M|{
  189|  12.5M|    const ASN1_ENCODING *enc = asn1_get_const_enc_ptr(pval, it);
  190|       |
  191|  12.5M|    if (enc == NULL || enc->modified)
  ------------------
  |  Branch (191:9): [True: 11.3M, False: 1.13M]
  |  Branch (191:24): [True: 0, False: 1.13M]
  ------------------
  192|  11.3M|        return 0;
  193|  1.13M|    if (out) {
  ------------------
  |  Branch (193:9): [True: 378k, False: 756k]
  ------------------
  194|   378k|        memcpy(*out, enc->enc, enc->len);
  195|   378k|        *out += enc->len;
  196|   378k|    }
  197|  1.13M|    if (len != NULL)
  ------------------
  |  Branch (197:9): [True: 1.13M, False: 0]
  ------------------
  198|  1.13M|        *len = enc->len;
  199|  1.13M|    return 1;
  200|  12.5M|}
ossl_asn1_get_field_ptr:
  204|  86.6M|{
  205|  86.6M|    ASN1_VALUE **pvaltmp = offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  86.6M|#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|  86.6M|    return pvaltmp;
  212|  86.6M|}
ossl_asn1_get_const_field_ptr:
  217|  31.7M|{
  218|  31.7M|    return offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  31.7M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  219|  31.7M|}
ossl_asn1_do_adb:
  229|  88.6M|{
  230|  88.6M|    const ASN1_ADB *adb;
  231|  88.6M|    const ASN1_ADB_TABLE *atbl;
  232|  88.6M|    long selector;
  233|  88.6M|    const ASN1_VALUE **sfld;
  234|  88.6M|    int i;
  235|       |
  236|  88.6M|    if ((tt->flags & ASN1_TFLG_ADB_MASK) == 0)
  ------------------
  |  |  572|  88.6M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (236:9): [True: 88.6M, False: 0]
  ------------------
  237|  88.6M|        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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|       |    return NULL;
  290|      0|}
tasn_utl.c:asn1_get_enc_ptr:
  117|  34.3M|{
  118|  34.3M|    const ASN1_AUX *aux;
  119|       |
  120|  34.3M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 34.3M]
  |  Branch (120:25): [True: 0, False: 34.3M]
  ------------------
  121|      0|        return NULL;
  122|  34.3M|    aux = it->funcs;
  123|  34.3M|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|  2.93M|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (123:9): [True: 31.4M, False: 2.93M]
  |  Branch (123:24): [True: 1.62M, False: 1.30M]
  ------------------
  124|  33.0M|        return NULL;
  125|  1.30M|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|  1.30M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  126|  34.3M|}
tasn_utl.c:asn1_get_const_enc_ptr:
  130|  12.5M|{
  131|  12.5M|    const ASN1_AUX *aux;
  132|       |
  133|  12.5M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 12.5M]
  |  Branch (133:25): [True: 0, False: 12.5M]
  ------------------
  134|      0|        return NULL;
  135|  12.5M|    aux = it->funcs;
  136|  12.5M|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|  1.89M|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (136:9): [True: 10.6M, False: 1.89M]
  |  Branch (136:24): [True: 756k, False: 1.13M]
  ------------------
  137|  11.3M|        return NULL;
  138|  1.13M|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|  1.13M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  139|  12.5M|}

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

BIGNUM_it:
   57|   633k|ASN1_ITEM_start(BIGNUM)
  ------------------
  |  |   97|   633k|    {                                  \
  |  |   98|   633k|        static const ASN1_ITEM local_it = {
  ------------------
   58|   633k|    ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|   633k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
   59|   633k|    V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" ASN1_ITEM_end(BIGNUM)
  ------------------
  |  |   66|   633k|#define V_ASN1_INTEGER 2
  ------------------
                  V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" ASN1_ITEM_end(BIGNUM)
  ------------------
  |  |  104|   633k|    }                         \
  |  |  105|   633k|    ;                         \
  |  |  106|   633k|    return &local_it;         \
  |  |  107|   633k|    }
  ------------------
x_bignum.c:bn_new:
   65|   633k|{
   66|   633k|    *pval = (ASN1_VALUE *)BN_new();
   67|   633k|    if (*pval != NULL)
  ------------------
  |  Branch (67:9): [True: 633k, False: 0]
  ------------------
   68|   633k|        return 1;
   69|      0|    else
   70|      0|        return 0;
   71|   633k|}
x_bignum.c:bn_c2i:
  116|   633k|{
  117|   633k|    BIGNUM *bn;
  118|       |
  119|   633k|    if (*pval == NULL && !bn_new(pval, it))
  ------------------
  |  Branch (119:9): [True: 633k, False: 0]
  |  Branch (119:26): [True: 0, False: 633k]
  ------------------
  120|      0|        return 0;
  121|   633k|    bn = (BIGNUM *)*pval;
  122|   633k|    if (!BN_bin2bn(cont, len, bn)) {
  ------------------
  |  Branch (122:9): [True: 0, False: 633k]
  ------------------
  123|      0|        bn_free(pval, it);
  124|      0|        return 0;
  125|      0|    }
  126|   633k|    return 1;
  127|   633k|}

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

X509_PKEY_free:
   36|   435k|{
   37|   435k|    if (x == NULL)
  ------------------
  |  Branch (37:9): [True: 435k, False: 0]
  ------------------
   38|   435k|        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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|      0|    OPENSSL_free(x);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   46|      0|}

ossl_encode_der_length:
   40|   360k|{
   41|   360k|    if (cont_len > 0xffff)
  ------------------
  |  Branch (41:9): [True: 0, False: 360k]
  ------------------
   42|      0|        return 0; /* Too large for supported length encodings */
   43|       |
   44|   360k|    if (cont_len > 0xff) {
  ------------------
  |  Branch (44:9): [True: 0, False: 360k]
  ------------------
   45|      0|        if (!WPACKET_put_bytes_u8(pkt, 0x82)
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (45:13): [True: 0, False: 0]
  ------------------
   46|      0|            || !WPACKET_put_bytes_u16(pkt, cont_len))
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (46:16): [True: 0, False: 0]
  ------------------
   47|      0|            return 0;
   48|   360k|    } else {
   49|   360k|        if (cont_len > 0x7f
  ------------------
  |  Branch (49:13): [True: 197, False: 359k]
  ------------------
   50|    197|            && !WPACKET_put_bytes_u8(pkt, 0x81))
  ------------------
  |  |  889|    197|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (50:16): [True: 0, False: 197]
  ------------------
   51|      0|            return 0;
   52|   360k|        if (!WPACKET_put_bytes_u8(pkt, cont_len))
  ------------------
  |  |  889|   360k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (52:13): [True: 0, False: 360k]
  ------------------
   53|      0|            return 0;
   54|   360k|    }
   55|       |
   56|   360k|    return 1;
   57|   360k|}
ossl_encode_der_integer:
   67|   240k|{
   68|   240k|    unsigned char *bnbytes;
   69|   240k|    size_t cont_len;
   70|       |
   71|   240k|    if (BN_is_negative(n))
  ------------------
  |  Branch (71:9): [True: 0, False: 240k]
  ------------------
   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|   240k|    cont_len = BN_num_bits(n) / 8 + 1;
   84|       |
   85|   240k|    if (!WPACKET_start_sub_packet(pkt)
  ------------------
  |  Branch (85:9): [True: 0, False: 240k]
  ------------------
   86|   240k|        || !WPACKET_put_bytes_u8(pkt, ID_INTEGER)
  ------------------
  |  |  889|   480k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (86:12): [True: 0, False: 240k]
  ------------------
   87|   240k|        || !ossl_encode_der_length(pkt, cont_len)
  ------------------
  |  Branch (87:12): [True: 0, False: 240k]
  ------------------
   88|   240k|        || !WPACKET_allocate_bytes(pkt, cont_len, &bnbytes)
  ------------------
  |  Branch (88:12): [True: 0, False: 240k]
  ------------------
   89|   240k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (89:12): [True: 0, False: 240k]
  ------------------
   90|      0|        return 0;
   91|       |
   92|   240k|    if (bnbytes != NULL
  ------------------
  |  Branch (92:9): [True: 0, False: 240k]
  ------------------
   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|   240k|    return 1;
   97|   240k|}
ossl_encode_der_dsa_sig:
  107|   120k|{
  108|   120k|    WPACKET tmppkt, *dummypkt;
  109|   120k|    size_t cont_len;
  110|   120k|    int isnull = WPACKET_is_null_buf(pkt);
  111|       |
  112|   120k|    if (!WPACKET_start_sub_packet(pkt))
  ------------------
  |  Branch (112:9): [True: 0, False: 120k]
  ------------------
  113|      0|        return 0;
  114|       |
  115|   120k|    if (!isnull) {
  ------------------
  |  Branch (115:9): [True: 0, False: 120k]
  ------------------
  116|      0|        if (!WPACKET_init_null(&tmppkt, 0))
  ------------------
  |  Branch (116:13): [True: 0, False: 0]
  ------------------
  117|      0|            return 0;
  118|      0|        dummypkt = &tmppkt;
  119|   120k|    } else {
  120|       |        /* If the input packet has a NULL buffer, we don't need a dummy packet */
  121|   120k|        dummypkt = pkt;
  122|   120k|    }
  123|       |
  124|       |    /* Calculate the content length */
  125|   120k|    if (!ossl_encode_der_integer(dummypkt, r)
  ------------------
  |  Branch (125:9): [True: 0, False: 120k]
  ------------------
  126|   120k|        || !ossl_encode_der_integer(dummypkt, s)
  ------------------
  |  Branch (126:12): [True: 0, False: 120k]
  ------------------
  127|   120k|        || !WPACKET_get_length(dummypkt, &cont_len)
  ------------------
  |  Branch (127:12): [True: 0, False: 120k]
  ------------------
  128|   120k|        || (!isnull && !WPACKET_finish(dummypkt))) {
  ------------------
  |  Branch (128:13): [True: 0, False: 120k]
  |  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|   120k|    if (!WPACKET_put_bytes_u8(pkt, ID_SEQUENCE)
  ------------------
  |  |  889|   240k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (135:9): [True: 0, False: 120k]
  ------------------
  136|   120k|        || !ossl_encode_der_length(pkt, cont_len)
  ------------------
  |  Branch (136:12): [True: 0, False: 120k]
  ------------------
  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|   120k|        || (!isnull && !ossl_encode_der_integer(pkt, r))
  ------------------
  |  Branch (141:13): [True: 0, False: 120k]
  |  Branch (141:24): [True: 0, False: 0]
  ------------------
  142|   120k|        || (!isnull && !ossl_encode_der_integer(pkt, s))
  ------------------
  |  Branch (142:13): [True: 0, False: 120k]
  |  Branch (142:24): [True: 0, False: 0]
  ------------------
  143|   120k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (143:12): [True: 0, False: 120k]
  ------------------
  144|      0|        return 0;
  145|       |
  146|   120k|    return 1;
  147|   120k|}

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|  1.95k|{
   22|  1.95k|    struct fd_lookup_st *curr;
   23|  1.95k|    struct fd_lookup_st *next;
   24|       |
   25|  1.95k|    if (ctx == NULL)
  ------------------
  |  Branch (25:9): [True: 1.95k, False: 0]
  ------------------
   26|  1.95k|        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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|      0|        curr = next;
   39|      0|    }
   40|       |
   41|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   42|      0|}

BIO_f_buffer:
   41|  1.95k|{
   42|  1.95k|    return &methods_buffer;
   43|  1.95k|}
bf_buff.c:buffer_write:
  159|  3.63k|{
  160|  3.63k|    int i, num = 0;
  161|  3.63k|    BIO_F_BUFFER_CTX *ctx;
  162|       |
  163|  3.63k|    if ((in == NULL) || (inl <= 0))
  ------------------
  |  Branch (163:9): [True: 0, False: 3.63k]
  |  Branch (163:25): [True: 0, False: 3.63k]
  ------------------
  164|      0|        return 0;
  165|  3.63k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  166|  3.63k|    if ((ctx == NULL) || (b->next_bio == NULL))
  ------------------
  |  Branch (166:9): [True: 0, False: 3.63k]
  |  Branch (166:26): [True: 0, False: 3.63k]
  ------------------
  167|      0|        return 0;
  168|       |
  169|  3.63k|    BIO_clear_retry_flags(b);
  ------------------
  |  |  263|  3.63k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  3.63k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  3.63k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  3.63k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  3.63k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  3.63k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  170|  3.63k|start:
  171|  3.63k|    i = ctx->obuf_size - (ctx->obuf_len + ctx->obuf_off);
  172|       |    /* add to buffer and return */
  173|  3.63k|    if (i >= inl) {
  ------------------
  |  Branch (173:9): [True: 3.63k, False: 4]
  ------------------
  174|  3.63k|        memcpy(&(ctx->obuf[ctx->obuf_off + ctx->obuf_len]), in, inl);
  175|  3.63k|        ctx->obuf_len += inl;
  176|  3.63k|        return (num + inl);
  177|  3.63k|    }
  178|       |    /* else */
  179|       |    /* stuff already in buffer, so add to it first, then flush */
  180|      4|    if (ctx->obuf_len != 0) {
  ------------------
  |  Branch (180:9): [True: 0, False: 4]
  ------------------
  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|      4|    ctx->obuf_off = 0;
  211|       |
  212|       |    /* we now have inl bytes to write */
  213|      4|    while (inl >= ctx->obuf_size) {
  ------------------
  |  Branch (213:12): [True: 4, False: 0]
  ------------------
  214|      4|        i = BIO_write(b->next_bio, in, inl);
  215|      4|        if (i <= 0) {
  ------------------
  |  Branch (215:13): [True: 0, False: 4]
  ------------------
  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|      4|        num += i;
  223|      4|        in += i;
  224|      4|        inl -= i;
  225|      4|        if (inl == 0)
  ------------------
  |  Branch (225:13): [True: 4, False: 0]
  ------------------
  226|      4|            return num;
  227|      4|    }
  228|       |
  229|       |    /*
  230|       |     * copy the rest into the buffer since we have only a small amount left
  231|       |     */
  232|      0|    goto start;
  233|      4|}
bf_buff.c:buffer_ctrl:
  236|  9.50k|{
  237|  9.50k|    BIO *dbio;
  238|  9.50k|    BIO_F_BUFFER_CTX *ctx;
  239|  9.50k|    long ret = 1;
  240|  9.50k|    char *p1, *p2;
  241|  9.50k|    int r, i, *ip;
  242|  9.50k|    int ibs, obs;
  243|       |
  244|  9.50k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  245|       |
  246|  9.50k|    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: 9.50k]
  ------------------
  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: 9.50k]
  ------------------
  257|      0|        if (ctx->ibuf_len > 0)
  ------------------
  |  Branch (257:13): [True: 0, False: 0]
  ------------------
  258|      0|            return 0;
  259|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  260|      0|        break;
  261|      0|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (261:5): [True: 0, False: 9.50k]
  ------------------
  262|      0|        ret = (long)ctx->obuf_len;
  263|      0|        break;
  264|      0|    case BIO_C_GET_BUFF_NUM_LINES:
  ------------------
  |  |  450|      0|#define BIO_C_GET_BUFF_NUM_LINES 116
  ------------------
  |  Branch (264:5): [True: 0, False: 9.50k]
  ------------------
  265|      0|        ret = 0;
  266|      0|        p1 = ctx->ibuf;
  267|      0|        for (i = 0; i < ctx->ibuf_len; i++) {
  ------------------
  |  Branch (267:21): [True: 0, False: 0]
  ------------------
  268|      0|            if (p1[ctx->ibuf_off + i] == '\n')
  ------------------
  |  Branch (268:17): [True: 0, False: 0]
  ------------------
  269|      0|                ret++;
  270|      0|        }
  271|      0|        break;
  272|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (272:5): [True: 0, False: 9.50k]
  ------------------
  273|      0|        ret = (long)ctx->obuf_len;
  274|      0|        if (ret == 0) {
  ------------------
  |  Branch (274:13): [True: 0, False: 0]
  ------------------
  275|      0|            if (b->next_bio == NULL)
  ------------------
  |  Branch (275:17): [True: 0, False: 0]
  ------------------
  276|      0|                return 0;
  277|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  278|      0|        }
  279|      0|        break;
  280|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (280:5): [True: 0, False: 9.50k]
  ------------------
  281|      0|        ret = (long)ctx->ibuf_len;
  282|      0|        if (ret == 0) {
  ------------------
  |  Branch (282:13): [True: 0, False: 0]
  ------------------
  283|      0|            if (b->next_bio == NULL)
  ------------------
  |  Branch (283:17): [True: 0, False: 0]
  ------------------
  284|      0|                return 0;
  285|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  286|      0|        }
  287|      0|        break;
  288|      0|    case BIO_C_SET_BUFF_READ_DATA:
  ------------------
  |  |  456|      0|#define BIO_C_SET_BUFF_READ_DATA 122 /* data to read first */
  ------------------
  |  Branch (288:5): [True: 0, False: 9.50k]
  ------------------
  289|      0|        if (num > ctx->ibuf_size) {
  ------------------
  |  Branch (289:13): [True: 0, False: 0]
  ------------------
  290|      0|            if (num <= 0)
  ------------------
  |  Branch (290:17): [True: 0, False: 0]
  ------------------
  291|      0|                return 0;
  292|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  293|      0|            if (p1 == NULL)
  ------------------
  |  Branch (293:17): [True: 0, False: 0]
  ------------------
  294|      0|                return 0;
  295|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  296|      0|            ctx->ibuf = p1;
  297|      0|        }
  298|      0|        ctx->ibuf_off = 0;
  299|      0|        ctx->ibuf_len = (int)num;
  300|      0|        memcpy(ctx->ibuf, ptr, (int)num);
  301|      0|        ret = 1;
  302|      0|        break;
  303|  1.95k|    case BIO_C_SET_BUFF_SIZE:
  ------------------
  |  |  451|  1.95k|#define BIO_C_SET_BUFF_SIZE 117
  ------------------
  |  Branch (303:5): [True: 1.95k, False: 7.54k]
  ------------------
  304|  1.95k|        if (ptr != NULL) {
  ------------------
  |  Branch (304:13): [True: 1.95k, False: 0]
  ------------------
  305|  1.95k|            ip = (int *)ptr;
  306|  1.95k|            if (*ip == 0) {
  ------------------
  |  Branch (306:17): [True: 1.95k, False: 0]
  ------------------
  307|  1.95k|                ibs = (int)num;
  308|  1.95k|                obs = ctx->obuf_size;
  309|  1.95k|            } else { /* if (*ip == 1) */
  310|       |
  311|      0|                ibs = ctx->ibuf_size;
  312|      0|                obs = (int)num;
  313|      0|            }
  314|  1.95k|        } else {
  315|      0|            ibs = (int)num;
  316|      0|            obs = (int)num;
  317|      0|        }
  318|  1.95k|        p1 = ctx->ibuf;
  319|  1.95k|        p2 = ctx->obuf;
  320|  1.95k|        if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) {
  ------------------
  |  |   23|  1.95k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (320:13): [True: 0, False: 1.95k]
  |  Branch (320:44): [True: 0, False: 0]
  ------------------
  321|      0|            if (num <= 0)
  ------------------
  |  Branch (321:17): [True: 0, False: 0]
  ------------------
  322|      0|                return 0;
  323|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  324|      0|            if (p1 == NULL)
  ------------------
  |  Branch (324:17): [True: 0, False: 0]
  ------------------
  325|      0|                return 0;
  326|      0|        }
  327|  1.95k|        if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) {
  ------------------
  |  |   23|  1.95k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (327:13): [True: 0, False: 1.95k]
  |  Branch (327:44): [True: 0, False: 0]
  ------------------
  328|      0|            p2 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  329|      0|            if (p2 == NULL) {
  ------------------
  |  Branch (329:17): [True: 0, False: 0]
  ------------------
  330|      0|                if (p1 != ctx->ibuf)
  ------------------
  |  Branch (330:21): [True: 0, False: 0]
  ------------------
  331|      0|                    OPENSSL_free(p1);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  332|      0|                return 0;
  333|      0|            }
  334|      0|        }
  335|  1.95k|        if (ctx->ibuf != p1) {
  ------------------
  |  Branch (335:13): [True: 0, False: 1.95k]
  ------------------
  336|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  337|      0|            ctx->ibuf = p1;
  338|      0|            ctx->ibuf_off = 0;
  339|      0|            ctx->ibuf_len = 0;
  340|      0|            ctx->ibuf_size = ibs;
  341|      0|        }
  342|  1.95k|        if (ctx->obuf != p2) {
  ------------------
  |  Branch (342:13): [True: 0, False: 1.95k]
  ------------------
  343|      0|            OPENSSL_free(ctx->obuf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  344|      0|            ctx->obuf = p2;
  345|      0|            ctx->obuf_off = 0;
  346|      0|            ctx->obuf_len = 0;
  347|      0|            ctx->obuf_size = obs;
  348|      0|        }
  349|  1.95k|        break;
  350|      0|    case BIO_C_DO_STATE_MACHINE:
  ------------------
  |  |  435|      0|#define BIO_C_DO_STATE_MACHINE 101
  ------------------
  |  Branch (350:5): [True: 0, False: 9.50k]
  ------------------
  351|      0|        if (b->next_bio == NULL)
  ------------------
  |  Branch (351:13): [True: 0, False: 0]
  ------------------
  352|      0|            return 0;
  353|      0|        BIO_clear_retry_flags(b);
  ------------------
  |  |  263|      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
  |  |  ------------------
  ------------------
  354|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  355|      0|        BIO_copy_next_retry(b);
  356|      0|        break;
  357|       |
  358|  3.63k|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|  3.63k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (358:5): [True: 3.63k, False: 5.86k]
  ------------------
  359|  3.63k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (359:13): [True: 0, False: 3.63k]
  ------------------
  360|      0|            return 0;
  361|  3.63k|        if (ctx->obuf_len <= 0) {
  ------------------
  |  Branch (361:13): [True: 4, False: 3.63k]
  ------------------
  362|      4|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  363|      4|            BIO_copy_next_retry(b);
  364|      4|            break;
  365|      4|        }
  366|       |
  367|  7.26k|        for (;;) {
  368|  7.26k|            BIO_clear_retry_flags(b);
  ------------------
  |  |  263|  7.26k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  7.26k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  7.26k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  7.26k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  7.26k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  7.26k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  369|  7.26k|            if (ctx->obuf_len > 0) {
  ------------------
  |  Branch (369:17): [True: 3.63k, False: 3.63k]
  ------------------
  370|  3.63k|                r = BIO_write(b->next_bio,
  371|  3.63k|                    &(ctx->obuf[ctx->obuf_off]), ctx->obuf_len);
  372|  3.63k|                BIO_copy_next_retry(b);
  373|  3.63k|                if (r <= 0)
  ------------------
  |  Branch (373:21): [True: 0, False: 3.63k]
  ------------------
  374|      0|                    return (long)r;
  375|  3.63k|                ctx->obuf_off += r;
  376|  3.63k|                ctx->obuf_len -= r;
  377|  3.63k|            } else {
  378|  3.63k|                ctx->obuf_len = 0;
  379|  3.63k|                ctx->obuf_off = 0;
  380|  3.63k|                break;
  381|  3.63k|            }
  382|  7.26k|        }
  383|  3.63k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  384|  3.63k|        BIO_copy_next_retry(b);
  385|  3.63k|        break;
  386|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (386:5): [True: 0, False: 9.50k]
  ------------------
  387|      0|        dbio = (BIO *)ptr;
  388|      0|        if (BIO_set_read_buffer_size(dbio, ctx->ibuf_size) <= 0 || BIO_set_write_buffer_size(dbio, ctx->obuf_size) <= 0)
  ------------------
  |  |  625|      0|#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
  |  |  ------------------
  |  |  |  |  451|      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)
  ------------------
  |  |  626|      0|#define BIO_set_write_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 1)
  |  |  ------------------
  |  |  |  |  451|      0|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
  |  Branch (388:13): [True: 0, False: 0]
  |  Branch (388:68): [True: 0, False: 0]
  ------------------
  389|      0|            ret = 0;
  390|      0|        break;
  391|      0|    case BIO_CTRL_PEEK:
  ------------------
  |  |  106|      0|#define BIO_CTRL_PEEK 29 /* BIO_f_buffer special */
  ------------------
  |  Branch (391:5): [True: 0, False: 9.50k]
  ------------------
  392|       |        /* Ensure there's stuff in the input buffer */
  393|      0|        {
  394|      0|            char fake_buf[1];
  395|      0|            (void)buffer_read(b, fake_buf, 0);
  396|      0|        }
  397|      0|        if (num > ctx->ibuf_len)
  ------------------
  |  Branch (397:13): [True: 0, False: 0]
  ------------------
  398|      0|            num = ctx->ibuf_len;
  399|      0|        memcpy(ptr, &(ctx->ibuf[ctx->ibuf_off]), num);
  400|      0|        ret = num;
  401|      0|        break;
  402|  3.91k|    default:
  ------------------
  |  Branch (402:5): [True: 3.91k, False: 5.59k]
  ------------------
  403|  3.91k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (403:13): [True: 0, False: 3.91k]
  ------------------
  404|      0|            return 0;
  405|  3.91k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  406|  3.91k|        break;
  407|  9.50k|    }
  408|  9.50k|    return ret;
  409|  9.50k|}
bf_buff.c:buffer_new:
   46|  1.95k|{
   47|  1.95k|    BIO_F_BUFFER_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|  1.95k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|       |
   49|  1.95k|    if (ctx == NULL)
  ------------------
  |  Branch (49:9): [True: 0, False: 1.95k]
  ------------------
   50|      0|        return 0;
   51|  1.95k|    ctx->ibuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  1.95k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   52|  1.95k|    ctx->ibuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  106|  1.95k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   53|  1.95k|    if (ctx->ibuf == NULL) {
  ------------------
  |  Branch (53:9): [True: 0, False: 1.95k]
  ------------------
   54|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|      0|        return 0;
   56|      0|    }
   57|  1.95k|    ctx->obuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  1.95k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   58|  1.95k|    ctx->obuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  106|  1.95k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|  1.95k|    if (ctx->obuf == NULL) {
  ------------------
  |  Branch (59:9): [True: 0, False: 1.95k]
  ------------------
   60|      0|        OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      0|        return 0;
   63|      0|    }
   64|       |
   65|  1.95k|    bi->init = 1;
   66|  1.95k|    bi->ptr = (char *)ctx;
   67|  1.95k|    bi->flags = 0;
   68|  1.95k|    return 1;
   69|  1.95k|}
bf_buff.c:buffer_free:
   72|  1.95k|{
   73|  1.95k|    BIO_F_BUFFER_CTX *b;
   74|       |
   75|  1.95k|    if (a == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 1.95k]
  ------------------
   76|      0|        return 0;
   77|  1.95k|    b = (BIO_F_BUFFER_CTX *)a->ptr;
   78|  1.95k|    OPENSSL_free(b->ibuf);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|  1.95k|    OPENSSL_free(b->obuf);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|  1.95k|    OPENSSL_free(a->ptr);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|       |    a->ptr = NULL;
   82|  1.95k|    a->init = 0;
   83|  1.95k|    a->flags = 0;
   84|  1.95k|    return 1;
   85|  1.95k|}

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|  2.64M|{
   83|  2.64M|    BIO *bio = OPENSSL_zalloc(sizeof(*bio));
  ------------------
  |  |  108|  2.64M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|       |
   85|  2.64M|    if (bio == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 2.64M]
  ------------------
   86|      0|        return NULL;
   87|       |
   88|  2.64M|    bio->libctx = libctx;
   89|  2.64M|    bio->method = method;
   90|  2.64M|    bio->shutdown = 1;
   91|       |
   92|  2.64M|    if (!CRYPTO_NEW_REF(&bio->references, 1))
  ------------------
  |  Branch (92:9): [True: 0, False: 2.64M]
  ------------------
   93|      0|        goto err;
   94|       |
   95|  2.64M|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data))
  ------------------
  |  |  262|  2.64M|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  |  Branch (95:9): [True: 0, False: 2.64M]
  ------------------
   96|      0|        goto err;
   97|       |
   98|  2.64M|    if (method->create != NULL && !method->create(bio)) {
  ------------------
  |  Branch (98:9): [True: 2.64M, False: 0]
  |  Branch (98:35): [True: 0, False: 2.64M]
  ------------------
   99|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_INIT_FAIL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data);
  ------------------
  |  |  262|      0|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  101|      0|        goto err;
  102|      0|    }
  103|  2.64M|    if (method->create == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 2.64M]
  ------------------
  104|      0|        bio->init = 1;
  105|       |
  106|  2.64M|    return bio;
  107|       |
  108|      0|err:
  109|      0|    CRYPTO_FREE_REF(&bio->references);
  110|      0|    OPENSSL_free(bio);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|       |    return NULL;
  112|  2.64M|}
BIO_new:
  115|  2.64M|{
  116|       |    return BIO_new_ex(NULL, method);
  117|  2.64M|}
BIO_free:
  120|  4.47M|{
  121|  4.47M|    int ret;
  122|       |
  123|  4.47M|    if (a == NULL)
  ------------------
  |  Branch (123:9): [True: 940k, False: 3.53M]
  ------------------
  124|   940k|        return 0;
  125|       |
  126|  3.53M|    if (CRYPTO_DOWN_REF(&a->references, &ret) <= 0)
  ------------------
  |  Branch (126:9): [True: 0, False: 3.53M]
  ------------------
  127|      0|        return 0;
  128|       |
  129|  3.53M|    REF_PRINT_COUNT("BIO", ret, a);
  ------------------
  |  |  301|  3.53M|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  3.53M|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  3.53M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  3.53M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  130|  3.53M|    if (ret > 0)
  ------------------
  |  Branch (130:9): [True: 891k, False: 2.64M]
  ------------------
  131|   891k|        return 1;
  132|  2.64M|    REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|  2.64M|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.64M]
  |  |  ------------------
  ------------------
  133|       |
  134|  2.64M|    if (HAS_CALLBACK(a)) {
  ------------------
  |  |   26|  2.64M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 2.64M]
  |  |  |  Branch (26:51): [True: 0, False: 2.64M]
  |  |  ------------------
  ------------------
  135|      0|        ret = (int)bio_call_callback(a, BIO_CB_FREE, NULL, 0, 0, 0L, 1L, NULL);
  ------------------
  |  |  291|      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|  2.64M|    if ((a->method != NULL) && (a->method->destroy != NULL))
  ------------------
  |  Branch (140:9): [True: 2.64M, False: 0]
  |  Branch (140:32): [True: 2.64M, False: 0]
  ------------------
  141|  2.64M|        a->method->destroy(a);
  142|       |
  143|  2.64M|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
  ------------------
  |  |  262|  2.64M|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  144|       |
  145|  2.64M|    CRYPTO_FREE_REF(&a->references);
  146|       |
  147|  2.64M|    OPENSSL_free(a);
  ------------------
  |  |  131|  2.64M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|       |
  149|  2.64M|    return 1;
  150|  2.64M|}
BIO_set_data:
  153|   875k|{
  154|   875k|    a->ptr = ptr;
  155|   875k|}
BIO_get_data:
  158|  2.63M|{
  159|  2.63M|    return a->ptr;
  160|  2.63M|}
BIO_set_init:
  163|  1.74M|{
  164|  1.74M|    a->init = init;
  165|  1.74M|}
BIO_set_shutdown:
  173|  1.95k|{
  174|  1.95k|    a->shutdown = shut;
  175|  1.95k|}
BIO_up_ref:
  188|   891k|{
  189|   891k|    int i;
  190|       |
  191|   891k|    if (CRYPTO_UP_REF(&a->references, &i) <= 0)
  ------------------
  |  Branch (191:9): [True: 0, False: 891k]
  ------------------
  192|      0|        return 0;
  193|       |
  194|   891k|    REF_PRINT_COUNT("BIO", i, a);
  ------------------
  |  |  301|   891k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   891k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   891k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   891k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|   891k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   891k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 891k]
  |  |  ------------------
  ------------------
  196|   891k|    return i > 1;
  197|   891k|}
BIO_clear_flags:
  200|  12.1M|{
  201|  12.1M|    b->flags &= ~flags;
  202|  12.1M|}
BIO_test_flags:
  205|  9.35k|{
  206|  9.35k|    return (b->flags & flags);
  207|  9.35k|}
BIO_set_flags:
  210|  7.58k|{
  211|  7.58k|    b->flags |= flags;
  212|  7.58k|}
BIO_read:
  302|  2.18M|{
  303|  2.18M|    size_t readbytes;
  304|  2.18M|    int ret;
  305|       |
  306|  2.18M|    if (dlen < 0)
  ------------------
  |  Branch (306:9): [True: 0, False: 2.18M]
  ------------------
  307|      0|        return 0;
  308|       |
  309|  2.18M|    ret = bio_read_intern(b, data, (size_t)dlen, &readbytes);
  310|       |
  311|  2.18M|    if (ret > 0) {
  ------------------
  |  Branch (311:9): [True: 2.18M, False: 1.77k]
  ------------------
  312|       |        /* *readbytes should always be <= dlen */
  313|  2.18M|        ret = (int)readbytes;
  314|  2.18M|    }
  315|       |
  316|  2.18M|    return ret;
  317|  2.18M|}
BIO_read_ex:
  320|  1.74M|{
  321|  1.74M|    return bio_read_intern(b, data, dlen, readbytes) > 0;
  322|  1.74M|}
BIO_write:
  367|  9.25k|{
  368|  9.25k|    size_t written;
  369|  9.25k|    int ret;
  370|       |
  371|  9.25k|    if (dlen <= 0)
  ------------------
  |  Branch (371:9): [True: 0, False: 9.25k]
  ------------------
  372|      0|        return 0;
  373|       |
  374|  9.25k|    ret = bio_write_intern(b, data, (size_t)dlen, &written);
  375|       |
  376|  9.25k|    if (ret > 0) {
  ------------------
  |  Branch (376:9): [True: 9.25k, False: 0]
  ------------------
  377|       |        /* written should always be <= dlen */
  378|  9.25k|        ret = (int)written;
  379|  9.25k|    }
  380|       |
  381|  9.25k|    return ret;
  382|  9.25k|}
BIO_write_ex:
  385|     40|{
  386|     40|    return bio_write_intern(b, data, dlen, written) > 0
  ------------------
  |  Branch (386:12): [True: 40, False: 0]
  ------------------
  387|      0|        || (b != NULL && dlen == 0); /* order is important for *written */
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  |  Branch (387:26): [True: 0, False: 0]
  ------------------
  388|     40|}
BIO_puts:
  495|  9.90M|{
  496|  9.90M|    int ret;
  497|  9.90M|    size_t written = 0;
  498|       |
  499|  9.90M|    if (b == NULL) {
  ------------------
  |  Branch (499:9): [True: 0, False: 9.90M]
  ------------------
  500|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  501|      0|        return -1;
  502|      0|    }
  503|  9.90M|    if (b->method == NULL || b->method->bputs == NULL) {
  ------------------
  |  Branch (503:9): [True: 0, False: 9.90M]
  |  Branch (503:30): [True: 0, False: 9.90M]
  ------------------
  504|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  505|      0|        return -2;
  506|      0|    }
  507|       |
  508|  9.90M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  9.90M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 9.90M]
  |  |  |  Branch (26:51): [True: 0, False: 9.90M]
  |  |  ------------------
  ------------------
  509|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS, buf, 0, 0, 0L, 1L, NULL);
  ------------------
  |  |  294|      0|#define BIO_CB_PUTS 0x04
  ------------------
  510|      0|        if (ret <= 0)
  ------------------
  |  Branch (510:13): [True: 0, False: 0]
  ------------------
  511|      0|            return ret;
  512|      0|    }
  513|       |
  514|  9.90M|    if (!b->init) {
  ------------------
  |  Branch (514:9): [True: 0, False: 9.90M]
  ------------------
  515|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  516|      0|        return -1;
  517|      0|    }
  518|       |
  519|  9.90M|    ret = b->method->bputs(b, buf);
  520|       |
  521|  9.90M|    if (ret > 0) {
  ------------------
  |  Branch (521:9): [True: 9.90M, False: 0]
  ------------------
  522|  9.90M|        b->num_write += (uint64_t)ret;
  523|  9.90M|        written = ret;
  524|  9.90M|        ret = 1;
  525|  9.90M|    }
  526|       |
  527|  9.90M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  9.90M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 9.90M]
  |  |  |  Branch (26:51): [True: 0, False: 9.90M]
  |  |  ------------------
  ------------------
  528|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  294|      0|#define BIO_CB_PUTS 0x04
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  529|      0|            0L, ret, &written);
  530|       |
  531|  9.90M|    if (ret > 0) {
  ------------------
  |  Branch (531:9): [True: 9.90M, False: 0]
  ------------------
  532|  9.90M|        if (written > INT_MAX) {
  ------------------
  |  Branch (532:13): [True: 0, False: 9.90M]
  ------------------
  533|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_LENGTH_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  534|      0|            ret = -1;
  535|  9.90M|        } else {
  536|  9.90M|            ret = (int)written;
  537|  9.90M|        }
  538|  9.90M|    }
  539|       |
  540|  9.90M|    return ret;
  541|  9.90M|}
BIO_gets:
  544|  10.7M|{
  545|  10.7M|    int ret;
  546|  10.7M|    size_t readbytes = 0;
  547|       |
  548|  10.7M|    if (b == NULL) {
  ------------------
  |  Branch (548:9): [True: 0, False: 10.7M]
  ------------------
  549|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  550|      0|        return -1;
  551|      0|    }
  552|  10.7M|    if (b->method == NULL || b->method->bgets == NULL) {
  ------------------
  |  Branch (552:9): [True: 0, False: 10.7M]
  |  Branch (552:30): [True: 0, False: 10.7M]
  ------------------
  553|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  554|      0|        return -2;
  555|      0|    }
  556|       |
  557|  10.7M|    if (size < 0) {
  ------------------
  |  Branch (557:9): [True: 0, False: 10.7M]
  ------------------
  558|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  559|      0|        return -1;
  560|      0|    }
  561|       |
  562|  10.7M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  10.7M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 10.7M]
  |  |  |  Branch (26:51): [True: 0, False: 10.7M]
  |  |  ------------------
  ------------------
  563|      0|        ret = (int)bio_call_callback(b, BIO_CB_GETS, buf, size, 0, 0L, 1, NULL);
  ------------------
  |  |  295|      0|#define BIO_CB_GETS 0x05
  ------------------
  564|      0|        if (ret <= 0)
  ------------------
  |  Branch (564:13): [True: 0, False: 0]
  ------------------
  565|      0|            return ret;
  566|      0|    }
  567|       |
  568|  10.7M|    if (!b->init) {
  ------------------
  |  Branch (568:9): [True: 0, False: 10.7M]
  ------------------
  569|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  570|      0|        return -1;
  571|      0|    }
  572|       |
  573|  10.7M|    ret = b->method->bgets(b, buf, size);
  574|       |
  575|  10.7M|    if (ret > 0) {
  ------------------
  |  Branch (575:9): [True: 10.7M, False: 5.70k]
  ------------------
  576|  10.7M|        readbytes = ret;
  577|  10.7M|        ret = 1;
  578|  10.7M|    }
  579|       |
  580|  10.7M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  10.7M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 10.7M]
  |  |  |  Branch (26:51): [True: 0, False: 10.7M]
  |  |  ------------------
  ------------------
  581|      0|        ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size,
  ------------------
  |  |  295|      0|#define BIO_CB_GETS 0x05
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  582|      0|            0, 0L, ret, &readbytes);
  583|       |
  584|  10.7M|    if (ret > 0) {
  ------------------
  |  Branch (584:9): [True: 10.7M, False: 5.70k]
  ------------------
  585|       |        /* Shouldn't happen */
  586|  10.7M|        if (readbytes > (size_t)size)
  ------------------
  |  Branch (586:13): [True: 0, False: 10.7M]
  ------------------
  587|      0|            ret = -1;
  588|  10.7M|        else
  589|  10.7M|            ret = (int)readbytes;
  590|  10.7M|    }
  591|       |
  592|  10.7M|    return ret;
  593|  10.7M|}
BIO_int_ctrl:
  639|  1.95k|{
  640|  1.95k|    int i;
  641|       |
  642|  1.95k|    i = iarg;
  643|  1.95k|    return BIO_ctrl(b, cmd, larg, (char *)&i);
  644|  1.95k|}
BIO_ctrl:
  657|  4.38M|{
  658|  4.38M|    long ret;
  659|       |
  660|  4.38M|    if (b == NULL)
  ------------------
  |  Branch (660:9): [True: 0, False: 4.38M]
  ------------------
  661|      0|        return -1;
  662|  4.38M|    if (b->method == NULL || b->method->ctrl == NULL) {
  ------------------
  |  Branch (662:9): [True: 0, False: 4.38M]
  |  Branch (662:30): [True: 0, False: 4.38M]
  ------------------
  663|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  664|      0|        return -2;
  665|      0|    }
  666|       |
  667|  4.38M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  4.38M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 4.38M]
  |  |  |  Branch (26:51): [True: 0, False: 4.38M]
  |  |  ------------------
  ------------------
  668|      0|        ret = bio_call_callback(b, BIO_CB_CTRL, parg, 0, cmd, larg, 1L, NULL);
  ------------------
  |  |  296|      0|#define BIO_CB_CTRL 0x06
  ------------------
  669|      0|        if (ret <= 0)
  ------------------
  |  Branch (669:13): [True: 0, False: 0]
  ------------------
  670|      0|            return ret;
  671|      0|    }
  672|       |
  673|  4.38M|    ret = b->method->ctrl(b, cmd, larg, parg);
  674|       |
  675|  4.38M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  4.38M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 4.38M]
  |  |  |  Branch (26:51): [True: 0, False: 4.38M]
  |  |  ------------------
  ------------------
  676|      0|        ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, cmd,
  ------------------
  |  |  296|      0|#define BIO_CB_CTRL 0x06
  ------------------
                      ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, cmd,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  677|      0|            larg, ret, NULL);
  678|       |
  679|  4.38M|    return ret;
  680|  4.38M|}
BIO_push:
  743|  1.95k|{
  744|  1.95k|    BIO *lb;
  745|       |
  746|  1.95k|    if (b == NULL)
  ------------------
  |  Branch (746:9): [True: 0, False: 1.95k]
  ------------------
  747|      0|        return bio;
  748|  1.95k|    lb = b;
  749|  1.95k|    while (lb->next_bio != NULL)
  ------------------
  |  Branch (749:12): [True: 0, False: 1.95k]
  ------------------
  750|      0|        lb = lb->next_bio;
  751|  1.95k|    lb->next_bio = bio;
  752|  1.95k|    if (bio != NULL)
  ------------------
  |  Branch (752:9): [True: 1.95k, False: 0]
  ------------------
  753|  1.95k|        bio->prev_bio = lb;
  754|       |    /* called to do internal processing */
  755|  1.95k|    BIO_ctrl(b, BIO_CTRL_PUSH, 0, lb);
  ------------------
  |  |   95|  1.95k|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  756|  1.95k|    return b;
  757|  1.95k|}
BIO_pop:
  761|  1.95k|{
  762|  1.95k|    BIO *ret;
  763|       |
  764|  1.95k|    if (b == NULL)
  ------------------
  |  Branch (764:9): [True: 0, False: 1.95k]
  ------------------
  765|      0|        return NULL;
  766|  1.95k|    ret = b->next_bio;
  767|       |
  768|  1.95k|    BIO_ctrl(b, BIO_CTRL_POP, 0, b);
  ------------------
  |  |   96|  1.95k|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  769|       |
  770|  1.95k|    if (b->prev_bio != NULL)
  ------------------
  |  Branch (770:9): [True: 0, False: 1.95k]
  ------------------
  771|      0|        b->prev_bio->next_bio = b->next_bio;
  772|  1.95k|    if (b->next_bio != NULL)
  ------------------
  |  Branch (772:9): [True: 1.95k, False: 0]
  ------------------
  773|  1.95k|        b->next_bio->prev_bio = b->prev_bio;
  774|       |
  775|  1.95k|    b->next_bio = NULL;
  776|       |    b->prev_bio = NULL;
  777|  1.95k|    return ret;
  778|  1.95k|}
BIO_free_all:
  846|  7.82k|{
  847|  7.82k|    BIO *b;
  848|  7.82k|    int ref;
  849|       |
  850|  9.78k|    while (bio != NULL) {
  ------------------
  |  Branch (850:12): [True: 3.91k, False: 5.86k]
  ------------------
  851|  3.91k|        b = bio;
  852|  3.91k|        CRYPTO_GET_REF(&b->references, &ref);
  853|  3.91k|        bio = bio->next_bio;
  854|  3.91k|        BIO_free(b);
  855|       |        /* Since ref count > 1, don't free anyone else. */
  856|  3.91k|        if (ref > 1)
  ------------------
  |  Branch (856:13): [True: 1.95k, False: 1.95k]
  ------------------
  857|  1.95k|            break;
  858|  3.91k|    }
  859|  7.82k|}
BIO_copy_next_retry:
  908|  7.26k|{
  909|  7.26k|    BIO_set_flags(b, BIO_get_retry_flags(b->next_bio));
  ------------------
  |  |  265|  7.26k|    BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  7.26k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  7.26k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  7.26k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  7.26k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  7.26k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  910|  7.26k|    b->retry_reason = b->next_bio->retry_reason;
  911|  7.26k|}
bio_cleanup:
  943|      1|{
  944|      1|#ifndef OPENSSL_NO_SOCK
  945|      1|    bio_sock_cleanup_int();
  946|      1|    CRYPTO_THREAD_lock_free(bio_lookup_lock);
  947|       |    bio_lookup_lock = NULL;
  948|      1|#endif
  949|      1|    CRYPTO_FREE_REF(&bio_type_count);
  950|      1|}
bio_lib.c:bio_read_intern:
  263|  3.92M|{
  264|  3.92M|    int ret;
  265|       |
  266|  3.92M|    if (b == NULL) {
  ------------------
  |  Branch (266:9): [True: 0, False: 3.92M]
  ------------------
  267|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  268|      0|        return -1;
  269|      0|    }
  270|  3.92M|    if (b->method == NULL || b->method->bread == NULL) {
  ------------------
  |  Branch (270:9): [True: 0, False: 3.92M]
  |  Branch (270:30): [True: 0, False: 3.92M]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        return -2;
  273|      0|    }
  274|       |
  275|  3.92M|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|  7.85M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 3.92M]
  |  |  |  Branch (26:51): [True: 0, False: 3.92M]
  |  |  ------------------
  ------------------
                  if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |  292|      0|#define BIO_CB_READ 0x02
  ------------------
  |  Branch (275:28): [True: 0, False: 0]
  ------------------
  276|      0|        return ret;
  277|       |
  278|  3.92M|    if (!b->init) {
  ------------------
  |  Branch (278:9): [True: 0, False: 3.92M]
  ------------------
  279|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  280|      0|        return -1;
  281|      0|    }
  282|       |
  283|  3.92M|    ret = b->method->bread(b, data, dlen, readbytes);
  284|       |
  285|  3.92M|    if (ret > 0)
  ------------------
  |  Branch (285:9): [True: 3.92M, False: 1.77k]
  ------------------
  286|  3.92M|        b->num_read += (uint64_t)*readbytes;
  287|       |
  288|  3.92M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  3.92M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 3.92M]
  |  |  |  Branch (26:51): [True: 0, False: 3.92M]
  |  |  ------------------
  ------------------
  289|      0|        ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  292|      0|#define BIO_CB_READ 0x02
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  290|      0|            dlen, 0, 0L, ret, readbytes);
  291|       |
  292|       |    /* Shouldn't happen */
  293|  3.92M|    if (ret > 0 && *readbytes > dlen) {
  ------------------
  |  Branch (293:9): [True: 3.92M, False: 1.77k]
  |  Branch (293:20): [True: 0, False: 3.92M]
  ------------------
  294|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  295|      0|        return -1;
  296|      0|    }
  297|       |
  298|  3.92M|    return ret;
  299|  3.92M|}
bio_lib.c:bio_write_intern:
  326|  9.29k|{
  327|  9.29k|    size_t local_written;
  328|  9.29k|    int ret;
  329|       |
  330|  9.29k|    if (written != NULL)
  ------------------
  |  Branch (330:9): [True: 9.29k, False: 0]
  ------------------
  331|  9.29k|        *written = 0;
  332|       |    /*
  333|       |     * b == NULL is not an error but just means that zero bytes are written.
  334|       |     * Do not raise an error here.
  335|       |     */
  336|  9.29k|    if (b == NULL)
  ------------------
  |  Branch (336:9): [True: 0, False: 9.29k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  9.29k|    if (b->method == NULL || b->method->bwrite == NULL) {
  ------------------
  |  Branch (339:9): [True: 0, False: 9.29k]
  |  Branch (339:30): [True: 0, False: 9.29k]
  ------------------
  340|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  341|      0|        return -2;
  342|      0|    }
  343|       |
  344|  9.29k|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|  18.5k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 9.29k]
  |  |  |  Branch (26:51): [True: 0, False: 9.29k]
  |  |  ------------------
  ------------------
                  if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |  293|      0|#define BIO_CB_WRITE 0x03
  ------------------
  |  Branch (344:28): [True: 0, False: 0]
  ------------------
  345|      0|        return ret;
  346|       |
  347|  9.29k|    if (!b->init) {
  ------------------
  |  Branch (347:9): [True: 0, False: 9.29k]
  ------------------
  348|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|        return -1;
  350|      0|    }
  351|       |
  352|  9.29k|    ret = b->method->bwrite(b, data, dlen, &local_written);
  353|       |
  354|  9.29k|    if (ret > 0)
  ------------------
  |  Branch (354:9): [True: 9.29k, False: 0]
  ------------------
  355|  9.29k|        b->num_write += (uint64_t)local_written;
  356|       |
  357|  9.29k|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  9.29k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 9.29k]
  |  |  |  Branch (26:51): [True: 0, False: 9.29k]
  |  |  ------------------
  ------------------
  358|      0|        ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, data,
  ------------------
  |  |  293|      0|#define BIO_CB_WRITE 0x03
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, data,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  359|      0|            dlen, 0, 0L, ret, &local_written);
  360|       |
  361|  9.29k|    if (written != NULL)
  ------------------
  |  Branch (361:9): [True: 9.29k, False: 0]
  ------------------
  362|  9.29k|        *written = local_written;
  363|  9.29k|    return ret;
  364|  9.29k|}

BIO_meth_new:
   38|  3.37k|{
   39|  3.37k|    BIO_METHOD *biom = OPENSSL_zalloc(sizeof(BIO_METHOD));
  ------------------
  |  |  108|  3.37k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|       |
   41|  3.37k|    if (biom == NULL
  ------------------
  |  Branch (41:9): [True: 0, False: 3.37k]
  ------------------
   42|  3.37k|        || (biom->name = OPENSSL_strdup(name)) == NULL) {
  ------------------
  |  |  135|  3.37k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (42:12): [True: 0, False: 3.37k]
  ------------------
   43|      0|        OPENSSL_free(biom);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|  3.37k|    biom->type = type;
   47|  3.37k|    return biom;
   48|  3.37k|}
BIO_meth_free:
   51|  3.37k|{
   52|  3.37k|    if (biom != NULL) {
  ------------------
  |  Branch (52:9): [True: 3.37k, False: 0]
  ------------------
   53|  3.37k|        OPENSSL_free(biom->name);
  ------------------
  |  |  131|  3.37k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|  3.37k|        OPENSSL_free(biom);
  ------------------
  |  |  131|  3.37k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|  3.37k|    }
   56|  3.37k|}
bwrite_conv:
   73|  9.29k|{
   74|  9.29k|    int ret;
   75|       |
   76|  9.29k|    if (datal > INT_MAX)
  ------------------
  |  Branch (76:9): [True: 0, False: 9.29k]
  ------------------
   77|      0|        datal = INT_MAX;
   78|       |
   79|  9.29k|    ret = bio->method->bwrite_old(bio, data, (int)datal);
   80|       |
   81|  9.29k|    if (ret <= 0) {
  ------------------
  |  Branch (81:9): [True: 0, False: 9.29k]
  ------------------
   82|      0|        *written = 0;
   83|      0|        return ret;
   84|      0|    }
   85|       |
   86|  9.29k|    *written = (size_t)ret;
   87|       |
   88|  9.29k|    return 1;
   89|  9.29k|}
BIO_meth_set_write:
   93|  1.95k|{
   94|  1.95k|    biom->bwrite_old = bwrite;
   95|  1.95k|    biom->bwrite = bwrite_conv;
   96|  1.95k|    return 1;
   97|  1.95k|}
BIO_meth_set_write_ex:
  101|  1.41k|{
  102|       |    biom->bwrite_old = NULL;
  103|  1.41k|    biom->bwrite = bwrite;
  104|  1.41k|    return 1;
  105|  1.41k|}
bread_conv:
  121|  2.18M|{
  122|  2.18M|    int ret;
  123|       |
  124|  2.18M|    if (datal > INT_MAX)
  ------------------
  |  Branch (124:9): [True: 0, False: 2.18M]
  ------------------
  125|      0|        datal = INT_MAX;
  126|       |
  127|  2.18M|    ret = bio->method->bread_old(bio, data, (int)datal);
  128|       |
  129|  2.18M|    if (ret <= 0) {
  ------------------
  |  Branch (129:9): [True: 1.77k, False: 2.18M]
  ------------------
  130|  1.77k|        *readbytes = 0;
  131|  1.77k|        return ret;
  132|  1.77k|    }
  133|       |
  134|  2.18M|    *readbytes = (size_t)ret;
  135|       |
  136|  2.18M|    return 1;
  137|  2.18M|}
BIO_meth_set_read:
  141|  1.95k|{
  142|  1.95k|    biom->bread_old = bread;
  143|  1.95k|    biom->bread = bread_conv;
  144|  1.95k|    return 1;
  145|  1.95k|}
BIO_meth_set_read_ex:
  149|  1.41k|{
  150|       |    biom->bread_old = NULL;
  151|  1.41k|    biom->bread = bread;
  152|  1.41k|    return 1;
  153|  1.41k|}
BIO_meth_set_puts:
  164|  1.41k|{
  165|  1.41k|    biom->bputs = bputs;
  166|  1.41k|    return 1;
  167|  1.41k|}
BIO_meth_set_gets:
  178|  1.41k|{
  179|  1.41k|    biom->bgets = bgets;
  180|  1.41k|    return 1;
  181|  1.41k|}
BIO_meth_set_ctrl:
  192|  3.37k|{
  193|  3.37k|    biom->ctrl = ctrl;
  194|  3.37k|    return 1;
  195|  3.37k|}
BIO_meth_set_create:
  205|  3.37k|{
  206|  3.37k|    biom->create = create;
  207|  3.37k|    return 1;
  208|  3.37k|}
BIO_meth_set_destroy:
  218|  3.37k|{
  219|  3.37k|    biom->destroy = destroy;
  220|  3.37k|    return 1;
  221|  3.37k|}

BIO_snprintf:
 1094|   873k|{
 1095|   873k|    va_list args;
 1096|   873k|    int ret;
 1097|       |
 1098|   873k|    va_start(args, format);
 1099|       |
 1100|   873k|    ret = BIO_vsnprintf(buf, n, format, args);
 1101|       |
 1102|       |    va_end(args);
 1103|   873k|    return ret;
 1104|   873k|}
BIO_vsnprintf:
 1107|   959k|{
 1108|   959k|    size_t retlen;
 1109|   959k|    int truncated;
 1110|       |
 1111|   959k|    if (!_dopr(&buf, NULL, &n, &retlen, &truncated, format, args))
  ------------------
  |  Branch (1111:9): [True: 0, False: 959k]
  ------------------
 1112|      0|        return -1;
 1113|       |
 1114|   959k|    if (truncated)
  ------------------
  |  Branch (1114:9): [True: 1.78k, False: 957k]
  ------------------
 1115|       |        /*
 1116|       |         * In case of truncation, return -1 like traditional snprintf.
 1117|       |         * (Current drafts for ISO/IEC 9899 say snprintf should return the
 1118|       |         * number of characters that would have been written, had the buffer
 1119|       |         * been large enough.)
 1120|       |         */
 1121|  1.78k|        return -1;
 1122|   957k|    return (retlen <= INT_MAX) ? (int)retlen : -1;
  ------------------
  |  Branch (1122:12): [True: 957k, False: 0]
  ------------------
 1123|   959k|}
bio_print.c:_dopr:
  104|   959k|{
  105|   959k|    char ch;
  106|   959k|    int64_t value;
  107|   959k|#ifndef OPENSSL_SYS_UEFI
  108|   959k|    LDOUBLE fvalue;
  ------------------
  |  |   28|   959k|#define LDOUBLE double
  ------------------
  109|   959k|#endif
  110|   959k|    char *strvalue;
  111|   959k|    int min;
  112|   959k|    int max;
  113|   959k|    int state;
  114|   959k|    int flags;
  115|   959k|    int cflags;
  116|   959k|    struct pr_desc desc = { *sbuffer, buffer, 0, *maxlen, 0 };
  117|   959k|    int ret = 0;
  118|       |
  119|   959k|    state = DP_S_DEFAULT;
  ------------------
  |  |   56|   959k|#define DP_S_DEFAULT 0
  ------------------
  120|   959k|    flags = cflags = min = 0;
  121|   959k|    max = -1;
  122|   959k|    ch = *format++;
  123|       |
  124|  11.5M|    while (state != DP_S_DONE) {
  ------------------
  |  |   63|  11.5M|#define DP_S_DONE 7
  ------------------
  |  Branch (124:12): [True: 10.5M, False: 959k]
  ------------------
  125|  10.5M|        if (ch == '\0')
  ------------------
  |  Branch (125:13): [True: 959k, False: 9.60M]
  ------------------
  126|   959k|            state = DP_S_DONE;
  ------------------
  |  |   63|   959k|#define DP_S_DONE 7
  ------------------
  127|       |
  128|  10.5M|        switch (state) {
  129|  4.00M|        case DP_S_DEFAULT:
  ------------------
  |  |   56|  4.00M|#define DP_S_DEFAULT 0
  ------------------
  |  Branch (129:9): [True: 4.00M, False: 6.56M]
  ------------------
  130|  4.00M|            if (ch == '%')
  ------------------
  |  Branch (130:17): [True: 1.12M, False: 2.88M]
  ------------------
  131|  1.12M|                state = DP_S_FLAGS;
  ------------------
  |  |   57|  1.12M|#define DP_S_FLAGS 1
  ------------------
  132|  2.88M|            else if (!doapr_outch(&desc, ch))
  ------------------
  |  Branch (132:22): [True: 0, False: 2.88M]
  ------------------
  133|      0|                goto out;
  134|  4.00M|            ch = *format++;
  135|  4.00M|            break;
  136|  1.12M|        case DP_S_FLAGS:
  ------------------
  |  |   57|  1.12M|#define DP_S_FLAGS 1
  ------------------
  |  Branch (136:9): [True: 1.12M, False: 9.44M]
  ------------------
  137|  1.12M|            switch (ch) {
  138|      0|            case '-':
  ------------------
  |  Branch (138:13): [True: 0, False: 1.12M]
  ------------------
  139|      0|                flags |= DP_F_MINUS;
  ------------------
  |  |   67|      0|#define DP_F_MINUS (1 << 0)
  ------------------
  140|      0|                ch = *format++;
  141|      0|                break;
  142|      0|            case '+':
  ------------------
  |  Branch (142:13): [True: 0, False: 1.12M]
  ------------------
  143|      0|                flags |= DP_F_PLUS;
  ------------------
  |  |   69|      0|#define DP_F_PLUS (1 << 1)
  ------------------
  144|      0|                ch = *format++;
  145|      0|                break;
  146|      0|            case ' ':
  ------------------
  |  Branch (146:13): [True: 0, False: 1.12M]
  ------------------
  147|      0|                flags |= DP_F_SPACE;
  ------------------
  |  |   71|      0|#define DP_F_SPACE (1 << 2)
  ------------------
  148|      0|                ch = *format++;
  149|      0|                break;
  150|      0|            case '#':
  ------------------
  |  Branch (150:13): [True: 0, False: 1.12M]
  ------------------
  151|      0|                flags |= DP_F_NUM;
  ------------------
  |  |   73|      0|#define DP_F_NUM (1 << 3)
  ------------------
  152|      0|                ch = *format++;
  153|      0|                break;
  154|    650|            case '0':
  ------------------
  |  Branch (154:13): [True: 650, False: 1.12M]
  ------------------
  155|    650|                flags |= DP_F_ZERO;
  ------------------
  |  |   75|    650|#define DP_F_ZERO (1 << 4)
  ------------------
  156|    650|                ch = *format++;
  157|    650|                break;
  158|  1.12M|            default:
  ------------------
  |  Branch (158:13): [True: 1.12M, False: 650]
  ------------------
  159|  1.12M|                state = DP_S_MIN;
  ------------------
  |  |   58|  1.12M|#define DP_S_MIN 2
  ------------------
  160|  1.12M|                break;
  161|  1.12M|            }
  162|  1.12M|            break;
  163|  1.12M|        case DP_S_MIN: /* width */
  ------------------
  |  |   58|  1.12M|#define DP_S_MIN 2
  ------------------
  |  Branch (163:9): [True: 1.12M, False: 9.44M]
  ------------------
  164|  1.12M|            if (ossl_isdigit(ch)) {
  ------------------
  |  Branch (164:17): [True: 650, False: 1.12M]
  ------------------
  165|       |                /*
  166|       |                 * Most implementations cap the possible explicitly specified
  167|       |                 * width by (INT_MAX / 10) * 10 - 1 or so (the standard gives
  168|       |                 * no clear limit on this), we can do the same.
  169|       |                 */
  170|    650|                if (min < INT_MAX / 10)
  ------------------
  |  Branch (170:21): [True: 650, False: 0]
  ------------------
  171|    650|                    min = 10 * min + char_to_int(ch);
  ------------------
  |  |   96|    650|#define char_to_int(p) (p - '0')
  ------------------
  172|      0|                else
  173|      0|                    goto out;
  174|    650|                ch = *format++;
  175|  1.12M|            } else if (ch == '*') {
  ------------------
  |  Branch (175:24): [True: 0, False: 1.12M]
  ------------------
  176|      0|                min = va_arg(args, int);
  177|      0|                if (min < 0) {
  ------------------
  |  Branch (177:21): [True: 0, False: 0]
  ------------------
  178|      0|                    flags |= DP_F_MINUS;
  ------------------
  |  |   67|      0|#define DP_F_MINUS (1 << 0)
  ------------------
  179|      0|                    min = -min;
  180|      0|                }
  181|      0|                ch = *format++;
  182|      0|                state = DP_S_DOT;
  ------------------
  |  |   59|      0|#define DP_S_DOT 3
  ------------------
  183|      0|            } else
  184|  1.12M|                state = DP_S_DOT;
  ------------------
  |  |   59|  1.12M|#define DP_S_DOT 3
  ------------------
  185|  1.12M|            break;
  186|  1.12M|        case DP_S_DOT:
  ------------------
  |  |   59|  1.12M|#define DP_S_DOT 3
  ------------------
  |  Branch (186:9): [True: 1.12M, False: 9.44M]
  ------------------
  187|  1.12M|            if (ch == '.') {
  ------------------
  |  Branch (187:17): [True: 0, False: 1.12M]
  ------------------
  188|      0|                state = DP_S_MAX;
  ------------------
  |  |   60|      0|#define DP_S_MAX 4
  ------------------
  189|      0|                ch = *format++;
  190|      0|            } else
  191|  1.12M|                state = DP_S_MOD;
  ------------------
  |  |   61|  1.12M|#define DP_S_MOD 5
  ------------------
  192|  1.12M|            break;
  193|      0|        case DP_S_MAX: /* precision */
  ------------------
  |  |   60|      0|#define DP_S_MAX 4
  ------------------
  |  Branch (193:9): [True: 0, False: 10.5M]
  ------------------
  194|      0|            if (ossl_isdigit(ch)) {
  ------------------
  |  Branch (194:17): [True: 0, False: 0]
  ------------------
  195|      0|                if (max < 0)
  ------------------
  |  Branch (195:21): [True: 0, False: 0]
  ------------------
  196|      0|                    max = 0;
  197|       |                /*
  198|       |                 * Most implementations cap the possible explicitly specified
  199|       |                 * width by (INT_MAX / 10) * 10 - 1 or so (the standard gives
  200|       |                 * no clear limit on this), we can do the same.
  201|       |                 */
  202|      0|                if (max < INT_MAX / 10)
  ------------------
  |  Branch (202:21): [True: 0, False: 0]
  ------------------
  203|      0|                    max = 10 * max + char_to_int(ch);
  ------------------
  |  |   96|      0|#define char_to_int(p) (p - '0')
  ------------------
  204|      0|                else
  205|      0|                    goto out;
  206|      0|                ch = *format++;
  207|      0|            } else if (ch == '*') {
  ------------------
  |  Branch (207:24): [True: 0, False: 0]
  ------------------
  208|      0|                max = va_arg(args, int);
  209|      0|                ch = *format++;
  210|      0|                state = DP_S_MOD;
  ------------------
  |  |   61|      0|#define DP_S_MOD 5
  ------------------
  211|      0|            } else {
  212|      0|                if (max < 0)
  ------------------
  |  Branch (212:21): [True: 0, False: 0]
  ------------------
  213|      0|                    max = 0;
  214|      0|                state = DP_S_MOD;
  ------------------
  |  |   61|      0|#define DP_S_MOD 5
  ------------------
  215|      0|            }
  216|      0|            break;
  217|  1.12M|        case DP_S_MOD:
  ------------------
  |  |   61|  1.12M|#define DP_S_MOD 5
  ------------------
  |  Branch (217:9): [True: 1.12M, False: 9.44M]
  ------------------
  218|  1.12M|            switch (ch) {
  219|      0|            case 'h':
  ------------------
  |  Branch (219:13): [True: 0, False: 1.12M]
  ------------------
  220|      0|                if (*format == 'h') {
  ------------------
  |  Branch (220:21): [True: 0, False: 0]
  ------------------
  221|      0|                    cflags = DP_C_CHAR;
  ------------------
  |  |   82|      0|#define DP_C_CHAR 1
  ------------------
  222|      0|                    format++;
  223|      0|                } else {
  224|      0|                    cflags = DP_C_SHORT;
  ------------------
  |  |   83|      0|#define DP_C_SHORT 2
  ------------------
  225|      0|                }
  226|      0|                ch = *format++;
  227|      0|                break;
  228|   870k|            case 'l':
  ------------------
  |  Branch (228:13): [True: 870k, False: 249k]
  ------------------
  229|   870k|                if (*format == 'l') {
  ------------------
  |  Branch (229:21): [True: 0, False: 870k]
  ------------------
  230|      0|                    cflags = DP_C_LLONG;
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  231|      0|                    format++;
  232|      0|                } else
  233|   870k|                    cflags = DP_C_LONG;
  ------------------
  |  |   84|   870k|#define DP_C_LONG 3
  ------------------
  234|   870k|                ch = *format++;
  235|   870k|                break;
  236|      0|            case 'q':
  ------------------
  |  Branch (236:13): [True: 0, False: 1.12M]
  ------------------
  237|      0|            case 'j':
  ------------------
  |  Branch (237:13): [True: 0, False: 1.12M]
  ------------------
  238|      0|                cflags = DP_C_LLONG;
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  239|      0|                ch = *format++;
  240|      0|                break;
  241|      0|            case 'L':
  ------------------
  |  Branch (241:13): [True: 0, False: 1.12M]
  ------------------
  242|      0|                cflags = DP_C_LDOUBLE;
  ------------------
  |  |   85|      0|#define DP_C_LDOUBLE 4
  ------------------
  243|      0|                ch = *format++;
  244|      0|                break;
  245|      0|            case 'z':
  ------------------
  |  Branch (245:13): [True: 0, False: 1.12M]
  ------------------
  246|      0|                cflags = DP_C_SIZE;
  ------------------
  |  |   87|      0|#define DP_C_SIZE 6
  ------------------
  247|      0|                ch = *format++;
  248|      0|                break;
  249|      0|            case 't':
  ------------------
  |  Branch (249:13): [True: 0, False: 1.12M]
  ------------------
  250|      0|                cflags = DP_C_PTRDIFF;
  ------------------
  |  |   88|      0|#define DP_C_PTRDIFF 7
  ------------------
  251|      0|                ch = *format++;
  252|      0|                break;
  253|   249k|            default:
  ------------------
  |  Branch (253:13): [True: 249k, False: 870k]
  ------------------
  254|   249k|                break;
  255|  1.12M|            }
  256|  1.12M|            state = DP_S_CONV;
  ------------------
  |  |   62|  1.12M|#define DP_S_CONV 6
  ------------------
  257|  1.12M|            break;
  258|  1.12M|        case DP_S_CONV:
  ------------------
  |  |   62|  1.12M|#define DP_S_CONV 6
  ------------------
  |  Branch (258:9): [True: 1.12M, False: 9.44M]
  ------------------
  259|  1.12M|            switch (ch) {
  260|  51.5k|            case 'd':
  ------------------
  |  Branch (260:13): [True: 51.5k, False: 1.06M]
  ------------------
  261|  51.5k|            case 'i':
  ------------------
  |  Branch (261:13): [True: 0, False: 1.12M]
  ------------------
  262|  51.5k|                switch (cflags) {
  263|      0|                case DP_C_CHAR:
  ------------------
  |  |   82|      0|#define DP_C_CHAR 1
  ------------------
  |  Branch (263:17): [True: 0, False: 51.5k]
  ------------------
  264|      0|                    value = (signed char)va_arg(args, int);
  265|      0|                    break;
  266|      0|                case DP_C_SHORT:
  ------------------
  |  |   83|      0|#define DP_C_SHORT 2
  ------------------
  |  Branch (266:17): [True: 0, False: 51.5k]
  ------------------
  267|      0|                    value = (short int)va_arg(args, int);
  268|      0|                    break;
  269|      0|                case DP_C_LONG:
  ------------------
  |  |   84|      0|#define DP_C_LONG 3
  ------------------
  |  Branch (269:17): [True: 0, False: 51.5k]
  ------------------
  270|      0|                    value = va_arg(args, long int);
  271|      0|                    break;
  272|      0|                case DP_C_LLONG:
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  |  Branch (272:17): [True: 0, False: 51.5k]
  ------------------
  273|      0|                    value = va_arg(args, int64_t);
  274|      0|                    break;
  275|      0|                case DP_C_SIZE:
  ------------------
  |  |   87|      0|#define DP_C_SIZE 6
  ------------------
  |  Branch (275:17): [True: 0, False: 51.5k]
  ------------------
  276|      0|                    value = va_arg(args, ossl_ssize_t);
  277|      0|                    break;
  278|      0|                case DP_C_PTRDIFF:
  ------------------
  |  |   88|      0|#define DP_C_PTRDIFF 7
  ------------------
  |  Branch (278:17): [True: 0, False: 51.5k]
  ------------------
  279|      0|                    value = va_arg(args, ptrdiff_t);
  280|      0|                    break;
  281|  51.5k|                default:
  ------------------
  |  Branch (281:17): [True: 51.5k, False: 0]
  ------------------
  282|  51.5k|                    value = va_arg(args, int);
  283|  51.5k|                    break;
  284|  51.5k|                }
  285|  51.5k|                if (!fmtint(&desc, value, 10, min, max, flags))
  ------------------
  |  Branch (285:21): [True: 0, False: 51.5k]
  ------------------
  286|      0|                    goto out;
  287|  51.5k|                break;
  288|  51.5k|            case 'X':
  ------------------
  |  Branch (288:13): [True: 650, False: 1.11M]
  ------------------
  289|    650|                flags |= DP_F_UP;
  ------------------
  |  |   77|    650|#define DP_F_UP (1 << 5)
  ------------------
  290|       |                /* FALLTHROUGH */
  291|    650|            case 'x':
  ------------------
  |  Branch (291:13): [True: 0, False: 1.12M]
  ------------------
  292|    650|            case 'o':
  ------------------
  |  Branch (292:13): [True: 0, False: 1.12M]
  ------------------
  293|   870k|            case 'u':
  ------------------
  |  Branch (293:13): [True: 870k, False: 250k]
  ------------------
  294|   870k|                flags |= DP_F_UNSIGNED;
  ------------------
  |  |   79|   870k|#define DP_F_UNSIGNED (1 << 6)
  ------------------
  295|   870k|                switch (cflags) {
  296|      0|                case DP_C_CHAR:
  ------------------
  |  |   82|      0|#define DP_C_CHAR 1
  ------------------
  |  Branch (296:17): [True: 0, False: 870k]
  ------------------
  297|      0|                    value = (unsigned char)va_arg(args, unsigned int);
  298|      0|                    break;
  299|      0|                case DP_C_SHORT:
  ------------------
  |  |   83|      0|#define DP_C_SHORT 2
  ------------------
  |  Branch (299:17): [True: 0, False: 870k]
  ------------------
  300|      0|                    value = (unsigned short int)va_arg(args, unsigned int);
  301|      0|                    break;
  302|   870k|                case DP_C_LONG:
  ------------------
  |  |   84|   870k|#define DP_C_LONG 3
  ------------------
  |  Branch (302:17): [True: 870k, False: 0]
  ------------------
  303|   870k|                    value = va_arg(args, unsigned long int);
  304|   870k|                    break;
  305|      0|                case DP_C_LLONG:
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  |  Branch (305:17): [True: 0, False: 870k]
  ------------------
  306|      0|                    value = va_arg(args, uint64_t);
  307|      0|                    break;
  308|      0|                case DP_C_SIZE:
  ------------------
  |  |   87|      0|#define DP_C_SIZE 6
  ------------------
  |  Branch (308:17): [True: 0, False: 870k]
  ------------------
  309|      0|                    value = va_arg(args, size_t);
  310|      0|                    break;
  311|      0|                case DP_C_PTRDIFF:
  ------------------
  |  |   88|      0|#define DP_C_PTRDIFF 7
  ------------------
  |  Branch (311:17): [True: 0, False: 870k]
  ------------------
  312|       |                    /*
  313|       |                     * There is no unsigned variant of ptrdiff_t, and POSIX
  314|       |                     * requires using a "corresponding unsigned type argument".
  315|       |                     * Assuming it is power of two in size, at least.
  316|       |                     */
  317|      0|                    if (sizeof(ptrdiff_t) == sizeof(uint64_t))
  ------------------
  |  Branch (317:25): [True: 0, Folded]
  ------------------
  318|      0|                        value = va_arg(args, uint64_t);
  319|      0|                    else
  320|      0|                        value = va_arg(args, unsigned int);
  321|      0|                    break;
  322|      0|                default:
  ------------------
  |  Branch (322:17): [True: 0, False: 870k]
  ------------------
  323|      0|                    value = va_arg(args, unsigned int);
  324|      0|                    break;
  325|   870k|                }
  326|   870k|                if (!fmtint(&desc, value,
  ------------------
  |  Branch (326:21): [True: 0, False: 870k]
  ------------------
  327|   870k|                        ch == 'o' ? 8 : (ch == 'u' ? 10 : 16),
  ------------------
  |  Branch (327:25): [True: 0, False: 870k]
  |  Branch (327:42): [True: 870k, False: 650]
  ------------------
  328|   870k|                        min, max, flags))
  329|      0|                    goto out;
  330|   870k|                break;
  331|   870k|#ifndef OPENSSL_SYS_UEFI
  332|   870k|            case 'f':
  ------------------
  |  Branch (332:13): [True: 0, False: 1.12M]
  ------------------
  333|      0|                if (cflags == DP_C_LDOUBLE)
  ------------------
  |  |   85|      0|#define DP_C_LDOUBLE 4
  ------------------
  |  Branch (333:21): [True: 0, False: 0]
  ------------------
  334|      0|                    fvalue = va_arg(args, LDOUBLE);
  335|      0|                else
  336|      0|                    fvalue = va_arg(args, double);
  337|      0|                if (!fmtfp(&desc, fvalue, min, max, flags, F_FORMAT))
  ------------------
  |  |   91|      0|#define F_FORMAT 0
  ------------------
  |  Branch (337:21): [True: 0, False: 0]
  ------------------
  338|      0|                    goto out;
  339|      0|                break;
  340|      0|            case 'E':
  ------------------
  |  Branch (340:13): [True: 0, False: 1.12M]
  ------------------
  341|      0|                flags |= DP_F_UP;
  ------------------
  |  |   77|      0|#define DP_F_UP (1 << 5)
  ------------------
  342|       |                /* fall through */
  343|      0|            case 'e':
  ------------------
  |  Branch (343:13): [True: 0, False: 1.12M]
  ------------------
  344|      0|                if (cflags == DP_C_LDOUBLE)
  ------------------
  |  |   85|      0|#define DP_C_LDOUBLE 4
  ------------------
  |  Branch (344:21): [True: 0, False: 0]
  ------------------
  345|      0|                    fvalue = va_arg(args, LDOUBLE);
  346|      0|                else
  347|      0|                    fvalue = va_arg(args, double);
  348|      0|                if (!fmtfp(&desc, fvalue, min, max, flags, E_FORMAT))
  ------------------
  |  |   92|      0|#define E_FORMAT 1
  ------------------
  |  Branch (348:21): [True: 0, False: 0]
  ------------------
  349|      0|                    goto out;
  350|      0|                break;
  351|      0|            case 'G':
  ------------------
  |  Branch (351:13): [True: 0, False: 1.12M]
  ------------------
  352|      0|                flags |= DP_F_UP;
  ------------------
  |  |   77|      0|#define DP_F_UP (1 << 5)
  ------------------
  353|       |                /* fall through */
  354|      0|            case 'g':
  ------------------
  |  Branch (354:13): [True: 0, False: 1.12M]
  ------------------
  355|      0|                if (cflags == DP_C_LDOUBLE)
  ------------------
  |  |   85|      0|#define DP_C_LDOUBLE 4
  ------------------
  |  Branch (355:21): [True: 0, False: 0]
  ------------------
  356|      0|                    fvalue = va_arg(args, LDOUBLE);
  357|      0|                else
  358|      0|                    fvalue = va_arg(args, double);
  359|      0|                if (!fmtfp(&desc, fvalue, min, max, flags, G_FORMAT))
  ------------------
  |  |   93|      0|#define G_FORMAT 2
  ------------------
  |  Branch (359:21): [True: 0, False: 0]
  ------------------
  360|      0|                    goto out;
  361|      0|                break;
  362|       |#else
  363|       |            case 'f':
  364|       |            case 'E':
  365|       |            case 'e':
  366|       |            case 'G':
  367|       |            case 'g':
  368|       |                /* not implemented for UEFI */
  369|       |                ERR_raise(ERR_LIB_BIO, ERR_R_UNSUPPORTED);
  370|       |                goto out;
  371|       |#endif
  372|    861|            case 'c':
  ------------------
  |  Branch (372:13): [True: 861, False: 1.11M]
  ------------------
  373|    861|                if (!doapr_outch(&desc, va_arg(args, int)))
  ------------------
  |  Branch (373:21): [True: 0, False: 861]
  ------------------
  374|      0|                    goto out;
  375|    861|                break;
  376|   196k|            case 's':
  ------------------
  |  Branch (376:13): [True: 196k, False: 923k]
  ------------------
  377|   196k|                strvalue = va_arg(args, char *);
  378|   196k|                if (max < 0)
  ------------------
  |  Branch (378:21): [True: 196k, False: 0]
  ------------------
  379|   196k|                    max = INT_MAX;
  380|   196k|                if (!fmtstr(&desc, strvalue, flags, min, max))
  ------------------
  |  Branch (380:21): [True: 0, False: 196k]
  ------------------
  381|      0|                    goto out;
  382|   196k|                break;
  383|   196k|            case 'p':
  ------------------
  |  Branch (383:13): [True: 0, False: 1.12M]
  ------------------
  384|      0|                value = (size_t)va_arg(args, void *);
  385|      0|                if (!fmtint(&desc, value, 16, min, max, flags | DP_F_NUM))
  ------------------
  |  |   73|      0|#define DP_F_NUM (1 << 3)
  ------------------
  |  Branch (385:21): [True: 0, False: 0]
  ------------------
  386|      0|                    goto out;
  387|      0|                break;
  388|      0|            case 'n':
  ------------------
  |  Branch (388:13): [True: 0, False: 1.12M]
  ------------------
  389|      0|                switch (cflags) {
  390|      0|#define HANDLE_N(type)              \
  391|      0|    do {                            \
  392|      0|        type *num;                  \
  393|      0|                                    \
  394|      0|        num = va_arg(args, type *); \
  395|      0|        *num = (type)desc.pos;      \
  396|      0|    } while (0)
  397|      0|                case DP_C_CHAR:
  ------------------
  |  |   82|      0|#define DP_C_CHAR 1
  ------------------
  |  Branch (397:17): [True: 0, False: 0]
  ------------------
  398|      0|                    HANDLE_N(signed char);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  399|      0|                    break;
  400|      0|                case DP_C_SHORT:
  ------------------
  |  |   83|      0|#define DP_C_SHORT 2
  ------------------
  |  Branch (400:17): [True: 0, False: 0]
  ------------------
  401|      0|                    HANDLE_N(short);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  402|      0|                    break;
  403|      0|                case DP_C_LONG:
  ------------------
  |  |   84|      0|#define DP_C_LONG 3
  ------------------
  |  Branch (403:17): [True: 0, False: 0]
  ------------------
  404|      0|                    HANDLE_N(long);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  405|      0|                    break;
  406|      0|                case DP_C_LLONG:
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  |  Branch (406:17): [True: 0, False: 0]
  ------------------
  407|      0|                    HANDLE_N(long long);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  408|      0|                    break;
  409|      0|                case DP_C_SIZE:
  ------------------
  |  |   87|      0|#define DP_C_SIZE 6
  ------------------
  |  Branch (409:17): [True: 0, False: 0]
  ------------------
  410|      0|                    HANDLE_N(ossl_ssize_t);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  411|      0|                    break;
  412|      0|                case DP_C_PTRDIFF:
  ------------------
  |  |   88|      0|#define DP_C_PTRDIFF 7
  ------------------
  |  Branch (412:17): [True: 0, False: 0]
  ------------------
  413|      0|                    HANDLE_N(ptrdiff_t);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  414|      0|                    break;
  415|      0|                default:
  ------------------
  |  Branch (415:17): [True: 0, False: 0]
  ------------------
  416|      0|                    HANDLE_N(int);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  417|      0|                    break;
  418|      0|#undef HANDLE_N
  419|      0|                }
  420|      0|                break;
  421|      0|            case '%':
  ------------------
  |  Branch (421:13): [True: 0, False: 1.12M]
  ------------------
  422|      0|                if (!doapr_outch(&desc, ch))
  ------------------
  |  Branch (422:21): [True: 0, False: 0]
  ------------------
  423|      0|                    goto out;
  424|      0|                break;
  425|      0|            case 'w':
  ------------------
  |  Branch (425:13): [True: 0, False: 1.12M]
  ------------------
  426|       |                /* not supported yet, treat as next char */
  427|      0|                format++;
  428|      0|                break;
  429|      0|            default:
  ------------------
  |  Branch (429:13): [True: 0, False: 1.12M]
  ------------------
  430|       |                /* unknown, skip */
  431|      0|                break;
  432|  1.12M|            }
  433|  1.12M|            ch = *format++;
  434|  1.12M|            state = DP_S_DEFAULT;
  ------------------
  |  |   56|  1.12M|#define DP_S_DEFAULT 0
  ------------------
  435|  1.12M|            flags = cflags = min = 0;
  436|  1.12M|            max = -1;
  437|  1.12M|            break;
  438|   959k|        case DP_S_DONE:
  ------------------
  |  |   63|   959k|#define DP_S_DONE 7
  ------------------
  |  Branch (438:9): [True: 959k, False: 9.60M]
  ------------------
  439|   959k|            break;
  440|      0|        default:
  ------------------
  |  Branch (440:9): [True: 0, False: 10.5M]
  ------------------
  441|      0|            break;
  442|  10.5M|        }
  443|  10.5M|    }
  444|   959k|    ret = 1;
  445|       |
  446|   959k|out:
  447|       |    /*
  448|       |     * We have to truncate if there is no dynamic buffer and we have filled the
  449|       |     * static buffer.
  450|       |     */
  451|   959k|    if (buffer == NULL) {
  ------------------
  |  Branch (451:9): [True: 959k, False: 0]
  ------------------
  452|   959k|        *truncated = (desc.currlen > desc.maxlen - 1);
  453|   959k|        if (*truncated)
  ------------------
  |  Branch (453:13): [True: 1.78k, False: 957k]
  ------------------
  454|  1.78k|            desc.currlen = desc.maxlen - 1;
  455|   959k|    }
  456|       |
  457|   959k|    if (!doapr_outch(&desc, '\0'))
  ------------------
  |  Branch (457:9): [True: 0, False: 959k]
  ------------------
  458|      0|        ret = 0;
  459|       |
  460|   959k|    *retlen = desc.currlen - 1;
  461|   959k|    *sbuffer = desc.sbuffer;
  462|   959k|    *maxlen = desc.maxlen;
  463|       |
  464|   959k|    return ret;
  465|   959k|}
bio_print.c:doapr_outch:
  963|  25.1M|{
  964|       |    /* If we haven't at least one buffer, someone has done a big booboo */
  965|  25.1M|    if (!ossl_assert(desc->sbuffer != NULL || desc->buffer != NULL))
  ------------------
  |  |   52|  25.1M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 25.1M, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  25.1M|    __FILE__, __LINE__)
  ------------------
  |  Branch (965:9): [True: 0, False: 25.1M]
  ------------------
  966|      0|        return 0;
  967|       |
  968|       |    /* |currlen| must always be <= |*maxlen| */
  969|  25.1M|    if (!ossl_assert(desc->currlen <= desc->maxlen))
  ------------------
  |  |   52|  25.1M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  25.1M|    __FILE__, __LINE__)
  ------------------
  |  Branch (969:9): [True: 0, False: 25.1M]
  ------------------
  970|      0|        return 0;
  971|       |
  972|  25.1M|    if (desc->buffer != NULL && desc->currlen == desc->maxlen) {
  ------------------
  |  Branch (972:9): [True: 0, False: 25.1M]
  |  Branch (972:33): [True: 0, False: 0]
  ------------------
  973|      0|        if (desc->maxlen > INT_MAX - BUFFER_INC)
  ------------------
  |  |  959|      0|#define BUFFER_INC 1024
  ------------------
  |  Branch (973:13): [True: 0, False: 0]
  ------------------
  974|      0|            return 0;
  975|       |
  976|      0|        desc->maxlen += BUFFER_INC;
  ------------------
  |  |  959|      0|#define BUFFER_INC 1024
  ------------------
  977|      0|        if (*(desc->buffer) == NULL) {
  ------------------
  |  Branch (977:13): [True: 0, False: 0]
  ------------------
  978|      0|            if ((*(desc->buffer) = OPENSSL_malloc(desc->maxlen)) == NULL)
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (978:17): [True: 0, False: 0]
  ------------------
  979|      0|                return 0;
  980|      0|            if (desc->currlen > 0) {
  ------------------
  |  Branch (980:17): [True: 0, False: 0]
  ------------------
  981|      0|                if (!ossl_assert(desc->sbuffer != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (981:21): [True: 0, False: 0]
  ------------------
  982|      0|                    return 0;
  983|      0|                memcpy(*(desc->buffer), desc->sbuffer, desc->currlen);
  984|      0|            }
  985|      0|            desc->sbuffer = NULL;
  986|      0|        } else {
  987|      0|            char *tmpbuf;
  988|       |
  989|      0|            tmpbuf = OPENSSL_realloc(*(desc->buffer), desc->maxlen);
  ------------------
  |  |  120|      0|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  990|      0|            if (tmpbuf == NULL)
  ------------------
  |  Branch (990:17): [True: 0, False: 0]
  ------------------
  991|      0|                return 0;
  992|      0|            *(desc->buffer) = tmpbuf;
  993|      0|        }
  994|      0|    }
  995|       |
  996|  25.1M|    if (desc->currlen < desc->maxlen) {
  ------------------
  |  Branch (996:9): [True: 25.1M, False: 1.04k]
  ------------------
  997|  25.1M|        if (desc->sbuffer)
  ------------------
  |  Branch (997:13): [True: 25.1M, False: 0]
  ------------------
  998|  25.1M|            (desc->sbuffer)[(desc->currlen)++] = (char)c;
  999|      0|        else
 1000|      0|            (*(desc->buffer))[(desc->currlen)++] = (char)c;
 1001|  25.1M|    }
 1002|       |
 1003|  25.1M|    if (desc->pos < LLONG_MAX)
  ------------------
  |  Branch (1003:9): [True: 25.1M, False: 0]
  ------------------
 1004|  25.1M|        desc->pos++;
 1005|       |
 1006|  25.1M|    return 1;
 1007|  25.1M|}
bio_print.c:fmtint:
  537|   922k|{
  538|   922k|    static const char oct_prefix[] = "0";
  539|       |
  540|   922k|    int signvalue = 0;
  541|   922k|    const char *prefix = "";
  542|   922k|    uint64_t uvalue;
  543|   922k|    char convert[DECIMAL_SIZE(value) + 3];
  544|   922k|    int place = 0;
  545|   922k|    int spadlen = 0;
  546|   922k|    int zpadlen = 0;
  547|   922k|    int caps = 0;
  548|       |
  549|   922k|    if (max < 0) {
  ------------------
  |  Branch (549:9): [True: 922k, False: 0]
  ------------------
  550|       |        /* A negative precision is taken as if the precision were omitted. */
  551|   922k|        max = 1;
  552|   922k|    } else {
  553|       |        /*
  554|       |         * If a precision is given with an integer conversion,
  555|       |         * the 0 flag is ignored.
  556|       |         */
  557|      0|        flags &= ~DP_F_ZERO;
  ------------------
  |  |   75|      0|#define DP_F_ZERO (1 << 4)
  ------------------
  558|      0|    }
  559|   922k|    uvalue = value;
  560|   922k|    if (!(flags & DP_F_UNSIGNED)) {
  ------------------
  |  |   79|   922k|#define DP_F_UNSIGNED (1 << 6)
  ------------------
  |  Branch (560:9): [True: 51.5k, False: 870k]
  ------------------
  561|  51.5k|        if (value < 0) {
  ------------------
  |  Branch (561:13): [True: 0, False: 51.5k]
  ------------------
  562|      0|            signvalue = '-';
  563|      0|            uvalue = 0 - (uint64_t)value;
  564|  51.5k|        } else if (flags & DP_F_PLUS)
  ------------------
  |  |   69|  51.5k|#define DP_F_PLUS (1 << 1)
  ------------------
  |  Branch (564:20): [True: 0, False: 51.5k]
  ------------------
  565|      0|            signvalue = '+';
  566|  51.5k|        else if (flags & DP_F_SPACE)
  ------------------
  |  |   71|  51.5k|#define DP_F_SPACE (1 << 2)
  ------------------
  |  Branch (566:18): [True: 0, False: 51.5k]
  ------------------
  567|      0|            signvalue = ' ';
  568|  51.5k|    }
  569|   922k|    if (flags & DP_F_NUM) {
  ------------------
  |  |   73|   922k|#define DP_F_NUM (1 << 3)
  ------------------
  |  Branch (569:9): [True: 0, False: 922k]
  ------------------
  570|      0|        if (base == 8)
  ------------------
  |  Branch (570:13): [True: 0, False: 0]
  ------------------
  571|      0|            prefix = oct_prefix;
  572|      0|        if (value != 0) {
  ------------------
  |  Branch (572:13): [True: 0, False: 0]
  ------------------
  573|      0|            if (base == 16)
  ------------------
  |  Branch (573:17): [True: 0, False: 0]
  ------------------
  574|      0|                prefix = flags & DP_F_UP ? "0X" : "0x";
  ------------------
  |  |   77|      0|#define DP_F_UP (1 << 5)
  ------------------
  |  Branch (574:26): [True: 0, False: 0]
  ------------------
  575|      0|        }
  576|      0|    }
  577|   922k|    if (flags & DP_F_UP)
  ------------------
  |  |   77|   922k|#define DP_F_UP (1 << 5)
  ------------------
  |  Branch (577:9): [True: 650, False: 921k]
  ------------------
  578|    650|        caps = 1;
  579|       |    /* When 0 is printed with an explicit precision 0, the output is empty. */
  580|  2.55M|    while (uvalue && (place < (int)sizeof(convert))) {
  ------------------
  |  Branch (580:12): [True: 1.63M, False: 922k]
  |  Branch (580:22): [True: 1.63M, False: 0]
  ------------------
  581|  1.63M|        convert[place++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef")
  ------------------
  |  Branch (581:29): [True: 4.67k, False: 1.62M]
  ------------------
  582|  1.63M|            [uvalue % (unsigned)base];
  583|  1.63M|        uvalue = (uvalue / (unsigned)base);
  584|  1.63M|    }
  585|   922k|    if (place == sizeof(convert))
  ------------------
  |  Branch (585:9): [True: 0, False: 922k]
  ------------------
  586|      0|        place--;
  587|   922k|    convert[place] = 0;
  588|       |
  589|       |    /*
  590|       |     * "#" (alternative form):
  591|       |     *   - For o conversion, it shall increase the precision, if and only
  592|       |     *     if necessary, to force the first digit of the result to be a zero
  593|       |     */
  594|   922k|    zpadlen = max - place - (prefix == oct_prefix);
  595|   922k|    if (zpadlen < 0)
  ------------------
  |  Branch (595:9): [True: 361k, False: 560k]
  ------------------
  596|   361k|        zpadlen = 0;
  597|   922k|    spadlen = min - OSSL_MAX(max, place + zpadlen + (signvalue ? 1 : 0) + (int)strlen(prefix));
  ------------------
  |  |   97|  1.84M|#define OSSL_MAX(p, q) ((p >= q) ? p : q)
  |  |  ------------------
  |  |  |  Branch (97:25): [True: 560k, False: 361k]
  |  |  |  Branch (97:31): [True: 0, False: 922k]
  |  |  |  Branch (97:40): [True: 0, False: 361k]
  |  |  ------------------
  ------------------
  598|   922k|    if (spadlen < 0)
  ------------------
  |  Branch (598:9): [True: 921k, False: 650]
  ------------------
  599|   921k|        spadlen = 0;
  600|   922k|    if (flags & DP_F_MINUS) {
  ------------------
  |  |   67|   922k|#define DP_F_MINUS (1 << 0)
  ------------------
  |  Branch (600:9): [True: 0, False: 922k]
  ------------------
  601|      0|        spadlen = -spadlen;
  602|   922k|    } else if (flags & DP_F_ZERO) {
  ------------------
  |  |   75|   922k|#define DP_F_ZERO (1 << 4)
  ------------------
  |  Branch (602:16): [True: 650, False: 921k]
  ------------------
  603|    650|        zpadlen = zpadlen + spadlen;
  604|    650|        spadlen = 0;
  605|    650|    }
  606|       |
  607|       |    /* spaces */
  608|   922k|    while (spadlen > 0 && eob_ok(desc, spadlen)) {
  ------------------
  |  Branch (608:12): [True: 0, False: 922k]
  |  Branch (608:27): [True: 0, False: 0]
  ------------------
  609|      0|        if (!doapr_outch(desc, ' '))
  ------------------
  |  Branch (609:13): [True: 0, False: 0]
  ------------------
  610|      0|            return 0;
  611|      0|        --spadlen;
  612|      0|    }
  613|       |
  614|       |    /* sign */
  615|   922k|    if (signvalue)
  ------------------
  |  Branch (615:9): [True: 0, False: 922k]
  ------------------
  616|      0|        if (!doapr_outch(desc, signvalue))
  ------------------
  |  Branch (616:13): [True: 0, False: 0]
  ------------------
  617|      0|            return 0;
  618|       |
  619|       |    /* prefix */
  620|   922k|    while (*prefix) {
  ------------------
  |  Branch (620:12): [True: 0, False: 922k]
  ------------------
  621|      0|        if (!doapr_outch(desc, *prefix))
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  ------------------
  622|      0|            return 0;
  623|      0|        prefix++;
  624|      0|    }
  625|       |
  626|       |    /* zeros */
  627|   922k|    if (zpadlen > 0) {
  ------------------
  |  Branch (627:9): [True: 33.7k, False: 888k]
  ------------------
  628|  67.4k|        while (zpadlen > 0 && eob_ok(desc, zpadlen)) {
  ------------------
  |  Branch (628:16): [True: 33.7k, False: 33.7k]
  |  Branch (628:31): [True: 33.7k, False: 0]
  ------------------
  629|  33.7k|            if (!doapr_outch(desc, '0'))
  ------------------
  |  Branch (629:17): [True: 0, False: 33.7k]
  ------------------
  630|      0|                return 0;
  631|  33.7k|            --zpadlen;
  632|  33.7k|        }
  633|  33.7k|    }
  634|       |    /* digits */
  635|  2.55M|    while (place > 0) {
  ------------------
  |  Branch (635:12): [True: 1.63M, False: 922k]
  ------------------
  636|  1.63M|        if (!doapr_outch(desc, convert[--place]))
  ------------------
  |  Branch (636:13): [True: 0, False: 1.63M]
  ------------------
  637|      0|            return 0;
  638|  1.63M|    }
  639|       |
  640|       |    /* left justified spaces */
  641|   922k|    if (spadlen < 0) {
  ------------------
  |  Branch (641:9): [True: 0, False: 922k]
  ------------------
  642|      0|        spadlen = -spadlen;
  643|       |
  644|      0|        while (spadlen > 0 && eob_ok(desc, spadlen)) {
  ------------------
  |  Branch (644:16): [True: 0, False: 0]
  |  Branch (644:31): [True: 0, False: 0]
  ------------------
  645|      0|            if (!doapr_outch(desc, ' '))
  ------------------
  |  Branch (645:17): [True: 0, False: 0]
  ------------------
  646|      0|                return 0;
  647|      0|            --spadlen;
  648|      0|        }
  649|      0|    }
  650|   922k|    return 1;
  651|   922k|}
bio_print.c:eob_ok:
 1022|  19.6M|{
 1023|       |    /*
 1024|       |     * desc->buffer is auto-sizeable, so we are never supposed to reach the end
 1025|       |     * of it.
 1026|       |     */
 1027|  19.6M|    if (desc->buffer != NULL)
  ------------------
  |  Branch (1027:9): [True: 0, False: 19.6M]
  ------------------
 1028|      0|        return 1;
 1029|       |
 1030|  19.6M|    if (desc->currlen >= desc->maxlen) {
  ------------------
  |  Branch (1030:9): [True: 1.83k, False: 19.6M]
  ------------------
 1031|  1.83k|        if (left > 0) {
  ------------------
  |  Branch (1031:13): [True: 1.83k, False: 0]
  ------------------
 1032|  1.83k|            if (desc->pos < LLONG_MAX - left) {
  ------------------
  |  Branch (1032:17): [True: 1.83k, False: 0]
  ------------------
 1033|  1.83k|                desc->pos += left;
 1034|  1.83k|            } else {
 1035|      0|                desc->pos = LLONG_MAX;
 1036|      0|            }
 1037|  1.83k|        }
 1038|       |
 1039|  1.83k|        return 0;
 1040|  1.83k|    }
 1041|       |
 1042|  19.6M|    return 1;
 1043|  19.6M|}
bio_print.c:fmtstr:
  469|   196k|{
  470|   196k|    int padlen = 0;
  471|   196k|    size_t strln;
  472|   196k|    int cnt = 0;
  473|       |
  474|   196k|    if (value == 0)
  ------------------
  |  Branch (474:9): [True: 2.29k, False: 194k]
  ------------------
  475|  2.29k|        value = "<NULL>";
  476|       |
  477|   196k|    strln = OPENSSL_strnlen(value, max < 0 ? SIZE_MAX : (size_t)max);
  ------------------
  |  Branch (477:36): [True: 0, False: 196k]
  ------------------
  478|       |
  479|   196k|    if (min >= 0 && strln < INT_MAX) {
  ------------------
  |  Branch (479:9): [True: 196k, False: 0]
  |  Branch (479:21): [True: 196k, False: 0]
  ------------------
  480|   196k|        padlen = min - (int)strln;
  481|   196k|        if (padlen < 0)
  ------------------
  |  Branch (481:13): [True: 195k, False: 1.61k]
  ------------------
  482|   195k|            padlen = 0;
  483|   196k|    }
  484|   196k|    if (max >= 0) {
  ------------------
  |  Branch (484:9): [True: 196k, False: 0]
  ------------------
  485|       |        /*
  486|       |         * Calculate the maximum output including padding.
  487|       |         * Make sure max doesn't overflow into negativity
  488|       |         */
  489|   196k|        if (max < INT_MAX - padlen)
  ------------------
  |  Branch (489:13): [True: 0, False: 196k]
  ------------------
  490|      0|            max += padlen;
  491|   196k|        else
  492|   196k|            max = INT_MAX;
  493|   196k|    }
  494|       |
  495|   196k|    if (!(flags & DP_F_MINUS) && padlen > 0) {
  ------------------
  |  |   67|   196k|#define DP_F_MINUS (1 << 0)
  ------------------
  |  Branch (495:9): [True: 196k, False: 0]
  |  Branch (495:34): [True: 0, False: 196k]
  ------------------
  496|       |        /* cap padlen to max so we can pass it as-is to eob_ok() */
  497|      0|        if (max >= 0) {
  ------------------
  |  Branch (497:13): [True: 0, False: 0]
  ------------------
  498|      0|            if (padlen > max)
  ------------------
  |  Branch (498:17): [True: 0, False: 0]
  ------------------
  499|      0|                padlen = max;
  500|      0|            cnt = padlen;
  501|      0|        }
  502|      0|        while (padlen > 0 && eob_ok(desc, padlen)) {
  ------------------
  |  Branch (502:16): [True: 0, False: 0]
  |  Branch (502:30): [True: 0, False: 0]
  ------------------
  503|      0|            if (!doapr_outch(desc, ' '))
  ------------------
  |  Branch (503:17): [True: 0, False: 0]
  ------------------
  504|      0|                return 0;
  505|      0|            --padlen;
  506|      0|        }
  507|      0|    }
  508|   196k|    if (max >= 0) {
  ------------------
  |  Branch (508:9): [True: 196k, False: 0]
  ------------------
  509|       |        /* cap strln to (max - cnt) so we can pass it as-is to eob_ok() */
  510|   196k|        if (strln > INT_MAX || (int)strln > max - cnt)
  ------------------
  |  Branch (510:13): [True: 0, False: 196k]
  |  Branch (510:32): [True: 0, False: 196k]
  ------------------
  511|      0|            strln = max - cnt;
  512|   196k|        cnt += (int)strln;
  513|   196k|    }
  514|  19.8M|    while (strln > 0 && eob_ok(desc, strln)) {
  ------------------
  |  Branch (514:12): [True: 19.6M, False: 195k]
  |  Branch (514:25): [True: 19.6M, False: 1.83k]
  ------------------
  515|  19.6M|        if (!doapr_outch(desc, *value++))
  ------------------
  |  Branch (515:13): [True: 0, False: 19.6M]
  ------------------
  516|      0|            return 0;
  517|  19.6M|        --strln;
  518|  19.6M|    }
  519|   196k|    if ((flags & DP_F_MINUS) && padlen > 0) {
  ------------------
  |  |   67|   196k|#define DP_F_MINUS (1 << 0)
  ------------------
  |  Branch (519:9): [True: 0, False: 196k]
  |  Branch (519:33): [True: 0, False: 0]
  ------------------
  520|       |        /* cap padlen to (max - cnt) so we can pass it as-is to eob_ok() */
  521|      0|        if (max >= 0) {
  ------------------
  |  Branch (521:13): [True: 0, False: 0]
  ------------------
  522|      0|            if (padlen > max - cnt)
  ------------------
  |  Branch (522:17): [True: 0, False: 0]
  ------------------
  523|      0|                padlen = max - cnt;
  524|      0|        }
  525|      0|        while (padlen > 0 && eob_ok(desc, padlen)) {
  ------------------
  |  Branch (525:16): [True: 0, False: 0]
  |  Branch (525:30): [True: 0, False: 0]
  ------------------
  526|      0|            if (!doapr_outch(desc, ' '))
  ------------------
  |  Branch (526:17): [True: 0, False: 0]
  ------------------
  527|      0|                return 0;
  528|      0|            --padlen;
  529|      0|        }
  530|      0|    }
  531|   196k|    return 1;
  532|   196k|}

bio_sock_cleanup_int:
  205|      1|{
  206|       |#ifdef OPENSSL_SYS_WINDOWS
  207|       |    if (wsa_init_done) {
  208|       |        wsa_init_done = 0;
  209|       |        WSACleanup();
  210|       |    }
  211|       |#endif
  212|      1|}

ossl_bio_core_globals_free:
   26|    785|{
   27|    785|    OPENSSL_free(vbcg);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   28|    785|}
ossl_bio_core_globals_new:
   31|    785|{
   32|    785|    return OPENSSL_zalloc(sizeof(BIO_CORE_GLOBALS));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|    785|}

BIO_new_file:
   58|  4.01k|{
   59|  4.01k|    BIO *ret;
   60|  4.01k|    FILE *file = openssl_fopen(filename, mode);
   61|  4.01k|    int fp_flags = BIO_CLOSE;
  ------------------
  |  |   85|  4.01k|#define BIO_CLOSE 0x01
  ------------------
   62|       |
   63|  4.01k|    if (strchr(mode, 'b') == NULL)
  ------------------
  |  Branch (63:9): [True: 3.23k, False: 785]
  ------------------
   64|  3.23k|        fp_flags |= BIO_FP_TEXT;
  ------------------
  |  |  220|  3.23k|#define BIO_FP_TEXT 0x10
  ------------------
   65|       |
   66|  4.01k|    if (file == NULL) {
  ------------------
  |  Branch (66:9): [True: 1.00k, False: 3.00k]
  ------------------
   67|  1.00k|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|  1.00k|    (ERR_new(),                                                  \
  |  |  407|  1.00k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  1.00k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  1.00k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|  1.00k|#define ERR_LIB_SYS 2
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|  1.00k|#define get_last_sys_error() errno
  ------------------
   68|  1.00k|            "calling fopen(%s, %s)",
   69|  1.00k|            filename, mode);
   70|  1.00k|        if (errno == ENOENT
  ------------------
  |  Branch (70:13): [True: 1.00k, False: 5]
  ------------------
   71|      5|#ifdef ENXIO
   72|  1.00k|            || errno == ENXIO
  ------------------
  |  Branch (72:16): [True: 0, False: 5]
  ------------------
   73|  1.00k|#endif
   74|  1.00k|        )
   75|  1.00k|            ERR_raise(ERR_LIB_BIO, BIO_R_NO_SUCH_FILE);
  ------------------
  |  |  404|  1.00k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|  1.00k|    (ERR_new(),                                                  \
  |  |  |  |  407|  1.00k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  1.00k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|  1.00k|        ERR_set_error)
  |  |  ------------------
  ------------------
   76|      5|        else
   77|  1.00k|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  404|      5|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      5|    (ERR_new(),                                                  \
  |  |  |  |  407|      5|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      5|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      5|        ERR_set_error)
  |  |  ------------------
  ------------------
   78|  1.00k|        return NULL;
   79|  1.00k|    }
   80|  3.00k|    if ((ret = BIO_new(BIO_s_file())) == NULL) {
  ------------------
  |  Branch (80:9): [True: 0, False: 3.00k]
  ------------------
   81|      0|        fclose(file);
   82|      0|        return NULL;
   83|      0|    }
   84|       |
   85|       |    /* we did fopen -> we disengage UPLINK */
   86|  3.00k|    BIO_clear_flags(ret, BIO_FLAGS_UPLINK_INTERNAL);
  ------------------
  |  |   18|  3.00k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
   87|  3.00k|    BIO_set_fp(ret, file, fp_flags);
  ------------------
  |  |  568|  3.00k|#define BIO_set_fp(b, fp, c) BIO_ctrl(b, BIO_C_SET_FILE_PTR, c, (char *)(fp))
  |  |  ------------------
  |  |  |  |  440|  3.00k|#define BIO_C_SET_FILE_PTR 106
  |  |  ------------------
  ------------------
   88|  3.00k|    return ret;
   89|  3.00k|}
BIO_s_file:
  105|  5.71k|{
  106|  5.71k|    return &methods_filep;
  107|  5.71k|}
bss_file.c:file_gets:
  351|  10.7M|{
  352|  10.7M|    int ret = 0;
  353|       |
  354|  10.7M|    buf[0] = '\0';
  355|  10.7M|    if (bp->flags & BIO_FLAGS_UPLINK_INTERNAL) {
  ------------------
  |  |   18|  10.7M|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (355:9): [True: 0, False: 10.7M]
  ------------------
  356|      0|        if (!UP_fgets(buf, size, bp->ptr))
  ------------------
  |  |  152|      0|#define UP_fgets fgets
  ------------------
  |  Branch (356:13): [True: 0, False: 0]
  ------------------
  357|      0|            goto err;
  358|  10.7M|    } else {
  359|  10.7M|        if (!fgets(buf, size, (FILE *)bp->ptr))
  ------------------
  |  Branch (359:13): [True: 5.70k, False: 10.7M]
  ------------------
  360|  5.70k|            goto err;
  361|  10.7M|    }
  362|  10.7M|    if (buf[0] != '\0')
  ------------------
  |  Branch (362:9): [True: 10.7M, False: 0]
  ------------------
  363|  10.7M|        ret = (int)strlen(buf);
  364|  10.7M|err:
  365|  10.7M|    return ret;
  366|  10.7M|}
bss_file.c:file_ctrl:
  180|  5.71k|{
  181|  5.71k|    long ret = 1;
  182|  5.71k|    FILE *fp = (FILE *)b->ptr;
  183|  5.71k|    FILE **fpp;
  184|  5.71k|    char p[4];
  185|  5.71k|    int st;
  186|       |
  187|  5.71k|    switch (cmd) {
  188|      0|    case BIO_C_FILE_SEEK:
  ------------------
  |  |  462|      0|#define BIO_C_FILE_SEEK 128
  ------------------
  |  Branch (188:5): [True: 0, False: 5.71k]
  ------------------
  189|      0|    case BIO_CTRL_RESET:
  ------------------
  |  |   90|      0|#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
  ------------------
  |  Branch (189:5): [True: 0, False: 5.71k]
  ------------------
  190|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (190:13): [True: 0, False: 0]
  ------------------
  191|      0|            ret = (long)UP_fseek(b->ptr, num, 0);
  ------------------
  |  |  160|      0|#define UP_fseek fseek
  ------------------
  192|      0|        else
  193|      0|            ret = (long)fseek(fp, num, 0);
  194|      0|        break;
  195|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (195:5): [True: 0, False: 5.71k]
  ------------------
  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_feof(fp);
  ------------------
  |  |  156|      0|#define UP_feof feof
  ------------------
  198|      0|        else
  199|      0|            ret = (long)feof(fp);
  200|      0|        break;
  201|      0|    case BIO_C_FILE_TELL:
  ------------------
  |  |  468|      0|#define BIO_C_FILE_TELL 133
  ------------------
  |  Branch (201:5): [True: 0, False: 5.71k]
  ------------------
  202|      0|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (202:5): [True: 0, False: 5.71k]
  ------------------
  203|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (203:13): [True: 0, False: 0]
  ------------------
  204|      0|            ret = UP_ftell(b->ptr);
  ------------------
  |  |  161|      0|#define UP_ftell ftell
  ------------------
  205|      0|        else {
  206|       |#if defined(OPENSSL_SYS_WINDOWS)
  207|       |            /*
  208|       |             * On Windows, for non-seekable files (stdin), ftell() is undefined.
  209|       |             */
  210|       |            if (GetFileType((HANDLE)_get_osfhandle(_fileno(fp))) != FILE_TYPE_DISK)
  211|       |                ret = -1;
  212|       |            else
  213|       |                ret = ftell(fp);
  214|       |#else
  215|      0|            ret = ftell(fp);
  216|      0|#endif
  217|      0|        }
  218|      0|        break;
  219|  3.00k|    case BIO_C_SET_FILE_PTR:
  ------------------
  |  |  440|  3.00k|#define BIO_C_SET_FILE_PTR 106
  ------------------
  |  Branch (219:5): [True: 3.00k, False: 2.71k]
  ------------------
  220|  3.00k|        file_free(b);
  221|  3.00k|        b->shutdown = (int)num & BIO_CLOSE;
  ------------------
  |  |   85|  3.00k|#define BIO_CLOSE 0x01
  ------------------
  222|  3.00k|        b->ptr = ptr;
  223|  3.00k|        b->init = 1;
  224|       |#if BIO_FLAGS_UPLINK_INTERNAL != 0
  225|       |#if defined(__MINGW32__) && defined(__MSVCRT__) && !defined(_IOB_ENTRIES)
  226|       |#define _IOB_ENTRIES 20
  227|       |#endif
  228|       |        /* Safety net to catch purely internal BIO_set_fp calls */
  229|       |#if (defined(_MSC_VER) && _MSC_VER >= 1900) || defined(__BORLANDC__)
  230|       |        if (ptr == stdin || ptr == stdout || ptr == stderr)
  231|       |            BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  232|       |#elif defined(_IOB_ENTRIES)
  233|       |        if ((size_t)ptr >= (size_t)stdin && (size_t)ptr < (size_t)(stdin + _IOB_ENTRIES))
  234|       |            BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  235|       |#endif
  236|       |#endif
  237|       |#ifdef UP_fsetmod
  238|       |        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  239|       |            UP_fsetmod(b->ptr, (char)((num & BIO_FP_TEXT) ? 't' : 'b'));
  240|       |        else
  241|       |#endif
  242|  3.00k|        {
  243|       |#if defined(OPENSSL_SYS_WINDOWS)
  244|       |            int fd = _fileno((FILE *)ptr);
  245|       |            if (num & BIO_FP_TEXT)
  246|       |                _setmode(fd, _O_TEXT);
  247|       |            else
  248|       |                _setmode(fd, _O_BINARY);
  249|       |#elif defined(OPENSSL_SYS_MSDOS)
  250|       |            int fd = fileno((FILE *)ptr);
  251|       |            /* Set correct text/binary mode */
  252|       |            if (num & BIO_FP_TEXT)
  253|       |                _setmode(fd, _O_TEXT);
  254|       |            /* Dangerous to set stdin/stdout to raw (unless redirected) */
  255|       |            else {
  256|       |                if (fd == STDIN_FILENO || fd == STDOUT_FILENO) {
  257|       |                    if (isatty(fd) <= 0)
  258|       |                        _setmode(fd, _O_BINARY);
  259|       |                } else
  260|       |                    _setmode(fd, _O_BINARY);
  261|       |            }
  262|       |#elif defined(OPENSSL_SYS_WIN32_CYGWIN)
  263|       |            int fd = fileno((FILE *)ptr);
  264|       |            if (!(num & BIO_FP_TEXT))
  265|       |                setmode(fd, O_BINARY);
  266|       |#endif
  267|  3.00k|        }
  268|  3.00k|        break;
  269|  2.71k|    case BIO_C_SET_FILENAME:
  ------------------
  |  |  442|  2.71k|#define BIO_C_SET_FILENAME 108
  ------------------
  |  Branch (269:5): [True: 2.71k, False: 3.00k]
  ------------------
  270|  2.71k|        file_free(b);
  271|  2.71k|        b->shutdown = (int)num & BIO_CLOSE;
  ------------------
  |  |   85|  2.71k|#define BIO_CLOSE 0x01
  ------------------
  272|  2.71k|        if (num & BIO_FP_APPEND) {
  ------------------
  |  |  219|  2.71k|#define BIO_FP_APPEND 0x08
  ------------------
  |  Branch (272:13): [True: 0, False: 2.71k]
  ------------------
  273|      0|            if (num & BIO_FP_READ)
  ------------------
  |  |  217|      0|#define BIO_FP_READ 0x02
  ------------------
  |  Branch (273:17): [True: 0, False: 0]
  ------------------
  274|      0|                OPENSSL_strlcpy(p, "a+", sizeof(p));
  275|      0|            else
  276|      0|                OPENSSL_strlcpy(p, "a", sizeof(p));
  277|  2.71k|        } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
  ------------------
  |  |  217|  2.71k|#define BIO_FP_READ 0x02
  ------------------
                      } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
  ------------------
  |  |  218|  2.71k|#define BIO_FP_WRITE 0x04
  ------------------
  |  Branch (277:20): [True: 2.71k, False: 0]
  |  Branch (277:43): [True: 0, False: 2.71k]
  ------------------
  278|      0|            OPENSSL_strlcpy(p, "r+", sizeof(p));
  279|  2.71k|        else if (num & BIO_FP_WRITE)
  ------------------
  |  |  218|  2.71k|#define BIO_FP_WRITE 0x04
  ------------------
  |  Branch (279:18): [True: 0, False: 2.71k]
  ------------------
  280|      0|            OPENSSL_strlcpy(p, "w", sizeof(p));
  281|  2.71k|        else if (num & BIO_FP_READ)
  ------------------
  |  |  217|  2.71k|#define BIO_FP_READ 0x02
  ------------------
  |  Branch (281:18): [True: 2.71k, False: 0]
  ------------------
  282|  2.71k|            OPENSSL_strlcpy(p, "r", sizeof(p));
  283|      0|        else {
  284|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_BAD_FOPEN_MODE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|            ret = 0;
  286|      0|            break;
  287|      0|        }
  288|       |#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
  289|       |        if (!(num & BIO_FP_TEXT))
  290|       |            OPENSSL_strlcat(p, "b", sizeof(p));
  291|       |        else
  292|       |            OPENSSL_strlcat(p, "t", sizeof(p));
  293|       |#elif defined(OPENSSL_SYS_WIN32_CYGWIN)
  294|       |        if (!(num & BIO_FP_TEXT))
  295|       |            OPENSSL_strlcat(p, "b", sizeof(p));
  296|       |#endif
  297|  2.71k|        fp = openssl_fopen(ptr, p);
  298|  2.71k|        if (fp == NULL) {
  ------------------
  |  Branch (298:13): [True: 9, False: 2.70k]
  ------------------
  299|      9|            ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|      9|    (ERR_new(),                                                  \
  |  |  407|      9|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      9|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      9|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|      9|#define ERR_LIB_SYS 2
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      9|#define get_last_sys_error() errno
  ------------------
  300|      9|                "calling fopen(%s, %s)",
  301|      9|                (const char *)ptr, p);
  302|      9|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  404|      9|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      9|    (ERR_new(),                                                  \
  |  |  |  |  407|      9|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      9|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      9|        ERR_set_error)
  |  |  ------------------
  ------------------
  303|      9|            ret = 0;
  304|      9|            break;
  305|      9|        }
  306|  2.70k|        b->ptr = fp;
  307|  2.70k|        b->init = 1;
  308|       |        /* we did fopen -> we disengage UPLINK */
  309|  2.70k|        BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  ------------------
  |  |   18|  2.70k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  310|  2.70k|        break;
  311|      0|    case BIO_C_GET_FILE_PTR:
  ------------------
  |  |  441|      0|#define BIO_C_GET_FILE_PTR 107
  ------------------
  |  Branch (311:5): [True: 0, False: 5.71k]
  ------------------
  312|       |        /* the ptr parameter is actually a FILE ** in this case. */
  313|      0|        if (ptr != NULL) {
  ------------------
  |  Branch (313:13): [True: 0, False: 0]
  ------------------
  314|      0|            fpp = (FILE **)ptr;
  315|      0|            *fpp = (FILE *)b->ptr;
  316|      0|        }
  317|      0|        break;
  318|      0|    case BIO_CTRL_GET_CLOSE:
  ------------------
  |  |   97|      0|#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
  ------------------
  |  Branch (318:5): [True: 0, False: 5.71k]
  ------------------
  319|      0|        ret = (long)b->shutdown;
  320|      0|        break;
  321|      0|    case BIO_CTRL_SET_CLOSE:
  ------------------
  |  |   98|      0|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  ------------------
  |  Branch (321:5): [True: 0, False: 5.71k]
  ------------------
  322|      0|        b->shutdown = (int)num;
  323|      0|        break;
  324|      0|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|      0|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (324:5): [True: 0, False: 5.71k]
  ------------------
  325|      0|        st = b->flags & BIO_FLAGS_UPLINK_INTERNAL
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (325:14): [True: 0, False: 0]
  ------------------
  326|      0|            ? UP_fflush(b->ptr)
  ------------------
  |  |  162|      0|#define UP_fflush fflush
  ------------------
  327|      0|            : fflush((FILE *)b->ptr);
  328|      0|        if (st == EOF) {
  ------------------
  |  Branch (328:13): [True: 0, False: 0]
  ------------------
  329|      0|            ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|      0|#define ERR_LIB_SYS 2
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
  330|      0|                "calling fflush()");
  331|      0|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  332|      0|            ret = 0;
  333|      0|        }
  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.71k]
  ------------------
  336|      0|        ret = 1;
  337|      0|        break;
  338|       |
  339|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (339:5): [True: 0, False: 5.71k]
  ------------------
  340|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (340:5): [True: 0, False: 5.71k]
  ------------------
  341|      0|    case BIO_CTRL_PUSH:
  ------------------
  |  |   95|      0|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  |  Branch (341:5): [True: 0, False: 5.71k]
  ------------------
  342|      0|    case BIO_CTRL_POP:
  ------------------
  |  |   96|      0|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  |  Branch (342:5): [True: 0, False: 5.71k]
  ------------------
  343|      0|    default:
  ------------------
  |  Branch (343:5): [True: 0, False: 5.71k]
  ------------------
  344|      0|        ret = 0;
  345|      0|        break;
  346|  5.71k|    }
  347|  5.71k|    return ret;
  348|  5.71k|}
bss_file.c:file_new:
  110|  5.71k|{
  111|  5.71k|    bi->init = 0;
  112|  5.71k|    bi->num = 0;
  113|  5.71k|    bi->ptr = NULL;
  114|  5.71k|    bi->flags = BIO_FLAGS_UPLINK_INTERNAL; /* default to UPLINK */
  ------------------
  |  |   18|  5.71k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  115|  5.71k|    return 1;
  116|  5.71k|}
bss_file.c:file_free:
  119|  11.4k|{
  120|  11.4k|    if (a == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 11.4k]
  ------------------
  121|      0|        return 0;
  122|  11.4k|    if (a->shutdown) {
  ------------------
  |  Branch (122:9): [True: 11.4k, False: 0]
  ------------------
  123|  11.4k|        if ((a->init) && (a->ptr != NULL)) {
  ------------------
  |  Branch (123:13): [True: 5.70k, False: 5.72k]
  |  Branch (123:26): [True: 5.70k, False: 0]
  ------------------
  124|  5.70k|            if (a->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|  5.70k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (124:17): [True: 0, False: 5.70k]
  ------------------
  125|      0|                UP_fclose(a->ptr);
  ------------------
  |  |  157|      0|#define UP_fclose fclose
  ------------------
  126|  5.70k|            else
  127|  5.70k|                fclose(a->ptr);
  128|  5.70k|            a->ptr = NULL;
  129|  5.70k|            a->flags = BIO_FLAGS_UPLINK_INTERNAL;
  ------------------
  |  |   18|  5.70k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  130|  5.70k|        }
  131|  11.4k|        a->init = 0;
  132|  11.4k|    }
  133|  11.4k|    return 1;
  134|  11.4k|}

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

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

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

BN_add:
   15|   457k|{
   16|   457k|    int ret, r_neg, cmp_res;
   17|       |
   18|   457k|    bn_check_top(a);
   19|   457k|    bn_check_top(b);
   20|       |
   21|   457k|    if (a->neg == b->neg) {
  ------------------
  |  Branch (21:9): [True: 578, False: 456k]
  ------------------
   22|    578|        r_neg = a->neg;
   23|    578|        ret = BN_uadd(r, a, b);
   24|   456k|    } else {
   25|   456k|        cmp_res = BN_ucmp(a, b);
   26|   456k|        if (cmp_res > 0) {
  ------------------
  |  Branch (26:13): [True: 0, False: 456k]
  ------------------
   27|      0|            r_neg = a->neg;
   28|      0|            ret = BN_usub(r, a, b);
   29|   456k|        } else if (cmp_res < 0) {
  ------------------
  |  Branch (29:20): [True: 456k, False: 0]
  ------------------
   30|   456k|            r_neg = b->neg;
   31|   456k|            ret = BN_usub(r, b, a);
   32|   456k|        } 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|   456k|    }
   38|       |
   39|   457k|    r->neg = r_neg;
   40|   457k|    bn_check_top(r);
   41|   457k|    return ret;
   42|   457k|}
BN_sub:
   46|  1.01M|{
   47|  1.01M|    int ret, r_neg, cmp_res;
   48|       |
   49|  1.01M|    bn_check_top(a);
   50|  1.01M|    bn_check_top(b);
   51|       |
   52|  1.01M|    if (a->neg != b->neg) {
  ------------------
  |  Branch (52:9): [True: 0, False: 1.01M]
  ------------------
   53|      0|        r_neg = a->neg;
   54|      0|        ret = BN_uadd(r, a, b);
   55|  1.01M|    } else {
   56|  1.01M|        cmp_res = BN_ucmp(a, b);
   57|  1.01M|        if (cmp_res > 0) {
  ------------------
  |  Branch (57:13): [True: 560k, False: 456k]
  ------------------
   58|   560k|            r_neg = a->neg;
   59|   560k|            ret = BN_usub(r, a, b);
   60|   560k|        } else if (cmp_res < 0) {
  ------------------
  |  Branch (60:20): [True: 456k, False: 0]
  ------------------
   61|   456k|            r_neg = !b->neg;
   62|   456k|            ret = BN_usub(r, b, a);
   63|   456k|        } 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|  1.01M|    }
   69|       |
   70|  1.01M|    r->neg = r_neg;
   71|  1.01M|    bn_check_top(r);
   72|  1.01M|    return ret;
   73|  1.01M|}
BN_uadd:
   77|  10.2M|{
   78|  10.2M|    int max, min, dif;
   79|  10.2M|    const BN_ULONG *ap, *bp;
   80|  10.2M|    BN_ULONG *rp, carry, t1, t2;
  ------------------
  |  |   37|  10.2M|#define BN_ULONG unsigned long
  ------------------
   81|       |
   82|  10.2M|    bn_check_top(a);
   83|  10.2M|    bn_check_top(b);
   84|       |
   85|  10.2M|    if (a->top < b->top) {
  ------------------
  |  Branch (85:9): [True: 216k, False: 10.0M]
  ------------------
   86|   216k|        const BIGNUM *tmp;
   87|       |
   88|   216k|        tmp = a;
   89|   216k|        a = b;
   90|   216k|        b = tmp;
   91|   216k|    }
   92|  10.2M|    max = a->top;
   93|  10.2M|    min = b->top;
   94|  10.2M|    dif = max - min;
   95|       |
   96|  10.2M|    if (bn_wexpand(r, max + 1) == NULL)
  ------------------
  |  Branch (96:9): [True: 0, False: 10.2M]
  ------------------
   97|      0|        return 0;
   98|       |
   99|  10.2M|    r->top = max;
  100|       |
  101|  10.2M|    ap = a->d;
  102|  10.2M|    bp = b->d;
  103|  10.2M|    rp = r->d;
  104|       |
  105|  10.2M|    carry = bn_add_words(rp, ap, bp, min);
  106|  10.2M|    rp += min;
  107|  10.2M|    ap += min;
  108|       |
  109|  13.6M|    while (dif) {
  ------------------
  |  Branch (109:12): [True: 3.35M, False: 10.2M]
  ------------------
  110|  3.35M|        dif--;
  111|  3.35M|        t1 = *(ap++);
  112|  3.35M|        t2 = (t1 + carry) & BN_MASK2;
  ------------------
  |  |   93|  3.35M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  113|  3.35M|        *(rp++) = t2;
  114|  3.35M|        carry &= (t2 == 0);
  115|  3.35M|    }
  116|  10.2M|    *rp = carry;
  117|  10.2M|    r->top += (int)carry;
  118|       |
  119|  10.2M|    r->neg = 0;
  120|  10.2M|    bn_check_top(r);
  121|  10.2M|    return 1;
  122|  10.2M|}
BN_usub:
  126|  8.40M|{
  127|  8.40M|    int max, min, dif;
  128|  8.40M|    BN_ULONG t1, t2, borrow, *rp;
  ------------------
  |  |   37|  8.40M|#define BN_ULONG unsigned long
  ------------------
  129|  8.40M|    const BN_ULONG *ap, *bp;
  130|       |
  131|  8.40M|    bn_check_top(a);
  132|  8.40M|    bn_check_top(b);
  133|       |
  134|  8.40M|    max = a->top;
  135|  8.40M|    min = b->top;
  136|  8.40M|    dif = max - min;
  137|       |
  138|  8.40M|    if (dif < 0) { /* hmm... should not be happening */
  ------------------
  |  Branch (138:9): [True: 0, False: 8.40M]
  ------------------
  139|      0|        ERR_raise(ERR_LIB_BN, BN_R_ARG2_LT_ARG3);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  140|      0|        return 0;
  141|      0|    }
  142|       |
  143|  8.40M|    if (bn_wexpand(r, max) == NULL)
  ------------------
  |  Branch (143:9): [True: 0, False: 8.40M]
  ------------------
  144|      0|        return 0;
  145|       |
  146|  8.40M|    ap = a->d;
  147|  8.40M|    bp = b->d;
  148|  8.40M|    rp = r->d;
  149|       |
  150|  8.40M|    borrow = bn_sub_words(rp, ap, bp, min);
  151|  8.40M|    ap += min;
  152|  8.40M|    rp += min;
  153|       |
  154|  8.59M|    while (dif) {
  ------------------
  |  Branch (154:12): [True: 187k, False: 8.40M]
  ------------------
  155|   187k|        dif--;
  156|   187k|        t1 = *(ap++);
  157|   187k|        t2 = (t1 - borrow) & BN_MASK2;
  ------------------
  |  |   93|   187k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  158|   187k|        *(rp++) = t2;
  159|   187k|        borrow &= (t1 == 0);
  160|   187k|    }
  161|       |
  162|  8.59M|    while (max && *--rp == 0)
  ------------------
  |  Branch (162:12): [True: 8.48M, False: 108k]
  |  Branch (162:19): [True: 186k, False: 8.29M]
  ------------------
  163|   186k|        max--;
  164|       |
  165|  8.40M|    r->top = max;
  166|  8.40M|    r->neg = 0;
  167|  8.40M|    bn_pollute(r);
  168|       |
  169|  8.40M|    return 1;
  170|  8.40M|}

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

BN_div:
  213|  1.39M|{
  214|  1.39M|    int ret;
  215|       |
  216|  1.39M|    if (BN_is_zero(divisor)) {
  ------------------
  |  Branch (216:9): [True: 0, False: 1.39M]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_BN, BN_R_DIV_BY_ZERO);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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.39M|    if (divisor->d[divisor->top - 1] == 0) {
  ------------------
  |  Branch (226:9): [True: 0, False: 1.39M]
  ------------------
  227|      0|        ERR_raise(ERR_LIB_BN, BN_R_NOT_INITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|        return 0;
  229|      0|    }
  230|       |
  231|  1.39M|    ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
  232|       |
  233|  1.39M|    if (ret) {
  ------------------
  |  Branch (233:9): [True: 1.39M, False: 0]
  ------------------
  234|  1.39M|        if (dv != NULL)
  ------------------
  |  Branch (234:13): [True: 108k, False: 1.28M]
  ------------------
  235|   108k|            bn_correct_top(dv);
  236|  1.39M|        if (rm != NULL)
  ------------------
  |  Branch (236:13): [True: 1.28M, False: 108k]
  ------------------
  237|  1.28M|            bn_correct_top(rm);
  238|  1.39M|    }
  239|       |
  240|  1.39M|    return ret;
  241|  1.39M|}
bn_div_fixed_top:
  268|  1.39M|{
  269|  1.39M|    int norm_shift, i, j, loop;
  270|  1.39M|    BIGNUM *tmp, *snum, *sdiv, *res;
  271|  1.39M|    BN_ULONG *resp, *wnum, *wnumtop;
  ------------------
  |  |   37|  1.39M|#define BN_ULONG unsigned long
  ------------------
  272|  1.39M|    BN_ULONG d0, d1;
  ------------------
  |  |   37|  1.39M|#define BN_ULONG unsigned long
  ------------------
  273|  1.39M|    int num_n, div_n, num_neg;
  274|       |
  275|  1.39M|    assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0);
  ------------------
  |  Branch (275:5): [True: 0, False: 1.39M]
  |  Branch (275:5): [True: 0, False: 0]
  |  Branch (275:5): [True: 1.39M, False: 0]
  |  Branch (275:5): [True: 1.39M, False: 0]
  ------------------
  276|       |
  277|  1.39M|    bn_check_top(num);
  278|  1.39M|    bn_check_top(divisor);
  279|  1.39M|    bn_check_top(dv);
  280|  1.39M|    bn_check_top(rm);
  281|       |
  282|  1.39M|    BN_CTX_start(ctx);
  283|  1.39M|    res = (dv == NULL) ? BN_CTX_get(ctx) : dv;
  ------------------
  |  Branch (283:11): [True: 1.28M, False: 108k]
  ------------------
  284|  1.39M|    tmp = BN_CTX_get(ctx);
  285|  1.39M|    snum = BN_CTX_get(ctx);
  286|  1.39M|    sdiv = BN_CTX_get(ctx);
  287|  1.39M|    if (sdiv == NULL)
  ------------------
  |  Branch (287:9): [True: 0, False: 1.39M]
  ------------------
  288|      0|        goto err;
  289|       |
  290|       |    /* First we normalise the numbers */
  291|  1.39M|    if (!BN_copy(sdiv, divisor))
  ------------------
  |  Branch (291:9): [True: 0, False: 1.39M]
  ------------------
  292|      0|        goto err;
  293|  1.39M|    norm_shift = bn_left_align(sdiv);
  294|  1.39M|    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.39M|    if (!(bn_lshift_fixed_top(snum, num, norm_shift)))
  ------------------
  |  Branch (302:9): [True: 0, False: 1.39M]
  ------------------
  303|      0|        goto err;
  304|       |
  305|  1.39M|    div_n = sdiv->top;
  306|  1.39M|    num_n = snum->top;
  307|       |
  308|  1.39M|    if (num_n <= div_n) {
  ------------------
  |  Branch (308:9): [True: 239k, False: 1.15M]
  ------------------
  309|       |        /* caller didn't pad dividend -> no constant-time guarantee... */
  310|   239k|        if (bn_wexpand(snum, div_n + 1) == NULL)
  ------------------
  |  Branch (310:13): [True: 0, False: 239k]
  ------------------
  311|      0|            goto err;
  312|   239k|        memset(&(snum->d[num_n]), 0, (div_n - num_n + 1) * sizeof(BN_ULONG));
  313|   239k|        snum->top = num_n = div_n + 1;
  314|   239k|    }
  315|       |
  316|  1.39M|    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.39M|    wnum = &(snum->d[loop]);
  322|  1.39M|    wnumtop = &(snum->d[num_n - 1]);
  323|       |
  324|       |    /* Get the top 2 words of sdiv */
  325|  1.39M|    d0 = sdiv->d[div_n - 1];
  326|  1.39M|    d1 = (div_n == 1) ? 0 : sdiv->d[div_n - 2];
  ------------------
  |  Branch (326:10): [True: 324k, False: 1.06M]
  ------------------
  327|       |
  328|       |    /* Setup quotient */
  329|  1.39M|    if (!bn_wexpand(res, loop))
  ------------------
  |  Branch (329:9): [True: 0, False: 1.39M]
  ------------------
  330|      0|        goto err;
  331|  1.39M|    num_neg = num->neg;
  332|  1.39M|    res->neg = (num_neg ^ divisor->neg);
  333|  1.39M|    res->top = loop;
  334|  1.39M|    res->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  1.39M|#define BN_FLG_FIXED_TOP 0
  ------------------
  335|  1.39M|    resp = &(res->d[loop]);
  336|       |
  337|       |    /* space for temp */
  338|  1.39M|    if (!bn_wexpand(tmp, (div_n + 1)))
  ------------------
  |  Branch (338:9): [True: 0, False: 1.39M]
  ------------------
  339|      0|        goto err;
  340|       |
  341|  3.87M|    for (i = 0; i < loop; i++, wnumtop--) {
  ------------------
  |  Branch (341:17): [True: 2.48M, False: 1.39M]
  ------------------
  342|  2.48M|        BN_ULONG q, l0;
  ------------------
  |  |   37|  2.48M|#define BN_ULONG unsigned long
  ------------------
  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|  2.48M|        BN_ULONG n0, n1, rem = 0;
  ------------------
  |  |   37|  2.48M|#define BN_ULONG unsigned long
  ------------------
  351|       |
  352|  2.48M|        n0 = wnumtop[0];
  353|  2.48M|        n1 = wnumtop[-1];
  354|  2.48M|        if (n0 == d0)
  ------------------
  |  Branch (354:13): [True: 0, False: 2.48M]
  ------------------
  355|      0|            q = BN_MASK2;
  ------------------
  |  |   93|      0|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  356|  2.48M|        else { /* n0 < d0 */
  357|  2.48M|            BN_ULONG n2 = (wnumtop == wnum) ? 0 : wnumtop[-2];
  ------------------
  |  |   37|  2.48M|#define BN_ULONG unsigned long
  ------------------
  |  Branch (357:27): [True: 649k, False: 1.83M]
  ------------------
  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|  2.48M|            BN_ULONG t2l, t2h;
  ------------------
  |  |   37|  2.48M|#define BN_ULONG unsigned long
  ------------------
  387|       |
  388|  2.48M|            q = bn_div_words(n0, n1, d0);
  389|  2.48M|#ifndef REMAINDER_IS_ALREADY_CALCULATED
  390|  2.48M|            rem = (n1 - q * d0) & BN_MASK2;
  ------------------
  |  |   93|  2.48M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  391|  2.48M|#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|  2.48M|            {
  400|  2.48M|                BN_ULONG ql, qh;
  ------------------
  |  |   37|  2.48M|#define BN_ULONG unsigned long
  ------------------
  401|  2.48M|                t2l = LBITS(d1);
  ------------------
  |  |  568|  2.48M|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   94|  2.48M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  402|  2.48M|                t2h = HBITS(d1);
  ------------------
  |  |  569|  2.48M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   92|  2.48M|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   94|  2.48M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  403|  2.48M|                ql = LBITS(q);
  ------------------
  |  |  568|  2.48M|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   94|  2.48M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  404|  2.48M|                qh = HBITS(q);
  ------------------
  |  |  569|  2.48M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   92|  2.48M|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   94|  2.48M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  405|  2.48M|                mul64(t2l, t2h, ql, qh); /* t2=(BN_ULLONG)d1*q; */
  ------------------
  |  |  577|  2.48M|    {                                      \
  |  |  578|  2.48M|        BN_ULONG m, m1, lt, ht;            \
  |  |  ------------------
  |  |  |  |   37|  2.48M|#define BN_ULONG unsigned long
  |  |  ------------------
  |  |  579|  2.48M|                                           \
  |  |  580|  2.48M|        lt = l;                            \
  |  |  581|  2.48M|        ht = h;                            \
  |  |  582|  2.48M|        m = (bh) * (lt);                   \
  |  |  583|  2.48M|        lt = (bl) * (lt);                  \
  |  |  584|  2.48M|        m1 = (bl) * (ht);                  \
  |  |  585|  2.48M|        ht = (bh) * (ht);                  \
  |  |  586|  2.48M|        m = (m + m1) & BN_MASK2;           \
  |  |  ------------------
  |  |  |  |   93|  2.48M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  587|  2.48M|        ht += L2HBITS((BN_ULONG)(m < m1)); \
  |  |  ------------------
  |  |  |  |  570|  2.48M|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|  2.48M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|  2.48M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  588|  2.48M|        ht += HBITS(m);                    \
  |  |  ------------------
  |  |  |  |  569|  2.48M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|  2.48M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   94|  2.48M|#define BN_MASK2l (0xffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  589|  2.48M|        m1 = L2HBITS(m);                   \
  |  |  ------------------
  |  |  |  |  570|  2.48M|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|  2.48M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|  2.48M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  590|  2.48M|        lt = (lt + m1) & BN_MASK2;         \
  |  |  ------------------
  |  |  |  |   93|  2.48M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  591|  2.48M|        ht += (lt < m1);                   \
  |  |  592|  2.48M|        (l) = lt;                          \
  |  |  593|  2.48M|        (h) = ht;                          \
  |  |  594|  2.48M|    }
  ------------------
  406|  2.48M|            }
  407|  2.48M|#endif
  408|       |
  409|  2.48M|            for (;;) {
  410|  2.48M|                if ((t2h < rem) || ((t2h == rem) && (t2l <= n2)))
  ------------------
  |  Branch (410:21): [True: 1.79M, False: 685k]
  |  Branch (410:37): [True: 683k, False: 2.71k]
  |  Branch (410:53): [True: 683k, False: 0]
  ------------------
  411|  2.47M|                    break;
  412|  2.71k|                q--;
  413|  2.71k|                rem += d0;
  414|  2.71k|                if (rem < d0)
  ------------------
  |  Branch (414:21): [True: 2.30k, False: 402]
  ------------------
  415|  2.30k|                    break; /* don't let rem overflow */
  416|    402|                if (t2l < d1)
  ------------------
  |  Branch (416:21): [True: 127, False: 275]
  ------------------
  417|    127|                    t2h--;
  418|    402|                t2l -= d1;
  419|    402|            }
  420|  2.48M|#endif /* !BN_LLONG */
  421|  2.48M|        }
  422|  2.48M|#endif /* !BN_DIV3W */
  423|       |
  424|  2.48M|        l0 = bn_mul_words(tmp->d, sdiv->d, div_n, q);
  425|  2.48M|        tmp->d[div_n] = l0;
  426|  2.48M|        wnum--;
  427|       |        /*
  428|       |         * ignore top values of the bignums just sub the two BN_ULONG arrays
  429|       |         * with bn_sub_words
  430|       |         */
  431|  2.48M|        l0 = bn_sub_words(wnum, wnum, tmp->d, div_n + 1);
  432|  2.48M|        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|  14.4M|        for (l0 = 0 - l0, j = 0; j < div_n; j++)
  ------------------
  |  Branch (438:34): [True: 11.9M, False: 2.48M]
  ------------------
  439|  11.9M|            tmp->d[j] = sdiv->d[j] & l0;
  440|  2.48M|        l0 = bn_add_words(wnum, wnum, tmp->d, div_n);
  441|  2.48M|        (*wnumtop) += l0;
  442|  2.48M|        assert((*wnumtop) == 0);
  ------------------
  |  Branch (442:9): [True: 0, False: 2.48M]
  |  Branch (442:9): [True: 2.48M, False: 0]
  ------------------
  443|       |
  444|       |        /* store part of the result */
  445|  2.48M|        *--resp = q;
  446|  2.48M|    }
  447|       |    /* snum holds remainder, it's as wide as divisor */
  448|  1.39M|    snum->neg = num_neg;
  449|  1.39M|    snum->top = div_n;
  450|  1.39M|    snum->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  1.39M|#define BN_FLG_FIXED_TOP 0
  ------------------
  451|       |
  452|  1.39M|    if (rm != NULL && bn_rshift_fixed_top(rm, snum, norm_shift) == 0)
  ------------------
  |  Branch (452:9): [True: 1.28M, False: 108k]
  |  Branch (452:23): [True: 0, False: 1.28M]
  ------------------
  453|      0|        goto err;
  454|       |
  455|  1.39M|    BN_CTX_end(ctx);
  456|  1.39M|    return 1;
  457|      0|err:
  458|      0|    bn_check_top(rm);
  459|      0|    BN_CTX_end(ctx);
  460|      0|    return 0;
  461|  1.39M|}
bn_div.c:bn_left_align:
  142|  1.39M|{
  143|  1.39M|    BN_ULONG *d = num->d, n, m, rmask;
  ------------------
  |  |   37|  1.39M|#define BN_ULONG unsigned long
  ------------------
  144|  1.39M|    int top = num->top;
  145|  1.39M|    int rshift = BN_num_bits_word(d[top - 1]), lshift, i;
  146|       |
  147|  1.39M|    lshift = BN_BITS2 - rshift;
  ------------------
  |  |   54|  1.39M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.39M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  148|  1.39M|    rshift %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|  1.39M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.39M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  149|  1.39M|    rmask = (BN_ULONG)0 - rshift; /* rmask = 0 - (rshift != 0) */
  150|  1.39M|    rmask |= rmask >> 8;
  151|       |
  152|  7.94M|    for (i = 0, m = 0; i < top; i++) {
  ------------------
  |  Branch (152:24): [True: 6.54M, False: 1.39M]
  ------------------
  153|  6.54M|        n = d[i];
  154|  6.54M|        d[i] = ((n << lshift) | m) & BN_MASK2;
  ------------------
  |  |   93|  6.54M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  155|  6.54M|        m = (n >> rshift) & rmask;
  156|  6.54M|    }
  157|       |
  158|  1.39M|    return lshift;
  159|  1.39M|}

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|    375|{
  314|    375|    int i, j, bits, ret = 0, wstart, wend, window;
  315|    375|    int start = 1;
  316|    375|    BIGNUM *d, *r;
  317|    375|    const BIGNUM *aa;
  318|       |    /* Table of variables obtained from 'ctx' */
  319|    375|    BIGNUM *val[TABLE_SIZE];
  320|    375|    BN_MONT_CTX *mont = NULL;
  321|       |
  322|    375|    bn_check_top(a);
  323|    375|    bn_check_top(p);
  324|    375|    bn_check_top(m);
  325|       |
  326|    375|    if (!BN_is_odd(m)) {
  ------------------
  |  Branch (326:9): [True: 0, False: 375]
  ------------------
  327|      0|        ERR_raise(ERR_LIB_BN, BN_R_CALLED_WITH_EVEN_MODULUS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  328|      0|        return 0;
  329|      0|    }
  330|       |
  331|    375|    if (m->top <= BN_CONSTTIME_SIZE_LIMIT
  ------------------
  |  |   46|    750|#define BN_CONSTTIME_SIZE_LIMIT (INT_MAX / BN_BYTES / 256)
  |  |  ------------------
  |  |  |  |   38|    375|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (331:9): [True: 375, False: 0]
  ------------------
  332|    375|        && (BN_get_flags(p, BN_FLG_CONSTTIME) != 0
  ------------------
  |  |   67|    375|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (332:13): [True: 86, False: 289]
  ------------------
  333|    289|            || BN_get_flags(a, BN_FLG_CONSTTIME) != 0
  ------------------
  |  |   67|    289|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (333:16): [True: 0, False: 289]
  ------------------
  334|    289|            || BN_get_flags(m, BN_FLG_CONSTTIME) != 0)) {
  ------------------
  |  |   67|    289|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (334:16): [True: 0, False: 289]
  ------------------
  335|     86|        return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
  336|     86|    }
  337|       |
  338|    289|    bits = BN_num_bits(p);
  339|    289|    if (bits == 0) {
  ------------------
  |  Branch (339:9): [True: 0, False: 289]
  ------------------
  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|    289|    BN_CTX_start(ctx);
  351|    289|    d = BN_CTX_get(ctx);
  352|    289|    r = BN_CTX_get(ctx);
  353|    289|    val[0] = BN_CTX_get(ctx);
  354|    289|    if (val[0] == NULL)
  ------------------
  |  Branch (354:9): [True: 0, False: 289]
  ------------------
  355|      0|        goto err;
  356|       |
  357|       |    /*
  358|       |     * If this is not done, things will break in the montgomery part
  359|       |     */
  360|       |
  361|    289|    if (in_mont != NULL)
  ------------------
  |  Branch (361:9): [True: 289, False: 0]
  ------------------
  362|    289|        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|    289|    if (a->neg || BN_ucmp(a, m) >= 0) {
  ------------------
  |  Branch (370:9): [True: 0, False: 289]
  |  Branch (370:19): [True: 0, False: 289]
  ------------------
  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|    289|        aa = a;
  376|    289|    if (!bn_to_mont_fixed_top(val[0], aa, mont, ctx))
  ------------------
  |  Branch (376:9): [True: 0, False: 289]
  ------------------
  377|      0|        goto err; /* 1 */
  378|       |
  379|    289|    window = BN_window_bits_for_exponent_size(bits);
  ------------------
  |  |  317|    289|    ((b) > 671 ? 6 : (b) > 239 ? 5          \
  |  |  ------------------
  |  |  |  Branch (317:6): [True: 0, False: 289]
  |  |  |  Branch (317:22): [True: 289, False: 0]
  |  |  ------------------
  |  |  318|    289|            : (b) > 79         ? 4          \
  |  |  ------------------
  |  |  |  Branch (318:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|            : (b) > 23         ? 3          \
  |  |  ------------------
  |  |  |  Branch (319:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  320|      0|                               : 1)
  ------------------
  380|    289|    if (window > 1) {
  ------------------
  |  Branch (380:9): [True: 289, False: 0]
  ------------------
  381|    289|        if (!bn_mul_mont_fixed_top(d, val[0], val[0], mont, ctx))
  ------------------
  |  Branch (381:13): [True: 0, False: 289]
  ------------------
  382|      0|            goto err; /* 2 */
  383|    289|        j = 1 << (window - 1);
  384|  4.62k|        for (i = 1; i < j; i++) {
  ------------------
  |  Branch (384:21): [True: 4.33k, False: 289]
  ------------------
  385|  4.33k|            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.33k]
  |  Branch (385:57): [True: 0, False: 4.33k]
  ------------------
  386|      0|                goto err;
  387|  4.33k|        }
  388|    289|    }
  389|       |
  390|    289|    start = 1; /* This is used to avoid multiplication etc
  391|       |                * when there is only the value '1' in the
  392|       |                * buffer. */
  393|    289|    wstart = bits - 1; /* The top bit of the window */
  394|    289|    wend = 0; /* The bottom bit of the window */
  395|       |
  396|    289|#if 1 /* by Shay Gueron's suggestion */
  397|    289|    j = m->top; /* borrow j */
  398|    289|    if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
  ------------------
  |  |   54|    289|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|    289|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (398:9): [True: 289, False: 0]
  ------------------
  399|    289|        if (bn_wexpand(r, j) == NULL)
  ------------------
  |  Branch (399:13): [True: 0, False: 289]
  ------------------
  400|      0|            goto err;
  401|       |        /* 2^(top*BN_BITS2) - m */
  402|    289|        r->d[0] = (0 - m->d[0]) & BN_MASK2;
  ------------------
  |  |   93|    289|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  403|  1.81k|        for (i = 1; i < j; i++)
  ------------------
  |  Branch (403:21): [True: 1.52k, False: 289]
  ------------------
  404|  1.52k|            r->d[i] = (~m->d[i]) & BN_MASK2;
  ------------------
  |  |   93|  1.81k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  405|    289|        r->top = j;
  406|    289|        r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|    289|#define BN_FLG_FIXED_TOP 0
  ------------------
  407|    289|    } 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|  57.8k|    for (;;) {
  412|  57.8k|        int wvalue; /* The 'value' of the window */
  413|       |
  414|  57.8k|        if (BN_is_bit_set(p, wstart) == 0) {
  ------------------
  |  Branch (414:13): [True: 38.4k, False: 19.3k]
  ------------------
  415|  38.4k|            if (!start) {
  ------------------
  |  Branch (415:17): [True: 38.4k, False: 0]
  ------------------
  416|  38.4k|                if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx))
  ------------------
  |  Branch (416:21): [True: 0, False: 38.4k]
  ------------------
  417|      0|                    goto err;
  418|  38.4k|            }
  419|  38.4k|            if (wstart == 0)
  ------------------
  |  Branch (419:17): [True: 0, False: 38.4k]
  ------------------
  420|      0|                break;
  421|  38.4k|            wstart--;
  422|  38.4k|            continue;
  423|  38.4k|        }
  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|  19.3k|        wvalue = 1;
  430|  19.3k|        wend = 0;
  431|  95.6k|        for (i = 1; i < window; i++) {
  ------------------
  |  Branch (431:21): [True: 76.6k, False: 19.0k]
  ------------------
  432|  76.6k|            if (wstart - i < 0)
  ------------------
  |  Branch (432:17): [True: 289, False: 76.3k]
  ------------------
  433|    289|                break;
  434|  76.3k|            if (BN_is_bit_set(p, wstart - i)) {
  ------------------
  |  Branch (434:17): [True: 37.3k, False: 39.0k]
  ------------------
  435|  37.3k|                wvalue <<= (i - wend);
  436|  37.3k|                wvalue |= 1;
  437|  37.3k|                wend = i;
  438|  37.3k|            }
  439|  76.3k|        }
  440|       |
  441|       |        /* wend is the size of the current window */
  442|  19.3k|        j = wend + 1;
  443|       |        /* add the 'bytes above' */
  444|  19.3k|        if (!start)
  ------------------
  |  Branch (444:13): [True: 19.0k, False: 289]
  ------------------
  445|  95.1k|            for (i = 0; i < j; i++) {
  ------------------
  |  Branch (445:25): [True: 76.0k, False: 19.0k]
  ------------------
  446|  76.0k|                if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx))
  ------------------
  |  Branch (446:21): [True: 0, False: 76.0k]
  ------------------
  447|      0|                    goto err;
  448|  76.0k|            }
  449|       |
  450|       |        /* wvalue will be an odd number < 2^window */
  451|  19.3k|        if (!bn_mul_mont_fixed_top(r, r, val[wvalue >> 1], mont, ctx))
  ------------------
  |  Branch (451:13): [True: 0, False: 19.3k]
  ------------------
  452|      0|            goto err;
  453|       |
  454|       |        /* move the 'window' down further */
  455|  19.3k|        wstart -= wend + 1;
  456|  19.3k|        start = 0;
  457|  19.3k|        if (wstart < 0)
  ------------------
  |  Branch (457:13): [True: 289, False: 19.0k]
  ------------------
  458|    289|            break;
  459|  19.3k|    }
  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|    289|        if (!BN_from_montgomery(rr, r, mont, ctx))
  ------------------
  |  Branch (476:13): [True: 0, False: 289]
  ------------------
  477|      0|        goto err;
  478|    289|    ret = 1;
  479|    289|err:
  480|    289|    if (in_mont == NULL)
  ------------------
  |  Branch (480:9): [True: 0, False: 289]
  ------------------
  481|      0|        BN_MONT_CTX_free(mont);
  482|    289|    BN_CTX_end(ctx);
  483|    289|    bn_check_top(rr);
  484|    289|    return ret;
  485|    289|}
bn_mod_exp_mont_fixed_top:
  606|     86|{
  607|     86|    int i, bits, ret = 0, window, wvalue, wmask, window0;
  608|     86|    int top;
  609|     86|    BN_MONT_CTX *mont = NULL;
  610|       |
  611|     86|    int numPowers;
  612|     86|    unsigned char *powerbufFree = NULL;
  613|     86|    int powerbufLen = 0;
  614|     86|    unsigned char *powerbuf = NULL;
  615|     86|    BIGNUM tmp, am;
  616|       |#if defined(SPARC_T4_MONT)
  617|       |    unsigned int t4 = 0;
  618|       |#endif
  619|       |
  620|     86|    if (!BN_is_odd(m)) {
  ------------------
  |  Branch (620:9): [True: 0, False: 86]
  ------------------
  621|      0|        ERR_raise(ERR_LIB_BN, BN_R_CALLED_WITH_EVEN_MODULUS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  622|      0|        return 0;
  623|      0|    }
  624|       |
  625|     86|    top = m->top;
  626|       |
  627|     86|    if (top > BN_CONSTTIME_SIZE_LIMIT) {
  ------------------
  |  |   46|     86|#define BN_CONSTTIME_SIZE_LIMIT (INT_MAX / BN_BYTES / 256)
  |  |  ------------------
  |  |  |  |   38|     86|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (627:9): [True: 0, False: 86]
  ------------------
  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|     86|    bits = p->top * BN_BITS2;
  ------------------
  |  |   54|     86|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|     86|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  637|     86|    if (bits == 0) {
  ------------------
  |  Branch (637:9): [True: 0, False: 86]
  ------------------
  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|     86|    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|     86|    if (in_mont != NULL)
  ------------------
  |  Branch (654:9): [True: 86, False: 0]
  ------------------
  655|     86|        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|     86|    if (a->neg || BN_ucmp(a, m) >= 0) {
  ------------------
  |  Branch (663:9): [True: 0, False: 86]
  |  Branch (663:19): [True: 0, False: 86]
  ------------------
  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|     86|#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|     86|    if ((16 == a->top) && (16 == p->top) && (BN_num_bits(m) == 1024)
  ------------------
  |  Branch (678:9): [True: 0, False: 86]
  |  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|     86|    } else if ((8 == a->top) && (8 == p->top) && (BN_num_bits(m) == 512)) {
  ------------------
  |  Branch (689:16): [True: 0, False: 86]
  |  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|     86|#endif
  700|       |
  701|       |    /* Get the window size to use with size of p. */
  702|     86|    window = BN_window_bits_for_ctime_exponent_size(bits);
  ------------------
  |  |  341|     86|    ((b) > 937 ? 6 : (b) > 306 ? 5                \
  |  |  ------------------
  |  |  |  Branch (341:6): [True: 0, False: 86]
  |  |  |  Branch (341:22): [True: 56, False: 30]
  |  |  ------------------
  |  |  342|     86|            : (b) > 89         ? 4                \
  |  |  ------------------
  |  |  |  Branch (342:15): [True: 30, False: 0]
  |  |  ------------------
  |  |  343|     30|            : (b) > 22         ? 3                \
  |  |  ------------------
  |  |  |  Branch (343:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  344|      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|     86|#if defined(OPENSSL_BN_ASM_MONT5)
  709|     86|        if (window >= 5 && top <= BN_SOFT_LIMIT) {
  ------------------
  |  |   62|     56|#define BN_SOFT_LIMIT (4096 / BN_BYTES)
  |  |  ------------------
  |  |  |  |   38|     56|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (709:13): [True: 56, False: 30]
  |  Branch (709:28): [True: 56, False: 0]
  ------------------
  710|     56|        window = 5; /* ~5% improvement for RSA2048 sign, and even
  711|       |                     * for RSA4096 */
  712|       |        /* reserve space for mont->N.d[] copy */
  713|     56|        powerbufLen += top * sizeof(mont->N.d[0]);
  714|     56|    }
  715|     86|#endif
  716|     86|    (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|     86|    numPowers = 1 << window;
  723|     86|    powerbufLen += sizeof(m->d[0]) * (top * numPowers + ((2 * top) > numPowers ? (2 * top) : numPowers));
  ------------------
  |  Branch (723:58): [True: 86, False: 0]
  ------------------
  724|     86|#ifdef alloca
  725|     86|    if (powerbufLen < 3072)
  ------------------
  |  Branch (725:9): [True: 0, False: 86]
  ------------------
  726|      0|        powerbufFree = alloca(powerbufLen + MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH);
  727|     86|    else
  728|     86|#endif
  729|     86|        if ((powerbufFree = OPENSSL_malloc(powerbufLen + MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH))
  ------------------
  |  |  106|     86|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (729:13): [True: 0, False: 86]
  ------------------
  730|     86|            == NULL)
  731|      0|        goto err;
  732|       |
  733|     86|    powerbuf = MOD_EXP_CTIME_ALIGN(powerbufFree);
  ------------------
  |  |  594|     86|    ((unsigned char *)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((size_t)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
  |  |  ------------------
  |  |  |  |  326|     86|#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))))
  |  |  ------------------
  |  |  |  |  327|     86|#define MOD_EXP_CTIME_MIN_CACHE_LINE_MASK (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     86|#define MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH (64)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|     86|    memset(powerbuf, 0, powerbufLen);
  735|       |
  736|     86|#ifdef alloca
  737|     86|    if (powerbufLen < 3072)
  ------------------
  |  Branch (737:9): [True: 0, False: 86]
  ------------------
  738|      0|        powerbufFree = NULL;
  739|     86|#endif
  740|       |
  741|       |    /* lay down tmp and am right after powers table */
  742|     86|    tmp.d = (BN_ULONG *)(powerbuf + sizeof(m->d[0]) * top * numPowers);
  743|     86|    am.d = tmp.d + top;
  744|     86|    tmp.top = am.top = 0;
  745|     86|    tmp.dmax = am.dmax = top;
  746|     86|    tmp.neg = am.neg = 0;
  747|     86|    tmp.flags = am.flags = BN_FLG_STATIC_DATA;
  ------------------
  |  |   59|     86|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  748|       |
  749|       |    /* prepare a^0 in Montgomery domain */
  750|     86|#if 1 /* by Shay Gueron's suggestion */
  751|     86|    if (m->d[top - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
  ------------------
  |  |   54|     86|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|     86|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (751:9): [True: 86, False: 0]
  ------------------
  752|       |        /* 2^(top*BN_BITS2) - m */
  753|     86|        tmp.d[0] = (0 - m->d[0]) & BN_MASK2;
  ------------------
  |  |   93|     86|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  754|  6.14k|        for (i = 1; i < top; i++)
  ------------------
  |  Branch (754:21): [True: 6.05k, False: 86]
  ------------------
  755|  6.05k|            tmp.d[i] = (~m->d[i]) & BN_MASK2;
  ------------------
  |  |   93|  6.05k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  756|     86|        tmp.top = top;
  757|     86|    } else
  758|      0|#endif
  759|      0|        if (!bn_to_mont_fixed_top(&tmp, BN_value_one(), mont, ctx))
  ------------------
  |  Branch (759:13): [True: 0, False: 0]
  ------------------
  760|      0|        goto err;
  761|       |
  762|       |    /* prepare a^1 in Montgomery domain */
  763|     86|    if (!bn_to_mont_fixed_top(&am, a, mont, ctx))
  ------------------
  |  Branch (763:9): [True: 0, False: 86]
  ------------------
  764|      0|        goto err;
  765|       |
  766|     86|    if (top > BN_SOFT_LIMIT)
  ------------------
  |  |   62|     86|#define BN_SOFT_LIMIT (4096 / BN_BYTES)
  |  |  ------------------
  |  |  |  |   38|     86|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (766:9): [True: 0, False: 86]
  ------------------
  767|      0|        goto fallback;
  768|       |
  769|       |#if defined(SPARC_T4_MONT)
  770|       |    if (t4) {
  771|       |        typedef int (*bn_pwr5_mont_f)(BN_ULONG *tp, const BN_ULONG *np,
  772|       |            const BN_ULONG *n0, const void *table,
  773|       |            int power, int bits);
  774|       |        int bn_pwr5_mont_t4_8(BN_ULONG *tp, const BN_ULONG *np,
  775|       |            const BN_ULONG *n0, const void *table,
  776|       |            int power, int bits);
  777|       |        int bn_pwr5_mont_t4_16(BN_ULONG *tp, const BN_ULONG *np,
  778|       |            const BN_ULONG *n0, const void *table,
  779|       |            int power, int bits);
  780|       |        int bn_pwr5_mont_t4_24(BN_ULONG *tp, const BN_ULONG *np,
  781|       |            const BN_ULONG *n0, const void *table,
  782|       |            int power, int bits);
  783|       |        int bn_pwr5_mont_t4_32(BN_ULONG *tp, const BN_ULONG *np,
  784|       |            const BN_ULONG *n0, const void *table,
  785|       |            int power, int bits);
  786|       |        static const bn_pwr5_mont_f pwr5_funcs[4] = {
  787|       |            bn_pwr5_mont_t4_8, bn_pwr5_mont_t4_16,
  788|       |            bn_pwr5_mont_t4_24, bn_pwr5_mont_t4_32
  789|       |        };
  790|       |        bn_pwr5_mont_f pwr5_worker = pwr5_funcs[top / 16 - 1];
  791|       |
  792|       |        typedef int (*bn_mul_mont_f)(BN_ULONG *rp, const BN_ULONG *ap,
  793|       |            const void *bp, const BN_ULONG *np,
  794|       |            const BN_ULONG *n0);
  795|       |        int bn_mul_mont_t4_8(BN_ULONG *rp, const BN_ULONG *ap, const void *bp,
  796|       |            const BN_ULONG *np, const BN_ULONG *n0);
  797|       |        int bn_mul_mont_t4_16(BN_ULONG *rp, const BN_ULONG *ap,
  798|       |            const void *bp, const BN_ULONG *np,
  799|       |            const BN_ULONG *n0);
  800|       |        int bn_mul_mont_t4_24(BN_ULONG *rp, const BN_ULONG *ap,
  801|       |            const void *bp, const BN_ULONG *np,
  802|       |            const BN_ULONG *n0);
  803|       |        int bn_mul_mont_t4_32(BN_ULONG *rp, const BN_ULONG *ap,
  804|       |            const void *bp, const BN_ULONG *np,
  805|       |            const BN_ULONG *n0);
  806|       |        static const bn_mul_mont_f mul_funcs[4] = {
  807|       |            bn_mul_mont_t4_8, bn_mul_mont_t4_16,
  808|       |            bn_mul_mont_t4_24, bn_mul_mont_t4_32
  809|       |        };
  810|       |        bn_mul_mont_f mul_worker = mul_funcs[top / 16 - 1];
  811|       |
  812|       |        void bn_mul_mont_vis3(BN_ULONG *rp, const BN_ULONG *ap,
  813|       |            const void *bp, const BN_ULONG *np,
  814|       |            const BN_ULONG *n0, int num);
  815|       |        void bn_mul_mont_t4(BN_ULONG *rp, const BN_ULONG *ap,
  816|       |            const void *bp, const BN_ULONG *np,
  817|       |            const BN_ULONG *n0, int num);
  818|       |        void bn_mul_mont_gather5_t4(BN_ULONG *rp, const BN_ULONG *ap,
  819|       |            const void *table, const BN_ULONG *np,
  820|       |            const BN_ULONG *n0, int num, int power);
  821|       |        void bn_flip_n_scatter5_t4(const BN_ULONG *inp, size_t num,
  822|       |            void *table, size_t power);
  823|       |        void bn_gather5_t4(BN_ULONG *out, size_t num,
  824|       |            void *table, size_t power);
  825|       |        void bn_flip_t4(BN_ULONG *dst, BN_ULONG *src, size_t num);
  826|       |
  827|       |        BN_ULONG *np = mont->N.d, *n0 = mont->n0;
  828|       |        int stride = 5 * (6 - (top / 16 - 1)); /* multiple of 5, but less
  829|       |                                                * than 32 */
  830|       |
  831|       |        /*
  832|       |         * BN_to_montgomery can contaminate words above .top [in
  833|       |         * BN_DEBUG build...
  834|       |         */
  835|       |        for (i = am.top; i < top; i++)
  836|       |            am.d[i] = 0;
  837|       |        for (i = tmp.top; i < top; i++)
  838|       |            tmp.d[i] = 0;
  839|       |
  840|       |        bn_flip_n_scatter5_t4(tmp.d, top, powerbuf, 0);
  841|       |        bn_flip_n_scatter5_t4(am.d, top, powerbuf, 1);
  842|       |        if (!(*mul_worker)(tmp.d, am.d, am.d, np, n0) && !(*mul_worker)(tmp.d, am.d, am.d, np, n0))
  843|       |            bn_mul_mont_vis3(tmp.d, am.d, am.d, np, n0, top);
  844|       |        bn_flip_n_scatter5_t4(tmp.d, top, powerbuf, 2);
  845|       |
  846|       |        for (i = 3; i < 32; i++) {
  847|       |            /* Calculate a^i = a^(i-1) * a */
  848|       |            if (!(*mul_worker)(tmp.d, tmp.d, am.d, np, n0) && !(*mul_worker)(tmp.d, tmp.d, am.d, np, n0))
  849|       |                bn_mul_mont_vis3(tmp.d, tmp.d, am.d, np, n0, top);
  850|       |            bn_flip_n_scatter5_t4(tmp.d, top, powerbuf, i);
  851|       |        }
  852|       |
  853|       |        /* switch to 64-bit domain */
  854|       |        np = alloca(top * sizeof(BN_ULONG));
  855|       |        top /= 2;
  856|       |        bn_flip_t4(np, mont->N.d, top);
  857|       |
  858|       |        /*
  859|       |         * The exponent may not have a whole number of fixed-size windows.
  860|       |         * To simplify the main loop, the initial window has between 1 and
  861|       |         * full-window-size bits such that what remains is always a whole
  862|       |         * number of windows
  863|       |         */
  864|       |        window0 = (bits - 1) % 5 + 1;
  865|       |        wmask = (1 << window0) - 1;
  866|       |        bits -= window0;
  867|       |        wvalue = bn_get_bits(p, bits) & wmask;
  868|       |        bn_gather5_t4(tmp.d, top, powerbuf, wvalue);
  869|       |
  870|       |        /*
  871|       |         * Scan the exponent one window at a time starting from the most
  872|       |         * significant bits.
  873|       |         */
  874|       |        while (bits > 0) {
  875|       |            if (bits < stride)
  876|       |                stride = bits;
  877|       |            bits -= stride;
  878|       |            wvalue = bn_get_bits(p, bits);
  879|       |
  880|       |            if ((*pwr5_worker)(tmp.d, np, n0, powerbuf, wvalue, stride))
  881|       |                continue;
  882|       |            /* retry once and fall back */
  883|       |            if ((*pwr5_worker)(tmp.d, np, n0, powerbuf, wvalue, stride))
  884|       |                continue;
  885|       |
  886|       |            bits += stride - 5;
  887|       |            wvalue >>= stride - 5;
  888|       |            wvalue &= 31;
  889|       |            bn_mul_mont_t4(tmp.d, tmp.d, tmp.d, np, n0, top);
  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_gather5_t4(tmp.d, tmp.d, powerbuf, np, n0, top,
  895|       |                wvalue);
  896|       |        }
  897|       |
  898|       |        bn_flip_t4(tmp.d, tmp.d, top);
  899|       |        top *= 2;
  900|       |        /* back to 32-bit domain */
  901|       |        tmp.top = top;
  902|       |        bn_correct_top(&tmp);
  903|       |        OPENSSL_cleanse(np, top * sizeof(BN_ULONG));
  904|       |    } else
  905|       |#endif
  906|     86|#if defined(OPENSSL_BN_ASM_MONT5)
  907|     86|        if (window == 5 && top > 1) {
  ------------------
  |  Branch (907:13): [True: 56, False: 30]
  |  Branch (907:28): [True: 56, False: 0]
  ------------------
  908|       |        /*
  909|       |         * This optimization uses ideas from https://eprint.iacr.org/2011/239,
  910|       |         * specifically optimization of cache-timing attack countermeasures,
  911|       |         * pre-computation optimization, and Almost Montgomery Multiplication.
  912|       |         *
  913|       |         * The paper discusses a 4-bit window to optimize 512-bit modular
  914|       |         * exponentiation, used in RSA-1024 with CRT, but RSA-1024 is no longer
  915|       |         * important.
  916|       |         *
  917|       |         * |bn_mul_mont_gather5| and |bn_power5| implement the "almost"
  918|       |         * reduction variant, so the values here may not be fully reduced.
  919|       |         * They are bounded by R (i.e. they fit in |top| words), not |m|.
  920|       |         * Additionally, we pass these "almost" reduced inputs into
  921|       |         * |bn_mul_mont|, which implements the normal reduction variant.
  922|       |         * Given those inputs, |bn_mul_mont| may not give reduced
  923|       |         * output, but it will still produce "almost" reduced output.
  924|       |         */
  925|     56|        void bn_mul_mont_gather5(BN_ULONG *rp, const BN_ULONG *ap,
  926|     56|            const void *table, const BN_ULONG *np,
  927|     56|            const BN_ULONG *n0, int num, int power);
  928|     56|        void bn_scatter5(const BN_ULONG *inp, size_t num,
  929|     56|            void *table, size_t power);
  930|     56|        void bn_gather5(BN_ULONG *out, size_t num, void *table, size_t power);
  931|     56|        void bn_power5(BN_ULONG *rp, const BN_ULONG *ap,
  932|     56|            const void *table, const BN_ULONG *np,
  933|     56|            const BN_ULONG *n0, int num, int power);
  934|     56|        int bn_get_bits5(const BN_ULONG *ap, int off);
  935|       |
  936|     56|        BN_ULONG *n0 = mont->n0, *np;
  ------------------
  |  |   37|     56|#define BN_ULONG unsigned long
  ------------------
  937|       |
  938|       |        /*
  939|       |         * BN_to_montgomery can contaminate words above .top [in
  940|       |         * BN_DEBUG build...
  941|       |         */
  942|     56|        for (i = am.top; i < top; i++)
  ------------------
  |  Branch (942:26): [True: 0, False: 56]
  ------------------
  943|      0|            am.d[i] = 0;
  944|     56|        for (i = tmp.top; i < top; i++)
  ------------------
  |  Branch (944:27): [True: 0, False: 56]
  ------------------
  945|      0|            tmp.d[i] = 0;
  946|       |
  947|       |        /*
  948|       |         * copy mont->N.d[] to improve cache locality
  949|       |         */
  950|  5.24k|        for (np = am.d + top, i = 0; i < top; i++)
  ------------------
  |  Branch (950:38): [True: 5.18k, False: 56]
  ------------------
  951|  5.18k|            np[i] = mont->N.d[i];
  952|       |
  953|     56|        bn_scatter5(tmp.d, top, powerbuf, 0);
  954|     56|        bn_scatter5(am.d, am.top, powerbuf, 1);
  955|     56|        bn_mul_mont(tmp.d, am.d, am.d, np, n0, top);
  956|     56|        bn_scatter5(tmp.d, top, powerbuf, 2);
  957|       |
  958|       |#if 0
  959|       |        for (i = 3; i < 32; i++) {
  960|       |            /* Calculate a^i = a^(i-1) * a */
  961|       |            bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1);
  962|       |            bn_scatter5(tmp.d, top, powerbuf, i);
  963|       |        }
  964|       |#else
  965|       |        /* same as above, but uses squaring for 1/2 of operations */
  966|    224|        for (i = 4; i < 32; i *= 2) {
  ------------------
  |  Branch (966:21): [True: 168, False: 56]
  ------------------
  967|    168|            bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
  968|    168|            bn_scatter5(tmp.d, top, powerbuf, i);
  969|    168|        }
  970|    224|        for (i = 3; i < 8; i += 2) {
  ------------------
  |  Branch (970:21): [True: 168, False: 56]
  ------------------
  971|    168|            int j;
  972|    168|            bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1);
  973|    168|            bn_scatter5(tmp.d, top, powerbuf, i);
  974|    560|            for (j = 2 * i; j < 32; j *= 2) {
  ------------------
  |  Branch (974:29): [True: 392, False: 168]
  ------------------
  975|    392|                bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
  976|    392|                bn_scatter5(tmp.d, top, powerbuf, j);
  977|    392|            }
  978|    168|        }
  979|    280|        for (; i < 16; i += 2) {
  ------------------
  |  Branch (979:16): [True: 224, False: 56]
  ------------------
  980|    224|            bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1);
  981|    224|            bn_scatter5(tmp.d, top, powerbuf, i);
  982|    224|            bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
  983|    224|            bn_scatter5(tmp.d, top, powerbuf, 2 * i);
  984|    224|        }
  985|    504|        for (; i < 32; i += 2) {
  ------------------
  |  Branch (985:16): [True: 448, False: 56]
  ------------------
  986|    448|            bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1);
  987|    448|            bn_scatter5(tmp.d, top, powerbuf, i);
  988|    448|        }
  989|     56|#endif
  990|       |        /*
  991|       |         * The exponent may not have a whole number of fixed-size windows.
  992|       |         * To simplify the main loop, the initial window has between 1 and
  993|       |         * full-window-size bits such that what remains is always a whole
  994|       |         * number of windows
  995|       |         */
  996|     56|        window0 = (bits - 1) % 5 + 1;
  997|     56|        wmask = (1 << window0) - 1;
  998|     56|        bits -= window0;
  999|     56|        wvalue = bn_get_bits(p, bits) & wmask;
 1000|     56|        bn_gather5(tmp.d, top, powerbuf, wvalue);
 1001|       |
 1002|       |        /*
 1003|       |         * Scan the exponent one window at a time starting from the most
 1004|       |         * significant bits.
 1005|       |         */
 1006|     56|        if (top & 7) {
  ------------------
  |  Branch (1006:13): [True: 0, False: 56]
  ------------------
 1007|      0|            while (bits > 0) {
  ------------------
  |  Branch (1007:20): [True: 0, False: 0]
  ------------------
 1008|      0|                bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
 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_gather5(tmp.d, tmp.d, powerbuf, np, n0, top,
 1014|      0|                    bn_get_bits5(p->d, bits -= 5));
 1015|      0|            }
 1016|     56|        } else {
 1017|  4.49k|            while (bits > 0) {
  ------------------
  |  Branch (1017:20): [True: 4.43k, False: 56]
  ------------------
 1018|  4.43k|                bn_power5(tmp.d, tmp.d, powerbuf, np, n0, top,
 1019|  4.43k|                    bn_get_bits5(p->d, bits -= 5));
 1020|  4.43k|            }
 1021|     56|        }
 1022|       |
 1023|     56|        tmp.top = top;
 1024|       |        /*
 1025|       |         * The result is now in |tmp| in Montgomery form, but it may not be
 1026|       |         * fully reduced. This is within bounds for |BN_from_montgomery|
 1027|       |         * (tmp < R <= m*R) so it will, when converting from Montgomery form,
 1028|       |         * produce a fully reduced result.
 1029|       |         *
 1030|       |         * This differs from Figure 2 of the paper, which uses AMM(h, 1) to
 1031|       |         * convert from Montgomery form with unreduced output, followed by an
 1032|       |         * extra reduction step. In the paper's terminology, we replace
 1033|       |         * steps 9 and 10 with MM(h, 1).
 1034|       |         */
 1035|     56|    } else
 1036|     30|#endif
 1037|     30|    {
 1038|     30|    fallback:
 1039|     30|        if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, 0, window))
  ------------------
  |  Branch (1039:13): [True: 0, False: 30]
  ------------------
 1040|      0|            goto err;
 1041|     30|        if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&am, top, powerbuf, 1, window))
  ------------------
  |  Branch (1041:13): [True: 0, False: 30]
  ------------------
 1042|      0|            goto err;
 1043|       |
 1044|       |        /*
 1045|       |         * If the window size is greater than 1, then calculate
 1046|       |         * val[i=2..2^winsize-1]. Powers are computed as a*a^(i-1) (even
 1047|       |         * powers could instead be computed as (a^(i/2))^2 to use the slight
 1048|       |         * performance advantage of sqr over mul).
 1049|       |         */
 1050|     30|        if (window > 1) {
  ------------------
  |  Branch (1050:13): [True: 30, False: 0]
  ------------------
 1051|     30|            if (!bn_mul_mont_fixed_top(&tmp, &am, &am, mont, ctx))
  ------------------
  |  Branch (1051:17): [True: 0, False: 30]
  ------------------
 1052|      0|                goto err;
 1053|     30|            if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, 2,
  ------------------
  |  Branch (1053:17): [True: 0, False: 30]
  ------------------
 1054|     30|                    window))
 1055|      0|                goto err;
 1056|    420|            for (i = 3; i < numPowers; i++) {
  ------------------
  |  Branch (1056:25): [True: 390, False: 30]
  ------------------
 1057|       |                /* Calculate a^i = a^(i-1) * a */
 1058|    390|                if (!bn_mul_mont_fixed_top(&tmp, &am, &tmp, mont, ctx))
  ------------------
  |  Branch (1058:21): [True: 0, False: 390]
  ------------------
 1059|      0|                    goto err;
 1060|    390|                if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, i,
  ------------------
  |  Branch (1060:21): [True: 0, False: 390]
  ------------------
 1061|    390|                        window))
 1062|      0|                    goto err;
 1063|    390|            }
 1064|     30|        }
 1065|       |
 1066|       |        /*
 1067|       |         * The exponent may not have a whole number of fixed-size windows.
 1068|       |         * To simplify the main loop, the initial window has between 1 and
 1069|       |         * full-window-size bits such that what remains is always a whole
 1070|       |         * number of windows
 1071|       |         */
 1072|     30|        window0 = (bits - 1) % window + 1;
 1073|     30|        wmask = (1 << window0) - 1;
 1074|     30|        bits -= window0;
 1075|     30|        wvalue = bn_get_bits(p, bits) & wmask;
 1076|     30|        if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp, top, powerbuf, wvalue,
  ------------------
  |  Branch (1076:13): [True: 0, False: 30]
  ------------------
 1077|     30|                window))
 1078|      0|            goto err;
 1079|       |
 1080|     30|        wmask = (1 << window) - 1;
 1081|       |        /*
 1082|       |         * Scan the exponent one window at a time starting from the most
 1083|       |         * significant bits.
 1084|       |         */
 1085|  1.92k|        while (bits > 0) {
  ------------------
  |  Branch (1085:16): [True: 1.89k, False: 30]
  ------------------
 1086|       |
 1087|       |            /* Square the result window-size times */
 1088|  9.45k|            for (i = 0; i < window; i++)
  ------------------
  |  Branch (1088:25): [True: 7.56k, False: 1.89k]
  ------------------
 1089|  7.56k|                if (!bn_mul_mont_fixed_top(&tmp, &tmp, &tmp, mont, ctx))
  ------------------
  |  Branch (1089:21): [True: 0, False: 7.56k]
  ------------------
 1090|      0|                    goto err;
 1091|       |
 1092|       |            /*
 1093|       |             * Get a window's worth of bits from the exponent
 1094|       |             * This avoids calling BN_is_bit_set for each bit, which
 1095|       |             * is not only slower but also makes each bit vulnerable to
 1096|       |             * EM (and likely other) side-channel attacks like One&Done
 1097|       |             * (for details see "One&Done: A Single-Decryption EM-Based
 1098|       |             *  Attack on OpenSSL's Constant-Time Blinded RSA" by M. Alam,
 1099|       |             *  H. Khan, M. Dey, N. Sinha, R. Callan, A. Zajic, and
 1100|       |             *  M. Prvulovic, in USENIX Security'18)
 1101|       |             */
 1102|  1.89k|            bits -= window;
 1103|  1.89k|            wvalue = bn_get_bits(p, bits) & wmask;
 1104|       |            /*
 1105|       |             * Fetch the appropriate pre-computed value from the pre-buf
 1106|       |             */
 1107|  1.89k|            if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&am, top, powerbuf, wvalue,
  ------------------
  |  Branch (1107:17): [True: 0, False: 1.89k]
  ------------------
 1108|  1.89k|                    window))
 1109|      0|                goto err;
 1110|       |
 1111|       |            /* Multiply the result into the intermediate result */
 1112|  1.89k|            if (!bn_mul_mont_fixed_top(&tmp, &tmp, &am, mont, ctx))
  ------------------
  |  Branch (1112:17): [True: 0, False: 1.89k]
  ------------------
 1113|      0|                goto err;
 1114|  1.89k|        }
 1115|     30|    }
 1116|       |
 1117|       |    /*
 1118|       |     * Done with zero-padded intermediate BIGNUMs. Final BN_from_montgomery
 1119|       |     * removes padding [if any] and makes return value suitable for public
 1120|       |     * API consumer.
 1121|       |     */
 1122|       |#if defined(SPARC_T4_MONT)
 1123|       |    if (OPENSSL_sparcv9cap_P[0] & (SPARCV9_VIS3 | SPARCV9_PREFER_FPU)) {
 1124|       |        am.d[0] = 1; /* borrow am */
 1125|       |        for (i = 1; i < top; i++)
 1126|       |            am.d[i] = 0;
 1127|       |        if (!BN_mod_mul_montgomery(rr, &tmp, &am, mont, ctx))
 1128|       |            goto err;
 1129|       |    } else
 1130|       |#endif
 1131|     86|        if (!bn_from_mont_fixed_top(rr, &tmp, mont, ctx))
  ------------------
  |  Branch (1131:13): [True: 0, False: 86]
  ------------------
 1132|      0|        goto err;
 1133|     86|    ret = 1;
 1134|     86|err:
 1135|     86|    if (in_mont == NULL)
  ------------------
  |  Branch (1135:9): [True: 0, False: 86]
  ------------------
 1136|      0|        BN_MONT_CTX_free(mont);
 1137|     86|    if (powerbuf != NULL) {
  ------------------
  |  Branch (1137:9): [True: 86, False: 0]
  ------------------
 1138|     86|        OPENSSL_cleanse(powerbuf, powerbufLen);
 1139|     86|        OPENSSL_free(powerbufFree);
  ------------------
  |  |  131|     86|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1140|     86|    }
 1141|     86|    BN_CTX_end(ctx);
 1142|     86|    return ret;
 1143|     86|}
BN_mod_exp_mont_consttime:
 1148|     86|{
 1149|     86|    bn_check_top(a);
 1150|     86|    bn_check_top(p);
 1151|     86|    bn_check_top(m);
 1152|     86|    if (!bn_mod_exp_mont_fixed_top(rr, a, p, m, ctx, in_mont))
  ------------------
  |  Branch (1152:9): [True: 0, False: 86]
  ------------------
 1153|      0|        return 0;
 1154|     86|    bn_correct_top(rr);
 1155|     86|    return 1;
 1156|     86|}
bn_exp.c:bn_get_bits:
  488|  1.97k|{
  489|  1.97k|    BN_ULONG ret = 0;
  ------------------
  |  |   37|  1.97k|#define BN_ULONG unsigned long
  ------------------
  490|  1.97k|    int wordpos;
  491|       |
  492|  1.97k|    wordpos = bitpos / BN_BITS2;
  ------------------
  |  |   54|  1.97k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.97k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  493|  1.97k|    bitpos %= BN_BITS2;
  ------------------
  |  |   54|  1.97k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.97k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  494|  1.97k|    if (wordpos >= 0 && wordpos < a->top) {
  ------------------
  |  Branch (494:9): [True: 1.97k, False: 0]
  |  Branch (494:25): [True: 1.97k, False: 0]
  ------------------
  495|  1.97k|        ret = a->d[wordpos] & BN_MASK2;
  ------------------
  |  |   93|  1.97k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  496|  1.97k|        if (bitpos) {
  ------------------
  |  Branch (496:13): [True: 1.85k, False: 120]
  ------------------
  497|  1.85k|            ret >>= bitpos;
  498|  1.85k|            if (++wordpos < a->top)
  ------------------
  |  Branch (498:17): [True: 1.35k, False: 506]
  ------------------
  499|  1.35k|                ret |= a->d[wordpos] << (BN_BITS2 - bitpos);
  ------------------
  |  |   54|  1.35k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.35k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  500|  1.85k|        }
  501|  1.97k|    }
  502|       |
  503|  1.97k|    return ret & BN_MASK2;
  ------------------
  |  |   93|  1.97k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  504|  1.97k|}
bn_exp.c:MOD_EXP_CTIME_COPY_TO_PREBUF:
  516|    480|{
  517|    480|    int i, j;
  518|    480|    int width = 1 << window;
  519|    480|    BN_ULONG *table = (BN_ULONG *)buf;
  ------------------
  |  |   37|    480|#define BN_ULONG unsigned long
  ------------------
  520|       |
  521|    480|    if (top > b->top)
  ------------------
  |  Branch (521:9): [True: 0, False: 480]
  ------------------
  522|      0|        top = b->top; /* this works because 'buf' is explicitly
  523|       |                       * zeroed */
  524|  15.8k|    for (i = 0, j = idx; i < top; i++, j += width) {
  ------------------
  |  Branch (524:26): [True: 15.3k, False: 480]
  ------------------
  525|  15.3k|        table[j] = b->d[i];
  526|  15.3k|    }
  527|       |
  528|    480|    return 1;
  529|    480|}
bn_exp.c:MOD_EXP_CTIME_COPY_FROM_PREBUF:
  534|  1.92k|{
  535|  1.92k|    int i, j;
  536|  1.92k|    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|  1.92k|    volatile BN_ULONG *table = (volatile BN_ULONG *)buf;
  546|       |
  547|  1.92k|    if (bn_wexpand(b, top) == NULL)
  ------------------
  |  Branch (547:9): [True: 0, False: 1.92k]
  ------------------
  548|      0|        return 0;
  549|       |
  550|  1.92k|    if (window <= 3) {
  ------------------
  |  Branch (550:9): [True: 0, False: 1.92k]
  ------------------
  551|      0|        for (i = 0; i < top; i++, table += width) {
  ------------------
  |  Branch (551:21): [True: 0, False: 0]
  ------------------
  552|      0|            BN_ULONG acc = 0;
  ------------------
  |  |   37|      0|#define BN_ULONG unsigned long
  ------------------
  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|  1.92k|    } else {
  561|  1.92k|        int xstride = 1 << (window - 2);
  562|  1.92k|        BN_ULONG y0, y1, y2, y3;
  ------------------
  |  |   37|  1.92k|#define BN_ULONG unsigned long
  ------------------
  563|       |
  564|  1.92k|        i = idx >> (window - 2); /* equivalent of idx / xstride */
  565|  1.92k|        idx &= xstride - 1; /* equivalent of idx % xstride */
  566|       |
  567|  1.92k|        y0 = (BN_ULONG)0 - (constant_time_eq_int(i, 0) & 1);
  568|  1.92k|        y1 = (BN_ULONG)0 - (constant_time_eq_int(i, 1) & 1);
  569|  1.92k|        y2 = (BN_ULONG)0 - (constant_time_eq_int(i, 2) & 1);
  570|  1.92k|        y3 = (BN_ULONG)0 - (constant_time_eq_int(i, 3) & 1);
  571|       |
  572|  63.3k|        for (i = 0; i < top; i++, table += width) {
  ------------------
  |  Branch (572:21): [True: 61.4k, False: 1.92k]
  ------------------
  573|  61.4k|            BN_ULONG acc = 0;
  ------------------
  |  |   37|  61.4k|#define BN_ULONG unsigned long
  ------------------
  574|       |
  575|   307k|            for (j = 0; j < xstride; j++) {
  ------------------
  |  Branch (575:25): [True: 245k, False: 61.4k]
  ------------------
  576|   245k|                acc |= ((table[j + 0 * xstride] & y0) | (table[j + 1 * xstride] & y1) | (table[j + 2 * xstride] & y2) | (table[j + 3 * xstride] & y3))
  577|   245k|                    & ((BN_ULONG)0 - (constant_time_eq_int(j, idx) & 1));
  578|   245k|            }
  579|       |
  580|  61.4k|            b->d[i] = acc;
  581|  61.4k|        }
  582|  1.92k|    }
  583|       |
  584|  1.92k|    b->top = top;
  585|  1.92k|    b->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  1.92k|#define BN_FLG_FIXED_TOP 0
  ------------------
  586|  1.92k|    return 1;
  587|  1.92k|}

int_bn_mod_inverse:
  200|   108k|{
  201|   108k|    BIGNUM *A, *B, *X, *Y, *M, *D, *T, *R = NULL;
  202|   108k|    BIGNUM *ret = NULL;
  203|   108k|    int sign;
  204|       |
  205|       |    /* This is invalid input so we don't worry about constant time here */
  206|   108k|    if (BN_abs_is_word(n, 1) || BN_is_zero(n)) {
  ------------------
  |  Branch (206:9): [True: 0, False: 108k]
  |  Branch (206:33): [True: 0, False: 108k]
  ------------------
  207|      0|        *pnoinv = 1;
  208|      0|        return NULL;
  209|      0|    }
  210|       |
  211|   108k|    *pnoinv = 0;
  212|       |
  213|   108k|    if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|   108k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (213:9): [True: 0, False: 108k]
  ------------------
  214|   108k|        || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
  ------------------
  |  |   67|   108k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (214:12): [True: 0, False: 108k]
  ------------------
  215|      0|        return bn_mod_inverse_no_branch(in, a, n, ctx, pnoinv);
  216|      0|    }
  217|       |
  218|   108k|    bn_check_top(a);
  219|   108k|    bn_check_top(n);
  220|       |
  221|   108k|    BN_CTX_start(ctx);
  222|   108k|    A = BN_CTX_get(ctx);
  223|   108k|    B = BN_CTX_get(ctx);
  224|   108k|    X = BN_CTX_get(ctx);
  225|   108k|    D = BN_CTX_get(ctx);
  226|   108k|    M = BN_CTX_get(ctx);
  227|   108k|    Y = BN_CTX_get(ctx);
  228|   108k|    T = BN_CTX_get(ctx);
  229|   108k|    if (T == NULL)
  ------------------
  |  Branch (229:9): [True: 0, False: 108k]
  ------------------
  230|      0|        goto err;
  231|       |
  232|   108k|    if (in == NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 108k]
  ------------------
  233|      0|        R = BN_new();
  234|   108k|    else
  235|   108k|        R = in;
  236|   108k|    if (R == NULL)
  ------------------
  |  Branch (236:9): [True: 0, False: 108k]
  ------------------
  237|      0|        goto err;
  238|       |
  239|   108k|    if (!BN_one(X))
  ------------------
  |  |  196|   108k|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  |  Branch (239:9): [True: 0, False: 108k]
  ------------------
  240|      0|        goto err;
  241|   108k|    BN_zero(Y);
  ------------------
  |  |  201|   108k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  242|   108k|    if (BN_copy(B, a) == NULL)
  ------------------
  |  Branch (242:9): [True: 0, False: 108k]
  ------------------
  243|      0|        goto err;
  244|   108k|    if (BN_copy(A, n) == NULL)
  ------------------
  |  Branch (244:9): [True: 0, False: 108k]
  ------------------
  245|      0|        goto err;
  246|   108k|    A->neg = 0;
  247|   108k|    if (B->neg || (BN_ucmp(B, A) >= 0)) {
  ------------------
  |  Branch (247:9): [True: 0, False: 108k]
  |  Branch (247:19): [True: 108k, False: 0]
  ------------------
  248|   108k|        if (!BN_nnmod(B, B, A, ctx))
  ------------------
  |  Branch (248:13): [True: 0, False: 108k]
  ------------------
  249|      0|            goto err;
  250|   108k|    }
  251|   108k|    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|   108k|    if (BN_is_odd(n) && (BN_num_bits(n) <= 2048)) {
  ------------------
  |  Branch (260:9): [True: 108k, False: 0]
  |  Branch (260:25): [True: 108k, 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|   108k|        int shift;
  268|       |
  269|  7.03M|        while (!BN_is_zero(B)) {
  ------------------
  |  Branch (269:16): [True: 6.93M, False: 108k]
  ------------------
  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|  6.93M|            shift = 0;
  283|  10.2M|            while (!BN_is_bit_set(B, shift)) { /* note that 0 < B */
  ------------------
  |  Branch (283:20): [True: 3.35M, False: 6.93M]
  ------------------
  284|  3.35M|                shift++;
  285|       |
  286|  3.35M|                if (BN_is_odd(X)) {
  ------------------
  |  Branch (286:21): [True: 1.73M, False: 1.62M]
  ------------------
  287|  1.73M|                    if (!BN_uadd(X, X, n))
  ------------------
  |  Branch (287:25): [True: 0, False: 1.73M]
  ------------------
  288|      0|                        goto err;
  289|  1.73M|                }
  290|       |                /*
  291|       |                 * now X is even, so we can easily divide it by two
  292|       |                 */
  293|  3.35M|                if (!BN_rshift1(X, X))
  ------------------
  |  Branch (293:21): [True: 0, False: 3.35M]
  ------------------
  294|      0|                    goto err;
  295|  3.35M|            }
  296|  6.93M|            if (shift > 0) {
  ------------------
  |  Branch (296:17): [True: 3.35M, False: 3.57M]
  ------------------
  297|  3.35M|                if (!BN_rshift(B, B, shift))
  ------------------
  |  Branch (297:21): [True: 0, False: 3.35M]
  ------------------
  298|      0|                    goto err;
  299|  3.35M|            }
  300|       |
  301|       |            /*
  302|       |             * Same for A and Y.  Afterwards, (2) still holds.
  303|       |             */
  304|  6.93M|            shift = 0;
  305|  10.3M|            while (!BN_is_bit_set(A, shift)) { /* note that 0 < A */
  ------------------
  |  Branch (305:20): [True: 3.46M, False: 6.93M]
  ------------------
  306|  3.46M|                shift++;
  307|       |
  308|  3.46M|                if (BN_is_odd(Y)) {
  ------------------
  |  Branch (308:21): [True: 1.62M, False: 1.83M]
  ------------------
  309|  1.62M|                    if (!BN_uadd(Y, Y, n))
  ------------------
  |  Branch (309:25): [True: 0, False: 1.62M]
  ------------------
  310|      0|                        goto err;
  311|  1.62M|                }
  312|       |                /* now Y is even */
  313|  3.46M|                if (!BN_rshift1(Y, Y))
  ------------------
  |  Branch (313:21): [True: 0, False: 3.46M]
  ------------------
  314|      0|                    goto err;
  315|  3.46M|            }
  316|  6.93M|            if (shift > 0) {
  ------------------
  |  Branch (316:17): [True: 3.46M, False: 3.46M]
  ------------------
  317|  3.46M|                if (!BN_rshift(A, A, shift))
  ------------------
  |  Branch (317:21): [True: 0, False: 3.46M]
  ------------------
  318|      0|                    goto err;
  319|  3.46M|            }
  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|  6.93M|            if (BN_ucmp(B, A) >= 0) {
  ------------------
  |  Branch (333:17): [True: 3.46M, False: 3.46M]
  ------------------
  334|       |                /* -sign*(X + Y)*a == B - A  (mod |n|) */
  335|  3.46M|                if (!BN_uadd(X, X, Y))
  ------------------
  |  Branch (335:21): [True: 0, False: 3.46M]
  ------------------
  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|  3.46M|                if (!BN_usub(B, B, A))
  ------------------
  |  Branch (341:21): [True: 0, False: 3.46M]
  ------------------
  342|      0|                    goto err;
  343|  3.46M|            } else {
  344|       |                /*  sign*(X + Y)*a == A - B  (mod |n|) */
  345|  3.46M|                if (!BN_uadd(Y, Y, X))
  ------------------
  |  Branch (345:21): [True: 0, False: 3.46M]
  ------------------
  346|      0|                    goto err;
  347|       |                /*
  348|       |                 * as above, BN_mod_add_quick(Y, Y, X, n) would slow things down
  349|       |                 */
  350|  3.46M|                if (!BN_usub(A, A, B))
  ------------------
  |  Branch (350:21): [True: 0, False: 3.46M]
  ------------------
  351|      0|                    goto err;
  352|  3.46M|            }
  353|  6.93M|        }
  354|   108k|    } 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|   108k|    if (sign < 0) {
  ------------------
  |  Branch (486:9): [True: 108k, False: 0]
  ------------------
  487|   108k|        if (!BN_sub(Y, n, Y))
  ------------------
  |  Branch (487:13): [True: 0, False: 108k]
  ------------------
  488|      0|            goto err;
  489|   108k|    }
  490|       |    /* Now  Y*a  ==  A  (mod |n|).  */
  491|       |
  492|   108k|    if (BN_is_one(A)) {
  ------------------
  |  Branch (492:9): [True: 108k, False: 0]
  ------------------
  493|       |        /* Y*a == 1  (mod |n|) */
  494|   108k|        if (!Y->neg && BN_ucmp(Y, n) < 0) {
  ------------------
  |  Branch (494:13): [True: 86, False: 108k]
  |  Branch (494:24): [True: 86, False: 0]
  ------------------
  495|     86|            if (!BN_copy(R, Y))
  ------------------
  |  Branch (495:17): [True: 0, False: 86]
  ------------------
  496|      0|                goto err;
  497|   108k|        } else {
  498|   108k|            if (!BN_nnmod(R, Y, n, ctx))
  ------------------
  |  Branch (498:17): [True: 0, False: 108k]
  ------------------
  499|      0|                goto err;
  500|   108k|        }
  501|   108k|    } else {
  502|      0|        *pnoinv = 1;
  503|      0|        goto err;
  504|      0|    }
  505|   108k|    ret = R;
  506|   108k|err:
  507|   108k|    if ((ret == NULL) && (in == NULL))
  ------------------
  |  Branch (507:9): [True: 0, False: 108k]
  |  Branch (507:26): [True: 0, False: 0]
  ------------------
  508|      0|        BN_free(R);
  509|   108k|    BN_CTX_end(ctx);
  510|   108k|    bn_check_top(ret);
  511|   108k|    return ret;
  512|   108k|}
BN_mod_inverse:
  517|   108k|{
  518|   108k|    BN_CTX *new_ctx = NULL;
  519|   108k|    BIGNUM *rv;
  520|   108k|    int noinv = 0;
  521|       |
  522|   108k|    if (ctx == NULL) {
  ------------------
  |  Branch (522:9): [True: 0, False: 108k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  526|      0|            return NULL;
  527|      0|        }
  528|      0|    }
  529|       |
  530|   108k|    rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
  531|   108k|    if (noinv)
  ------------------
  |  Branch (531:9): [True: 0, False: 108k]
  ------------------
  532|       |        ERR_raise(ERR_LIB_BN, BN_R_NO_INVERSE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  533|   108k|    BN_CTX_free(new_ctx);
  534|   108k|    return rv;
  535|   108k|}

bn_get_top:
  138|  1.86k|{
  139|  1.86k|    return a->top;
  140|  1.86k|}
bn_copy_words:
  156|    429|{
  157|    429|    if (in->top > size)
  ------------------
  |  Branch (157:9): [True: 0, False: 429]
  ------------------
  158|      0|        return 0;
  159|       |
  160|    429|    memset(out, 0, sizeof(*out) * size);
  161|    429|    if (in->d != NULL)
  ------------------
  |  Branch (161:9): [True: 429, False: 0]
  ------------------
  162|    429|        memcpy(out, in->d, sizeof(*out) * in->top);
  163|    429|    return 1;
  164|    429|}
bn_get_words:
  167|  1.14k|{
  168|  1.14k|    return a->d;
  169|  1.14k|}
bn_set_words:
  185|    715|{
  186|    715|    if (bn_wexpand(a, num_words) == NULL) {
  ------------------
  |  Branch (186:9): [True: 0, False: 715]
  ------------------
  187|      0|        ERR_raise(ERR_LIB_BN, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  188|      0|        return 0;
  189|      0|    }
  190|       |
  191|    715|    memcpy(a->d, words, sizeof(BN_ULONG) * num_words);
  192|    715|    a->top = num_words;
  193|    715|    bn_correct_top(a);
  194|    715|    return 1;
  195|    715|}

BN_value_one:
   83|   251k|{
   84|   251k|    static const BN_ULONG data_one = 1L;
   85|   251k|    static const BIGNUM const_one = {
   86|   251k|        (BN_ULONG *)&data_one, 1, 1, 0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|   251k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
   87|   251k|    };
   88|       |
   89|   251k|    return &const_one;
   90|   251k|}
BN_num_bits_word:
  102|  4.25M|{
  103|  4.25M|    BN_ULONG x, mask;
  ------------------
  |  |   37|  4.25M|#define BN_ULONG unsigned long
  ------------------
  104|  4.25M|    int bits = (l != 0);
  105|       |
  106|  4.25M|#if BN_BITS2 > 32
  107|  4.25M|    x = l >> 32;
  108|  4.25M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  4.25M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  109|  4.25M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.25M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.25M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  110|  4.25M|    bits += 32 & mask;
  111|  4.25M|    l ^= (x ^ l) & mask;
  112|  4.25M|#endif
  113|       |
  114|  4.25M|    x = l >> 16;
  115|  4.25M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  4.25M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  116|  4.25M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.25M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.25M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  117|  4.25M|    bits += 16 & mask;
  118|  4.25M|    l ^= (x ^ l) & mask;
  119|       |
  120|  4.25M|    x = l >> 8;
  121|  4.25M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  4.25M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  122|  4.25M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.25M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.25M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  123|  4.25M|    bits += 8 & mask;
  124|  4.25M|    l ^= (x ^ l) & mask;
  125|       |
  126|  4.25M|    x = l >> 4;
  127|  4.25M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  4.25M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  128|  4.25M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.25M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.25M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  129|  4.25M|    bits += 4 & mask;
  130|  4.25M|    l ^= (x ^ l) & mask;
  131|       |
  132|  4.25M|    x = l >> 2;
  133|  4.25M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  4.25M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  134|  4.25M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.25M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.25M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  135|  4.25M|    bits += 2 & mask;
  136|  4.25M|    l ^= (x ^ l) & mask;
  137|       |
  138|  4.25M|    x = l >> 1;
  139|  4.25M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  4.25M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  140|  4.25M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.25M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.25M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  141|  4.25M|    bits += 1 & mask;
  142|       |
  143|  4.25M|    return bits;
  144|  4.25M|}
BN_num_bits:
  179|  2.84M|{
  180|  2.84M|    int i = a->top - 1;
  181|  2.84M|    bn_check_top(a);
  182|       |
  183|  2.84M|    if (a->flags & BN_FLG_CONSTTIME) {
  ------------------
  |  |   67|  2.84M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (183:9): [True: 1.43k, False: 2.84M]
  ------------------
  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.43k|        return bn_num_bits_consttime(a);
  194|  1.43k|    }
  195|       |
  196|  2.84M|    if (ossl_unlikely(BN_is_zero(a)))
  ------------------
  |  |   23|  2.84M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.84M]
  |  |  ------------------
  ------------------
  197|      0|        return 0;
  198|       |
  199|  2.84M|    return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
  ------------------
  |  |   54|  2.84M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.84M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  200|  2.84M|}
BN_clear_free:
  213|  5.66M|{
  214|  5.66M|    if (a == NULL)
  ------------------
  |  Branch (214:9): [True: 2.03M, False: 3.63M]
  ------------------
  215|  2.03M|        return;
  216|  3.63M|    if (a->d != NULL && !BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  3.37M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (216:9): [True: 3.37M, False: 264k]
  |  Branch (216:25): [True: 3.37M, False: 86]
  ------------------
  217|  3.37M|        bn_free_d(a, 1);
  218|  3.63M|    if (BN_get_flags(a, BN_FLG_MALLOCED)) {
  ------------------
  |  |   58|  3.63M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (218:9): [True: 1.71k, False: 3.63M]
  ------------------
  219|  1.71k|        OPENSSL_cleanse(a, sizeof(*a));
  220|  1.71k|        OPENSSL_free(a);
  ------------------
  |  |  131|  1.71k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  221|  1.71k|    }
  222|  3.63M|}
BN_free:
  225|  4.29M|{
  226|  4.29M|    if (a == NULL)
  ------------------
  |  Branch (226:9): [True: 278k, False: 4.02M]
  ------------------
  227|   278k|        return;
  228|  4.02M|    if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  4.02M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (228:9): [True: 4.02M, False: 258]
  ------------------
  229|  4.02M|        bn_free_d(a, 0);
  230|  4.02M|    if (a->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|  4.02M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (230:9): [True: 4.02M, False: 258]
  ------------------
  231|  4.02M|        OPENSSL_free(a);
  ------------------
  |  |  131|  4.02M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  232|  4.02M|}
bn_init:
  235|  6.48M|{
  236|  6.48M|    static BIGNUM nilbn;
  237|       |
  238|  6.48M|    *a = nilbn;
  239|  6.48M|    bn_check_top(a);
  240|  6.48M|}
BN_new:
  243|  4.02M|{
  244|  4.02M|    BIGNUM *ret;
  245|       |
  246|  4.02M|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  108|  4.02M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (246:9): [True: 0, False: 4.02M]
  ------------------
  247|      0|        return NULL;
  248|  4.02M|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|  4.02M|#define BN_FLG_MALLOCED 0x01
  ------------------
  249|  4.02M|    bn_check_top(ret);
  250|  4.02M|    return ret;
  251|  4.02M|}
BN_secure_new:
  254|    680|{
  255|    680|    BIGNUM *ret = BN_new();
  256|       |
  257|    680|    if (ret != NULL)
  ------------------
  |  Branch (257:9): [True: 680, False: 0]
  ------------------
  258|    680|        ret->flags |= BN_FLG_SECURE;
  ------------------
  |  |   68|    680|#define BN_FLG_SECURE 0x08
  ------------------
  259|    680|    return ret;
  260|    680|}
bn_expand2:
  299|  9.26M|{
  300|  9.26M|    if (ossl_likely(words > b->dmax)) {
  ------------------
  |  |   22|  9.26M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 9.26M, False: 0]
  |  |  ------------------
  ------------------
  301|  9.26M|        BN_ULONG *a = bn_expand_internal(b, words);
  ------------------
  |  |   37|  9.26M|#define BN_ULONG unsigned long
  ------------------
  302|       |
  303|  9.26M|        if (ossl_unlikely(!a))
  ------------------
  |  |   23|  9.26M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 9.26M]
  |  |  ------------------
  ------------------
  304|      0|            return NULL;
  305|  9.26M|        if (b->d != NULL)
  ------------------
  |  Branch (305:13): [True: 1.87M, False: 7.39M]
  ------------------
  306|  1.87M|            bn_free_d(b, 1);
  307|  9.26M|        b->d = a;
  308|  9.26M|        b->dmax = words;
  309|  9.26M|    }
  310|       |
  311|  9.26M|    return b;
  312|  9.26M|}
BN_dup:
  315|  12.9k|{
  316|  12.9k|    BIGNUM *t;
  317|       |
  318|  12.9k|    if (a == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 12.9k]
  ------------------
  319|      0|        return NULL;
  320|  12.9k|    bn_check_top(a);
  321|       |
  322|  12.9k|    t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
  ------------------
  |  |   68|  12.9k|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (322:9): [True: 0, False: 12.9k]
  ------------------
  323|  12.9k|    if (t == NULL)
  ------------------
  |  Branch (323:9): [True: 0, False: 12.9k]
  ------------------
  324|      0|        return NULL;
  325|  12.9k|    if (!BN_copy(t, a)) {
  ------------------
  |  Branch (325:9): [True: 0, False: 12.9k]
  ------------------
  326|      0|        BN_free(t);
  327|      0|        return NULL;
  328|      0|    }
  329|  12.9k|    bn_check_top(t);
  330|  12.9k|    return t;
  331|  12.9k|}
BN_copy:
  334|  4.28M|{
  335|  4.28M|    int bn_words;
  336|       |
  337|  4.28M|    bn_check_top(b);
  338|       |
  339|  4.28M|    bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top;
  ------------------
  |  |   67|  4.28M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (339:16): [True: 867, False: 4.28M]
  ------------------
  340|       |
  341|  4.28M|    if (ossl_unlikely(a == b))
  ------------------
  |  |   23|  4.28M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.28M]
  |  |  ------------------
  ------------------
  342|      0|        return a;
  343|  4.28M|    if (ossl_unlikely(bn_wexpand(a, bn_words) == NULL))
  ------------------
  |  |   23|  4.28M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.28M]
  |  |  ------------------
  ------------------
  344|      0|        return NULL;
  345|       |
  346|  4.28M|    if (ossl_likely(b->top > 0))
  ------------------
  |  |   22|  4.28M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.15M, False: 132k]
  |  |  ------------------
  ------------------
  347|  4.15M|        memcpy(a->d, b->d, sizeof(b->d[0]) * bn_words);
  348|       |
  349|  4.28M|    a->neg = b->neg;
  350|  4.28M|    a->top = b->top;
  351|  4.28M|    a->flags |= b->flags & BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  4.28M|#define BN_FLG_FIXED_TOP 0
  ------------------
  352|  4.28M|    bn_check_top(a);
  353|  4.28M|    return a;
  354|  4.28M|}
BN_set_word:
  415|   240k|{
  416|   240k|    bn_check_top(a);
  417|   240k|    if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  ------------------
  |  Branch (417:9): [True: 0, False: 240k]
  ------------------
  418|      0|        return 0;
  419|   240k|    a->neg = 0;
  420|   240k|    a->d[0] = w;
  421|   240k|    a->top = (w ? 1 : 0);
  ------------------
  |  Branch (421:15): [True: 240k, False: 0]
  ------------------
  422|   240k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|   240k|#define BN_FLG_FIXED_TOP 0
  ------------------
  423|   240k|    bn_check_top(a);
  424|   240k|    return 1;
  425|   240k|}
BN_bin2bn:
  535|  1.94M|{
  536|  1.94M|    return bin2bn(s, len, ret, BIG, UNSIGNED);
  537|  1.94M|}
BN_bn2binpad:
  628|     86|{
  629|     86|    if (tolen < 0)
  ------------------
  |  Branch (629:9): [True: 0, False: 86]
  ------------------
  630|      0|        return -1;
  631|     86|    return bn2binpad(a, to, tolen, BIG, UNSIGNED);
  632|     86|}
BN_bn2bin:
  642|  1.18k|{
  643|  1.18k|    return bn2binpad(a, to, -1, BIG, UNSIGNED);
  644|  1.18k|}
BN_lebin2bn:
  647|  1.29k|{
  648|  1.29k|    return bin2bn(s, len, ret, LITTLE, UNSIGNED);
  649|  1.29k|}
BN_bn2lebinpad:
  657|    648|{
  658|    648|    if (tolen < 0)
  ------------------
  |  Branch (658:9): [True: 0, False: 648]
  ------------------
  659|      0|        return -1;
  660|    648|    return bn2binpad(a, to, tolen, LITTLE, UNSIGNED);
  661|    648|}
BN_ucmp:
  707|  10.2M|{
  708|  10.2M|    int i;
  709|  10.2M|    BN_ULONG t1, t2, *ap, *bp;
  ------------------
  |  |   37|  10.2M|#define BN_ULONG unsigned long
  ------------------
  710|       |
  711|  10.2M|    ap = a->d;
  712|  10.2M|    bp = b->d;
  713|       |
  714|  10.2M|    if (BN_get_flags(a, BN_FLG_CONSTTIME)
  ------------------
  |  |   67|  10.2M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (714:9): [True: 117k, False: 10.1M]
  ------------------
  715|   117k|        && a->top == b->top) {
  ------------------
  |  Branch (715:12): [True: 117k, False: 463]
  ------------------
  716|   117k|        int res = 0;
  717|       |
  718|   907k|        for (i = 0; i < b->top; i++) {
  ------------------
  |  Branch (718:21): [True: 790k, False: 117k]
  ------------------
  719|   790k|            res = constant_time_select_int((int)constant_time_lt_bn(ap[i], bp[i]),
  720|   790k|                -1, res);
  721|   790k|            res = constant_time_select_int((int)constant_time_lt_bn(bp[i], ap[i]),
  722|   790k|                1, res);
  723|   790k|        }
  724|   117k|        return res;
  725|   117k|    }
  726|       |
  727|  10.1M|    bn_check_top(a);
  728|  10.1M|    bn_check_top(b);
  729|       |
  730|  10.1M|    i = a->top - b->top;
  731|  10.1M|    if (i != 0)
  ------------------
  |  Branch (731:9): [True: 940k, False: 9.22M]
  ------------------
  732|   940k|        return i;
  733|       |
  734|  10.7M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (734:26): [True: 10.3M, False: 347k]
  ------------------
  735|  10.3M|        t1 = ap[i];
  736|  10.3M|        t2 = bp[i];
  737|  10.3M|        if (t1 != t2)
  ------------------
  |  Branch (737:13): [True: 8.87M, False: 1.49M]
  ------------------
  738|  8.87M|            return ((t1 > t2) ? 1 : -1);
  ------------------
  |  Branch (738:21): [True: 3.83M, False: 5.03M]
  ------------------
  739|  10.3M|    }
  740|   347k|    return 0;
  741|  9.22M|}
BN_cmp:
  744|   888k|{
  745|   888k|    int i;
  746|   888k|    int gt, lt;
  747|   888k|    BN_ULONG t1, t2;
  ------------------
  |  |   37|   888k|#define BN_ULONG unsigned long
  ------------------
  748|       |
  749|   888k|    if ((a == NULL) || (b == NULL)) {
  ------------------
  |  Branch (749:9): [True: 0, False: 888k]
  |  Branch (749:24): [True: 0, False: 888k]
  ------------------
  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|   888k|    bn_check_top(a);
  759|   888k|    bn_check_top(b);
  760|       |
  761|   888k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (761:9): [True: 0, False: 888k]
  ------------------
  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|   888k|    if (a->neg == 0) {
  ------------------
  |  Branch (767:9): [True: 888k, False: 0]
  ------------------
  768|   888k|        gt = 1;
  769|   888k|        lt = -1;
  770|   888k|    } else {
  771|      0|        gt = -1;
  772|      0|        lt = 1;
  773|      0|    }
  774|       |
  775|   888k|    if (a->top > b->top)
  ------------------
  |  Branch (775:9): [True: 77.8k, False: 810k]
  ------------------
  776|  77.8k|        return gt;
  777|   810k|    if (a->top < b->top)
  ------------------
  |  Branch (777:9): [True: 86, False: 810k]
  ------------------
  778|     86|        return lt;
  779|  3.44M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (779:26): [True: 3.00M, False: 443k]
  ------------------
  780|  3.00M|        t1 = a->d[i];
  781|  3.00M|        t2 = b->d[i];
  782|  3.00M|        if (t1 > t2)
  ------------------
  |  Branch (782:13): [True: 133k, False: 2.86M]
  ------------------
  783|   133k|            return gt;
  784|  2.86M|        if (t1 < t2)
  ------------------
  |  Branch (784:13): [True: 234k, False: 2.63M]
  ------------------
  785|   234k|            return lt;
  786|  2.86M|    }
  787|   443k|    return 0;
  788|   810k|}
BN_set_bit:
  791|   216k|{
  792|   216k|    int i, j, k;
  793|       |
  794|   216k|    if (n < 0)
  ------------------
  |  Branch (794:9): [True: 0, False: 216k]
  ------------------
  795|      0|        return 0;
  796|       |
  797|   216k|    i = n / BN_BITS2;
  ------------------
  |  |   54|   216k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   216k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  798|   216k|    j = n % BN_BITS2;
  ------------------
  |  |   54|   216k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   216k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  799|   216k|    if (a->top <= i) {
  ------------------
  |  Branch (799:9): [True: 216k, False: 0]
  ------------------
  800|   216k|        if (bn_wexpand(a, i + 1) == NULL)
  ------------------
  |  Branch (800:13): [True: 0, False: 216k]
  ------------------
  801|      0|            return 0;
  802|  1.85M|        for (k = a->top; k < i + 1; k++)
  ------------------
  |  Branch (802:26): [True: 1.63M, False: 216k]
  ------------------
  803|  1.63M|            a->d[k] = 0;
  804|   216k|        a->top = i + 1;
  805|   216k|        a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|   216k|#define BN_FLG_FIXED_TOP 0
  ------------------
  806|   216k|    }
  807|       |
  808|   216k|    a->d[i] |= (((BN_ULONG)1) << j);
  809|   216k|    bn_check_top(a);
  810|   216k|    return 1;
  811|   216k|}
BN_is_bit_set:
  832|  20.9M|{
  833|  20.9M|    int i, j;
  834|       |
  835|  20.9M|    bn_check_top(a);
  836|  20.9M|    if (ossl_unlikely(n < 0))
  ------------------
  |  |   23|  20.9M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 20.9M]
  |  |  ------------------
  ------------------
  837|      0|        return 0;
  838|  20.9M|    i = n / BN_BITS2;
  ------------------
  |  |   54|  20.9M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  20.9M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  839|  20.9M|    j = n % BN_BITS2;
  ------------------
  |  |   54|  20.9M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  20.9M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  840|  20.9M|    if (ossl_unlikely(a->top <= i))
  ------------------
  |  |   23|  20.9M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 171, False: 20.9M]
  |  |  ------------------
  ------------------
  841|    171|        return 0;
  842|  20.9M|    return (int)(((a->d[i]) >> j) & ((BN_ULONG)1));
  843|  20.9M|}
BN_set_negative:
  878|   120k|{
  879|   120k|    if (b && !BN_is_zero(a))
  ------------------
  |  Branch (879:9): [True: 0, False: 120k]
  |  Branch (879:14): [True: 0, False: 0]
  ------------------
  880|      0|        a->neg = 1;
  881|   120k|    else
  882|   120k|        a->neg = 0;
  883|   120k|}
BN_consttime_swap:
  943|   349k|{
  944|   349k|    BN_ULONG t;
  ------------------
  |  |   37|   349k|#define BN_ULONG unsigned long
  ------------------
  945|   349k|    int i;
  946|       |
  947|   349k|    bn_wcheck_size(a, nwords);
  948|   349k|    bn_wcheck_size(b, nwords);
  949|       |
  950|   349k|    condition = ((~condition & ((condition - 1))) >> (BN_BITS2 - 1)) - 1;
  ------------------
  |  |   54|   349k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   349k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  951|       |
  952|   349k|    t = (a->top ^ b->top) & condition;
  953|   349k|    a->top ^= t;
  954|   349k|    b->top ^= t;
  955|       |
  956|   349k|    t = (a->neg ^ b->neg) & condition;
  957|   349k|    a->neg ^= t;
  958|   349k|    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|   349k|#define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  983|       |
  984|   349k|    t = ((a->flags ^ b->flags) & BN_CONSTTIME_SWAP_FLAGS) & condition;
  ------------------
  |  |  982|   349k|#define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  |  |  ------------------
  |  |  |  |   67|   349k|#define BN_FLG_CONSTTIME 0x04
  |  |  ------------------
  |  |               #define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  |  |  ------------------
  |  |  |  |  221|   349k|#define BN_FLG_FIXED_TOP 0
  |  |  ------------------
  ------------------
  985|   349k|    a->flags ^= t;
  986|   349k|    b->flags ^= t;
  987|       |
  988|       |    /* conditionally swap the data */
  989|  2.69M|    for (i = 0; i < nwords; i++) {
  ------------------
  |  Branch (989:17): [True: 2.35M, False: 349k]
  ------------------
  990|  2.35M|        t = (a->d[i] ^ b->d[i]) & condition;
  991|  2.35M|        a->d[i] ^= t;
  992|  2.35M|        b->d[i] ^= t;
  993|  2.35M|    }
  994|   349k|}
BN_security_bits:
 1001|     86|{
 1002|     86|    int secbits, bits;
 1003|     86|    if (L >= 15360)
  ------------------
  |  Branch (1003:9): [True: 0, False: 86]
  ------------------
 1004|      0|        secbits = 256;
 1005|     86|    else if (L >= 7680)
  ------------------
  |  Branch (1005:14): [True: 22, False: 64]
  ------------------
 1006|     22|        secbits = 192;
 1007|     64|    else if (L >= 3072)
  ------------------
  |  Branch (1007:14): [True: 34, False: 30]
  ------------------
 1008|     34|        secbits = 128;
 1009|     30|    else if (L >= 2048)
  ------------------
  |  Branch (1009:14): [True: 30, False: 0]
  ------------------
 1010|     30|        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|     86|    if (N == -1)
  ------------------
  |  Branch (1015:9): [True: 0, False: 86]
  ------------------
 1016|      0|        return secbits;
 1017|     86|    bits = N / 2;
 1018|     86|    if (bits < 80)
  ------------------
  |  Branch (1018:9): [True: 0, False: 86]
  ------------------
 1019|      0|        return 0;
 1020|     86|    return bits >= secbits ? secbits : bits;
  ------------------
  |  Branch (1020:12): [True: 86, False: 0]
  ------------------
 1021|     86|}
BN_zero_ex:
 1024|  9.77M|{
 1025|  9.77M|    a->neg = 0;
 1026|  9.77M|    a->top = 0;
 1027|  9.77M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  9.77M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1028|  9.77M|}
BN_abs_is_word:
 1031|   565k|{
 1032|   565k|    return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));
  ------------------
  |  Branch (1032:13): [True: 565k, False: 162]
  |  Branch (1032:30): [True: 348k, False: 216k]
  |  Branch (1032:50): [True: 0, False: 216k]
  |  Branch (1032:62): [True: 0, False: 0]
  ------------------
 1033|   565k|}
BN_is_zero:
 1036|  19.2M|{
 1037|  19.2M|    return a->top == 0;
 1038|  19.2M|}
BN_is_one:
 1041|   457k|{
 1042|   457k|    return BN_abs_is_word(a, 1) && !a->neg;
  ------------------
  |  Branch (1042:12): [True: 348k, False: 108k]
  |  Branch (1042:36): [True: 348k, False: 0]
  ------------------
 1043|   457k|}
BN_is_odd:
 1067|  7.16M|{
 1068|  7.16M|    return (a->top > 0) && (a->d[0] & 1);
  ------------------
  |  Branch (1068:12): [True: 7.16M, False: 0]
  |  Branch (1068:28): [True: 3.69M, False: 3.46M]
  ------------------
 1069|  7.16M|}
BN_is_negative:
 1072|  1.21M|{
 1073|  1.21M|    return (a->neg != 0);
 1074|  1.21M|}
BN_to_montgomery:
 1078|  86.6k|{
 1079|  86.6k|    return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
 1080|  86.6k|}
BN_with_flags:
 1083|     86|{
 1084|     86|    dest->d = b->d;
 1085|     86|    dest->top = b->top;
 1086|     86|    dest->dmax = b->dmax;
 1087|     86|    dest->neg = b->neg;
 1088|     86|    dest->flags = ((dest->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|     86|#define BN_FLG_MALLOCED 0x01
  ------------------
 1089|     86|        | (b->flags & ~BN_FLG_MALLOCED)
  ------------------
  |  |   58|     86|#define BN_FLG_MALLOCED 0x01
  ------------------
 1090|     86|        | BN_FLG_STATIC_DATA | flags);
  ------------------
  |  |   59|     86|#define BN_FLG_STATIC_DATA 0x02
  ------------------
 1091|     86|}
BN_GENCB_free:
 1104|     86|{
 1105|     86|    if (cb == NULL)
  ------------------
  |  Branch (1105:9): [True: 86, False: 0]
  ------------------
 1106|     86|        return;
 1107|      0|    OPENSSL_free(cb);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1108|      0|}
BN_set_flags:
 1111|  15.0k|{
 1112|  15.0k|    b->flags |= n;
 1113|  15.0k|}
BN_get_flags:
 1116|  53.8M|{
 1117|  53.8M|    return b->flags & n;
 1118|  53.8M|}
bn_wexpand:
 1146|  35.8M|{
 1147|  35.8M|    return (words <= a->dmax) ? a : bn_expand2(a, words);
  ------------------
  |  Branch (1147:12): [True: 26.7M, False: 9.14M]
  ------------------
 1148|  35.8M|}
bn_correct_top:
 1173|  15.4M|{
 1174|  15.4M|    BN_ULONG *ftl;
  ------------------
  |  |   37|  15.4M|#define BN_ULONG unsigned long
  ------------------
 1175|  15.4M|    int tmp_top = a->top;
 1176|       |
 1177|  15.4M|    if (ossl_likely(tmp_top > 0)) {
  ------------------
  |  |   22|  15.4M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 15.4M, False: 0]
  |  |  ------------------
  ------------------
 1178|  16.9M|        for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
  ------------------
  |  Branch (1178:38): [True: 16.9M, False: 0]
  ------------------
 1179|  16.9M|            ftl--;
 1180|  16.9M|            if (*ftl != 0)
  ------------------
  |  Branch (1180:17): [True: 15.4M, False: 1.55M]
  ------------------
 1181|  15.4M|                break;
 1182|  16.9M|        }
 1183|  15.4M|        a->top = tmp_top;
 1184|  15.4M|    }
 1185|  15.4M|    if (a->top == 0)
  ------------------
  |  Branch (1185:9): [True: 0, False: 15.4M]
  ------------------
 1186|      0|        a->neg = 0;
 1187|  15.4M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  15.4M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1188|  15.4M|    bn_pollute(a);
 1189|  15.4M|}
bn_lib.c:bn_num_bits_consttime:
  154|  1.43k|{
  155|  1.43k|    int j, ret;
  156|  1.43k|    unsigned int mask, past_i;
  157|  1.43k|    int i = a->top - 1;
  158|  1.43k|    bn_check_top(a);
  159|       |
  160|  11.7k|    for (j = 0, past_i = 0, ret = 0; j < a->dmax; j++) {
  ------------------
  |  Branch (160:38): [True: 10.2k, False: 1.43k]
  ------------------
  161|  10.2k|        mask = constant_time_eq_int(i, j); /* 0xff..ff if i==j, 0x0 otherwise */
  162|       |
  163|  10.2k|        ret += BN_BITS2 & (~mask & ~past_i);
  ------------------
  |  |   54|  10.2k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  10.2k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  164|  10.2k|        ret += BN_num_bits_word(a->d[j]) & mask;
  165|       |
  166|  10.2k|        past_i |= mask; /* past_i will become 0xff..ff after i==j */
  167|  10.2k|    }
  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.43k|    mask = ~(constant_time_eq_int(i, ((int)-1)));
  174|       |
  175|  1.43k|    return ret & mask;
  176|  1.43k|}
bn_lib.c:bn_free_d:
  203|  9.26M|{
  204|  9.26M|    if (BN_get_flags(a, BN_FLG_SECURE))
  ------------------
  |  |   68|  9.26M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (204:9): [True: 12.3k, False: 9.25M]
  ------------------
  205|  12.3k|        OPENSSL_secure_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  149|  12.3k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  206|  9.25M|    else if (clear != 0)
  ------------------
  |  Branch (206:14): [True: 5.23M, False: 4.02M]
  ------------------
  207|  5.23M|        OPENSSL_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  129|  5.23M|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|  4.02M|    else
  209|  4.02M|        OPENSSL_free(a->d);
  ------------------
  |  |  131|  4.02M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  210|  9.26M|}
bn_lib.c:bn_expand_internal:
  265|  9.26M|{
  266|  9.26M|    BN_ULONG *a = NULL;
  ------------------
  |  |   37|  9.26M|#define BN_ULONG unsigned long
  ------------------
  267|       |
  268|  9.26M|    if (ossl_unlikely(words > (INT_MAX / (4 * BN_BITS2)))) {
  ------------------
  |  |   23|  9.26M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 9.26M]
  |  |  ------------------
  ------------------
  269|      0|        ERR_raise(ERR_LIB_BN, BN_R_BIGNUM_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return NULL;
  271|      0|    }
  272|  9.26M|    if (ossl_unlikely(BN_get_flags(b, BN_FLG_STATIC_DATA))) {
  ------------------
  |  |   23|  9.26M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 9.26M]
  |  |  ------------------
  ------------------
  273|      0|        ERR_raise(ERR_LIB_BN, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  274|      0|        return NULL;
  275|      0|    }
  276|  9.26M|    if (BN_get_flags(b, BN_FLG_SECURE))
  ------------------
  |  |   68|  9.26M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (276:9): [True: 12.3k, False: 9.25M]
  ------------------
  277|  12.3k|        a = OPENSSL_secure_calloc(words, sizeof(*a));
  ------------------
  |  |  145|  12.3k|    CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  278|  9.25M|    else
  279|  9.25M|        a = OPENSSL_calloc(words, sizeof(*a));
  ------------------
  |  |  112|  9.25M|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  280|  9.26M|    if (ossl_unlikely(a == NULL))
  ------------------
  |  |   23|  9.26M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 9.26M]
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|       |
  283|  9.26M|    assert(b->top <= words);
  ------------------
  |  Branch (283:5): [True: 0, False: 9.26M]
  |  Branch (283:5): [True: 9.26M, False: 0]
  ------------------
  284|  9.26M|    if (b->top > 0)
  ------------------
  |  Branch (284:9): [True: 448k, False: 8.82M]
  ------------------
  285|   448k|        memcpy(a, b->d, sizeof(*a) * b->top);
  286|       |
  287|  9.26M|    return a;
  288|  9.26M|}
bn_lib.c:bin2bn:
  434|  1.94M|{
  435|  1.94M|    int inc;
  436|  1.94M|    const unsigned char *s2;
  437|  1.94M|    int inc2;
  438|  1.94M|    int neg = 0, xor = 0, carry = 0;
  439|  1.94M|    unsigned int i;
  440|  1.94M|    unsigned int n;
  441|  1.94M|    BIGNUM *bn = NULL;
  442|       |
  443|       |    /* Negative length is not acceptable */
  444|  1.94M|    if (len < 0)
  ------------------
  |  Branch (444:9): [True: 0, False: 1.94M]
  ------------------
  445|      0|        return NULL;
  446|       |
  447|  1.94M|    if (ret == NULL)
  ------------------
  |  Branch (447:9): [True: 720k, False: 1.22M]
  ------------------
  448|   720k|        ret = bn = BN_new();
  449|  1.94M|    if (ret == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 1.94M]
  ------------------
  450|      0|        return NULL;
  451|  1.94M|    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|  1.94M|    if (len == 0) {
  ------------------
  |  Branch (457:9): [True: 0, False: 1.94M]
  ------------------
  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|  1.94M|    if (endianness == LITTLE) {
  ------------------
  |  Branch (467:9): [True: 1.29k, False: 1.94M]
  ------------------
  468|  1.29k|        s2 = s + len - 1;
  469|  1.29k|        inc2 = -1;
  470|  1.29k|        inc = 1;
  471|  1.94M|    } else {
  472|  1.94M|        s2 = s;
  473|  1.94M|        inc2 = 1;
  474|  1.94M|        inc = -1;
  475|  1.94M|        s += len - 1;
  476|  1.94M|    }
  477|       |
  478|       |    /* Take note of the signedness of the input bytes*/
  479|  1.94M|    if (signedness == SIGNED) {
  ------------------
  |  Branch (479:9): [True: 0, False: 1.94M]
  ------------------
  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.30M|    for (; len > 0 && *s2 == xor; s2 += inc2, len--)
  ------------------
  |  Branch (489:12): [True: 2.30M, False: 0]
  |  Branch (489:23): [True: 365k, False: 1.94M]
  ------------------
  490|   365k|        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|  1.94M|    if (xor == 0xff) {
  ------------------
  |  Branch (497:9): [True: 0, False: 1.94M]
  ------------------
  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|  1.94M|    if (len == 0) {
  ------------------
  |  Branch (502:9): [True: 0, False: 1.94M]
  ------------------
  503|      0|        ret->top = 0;
  504|      0|        return ret;
  505|      0|    }
  506|  1.94M|    n = ((len - 1) / BN_BYTES) + 1; /* Number of resulting bignum chunks */
  ------------------
  |  |   38|  1.94M|#define BN_BYTES 8
  ------------------
  507|  1.94M|    if (bn_wexpand(ret, (int)n) == NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 1.94M]
  ------------------
  508|      0|        BN_free(bn);
  509|      0|        return NULL;
  510|      0|    }
  511|  1.94M|    ret->top = n;
  512|  1.94M|    ret->neg = neg;
  513|  26.0M|    for (i = 0; n-- > 0; i++) {
  ------------------
  |  Branch (513:17): [True: 24.0M, False: 1.94M]
  ------------------
  514|  24.0M|        BN_ULONG l = 0; /* Accumulator */
  ------------------
  |  |   37|  24.0M|#define BN_ULONG unsigned long
  ------------------
  515|  24.0M|        unsigned int m = 0; /* Offset in a bignum chunk, in bits */
  516|       |
  517|   215M|        for (; len > 0 && m < BN_BYTES * 8; len--, s += inc, m += 8) {
  ------------------
  |  |   38|   213M|#define BN_BYTES 8
  ------------------
  |  Branch (517:16): [True: 213M, False: 1.94M]
  |  Branch (517:27): [True: 191M, False: 22.1M]
  ------------------
  518|   191M|            BN_ULONG byte_xored = *s ^ xor;
  ------------------
  |  |   37|   191M|#define BN_ULONG unsigned long
  ------------------
  519|   191M|            BN_ULONG byte = (byte_xored + carry) & 0xff;
  ------------------
  |  |   37|   191M|#define BN_ULONG unsigned long
  ------------------
  520|       |
  521|   191M|            carry = byte_xored > byte; /* Implicit 1 or 0 */
  522|   191M|            l |= (byte << m);
  523|   191M|        }
  524|  24.0M|        ret->d[i] = l;
  525|  24.0M|    }
  526|       |    /*
  527|       |     * need to call this due to clear byte at top if avoiding having the top
  528|       |     * bit set (-ve number)
  529|       |     */
  530|  1.94M|    bn_correct_top(ret);
  531|  1.94M|    return ret;
  532|  1.94M|}
bn_lib.c:bn2binpad:
  546|  1.92k|{
  547|  1.92k|    int inc;
  548|  1.92k|    int n, n8;
  549|  1.92k|    int xor = 0, carry = 0, ext = 0;
  550|  1.92k|    size_t i, lasti, j, atop, mask;
  551|  1.92k|    BN_ULONG l;
  ------------------
  |  |   37|  1.92k|#define BN_ULONG unsigned long
  ------------------
  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.92k|    n8 = BN_num_bits(a);
  559|  1.92k|    n = (n8 + 7) / 8; /* This is what BN_num_bytes() does */
  560|       |
  561|       |    /* Take note of the signedness of the bignum */
  562|  1.92k|    if (signedness == SIGNED) {
  ------------------
  |  Branch (562:9): [True: 0, False: 1.92k]
  ------------------
  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.92k|    if (tolen == -1) {
  ------------------
  |  Branch (577:9): [True: 1.18k, False: 734]
  ------------------
  578|  1.18k|        tolen = n + ext;
  579|  1.18k|    } else if (tolen < n + ext) { /* uncommon/unlike case */
  ------------------
  |  Branch (579:16): [True: 0, False: 734]
  ------------------
  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.92k|    atop = a->dmax * BN_BYTES;
  ------------------
  |  |   38|  1.92k|#define BN_BYTES 8
  ------------------
  591|  1.92k|    if (atop == 0) {
  ------------------
  |  Branch (591:9): [True: 0, False: 1.92k]
  ------------------
  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.92k|    if (endianness == LITTLE) {
  ------------------
  |  Branch (602:9): [True: 648, False: 1.27k]
  ------------------
  603|    648|        inc = 1;
  604|  1.27k|    } else {
  605|  1.27k|        inc = -1;
  606|  1.27k|        to += tolen - 1; /* Move to the last byte, not beyond */
  607|  1.27k|    }
  608|       |
  609|  1.92k|    lasti = atop - 1;
  610|  1.92k|    atop = a->top * BN_BYTES;
  ------------------
  |  |   38|  1.92k|#define BN_BYTES 8
  ------------------
  611|   143k|    for (i = 0, j = 0; j < (size_t)tolen; j++) {
  ------------------
  |  Branch (611:24): [True: 141k, False: 1.92k]
  ------------------
  612|   141k|        unsigned char byte, byte_xored;
  613|       |
  614|   141k|        l = a->d[i / BN_BYTES];
  ------------------
  |  |   38|   141k|#define BN_BYTES 8
  ------------------
  615|   141k|        mask = 0 - ((j - atop) >> (8 * sizeof(i) - 1));
  616|   141k|        byte = (unsigned char)(l >> (8 * (i % BN_BYTES)) & mask);
  ------------------
  |  |   38|   141k|#define BN_BYTES 8
  ------------------
  617|   141k|        byte_xored = byte ^ xor;
  618|   141k|        *to = (unsigned char)(byte_xored + carry);
  619|   141k|        carry = byte_xored > *to; /* Implicit 1 or 0 */
  620|   141k|        to += inc;
  621|   141k|        i += (i - lasti) >> (8 * sizeof(i) - 1); /* stay on last limb */
  622|   141k|    }
  623|       |
  624|  1.92k|    return tolen;
  625|  1.92k|}

bn_lib.c:bn_expand:
  680|   240k|{
  681|   240k|    if (bits > (INT_MAX - BN_BITS2 + 1))
  ------------------
  |  |   54|   240k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   240k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (681:9): [True: 0, False: 240k]
  ------------------
  682|      0|        return NULL;
  683|       |
  684|   240k|    if (((bits + BN_BITS2 - 1) / BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   54|   240k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   240k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                  if (((bits + BN_BITS2 - 1) / BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   54|   240k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   240k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (684:9): [True: 120k, False: 120k]
  ------------------
  685|   120k|        return a;
  686|       |
  687|   120k|    return bn_expand2((a), (bits + BN_BITS2 - 1) / BN_BITS2);
  ------------------
  |  |   54|   120k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   120k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                  return bn_expand2((a), (bits + BN_BITS2 - 1) / BN_BITS2);
  ------------------
  |  |   54|   120k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   120k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  688|   240k|}

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

BN_mod_mul_montgomery:
   27|  2.48M|{
   28|  2.48M|    int ret = bn_mul_mont_fixed_top(r, a, b, mont, ctx);
   29|       |
   30|  2.48M|    bn_correct_top(r);
   31|  2.48M|    bn_check_top(r);
   32|       |
   33|  2.48M|    return ret;
   34|  2.48M|}
bn_mul_mont_fixed_top:
   38|  2.63M|{
   39|  2.63M|    BIGNUM *tmp;
   40|  2.63M|    int ret = 0;
   41|  2.63M|    int num = mont->N.top;
   42|       |
   43|  2.63M|#if defined(OPENSSL_BN_ASM_MONT) && defined(MONT_WORD)
   44|  2.63M|    if (num > 1 && num <= BN_SOFT_LIMIT && a->top == num && b->top == num) {
  ------------------
  |  |   62|  5.26M|#define BN_SOFT_LIMIT (4096 / BN_BYTES)
  |  |  ------------------
  |  |  |  |   38|  2.63M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (44:9): [True: 2.63M, False: 0]
  |  Branch (44:20): [True: 2.63M, False: 0]
  |  Branch (44:44): [True: 2.62M, False: 12.4k]
  |  Branch (44:61): [True: 2.62M, False: 0]
  ------------------
   45|  2.62M|        if (bn_wexpand(r, num) == NULL)
  ------------------
  |  Branch (45:13): [True: 0, False: 2.62M]
  ------------------
   46|      0|            return 0;
   47|  2.62M|        if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) {
  ------------------
  |  Branch (47:13): [True: 2.62M, False: 0]
  ------------------
   48|  2.62M|            r->neg = a->neg ^ b->neg;
   49|  2.62M|            r->top = num;
   50|  2.62M|            r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  2.62M|#define BN_FLG_FIXED_TOP 0
  ------------------
   51|  2.62M|            return 1;
   52|  2.62M|        }
   53|  2.62M|    }
   54|  12.4k|#endif
   55|       |
   56|  12.4k|    if ((a->top + b->top) > 2 * num)
  ------------------
  |  Branch (56:9): [True: 0, False: 12.4k]
  ------------------
   57|      0|        return 0;
   58|       |
   59|  12.4k|    BN_CTX_start(ctx);
   60|  12.4k|    tmp = BN_CTX_get(ctx);
   61|  12.4k|    if (tmp == NULL)
  ------------------
  |  Branch (61:9): [True: 0, False: 12.4k]
  ------------------
   62|      0|        goto err;
   63|       |
   64|  12.4k|    bn_check_top(tmp);
   65|  12.4k|    if (a == b) {
  ------------------
  |  Branch (65:9): [True: 0, False: 12.4k]
  ------------------
   66|      0|        if (!bn_sqr_fixed_top(tmp, a, ctx))
  ------------------
  |  Branch (66:13): [True: 0, False: 0]
  ------------------
   67|      0|            goto err;
   68|  12.4k|    } else {
   69|  12.4k|        if (!bn_mul_fixed_top(tmp, a, b, ctx))
  ------------------
  |  Branch (69:13): [True: 0, False: 12.4k]
  ------------------
   70|      0|            goto err;
   71|  12.4k|    }
   72|       |    /* reduce from aRR to aR */
   73|  12.4k|#ifdef MONT_WORD
   74|  12.4k|    if (!bn_from_montgomery_word(r, tmp, mont))
  ------------------
  |  Branch (74:9): [True: 0, False: 12.4k]
  ------------------
   75|      0|        goto err;
   76|       |#else
   77|       |    if (!BN_from_montgomery(r, tmp, mont, ctx))
   78|       |        goto err;
   79|       |#endif
   80|  12.4k|    ret = 1;
   81|  12.4k|err:
   82|  12.4k|    BN_CTX_end(ctx);
   83|  12.4k|    return ret;
   84|  12.4k|}
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.53k|{
  176|  1.53k|    int retn = 0;
  177|  1.53k|#ifdef MONT_WORD
  178|  1.53k|    BIGNUM *t;
  179|       |
  180|  1.53k|    BN_CTX_start(ctx);
  181|  1.53k|    if ((t = BN_CTX_get(ctx)) && BN_copy(t, a)) {
  ------------------
  |  Branch (181:9): [True: 1.53k, False: 0]
  |  Branch (181:34): [True: 1.53k, False: 0]
  ------------------
  182|  1.53k|        retn = bn_from_montgomery_word(ret, t, mont);
  183|  1.53k|    }
  184|  1.53k|    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.53k|    return retn;
  219|  1.53k|}
bn_to_mont_fixed_top:
  223|    375|{
  224|    375|    return bn_mul_mont_fixed_top(r, a, &(mont->RR), mont, ctx);
  225|    375|}
BN_MONT_CTX_new:
  228|   264k|{
  229|   264k|    BN_MONT_CTX *ret;
  230|       |
  231|   264k|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  106|   264k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (231:9): [True: 0, False: 264k]
  ------------------
  232|      0|        return NULL;
  233|       |
  234|   264k|    BN_MONT_CTX_init(ret);
  235|   264k|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|   264k|#define BN_FLG_MALLOCED 0x01
  ------------------
  236|   264k|    return ret;
  237|   264k|}
BN_MONT_CTX_init:
  240|   264k|{
  241|   264k|    ctx->ri = 0;
  242|   264k|    bn_init(&ctx->RR);
  243|   264k|    bn_init(&ctx->N);
  244|   264k|    bn_init(&ctx->Ni);
  245|   264k|    ctx->n0[0] = ctx->n0[1] = 0;
  246|   264k|    ctx->flags = 0;
  247|   264k|}
BN_MONT_CTX_free:
  250|  1.35M|{
  251|  1.35M|    if (mont == NULL)
  ------------------
  |  Branch (251:9): [True: 1.09M, False: 264k]
  ------------------
  252|  1.09M|        return;
  253|   264k|    BN_clear_free(&mont->RR);
  254|   264k|    BN_clear_free(&mont->N);
  255|   264k|    BN_clear_free(&mont->Ni);
  256|   264k|    if (mont->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|   264k|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (256:9): [True: 264k, False: 0]
  ------------------
  257|   264k|        OPENSSL_free(mont);
  ------------------
  |  |  131|   264k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|   264k|}
BN_MONT_CTX_set:
  261|   108k|{
  262|   108k|    int i, ret = 0;
  263|   108k|    BIGNUM *Ri, *R;
  264|       |
  265|   108k|    if (BN_is_zero(mod))
  ------------------
  |  Branch (265:9): [True: 0, False: 108k]
  ------------------
  266|      0|        return 0;
  267|       |
  268|   108k|    BN_CTX_start(ctx);
  269|   108k|    if ((Ri = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (269:9): [True: 0, False: 108k]
  ------------------
  270|      0|        goto err;
  271|   108k|    R = &(mont->RR); /* grab RR as a temp */
  272|   108k|    if (!BN_copy(&(mont->N), mod))
  ------------------
  |  Branch (272:9): [True: 0, False: 108k]
  ------------------
  273|      0|        goto err; /* Set N */
  274|   108k|    if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|   108k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (274:9): [True: 0, False: 108k]
  ------------------
  275|      0|        BN_set_flags(&(mont->N), BN_FLG_CONSTTIME);
  ------------------
  |  |   67|      0|#define BN_FLG_CONSTTIME 0x04
  ------------------
  276|   108k|    mont->N.neg = 0;
  277|       |
  278|   108k|#ifdef MONT_WORD
  279|   108k|    {
  280|   108k|        BIGNUM tmod;
  281|   108k|        BN_ULONG buf[2];
  ------------------
  |  |   37|   108k|#define BN_ULONG unsigned long
  ------------------
  282|       |
  283|   108k|        bn_init(&tmod);
  284|   108k|        tmod.d = buf;
  285|   108k|        tmod.dmax = 2;
  286|   108k|        tmod.neg = 0;
  287|       |
  288|   108k|        if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|   108k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (288:13): [True: 0, False: 108k]
  ------------------
  289|      0|            BN_set_flags(&tmod, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|      0|#define BN_FLG_CONSTTIME 0x04
  ------------------
  290|       |
  291|   108k|        mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|   108k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   108k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                      mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|   108k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   108k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                      mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|   108k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   108k|#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|   108k|        BN_zero(R);
  ------------------
  |  |  201|   108k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  339|   108k|        if (!(BN_set_bit(R, BN_BITS2)))
  ------------------
  |  |   54|   108k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   108k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (339:13): [True: 0, False: 108k]
  ------------------
  340|      0|            goto err; /* R */
  341|       |
  342|   108k|        buf[0] = mod->d[0]; /* tmod = N mod word size */
  343|   108k|        buf[1] = 0;
  344|   108k|        tmod.top = buf[0] != 0 ? 1 : 0;
  ------------------
  |  Branch (344:20): [True: 108k, False: 0]
  ------------------
  345|       |        /* Ri = R^-1 mod N */
  346|   108k|        if (BN_is_one(&tmod))
  ------------------
  |  Branch (346:13): [True: 0, False: 108k]
  ------------------
  347|      0|            BN_zero(Ri);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  348|   108k|        else if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
  ------------------
  |  Branch (348:18): [True: 0, False: 108k]
  ------------------
  349|      0|            goto err;
  350|   108k|        if (!BN_lshift(Ri, Ri, BN_BITS2))
  ------------------
  |  |   54|   108k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   108k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (350:13): [True: 0, False: 108k]
  ------------------
  351|      0|            goto err; /* R*Ri */
  352|   108k|        if (!BN_is_zero(Ri)) {
  ------------------
  |  Branch (352:13): [True: 108k, False: 0]
  ------------------
  353|   108k|            if (!BN_sub_word(Ri, 1))
  ------------------
  |  Branch (353:17): [True: 0, False: 108k]
  ------------------
  354|      0|                goto err;
  355|   108k|        } else { /* if N mod word size == 1 */
  356|       |
  357|      0|            if (!BN_set_word(Ri, BN_MASK2))
  ------------------
  |  |   93|      0|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  |  Branch (357:17): [True: 0, False: 0]
  ------------------
  358|      0|                goto err; /* Ri-- (mod word size) */
  359|      0|        }
  360|   108k|        if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
  ------------------
  |  Branch (360:13): [True: 0, False: 108k]
  ------------------
  361|      0|            goto err;
  362|       |        /*
  363|       |         * Ni = (R*Ri-1)/N, keep only least significant word:
  364|       |         */
  365|   108k|        mont->n0[0] = (Ri->top > 0) ? Ri->d[0] : 0;
  ------------------
  |  Branch (365:23): [True: 108k, False: 0]
  ------------------
  366|   108k|        mont->n0[1] = 0;
  367|   108k|#endif
  368|   108k|    }
  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|   108k|    BN_zero(&(mont->RR));
  ------------------
  |  |  201|   108k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  392|   108k|    if (!BN_set_bit(&(mont->RR), mont->ri * 2))
  ------------------
  |  Branch (392:9): [True: 0, False: 108k]
  ------------------
  393|      0|        goto err;
  394|   108k|    if (!BN_mod(&(mont->RR), &(mont->RR), &(mont->N), ctx))
  ------------------
  |  |  276|   108k|#define BN_mod(rem, m, d, ctx) BN_div(NULL, (rem), (m), (d), (ctx))
  ------------------
  |  Branch (394:9): [True: 0, False: 108k]
  ------------------
  395|      0|        goto err;
  396|       |
  397|   108k|    for (i = mont->RR.top, ret = mont->N.top; i < ret; i++)
  ------------------
  |  Branch (397:47): [True: 0, False: 108k]
  ------------------
  398|      0|        mont->RR.d[i] = 0;
  399|   108k|    mont->RR.top = ret;
  400|   108k|    mont->RR.flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|   108k|#define BN_FLG_FIXED_TOP 0
  ------------------
  401|       |
  402|   108k|    ret = 1;
  403|   108k|err:
  404|   108k|    BN_CTX_end(ctx);
  405|   108k|    return ret;
  406|   108k|}
BN_MONT_CTX_copy:
  409|   132k|{
  410|   132k|    if (to == from)
  ------------------
  |  Branch (410:9): [True: 0, False: 132k]
  ------------------
  411|      0|        return to;
  412|       |
  413|   132k|    if (!BN_copy(&(to->RR), &(from->RR)))
  ------------------
  |  Branch (413:9): [True: 0, False: 132k]
  ------------------
  414|      0|        return NULL;
  415|   132k|    if (!BN_copy(&(to->N), &(from->N)))
  ------------------
  |  Branch (415:9): [True: 0, False: 132k]
  ------------------
  416|      0|        return NULL;
  417|   132k|    if (!BN_copy(&(to->Ni), &(from->Ni)))
  ------------------
  |  Branch (417:9): [True: 0, False: 132k]
  ------------------
  418|      0|        return NULL;
  419|   132k|    to->ri = from->ri;
  420|   132k|    to->n0[0] = from->n0[0];
  421|   132k|    to->n0[1] = from->n0[1];
  422|   132k|    return to;
  423|   132k|}
BN_MONT_CTX_set_locked:
  427|     86|{
  428|     86|    BN_MONT_CTX *ret;
  429|       |
  430|     86|    if (!CRYPTO_THREAD_read_lock(lock))
  ------------------
  |  Branch (430:9): [True: 0, False: 86]
  ------------------
  431|      0|        return NULL;
  432|     86|    ret = *pmont;
  433|     86|    CRYPTO_THREAD_unlock(lock);
  434|     86|    if (ret)
  ------------------
  |  Branch (434:9): [True: 0, False: 86]
  ------------------
  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|     86|    ret = BN_MONT_CTX_new();
  446|     86|    if (ret == NULL)
  ------------------
  |  Branch (446:9): [True: 0, False: 86]
  ------------------
  447|      0|        return NULL;
  448|     86|    if (!BN_MONT_CTX_set(ret, mod, ctx)) {
  ------------------
  |  Branch (448:9): [True: 0, False: 86]
  ------------------
  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|     86|    if (!CRYPTO_THREAD_write_lock(lock)) {
  ------------------
  |  Branch (454:9): [True: 0, False: 86]
  ------------------
  455|      0|        BN_MONT_CTX_free(ret);
  456|      0|        return NULL;
  457|      0|    }
  458|       |
  459|     86|    if (*pmont) {
  ------------------
  |  Branch (459:9): [True: 0, False: 86]
  ------------------
  460|      0|        BN_MONT_CTX_free(ret);
  461|      0|        ret = *pmont;
  462|      0|    } else
  463|     86|        *pmont = ret;
  464|     86|    CRYPTO_THREAD_unlock(lock);
  465|     86|    return ret;
  466|     86|}
ossl_bn_mont_ctx_set:
  470|  24.1k|{
  471|  24.1k|    if (BN_copy(&ctx->N, modulus) == NULL)
  ------------------
  |  Branch (471:9): [True: 0, False: 24.1k]
  ------------------
  472|      0|        return 0;
  473|  24.1k|    if (BN_bin2bn(rr, rrlen, &ctx->RR) == NULL)
  ------------------
  |  Branch (473:9): [True: 0, False: 24.1k]
  ------------------
  474|      0|        return 0;
  475|  24.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|  24.1k|    ctx->n0[0] = ((BN_ULONG)nhi << 32) | nlo;
  484|  24.1k|    ctx->n0[1] = 0;
  485|  24.1k|#endif
  486|       |
  487|  24.1k|    return 1;
  488|  24.1k|}
bn_mont.c:bn_from_montgomery_word:
   88|  13.9k|{
   89|  13.9k|    BIGNUM *n;
   90|  13.9k|    BN_ULONG *ap, *np, *rp, n0, v, carry;
  ------------------
  |  |   37|  13.9k|#define BN_ULONG unsigned long
  ------------------
   91|  13.9k|    int nl, max, i;
   92|  13.9k|    unsigned int rtop;
   93|       |
   94|  13.9k|    n = &(mont->N);
   95|  13.9k|    nl = n->top;
   96|  13.9k|    if (nl == 0) {
  ------------------
  |  Branch (96:9): [True: 0, False: 13.9k]
  ------------------
   97|      0|        ret->top = 0;
   98|      0|        return 1;
   99|      0|    }
  100|       |
  101|  13.9k|    max = (2 * nl); /* carry is stored separately */
  102|  13.9k|    if (bn_wexpand(r, max) == NULL)
  ------------------
  |  Branch (102:9): [True: 0, False: 13.9k]
  ------------------
  103|      0|        return 0;
  104|       |
  105|  13.9k|    r->neg ^= n->neg;
  106|  13.9k|    np = n->d;
  107|  13.9k|    rp = r->d;
  108|       |
  109|       |    /* clear the top words of T */
  110|   157k|    for (rtop = r->top, i = 0; i < max; i++) {
  ------------------
  |  Branch (110:32): [True: 143k, False: 13.9k]
  ------------------
  111|   143k|        v = (BN_ULONG)0 - ((i - rtop) >> (8 * sizeof(rtop) - 1));
  112|   143k|        rp[i] &= v;
  113|   143k|    }
  114|       |
  115|  13.9k|    r->top = max;
  116|  13.9k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  13.9k|#define BN_FLG_FIXED_TOP 0
  ------------------
  117|  13.9k|    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|  85.5k|    for (carry = 0, i = 0; i < nl; i++, rp++) {
  ------------------
  |  Branch (124:28): [True: 71.5k, False: 13.9k]
  ------------------
  125|  71.5k|        v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
  ------------------
  |  |   93|  71.5k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  126|  71.5k|        v = (v + carry + rp[nl]) & BN_MASK2;
  ------------------
  |  |   93|  71.5k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  127|  71.5k|        carry |= (v != rp[nl]);
  128|  71.5k|        carry &= (v <= rp[nl]);
  129|  71.5k|        rp[nl] = v;
  130|  71.5k|    }
  131|       |
  132|  13.9k|    if (bn_wexpand(ret, nl) == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 13.9k]
  ------------------
  133|      0|        return 0;
  134|  13.9k|    ret->top = nl;
  135|  13.9k|    ret->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  13.9k|#define BN_FLG_FIXED_TOP 0
  ------------------
  136|  13.9k|    ret->neg = r->neg;
  137|       |
  138|  13.9k|    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|  13.9k|    ap = &(r->d[nl]);
  145|       |
  146|  13.9k|    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|  85.5k|    for (i = 0; i < nl; i++) {
  ------------------
  |  Branch (152:17): [True: 71.5k, False: 13.9k]
  ------------------
  153|  71.5k|        rp[i] = (carry & ap[i]) | (~carry & rp[i]);
  154|  71.5k|        ap[i] = 0;
  155|  71.5k|    }
  156|       |
  157|  13.9k|    return 1;
  158|  13.9k|}

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

BN_nist_mod_384:
  889|   645k|{
  890|   645k|    int i, top = a->top;
  891|   645k|    int carry = 0;
  892|   645k|    register BN_ULONG *r_d, *a_d = a->d;
  893|   645k|    union {
  894|   645k|        BN_ULONG bn[BN_NIST_384_TOP];
  895|   645k|        unsigned int ui[BN_NIST_384_TOP * sizeof(BN_ULONG) / sizeof(unsigned int)];
  896|   645k|    } buf;
  897|   645k|    BN_ULONG c_d[BN_NIST_384_TOP], *res;
  ------------------
  |  |   37|   645k|#define BN_ULONG unsigned long
  ------------------
  898|   645k|    bn_addsub_f adjust;
  899|   645k|    static const BIGNUM ossl_bignum_nist_p_384_sqr = {
  900|   645k|        (BN_ULONG *)_nist_p_384_sqr,
  901|   645k|        OSSL_NELEM(_nist_p_384_sqr),
  ------------------
  |  |   14|   645k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  902|   645k|        OSSL_NELEM(_nist_p_384_sqr),
  ------------------
  |  |   14|   645k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  903|   645k|        0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|   645k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  904|   645k|    };
  905|       |
  906|   645k|    field = &ossl_bignum_nist_p_384; /* just to make sure */
  907|       |
  908|   645k|    if (BN_is_negative(a) || BN_ucmp(a, &ossl_bignum_nist_p_384_sqr) >= 0)
  ------------------
  |  Branch (908:9): [True: 0, False: 645k]
  |  Branch (908:30): [True: 0, False: 645k]
  ------------------
  909|      0|        return BN_nnmod(r, a, field, ctx);
  910|       |
  911|   645k|    i = BN_ucmp(field, a);
  912|   645k|    if (i == 0) {
  ------------------
  |  Branch (912:9): [True: 0, False: 645k]
  ------------------
  913|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  914|      0|        return 1;
  915|   645k|    } else if (i > 0)
  ------------------
  |  Branch (915:16): [True: 0, False: 645k]
  ------------------
  916|      0|        return (r == a) ? 1 : (BN_copy(r, a) != NULL);
  ------------------
  |  Branch (916:16): [True: 0, False: 0]
  ------------------
  917|       |
  918|   645k|    if (r != a) {
  ------------------
  |  Branch (918:9): [True: 0, False: 645k]
  ------------------
  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|   645k|        r_d = a_d;
  925|       |
  926|   645k|    nist_cp_bn_0(buf.bn, a_d + BN_NIST_384_TOP, top - BN_NIST_384_TOP,
  ------------------
  |  |  265|   645k|    {                                       \
  |  |  266|   645k|        int ii;                             \
  |  |  267|   645k|        const BN_ULONG *src = src_in;       \
  |  |  268|   645k|                                            \
  |  |  269|  4.51M|        for (ii = 0; ii < top; ii++)        \
  |  |  ------------------
  |  |  |  Branch (269:22): [True: 3.87M, False: 645k]
  |  |  ------------------
  |  |  270|  3.87M|            (dst)[ii] = src[ii];            \
  |  |  271|   645k|        for (; ii < max; ii++)              \
  |  |  ------------------
  |  |  |  Branch (271:16): [True: 0, False: 645k]
  |  |  ------------------
  |  |  272|   645k|            (dst)[ii] = 0;                  \
  |  |  273|   645k|    }
  ------------------
  927|   645k|        BN_NIST_384_TOP);
  928|       |
  929|   645k|#if defined(NIST_INT64)
  930|   645k|    {
  931|   645k|        NIST_INT64 acc; /* accumulator */
  ------------------
  |  |  298|   645k|#define NIST_INT64 long long
  ------------------
  932|   645k|        unsigned int *rp = (unsigned int *)r_d;
  933|   645k|        const unsigned int *bp = (const unsigned int *)buf.ui;
  934|       |
  935|   645k|        acc = load_u32(&rp[0]);
  936|   645k|        acc += bp[12 - 12];
  937|   645k|        acc += bp[21 - 12];
  938|   645k|        acc += bp[20 - 12];
  939|   645k|        acc -= bp[23 - 12];
  940|   645k|        store_lo32(&rp[0], acc);
  941|   645k|        acc >>= 32;
  942|       |
  943|   645k|        acc += load_u32(&rp[1]);
  944|   645k|        acc += bp[13 - 12];
  945|   645k|        acc += bp[22 - 12];
  946|   645k|        acc += bp[23 - 12];
  947|   645k|        acc -= bp[12 - 12];
  948|   645k|        acc -= bp[20 - 12];
  949|   645k|        store_lo32(&rp[1], acc);
  950|   645k|        acc >>= 32;
  951|       |
  952|   645k|        acc += load_u32(&rp[2]);
  953|   645k|        acc += bp[14 - 12];
  954|   645k|        acc += bp[23 - 12];
  955|   645k|        acc -= bp[13 - 12];
  956|   645k|        acc -= bp[21 - 12];
  957|   645k|        store_lo32(&rp[2], acc);
  958|   645k|        acc >>= 32;
  959|       |
  960|   645k|        acc += load_u32(&rp[3]);
  961|   645k|        acc += bp[15 - 12];
  962|   645k|        acc += bp[12 - 12];
  963|   645k|        acc += bp[20 - 12];
  964|   645k|        acc += bp[21 - 12];
  965|   645k|        acc -= bp[14 - 12];
  966|   645k|        acc -= bp[22 - 12];
  967|   645k|        acc -= bp[23 - 12];
  968|   645k|        store_lo32(&rp[3], acc);
  969|   645k|        acc >>= 32;
  970|       |
  971|   645k|        acc += load_u32(&rp[4]);
  972|   645k|        acc += bp[21 - 12];
  973|   645k|        acc += bp[21 - 12];
  974|   645k|        acc += bp[16 - 12];
  975|   645k|        acc += bp[13 - 12];
  976|   645k|        acc += bp[12 - 12];
  977|   645k|        acc += bp[20 - 12];
  978|   645k|        acc += bp[22 - 12];
  979|   645k|        acc -= bp[15 - 12];
  980|   645k|        acc -= bp[23 - 12];
  981|   645k|        acc -= bp[23 - 12];
  982|   645k|        store_lo32(&rp[4], acc);
  983|   645k|        acc >>= 32;
  984|       |
  985|   645k|        acc += load_u32(&rp[5]);
  986|   645k|        acc += bp[22 - 12];
  987|   645k|        acc += bp[22 - 12];
  988|   645k|        acc += bp[17 - 12];
  989|   645k|        acc += bp[14 - 12];
  990|   645k|        acc += bp[13 - 12];
  991|   645k|        acc += bp[21 - 12];
  992|   645k|        acc += bp[23 - 12];
  993|   645k|        acc -= bp[16 - 12];
  994|   645k|        store_lo32(&rp[5], acc);
  995|   645k|        acc >>= 32;
  996|       |
  997|   645k|        acc += load_u32(&rp[6]);
  998|   645k|        acc += bp[23 - 12];
  999|   645k|        acc += bp[23 - 12];
 1000|   645k|        acc += bp[18 - 12];
 1001|   645k|        acc += bp[15 - 12];
 1002|   645k|        acc += bp[14 - 12];
 1003|   645k|        acc += bp[22 - 12];
 1004|   645k|        acc -= bp[17 - 12];
 1005|   645k|        store_lo32(&rp[6], acc);
 1006|   645k|        acc >>= 32;
 1007|       |
 1008|   645k|        acc += load_u32(&rp[7]);
 1009|   645k|        acc += bp[19 - 12];
 1010|   645k|        acc += bp[16 - 12];
 1011|   645k|        acc += bp[15 - 12];
 1012|   645k|        acc += bp[23 - 12];
 1013|   645k|        acc -= bp[18 - 12];
 1014|   645k|        store_lo32(&rp[7], acc);
 1015|   645k|        acc >>= 32;
 1016|       |
 1017|   645k|        acc += load_u32(&rp[8]);
 1018|   645k|        acc += bp[20 - 12];
 1019|   645k|        acc += bp[17 - 12];
 1020|   645k|        acc += bp[16 - 12];
 1021|   645k|        acc -= bp[19 - 12];
 1022|   645k|        store_lo32(&rp[8], acc);
 1023|   645k|        acc >>= 32;
 1024|       |
 1025|   645k|        acc += load_u32(&rp[9]);
 1026|   645k|        acc += bp[21 - 12];
 1027|   645k|        acc += bp[18 - 12];
 1028|   645k|        acc += bp[17 - 12];
 1029|   645k|        acc -= bp[20 - 12];
 1030|   645k|        store_lo32(&rp[9], acc);
 1031|   645k|        acc >>= 32;
 1032|       |
 1033|   645k|        acc += load_u32(&rp[10]);
 1034|   645k|        acc += bp[22 - 12];
 1035|   645k|        acc += bp[19 - 12];
 1036|   645k|        acc += bp[18 - 12];
 1037|   645k|        acc -= bp[21 - 12];
 1038|   645k|        store_lo32(&rp[10], acc);
 1039|   645k|        acc >>= 32;
 1040|       |
 1041|   645k|        acc += load_u32(&rp[11]);
 1042|   645k|        acc += bp[23 - 12];
 1043|   645k|        acc += bp[20 - 12];
 1044|   645k|        acc += bp[19 - 12];
 1045|   645k|        acc -= bp[22 - 12];
 1046|   645k|        store_lo32(&rp[11], acc);
 1047|       |
 1048|   645k|        carry = (int)(acc >> 32);
 1049|   645k|    }
 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|   645k|    adjust = bn_sub_words;
 1118|   645k|    if (carry > 0)
  ------------------
  |  Branch (1118:9): [True: 418k, False: 227k]
  ------------------
 1119|   418k|        carry = (int)bn_sub_words(r_d, r_d, _nist_p_384[carry - 1],
 1120|   418k|            BN_NIST_384_TOP);
  ------------------
  |  |   16|   418k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   418k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   418k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   418k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   418k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1121|   227k|    else if (carry < 0) {
  ------------------
  |  Branch (1121:14): [True: 5.97k, False: 221k]
  ------------------
 1122|  5.97k|        carry = (int)bn_add_words(r_d, r_d, _nist_p_384[-carry - 1],
 1123|  5.97k|            BN_NIST_384_TOP);
  ------------------
  |  |   16|  5.97k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  5.97k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  5.97k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  5.97k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  5.97k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1124|  5.97k|        adjust = carry ? bn_sub_words : bn_add_words;
  ------------------
  |  Branch (1124:18): [True: 5.97k, False: 0]
  ------------------
 1125|  5.97k|    } else
 1126|   221k|        carry = 1;
 1127|       |
 1128|   645k|    res = ((*adjust)(c_d, r_d, _nist_p_384[0], BN_NIST_384_TOP) && carry)
  ------------------
  |  |   16|   645k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   645k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   645k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   645k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   645k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1128:12): [True: 645k, False: 0]
  |  Branch (1128:68): [True: 645k, False: 0]
  ------------------
 1129|   645k|        ? r_d
 1130|   645k|        : c_d;
 1131|   645k|    nist_cp_bn(r_d, res, BN_NIST_384_TOP);
  ------------------
  |  |   16|   645k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   645k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   645k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   645k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   645k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1132|   645k|    r->top = BN_NIST_384_TOP;
  ------------------
  |  |   16|   645k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   645k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   645k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   645k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   645k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1133|   645k|    bn_correct_top(r);
 1134|       |
 1135|   645k|    return 1;
 1136|   645k|}
BN_nist_mod_521:
 1144|    210|{
 1145|    210|    int top = a->top, i;
 1146|    210|    BN_ULONG *r_d, *a_d = a->d, t_d[BN_NIST_521_TOP], val, tmp, *res;
  ------------------
  |  |   37|    210|#define BN_ULONG unsigned long
  ------------------
 1147|    210|    static const BIGNUM ossl_bignum_nist_p_521_sqr = {
 1148|    210|        (BN_ULONG *)_nist_p_521_sqr,
 1149|    210|        OSSL_NELEM(_nist_p_521_sqr),
  ------------------
  |  |   14|    210|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1150|    210|        OSSL_NELEM(_nist_p_521_sqr),
  ------------------
  |  |   14|    210|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1151|    210|        0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|    210|#define BN_FLG_STATIC_DATA 0x02
  ------------------
 1152|    210|    };
 1153|       |
 1154|    210|    field = &ossl_bignum_nist_p_521; /* just to make sure */
 1155|       |
 1156|    210|    if (BN_is_negative(a) || BN_ucmp(a, &ossl_bignum_nist_p_521_sqr) >= 0)
  ------------------
  |  Branch (1156:9): [True: 0, False: 210]
  |  Branch (1156:30): [True: 0, False: 210]
  ------------------
 1157|      0|        return BN_nnmod(r, a, field, ctx);
 1158|       |
 1159|    210|    i = BN_ucmp(field, a);
 1160|    210|    if (i == 0) {
  ------------------
  |  Branch (1160:9): [True: 0, False: 210]
  ------------------
 1161|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
 1162|      0|        return 1;
 1163|    210|    } else if (i > 0)
  ------------------
  |  Branch (1163:16): [True: 0, False: 210]
  ------------------
 1164|      0|        return (r == a) ? 1 : (BN_copy(r, a) != NULL);
  ------------------
  |  Branch (1164:16): [True: 0, False: 0]
  ------------------
 1165|       |
 1166|    210|    if (r != a) {
  ------------------
  |  Branch (1166:9): [True: 0, False: 210]
  ------------------
 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|    210|        r_d = a_d;
 1173|       |
 1174|       |    /* upper 521 bits, copy ... */
 1175|    210|    nist_cp_bn_0(t_d, a_d + (BN_NIST_521_TOP - 1),
  ------------------
  |  |  265|    210|    {                                       \
  |  |  266|    210|        int ii;                             \
  |  |  267|    210|        const BN_ULONG *src = src_in;       \
  |  |  268|    210|                                            \
  |  |  269|  2.10k|        for (ii = 0; ii < top; ii++)        \
  |  |  ------------------
  |  |  |  Branch (269:22): [True: 1.89k, False: 210]
  |  |  ------------------
  |  |  270|  1.89k|            (dst)[ii] = src[ii];            \
  |  |  271|    210|        for (; ii < max; ii++)              \
  |  |  ------------------
  |  |  |  Branch (271:16): [True: 0, False: 210]
  |  |  ------------------
  |  |  272|    210|            (dst)[ii] = 0;                  \
  |  |  273|    210|    }
  ------------------
 1176|    210|        top - (BN_NIST_521_TOP - 1), BN_NIST_521_TOP);
 1177|       |    /* ... and right shift */
 1178|  1.89k|    for (val = t_d[0], i = 0; i < BN_NIST_521_TOP - 1; i++) {
  ------------------
  |  |   17|  1.89k|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  1.89k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.89k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  1.89k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.89k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1178:31): [True: 1.68k, False: 210]
  ------------------
 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|  1.68k|        t_d[i] = (val >> BN_NIST_521_RSHIFT | (tmp = t_d[i + 1]) << BN_NIST_521_LSHIFT) & BN_MASK2;
  ------------------
  |  | 1138|  1.68k|#define BN_NIST_521_RSHIFT (521 % BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  1.68k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.68k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      t_d[i] = (val >> BN_NIST_521_RSHIFT | (tmp = t_d[i + 1]) << BN_NIST_521_LSHIFT) & BN_MASK2;
  ------------------
  |  | 1139|  1.68k|#define BN_NIST_521_LSHIFT (BN_BITS2 - BN_NIST_521_RSHIFT)
  |  |  ------------------
  |  |  |  |   54|  1.68k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.68k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_LSHIFT (BN_BITS2 - BN_NIST_521_RSHIFT)
  |  |  ------------------
  |  |  |  | 1138|  1.68k|#define BN_NIST_521_RSHIFT (521 % BN_BITS2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|  1.68k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   38|  1.68k|#define BN_BYTES 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      t_d[i] = (val >> BN_NIST_521_RSHIFT | (tmp = t_d[i + 1]) << BN_NIST_521_LSHIFT) & BN_MASK2;
  ------------------
  |  |   93|  1.68k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
 1190|  1.68k|        val = tmp;
 1191|  1.68k|#endif
 1192|  1.68k|    }
 1193|    210|    t_d[i] = val >> BN_NIST_521_RSHIFT;
  ------------------
  |  | 1138|    210|#define BN_NIST_521_RSHIFT (521 % BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1194|       |    /* lower 521 bits */
 1195|    210|    r_d[i] &= BN_NIST_521_TOP_MASK;
  ------------------
  |  | 1140|    210|#define BN_NIST_521_TOP_MASK ((BN_ULONG)BN_MASK2 >> BN_NIST_521_LSHIFT)
  |  |  ------------------
  |  |  |  |   93|    210|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP_MASK ((BN_ULONG)BN_MASK2 >> BN_NIST_521_LSHIFT)
  |  |  ------------------
  |  |  |  | 1139|    210|#define BN_NIST_521_LSHIFT (BN_BITS2 - BN_NIST_521_RSHIFT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BN_NIST_521_LSHIFT (BN_BITS2 - BN_NIST_521_RSHIFT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1138|    210|#define BN_NIST_521_RSHIFT (521 % BN_BITS2)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1196|       |
 1197|    210|    bn_add_words(r_d, r_d, t_d, BN_NIST_521_TOP);
  ------------------
  |  |   17|    210|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1198|    210|    res = bn_sub_words(t_d, r_d, _nist_p_521,
  ------------------
  |  Branch (1198:11): [True: 210, False: 0]
  ------------------
 1199|    210|              BN_NIST_521_TOP)
  ------------------
  |  |   17|    210|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1200|    210|        ? r_d
 1201|    210|        : t_d;
 1202|    210|    nist_cp_bn(r_d, res, BN_NIST_521_TOP);
  ------------------
  |  |   17|    210|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1203|    210|    r->top = BN_NIST_521_TOP;
  ------------------
  |  |   17|    210|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1204|    210|    bn_correct_top(r);
 1205|       |
 1206|    210|    return 1;
 1207|    210|}
bn_nist.c:nist_cp_bn:
  276|   645k|{
  277|   645k|    int i;
  278|       |
  279|  4.51M|    for (i = 0; i < top; i++)
  ------------------
  |  Branch (279:17): [True: 3.87M, False: 645k]
  ------------------
  280|  3.87M|        dst[i] = src[i];
  281|   645k|}
bn_nist.c:load_u32:
  325|  7.74M|{
  326|  7.74M|    uint32_t tmp;
  327|       |
  328|  7.74M|    memcpy(&tmp, ptr, sizeof(tmp));
  329|  7.74M|    return tmp;
  330|  7.74M|}
bn_nist.c:store_lo32:
  333|  7.74M|{
  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|  7.74M|    uint32_t tmp = (uint32_t)val;
  338|       |
  339|  7.74M|    memcpy(ptr, &tmp, sizeof(tmp));
  340|  7.74M|}

BN_priv_rand_range_ex:
  218|  1.25k|{
  219|  1.25k|    return bnrand_range(PRIVATE, r, range, strength, ctx);
  220|  1.25k|}
bn_rand.c:bnrand:
   27|  1.65k|{
   28|  1.65k|    unsigned char *buf = NULL;
   29|  1.65k|    int b, ret = 0, bit, bytes, mask;
   30|  1.65k|    OSSL_LIB_CTX *libctx = ossl_bn_get_libctx(ctx);
   31|       |
   32|  1.65k|    if (bits == 0) {
  ------------------
  |  Branch (32:9): [True: 0, False: 1.65k]
  ------------------
   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.65k|    if (bits < 0 || (bits == 1 && top > 0))
  ------------------
  |  Branch (38:9): [True: 0, False: 1.65k]
  |  Branch (38:22): [True: 0, False: 1.65k]
  |  Branch (38:35): [True: 0, False: 0]
  ------------------
   39|      0|        goto toosmall;
   40|       |
   41|  1.65k|    bytes = (bits + 7) / 8;
   42|  1.65k|    bit = (bits - 1) % 8;
   43|  1.65k|    mask = 0xff << (bit + 1);
   44|       |
   45|  1.65k|    buf = OPENSSL_malloc(bytes);
  ------------------
  |  |  106|  1.65k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   46|  1.65k|    if (buf == NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.65k]
  ------------------
   47|      0|        goto err;
   48|       |
   49|       |    /* make a random number and set the top and bottom bits */
   50|  1.65k|    b = flag == NORMAL ? RAND_bytes_ex(libctx, buf, bytes, strength)
  ------------------
  |  Branch (50:9): [True: 0, False: 1.65k]
  ------------------
   51|  1.65k|                       : RAND_priv_bytes_ex(libctx, buf, bytes, strength);
   52|  1.65k|    if (b <= 0)
  ------------------
  |  Branch (52:9): [True: 0, False: 1.65k]
  ------------------
   53|      0|        goto err;
   54|       |
   55|  1.65k|    if (flag == TESTING) {
  ------------------
  |  Branch (55:9): [True: 0, False: 1.65k]
  ------------------
   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.65k|    if (top >= 0) {
  ------------------
  |  Branch (74:9): [True: 0, False: 1.65k]
  ------------------
   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.65k|    buf[0] &= ~mask;
   87|  1.65k|    if (bottom) /* set bottom bit if requested */
  ------------------
  |  Branch (87:9): [True: 0, False: 1.65k]
  ------------------
   88|      0|        buf[bytes - 1] |= 1;
   89|  1.65k|    if (!BN_bin2bn(buf, bytes, rnd))
  ------------------
  |  Branch (89:9): [True: 0, False: 1.65k]
  ------------------
   90|      0|        goto err;
   91|  1.65k|    ret = 1;
   92|  1.65k|err:
   93|  1.65k|    OPENSSL_clear_free(buf, bytes);
  ------------------
  |  |  129|  1.65k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|  1.65k|    bn_check_top(rnd);
   95|  1.65k|    return ret;
   96|       |
   97|      0|toosmall:
   98|       |    ERR_raise(ERR_LIB_BN, BN_R_BITS_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   99|      0|    return 0;
  100|  1.65k|}
bn_rand.c:bnrand_range:
  135|  1.25k|{
  136|  1.25k|    int n;
  137|  1.25k|    int count = 100;
  138|       |
  139|  1.25k|    if (r == NULL) {
  ------------------
  |  Branch (139:9): [True: 0, False: 1.25k]
  ------------------
  140|      0|        ERR_raise(ERR_LIB_BN, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  141|      0|        return 0;
  142|      0|    }
  143|       |
  144|  1.25k|    if (range->neg || BN_is_zero(range)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 1.25k]
  |  Branch (144:23): [True: 0, False: 1.25k]
  ------------------
  145|      0|        ERR_raise(ERR_LIB_BN, BN_R_INVALID_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  146|      0|        return 0;
  147|      0|    }
  148|       |
  149|  1.25k|    n = BN_num_bits(range); /* n > 0 */
  150|       |
  151|       |    /* BN_is_bit_set(range, n - 1) always holds */
  152|       |
  153|  1.25k|    if (n == 1)
  ------------------
  |  Branch (153:9): [True: 0, False: 1.25k]
  ------------------
  154|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  155|  1.25k|    else if (!BN_is_bit_set(range, n - 2) && !BN_is_bit_set(range, n - 3)) {
  ------------------
  |  Branch (155:14): [True: 953, False: 305]
  |  Branch (155:46): [True: 308, False: 645]
  ------------------
  156|       |        /*
  157|       |         * range = 100..._2, so 3*range (= 11..._2) is exactly one bit longer
  158|       |         * than range
  159|       |         */
  160|    381|        do {
  161|    381|            if (!bnrand(flag, r, n + 1, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   80|    381|#define BN_RAND_TOP_ANY -1
  ------------------
                          if (!bnrand(flag, r, n + 1, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   85|    381|#define BN_RAND_BOTTOM_ANY 0
  ------------------
  |  Branch (161:17): [True: 0, False: 381]
  ------------------
  162|    381|                    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|    381|            if (BN_cmp(r, range) >= 0) {
  ------------------
  |  Branch (171:17): [True: 274, False: 107]
  ------------------
  172|    274|                if (!BN_sub(r, r, range))
  ------------------
  |  Branch (172:21): [True: 0, False: 274]
  ------------------
  173|      0|                    return 0;
  174|    274|                if (BN_cmp(r, range) >= 0)
  ------------------
  |  Branch (174:21): [True: 185, False: 89]
  ------------------
  175|    185|                    if (!BN_sub(r, r, range))
  ------------------
  |  Branch (175:25): [True: 0, False: 185]
  ------------------
  176|      0|                        return 0;
  177|    274|            }
  178|       |
  179|    381|            if (!--count) {
  ------------------
  |  Branch (179:17): [True: 0, False: 381]
  ------------------
  180|      0|                ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_ITERATIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  181|      0|                return 0;
  182|      0|            }
  183|       |
  184|    381|        } while (BN_cmp(r, range) >= 0);
  ------------------
  |  Branch (184:18): [True: 73, False: 308]
  ------------------
  185|    950|    } else {
  186|  1.26k|        do {
  187|       |            /* range = 11..._2  or  range = 101..._2 */
  188|  1.26k|            if (!bnrand(flag, r, n, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   80|  1.26k|#define BN_RAND_TOP_ANY -1
  ------------------
                          if (!bnrand(flag, r, n, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   85|  1.26k|#define BN_RAND_BOTTOM_ANY 0
  ------------------
  |  Branch (188:17): [True: 0, False: 1.26k]
  ------------------
  189|  1.26k|                    strength, ctx))
  190|      0|                return 0;
  191|       |
  192|  1.26k|            if (!--count) {
  ------------------
  |  Branch (192:17): [True: 0, False: 1.26k]
  ------------------
  193|      0|                ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_ITERATIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|                return 0;
  195|      0|            }
  196|  1.26k|        } while (BN_cmp(r, range) >= 0);
  ------------------
  |  Branch (196:18): [True: 319, False: 950]
  ------------------
  197|    950|    }
  198|       |
  199|  1.25k|    bn_check_top(r);
  200|  1.25k|    return 1;
  201|  1.25k|}

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

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

BN_add_word:
   98|   120k|{
   99|   120k|    BN_ULONG l;
  ------------------
  |  |   37|   120k|#define BN_ULONG unsigned long
  ------------------
  100|   120k|    int i;
  101|       |
  102|   120k|    bn_check_top(a);
  103|   120k|    w &= BN_MASK2;
  ------------------
  |  |   93|   120k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  104|       |
  105|       |    /* degenerate case: w is zero */
  106|   120k|    if (!w)
  ------------------
  |  Branch (106:9): [True: 0, False: 120k]
  ------------------
  107|      0|        return 1;
  108|       |    /* degenerate case: a is zero */
  109|   120k|    if (BN_is_zero(a))
  ------------------
  |  Branch (109:9): [True: 0, False: 120k]
  ------------------
  110|      0|        return BN_set_word(a, w);
  111|       |    /* handle 'a' when negative */
  112|   120k|    if (a->neg) {
  ------------------
  |  Branch (112:9): [True: 0, False: 120k]
  ------------------
  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|   240k|    for (i = 0; w != 0 && i < a->top; i++) {
  ------------------
  |  Branch (119:17): [True: 120k, False: 120k]
  |  Branch (119:27): [True: 120k, False: 0]
  ------------------
  120|   120k|        a->d[i] = l = (a->d[i] + w) & BN_MASK2;
  ------------------
  |  |   93|   120k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  121|   120k|        w = (w > l) ? 1 : 0;
  ------------------
  |  Branch (121:13): [True: 0, False: 120k]
  ------------------
  122|   120k|    }
  123|   120k|    if (w && i == a->top) {
  ------------------
  |  Branch (123:9): [True: 0, False: 120k]
  |  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|   120k|    bn_check_top(a);
  130|   120k|    return 1;
  131|   120k|}
BN_sub_word:
  134|   108k|{
  135|   108k|    int i;
  136|       |
  137|   108k|    bn_check_top(a);
  138|   108k|    w &= BN_MASK2;
  ------------------
  |  |   93|   108k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  139|       |
  140|       |    /* degenerate case: w is zero */
  141|   108k|    if (!w)
  ------------------
  |  Branch (141:9): [True: 0, False: 108k]
  ------------------
  142|      0|        return 1;
  143|       |    /* degenerate case: a is zero */
  144|   108k|    if (BN_is_zero(a)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 108k]
  ------------------
  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|   108k|    if (a->neg) {
  ------------------
  |  Branch (151:9): [True: 0, False: 108k]
  ------------------
  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|   108k|    if ((a->top == 1) && (a->d[0] < w)) {
  ------------------
  |  Branch (158:9): [True: 0, False: 108k]
  |  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|   108k|    i = 0;
  164|   216k|    for (;;) {
  165|   216k|        if (a->d[i] >= w) {
  ------------------
  |  Branch (165:13): [True: 108k, False: 108k]
  ------------------
  166|   108k|            a->d[i] -= w;
  167|   108k|            break;
  168|   108k|        } else {
  169|   108k|            a->d[i] = (a->d[i] - w) & BN_MASK2;
  ------------------
  |  |   93|   108k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  170|   108k|            i++;
  171|   108k|            w = 1;
  172|   108k|        }
  173|   216k|    }
  174|   108k|    if ((a->d[i] == 0) && (i == (a->top - 1)))
  ------------------
  |  Branch (174:9): [True: 86, False: 108k]
  |  Branch (174:27): [True: 86, False: 0]
  ------------------
  175|     86|        a->top--;
  176|   108k|    bn_check_top(a);
  177|   108k|    return 1;
  178|   108k|}

ossl_bsearch:
   16|  11.6M|{
   17|  11.6M|    const char *base_ = base;
   18|  11.6M|    int l, h, i = 0, c = 0;
   19|  11.6M|    const char *p = NULL;
   20|       |
   21|  11.6M|    if (num == 0)
  ------------------
  |  Branch (21:9): [True: 0, False: 11.6M]
  ------------------
   22|      0|        return NULL;
   23|  11.6M|    l = 0;
   24|  11.6M|    h = num;
   25|  93.4M|    while (l < h) {
  ------------------
  |  Branch (25:12): [True: 92.8M, False: 639k]
  ------------------
   26|  92.8M|        i = l + (h - l) / 2;
   27|  92.8M|        p = &(base_[i * size]);
   28|  92.8M|        c = (*cmp)(key, p);
   29|  92.8M|        if (c < 0)
  ------------------
  |  Branch (29:13): [True: 53.6M, False: 39.1M]
  ------------------
   30|  53.6M|            h = i;
   31|  39.1M|        else if (c > 0)
  ------------------
  |  Branch (31:18): [True: 28.1M, False: 11.0M]
  ------------------
   32|  28.1M|            l = i + 1;
   33|  11.0M|        else
   34|  11.0M|            break;
   35|  92.8M|    }
   36|  11.6M|    if (c != 0 && !(flags & OSSL_BSEARCH_VALUE_ON_NOMATCH))
  ------------------
  |  |  149|   639k|#define OSSL_BSEARCH_VALUE_ON_NOMATCH 0x01
  ------------------
  |  Branch (36:9): [True: 639k, False: 11.0M]
  |  Branch (36:19): [True: 639k, False: 0]
  ------------------
   37|   639k|        p = NULL;
   38|  11.0M|    else if (c == 0 && (flags & OSSL_BSEARCH_FIRST_VALUE_ON_MATCH)) {
  ------------------
  |  |  150|  11.0M|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  |  Branch (38:14): [True: 11.0M, False: 0]
  |  Branch (38:24): [True: 2.02k, False: 11.0M]
  ------------------
   39|  2.02k|        while (i > 0 && (*cmp)(key, &(base_[(i - 1) * size])) == 0)
  ------------------
  |  Branch (39:16): [True: 1.64k, False: 375]
  |  Branch (39:25): [True: 0, False: 1.64k]
  ------------------
   40|      0|            i--;
   41|  2.02k|        p = &(base_[i * size]);
   42|  2.02k|    }
   43|  11.6M|    return p;
   44|  11.6M|}

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|  1.76M|{
   23|  1.76M|    BUF_MEM *ret;
   24|       |
   25|  1.76M|    ret = BUF_MEM_new();
   26|  1.76M|    if (ret != NULL)
  ------------------
  |  Branch (26:9): [True: 1.76M, False: 0]
  ------------------
   27|  1.76M|        ret->flags = flags;
   28|  1.76M|    return ret;
   29|  1.76M|}
BUF_MEM_new:
   32|  4.39M|{
   33|  4.39M|    BUF_MEM *ret;
   34|       |
   35|  4.39M|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  4.39M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|  4.39M|    if (ret == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 4.39M]
  ------------------
   37|      0|        return NULL;
   38|  4.39M|    return ret;
   39|  4.39M|}
BUF_MEM_free:
   42|  3.53M|{
   43|  3.53M|    if (a == NULL)
  ------------------
  |  Branch (43:9): [True: 6.16k, False: 3.52M]
  ------------------
   44|  6.16k|        return;
   45|  3.52M|    if (a->data != NULL) {
  ------------------
  |  Branch (45:9): [True: 1.32M, False: 2.19M]
  ------------------
   46|  1.32M|        if (a->flags & BUF_MEM_FLAG_SECURE)
  ------------------
  |  |   48|  1.32M|#define BUF_MEM_FLAG_SECURE 0x01
  ------------------
  |  Branch (46:13): [True: 0, False: 1.32M]
  ------------------
   47|      0|            OPENSSL_secure_clear_free(a->data, a->max);
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|  1.32M|        else
   49|  1.32M|            OPENSSL_clear_free(a->data, a->max);
  ------------------
  |  |  129|  1.32M|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   50|  1.32M|    }
   51|  3.52M|    OPENSSL_free(a);
  ------------------
  |  |  131|  3.52M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   52|  3.52M|}
BUF_MEM_grow:
   72|   889k|{
   73|   889k|    char *ret;
   74|   889k|    size_t n;
   75|       |
   76|   889k|    if (str->length >= len) {
  ------------------
  |  Branch (76:9): [True: 0, False: 889k]
  ------------------
   77|      0|        str->length = len;
   78|      0|        return len;
   79|      0|    }
   80|   889k|    if (str->max >= len) {
  ------------------
  |  Branch (80:9): [True: 0, False: 889k]
  ------------------
   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|   889k|    if (len > LIMIT_BEFORE_EXPANSION) {
  ------------------
  |  |   19|   889k|#define LIMIT_BEFORE_EXPANSION 0x5ffffffc
  ------------------
  |  Branch (87:9): [True: 0, False: 889k]
  ------------------
   88|      0|        ERR_raise(ERR_LIB_BUF, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   89|      0|        return 0;
   90|      0|    }
   91|   889k|    n = (len + 3) / 3 * 4;
   92|   889k|    if ((str->flags & BUF_MEM_FLAG_SECURE))
  ------------------
  |  |   48|   889k|#define BUF_MEM_FLAG_SECURE 0x01
  ------------------
  |  Branch (92:9): [True: 0, False: 889k]
  ------------------
   93|      0|        ret = sec_alloc_realloc(str, n);
   94|   889k|    else
   95|   889k|        ret = OPENSSL_realloc(str->data, n);
  ------------------
  |  |  120|   889k|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   96|   889k|    if (ret == NULL) {
  ------------------
  |  Branch (96:9): [True: 0, False: 889k]
  ------------------
   97|      0|        len = 0;
   98|   889k|    } else {
   99|   889k|        str->data = ret;
  100|   889k|        str->max = n;
  101|   889k|        memset(&str->data[str->length], 0, len - str->length);
  102|   889k|        str->length = len;
  103|   889k|    }
  104|   889k|    return len;
  105|   889k|}
BUF_MEM_grow_clean:
  108|  11.6M|{
  109|  11.6M|    char *ret;
  110|  11.6M|    size_t n;
  111|       |
  112|  11.6M|    if (str->length >= len) {
  ------------------
  |  Branch (112:9): [True: 161, False: 11.6M]
  ------------------
  113|    161|        if (str->data != NULL)
  ------------------
  |  Branch (113:13): [True: 161, False: 0]
  ------------------
  114|    161|            memset(&str->data[len], 0, str->length - len);
  115|    161|        str->length = len;
  116|    161|        return len;
  117|    161|    }
  118|  11.6M|    if (str->max >= len) {
  ------------------
  |  Branch (118:9): [True: 6.48M, False: 5.17M]
  ------------------
  119|  6.48M|        memset(&str->data[str->length], 0, len - str->length);
  120|  6.48M|        str->length = len;
  121|  6.48M|        return len;
  122|  6.48M|    }
  123|       |    /* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
  124|  5.17M|    if (len > LIMIT_BEFORE_EXPANSION) {
  ------------------
  |  |   19|  5.17M|#define LIMIT_BEFORE_EXPANSION 0x5ffffffc
  ------------------
  |  Branch (124:9): [True: 0, False: 5.17M]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_BUF, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return 0;
  127|      0|    }
  128|  5.17M|    n = (len + 3) / 3 * 4;
  129|  5.17M|    if ((str->flags & BUF_MEM_FLAG_SECURE))
  ------------------
  |  |   48|  5.17M|#define BUF_MEM_FLAG_SECURE 0x01
  ------------------
  |  Branch (129:9): [True: 0, False: 5.17M]
  ------------------
  130|      0|        ret = sec_alloc_realloc(str, n);
  131|  5.17M|    else
  132|  5.17M|        ret = OPENSSL_clear_realloc(str->data, str->max, n);
  ------------------
  |  |  122|  5.17M|    CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  133|  5.17M|    if (ret == NULL) {
  ------------------
  |  Branch (133:9): [True: 0, False: 5.17M]
  ------------------
  134|      0|        len = 0;
  135|  5.17M|    } else {
  136|  5.17M|        str->data = ret;
  137|  5.17M|        str->max = n;
  138|  5.17M|        memset(&str->data[str->length], 0, len - str->length);
  139|  5.17M|        str->length = len;
  140|  5.17M|    }
  141|  5.17M|    return len;
  142|  5.17M|}

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_CMP_log_close:
   41|      1|{
   42|      1|    (void)OSSL_trace_set_channel(OSSL_TRACE_CATEGORY_CMP, NULL);
  ------------------
  |  |   53|      1|#define OSSL_TRACE_CATEGORY_CMP 13
  ------------------
   43|      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|}

ossl_comp_brotli_cleanup:
  353|      1|{
  354|       |#ifdef BROTLI_SHARED
  355|       |    DSO_free(brotli_encode_dso);
  356|       |    brotli_encode_dso = NULL;
  357|       |    DSO_free(brotli_decode_dso);
  358|       |    brotli_decode_dso = NULL;
  359|       |    p_encode_init = NULL;
  360|       |    p_encode_stream = NULL;
  361|       |    p_encode_has_more = NULL;
  362|       |    p_encode_end = NULL;
  363|       |    p_encode_oneshot = NULL;
  364|       |    p_decode_init = NULL;
  365|       |    p_decode_stream = NULL;
  366|       |    p_decode_has_more = NULL;
  367|       |    p_decode_end = NULL;
  368|       |    p_decode_error = NULL;
  369|       |    p_decode_error_string = NULL;
  370|       |    p_decode_is_finished = NULL;
  371|       |    p_decode_oneshot = NULL;
  372|       |#endif
  373|      1|}

COMP_zlib:
  310|    785|{
  311|    785|    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|    785|    return meth;
  319|    785|}
ossl_comp_zlib_cleanup:
  335|      1|{
  336|       |#ifdef ZLIB_SHARED
  337|       |    DSO_free(zlib_dso);
  338|       |    zlib_dso = NULL;
  339|       |#endif
  340|      1|}

ossl_comp_zstd_cleanup:
  427|      1|{
  428|       |#ifdef ZSTD_SHARED
  429|       |    DSO_free(zstd_dso);
  430|       |    zstd_dso = NULL;
  431|       |    p_createCStream = NULL;
  432|       |    p_initCStream = NULL;
  433|       |    p_freeCStream = NULL;
  434|       |    p_compressStream2 = NULL;
  435|       |    p_flushStream = NULL;
  436|       |    p_endStream = NULL;
  437|       |    p_compress = NULL;
  438|       |    p_createDStream = NULL;
  439|       |    p_initDStream = NULL;
  440|       |    p_freeDStream = NULL;
  441|       |    p_decompressStream = NULL;
  442|       |    p_decompress = NULL;
  443|       |    p_isError = NULL;
  444|       |    p_getErrorName = NULL;
  445|       |    p_DStreamInSize = NULL;
  446|       |    p_CStreamInSize = NULL;
  447|       |#endif
  448|      1|}

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|    785|{
   42|    785|    if (meth == NULL)
  ------------------
  |  Branch (42:9): [True: 785, False: 0]
  ------------------
   43|    785|        return NID_undef;
  ------------------
  |  |   18|    785|#define NID_undef                       0
  ------------------
   44|      0|    return meth->type;
   45|    785|}
COMP_CTX_free:
   55|  11.7k|{
   56|  11.7k|    if (ctx == NULL)
  ------------------
  |  Branch (56:9): [True: 11.7k, False: 0]
  ------------------
   57|  11.7k|        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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      0|}

ossl_load_builtin_compressions:
   29|    785|{
   30|    785|    STACK_OF(SSL_COMP) *comp_methods = NULL;
  ------------------
  |  |   33|    785|#define STACK_OF(type) struct stack_st_##type
  ------------------
   31|    785|#ifndef OPENSSL_NO_COMP
   32|    785|    SSL_COMP *comp = NULL;
   33|    785|    COMP_METHOD *method = COMP_zlib();
   34|       |
   35|    785|    comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
  ------------------
  |  |   72|    785|#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)))
  ------------------
   36|       |
   37|    785|    if (COMP_get_type(method) != NID_undef && comp_methods != NULL) {
  ------------------
  |  |   18|  1.57k|#define NID_undef                       0
  ------------------
  |  Branch (37:9): [True: 0, False: 785]
  |  Branch (37:47): [True: 0, False: 0]
  ------------------
   38|      0|        comp = OPENSSL_malloc(sizeof(*comp));
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|      0|        }
   46|      0|    }
   47|    785|#endif
   48|    785|    return comp_methods;
   49|    785|}
ossl_free_compression_methods_int:
   57|    785|{
   58|    785|    sk_SSL_COMP_pop_free(methods, cmeth_free);
  ------------------
  |  |   84|    785|#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|    785|}

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

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|    785|{
  184|    785|    CONF *ret;
  185|       |
  186|    785|    if (meth == NULL)
  ------------------
  |  Branch (186:9): [True: 785, False: 0]
  ------------------
  187|    785|        meth = NCONF_default();
  188|       |
  189|    785|    ret = meth->create(meth);
  190|    785|    if (ret == NULL) {
  ------------------
  |  Branch (190:9): [True: 0, False: 785]
  ------------------
  191|      0|        ERR_raise(ERR_LIB_CONF, ERR_R_CONF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  192|      0|        return NULL;
  193|      0|    }
  194|    785|    ret->libctx = libctx;
  195|       |
  196|    785|    return ret;
  197|    785|}
NCONF_free:
  205|    785|{
  206|    785|    if (conf == NULL)
  ------------------
  |  Branch (206:9): [True: 0, False: 785]
  ------------------
  207|      0|        return;
  208|    785|    conf->meth->destroy(conf);
  209|    785|}
NCONF_load:
  252|    785|{
  253|    785|    if (conf == NULL) {
  ------------------
  |  Branch (253:9): [True: 0, False: 785]
  ------------------
  254|      0|        ERR_raise(ERR_LIB_CONF, CONF_R_NO_CONF);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  255|      0|        return 0;
  256|      0|    }
  257|       |
  258|    785|    return conf->meth->load(conf, file, eline);
  259|    785|}

CONF_modules_load_file_ex:
  192|    785|{
  193|    785|    char *file = NULL;
  194|    785|    CONF *conf = NULL;
  195|    785|    int ret = 0, diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
  196|       |
  197|    785|    ERR_set_mark();
  198|       |
  199|    785|    if (filename == NULL) {
  ------------------
  |  Branch (199:9): [True: 785, False: 0]
  ------------------
  200|    785|        file = CONF_get1_default_config_file();
  201|    785|        if (file == NULL)
  ------------------
  |  Branch (201:13): [True: 0, False: 785]
  ------------------
  202|      0|            goto err;
  203|    785|        if (*file == '\0') {
  ------------------
  |  Branch (203:13): [True: 0, False: 785]
  ------------------
  204|       |            /* Do not try to load an empty file name but do not error out */
  205|      0|            ret = 1;
  206|      0|            goto err;
  207|      0|        }
  208|    785|    } else {
  209|      0|        file = (char *)filename;
  210|      0|    }
  211|       |
  212|    785|    conf = NCONF_new_ex(libctx, NULL);
  213|    785|    if (conf == NULL)
  ------------------
  |  Branch (213:9): [True: 0, False: 785]
  ------------------
  214|      0|        goto err;
  215|       |
  216|    785|    if (NCONF_load(conf, file, NULL) <= 0) {
  ------------------
  |  Branch (216:9): [True: 785, False: 0]
  ------------------
  217|    785|        if ((flags & CONF_MFLAGS_IGNORE_MISSING_FILE) && (ERR_GET_REASON(ERR_peek_last_error()) == CONF_R_NO_SUCH_FILE)) {
  ------------------
  |  |  114|    785|#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 (217:13): [True: 1, False: 784]
  |  Branch (217:58): [True: 1, False: 0]
  ------------------
  218|      1|            ret = 1;
  219|      1|        }
  220|    785|        goto err;
  221|    785|    }
  222|       |
  223|      0|    ret = CONF_modules_load(conf, appname, flags);
  224|       |    /* CONF_modules_load() might change the diagnostics setting, reread it. */
  225|      0|    diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
  226|       |
  227|    785|err:
  228|    785|    if (filename == NULL)
  ------------------
  |  Branch (228:9): [True: 785, False: 0]
  ------------------
  229|    785|        OPENSSL_free(file);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  230|    785|    NCONF_free(conf);
  231|       |
  232|    785|    if ((flags & CONF_MFLAGS_IGNORE_RETURN_CODES) != 0 && !diagnostics)
  ------------------
  |  |  111|    785|#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
  ------------------
  |  Branch (232:9): [True: 1, False: 784]
  |  Branch (232:59): [True: 1, False: 0]
  ------------------
  233|      1|        ret = 1;
  234|       |
  235|    785|    if (ret > 0)
  ------------------
  |  Branch (235:9): [True: 1, False: 784]
  ------------------
  236|      1|        ERR_pop_to_mark();
  237|    784|    else
  238|    784|        ERR_clear_last_mark();
  239|       |
  240|    785|    return ret;
  241|      0|}
CONF_modules_unload:
  517|      1|{
  518|      1|    int i;
  519|      1|    CONF_MODULE *md;
  520|      1|    STACK_OF(CONF_MODULE) *old_modules;
  ------------------
  |  |   33|      1|#define STACK_OF(type) struct stack_st_##type
  ------------------
  521|      1|    STACK_OF(CONF_MODULE) *new_modules;
  ------------------
  |  |   33|      1|#define STACK_OF(type) struct stack_st_##type
  ------------------
  522|      1|    STACK_OF(CONF_MODULE) *to_delete;
  ------------------
  |  |   33|      1|#define STACK_OF(type) struct stack_st_##type
  ------------------
  523|       |
  524|      1|    if (!conf_modules_finish_int()) /* also inits module list lock */
  ------------------
  |  Branch (524:9): [True: 0, False: 1]
  ------------------
  525|      0|        return;
  526|       |
  527|      1|    ossl_rcu_write_lock(module_list_lock);
  528|       |
  529|      1|    old_modules = ossl_rcu_deref(&supported_modules);
  ------------------
  |  |   30|      1|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  530|      1|    new_modules = sk_CONF_MODULE_dup(old_modules);
  531|       |
  532|      1|    if (new_modules == NULL) {
  ------------------
  |  Branch (532:9): [True: 0, False: 1]
  ------------------
  533|      0|        ossl_rcu_write_unlock(module_list_lock);
  534|      0|        return;
  535|      0|    }
  536|       |
  537|      1|    to_delete = sk_CONF_MODULE_new_null();
  538|       |
  539|       |    /* unload modules in reverse order */
  540|      1|    for (i = sk_CONF_MODULE_num(new_modules) - 1; i >= 0; i--) {
  ------------------
  |  Branch (540:51): [True: 0, False: 1]
  ------------------
  541|      0|        md = sk_CONF_MODULE_value(new_modules, i);
  542|       |        /* If static or in use and 'all' not set ignore it */
  543|      0|        if (((md->links > 0) || !md->dso) && !all)
  ------------------
  |  Branch (543:14): [True: 0, False: 0]
  |  Branch (543:33): [True: 0, False: 0]
  |  Branch (543:46): [True: 0, False: 0]
  ------------------
  544|      0|            continue;
  545|       |        /* Since we're working in reverse this is OK */
  546|      0|        (void)sk_CONF_MODULE_delete(new_modules, i);
  547|      0|        sk_CONF_MODULE_push(to_delete, md);
  548|      0|    }
  549|       |
  550|      1|    if (sk_CONF_MODULE_num(new_modules) == 0) {
  ------------------
  |  Branch (550:9): [True: 1, False: 0]
  ------------------
  551|      1|        sk_CONF_MODULE_free(new_modules);
  552|      1|        new_modules = NULL;
  553|      1|    }
  554|       |
  555|      1|    ossl_rcu_assign_ptr(&supported_modules, &new_modules);
  ------------------
  |  |   31|      1|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  556|      1|    ossl_rcu_write_unlock(module_list_lock);
  557|      1|    ossl_synchronize_rcu(module_list_lock);
  558|      1|    sk_CONF_MODULE_free(old_modules);
  559|      1|    sk_CONF_MODULE_pop_free(to_delete, module_free);
  560|      1|}
ossl_config_modules_free:
  631|      1|{
  632|      1|    CONF_modules_unload(1); /* calls CONF_modules_finish */
  633|      1|    module_lists_free();
  634|      1|}
CONF_get1_default_config_file:
  685|    785|{
  686|    785|    const char *t;
  687|    785|    char *file, *sep = "";
  688|    785|    size_t size;
  689|       |
  690|    785|    if ((file = ossl_safe_getenv("OPENSSL_CONF")) != NULL)
  ------------------
  |  Branch (690:9): [True: 0, False: 785]
  ------------------
  691|      0|        return OPENSSL_strdup(file);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  692|       |
  693|    785|    t = X509_get_default_cert_area();
  694|       |    /*
  695|       |     * On windows systems with -DOSSL_WINCTX set, if the needed registry
  696|       |     * keys are not yet set, openssl applets will return, due to an inability
  697|       |     * to locate various directories, like the default cert area.  In that
  698|       |     * event, clone an empty string here, so that commands like openssl version
  699|       |     * continue to operate properly without needing to set OPENSSL_CONF.
  700|       |     * Applets like cms will fail gracefully later when they try to parse an
  701|       |     * empty config file
  702|       |     */
  703|    785|    if (t == NULL)
  ------------------
  |  Branch (703:9): [True: 0, False: 785]
  ------------------
  704|      0|        return OPENSSL_strdup("");
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  705|       |
  706|    785|#ifndef OPENSSL_SYS_VMS
  707|    785|    sep = "/";
  708|    785|#endif
  709|    785|    size = strlen(t) + strlen(sep) + strlen(OPENSSL_CONF) + 1;
  ------------------
  |  |   80|    785|#define OPENSSL_CONF "openssl.cnf"
  ------------------
  710|    785|    file = OPENSSL_malloc(size);
  ------------------
  |  |  106|    785|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  711|       |
  712|    785|    if (file == NULL)
  ------------------
  |  Branch (712:9): [True: 0, False: 785]
  ------------------
  713|      0|        return NULL;
  714|    785|    BIO_snprintf(file, size, "%s%s%s", t, sep, OPENSSL_CONF);
  ------------------
  |  |   80|    785|#define OPENSSL_CONF "openssl.cnf"
  ------------------
  715|       |
  716|    785|    return file;
  717|    785|}
CONF_parse_list:
  729|  18.7k|{
  730|  18.7k|    int ret;
  731|  18.7k|    const char *lstart, *tmpend, *p;
  732|       |
  733|  18.7k|    if (list_ == NULL) {
  ------------------
  |  Branch (733:9): [True: 0, False: 18.7k]
  ------------------
  734|      0|        ERR_raise(ERR_LIB_CONF, CONF_R_LIST_CANNOT_BE_NULL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  735|      0|        return 0;
  736|      0|    }
  737|       |
  738|  18.7k|    lstart = list_;
  739|  50.4k|    for (;;) {
  740|  50.4k|        if (nospc) {
  ------------------
  |  Branch (740:13): [True: 50.4k, False: 0]
  ------------------
  741|  60.2k|            while (*lstart && isspace((unsigned char)*lstart))
  ------------------
  |  Branch (741:20): [True: 60.2k, False: 12]
  |  Branch (741:31): [True: 9.88k, False: 50.3k]
  ------------------
  742|  9.88k|                lstart++;
  743|  50.4k|        }
  744|  50.4k|        p = strchr(lstart, sep);
  745|  50.4k|        if (p == lstart || *lstart == '\0')
  ------------------
  |  Branch (745:13): [True: 3.73k, False: 46.6k]
  |  Branch (745:28): [True: 12, False: 46.6k]
  ------------------
  746|  3.75k|            ret = list_cb(NULL, 0, arg);
  747|  46.6k|        else {
  748|  46.6k|            if (p)
  ------------------
  |  Branch (748:17): [True: 27.9k, False: 18.7k]
  ------------------
  749|  27.9k|                tmpend = p - 1;
  750|  18.7k|            else
  751|  18.7k|                tmpend = lstart + strlen(lstart) - 1;
  752|  46.6k|            if (nospc) {
  ------------------
  |  Branch (752:17): [True: 46.6k, False: 0]
  ------------------
  753|  46.6k|                while (isspace((unsigned char)*tmpend))
  ------------------
  |  Branch (753:24): [True: 10.5k, False: 46.6k]
  ------------------
  754|  10.5k|                    tmpend--;
  755|  46.6k|            }
  756|  46.6k|            ret = list_cb(lstart, (int)(tmpend - lstart + 1), arg);
  757|  46.6k|        }
  758|  50.4k|        if (ret <= 0)
  ------------------
  |  Branch (758:13): [True: 146, False: 50.2k]
  ------------------
  759|    146|            return ret;
  760|  50.2k|        if (p == NULL)
  ------------------
  |  Branch (760:13): [True: 18.6k, False: 31.6k]
  ------------------
  761|  18.6k|            return 1;
  762|  31.6k|        lstart = p + 1;
  763|  31.6k|    }
  764|  18.7k|}
conf_mod.c:do_init_module_list_lock:
  101|      1|{
  102|      1|    module_list_lock = ossl_rcu_lock_new(1, NULL);
  103|      1|    if (module_list_lock == NULL) {
  ------------------
  |  Branch (103:9): [True: 0, False: 1]
  ------------------
  104|      0|        ERR_raise(ERR_LIB_CONF, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  105|      0|        return 0;
  106|      0|    }
  107|       |
  108|      1|    return 1;
  109|      1|}
conf_mod.c:conf_modules_finish_int:
  573|      1|{
  574|      1|    CONF_IMODULE *imod;
  575|      1|    STACK_OF(CONF_IMODULE) *old_modules;
  ------------------
  |  |   33|      1|#define STACK_OF(type) struct stack_st_##type
  ------------------
  576|      1|    STACK_OF(CONF_IMODULE) *new_modules = NULL;
  ------------------
  |  |   33|      1|#define STACK_OF(type) struct stack_st_##type
  ------------------
  577|       |
  578|      1|    if (!RUN_ONCE(&init_module_list_lock, do_init_module_list_lock))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (578:9): [True: 0, False: 1]
  ------------------
  579|      0|        return 0;
  580|       |
  581|       |    /* If module_list_lock is NULL here it means we were already unloaded */
  582|      1|    if (module_list_lock == NULL)
  ------------------
  |  Branch (582:9): [True: 0, False: 1]
  ------------------
  583|      0|        return 0;
  584|       |
  585|      1|    ossl_rcu_write_lock(module_list_lock);
  586|      1|    old_modules = ossl_rcu_deref(&initialized_modules);
  ------------------
  |  |   30|      1|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  587|      1|    ossl_rcu_assign_ptr(&initialized_modules, &new_modules);
  ------------------
  |  |   31|      1|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  588|      1|    ossl_rcu_write_unlock(module_list_lock);
  589|      1|    ossl_synchronize_rcu(module_list_lock);
  590|       |
  591|      1|    while (sk_CONF_IMODULE_num(old_modules) > 0) {
  ------------------
  |  Branch (591:12): [True: 0, False: 1]
  ------------------
  592|      0|        imod = sk_CONF_IMODULE_pop(old_modules);
  593|      0|        module_finish(imod);
  594|      0|    }
  595|      1|    sk_CONF_IMODULE_free(old_modules);
  596|       |
  597|      1|    return 1;
  598|      1|}
conf_mod.c:module_lists_free:
   89|      1|{
   90|      1|    ossl_rcu_lock_free(module_list_lock);
   91|      1|    module_list_lock = NULL;
   92|       |
   93|      1|    sk_CONF_MODULE_free(supported_modules);
   94|      1|    supported_modules = NULL;
   95|       |
   96|      1|    sk_CONF_IMODULE_free(initialized_modules);
   97|       |    initialized_modules = NULL;
   98|      1|}

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

conf_ssl_name_find:
  148|  2.70k|{
  149|  2.70k|    size_t i;
  150|  2.70k|    const struct ssl_conf_name_st *nm;
  151|       |
  152|  2.70k|    if (name == NULL)
  ------------------
  |  Branch (152:9): [True: 0, False: 2.70k]
  ------------------
  153|      0|        return 0;
  154|  2.70k|    for (i = 0, nm = ssl_names; i < ssl_names_count; i++, nm++) {
  ------------------
  |  Branch (154:33): [True: 0, False: 2.70k]
  ------------------
  155|      0|        if (strcmp(nm->name, name) == 0) {
  ------------------
  |  Branch (155:13): [True: 0, False: 0]
  ------------------
  156|      0|            *idx = i;
  157|      0|            return 1;
  158|      0|        }
  159|      0|    }
  160|  2.70k|    return 0;
  161|  2.70k|}

ossl_lib_ctx_write_lock:
   59|  1.18k|{
   60|  1.18k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (60:9): [True: 0, False: 1.18k]
  ------------------
   61|      0|        return 0;
   62|  1.18k|    return CRYPTO_THREAD_write_lock(ctx->lock);
   63|  1.18k|}
ossl_lib_ctx_read_lock:
   66|   169k|{
   67|   169k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (67:9): [True: 0, False: 169k]
  ------------------
   68|      0|        return 0;
   69|   169k|    return CRYPTO_THREAD_read_lock(ctx->lock);
   70|   169k|}
ossl_lib_ctx_unlock:
   73|   170k|{
   74|   170k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (74:9): [True: 0, False: 170k]
  ------------------
   75|      0|        return 0;
   76|   170k|    return CRYPTO_THREAD_unlock(ctx->lock);
   77|   170k|}
ossl_lib_ctx_default_deinit:
  400|      1|{
  401|      1|    if (!default_context_inited)
  ------------------
  |  Branch (401:9): [True: 0, False: 1]
  ------------------
  402|      0|        return;
  403|      1|    context_deinit(&default_context_int);
  404|      1|    CRYPTO_THREAD_cleanup_local(&default_context_thread_local);
  405|      1|    default_context_inited = 0;
  406|      1|}
OSSL_LIB_CTX_new:
  435|    784|{
  436|    784|    OSSL_LIB_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|    784|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  437|       |
  438|    784|    if (ctx != NULL && !context_init(ctx)) {
  ------------------
  |  Branch (438:9): [True: 784, False: 0]
  |  Branch (438:24): [True: 0, False: 784]
  ------------------
  439|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  440|       |        ctx = NULL;
  441|      0|    }
  442|    784|    return ctx;
  443|    784|}
OSSL_LIB_CTX_load_config:
  480|    784|{
  481|       |    return CONF_modules_load_file_ex(ctx, config_file, NULL, 0) > 0;
  482|    784|}
OSSL_LIB_CTX_free:
  486|  22.6k|{
  487|  22.6k|    if (ctx == NULL || ossl_lib_ctx_is_default(ctx))
  ------------------
  |  Branch (487:9): [True: 21.8k, False: 784]
  |  Branch (487:24): [True: 0, False: 784]
  ------------------
  488|  21.8k|        return;
  489|       |
  490|    784|#ifndef FIPS_MODULE
  491|    784|    if (ctx->ischild)
  ------------------
  |  Branch (491:9): [True: 0, False: 784]
  ------------------
  492|      0|        ossl_provider_deinit_child(ctx);
  493|    784|#endif
  494|    784|    context_deinit(ctx);
  495|    784|    OPENSSL_free(ctx);
  ------------------
  |  |  131|    784|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  496|    784|}
OSSL_LIB_CTX_get0_global_default:
  500|      1|{
  501|      1|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (501:9): [True: 0, False: 1]
  ------------------
  502|      0|        return NULL;
  503|       |
  504|      1|    return &default_context_int;
  505|      1|}
OSSL_LIB_CTX_set0_default:
  508|  2.70k|{
  509|  2.70k|    OSSL_LIB_CTX *current_defctx;
  510|       |
  511|  2.70k|    if ((current_defctx = get_default_context()) != NULL) {
  ------------------
  |  Branch (511:9): [True: 2.70k, False: 0]
  ------------------
  512|  2.70k|        if (libctx != NULL)
  ------------------
  |  Branch (512:13): [True: 0, False: 2.70k]
  ------------------
  513|      0|            set_default_context(libctx);
  514|  2.70k|        return current_defctx;
  515|  2.70k|    }
  516|       |
  517|      0|    return NULL;
  518|  2.70k|}
ossl_release_default_drbg_ctx:
  521|      1|{
  522|       |    /* early release of the DRBG in global default libctx */
  523|      1|    if (default_context_int.drbg != NULL) {
  ------------------
  |  Branch (523:9): [True: 1, False: 0]
  ------------------
  524|      1|        ossl_rand_ctx_free(default_context_int.drbg);
  525|       |        default_context_int.drbg = NULL;
  526|      1|    }
  527|      1|}
ossl_lib_ctx_get_concrete:
  531|  17.7M|{
  532|  17.7M|#ifndef FIPS_MODULE
  533|  17.7M|    if (ctx == NULL)
  ------------------
  |  Branch (533:9): [True: 12.0M, False: 5.64M]
  ------------------
  534|  12.0M|        return get_default_context();
  535|  5.64M|#endif
  536|  5.64M|    return ctx;
  537|  17.7M|}
ossl_lib_ctx_is_default:
  540|   152k|{
  541|   152k|#ifndef FIPS_MODULE
  542|   152k|    if (ctx == NULL || ctx == get_default_context())
  ------------------
  |  Branch (542:9): [True: 38.8k, False: 113k]
  |  Branch (542:24): [True: 10.8k, False: 103k]
  ------------------
  543|  49.6k|        return 1;
  544|   103k|#endif
  545|   103k|    return 0;
  546|   152k|}
ossl_lib_ctx_is_global_default:
  549|  51.5k|{
  550|  51.5k|#ifndef FIPS_MODULE
  551|  51.5k|    if (ossl_lib_ctx_get_concrete(ctx) == &default_context_int)
  ------------------
  |  Branch (551:9): [True: 34.4k, False: 17.0k]
  ------------------
  552|  34.4k|        return 1;
  553|  17.0k|#endif
  554|  17.0k|    return 0;
  555|  51.5k|}
ossl_lib_ctx_get_data:
  558|  7.56M|{
  559|  7.56M|    ctx = ossl_lib_ctx_get_concrete(ctx);
  560|  7.56M|    if (ctx == NULL)
  ------------------
  |  Branch (560:9): [True: 0, False: 7.56M]
  ------------------
  561|      0|        return NULL;
  562|       |
  563|  7.56M|    switch (index) {
  564|   239k|    case OSSL_LIB_CTX_PROPERTY_STRING_INDEX:
  ------------------
  |  |   99|   239k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  |  Branch (564:5): [True: 239k, False: 7.32M]
  ------------------
  565|   239k|        return ctx->property_string_data;
  566|  1.27M|    case OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX:
  ------------------
  |  |   96|  1.27M|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
  |  Branch (566:5): [True: 1.27M, False: 6.29M]
  ------------------
  567|  1.27M|        return ctx->evp_method_store;
  568|  95.3k|    case OSSL_LIB_CTX_PROVIDER_STORE_INDEX:
  ------------------
  |  |   97|  95.3k|#define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
  ------------------
  |  Branch (568:5): [True: 95.3k, False: 7.46M]
  ------------------
  569|  95.3k|        return ctx->provider_store;
  570|  5.27M|    case OSSL_LIB_CTX_NAMEMAP_INDEX:
  ------------------
  |  |  100|  5.27M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  |  Branch (570:5): [True: 5.27M, False: 2.29M]
  ------------------
  571|  5.27M|        return ctx->namemap;
  572|   170k|    case OSSL_LIB_CTX_PROPERTY_DEFN_INDEX:
  ------------------
  |  |   98|   170k|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
  |  Branch (572:5): [True: 170k, False: 7.39M]
  ------------------
  573|   170k|        return ctx->property_defns;
  574|  34.9k|    case OSSL_LIB_CTX_GLOBAL_PROPERTIES:
  ------------------
  |  |  112|  34.9k|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  |  Branch (574:5): [True: 34.9k, False: 7.52M]
  ------------------
  575|  34.9k|        return ctx->global_properties;
  576|  32.6k|    case OSSL_LIB_CTX_DRBG_INDEX:
  ------------------
  |  |  101|  32.6k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
  |  Branch (576:5): [True: 32.6k, False: 7.52M]
  ------------------
  577|  32.6k|        return ctx->drbg;
  578|      0|    case OSSL_LIB_CTX_DRBG_NONCE_INDEX:
  ------------------
  |  |  102|      0|#define OSSL_LIB_CTX_DRBG_NONCE_INDEX 6
  ------------------
  |  Branch (578:5): [True: 0, False: 7.56M]
  ------------------
  579|      0|        return ctx->drbg_nonce;
  580|      0|#ifndef FIPS_MODULE
  581|      0|    case OSSL_LIB_CTX_PROVIDER_CONF_INDEX:
  ------------------
  |  |  114|      0|#define OSSL_LIB_CTX_PROVIDER_CONF_INDEX 16
  ------------------
  |  Branch (581:5): [True: 0, False: 7.56M]
  ------------------
  582|      0|        return ctx->provider_conf;
  583|      0|    case OSSL_LIB_CTX_BIO_CORE_INDEX:
  ------------------
  |  |  115|      0|#define OSSL_LIB_CTX_BIO_CORE_INDEX 17
  ------------------
  |  Branch (583:5): [True: 0, False: 7.56M]
  ------------------
  584|      0|        return ctx->bio_core;
  585|      0|    case OSSL_LIB_CTX_CHILD_PROVIDER_INDEX:
  ------------------
  |  |  116|      0|#define OSSL_LIB_CTX_CHILD_PROVIDER_INDEX 18
  ------------------
  |  Branch (585:5): [True: 0, False: 7.56M]
  ------------------
  586|      0|        return ctx->child_provider;
  587|  1.93k|    case OSSL_LIB_CTX_DECODER_STORE_INDEX:
  ------------------
  |  |  109|  1.93k|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  |  Branch (587:5): [True: 1.93k, False: 7.56M]
  ------------------
  588|  1.93k|        return ctx->decoder_store;
  589|   438k|    case OSSL_LIB_CTX_DECODER_CACHE_INDEX:
  ------------------
  |  |  118|   438k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  |  Branch (589:5): [True: 438k, False: 7.12M]
  ------------------
  590|   438k|        return ctx->decoder_cache;
  591|  1.84k|    case OSSL_LIB_CTX_ENCODER_STORE_INDEX:
  ------------------
  |  |  108|  1.84k|#define OSSL_LIB_CTX_ENCODER_STORE_INDEX 10
  ------------------
  |  Branch (591:5): [True: 1.84k, False: 7.56M]
  ------------------
  592|  1.84k|        return ctx->encoder_store;
  593|  1.84k|    case OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX:
  ------------------
  |  |  113|  1.84k|#define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX 15
  ------------------
  |  Branch (593:5): [True: 1.84k, False: 7.56M]
  ------------------
  594|  1.84k|        return ctx->store_loader_store;
  595|      0|    case OSSL_LIB_CTX_SELF_TEST_CB_INDEX:
  ------------------
  |  |  110|      0|#define OSSL_LIB_CTX_SELF_TEST_CB_INDEX 12
  ------------------
  |  Branch (595:5): [True: 0, False: 7.56M]
  ------------------
  596|      0|        return ctx->self_test_cb;
  597|      0|    case OSSL_LIB_CTX_INDICATOR_CB_INDEX:
  ------------------
  |  |  120|      0|#define OSSL_LIB_CTX_INDICATOR_CB_INDEX 22
  ------------------
  |  Branch (597:5): [True: 0, False: 7.56M]
  ------------------
  598|      0|        return ctx->indicator_cb;
  599|      0|#endif
  600|      0|#ifndef OPENSSL_NO_THREAD_POOL
  601|      0|    case OSSL_LIB_CTX_THREAD_INDEX:
  ------------------
  |  |  117|      0|#define OSSL_LIB_CTX_THREAD_INDEX 19
  ------------------
  |  Branch (601:5): [True: 0, False: 7.56M]
  ------------------
  602|      0|        return ctx->threads;
  603|      0|#endif
  604|       |
  605|       |#ifdef FIPS_MODULE
  606|       |    case OSSL_LIB_CTX_FIPS_PROV_INDEX:
  607|       |        return ctx->fips_prov;
  608|       |#endif
  609|       |
  610|  2.70k|    case OSSL_LIB_CTX_COMP_METHODS:
  ------------------
  |  |  119|  2.70k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
  |  Branch (610:5): [True: 2.70k, False: 7.55M]
  ------------------
  611|  2.70k|        return (void *)&ctx->comp_methods;
  612|       |
  613|      0|    default:
  ------------------
  |  Branch (613:5): [True: 0, False: 7.56M]
  ------------------
  614|       |        return NULL;
  615|  7.56M|    }
  616|  7.56M|}
OSSL_LIB_CTX_get_data:
  619|  2.70k|{
  620|  2.70k|    return ossl_lib_ctx_get_data(ctx, index);
  621|  2.70k|}
ossl_lib_ctx_get_ex_data_global:
  624|  9.69M|{
  625|  9.69M|    ctx = ossl_lib_ctx_get_concrete(ctx);
  626|  9.69M|    if (ctx == NULL)
  ------------------
  |  Branch (626:9): [True: 0, False: 9.69M]
  ------------------
  627|      0|        return NULL;
  628|  9.69M|    return &ctx->global;
  629|  9.69M|}
ossl_lib_ctx_get_descriptor:
  632|  51.5k|{
  633|       |#ifdef FIPS_MODULE
  634|       |    return "FIPS internal library context";
  635|       |#else
  636|  51.5k|    if (ossl_lib_ctx_is_global_default(libctx))
  ------------------
  |  Branch (636:9): [True: 34.4k, False: 17.0k]
  ------------------
  637|  34.4k|        return "Global default library context";
  638|  17.0k|    if (ossl_lib_ctx_is_default(libctx))
  ------------------
  |  Branch (638:9): [True: 0, False: 17.0k]
  ------------------
  639|      0|        return "Thread-local default library context";
  640|  17.0k|    return "Non-default library context";
  641|  17.0k|#endif
  642|  17.0k|}
OSSL_LIB_CTX_get_conf_diagnostics:
  645|    785|{
  646|    785|    libctx = ossl_lib_ctx_get_concrete(libctx);
  647|    785|    if (libctx == NULL)
  ------------------
  |  Branch (647:9): [True: 0, False: 785]
  ------------------
  648|      0|        return 0;
  649|    785|    return libctx->conf_diagnostics;
  650|    785|}
context.c:context_deinit:
  359|    785|{
  360|    785|    if (ctx == NULL)
  ------------------
  |  Branch (360:9): [True: 0, False: 785]
  ------------------
  361|      0|        return 1;
  362|       |
  363|    785|    ossl_ctx_thread_stop(ctx);
  364|       |
  365|    785|    context_deinit_objs(ctx);
  366|       |
  367|    785|    ossl_crypto_cleanup_all_ex_data_int(ctx);
  368|       |
  369|    785|    CRYPTO_THREAD_lock_free(ctx->lock);
  370|       |    ctx->lock = NULL;
  371|    785|    return 1;
  372|    785|}
context.c:context_deinit_objs:
  229|    785|{
  230|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  231|    785|    if (ctx->evp_method_store != NULL) {
  ------------------
  |  Branch (231:9): [True: 785, False: 0]
  ------------------
  232|    785|        ossl_method_store_free(ctx->evp_method_store);
  233|    785|        ctx->evp_method_store = NULL;
  234|    785|    }
  235|       |
  236|       |    /* P2. */
  237|    785|    if (ctx->drbg != NULL) {
  ------------------
  |  Branch (237:9): [True: 784, False: 1]
  ------------------
  238|    784|        ossl_rand_ctx_free(ctx->drbg);
  239|    784|        ctx->drbg = NULL;
  240|    784|    }
  241|       |
  242|    785|#ifndef FIPS_MODULE
  243|       |    /* P2. */
  244|    785|    if (ctx->provider_conf != NULL) {
  ------------------
  |  Branch (244:9): [True: 785, False: 0]
  ------------------
  245|    785|        ossl_prov_conf_ctx_free(ctx->provider_conf);
  246|    785|        ctx->provider_conf = NULL;
  247|    785|    }
  248|       |
  249|       |    /*
  250|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  251|       |     * provider store
  252|       |     */
  253|    785|    if (ctx->decoder_store != NULL) {
  ------------------
  |  Branch (253:9): [True: 785, False: 0]
  ------------------
  254|    785|        ossl_method_store_free(ctx->decoder_store);
  255|    785|        ctx->decoder_store = NULL;
  256|    785|    }
  257|    785|    if (ctx->decoder_cache != NULL) {
  ------------------
  |  Branch (257:9): [True: 785, False: 0]
  ------------------
  258|    785|        ossl_decoder_cache_free(ctx->decoder_cache);
  259|    785|        ctx->decoder_cache = NULL;
  260|    785|    }
  261|       |
  262|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  263|    785|    if (ctx->encoder_store != NULL) {
  ------------------
  |  Branch (263:9): [True: 785, False: 0]
  ------------------
  264|    785|        ossl_method_store_free(ctx->encoder_store);
  265|    785|        ctx->encoder_store = NULL;
  266|    785|    }
  267|       |
  268|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  269|    785|    if (ctx->store_loader_store != NULL) {
  ------------------
  |  Branch (269:9): [True: 785, False: 0]
  ------------------
  270|    785|        ossl_method_store_free(ctx->store_loader_store);
  271|    785|        ctx->store_loader_store = NULL;
  272|    785|    }
  273|    785|#endif
  274|       |
  275|       |    /* P1. Needs to be freed before the child provider data is freed */
  276|    785|    if (ctx->provider_store != NULL) {
  ------------------
  |  Branch (276:9): [True: 785, False: 0]
  ------------------
  277|    785|        ossl_provider_store_free(ctx->provider_store);
  278|    785|        ctx->provider_store = NULL;
  279|    785|    }
  280|       |
  281|       |    /* Default priority. */
  282|    785|    if (ctx->property_string_data != NULL) {
  ------------------
  |  Branch (282:9): [True: 785, False: 0]
  ------------------
  283|    785|        ossl_property_string_data_free(ctx->property_string_data);
  284|    785|        ctx->property_string_data = NULL;
  285|    785|    }
  286|       |
  287|    785|    if (ctx->namemap != NULL) {
  ------------------
  |  Branch (287:9): [True: 785, False: 0]
  ------------------
  288|    785|        ossl_stored_namemap_free(ctx->namemap);
  289|    785|        ctx->namemap = NULL;
  290|    785|    }
  291|       |
  292|    785|    if (ctx->property_defns != NULL) {
  ------------------
  |  Branch (292:9): [True: 785, False: 0]
  ------------------
  293|    785|        ossl_property_defns_free(ctx->property_defns);
  294|    785|        ctx->property_defns = NULL;
  295|    785|    }
  296|       |
  297|    785|    if (ctx->global_properties != NULL) {
  ------------------
  |  Branch (297:9): [True: 785, False: 0]
  ------------------
  298|    785|        ossl_ctx_global_properties_free(ctx->global_properties);
  299|    785|        ctx->global_properties = NULL;
  300|    785|    }
  301|       |
  302|    785|#ifndef FIPS_MODULE
  303|    785|    if (ctx->bio_core != NULL) {
  ------------------
  |  Branch (303:9): [True: 785, False: 0]
  ------------------
  304|    785|        ossl_bio_core_globals_free(ctx->bio_core);
  305|    785|        ctx->bio_core = NULL;
  306|    785|    }
  307|    785|#endif
  308|       |
  309|    785|    if (ctx->drbg_nonce != NULL) {
  ------------------
  |  Branch (309:9): [True: 785, False: 0]
  ------------------
  310|    785|        ossl_prov_drbg_nonce_ctx_free(ctx->drbg_nonce);
  311|    785|        ctx->drbg_nonce = NULL;
  312|    785|    }
  313|       |
  314|    785|#ifndef FIPS_MODULE
  315|    785|    if (ctx->indicator_cb != NULL) {
  ------------------
  |  Branch (315:9): [True: 785, False: 0]
  ------------------
  316|    785|        ossl_indicator_set_callback_free(ctx->indicator_cb);
  317|    785|        ctx->indicator_cb = NULL;
  318|    785|    }
  319|       |
  320|    785|    if (ctx->self_test_cb != NULL) {
  ------------------
  |  Branch (320:9): [True: 785, False: 0]
  ------------------
  321|    785|        ossl_self_test_set_callback_free(ctx->self_test_cb);
  322|    785|        ctx->self_test_cb = NULL;
  323|    785|    }
  324|    785|#endif
  325|       |
  326|       |#ifdef FIPS_MODULE
  327|       |    ossl_thread_event_ctx_free(ctx);
  328|       |
  329|       |    if (ctx->fips_prov != NULL) {
  330|       |        ossl_fips_prov_ossl_ctx_free(ctx->fips_prov);
  331|       |        ctx->fips_prov = NULL;
  332|       |    }
  333|       |#endif
  334|       |
  335|    785|#ifndef OPENSSL_NO_THREAD_POOL
  336|    785|    if (ctx->threads != NULL) {
  ------------------
  |  Branch (336:9): [True: 785, False: 0]
  ------------------
  337|    785|        ossl_threads_ctx_free(ctx->threads);
  338|    785|        ctx->threads = NULL;
  339|    785|    }
  340|    785|#endif
  341|       |
  342|       |    /* Low priority. */
  343|    785|#ifndef FIPS_MODULE
  344|    785|    if (ctx->child_provider != NULL) {
  ------------------
  |  Branch (344:9): [True: 785, False: 0]
  ------------------
  345|    785|        ossl_child_prov_ctx_free(ctx->child_provider);
  346|    785|        ctx->child_provider = NULL;
  347|    785|    }
  348|    785|#endif
  349|       |
  350|    785|#ifndef FIPS_MODULE
  351|    785|    if (ctx->comp_methods != NULL) {
  ------------------
  |  Branch (351:9): [True: 785, False: 0]
  ------------------
  352|    785|        ossl_free_compression_methods_int(ctx->comp_methods);
  353|       |        ctx->comp_methods = NULL;
  354|    785|    }
  355|    785|#endif
  356|    785|}
context.c:context_init:
   91|    785|{
   92|    785|    int exdata_done = 0;
   93|       |
   94|    785|    ctx->lock = CRYPTO_THREAD_lock_new();
   95|    785|    if (ctx->lock == NULL)
  ------------------
  |  Branch (95:9): [True: 0, False: 785]
  ------------------
   96|      0|        goto err;
   97|       |
   98|       |    /* Initialize ex_data. */
   99|    785|    if (!ossl_do_ex_data_init(ctx))
  ------------------
  |  Branch (99:9): [True: 0, False: 785]
  ------------------
  100|      0|        goto err;
  101|    785|    exdata_done = 1;
  102|       |
  103|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  104|    785|    ctx->evp_method_store = ossl_method_store_new(ctx);
  105|    785|    if (ctx->evp_method_store == NULL)
  ------------------
  |  Branch (105:9): [True: 0, False: 785]
  ------------------
  106|      0|        goto err;
  107|    785|    OSSL_TRACE1(QUERY, "context_init: allocating store %p\n", ctx->evp_method_store);
  ------------------
  |  |  293|    785|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  285|    785|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  108|       |
  109|    785|#ifndef FIPS_MODULE
  110|       |    /* P2. Must be freed before the provider store is freed */
  111|    785|    ctx->provider_conf = ossl_prov_conf_ctx_new(ctx);
  112|    785|    if (ctx->provider_conf == NULL)
  ------------------
  |  Branch (112:9): [True: 0, False: 785]
  ------------------
  113|      0|        goto err;
  114|    785|#endif
  115|       |
  116|       |    /* P2. */
  117|    785|    ctx->drbg = ossl_rand_ctx_new(ctx);
  118|    785|    if (ctx->drbg == NULL)
  ------------------
  |  Branch (118:9): [True: 0, False: 785]
  ------------------
  119|      0|        goto err;
  120|       |
  121|    785|#ifndef FIPS_MODULE
  122|       |    /*
  123|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  124|       |     * provider store
  125|       |     */
  126|    785|    ctx->decoder_store = ossl_method_store_new(ctx);
  127|    785|    if (ctx->decoder_store == NULL)
  ------------------
  |  Branch (127:9): [True: 0, False: 785]
  ------------------
  128|      0|        goto err;
  129|    785|    ctx->decoder_cache = ossl_decoder_cache_new(ctx);
  130|    785|    if (ctx->decoder_cache == NULL)
  ------------------
  |  Branch (130:9): [True: 0, False: 785]
  ------------------
  131|      0|        goto err;
  132|       |
  133|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  134|    785|    ctx->encoder_store = ossl_method_store_new(ctx);
  135|    785|    if (ctx->encoder_store == NULL)
  ------------------
  |  Branch (135:9): [True: 0, False: 785]
  ------------------
  136|      0|        goto err;
  137|       |
  138|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  139|    785|    ctx->store_loader_store = ossl_method_store_new(ctx);
  140|    785|    if (ctx->store_loader_store == NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 785]
  ------------------
  141|      0|        goto err;
  142|    785|#endif
  143|       |
  144|       |    /* P1. Needs to be freed before the child provider data is freed */
  145|    785|    ctx->provider_store = ossl_provider_store_new(ctx);
  146|    785|    if (ctx->provider_store == NULL)
  ------------------
  |  Branch (146:9): [True: 0, False: 785]
  ------------------
  147|      0|        goto err;
  148|       |
  149|       |    /* Default priority. */
  150|    785|    ctx->property_string_data = ossl_property_string_data_new(ctx);
  151|    785|    if (ctx->property_string_data == NULL)
  ------------------
  |  Branch (151:9): [True: 0, False: 785]
  ------------------
  152|      0|        goto err;
  153|       |
  154|    785|    ctx->namemap = ossl_stored_namemap_new(ctx);
  155|    785|    if (ctx->namemap == NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 785]
  ------------------
  156|      0|        goto err;
  157|       |
  158|    785|    ctx->property_defns = ossl_property_defns_new(ctx);
  159|    785|    if (ctx->property_defns == NULL)
  ------------------
  |  Branch (159:9): [True: 0, False: 785]
  ------------------
  160|      0|        goto err;
  161|       |
  162|    785|    ctx->global_properties = ossl_ctx_global_properties_new(ctx);
  163|    785|    if (ctx->global_properties == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 785]
  ------------------
  164|      0|        goto err;
  165|       |
  166|    785|#ifndef FIPS_MODULE
  167|    785|    ctx->bio_core = ossl_bio_core_globals_new(ctx);
  168|    785|    if (ctx->bio_core == NULL)
  ------------------
  |  Branch (168:9): [True: 0, False: 785]
  ------------------
  169|      0|        goto err;
  170|    785|#endif
  171|       |
  172|    785|    ctx->drbg_nonce = ossl_prov_drbg_nonce_ctx_new(ctx);
  173|    785|    if (ctx->drbg_nonce == NULL)
  ------------------
  |  Branch (173:9): [True: 0, False: 785]
  ------------------
  174|      0|        goto err;
  175|       |
  176|    785|#ifndef FIPS_MODULE
  177|    785|    ctx->self_test_cb = ossl_self_test_set_callback_new(ctx);
  178|    785|    if (ctx->self_test_cb == NULL)
  ------------------
  |  Branch (178:9): [True: 0, False: 785]
  ------------------
  179|      0|        goto err;
  180|    785|    ctx->indicator_cb = ossl_indicator_set_callback_new(ctx);
  181|    785|    if (ctx->indicator_cb == NULL)
  ------------------
  |  Branch (181:9): [True: 0, False: 785]
  ------------------
  182|      0|        goto err;
  183|    785|#endif
  184|       |
  185|       |#ifdef FIPS_MODULE
  186|       |    if (!ossl_thread_event_ctx_new(ctx))
  187|       |        goto err;
  188|       |
  189|       |    ctx->fips_prov = ossl_fips_prov_ossl_ctx_new(ctx);
  190|       |    if (ctx->fips_prov == NULL)
  191|       |        goto err;
  192|       |#endif
  193|       |
  194|    785|#ifndef OPENSSL_NO_THREAD_POOL
  195|    785|    ctx->threads = ossl_threads_ctx_new(ctx);
  196|    785|    if (ctx->threads == NULL)
  ------------------
  |  Branch (196:9): [True: 0, False: 785]
  ------------------
  197|      0|        goto err;
  198|    785|#endif
  199|       |
  200|       |    /* Low priority. */
  201|    785|#ifndef FIPS_MODULE
  202|    785|    ctx->child_provider = ossl_child_prov_ctx_new(ctx);
  203|    785|    if (ctx->child_provider == NULL)
  ------------------
  |  Branch (203:9): [True: 0, False: 785]
  ------------------
  204|      0|        goto err;
  205|    785|#endif
  206|       |
  207|       |    /* Everything depends on properties, so we also pre-initialise that */
  208|    785|    if (!ossl_property_parse_init(ctx))
  ------------------
  |  Branch (208:9): [True: 0, False: 785]
  ------------------
  209|      0|        goto err;
  210|       |
  211|    785|#ifndef FIPS_MODULE
  212|    785|    ctx->comp_methods = ossl_load_builtin_compressions();
  213|    785|#endif
  214|       |
  215|    785|    return 1;
  216|       |
  217|      0|err:
  218|      0|    context_deinit_objs(ctx);
  219|       |
  220|      0|    if (exdata_done)
  ------------------
  |  Branch (220:9): [True: 0, False: 0]
  ------------------
  221|      0|        ossl_crypto_cleanup_all_ex_data_int(ctx);
  222|       |
  223|      0|    CRYPTO_THREAD_lock_free(ctx->lock);
  224|      0|    memset(ctx, '\0', sizeof(*ctx));
  225|      0|    return 0;
  226|    785|}
context.c:default_context_do_init:
  383|      1|{
  384|      1|    if (!CRYPTO_THREAD_init_local(&default_context_thread_local, NULL))
  ------------------
  |  Branch (384:9): [True: 0, False: 1]
  ------------------
  385|      0|        goto err;
  386|       |
  387|      1|    if (!context_init(&default_context_int))
  ------------------
  |  Branch (387:9): [True: 0, False: 1]
  ------------------
  388|      0|        goto deinit_thread;
  389|       |
  390|      1|    default_context_inited = 1;
  391|      1|    return 1;
  392|       |
  393|      0|deinit_thread:
  394|      0|    CRYPTO_THREAD_cleanup_local(&default_context_thread_local);
  395|      0|err:
  396|      0|    return 0;
  397|      0|}
context.c:get_default_context:
  417|  12.1M|{
  418|  12.1M|    OSSL_LIB_CTX *current_defctx = get_thread_default_context();
  419|       |
  420|  12.1M|    if (current_defctx == NULL && default_context_inited)
  ------------------
  |  Branch (420:9): [True: 12.1M, False: 0]
  |  Branch (420:35): [True: 12.1M, False: 0]
  ------------------
  421|  12.1M|        current_defctx = &default_context_int;
  422|  12.1M|    return current_defctx;
  423|  12.1M|}
context.c:get_thread_default_context:
  409|  12.1M|{
  410|  12.1M|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|  12.1M|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 12.1M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (410:9): [True: 0, False: 12.1M]
  ------------------
  411|      0|        return NULL;
  412|       |
  413|  12.1M|    return CRYPTO_THREAD_get_local(&default_context_thread_local);
  414|  12.1M|}

ossl_algorithm_do_all:
  149|  79.4k|{
  150|  79.4k|    struct algorithm_data_st cbdata = {
  151|  79.4k|        0,
  152|  79.4k|    };
  153|       |
  154|  79.4k|    cbdata.libctx = libctx;
  155|  79.4k|    cbdata.operation_id = operation_id;
  156|  79.4k|    cbdata.pre = pre;
  157|  79.4k|    cbdata.reserve_store = reserve_store;
  158|  79.4k|    cbdata.fn = fn;
  159|  79.4k|    cbdata.unreserve_store = unreserve_store;
  160|  79.4k|    cbdata.post = post;
  161|  79.4k|    cbdata.data = data;
  162|       |
  163|  79.4k|    if (provider == NULL) {
  ------------------
  |  Branch (163:9): [True: 78.3k, False: 1.10k]
  ------------------
  164|  78.3k|        ossl_provider_doall_activated(libctx, algorithm_do_this, &cbdata);
  165|  78.3k|    } else {
  166|  1.10k|        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.10k|        if (!ossl_assert(ossl_lib_ctx_get_concrete(libctx)
  ------------------
  |  |   52|  1.10k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.10k|    __FILE__, __LINE__)
  ------------------
  |  Branch (173:13): [True: 0, False: 1.10k]
  ------------------
  174|  1.10k|                == ossl_lib_ctx_get_concrete(libctx2)))
  175|      0|            return;
  176|       |
  177|  1.10k|        cbdata.libctx = libctx2;
  178|  1.10k|        algorithm_do_this(provider, &cbdata);
  179|  1.10k|    }
  180|  79.4k|}
ossl_algorithm_get1_first_name:
  183|   169k|{
  184|   169k|    const char *first_name_end = NULL;
  185|   169k|    size_t first_name_len = 0;
  186|   169k|    char *ret;
  187|       |
  188|   169k|    if (algo->algorithm_names == NULL)
  ------------------
  |  Branch (188:9): [True: 0, False: 169k]
  ------------------
  189|      0|        return NULL;
  190|       |
  191|   169k|    first_name_end = strchr(algo->algorithm_names, ':');
  192|   169k|    if (first_name_end == NULL)
  ------------------
  |  Branch (192:9): [True: 51.8k, False: 117k]
  ------------------
  193|  51.8k|        first_name_len = strlen(algo->algorithm_names);
  194|   117k|    else
  195|   117k|        first_name_len = first_name_end - algo->algorithm_names;
  196|       |
  197|   169k|    ret = OPENSSL_strndup(algo->algorithm_names, first_name_len);
  ------------------
  |  |  137|   169k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  198|   169k|    return ret;
  199|   169k|}
core_algorithm.c:algorithm_do_this:
  103|   142k|{
  104|   142k|    struct algorithm_data_st *data = cbdata;
  105|   142k|    int first_operation = 1;
  106|   142k|    int last_operation = OSSL_OP__HIGHEST;
  ------------------
  |  |  299|   142k|#define OSSL_OP__HIGHEST 22
  ------------------
  107|   142k|    int cur_operation;
  108|   142k|    int ok = 1;
  109|       |
  110|   142k|    if (data->operation_id != 0)
  ------------------
  |  Branch (110:9): [True: 142k, False: 0]
  ------------------
  111|   142k|        first_operation = last_operation = data->operation_id;
  112|       |
  113|   142k|    for (cur_operation = first_operation;
  114|   285k|        cur_operation <= last_operation;
  ------------------
  |  Branch (114:9): [True: 142k, False: 142k]
  ------------------
  115|   142k|        cur_operation++) {
  116|   142k|        int no_store = 0; /* Assume caching is ok */
  117|   142k|        const OSSL_ALGORITHM *map = NULL;
  118|   142k|        int ret = 0;
  119|       |
  120|   142k|        map = ossl_provider_query_operation(provider, cur_operation,
  121|   142k|            &no_store);
  122|   142k|        ret = algorithm_do_map(provider, map, cur_operation, no_store, data);
  123|   142k|        ossl_provider_unquery_operation(provider, cur_operation, map);
  124|       |
  125|   142k|        if (ret < 0)
  ------------------
  |  Branch (125:13): [True: 0, False: 142k]
  ------------------
  126|       |            /* Hard error, bail out immediately! */
  127|      0|            return 0;
  128|       |
  129|       |        /* If post-condition not fulfilled, set general failure */
  130|   142k|        if (!ret)
  ------------------
  |  Branch (130:13): [True: 0, False: 142k]
  ------------------
  131|      0|            ok = 0;
  132|   142k|    }
  133|       |
  134|   142k|    return ok;
  135|   142k|}
core_algorithm.c:algorithm_do_map:
   44|   142k|{
   45|   142k|    struct algorithm_data_st *data = cbdata;
   46|   142k|    int ret = 0;
   47|       |
   48|   142k|    if (!data->reserve_store(no_store, data->data))
  ------------------
  |  Branch (48:9): [True: 0, False: 142k]
  ------------------
   49|       |        /* Error, bail out! */
   50|      0|        return -1;
   51|       |
   52|       |    /* Do we fulfill pre-conditions? */
   53|   142k|    if (data->pre == NULL) {
  ------------------
  |  Branch (53:9): [True: 0, False: 142k]
  ------------------
   54|       |        /* If there is no pre-condition function, assume "yes" */
   55|      0|        ret = 1;
   56|   142k|    } else if (!data->pre(provider, cur_operation, no_store, data->data,
  ------------------
  |  Branch (56:16): [True: 0, False: 142k]
  ------------------
   57|   142k|                   &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|   142k|    if (ret == 0) {
  ------------------
  |  Branch (68:9): [True: 133k, False: 9.03k]
  ------------------
   69|   133k|        ret = 1;
   70|   133k|        goto end;
   71|   133k|    }
   72|       |
   73|  9.03k|    if (map != NULL) {
  ------------------
  |  Branch (73:9): [True: 4.24k, False: 4.78k]
  ------------------
   74|  4.24k|        const OSSL_ALGORITHM *thismap;
   75|       |
   76|   173k|        for (thismap = map; thismap->algorithm_names != NULL; thismap++)
  ------------------
  |  Branch (76:29): [True: 169k, False: 4.24k]
  ------------------
   77|   169k|            data->fn(provider, thismap, no_store, data->data);
   78|  4.24k|    }
   79|       |
   80|       |    /* Do we fulfill post-conditions? */
   81|  9.03k|    if (data->post == NULL) {
  ------------------
  |  Branch (81:9): [True: 0, False: 9.03k]
  ------------------
   82|       |        /* If there is no post-condition function, assume "yes" */
   83|      0|        ret = 1;
   84|  9.03k|    } else if (!data->post(provider, cur_operation, no_store, data->data,
  ------------------
  |  Branch (84:16): [True: 0, False: 9.03k]
  ------------------
   85|  9.03k|                   &ret)) {
   86|       |        /* Error, bail out! */
   87|      0|        ret = -1;
   88|      0|    }
   89|       |
   90|   142k|end:
   91|   142k|    data->unreserve_store(data->data);
   92|       |
   93|   142k|    return ret;
   94|  9.03k|}

ossl_method_construct:
  137|  79.4k|{
  138|  79.4k|    void *method = NULL;
  139|  79.4k|    OSSL_PROVIDER *provider = provider_rw != NULL ? *provider_rw : NULL;
  ------------------
  |  Branch (139:31): [True: 79.4k, False: 0]
  ------------------
  140|  79.4k|    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|  79.4k|    cbdata.store = NULL;
  154|  79.4k|    cbdata.force_store = force_store;
  155|  79.4k|    cbdata.mcm = mcm;
  156|  79.4k|    cbdata.mcm_data = mcm_data;
  157|  79.4k|    ossl_algorithm_do_all(libctx, operation_id, provider,
  158|  79.4k|        ossl_method_construct_precondition,
  159|  79.4k|        ossl_method_construct_reserve_store,
  160|  79.4k|        ossl_method_construct_this,
  161|  79.4k|        ossl_method_construct_unreserve_store,
  162|  79.4k|        ossl_method_construct_postcondition,
  163|  79.4k|        &cbdata);
  164|       |
  165|       |    /* If there is a temporary store, try there first */
  166|  79.4k|    if (cbdata.store != NULL)
  ------------------
  |  Branch (166:9): [True: 0, False: 79.4k]
  ------------------
  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|  79.4k|    if (method == NULL)
  ------------------
  |  Branch (171:9): [True: 79.4k, False: 0]
  ------------------
  172|  79.4k|        method = mcm->get(NULL, (const OSSL_PROVIDER **)provider_rw, mcm_data);
  173|       |
  174|  79.4k|    return method;
  175|  79.4k|}
core_fetch.c:ossl_method_construct_precondition:
   63|   142k|{
   64|   142k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|   142k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   142k|    __FILE__, __LINE__)
  ------------------
  |  Branch (64:9): [True: 0, False: 142k]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|       |
   69|       |    /* Assume that no bits are set */
   70|   142k|    *result = 0;
   71|       |
   72|       |    /* No flag bits for temporary stores */
   73|   142k|    if (!is_temporary_method_store(no_store, cbdata)
  ------------------
  |  Branch (73:9): [True: 142k, False: 0]
  ------------------
   74|   142k|        && !ossl_provider_test_operation_bit(provider, operation_id, result))
  ------------------
  |  Branch (74:12): [True: 0, False: 142k]
  ------------------
   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|   142k|    *result = !*result;
   83|       |
   84|   142k|    return 1;
   85|   142k|}
core_fetch.c:is_temporary_method_store:
   29|   294k|{
   30|   294k|    struct construct_data_st *data = cbdata;
   31|       |
   32|   294k|    return no_store && !data->force_store;
  ------------------
  |  Branch (32:12): [True: 0, False: 294k]
  |  Branch (32:24): [True: 0, False: 0]
  ------------------
   33|   294k|}
core_fetch.c:ossl_method_construct_reserve_store:
   36|   142k|{
   37|   142k|    struct construct_data_st *data = cbdata;
   38|       |
   39|   142k|    if (is_temporary_method_store(no_store, data) && data->store == NULL) {
  ------------------
  |  Branch (39:9): [True: 0, False: 142k]
  |  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|   142k|    return data->mcm->lock_store(data->store, data->mcm_data);
   51|   142k|}
core_fetch.c:ossl_method_construct_this:
  106|   169k|{
  107|   169k|    struct construct_data_st *data = cbdata;
  108|   169k|    void *method = NULL;
  109|       |
  110|   169k|    if ((method = data->mcm->construct(algo, provider, data->mcm_data))
  ------------------
  |  Branch (110:9): [True: 0, False: 169k]
  ------------------
  111|   169k|        == NULL)
  112|      0|        return;
  113|       |
  114|   169k|    OSSL_TRACE2(QUERY,
  ------------------
  |  |  295|   169k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|   169k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  115|   169k|        "ossl_method_construct_this: putting an algo to the store %p with no_store %d\n",
  116|   169k|        (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|   169k|    data->mcm->put(no_store ? data->store : NULL, method, provider, algo->algorithm_names,
  ------------------
  |  Branch (127:20): [True: 0, False: 169k]
  ------------------
  128|   169k|        algo->property_definition, data->mcm_data);
  129|       |
  130|       |    /* refcnt-- because we're dropping the reference */
  131|   169k|    data->mcm->destruct(method, data->mcm_data);
  132|   169k|}
core_fetch.c:ossl_method_construct_unreserve_store:
   54|   142k|{
   55|   142k|    struct construct_data_st *data = cbdata;
   56|       |
   57|   142k|    return data->mcm->unlock_store(data->store, data->mcm_data);
   58|   142k|}
core_fetch.c:ossl_method_construct_postcondition:
   90|  9.03k|{
   91|  9.03k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|  9.03k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  9.03k|    __FILE__, __LINE__)
  ------------------
  |  Branch (91:9): [True: 0, False: 9.03k]
  ------------------
   92|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   93|      0|        return 0;
   94|      0|    }
   95|       |
   96|  9.03k|    *result = 1;
   97|       |
   98|       |    /* No flag bits for temporary stores */
   99|  9.03k|    return is_temporary_method_store(no_store, cbdata)
  ------------------
  |  Branch (99:12): [True: 0, False: 9.03k]
  ------------------
  100|  9.03k|        || ossl_provider_set_operation_bit(provider, operation_id);
  ------------------
  |  Branch (100:12): [True: 9.03k, False: 0]
  ------------------
  101|  9.03k|}

ossl_stored_namemap_new:
   62|    785|{
   63|    785|    OSSL_NAMEMAP *namemap = ossl_namemap_new(libctx);
   64|       |
   65|    785|    if (namemap != NULL)
  ------------------
  |  Branch (65:9): [True: 785, False: 0]
  ------------------
   66|    785|        namemap->stored = 1;
   67|       |
   68|    785|    return namemap;
   69|    785|}
ossl_stored_namemap_free:
   72|    785|{
   73|    785|    OSSL_NAMEMAP *namemap = vnamemap;
   74|       |
   75|    785|    if (namemap != NULL) {
  ------------------
  |  Branch (75:9): [True: 785, False: 0]
  ------------------
   76|       |        /* Pretend it isn't stored, or ossl_namemap_free() will do nothing */
   77|    785|        namemap->stored = 0;
   78|    785|        ossl_namemap_free(namemap);
   79|    785|    }
   80|    785|}
ossl_namemap_empty:
   88|  5.27M|{
   89|       |#ifdef TSAN_REQUIRES_LOCKING
   90|       |    /* No TSAN support */
   91|       |    int rv;
   92|       |
   93|       |    if (namemap == NULL)
   94|       |        return 1;
   95|       |
   96|       |    if (!CRYPTO_THREAD_read_lock(namemap->lock))
   97|       |        return -1;
   98|       |    rv = namemap->max_number == 0;
   99|       |    CRYPTO_THREAD_unlock(namemap->lock);
  100|       |    return rv;
  101|       |#else
  102|       |    /* Have TSAN support */
  103|  5.27M|    return namemap == NULL || tsan_load(&namemap->max_number) == 0;
  ------------------
  |  |   61|  5.27M|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (103:12): [True: 0, False: 5.27M]
  |  Branch (103:31): [True: 630, False: 5.27M]
  ------------------
  104|  5.27M|#endif
  105|  5.27M|}
ossl_namemap_doall_names:
  115|   566k|{
  116|   566k|    int i;
  117|   566k|    NAMES *names;
  118|       |
  119|   566k|    if (namemap == NULL || number <= 0)
  ------------------
  |  Branch (119:9): [True: 0, False: 566k]
  |  Branch (119:28): [True: 0, False: 566k]
  ------------------
  120|      0|        return 0;
  121|       |
  122|       |    /*
  123|       |     * We duplicate the NAMES stack under a read lock. Subsequently we call
  124|       |     * the user function, so that we're not holding the read lock when in user
  125|       |     * code. This could lead to deadlocks.
  126|       |     */
  127|   566k|    if (!CRYPTO_THREAD_read_lock(namemap->lock))
  ------------------
  |  Branch (127:9): [True: 0, False: 566k]
  ------------------
  128|      0|        return 0;
  129|       |
  130|   566k|    names = sk_NAMES_value(namemap->numnames, number - 1);
  131|   566k|    if (names != NULL)
  ------------------
  |  Branch (131:9): [True: 566k, False: 0]
  ------------------
  132|   566k|        names = sk_OPENSSL_STRING_dup(names);
  ------------------
  |  |  254|   566k|#define sk_OPENSSL_STRING_dup(sk) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_STRING_sk_type(sk)))
  ------------------
  133|       |
  134|   566k|    CRYPTO_THREAD_unlock(namemap->lock);
  135|       |
  136|   566k|    if (names == NULL)
  ------------------
  |  Branch (136:9): [True: 0, False: 566k]
  ------------------
  137|      0|        return 0;
  138|       |
  139|  2.47M|    for (i = 0; i < sk_OPENSSL_STRING_num(names); i++)
  ------------------
  |  |  232|  2.47M|#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
  ------------------
  |  Branch (139:17): [True: 1.90M, False: 566k]
  ------------------
  140|  1.90M|        fn(sk_OPENSSL_STRING_value(names, i), data);
  ------------------
  |  |  233|  1.90M|#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
  ------------------
  141|       |
  142|   566k|    sk_OPENSSL_STRING_free(names);
  ------------------
  |  |  238|   566k|#define sk_OPENSSL_STRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_STRING_sk_type(sk))
  ------------------
  143|   566k|    return i > 0;
  144|   566k|}
ossl_namemap_name2num:
  147|  5.91M|{
  148|  5.91M|    int number = 0;
  149|  5.91M|    HT_VALUE *val;
  150|  5.91M|    NAMENUM_KEY key;
  151|       |
  152|  5.91M|#ifndef FIPS_MODULE
  153|  5.91M|    if (namemap == NULL)
  ------------------
  |  Branch (153:9): [True: 0, False: 5.91M]
  ------------------
  154|      0|        namemap = ossl_namemap_stored(NULL);
  155|  5.91M|#endif
  156|       |
  157|  5.91M|    if (namemap == NULL)
  ------------------
  |  Branch (157:9): [True: 0, False: 5.91M]
  ------------------
  158|      0|        return 0;
  159|       |
  160|  5.91M|    HT_INIT_KEY(&key);
  ------------------
  |  |  110|  5.91M|    do {                                                                \
  |  |  111|  5.91M|        memset((key), 0, sizeof(*(key)));                               \
  |  |  112|  5.91M|        (key)->key_header.keysize = (sizeof(*(key)) - sizeof(HT_KEY));  \
  |  |  113|  5.91M|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY)); \
  |  |  114|  5.91M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (114:14): [Folded, False: 5.91M]
  |  |  ------------------
  ------------------
  161|  5.91M|    HT_SET_KEY_STRING_CASE(&key, name, name);
  ------------------
  |  |  143|  5.91M|    do {                                                                                      \
  |  |  144|  5.91M|        ossl_ht_strcase((key)->keyfields.member, value, sizeof((key)->keyfields.member) - 1); \
  |  |  145|  5.91M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (145:14): [Folded, False: 5.91M]
  |  |  ------------------
  ------------------
  162|       |
  163|  5.91M|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  181|  5.91M|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  164|       |
  165|  5.91M|    if (val != NULL)
  ------------------
  |  Branch (165:9): [True: 5.30M, False: 610k]
  ------------------
  166|       |        /* We store a (small) int directly instead of a pointer to it. */
  167|  5.30M|        number = (int)(intptr_t)val->value;
  168|       |
  169|  5.91M|    return number;
  170|  5.91M|}
ossl_namemap_name2num_n:
  174|   200k|{
  175|   200k|    int number = 0;
  176|   200k|    HT_VALUE *val;
  177|   200k|    NAMENUM_KEY key;
  178|       |
  179|   200k|#ifndef FIPS_MODULE
  180|   200k|    if (namemap == NULL)
  ------------------
  |  Branch (180:9): [True: 0, False: 200k]
  ------------------
  181|      0|        namemap = ossl_namemap_stored(NULL);
  182|   200k|#endif
  183|       |
  184|   200k|    if (namemap == NULL)
  ------------------
  |  Branch (184:9): [True: 0, False: 200k]
  ------------------
  185|      0|        return 0;
  186|       |
  187|   200k|    HT_INIT_KEY(&key);
  ------------------
  |  |  110|   200k|    do {                                                                \
  |  |  111|   200k|        memset((key), 0, sizeof(*(key)));                               \
  |  |  112|   200k|        (key)->key_header.keysize = (sizeof(*(key)) - sizeof(HT_KEY));  \
  |  |  113|   200k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY)); \
  |  |  114|   200k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (114:14): [Folded, False: 200k]
  |  |  ------------------
  ------------------
  188|   200k|    HT_SET_KEY_STRING_CASE_N(&key, name, name, (int)name_len);
  ------------------
  |  |  162|   200k|    do {                                                                                          \
  |  |  163|   200k|        if ((size_t)len < sizeof((key)->keyfields.member))                                        \
  |  |  ------------------
  |  |  |  Branch (163:13): [True: 200k, False: 0]
  |  |  ------------------
  |  |  164|   200k|            ossl_ht_strcase((key)->keyfields.member, value, len);                                 \
  |  |  165|   200k|        else                                                                                      \
  |  |  166|   200k|            ossl_ht_strcase((key)->keyfields.member, value, sizeof((key)->keyfields.member) - 1); \
  |  |  167|   200k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (167:14): [Folded, False: 200k]
  |  |  ------------------
  ------------------
  189|       |
  190|   200k|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  181|   200k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  191|       |
  192|   200k|    if (val != NULL)
  ------------------
  |  Branch (192:9): [True: 170k, False: 30.6k]
  ------------------
  193|       |        /* We store a (small) int directly instead of a pointer to it. */
  194|   170k|        number = (int)(intptr_t)val->value;
  195|       |
  196|   200k|    return number;
  197|   200k|}
ossl_namemap_add_name:
  296|   410k|{
  297|   410k|    int tmp_number;
  298|       |
  299|   410k|#ifndef FIPS_MODULE
  300|   410k|    if (namemap == NULL)
  ------------------
  |  Branch (300:9): [True: 0, False: 410k]
  ------------------
  301|      0|        namemap = ossl_namemap_stored(NULL);
  302|   410k|#endif
  303|       |
  304|   410k|    if (name == NULL || *name == 0 || namemap == NULL)
  ------------------
  |  Branch (304:9): [True: 0, False: 410k]
  |  Branch (304:25): [True: 0, False: 410k]
  |  Branch (304:39): [True: 0, False: 410k]
  ------------------
  305|      0|        return 0;
  306|       |
  307|   410k|    if (!CRYPTO_THREAD_write_lock(namemap->lock))
  ------------------
  |  Branch (307:9): [True: 0, False: 410k]
  ------------------
  308|      0|        return 0;
  309|   410k|    tmp_number = namemap_add_name(namemap, number, name);
  310|   410k|    CRYPTO_THREAD_unlock(namemap->lock);
  311|   410k|    return tmp_number;
  312|   410k|}
ossl_namemap_add_names:
  316|   169k|{
  317|   169k|    char *tmp, *p, *q, *endp;
  318|       |
  319|       |    /* Check that we have a namemap */
  320|   169k|    if (!ossl_assert(namemap != NULL)) {
  ------------------
  |  |   52|   169k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   169k|    __FILE__, __LINE__)
  ------------------
  |  Branch (320:9): [True: 0, False: 169k]
  ------------------
  321|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  322|      0|        return 0;
  323|      0|    }
  324|       |
  325|   169k|    if ((tmp = OPENSSL_strdup(names)) == NULL)
  ------------------
  |  |  135|   169k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (325:9): [True: 0, False: 169k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|   169k|    if (!CRYPTO_THREAD_write_lock(namemap->lock)) {
  ------------------
  |  Branch (328:9): [True: 0, False: 169k]
  ------------------
  329|      0|        OPENSSL_free(tmp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|   561k|    for (p = tmp; *p != '\0'; p = q) {
  ------------------
  |  Branch (336:19): [True: 392k, False: 169k]
  ------------------
  337|   392k|        int this_number;
  338|   392k|        size_t l;
  339|       |
  340|   392k|        if ((q = strchr(p, separator)) == NULL) {
  ------------------
  |  Branch (340:13): [True: 169k, False: 223k]
  ------------------
  341|   169k|            l = strlen(p); /* offset to \0 */
  342|   169k|            q = p + l;
  343|   223k|        } else {
  344|   223k|            l = q - p; /* offset to the next separator */
  345|   223k|            *q++ = '\0';
  346|   223k|        }
  347|       |
  348|   392k|        if (*p == '\0') {
  ------------------
  |  Branch (348:13): [True: 0, False: 392k]
  ------------------
  349|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_BAD_ALGORITHM_NAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  350|      0|            number = 0;
  351|      0|            goto end;
  352|      0|        }
  353|       |
  354|   392k|        this_number = ossl_namemap_name2num(namemap, p);
  355|       |
  356|   392k|        if (number == 0) {
  ------------------
  |  Branch (356:13): [True: 275k, False: 117k]
  ------------------
  357|   275k|            number = this_number;
  358|   275k|        } else if (this_number != 0 && this_number != number) {
  ------------------
  |  Branch (358:20): [True: 101k, False: 15.7k]
  |  Branch (358:40): [True: 0, False: 101k]
  ------------------
  359|      0|            ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |   87|      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|   392k|    }
  366|   169k|    endp = p;
  367|       |
  368|       |    /* Now that we have checked, register all names */
  369|   561k|    for (p = tmp; p < endp; p = q) {
  ------------------
  |  Branch (369:19): [True: 392k, False: 169k]
  ------------------
  370|   392k|        int this_number;
  371|       |
  372|   392k|        q = p + strlen(p) + 1;
  373|       |
  374|   392k|        this_number = namemap_add_name(namemap, number, p);
  375|   392k|        if (number == 0) {
  ------------------
  |  Branch (375:13): [True: 85.2k, False: 307k]
  ------------------
  376|  85.2k|            number = this_number;
  377|   307k|        } else if (this_number != number) {
  ------------------
  |  Branch (377:20): [True: 0, False: 307k]
  ------------------
  378|      0|            ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      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|   392k|    }
  385|       |
  386|   169k|end:
  387|   169k|    CRYPTO_THREAD_unlock(namemap->lock);
  388|   169k|    OPENSSL_free(tmp);
  ------------------
  |  |  131|   169k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|   169k|    return number;
  390|   169k|}
ossl_namemap_stored:
  490|  5.27M|{
  491|  5.27M|#ifndef FIPS_MODULE
  492|  5.27M|    int nms;
  493|  5.27M|#endif
  494|  5.27M|    OSSL_NAMEMAP *namemap = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_NAMEMAP_INDEX);
  ------------------
  |  |  100|  5.27M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  495|       |
  496|  5.27M|    if (namemap == NULL)
  ------------------
  |  Branch (496:9): [True: 0, False: 5.27M]
  ------------------
  497|      0|        return NULL;
  498|       |
  499|  5.27M|#ifndef FIPS_MODULE
  500|  5.27M|    nms = ossl_namemap_empty(namemap);
  501|  5.27M|    if (nms < 0) {
  ------------------
  |  Branch (501:9): [True: 0, False: 5.27M]
  ------------------
  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.27M|    if (nms == 1) {
  ------------------
  |  Branch (508:9): [True: 630, False: 5.27M]
  ------------------
  509|    630|        int num;
  510|       |
  511|       |        /* Before pilfering, we make sure the legacy database is populated */
  512|    630|        OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  506|    630|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
  513|    630|                | OPENSSL_INIT_ADD_ALL_DIGESTS,
  ------------------
  |  |  507|    630|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  514|    630|            NULL);
  515|       |
  516|    630|        OBJ_NAME_do_all(OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    630|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
  517|    630|            get_legacy_cipher_names, namemap);
  518|    630|        OBJ_NAME_do_all(OBJ_NAME_TYPE_MD_METH,
  ------------------
  |  |   25|    630|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  519|    630|            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|    630|        num = ossl_namemap_add_name(namemap, 0, "RSA-PSS");
  526|    630|        if (num != 0) {
  ------------------
  |  Branch (526:13): [True: 630, False: 0]
  ------------------
  527|    630|            ossl_namemap_add_name(namemap, num, "rsassaPss");
  528|       |            /* Add other RSA-PSS aliases as well */
  529|    630|            ossl_namemap_add_name(namemap, num, "RSASSA-PSS");
  530|    630|            ossl_namemap_add_name(namemap, num, "1.2.840.113549.1.1.10");
  531|    630|        }
  532|    630|#ifndef OPENSSL_NO_DEPRECATED_3_6
  533|    630|        {
  534|    630|            int i, end;
  535|       |
  536|       |            /* We also pilfer data from the legacy EVP_PKEY_ASN1_METHODs */
  537|  10.0k|            for (i = 0, end = EVP_PKEY_asn1_get_count(); i < end; i++)
  ------------------
  |  Branch (537:58): [True: 9.45k, False: 630]
  ------------------
  538|  9.45k|                get_legacy_pkey_meth_names(EVP_PKEY_asn1_get0(i), namemap);
  539|    630|        }
  540|    630|#endif
  541|    630|    }
  542|  5.27M|#endif
  543|       |
  544|  5.27M|    return namemap;
  545|  5.27M|}
ossl_namemap_new:
  548|    785|{
  549|    785|    OSSL_NAMEMAP *namemap;
  550|    785|    HT_CONFIG htconf = { NULL, NULL, NULL, NAMEMAP_HT_BUCKETS, 1, 1 };
  ------------------
  |  |   22|    785|#define NAMEMAP_HT_BUCKETS 512
  ------------------
  551|       |
  552|    785|    htconf.ctx = libctx;
  553|       |
  554|    785|    if ((namemap = OPENSSL_zalloc(sizeof(*namemap))) == NULL)
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (554:9): [True: 0, False: 785]
  ------------------
  555|      0|        goto err;
  556|       |
  557|    785|    if ((namemap->lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (557:9): [True: 0, False: 785]
  ------------------
  558|      0|        goto err;
  559|       |
  560|    785|    if ((namemap->namenum_ht = ossl_ht_new(&htconf)) == NULL)
  ------------------
  |  Branch (560:9): [True: 0, False: 785]
  ------------------
  561|      0|        goto err;
  562|       |
  563|    785|    if ((namemap->numnames = sk_NAMES_new_null()) == NULL)
  ------------------
  |  Branch (563:9): [True: 0, False: 785]
  ------------------
  564|      0|        goto err;
  565|       |
  566|    785|    return namemap;
  567|       |
  568|      0|err:
  569|      0|    ossl_namemap_free(namemap);
  570|       |    return NULL;
  571|    785|}
ossl_namemap_free:
  574|    785|{
  575|    785|    if (namemap == NULL || namemap->stored)
  ------------------
  |  Branch (575:9): [True: 0, False: 785]
  |  Branch (575:28): [True: 0, False: 785]
  ------------------
  576|      0|        return;
  577|       |
  578|    785|    sk_NAMES_pop_free(namemap->numnames, names_free);
  579|       |
  580|    785|    ossl_ht_free(namemap->namenum_ht);
  581|       |
  582|    785|    CRYPTO_THREAD_lock_free(namemap->lock);
  583|    785|    OPENSSL_free(namemap);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  584|    785|}
core_namemap.c:namemap_add_name:
  264|   803k|{
  265|   803k|    int ret;
  266|   803k|    HT_VALUE val = { 0 };
  267|   803k|    NAMENUM_KEY key;
  268|       |
  269|       |    /* If it already exists, we don't add it */
  270|   803k|    if ((ret = ossl_namemap_name2num(namemap, name)) != 0)
  ------------------
  |  Branch (270:9): [True: 432k, False: 370k]
  ------------------
  271|   432k|        return ret;
  272|       |
  273|   370k|    if ((number = numname_insert(namemap, number, name)) == 0)
  ------------------
  |  Branch (273:9): [True: 0, False: 370k]
  ------------------
  274|      0|        return 0;
  275|       |
  276|       |    /* Using tsan_store alone here is safe since we're under lock */
  277|   370k|    tsan_store(&namemap->max_number, number);
  ------------------
  |  |   62|   370k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  278|       |
  279|   370k|    HT_INIT_KEY(&key);
  ------------------
  |  |  110|   370k|    do {                                                                \
  |  |  111|   370k|        memset((key), 0, sizeof(*(key)));                               \
  |  |  112|   370k|        (key)->key_header.keysize = (sizeof(*(key)) - sizeof(HT_KEY));  \
  |  |  113|   370k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY)); \
  |  |  114|   370k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (114:14): [Folded, False: 370k]
  |  |  ------------------
  ------------------
  280|   370k|    HT_SET_KEY_STRING_CASE(&key, name, name);
  ------------------
  |  |  143|   370k|    do {                                                                                      \
  |  |  144|   370k|        ossl_ht_strcase((key)->keyfields.member, value, sizeof((key)->keyfields.member) - 1); \
  |  |  145|   370k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (145:14): [Folded, False: 370k]
  |  |  ------------------
  ------------------
  281|   370k|    val.value = (void *)(intptr_t)number;
  282|   370k|    ret = ossl_ht_insert(namemap->namenum_ht, TO_HT_KEY(&key), &val, NULL);
  ------------------
  |  |  181|   370k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  283|   370k|    if (ret <= 0) {
  ------------------
  |  Branch (283:9): [True: 0, False: 370k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  |  |  |  Branch (404:55): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  289|      0|        return 0;
  290|      0|    }
  291|   370k|    return number;
  292|   370k|}
core_namemap.c:numname_insert:
  223|   370k|{
  224|   370k|    NAMES *names;
  225|   370k|    char *tmpname;
  226|       |
  227|   370k|    if (number > 0) {
  ------------------
  |  Branch (227:9): [True: 211k, False: 159k]
  ------------------
  228|   211k|        names = sk_NAMES_value(namemap->numnames, number - 1);
  229|   211k|        if (!ossl_assert(names != NULL)) {
  ------------------
  |  |   52|   211k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   211k|    __FILE__, __LINE__)
  ------------------
  |  Branch (229:13): [True: 0, False: 211k]
  ------------------
  230|       |            /* cannot happen */
  231|      0|            return 0;
  232|      0|        }
  233|   211k|    } else {
  234|       |        /* a completely new entry */
  235|   159k|        names = sk_OPENSSL_STRING_new_null();
  ------------------
  |  |  235|   159k|#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new_null())
  ------------------
  236|   159k|        if (names == NULL)
  ------------------
  |  Branch (236:13): [True: 0, False: 159k]
  ------------------
  237|      0|            return 0;
  238|   159k|    }
  239|       |
  240|   370k|    if ((tmpname = OPENSSL_strdup(name)) == NULL)
  ------------------
  |  |  135|   370k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (240:9): [True: 0, False: 370k]
  ------------------
  241|      0|        goto err;
  242|       |
  243|   370k|    if (!sk_OPENSSL_STRING_push(names, tmpname))
  ------------------
  |  |  242|   370k|#define sk_OPENSSL_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
  ------------------
  |  Branch (243:9): [True: 0, False: 370k]
  ------------------
  244|      0|        goto err;
  245|   370k|    tmpname = NULL;
  246|       |
  247|   370k|    if (number <= 0) {
  ------------------
  |  Branch (247:9): [True: 159k, False: 211k]
  ------------------
  248|   159k|        if (!sk_NAMES_push(namemap->numnames, names))
  ------------------
  |  Branch (248:13): [True: 0, False: 159k]
  ------------------
  249|      0|            goto err;
  250|   159k|        number = sk_NAMES_num(namemap->numnames);
  251|   159k|    }
  252|   370k|    return number;
  253|       |
  254|      0|err:
  255|      0|    if (number <= 0)
  ------------------
  |  Branch (255:9): [True: 0, False: 0]
  ------------------
  256|      0|        sk_OPENSSL_STRING_pop_free(names, name_string_free);
  ------------------
  |  |  246|      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))
  ------------------
  257|      0|    OPENSSL_free(tmpname);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|      0|    return 0;
  259|   370k|}
core_namemap.c:name_string_free:
   50|   370k|{
   51|   370k|    OPENSSL_free(name);
  ------------------
  |  |  131|   370k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   52|   370k|}
core_namemap.c:get_legacy_cipher_names:
  427|   115k|{
  428|   115k|    const EVP_CIPHER *cipher = (void *)OBJ_NAME_get(on->name, on->type);
  429|       |
  430|   115k|    if (cipher != NULL)
  ------------------
  |  Branch (430:9): [True: 115k, False: 0]
  ------------------
  431|   115k|        get_legacy_evp_names(NID_undef, EVP_CIPHER_get_type(cipher), NULL, arg);
  ------------------
  |  |   18|   115k|#define NID_undef                       0
  ------------------
  432|   115k|}
core_namemap.c:get_legacy_evp_names:
  403|   162k|{
  404|   162k|    int num = 0;
  405|   162k|    ASN1_OBJECT *obj;
  406|       |
  407|   162k|    if (base_nid != NID_undef) {
  ------------------
  |  |   18|   162k|#define NID_undef                       0
  ------------------
  |  Branch (407:9): [True: 2.52k, False: 160k]
  ------------------
  408|  2.52k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(base_nid));
  409|  2.52k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(base_nid));
  410|  2.52k|    }
  411|       |
  412|   162k|    if (nid != NID_undef) {
  ------------------
  |  |   18|   162k|#define NID_undef                       0
  ------------------
  |  Branch (412:9): [True: 132k, False: 30.2k]
  ------------------
  413|   132k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(nid));
  414|   132k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(nid));
  415|   132k|        if ((obj = OBJ_nid2obj(nid)) != NULL) {
  ------------------
  |  Branch (415:13): [True: 132k, False: 0]
  ------------------
  416|   132k|            char txtoid[OSSL_MAX_NAME_SIZE];
  417|       |
  418|   132k|            if (OBJ_obj2txt(txtoid, sizeof(txtoid), obj, 1) > 0)
  ------------------
  |  Branch (418:17): [True: 131k, False: 630]
  ------------------
  419|   131k|                num = ossl_namemap_add_name(arg, num, txtoid);
  420|   132k|        }
  421|   132k|    }
  422|   162k|    if (pem_name != NULL)
  ------------------
  |  Branch (422:9): [True: 6.93k, False: 155k]
  ------------------
  423|  6.93k|        num = ossl_namemap_add_name(arg, num, pem_name);
  424|   162k|}
core_namemap.c:get_legacy_md_names:
  435|  37.1k|{
  436|  37.1k|    const EVP_MD *md = (void *)OBJ_NAME_get(on->name, on->type);
  437|       |
  438|  37.1k|    if (md != NULL)
  ------------------
  |  Branch (438:9): [True: 37.1k, False: 0]
  ------------------
  439|  37.1k|        get_legacy_evp_names(0, EVP_MD_get_type(md), NULL, arg);
  440|  37.1k|}
core_namemap.c:get_legacy_pkey_meth_names:
  445|  9.45k|{
  446|  9.45k|    int nid = 0, base_nid = 0, flags = 0;
  447|  9.45k|    const char *pem_name = NULL;
  448|       |
  449|  9.45k|    EVP_PKEY_asn1_get0_info(&nid, &base_nid, &flags, NULL, &pem_name, ameth);
  450|  9.45k|    if (nid != NID_undef) {
  ------------------
  |  |   18|  9.45k|#define NID_undef                       0
  ------------------
  |  Branch (450:9): [True: 9.45k, False: 0]
  ------------------
  451|  9.45k|        if ((flags & ASN1_PKEY_ALIAS) == 0) {
  ------------------
  |  | 1603|  9.45k|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (451:13): [True: 6.30k, False: 3.15k]
  ------------------
  452|  6.30k|            switch (nid) {
  453|    630|            case EVP_PKEY_DHX:
  ------------------
  |  |   72|    630|#define EVP_PKEY_DHX NID_dhpublicnumber
  |  |  ------------------
  |  |  |  | 5522|    630|#define NID_dhpublicnumber              920
  |  |  ------------------
  ------------------
  |  Branch (453:13): [True: 630, False: 5.67k]
  ------------------
  454|       |                /* We know that the name "DHX" is used too */
  455|    630|                get_legacy_evp_names(0, nid, "DHX", arg);
  456|       |                /* FALLTHRU */
  457|  6.30k|            default:
  ------------------
  |  Branch (457:13): [True: 5.67k, False: 630]
  ------------------
  458|  6.30k|                get_legacy_evp_names(0, nid, pem_name, arg);
  459|  6.30k|            }
  460|  6.30k|        } 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.15k|            switch (nid) {
  467|    630|            case EVP_PKEY_SM2:
  ------------------
  |  |   74|    630|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|    630|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (467:13): [True: 630, False: 2.52k]
  ------------------
  468|       |                /*
  469|       |                 * SM2 is a separate keytype with providers, not an alias for
  470|       |                 * EC.
  471|       |                 */
  472|    630|                get_legacy_evp_names(0, nid, pem_name, arg);
  473|    630|                break;
  474|  2.52k|            default:
  ------------------
  |  Branch (474:13): [True: 2.52k, False: 630]
  ------------------
  475|       |                /* Use the short name of the base nid as the common reference */
  476|  2.52k|                get_legacy_evp_names(base_nid, nid, pem_name, arg);
  477|  3.15k|            }
  478|  3.15k|        }
  479|  9.45k|    }
  480|  9.45k|}
core_namemap.c:names_free:
   55|   159k|{
   56|   159k|    sk_OPENSSL_STRING_pop_free(n, name_string_free);
  ------------------
  |  |  246|   159k|#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))
  ------------------
   57|   159k|}

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:
   78|      1|{
   79|      1|#ifndef OPENSSL_NO_ERR
   80|      1|    if (ERR_reason_error_string(CRMF_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (80:9): [True: 1, False: 0]
  ------------------
   81|      1|        ERR_load_strings_const(CRMF_str_reasons);
   82|      1|#endif
   83|      1|    return 1;
   84|      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|  2.78k|{
  102|  2.78k|    CTLOG_STORE *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.78k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|       |
  104|  2.78k|    if (ret == NULL)
  ------------------
  |  Branch (104:9): [True: 0, False: 2.78k]
  ------------------
  105|      0|        return NULL;
  106|       |
  107|  2.78k|    ret->libctx = libctx;
  108|  2.78k|    if (propq != NULL) {
  ------------------
  |  Branch (108:9): [True: 614, False: 2.17k]
  ------------------
  109|    614|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|    614|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|    614|        if (ret->propq == NULL)
  ------------------
  |  Branch (110:13): [True: 0, False: 614]
  ------------------
  111|      0|            goto err;
  112|    614|    }
  113|       |
  114|  2.78k|    ret->logs = sk_CTLOG_new_null();
  ------------------
  |  |   74|  2.78k|#define sk_CTLOG_new_null() ((STACK_OF(CTLOG) *)OPENSSL_sk_new_null())
  ------------------
  115|  2.78k|    if (ret->logs == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 2.78k]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_CT, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|       |
  120|  2.78k|    return ret;
  121|      0|err:
  122|      0|    CTLOG_STORE_free(ret);
  123|       |    return NULL;
  124|  2.78k|}
CTLOG_STORE_free:
  132|  2.78k|{
  133|  2.78k|    if (store != NULL) {
  ------------------
  |  Branch (133:9): [True: 2.78k, False: 0]
  ------------------
  134|  2.78k|        OPENSSL_free(store->propq);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  135|  2.78k|        sk_CTLOG_pop_free(store->logs, CTLOG_free);
  ------------------
  |  |   85|  2.78k|#define sk_CTLOG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_freefunc_type(freefunc))
  ------------------
  136|  2.78k|        OPENSSL_free(store);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|  2.78k|    }
  138|  2.78k|}

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

ossl_ctype_check:
  253|  65.1M|{
  254|  65.1M|    const int max = sizeof(ctype_char_map) / sizeof(*ctype_char_map);
  255|  65.1M|    const int a = ossl_toascii(c);
  ------------------
  |  |   56|  65.1M|#define ossl_toascii(c) (c)
  ------------------
  256|       |
  257|  65.1M|    return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
  ------------------
  |  Branch (257:12): [True: 65.1M, False: 8.07k]
  |  Branch (257:22): [True: 65.1M, False: 0]
  |  Branch (257:33): [True: 6.69M, False: 58.4M]
  ------------------
  258|  65.1M|}
ossl_isdigit:
  270|  1.95M|{
  271|  1.95M|    int a = ossl_toascii(c);
  ------------------
  |  |   56|  1.95M|#define ossl_toascii(c) (c)
  ------------------
  272|       |
  273|  1.95M|    return ASCII_IS_DIGIT(a);
  ------------------
  |  |  265|  1.95M|#define ASCII_IS_DIGIT(c) (c >= 0x30 && c <= 0x39)
  |  |  ------------------
  |  |  |  Branch (265:28): [True: 1.85M, False: 94.2k]
  |  |  |  Branch (265:41): [True: 659k, False: 1.19M]
  |  |  ------------------
  ------------------
  274|  1.95M|}
ossl_tolower:
  297|   150M|{
  298|   150M|    int a = ossl_toascii(c);
  ------------------
  |  |   56|   150M|#define ossl_toascii(c) (c)
  ------------------
  299|       |
  300|   150M|    return ASCII_IS_UPPER(a) ? c ^ case_change : c;
  ------------------
  |  |  266|   150M|#define ASCII_IS_UPPER(c) (c >= 0x41 && c <= 0x5A)
  |  |  ------------------
  |  |  |  Branch (266:28): [True: 133M, False: 16.5M]
  |  |  |  Branch (266:41): [True: 39.6M, False: 93.8M]
  |  |  ------------------
  ------------------
  301|   150M|}

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

ossl_get_enginesdir:
  168|    829|{
  169|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
  170|       |    if (!RUN_ONCE(&defaults_setup_init, do_defaults_setup))
  171|       |        return NULL;
  172|       |    return (const char *)enginesdirptr;
  173|       |#else
  174|    829|    return ENGINESDIR;
  175|    829|#endif
  176|    829|}
ossl_get_modulesdir:
  184|    144|{
  185|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
  186|       |    if (!RUN_ONCE(&defaults_setup_init, do_defaults_setup))
  187|       |        return NULL;
  188|       |    return (const char *)modulesdirptr;
  189|       |#else
  190|    144|    return MODULESDIR;
  191|    144|#endif
  192|    144|}

ossl_dh_params_todata:
   91|    258|{
   92|    258|    long l = DH_get_length(dh);
   93|       |
   94|    258|    if (!ossl_ffc_params_todata(ossl_dh_get0_params(dh), bld, params))
  ------------------
  |  Branch (94:9): [True: 0, False: 258]
  ------------------
   95|      0|        return 0;
   96|    258|    if (l > 0
  ------------------
  |  Branch (96:9): [True: 0, False: 258]
  ------------------
   97|      0|        && !ossl_param_build_set_long(bld, params, OSSL_PKEY_PARAM_DH_PRIV_LEN, l))
  ------------------
  |  |  373|      0|# define OSSL_PKEY_PARAM_DH_PRIV_LEN "priv_len"
  ------------------
  |  Branch (97:12): [True: 0, False: 0]
  ------------------
   98|      0|        return 0;
   99|    258|    return 1;
  100|    258|}
ossl_dh_key_todata:
  104|    258|{
  105|    258|    const BIGNUM *priv = NULL, *pub = NULL;
  106|       |
  107|    258|    if (dh == NULL)
  ------------------
  |  Branch (107:9): [True: 0, False: 258]
  ------------------
  108|      0|        return 0;
  109|       |
  110|    258|    DH_get0_key(dh, &pub, &priv);
  111|    258|    if (priv != NULL
  ------------------
  |  Branch (111:9): [True: 258, False: 0]
  ------------------
  112|    258|        && include_private
  ------------------
  |  Branch (112:12): [True: 258, False: 0]
  ------------------
  113|    258|        && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_PRIV_KEY, priv))
  ------------------
  |  |  439|    258|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  |  Branch (113:12): [True: 0, False: 258]
  ------------------
  114|      0|        return 0;
  115|    258|    if (pub != NULL
  ------------------
  |  Branch (115:9): [True: 258, False: 0]
  ------------------
  116|    258|        && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_PUB_KEY, pub))
  ------------------
  |  |  441|    258|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  |  Branch (116:12): [True: 0, False: 258]
  ------------------
  117|      0|        return 0;
  118|       |
  119|    258|    return 1;
  120|    258|}

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|     86|{
   42|     86|    const DH_NAMED_GROUP *group;
   43|       |
   44|     86|    if ((group = ossl_ffc_uid_to_dh_named_group(nid)) != NULL)
  ------------------
  |  Branch (44:9): [True: 86, False: 0]
  ------------------
   45|     86|        return dh_param_init(libctx, group);
   46|       |
   47|     86|    ERR_raise(ERR_LIB_DH, DH_R_INVALID_PARAMETER_NID);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   48|       |    return NULL;
   49|     86|}
DH_get_nid:
   95|     86|{
   96|     86|    if (dh == NULL)
  ------------------
  |  Branch (96:9): [True: 0, False: 86]
  ------------------
   97|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
   98|       |
   99|     86|    return dh->params.nid;
  100|     86|}
dh_group_params.c:dh_param_init:
   28|     86|{
   29|     86|    DH *dh = ossl_dh_new_ex(libctx);
   30|       |
   31|     86|    if (dh == NULL)
  ------------------
  |  Branch (31:9): [True: 0, False: 86]
  ------------------
   32|      0|        return NULL;
   33|       |
   34|     86|    ossl_ffc_named_group_set(&dh->params, group);
   35|     86|    dh->params.nid = ossl_ffc_named_group_get_uid(group);
   36|     86|    dh->dirty_cnt++;
   37|     86|    return dh;
   38|     86|}

DH_get_default_method:
  185|     86|{
  186|     86|    return default_DH_method;
  187|     86|}
DH_generate_key:
  221|     86|{
  222|       |#ifdef FIPS_MODULE
  223|       |    return generate_key(dh);
  224|       |#else
  225|     86|    return dh->meth->generate_key(dh);
  226|     86|#endif
  227|     86|}
ossl_dh_generate_public_key:
  231|     86|{
  232|     86|    int ret = 0;
  233|     86|    BIGNUM *prk = BN_new();
  234|     86|    BN_MONT_CTX *mont = NULL;
  235|       |
  236|     86|    if (prk == NULL)
  ------------------
  |  Branch (236:9): [True: 0, False: 86]
  ------------------
  237|      0|        return 0;
  238|       |
  239|     86|    if (dh->flags & DH_FLAG_CACHE_MONT_P) {
  ------------------
  |  |  108|     86|#define DH_FLAG_CACHE_MONT_P 0x01
  ------------------
  |  Branch (239:9): [True: 86, 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|     86|        BN_MONT_CTX **pmont = (BN_MONT_CTX **)&dh->method_mont_p;
  248|       |
  249|     86|        mont = BN_MONT_CTX_set_locked(pmont, dh->lock, dh->params.p, ctx);
  250|     86|        if (mont == NULL)
  ------------------
  |  Branch (250:13): [True: 0, False: 86]
  ------------------
  251|      0|            goto err;
  252|     86|    }
  253|     86|    BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|     86|#define BN_FLG_CONSTTIME 0x04
  ------------------
  254|       |
  255|       |    /* pub_key = g^priv_key mod p */
  256|     86|    if (!dh->meth->bn_mod_exp(dh, pub_key, dh->params.g, prk, dh->params.p,
  ------------------
  |  Branch (256:9): [True: 0, False: 86]
  ------------------
  257|     86|            ctx, mont))
  258|      0|        goto err;
  259|     86|    ret = 1;
  260|     86|err:
  261|     86|    BN_clear_free(prk);
  262|     86|    return ret;
  263|     86|}
ossl_dh_key2buf:
  419|    172|{
  420|    172|    const BIGNUM *pubkey;
  421|    172|    unsigned char *pbuf = NULL;
  422|    172|    const BIGNUM *p;
  423|    172|    int p_size;
  424|       |
  425|    172|    DH_get0_pqg(dh, &p, NULL, NULL);
  426|    172|    DH_get0_key(dh, &pubkey, NULL);
  427|    172|    if (p == NULL || pubkey == NULL
  ------------------
  |  Branch (427:9): [True: 0, False: 172]
  |  Branch (427:22): [True: 0, False: 172]
  ------------------
  428|    172|        || (p_size = BN_num_bytes(p)) == 0
  ------------------
  |  |  188|    172|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  |  Branch (428:12): [True: 0, False: 172]
  ------------------
  429|    172|        || BN_num_bytes(pubkey) == 0) {
  ------------------
  |  |  188|    172|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  |  Branch (429:12): [True: 0, False: 172]
  ------------------
  430|      0|        ERR_raise(ERR_LIB_DH, DH_R_INVALID_PUBKEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  431|      0|        return 0;
  432|      0|    }
  433|    172|    if (pbuf_out != NULL && (alloc || *pbuf_out != NULL)) {
  ------------------
  |  Branch (433:9): [True: 172, False: 0]
  |  Branch (433:30): [True: 0, False: 172]
  |  Branch (433:39): [True: 86, False: 86]
  ------------------
  434|     86|        if (!alloc) {
  ------------------
  |  Branch (434:13): [True: 86, False: 0]
  ------------------
  435|     86|            if (size >= (size_t)p_size)
  ------------------
  |  Branch (435:17): [True: 86, False: 0]
  ------------------
  436|     86|                pbuf = *pbuf_out;
  437|     86|            if (pbuf == NULL)
  ------------------
  |  Branch (437:17): [True: 0, False: 86]
  ------------------
  438|     86|                ERR_raise(ERR_LIB_DH, DH_R_INVALID_SIZE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  439|     86|        } else {
  440|      0|            pbuf = OPENSSL_malloc(p_size);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  441|      0|        }
  442|       |
  443|       |        /* Errors raised above */
  444|     86|        if (pbuf == NULL)
  ------------------
  |  Branch (444:13): [True: 0, False: 86]
  ------------------
  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|     86|        if (BN_bn2binpad(pubkey, pbuf, p_size) < 0) {
  ------------------
  |  Branch (450:13): [True: 0, False: 86]
  ------------------
  451|      0|            if (alloc)
  ------------------
  |  Branch (451:17): [True: 0, False: 0]
  ------------------
  452|      0|                OPENSSL_free(pbuf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  453|      0|            ERR_raise(ERR_LIB_DH, DH_R_BN_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  454|      0|            return 0;
  455|      0|        }
  456|     86|        *pbuf_out = pbuf;
  457|     86|    }
  458|    172|    return p_size;
  459|    172|}
dh_key.c:generate_key:
  266|     86|{
  267|     86|    int ok = 0;
  268|     86|    int generate_new_key = 0;
  269|     86|#ifndef FIPS_MODULE
  270|     86|    int l;
  271|     86|#endif
  272|     86|    BN_CTX *ctx = NULL;
  273|     86|    BIGNUM *pub_key = NULL, *priv_key = NULL;
  274|       |
  275|     86|    if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) {
  ------------------
  |  |   99|     86|#define OPENSSL_DH_MAX_MODULUS_BITS 10000
  ------------------
  |  Branch (275:9): [True: 0, False: 86]
  ------------------
  276|      0|        ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  277|      0|        return 0;
  278|      0|    }
  279|       |
  280|     86|    if (dh->params.q != NULL
  ------------------
  |  Branch (280:9): [True: 86, False: 0]
  ------------------
  281|     86|        && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) {
  ------------------
  |  |   99|     86|#define OPENSSL_DH_MAX_MODULUS_BITS 10000
  ------------------
  |  Branch (281:12): [True: 0, False: 86]
  ------------------
  282|      0|        ERR_raise(ERR_LIB_DH, DH_R_Q_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  283|      0|        return 0;
  284|      0|    }
  285|       |
  286|     86|    if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) {
  ------------------
  |  |   14|     86|#define DH_MIN_MODULUS_BITS 512
  ------------------
  |  Branch (286:9): [True: 0, False: 86]
  ------------------
  287|      0|        ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  288|      0|        return 0;
  289|      0|    }
  290|       |
  291|     86|    ctx = BN_CTX_new_ex(dh->libctx);
  292|     86|    if (ctx == NULL)
  ------------------
  |  Branch (292:9): [True: 0, False: 86]
  ------------------
  293|      0|        goto err;
  294|       |
  295|     86|    if (dh->priv_key == NULL) {
  ------------------
  |  Branch (295:9): [True: 86, False: 0]
  ------------------
  296|     86|        priv_key = BN_secure_new();
  297|     86|        if (priv_key == NULL)
  ------------------
  |  Branch (297:13): [True: 0, False: 86]
  ------------------
  298|      0|            goto err;
  299|     86|        generate_new_key = 1;
  300|     86|    } else {
  301|      0|        priv_key = dh->priv_key;
  302|      0|    }
  303|       |
  304|     86|    if (dh->pub_key == NULL) {
  ------------------
  |  Branch (304:9): [True: 86, False: 0]
  ------------------
  305|     86|        pub_key = BN_new();
  306|     86|        if (pub_key == NULL)
  ------------------
  |  Branch (306:13): [True: 0, False: 86]
  ------------------
  307|      0|            goto err;
  308|     86|    } else {
  309|      0|        pub_key = dh->pub_key;
  310|      0|    }
  311|     86|    if (generate_new_key) {
  ------------------
  |  Branch (311:9): [True: 86, False: 0]
  ------------------
  312|       |        /* Is it an approved safe prime ?*/
  313|     86|        if (DH_get_nid(dh) != NID_undef) {
  ------------------
  |  |   18|     86|#define NID_undef                       0
  ------------------
  |  Branch (313:13): [True: 86, False: 0]
  ------------------
  314|     86|            int max_strength = ossl_ifc_ffc_compute_security_bits(BN_num_bits(dh->params.p));
  315|       |
  316|     86|            if (dh->params.q == NULL
  ------------------
  |  Branch (316:17): [True: 0, False: 86]
  ------------------
  317|     86|                || dh->length > BN_num_bits(dh->params.q))
  ------------------
  |  Branch (317:20): [True: 0, False: 86]
  ------------------
  318|      0|                goto err;
  319|       |            /* dh->length = maximum bit length of generated private key */
  320|     86|            if (!ossl_ffc_generate_private_key(ctx, &dh->params, dh->length,
  ------------------
  |  Branch (320:17): [True: 0, False: 86]
  ------------------
  321|     86|                    max_strength, priv_key))
  322|      0|                goto err;
  323|     86|        } 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|     86|    }
  369|       |
  370|     86|    if (!ossl_dh_generate_public_key(ctx, dh, priv_key, pub_key))
  ------------------
  |  Branch (370:9): [True: 0, False: 86]
  ------------------
  371|      0|        goto err;
  372|       |
  373|     86|    dh->pub_key = pub_key;
  374|     86|    dh->priv_key = priv_key;
  375|     86|    dh->dirty_cnt++;
  376|     86|    ok = 1;
  377|     86|err:
  378|     86|    if (ok != 1)
  ------------------
  |  Branch (378:9): [True: 0, False: 86]
  ------------------
  379|     86|        ERR_raise(ERR_LIB_DH, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  380|       |
  381|     86|    if (pub_key != dh->pub_key)
  ------------------
  |  Branch (381:9): [True: 0, False: 86]
  ------------------
  382|      0|        BN_free(pub_key);
  383|     86|    if (priv_key != dh->priv_key)
  ------------------
  |  Branch (383:9): [True: 0, False: 86]
  ------------------
  384|      0|        BN_free(priv_key);
  385|     86|    BN_CTX_free(ctx);
  386|     86|    return ok;
  387|     86|}
dh_key.c:dh_bn_mod_exp:
  192|     86|{
  193|       |#ifdef S390X_MOD_EXP
  194|       |    return s390x_mod_exp(r, a, p, m, ctx, m_ctx);
  195|       |#else
  196|     86|    return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx);
  197|     86|#endif
  198|     86|}
dh_key.c:dh_init:
  201|     86|{
  202|     86|    dh->flags |= DH_FLAG_CACHE_MONT_P;
  ------------------
  |  |  108|     86|#define DH_FLAG_CACHE_MONT_P 0x01
  ------------------
  203|     86|    dh->dirty_cnt++;
  204|     86|    return 1;
  205|     86|}
dh_key.c:dh_finish:
  208|     86|{
  209|     86|    BN_MONT_CTX_free(dh->method_mont_p);
  210|     86|    return 1;
  211|     86|}

ossl_dh_new_ex:
   70|     86|{
   71|       |    return dh_new_intern(NULL, libctx);
   72|     86|}
DH_free:
  137|     86|{
  138|     86|    int i;
  139|       |
  140|     86|    if (r == NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 86]
  ------------------
  141|      0|        return;
  142|       |
  143|     86|    CRYPTO_DOWN_REF(&r->references, &i);
  144|     86|    REF_PRINT_COUNT("DH", i, r);
  ------------------
  |  |  301|     86|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|     86|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|     86|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|     86|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|     86|    if (i > 0)
  ------------------
  |  Branch (145:9): [True: 0, False: 86]
  ------------------
  146|      0|        return;
  147|     86|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|     86|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 86]
  |  |  ------------------
  ------------------
  148|       |
  149|     86|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (149:9): [True: 86, False: 0]
  |  Branch (149:28): [True: 86, False: 0]
  ------------------
  150|     86|        r->meth->finish(r);
  151|     86|#if !defined(FIPS_MODULE)
  152|     86|#if !defined(OPENSSL_NO_ENGINE)
  153|     86|    ENGINE_finish(r->engine);
  154|     86|#endif
  155|     86|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DH, r, &r->ex_data);
  ------------------
  |  |  256|     86|#define CRYPTO_EX_INDEX_DH 6
  ------------------
  156|     86|#endif
  157|       |
  158|     86|    CRYPTO_THREAD_lock_free(r->lock);
  159|     86|    CRYPTO_FREE_REF(&r->references);
  160|       |
  161|     86|    ossl_ffc_params_cleanup(&r->params);
  162|     86|    BN_clear_free(r->pub_key);
  163|     86|    BN_clear_free(r->priv_key);
  164|     86|    OPENSSL_free(r);
  ------------------
  |  |  131|     86|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  165|     86|}
DH_bits:
  197|     86|{
  198|     86|    if (dh->params.p != NULL)
  ------------------
  |  Branch (198:9): [True: 86, False: 0]
  ------------------
  199|     86|        return BN_num_bits(dh->params.p);
  200|      0|    return -1;
  201|     86|}
DH_size:
  204|     86|{
  205|     86|    if (dh->params.p != NULL)
  ------------------
  |  Branch (205:9): [True: 86, False: 0]
  ------------------
  206|     86|        return BN_num_bytes(dh->params.p);
  ------------------
  |  |  188|     86|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  207|      0|    return -1;
  208|     86|}
DH_security_bits:
  211|     86|{
  212|     86|    int N;
  213|       |
  214|     86|    if (dh->params.q != NULL)
  ------------------
  |  Branch (214:9): [True: 86, False: 0]
  ------------------
  215|     86|        N = BN_num_bits(dh->params.q);
  216|      0|    else if (dh->length)
  ------------------
  |  Branch (216:14): [True: 0, False: 0]
  ------------------
  217|      0|        N = dh->length;
  218|      0|    else
  219|      0|        N = -1;
  220|     86|    if (dh->params.p != NULL)
  ------------------
  |  Branch (220:9): [True: 86, False: 0]
  ------------------
  221|     86|        return BN_security_bits(BN_num_bits(dh->params.p), N);
  222|      0|    return -1;
  223|     86|}
DH_get0_pqg:
  227|    172|{
  228|    172|    ossl_ffc_params_get0_pqg(&dh->params, p, q, g);
  229|    172|}
DH_get_length:
  248|    258|{
  249|    258|    return dh->length;
  250|    258|}
DH_get0_key:
  260|    430|{
  261|    430|    if (pub_key != NULL)
  ------------------
  |  Branch (261:9): [True: 430, False: 0]
  ------------------
  262|    430|        *pub_key = dh->pub_key;
  263|    430|    if (priv_key != NULL)
  ------------------
  |  Branch (263:9): [True: 258, False: 172]
  ------------------
  264|    258|        *priv_key = dh->priv_key;
  265|    430|}
DH_clear_flags:
  308|     86|{
  309|     86|    dh->flags &= ~flags;
  310|     86|}
DH_set_flags:
  318|     86|{
  319|     86|    dh->flags |= flags;
  320|     86|}
ossl_dh_get0_params:
  330|    344|{
  331|    344|    return &dh->params;
  332|    344|}
dh_lib.c:dh_new_intern:
   75|     86|{
   76|     86|    DH *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|     86|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|       |
   78|     86|    if (ret == NULL)
  ------------------
  |  Branch (78:9): [True: 0, False: 86]
  ------------------
   79|      0|        return NULL;
   80|       |
   81|     86|    ret->lock = CRYPTO_THREAD_lock_new();
   82|     86|    if (ret->lock == NULL) {
  ------------------
  |  Branch (82:9): [True: 0, False: 86]
  ------------------
   83|      0|        ERR_raise(ERR_LIB_DH, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   84|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   85|      0|        return NULL;
   86|      0|    }
   87|       |
   88|     86|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (88:9): [True: 0, False: 86]
  ------------------
   89|      0|        CRYPTO_THREAD_lock_free(ret->lock);
   90|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   91|      0|        return NULL;
   92|      0|    }
   93|       |
   94|     86|    ret->libctx = libctx;
   95|     86|    ret->meth = DH_get_default_method();
   96|     86|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_ENGINE)
   97|     86|    ret->flags = ret->meth->flags; /* early default init */
   98|     86|    if (engine) {
  ------------------
  |  Branch (98:9): [True: 0, False: 86]
  ------------------
   99|      0|        if (!ENGINE_init(engine)) {
  ------------------
  |  Branch (99:13): [True: 0, False: 0]
  ------------------
  100|      0|            ERR_raise(ERR_LIB_DH, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  101|      0|            goto err;
  102|      0|        }
  103|      0|        ret->engine = engine;
  104|      0|    } else
  105|     86|        ret->engine = ENGINE_get_default_DH();
  106|     86|    if (ret->engine) {
  ------------------
  |  Branch (106:9): [True: 0, False: 86]
  ------------------
  107|      0|        ret->meth = ENGINE_get_DH(ret->engine);
  108|      0|        if (ret->meth == NULL) {
  ------------------
  |  Branch (108:13): [True: 0, False: 0]
  ------------------
  109|      0|            ERR_raise(ERR_LIB_DH, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  110|      0|            goto err;
  111|      0|        }
  112|      0|    }
  113|     86|#endif
  114|       |
  115|     86|    ret->flags = ret->meth->flags;
  116|       |
  117|     86|#ifndef FIPS_MODULE
  118|     86|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_DH, ret, &ret->ex_data))
  ------------------
  |  |  256|     86|#define CRYPTO_EX_INDEX_DH 6
  ------------------
  |  Branch (118:9): [True: 0, False: 86]
  ------------------
  119|      0|        goto err;
  120|     86|#endif /* FIPS_MODULE */
  121|       |
  122|     86|    ossl_ffc_params_init(&ret->params);
  123|       |
  124|     86|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (124:9): [True: 86, False: 0]
  |  Branch (124:38): [True: 0, False: 86]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_DH, ERR_R_INIT_FAIL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        goto err;
  127|      0|    }
  128|       |
  129|     86|    return ret;
  130|       |
  131|      0|err:
  132|      0|    DH_free(ret);
  133|       |    return NULL;
  134|     86|}

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

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:
  213|  2.70k|{
  214|  2.70k|    int i;
  215|       |
  216|  2.70k|    if (r == NULL)
  ------------------
  |  Branch (216:9): [True: 2.70k, False: 0]
  ------------------
  217|  2.70k|        return;
  218|       |
  219|      0|    CRYPTO_DOWN_REF(&r->references, &i);
  220|      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));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  221|      0|    if (i > 0)
  ------------------
  |  Branch (221:9): [True: 0, False: 0]
  ------------------
  222|      0|        return;
  223|      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]
  |  |  ------------------
  ------------------
  224|       |
  225|      0|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (225:9): [True: 0, False: 0]
  |  Branch (225:28): [True: 0, False: 0]
  ------------------
  226|      0|        r->meth->finish(r);
  227|      0|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_ENGINE)
  228|      0|    ENGINE_finish(r->engine);
  229|      0|#endif
  230|       |
  231|      0|#ifndef FIPS_MODULE
  232|      0|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, r, &r->ex_data);
  ------------------
  |  |  257|      0|#define CRYPTO_EX_INDEX_DSA 7
  ------------------
  233|      0|#endif
  234|       |
  235|      0|    CRYPTO_THREAD_lock_free(r->lock);
  236|      0|    CRYPTO_FREE_REF(&r->references);
  237|       |
  238|      0|    ossl_ffc_params_cleanup(&r->params);
  239|      0|    BN_clear_free(r->pub_key);
  240|      0|    BN_clear_free(r->priv_key);
  241|      0|    OPENSSL_free(r);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|      0|}

DSO_METHOD_openssl:
   62|    973|{
   63|    973|    return &dso_meth_dlfcn;
   64|    973|}
dso_dlfcn.c:dlfcn_load:
   94|    973|{
   95|    973|    void *ptr = NULL;
   96|       |    /* See applicable comments in dso_dl.c */
   97|    973|    char *filename = DSO_convert_filename(dso, NULL);
   98|    973|    int flags = DLOPEN_FLAG;
  ------------------
  |  |   85|    973|#define DLOPEN_FLAG RTLD_NOW /* Hope this works everywhere else */
  ------------------
   99|    973|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|    973|#define get_last_sys_error() errno
  ------------------
  100|       |
  101|    973|    if (filename == NULL) {
  ------------------
  |  Branch (101:9): [True: 0, False: 973]
  ------------------
  102|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NO_FILENAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  103|      0|        goto err;
  104|      0|    }
  105|    973|#ifdef RTLD_GLOBAL
  106|    973|    if (dso->flags & DSO_FLAG_GLOBAL_SYMBOLS)
  ------------------
  |  |   53|    973|#define DSO_FLAG_GLOBAL_SYMBOLS 0x20
  ------------------
  |  Branch (106:9): [True: 0, False: 973]
  ------------------
  107|      0|        flags |= RTLD_GLOBAL;
  108|    973|#endif
  109|       |#ifdef _AIX
  110|       |    if (filename[strlen(filename) - 1] == ')')
  111|       |        flags |= RTLD_MEMBER;
  112|       |#endif
  113|    973|    ptr = dlopen(filename, flags);
  114|    973|    if (ptr == NULL) {
  ------------------
  |  Branch (114:9): [True: 973, False: 0]
  ------------------
  115|    973|        ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |  406|    973|    (ERR_new(),                                                  \
  |  |  407|    973|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    973|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    973|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |  100|    973|#define ERR_LIB_DSO 37
  ------------------
                      ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |   34|    973|#define DSO_R_LOAD_FAILED 103
  ------------------
  116|    973|            "filename(%s): %s", filename, dlerror());
  117|    973|        goto err;
  118|    973|    }
  119|       |    /*
  120|       |     * Some dlopen() implementations (e.g. solaris) do no preserve errno, even
  121|       |     * on a successful call.
  122|       |     */
  123|    973|    set_sys_error(saveerrno);
  ------------------
  |  |   32|    973|#define set_sys_error(e) errno = (e)
  ------------------
  124|      0|    if (!sk_void_push(dso->meth_data, (char *)ptr)) {
  ------------------
  |  |  229|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        goto err;
  127|      0|    }
  128|       |    /* Success */
  129|      0|    dso->loaded_filename = filename;
  130|      0|    return 1;
  131|    973|err:
  132|       |    /* Cleanup! */
  133|    973|    OPENSSL_free(filename);
  ------------------
  |  |  131|    973|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  134|    973|    if (ptr != NULL)
  ------------------
  |  Branch (134:9): [True: 0, False: 973]
  ------------------
  135|      0|        dlclose(ptr);
  136|    973|    return 0;
  137|      0|}
dso_dlfcn.c:dlfcn_unload:
  140|    973|{
  141|    973|    void *ptr;
  142|    973|    if (dso == NULL) {
  ------------------
  |  Branch (142:9): [True: 0, False: 973]
  ------------------
  143|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  144|      0|        return 0;
  145|      0|    }
  146|    973|    if (sk_void_num(dso->meth_data) < 1)
  ------------------
  |  |  219|    973|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (146:9): [True: 973, False: 0]
  ------------------
  147|    973|        return 1;
  148|      0|    ptr = sk_void_pop(dso->meth_data);
  ------------------
  |  |  231|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  229|      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|  1.94k|{
  246|  1.94k|    char *translated;
  247|  1.94k|    int len, rsize, transform;
  248|       |
  249|  1.94k|    len = strlen(filename);
  250|  1.94k|    rsize = len + 1;
  251|  1.94k|    transform = (strchr(filename, '/') == NULL);
  252|  1.94k|    if (transform) {
  ------------------
  |  Branch (252:9): [True: 858, False: 1.08k]
  ------------------
  253|       |        /* We will convert this to "%s.so" or "lib%s.so" etc */
  254|    858|        rsize += strlen(DSO_EXTENSION); /* The length of ".so" */
  ------------------
  |  |   23|    858|# define DSO_EXTENSION ".so"
  ------------------
  255|    858|        if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
  ------------------
  |  |   41|    858|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  |  Branch (255:13): [True: 0, False: 858]
  ------------------
  256|      0|            rsize += 3; /* The length of "lib" */
  257|    858|    }
  258|  1.94k|    translated = OPENSSL_malloc(rsize);
  ------------------
  |  |  106|  1.94k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  259|  1.94k|    if (translated == NULL) {
  ------------------
  |  Branch (259:9): [True: 0, False: 1.94k]
  ------------------
  260|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NAME_TRANSLATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  261|      0|        return NULL;
  262|      0|    }
  263|  1.94k|    if (transform) {
  ------------------
  |  Branch (263:9): [True: 858, False: 1.08k]
  ------------------
  264|    858|        if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
  ------------------
  |  |   41|    858|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  |  Branch (264:13): [True: 0, False: 858]
  ------------------
  265|      0|            BIO_snprintf(translated, rsize, "lib%s" DSO_EXTENSION, filename);
  ------------------
  |  |   23|      0|# define DSO_EXTENSION ".so"
  ------------------
  266|    858|        else
  267|    858|            BIO_snprintf(translated, rsize, "%s" DSO_EXTENSION, filename);
  ------------------
  |  |   23|    858|# define DSO_EXTENSION ".so"
  ------------------
  268|  1.08k|    } else {
  269|  1.08k|        BIO_snprintf(translated, rsize, "%s", filename);
  270|  1.08k|    }
  271|  1.94k|    return translated;
  272|  1.94k|}
dso_dlfcn.c:dlfcn_merger:
  194|    973|{
  195|    973|    char *merged;
  196|       |
  197|    973|    if (!filespec1 && !filespec2) {
  ------------------
  |  Branch (197:9): [True: 0, False: 973]
  |  Branch (197:23): [True: 0, False: 0]
  ------------------
  198|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|    973|    if (!filespec2 || (filespec1 != NULL && filespec1[0] == '/')) {
  ------------------
  |  Branch (205:9): [True: 0, False: 973]
  |  Branch (205:24): [True: 973, False: 0]
  |  Branch (205:45): [True: 7, False: 966]
  ------------------
  206|      7|        merged = OPENSSL_strdup(filespec1);
  ------------------
  |  |  135|      7|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  207|      7|        if (merged == NULL)
  ------------------
  |  Branch (207:13): [True: 0, False: 7]
  ------------------
  208|      0|            return NULL;
  209|      7|    }
  210|       |    /*
  211|       |     * If the first file specification is missing, the second one rules.
  212|       |     */
  213|    966|    else if (!filespec1) {
  ------------------
  |  Branch (213:14): [True: 0, False: 966]
  ------------------
  214|      0|        merged = OPENSSL_strdup(filespec2);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  215|      0|        if (merged == NULL)
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|            return NULL;
  217|    966|    } 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|    966|        int spec2len, len;
  226|       |
  227|    966|        spec2len = strlen(filespec2);
  228|    966|        len = spec2len + strlen(filespec1);
  229|       |
  230|    966|        if (spec2len && filespec2[spec2len - 1] == '/') {
  ------------------
  |  Branch (230:13): [True: 966, False: 0]
  |  Branch (230:25): [True: 0, False: 966]
  ------------------
  231|      0|            spec2len--;
  232|      0|            len--;
  233|      0|        }
  234|    966|        merged = OPENSSL_malloc(len + 2);
  ------------------
  |  |  106|    966|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  235|    966|        if (merged == NULL)
  ------------------
  |  Branch (235:13): [True: 0, False: 966]
  ------------------
  236|      0|            return NULL;
  237|    966|        strcpy(merged, filespec2);
  238|    966|        merged[spec2len] = '/';
  239|    966|        strcpy(&merged[spec2len + 1], filespec1);
  240|    966|    }
  241|    973|    return merged;
  242|    973|}

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|    973|{
   44|       |    return DSO_new_method(NULL);
   45|    973|}
DSO_free:
   48|  3.65k|{
   49|  3.65k|    int i;
   50|       |
   51|  3.65k|    if (dso == NULL)
  ------------------
  |  Branch (51:9): [True: 2.67k, False: 973]
  ------------------
   52|  2.67k|        return 1;
   53|       |
   54|    973|    if (CRYPTO_DOWN_REF(&dso->references, &i) <= 0)
  ------------------
  |  Branch (54:9): [True: 0, False: 973]
  ------------------
   55|      0|        return 0;
   56|       |
   57|    973|    REF_PRINT_COUNT("DSO", i, dso);
  ------------------
  |  |  301|    973|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|    973|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|    973|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|    973|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   58|    973|    if (i > 0)
  ------------------
  |  Branch (58:9): [True: 0, False: 973]
  ------------------
   59|      0|        return 1;
   60|    973|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|    973|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 973]
  |  |  ------------------
  ------------------
   61|       |
   62|    973|    if ((dso->flags & DSO_FLAG_NO_UNLOAD_ON_FREE) == 0) {
  ------------------
  |  |   46|    973|#define DSO_FLAG_NO_UNLOAD_ON_FREE 0x04
  ------------------
  |  Branch (62:9): [True: 973, False: 0]
  ------------------
   63|    973|        if ((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) {
  ------------------
  |  Branch (63:13): [True: 973, False: 0]
  |  Branch (63:48): [True: 0, False: 973]
  ------------------
   64|      0|            ERR_raise(ERR_LIB_DSO, DSO_R_UNLOAD_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   65|      0|            return 0;
   66|      0|        }
   67|    973|    }
   68|       |
   69|    973|    if ((dso->meth->finish != NULL) && !dso->meth->finish(dso)) {
  ------------------
  |  Branch (69:9): [True: 0, False: 973]
  |  Branch (69:40): [True: 0, False: 0]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_FINISH_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|       |
   74|    973|    sk_void_free(dso->meth_data);
  ------------------
  |  |  225|    973|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
   75|    973|    OPENSSL_free(dso->filename);
  ------------------
  |  |  131|    973|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|    973|    OPENSSL_free(dso->loaded_filename);
  ------------------
  |  |  131|    973|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|    973|    CRYPTO_FREE_REF(&dso->references);
   78|    973|    OPENSSL_free(dso);
  ------------------
  |  |  131|    973|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|    973|    return 1;
   80|    973|}
DSO_flags:
   83|  1.71k|{
   84|  1.71k|    return ((dso == NULL) ? 0 : dso->flags);
  ------------------
  |  Branch (84:13): [True: 0, False: 1.71k]
  ------------------
   85|  1.71k|}
DSO_load:
  105|    973|{
  106|    973|    DSO *ret;
  107|    973|    int allocated = 0;
  108|       |
  109|    973|    if (dso == NULL) {
  ------------------
  |  Branch (109:9): [True: 0, False: 973]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|      0|            goto err;
  120|      0|        }
  121|      0|    } else
  122|    973|        ret = dso;
  123|       |    /* Don't load if we're currently already loaded */
  124|    973|    if (ret->filename != NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 973]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_DSO_ALREADY_LOADED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|    973|    if (filename != NULL)
  ------------------
  |  Branch (132:9): [True: 973, False: 0]
  ------------------
  133|    973|        if (!DSO_set_filename(ret, filename)) {
  ------------------
  |  Branch (133:13): [True: 0, False: 973]
  ------------------
  134|      0|            ERR_raise(ERR_LIB_DSO, DSO_R_SET_FILENAME_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  135|      0|            goto err;
  136|      0|        }
  137|    973|    filename = ret->filename;
  138|    973|    if (filename == NULL) {
  ------------------
  |  Branch (138:9): [True: 0, False: 973]
  ------------------
  139|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NO_FILENAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  140|      0|        goto err;
  141|      0|    }
  142|    973|    if (ret->meth->dso_load == NULL) {
  ------------------
  |  Branch (142:9): [True: 0, False: 973]
  ------------------
  143|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_UNSUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  144|      0|        goto err;
  145|      0|    }
  146|    973|    if (!ret->meth->dso_load(ret)) {
  ------------------
  |  Branch (146:9): [True: 973, False: 0]
  ------------------
  147|    973|        ERR_raise(ERR_LIB_DSO, DSO_R_LOAD_FAILED);
  ------------------
  |  |  404|    973|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|    973|    (ERR_new(),                                                  \
  |  |  |  |  407|    973|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    973|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|    973|        ERR_set_error)
  |  |  ------------------
  ------------------
  148|    973|        goto err;
  149|    973|    }
  150|       |    /* Load succeeded */
  151|      0|    return ret;
  152|    973|err:
  153|    973|    if (allocated)
  ------------------
  |  Branch (153:9): [True: 0, False: 973]
  ------------------
  154|      0|        DSO_free(ret);
  155|       |    return NULL;
  156|    973|}
DSO_ctrl:
  188|    973|{
  189|    973|    if (dso == NULL) {
  ------------------
  |  Branch (189:9): [True: 0, False: 973]
  ------------------
  190|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|    973|    switch (cmd) {
  198|      0|    case DSO_CTRL_GET_FLAGS:
  ------------------
  |  |   18|      0|#define DSO_CTRL_GET_FLAGS 1
  ------------------
  |  Branch (198:5): [True: 0, False: 973]
  ------------------
  199|      0|        return dso->flags;
  200|    973|    case DSO_CTRL_SET_FLAGS:
  ------------------
  |  |   19|    973|#define DSO_CTRL_SET_FLAGS 2
  ------------------
  |  Branch (200:5): [True: 973, False: 0]
  ------------------
  201|    973|        dso->flags = (int)larg;
  202|    973|        return 0;
  203|      0|    case DSO_CTRL_OR_FLAGS:
  ------------------
  |  |   20|      0|#define DSO_CTRL_OR_FLAGS 3
  ------------------
  |  Branch (203:5): [True: 0, False: 973]
  ------------------
  204|      0|        dso->flags |= (int)larg;
  205|      0|        return 0;
  206|      0|    default:
  ------------------
  |  Branch (206:5): [True: 0, False: 973]
  ------------------
  207|      0|        break;
  208|    973|    }
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|    973|{
  227|    973|    char *copied;
  228|       |
  229|    973|    if ((dso == NULL) || (filename == NULL)) {
  ------------------
  |  Branch (229:9): [True: 0, False: 973]
  |  Branch (229:26): [True: 0, False: 973]
  ------------------
  230|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  231|      0|        return 0;
  232|      0|    }
  233|    973|    if (dso->loaded_filename) {
  ------------------
  |  Branch (233:9): [True: 0, False: 973]
  ------------------
  234|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_DSO_ALREADY_LOADED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  235|      0|        return 0;
  236|      0|    }
  237|       |    /* We'll duplicate filename */
  238|    973|    copied = OPENSSL_strdup(filename);
  ------------------
  |  |  135|    973|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  239|    973|    if (copied == NULL)
  ------------------
  |  Branch (239:9): [True: 0, False: 973]
  ------------------
  240|      0|        return 0;
  241|    973|    OPENSSL_free(dso->filename);
  ------------------
  |  |  131|    973|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|    973|    dso->filename = copied;
  243|    973|    return 1;
  244|    973|}
DSO_merge:
  247|    973|{
  248|    973|    char *result = NULL;
  249|       |
  250|    973|    if (dso == NULL || filespec1 == NULL) {
  ------------------
  |  Branch (250:9): [True: 0, False: 973]
  |  Branch (250:24): [True: 0, False: 973]
  ------------------
  251|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  252|      0|        return NULL;
  253|      0|    }
  254|    973|    if ((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) {
  ------------------
  |  |   33|    973|#define DSO_FLAG_NO_NAME_TRANSLATION 0x01
  ------------------
  |  Branch (254:9): [True: 973, False: 0]
  ------------------
  255|    973|        if (dso->merger != NULL)
  ------------------
  |  Branch (255:13): [True: 0, False: 973]
  ------------------
  256|      0|            result = dso->merger(dso, filespec1, filespec2);
  257|    973|        else if (dso->meth->dso_merger != NULL)
  ------------------
  |  Branch (257:18): [True: 973, False: 0]
  ------------------
  258|    973|            result = dso->meth->dso_merger(dso, filespec1, filespec2);
  259|    973|    }
  260|    973|    return result;
  261|    973|}
DSO_convert_filename:
  264|  1.94k|{
  265|  1.94k|    char *result = NULL;
  266|       |
  267|  1.94k|    if (dso == NULL) {
  ------------------
  |  Branch (267:9): [True: 0, False: 1.94k]
  ------------------
  268|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        return NULL;
  270|      0|    }
  271|  1.94k|    if (filename == NULL)
  ------------------
  |  Branch (271:9): [True: 973, False: 973]
  ------------------
  272|    973|        filename = dso->filename;
  273|  1.94k|    if (filename == NULL) {
  ------------------
  |  Branch (273:9): [True: 0, False: 1.94k]
  ------------------
  274|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NO_FILENAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  275|      0|        return NULL;
  276|      0|    }
  277|  1.94k|    if ((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) {
  ------------------
  |  |   33|  1.94k|#define DSO_FLAG_NO_NAME_TRANSLATION 0x01
  ------------------
  |  Branch (277:9): [True: 1.94k, False: 0]
  ------------------
  278|  1.94k|        if (dso->name_converter != NULL)
  ------------------
  |  Branch (278:13): [True: 0, False: 1.94k]
  ------------------
  279|      0|            result = dso->name_converter(dso, filename);
  280|  1.94k|        else if (dso->meth->dso_name_converter != NULL)
  ------------------
  |  Branch (280:18): [True: 1.94k, False: 0]
  ------------------
  281|  1.94k|            result = dso->meth->dso_name_converter(dso, filename);
  282|  1.94k|    }
  283|  1.94k|    if (result == NULL) {
  ------------------
  |  Branch (283:9): [True: 0, False: 1.94k]
  ------------------
  284|      0|        result = OPENSSL_strdup(filename);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  285|      0|        if (result == NULL)
  ------------------
  |  Branch (285:13): [True: 0, False: 0]
  ------------------
  286|      0|            return NULL;
  287|      0|    }
  288|  1.94k|    return result;
  289|  1.94k|}
dso_lib.c:DSO_new_method:
   14|    973|{
   15|    973|    DSO *ret;
   16|       |
   17|    973|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|    973|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   18|    973|    if (ret == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 973]
  ------------------
   19|      0|        return NULL;
   20|    973|    ret->meth_data = sk_void_new_null();
  ------------------
  |  |  222|    973|#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_new_null())
  ------------------
   21|    973|    if (ret->meth_data == NULL) {
  ------------------
  |  Branch (21:9): [True: 0, False: 973]
  ------------------
   22|       |        /* sk_new doesn't generate any errors so we do */
   23|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   24|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|      0|        return NULL;
   26|      0|    }
   27|    973|    ret->meth = DSO_METHOD_openssl();
   28|    973|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (28:9): [True: 0, False: 973]
  ------------------
   29|      0|        sk_void_free(ret->meth_data);
  ------------------
  |  |  225|      0|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
   30|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   31|      0|        return NULL;
   32|      0|    }
   33|       |
   34|    973|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 973]
  |  Branch (34:38): [True: 0, False: 0]
  ------------------
   35|      0|        DSO_free(ret);
   36|      0|        ret = NULL;
   37|      0|    }
   38|       |
   39|    973|    return ret;
   40|    973|}

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

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

curve448.c:gf_sub_RAW:
   37|    318|{
   38|    318|    uint64_t co1 = ((1ULL << 56) - 1) * 2, co2 = co1 - 2;
   39|    318|    unsigned int i;
   40|       |
   41|  2.86k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|  2.86k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (41:17): [True: 2.54k, False: 318]
  ------------------
   42|  2.54k|        out->limb[i] = a->limb[i] - b->limb[i] + ((i == NLIMBS / 2) ? co2 : co1);
  ------------------
  |  |   21|  2.54k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (42:51): [True: 318, False: 2.22k]
  ------------------
   43|       |
   44|    318|    gf_weak_reduce(out);
   45|    318|}
curve448.c:gf_bias:
   48|    318|{
   49|    318|}
curve448.c:gf_weak_reduce:
   52|    636|{
   53|    636|    uint64_t mask = (1ULL << 56) - 1;
   54|    636|    uint64_t tmp = a->limb[NLIMBS - 1] >> 56;
  ------------------
  |  |   21|    636|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   55|    636|    unsigned int i;
   56|       |
   57|    636|    a->limb[NLIMBS / 2] += tmp;
  ------------------
  |  |   21|    636|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   58|  5.08k|    for (i = NLIMBS - 1; i > 0; i--)
  ------------------
  |  |   21|    636|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (58:26): [True: 4.45k, False: 636]
  ------------------
   59|  4.45k|        a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 56);
   60|    636|    a->limb[0] = (a->limb[0] & mask) + tmp;
   61|    636|}
curve448.c:gf_add_RAW:
   27|    318|{
   28|    318|    unsigned int i;
   29|       |
   30|  2.86k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|  2.86k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (30:17): [True: 2.54k, False: 318]
  ------------------
   31|  2.54k|        out->limb[i] = a->limb[i] + b->limb[i];
   32|       |
   33|    318|    gf_weak_reduce(out);
   34|    318|}
f_generic.c:gf_weak_reduce:
   52|    188|{
   53|    188|    uint64_t mask = (1ULL << 56) - 1;
   54|    188|    uint64_t tmp = a->limb[NLIMBS - 1] >> 56;
  ------------------
  |  |   21|    188|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   55|    188|    unsigned int i;
   56|       |
   57|    188|    a->limb[NLIMBS / 2] += tmp;
  ------------------
  |  |   21|    188|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   58|  1.50k|    for (i = NLIMBS - 1; i > 0; i--)
  ------------------
  |  |   21|    188|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (58:26): [True: 1.31k, False: 188]
  ------------------
   59|  1.31k|        a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 56);
   60|    188|    a->limb[0] = (a->limb[0] & mask) + tmp;
   61|    188|}
f_generic.c:gf_sub_RAW:
   37|     92|{
   38|     92|    uint64_t co1 = ((1ULL << 56) - 1) * 2, co2 = co1 - 2;
   39|     92|    unsigned int i;
   40|       |
   41|    828|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|    828|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (41:17): [True: 736, False: 92]
  ------------------
   42|    736|        out->limb[i] = a->limb[i] - b->limb[i] + ((i == NLIMBS / 2) ? co2 : co1);
  ------------------
  |  |   21|    736|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (42:51): [True: 92, False: 644]
  ------------------
   43|       |
   44|     92|    gf_weak_reduce(out);
   45|     92|}
f_generic.c:gf_bias:
   48|     92|{
   49|     92|}
f_generic.c:gf_add_RAW:
   27|      1|{
   28|      1|    unsigned int i;
   29|       |
   30|      9|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|      9|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (30:17): [True: 8, False: 1]
  ------------------
   31|      8|        out->limb[i] = a->limb[i] + b->limb[i];
   32|       |
   33|      1|    gf_weak_reduce(out);
   34|      1|}

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

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

gf_serialize:
   22|      1|{
   23|      1|    unsigned int j = 0, fill = 0;
   24|      1|    dword_t buffer = 0;
   25|      1|    int i;
   26|      1|    gf red;
   27|       |
   28|      1|    gf_copy(red, x);
   29|      1|    gf_strong_reduce(red);
   30|      1|    if (!with_hibit)
  ------------------
  |  Branch (30:9): [True: 0, False: 1]
  ------------------
   31|      1|        assert(gf_hibit(red) == 0);
  ------------------
  |  Branch (31:9): [True: 0, False: 0]
  |  Branch (31:9): [True: 0, False: 0]
  ------------------
   32|       |
   33|     57|    for (i = 0; i < (with_hibit ? X_SER_BYTES : SER_BYTES); i++) {
  ------------------
  |  |   22|     57|#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: 56, False: 1]
  |  Branch (33:22): [True: 57, False: 0]
  ------------------
   34|     56|        if (fill < 8 && j < NLIMBS) {
  ------------------
  |  |   21|      8|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (34:13): [True: 8, False: 48]
  |  Branch (34:25): [True: 8, False: 0]
  ------------------
   35|      8|            buffer |= ((dword_t)red->limb[LIMBPERM(j)]) << fill;
  ------------------
  |  |   69|      8|#define LIMBPERM(i) (i)
  ------------------
   36|      8|            fill += LIMB_PLACE_VALUE(LIMBPERM(j));
  ------------------
  |  |   24|      8|#define LIMB_PLACE_VALUE(i) 56
  ------------------
   37|      8|            j++;
   38|      8|        }
   39|     56|        serial[i] = (uint8_t)buffer;
   40|     56|        fill -= 8;
   41|     56|        buffer >>= 8;
   42|     56|    }
   43|      1|}
gf_strong_reduce:
   98|      2|{
   99|      2|    dsword_t scarry;
  100|      2|    word_t scarry_0;
  101|      2|    dword_t carry = 0;
  102|      2|    unsigned int i;
  103|       |
  104|       |    /* first, clear high */
  105|      2|    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|      2|    scarry = 0;
  111|     18|    for (i = 0; i < NLIMBS; i++) {
  ------------------
  |  |   21|     18|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (111:17): [True: 16, False: 2]
  ------------------
  112|     16|        scarry = scarry + a->limb[LIMBPERM(i)] - MODULUS->limb[LIMBPERM(i)];
  ------------------
  |  |   69|     16|#define LIMBPERM(i) (i)
  ------------------
                      scarry = scarry + a->limb[LIMBPERM(i)] - MODULUS->limb[LIMBPERM(i)];
  ------------------
  |  |   69|     16|#define LIMBPERM(i) (i)
  ------------------
  113|     16|        a->limb[LIMBPERM(i)] = scarry & LIMB_MASK(LIMBPERM(i));
  ------------------
  |  |   69|     16|#define LIMBPERM(i) (i)
  ------------------
                      a->limb[LIMBPERM(i)] = scarry & LIMB_MASK(LIMBPERM(i));
  ------------------
  |  |   75|     16|#define LIMB_MASK(i) (((1ULL) << LIMB_PLACE_VALUE(i)) - 1)
  |  |  ------------------
  |  |  |  |   24|     16|#define LIMB_PLACE_VALUE(i) 56
  |  |  ------------------
  ------------------
  114|     16|        scarry >>= LIMB_PLACE_VALUE(LIMBPERM(i));
  ------------------
  |  |   24|     16|#define LIMB_PLACE_VALUE(i) 56
  ------------------
  115|     16|    }
  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|      2|    assert(scarry == 0 || scarry == -1);
  ------------------
  |  Branch (122:5): [True: 2, False: 0]
  |  Branch (122:5): [True: 0, False: 0]
  |  Branch (122:5): [True: 1, False: 1]
  |  Branch (122:5): [True: 1, False: 0]
  ------------------
  123|       |
  124|      2|    scarry_0 = (word_t)scarry;
  125|       |
  126|       |    /* add it back */
  127|     18|    for (i = 0; i < NLIMBS; i++) {
  ------------------
  |  |   21|     18|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (127:17): [True: 16, False: 2]
  ------------------
  128|     16|        carry = carry + a->limb[LIMBPERM(i)] + (scarry_0 & MODULUS->limb[LIMBPERM(i)]);
  ------------------
  |  |   69|     16|#define LIMBPERM(i) (i)
  ------------------
                      carry = carry + a->limb[LIMBPERM(i)] + (scarry_0 & MODULUS->limb[LIMBPERM(i)]);
  ------------------
  |  |   69|     16|#define LIMBPERM(i) (i)
  ------------------
  129|     16|        a->limb[LIMBPERM(i)] = carry & LIMB_MASK(LIMBPERM(i));
  ------------------
  |  |   69|     16|#define LIMBPERM(i) (i)
  ------------------
                      a->limb[LIMBPERM(i)] = carry & LIMB_MASK(LIMBPERM(i));
  ------------------
  |  |   75|     16|#define LIMB_MASK(i) (((1ULL) << LIMB_PLACE_VALUE(i)) - 1)
  |  |  ------------------
  |  |  |  |   24|     16|#define LIMB_PLACE_VALUE(i) 56
  |  |  ------------------
  ------------------
  130|     16|        carry >>= LIMB_PLACE_VALUE(LIMBPERM(i));
  ------------------
  |  |   24|     16|#define LIMB_PLACE_VALUE(i) 56
  ------------------
  131|     16|    }
  132|       |
  133|       |    assert(carry < 2 && ((word_t)carry + scarry_0) == 0);
  ------------------
  |  Branch (133:5): [True: 0, False: 2]
  |  Branch (133:5): [True: 0, False: 0]
  |  Branch (133:5): [True: 2, False: 0]
  |  Branch (133:5): [True: 2, False: 0]
  ------------------
  134|      2|}
gf_sub:
  138|     92|{
  139|     92|    gf_sub_RAW(d, a, b);
  140|     92|    gf_bias(d, 2);
  141|     92|    gf_weak_reduce(d);
  142|     92|}
gf_add:
  146|      1|{
  147|      1|    gf_add_RAW(d, a, b);
  148|      1|    gf_weak_reduce(d);
  149|      1|}
gf_eq:
  153|      1|{
  154|      1|    gf c;
  155|      1|    mask_t ret = 0;
  156|      1|    unsigned int i;
  157|       |
  158|      1|    gf_sub(c, a, b);
  159|      1|    gf_strong_reduce(c);
  160|       |
  161|      9|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|      9|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (161:17): [True: 8, False: 1]
  ------------------
  162|      8|        ret |= c->limb[LIMBPERM(i)];
  ------------------
  |  |   69|      8|#define LIMBPERM(i) (i)
  ------------------
  163|       |
  164|      1|    return word_is_zero(ret);
  ------------------
  |  |   20|      1|#define word_is_zero(a) constant_time_is_zero_64(a)
  ------------------
  165|      1|}
gf_isr:
  168|      1|{
  169|      1|    gf L0, L1, L2;
  170|       |
  171|      1|    ossl_gf_sqr(L1, x);
  172|      1|    ossl_gf_mul(L2, x, L1);
  173|      1|    ossl_gf_sqr(L1, L2);
  174|      1|    ossl_gf_mul(L2, x, L1);
  175|      1|    gf_sqrn(L1, L2, 3);
  176|      1|    ossl_gf_mul(L0, L2, L1);
  177|      1|    gf_sqrn(L1, L0, 3);
  178|      1|    ossl_gf_mul(L0, L2, L1);
  179|      1|    gf_sqrn(L2, L0, 9);
  180|      1|    ossl_gf_mul(L1, L0, L2);
  181|      1|    ossl_gf_sqr(L0, L1);
  182|      1|    ossl_gf_mul(L2, x, L0);
  183|      1|    gf_sqrn(L0, L2, 18);
  184|      1|    ossl_gf_mul(L2, L1, L0);
  185|      1|    gf_sqrn(L0, L2, 37);
  186|      1|    ossl_gf_mul(L1, L2, L0);
  187|      1|    gf_sqrn(L0, L1, 37);
  188|      1|    ossl_gf_mul(L1, L2, L0);
  189|      1|    gf_sqrn(L0, L1, 111);
  190|      1|    ossl_gf_mul(L2, L1, L0);
  191|      1|    ossl_gf_sqr(L0, L2);
  192|      1|    ossl_gf_mul(L1, x, L0);
  193|      1|    gf_sqrn(L0, L1, 223);
  194|      1|    ossl_gf_mul(L1, L2, L0);
  195|      1|    ossl_gf_sqr(L2, L1);
  196|      1|    ossl_gf_mul(L0, L2, x);
  197|      1|    gf_copy(a, L1);
  198|      1|    return gf_eq(L0, ONE);
  199|      1|}

curve448.c:gf_subx_nr:
  113|     34|{
  114|     34|    gf_sub_RAW(c, a, b);
  115|     34|    gf_bias(c, amt);
  116|     34|    if (GF_HEADROOM < amt + 1)
  ------------------
  |  |   16|     34|#define GF_HEADROOM 9999 /* Everything is reduced anyway */
  ------------------
  |  Branch (116:9): [True: 0, False: 34]
  ------------------
  117|      0|        gf_weak_reduce(c);
  118|     34|}
curve448.c:gf_cond_neg:
  150|     90|{
  151|     90|    gf y;
  152|       |
  153|     90|    gf_sub(y, ZERO, x);
  154|     90|    gf_cond_sel(x, x, y, neg);
  155|     90|}
curve448.c:gf_cond_sel:
  133|     90|{
  134|     90|    size_t i;
  135|       |
  136|    810|    for (i = 0; i < NLIMBS; i++) {
  ------------------
  |  |   21|    810|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (136:17): [True: 720, False: 90]
  ------------------
  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|    720|        x[0].limb[i] = constant_time_select_64(is_z, z[0].limb[i],
  143|    720|            y[0].limb[i]);
  144|    720|#endif
  145|    720|    }
  146|     90|}
curve448.c:gf_copy:
   45|      2|{
   46|      2|    *out = *a;
   47|      2|}
curve448.c:gf_cond_swap:
  159|     90|{
  160|     90|    size_t i;
  161|       |
  162|    810|    for (i = 0; i < NLIMBS; i++) {
  ------------------
  |  |   21|    810|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (162:17): [True: 720, False: 90]
  ------------------
  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|    720|        constant_time_cond_swap_64(swap, &(x[0].limb[i]), &(y->limb[i]));
  168|    720|#endif
  169|    720|    }
  170|     90|}
curve448.c:gf_sub_nr:
  104|    284|{
  105|    284|    gf_sub_RAW(c, a, b);
  106|    284|    gf_bias(c, 2);
  107|    284|    if (GF_HEADROOM < 3)
  ------------------
  |  |   16|    284|#define GF_HEADROOM 9999 /* Everything is reduced anyway */
  ------------------
  |  Branch (107:9): [Folded, False: 284]
  ------------------
  108|      0|        gf_weak_reduce(c);
  109|    284|}
f_generic.c:gf_copy:
   45|      2|{
   46|      2|    *out = *a;
   47|      2|}
f_generic.c:gf_sqrn:
   82|      8|{
   83|      8|    gf tmp;
   84|       |
   85|      8|    assert(n > 0);
  ------------------
  |  Branch (85:5): [True: 0, False: 8]
  |  Branch (85:5): [True: 8, False: 0]
  ------------------
   86|      8|    if (n & 1) {
  ------------------
  |  Branch (86:9): [True: 7, False: 1]
  ------------------
   87|      7|        ossl_gf_sqr(y, x);
   88|      7|        n--;
   89|      7|    } else {
   90|      1|        ossl_gf_sqr(tmp, x);
   91|      1|        ossl_gf_sqr(y, tmp);
   92|      1|        n -= 2;
   93|      1|    }
   94|    224|    for (; n; n -= 2) {
  ------------------
  |  Branch (94:12): [True: 216, False: 8]
  ------------------
   95|    216|        ossl_gf_sqr(tmp, y);
   96|    216|        ossl_gf_sqr(y, tmp);
   97|    216|    }
   98|      8|}

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

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

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

o2i_ECPublicKey:
 1122|   119k|{
 1123|   119k|    EC_KEY *ret = NULL;
 1124|       |
 1125|   119k|    if (a == NULL || (*a) == NULL || (*a)->group == NULL) {
  ------------------
  |  Branch (1125:9): [True: 0, False: 119k]
  |  Branch (1125:22): [True: 0, False: 119k]
  |  Branch (1125:38): [True: 0, False: 119k]
  ------------------
 1126|       |        /*
 1127|       |         * sorry, but a EC_GROUP-structure is necessary to set the public key
 1128|       |         */
 1129|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1130|      0|        return 0;
 1131|      0|    }
 1132|   119k|    ret = *a;
 1133|       |    /* EC_KEY_opt2key updates dirty_cnt */
 1134|   119k|    if (!EC_KEY_oct2key(ret, *in, len, NULL)) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 119k]
  ------------------
 1135|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1136|      0|        return 0;
 1137|      0|    }
 1138|   119k|    *in += len;
 1139|   119k|    return ret;
 1140|   119k|}
i2d_ECDSA_SIG:
 1232|   120k|{
 1233|   120k|    BUF_MEM *buf = NULL;
 1234|   120k|    size_t encoded_len;
 1235|   120k|    WPACKET pkt;
 1236|       |
 1237|   120k|    if (ppout == NULL) {
  ------------------
  |  Branch (1237:9): [True: 120k, False: 0]
  ------------------
 1238|   120k|        if (!WPACKET_init_null(&pkt, 0))
  ------------------
  |  Branch (1238:13): [True: 0, False: 120k]
  ------------------
 1239|      0|            return -1;
 1240|   120k|    } else if (*ppout == NULL) {
  ------------------
  |  Branch (1240:16): [True: 0, False: 0]
  ------------------
 1241|      0|        if ((buf = BUF_MEM_new()) == NULL
  ------------------
  |  Branch (1241:13): [True: 0, False: 0]
  ------------------
 1242|      0|            || !WPACKET_init_len(&pkt, buf, 0)) {
  ------------------
  |  Branch (1242:16): [True: 0, False: 0]
  ------------------
 1243|      0|            BUF_MEM_free(buf);
 1244|      0|            return -1;
 1245|      0|        }
 1246|      0|    } else {
 1247|      0|        if (!WPACKET_init_static_len(&pkt, *ppout, SIZE_MAX, 0))
  ------------------
  |  Branch (1247:13): [True: 0, False: 0]
  ------------------
 1248|      0|            return -1;
 1249|      0|    }
 1250|       |
 1251|   120k|    if (!ossl_encode_der_dsa_sig(&pkt, sig->r, sig->s)
  ------------------
  |  Branch (1251:9): [True: 0, False: 120k]
  ------------------
 1252|   120k|        || !WPACKET_get_total_written(&pkt, &encoded_len)
  ------------------
  |  Branch (1252:12): [True: 0, False: 120k]
  ------------------
 1253|   120k|        || !WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (1253:12): [True: 0, False: 120k]
  ------------------
 1254|      0|        BUF_MEM_free(buf);
 1255|      0|        WPACKET_cleanup(&pkt);
 1256|      0|        return -1;
 1257|      0|    }
 1258|       |
 1259|   120k|    if (ppout != NULL) {
  ------------------
  |  Branch (1259:9): [True: 0, False: 120k]
  ------------------
 1260|      0|        if (*ppout == NULL) {
  ------------------
  |  Branch (1260:13): [True: 0, False: 0]
  ------------------
 1261|      0|            *ppout = (unsigned char *)buf->data;
 1262|      0|            buf->data = NULL;
 1263|      0|            BUF_MEM_free(buf);
 1264|      0|        } else {
 1265|      0|            *ppout += encoded_len;
 1266|      0|        }
 1267|      0|    }
 1268|       |
 1269|   120k|    return (int)encoded_len;
 1270|   120k|}
ECDSA_size:
 1302|   120k|{
 1303|   120k|    int ret;
 1304|   120k|    ECDSA_SIG sig;
 1305|   120k|    const EC_GROUP *group;
 1306|   120k|    const BIGNUM *bn;
 1307|       |
 1308|   120k|    if (ec == NULL)
  ------------------
  |  Branch (1308:9): [True: 0, False: 120k]
  ------------------
 1309|      0|        return 0;
 1310|   120k|    group = EC_KEY_get0_group(ec);
 1311|   120k|    if (group == NULL)
  ------------------
  |  Branch (1311:9): [True: 0, False: 120k]
  ------------------
 1312|      0|        return 0;
 1313|       |
 1314|   120k|    bn = EC_GROUP_get0_order(group);
 1315|   120k|    if (bn == NULL)
  ------------------
  |  Branch (1315:9): [True: 0, False: 120k]
  ------------------
 1316|      0|        return 0;
 1317|       |
 1318|   120k|    sig.r = sig.s = (BIGNUM *)bn;
 1319|   120k|    ret = i2d_ECDSA_SIG(&sig, NULL);
 1320|       |
 1321|   120k|    if (ret < 0)
  ------------------
  |  Branch (1321:9): [True: 0, False: 120k]
  ------------------
 1322|      0|        ret = 0;
 1323|   120k|    return ret;
 1324|   120k|}

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

EC_GROUP_new_by_curve_name_ex:
 3190|   120k|{
 3191|   120k|    EC_GROUP *ret = NULL;
 3192|   120k|    const ec_list_element *curve;
 3193|       |
 3194|   120k|    if ((curve = ec_curve_nid2curve(nid)) == NULL
  ------------------
  |  Branch (3194:9): [True: 0, False: 120k]
  ------------------
 3195|   120k|        || (ret = ec_group_new_from_data(libctx, propq, *curve)) == NULL) {
  ------------------
  |  Branch (3195:12): [True: 0, False: 120k]
  ------------------
 3196|      0|#ifndef FIPS_MODULE
 3197|      0|        ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |   88|      0|#define ERR_LIB_EC 16
  ------------------
                      ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |   95|      0|#define EC_R_UNKNOWN_GROUP 129
  ------------------
 3198|      0|            "name=%s", OBJ_nid2sn(nid));
 3199|       |#else
 3200|       |        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_GROUP);
 3201|       |#endif
 3202|      0|        return NULL;
 3203|      0|    }
 3204|       |
 3205|   120k|    return ret;
 3206|   120k|}
ec_curve.c:ec_curve_nid2curve:
 3013|   120k|{
 3014|   120k|    size_t i;
 3015|       |
 3016|   120k|    if (nid <= 0)
  ------------------
  |  Branch (3016:9): [True: 0, False: 120k]
  ------------------
 3017|      0|        return NULL;
 3018|       |
 3019|  1.55M|    for (i = 0; i < curve_list_length; i++) {
  ------------------
  |  | 3010|  1.55M|#define curve_list_length OSSL_NELEM(curve_list)
  |  |  ------------------
  |  |  |  |   14|  1.55M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (3019:17): [True: 1.55M, False: 0]
  ------------------
 3020|  1.55M|        if (curve_list[i].nid == nid)
  ------------------
  |  Branch (3020:13): [True: 120k, False: 1.43M]
  ------------------
 3021|   120k|            return &curve_list[i];
 3022|  1.55M|    }
 3023|      0|    return NULL;
 3024|   120k|}
ec_curve.c:ec_group_new_from_data:
 3029|   120k|{
 3030|   120k|    EC_GROUP *group = NULL;
 3031|   120k|    EC_POINT *P = NULL;
 3032|   120k|    BN_CTX *ctx = NULL;
 3033|   120k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *order = NULL;
 3034|   120k|    int ok = 0;
 3035|   120k|    int seed_len, param_len;
 3036|   120k|    const EC_METHOD *meth;
 3037|   120k|    const EC_CURVE_DATA *data;
 3038|   120k|    const unsigned char *params;
 3039|       |
 3040|       |    /* If no curve data curve method must handle everything */
 3041|   120k|    if (curve.data == NULL)
  ------------------
  |  Branch (3041:9): [True: 0, False: 120k]
  ------------------
 3042|      0|        return ossl_ec_group_new_ex(libctx, propq,
 3043|      0|            curve.meth != NULL ? curve.meth() : NULL);
  ------------------
  |  Branch (3043:13): [True: 0, False: 0]
  ------------------
 3044|       |
 3045|   120k|    if ((ctx = BN_CTX_new_ex(libctx)) == NULL) {
  ------------------
  |  Branch (3045:9): [True: 0, False: 120k]
  ------------------
 3046|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3047|      0|        goto err;
 3048|      0|    }
 3049|       |
 3050|   120k|    data = curve.data;
 3051|   120k|    seed_len = data->seed_len;
 3052|   120k|    param_len = data->param_len;
 3053|   120k|    params = (const unsigned char *)(data + 1); /* skip header */
 3054|       |
 3055|   120k|    if (curve.meth != NULL) {
  ------------------
  |  Branch (3055:9): [True: 119k, False: 289]
  ------------------
 3056|   119k|        meth = curve.meth();
 3057|   119k|        if ((group = ossl_ec_group_new_ex(libctx, propq, meth)) == NULL) {
  ------------------
  |  Branch (3057:13): [True: 0, False: 119k]
  ------------------
 3058|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3059|      0|            goto err;
 3060|      0|        }
 3061|   119k|        if (group->meth->group_full_init != NULL) {
  ------------------
  |  Branch (3061:13): [True: 12.0k, False: 107k]
  ------------------
 3062|  12.0k|            if (!group->meth->group_full_init(group, params)) {
  ------------------
  |  Branch (3062:17): [True: 0, False: 12.0k]
  ------------------
 3063|      0|                ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3064|      0|                goto err;
 3065|      0|            }
 3066|  12.0k|            EC_GROUP_set_curve_name(group, curve.nid);
 3067|  12.0k|            BN_CTX_free(ctx);
 3068|  12.0k|            return group;
 3069|  12.0k|        }
 3070|   119k|    }
 3071|       |
 3072|   107k|    params += seed_len; /* skip seed */
 3073|       |
 3074|   107k|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (3074:9): [True: 0, False: 107k]
  ------------------
 3075|   107k|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (3075:12): [True: 0, False: 107k]
  ------------------
 3076|   107k|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (3076:12): [True: 0, False: 107k]
  ------------------
 3077|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3078|      0|        goto err;
 3079|      0|    }
 3080|       |
 3081|   107k|    if (group != NULL) {
  ------------------
  |  Branch (3081:9): [True: 107k, False: 289]
  ------------------
 3082|   107k|        if (group->meth->group_set_curve(group, p, a, b, ctx) == 0) {
  ------------------
  |  Branch (3082:13): [True: 0, False: 107k]
  ------------------
 3083|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3084|      0|            goto err;
 3085|      0|        }
 3086|   107k|    } else if (data->field_type == NID_X9_62_prime_field) {
  ------------------
  |  |  152|    289|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (3086:16): [True: 289, False: 0]
  ------------------
 3087|    289|        if ((group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) == NULL) {
  ------------------
  |  Branch (3087:13): [True: 0, False: 289]
  ------------------
 3088|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3089|      0|            goto err;
 3090|      0|        }
 3091|    289|    }
 3092|      0|#ifndef OPENSSL_NO_EC2M
 3093|      0|    else { /* field_type ==
 3094|       |            * NID_X9_62_characteristic_two_field */
 3095|       |
 3096|      0|        if ((group = EC_GROUP_new_curve_GF2m(p, a, b, ctx)) == NULL) {
  ------------------
  |  Branch (3096:13): [True: 0, False: 0]
  ------------------
 3097|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3098|      0|            goto err;
 3099|      0|        }
 3100|      0|    }
 3101|   107k|#endif
 3102|       |
 3103|   107k|    EC_GROUP_set_curve_name(group, curve.nid);
 3104|       |
 3105|   107k|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (3105:9): [True: 0, False: 107k]
  ------------------
 3106|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3107|      0|        goto err;
 3108|      0|    }
 3109|       |
 3110|   107k|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (3110:9): [True: 0, False: 107k]
  ------------------
 3111|   107k|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (3111:12): [True: 0, False: 107k]
  ------------------
 3112|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3113|      0|        goto err;
 3114|      0|    }
 3115|   107k|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (3115:9): [True: 0, False: 107k]
  ------------------
 3116|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3117|      0|        goto err;
 3118|      0|    }
 3119|   107k|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (3119:9): [True: 0, False: 107k]
  ------------------
 3120|   107k|        || !BN_set_word(x, (BN_ULONG)data->cofactor)) {
  ------------------
  |  Branch (3120:12): [True: 0, False: 107k]
  ------------------
 3121|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3122|      0|        goto err;
 3123|      0|    }
 3124|   107k|    if (!EC_GROUP_set_generator(group, P, order, x)) {
  ------------------
  |  Branch (3124:9): [True: 0, False: 107k]
  ------------------
 3125|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3126|      0|        goto err;
 3127|      0|    }
 3128|   107k|    if (seed_len) {
  ------------------
  |  Branch (3128:9): [True: 107k, False: 289]
  ------------------
 3129|   107k|        if (!EC_GROUP_set_seed(group, params - seed_len, seed_len)) {
  ------------------
  |  Branch (3129:13): [True: 0, False: 107k]
  ------------------
 3130|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3131|      0|            goto err;
 3132|      0|        }
 3133|   107k|    }
 3134|       |
 3135|   107k|#ifndef FIPS_MODULE
 3136|   107k|    if (EC_GROUP_get_asn1_flag(group) == OPENSSL_EC_NAMED_CURVE) {
  ------------------
  |  |   31|   107k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  |  Branch (3136:9): [True: 107k, False: 0]
  ------------------
 3137|       |        /*
 3138|       |         * Some curves don't have an associated OID: for those we should not
 3139|       |         * default to `OPENSSL_EC_NAMED_CURVE` encoding of parameters and
 3140|       |         * instead set the ASN1 flag to `OPENSSL_EC_EXPLICIT_CURVE`.
 3141|       |         *
 3142|       |         * Note that `OPENSSL_EC_NAMED_CURVE` is set as the default ASN1 flag on
 3143|       |         * `EC_GROUP_new()`, when we don't have enough elements to determine if
 3144|       |         * an OID for the curve name actually exists.
 3145|       |         * We could implement this check on `EC_GROUP_set_curve_name()` but
 3146|       |         * overloading the simple setter with this lookup could have a negative
 3147|       |         * performance impact and unexpected consequences.
 3148|       |         */
 3149|   107k|        ASN1_OBJECT *asn1obj = OBJ_nid2obj(curve.nid);
 3150|       |
 3151|   107k|        if (asn1obj == NULL) {
  ------------------
  |  Branch (3151:13): [True: 0, False: 107k]
  ------------------
 3152|      0|            ERR_raise(ERR_LIB_EC, ERR_R_OBJ_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3153|      0|            goto err;
 3154|      0|        }
 3155|   107k|        if (OBJ_length(asn1obj) == 0)
  ------------------
  |  Branch (3155:13): [True: 0, False: 107k]
  ------------------
 3156|      0|            EC_GROUP_set_asn1_flag(group, OPENSSL_EC_EXPLICIT_CURVE);
  ------------------
  |  |   30|      0|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
 3157|       |
 3158|   107k|        ASN1_OBJECT_free(asn1obj);
 3159|   107k|    }
 3160|       |#else
 3161|       |    /*
 3162|       |     * Inside the FIPS module we do not support explicit curves anyway
 3163|       |     * so the above check is not necessary.
 3164|       |     *
 3165|       |     * Skipping it is also necessary because `OBJ_length()` and
 3166|       |     * `ASN1_OBJECT_free()` are not available within the FIPS module
 3167|       |     * boundaries.
 3168|       |     */
 3169|       |#endif
 3170|       |
 3171|   107k|    ok = 1;
 3172|   107k|err:
 3173|   107k|    if (!ok) {
  ------------------
  |  Branch (3173:9): [True: 0, False: 107k]
  ------------------
 3174|      0|        EC_GROUP_free(group);
 3175|       |        group = NULL;
 3176|      0|    }
 3177|   107k|    EC_POINT_free(P);
 3178|   107k|    BN_CTX_free(ctx);
 3179|   107k|    BN_free(p);
 3180|   107k|    BN_free(a);
 3181|   107k|    BN_free(b);
 3182|   107k|    BN_free(order);
 3183|   107k|    BN_free(x);
 3184|   107k|    BN_free(y);
 3185|   107k|    return group;
 3186|   107k|}

EC_GROUP_new_curve_GFp:
   23|    289|{
   24|    289|    const EC_METHOD *meth;
   25|    289|    EC_GROUP *ret;
   26|       |
   27|    289|#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|    289|    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|    289|    ret = ossl_ec_group_new_ex(ossl_bn_get_libctx(ctx), NULL, meth);
   58|    289|    if (ret == NULL)
  ------------------
  |  Branch (58:9): [True: 0, False: 289]
  ------------------
   59|      0|        return NULL;
   60|       |
   61|    289|    if (!EC_GROUP_set_curve(ret, p, a, b, ctx)) {
  ------------------
  |  Branch (61:9): [True: 0, False: 289]
  ------------------
   62|      0|        EC_GROUP_free(ret);
   63|      0|        return NULL;
   64|      0|    }
   65|       |
   66|    289|    return ret;
   67|    289|}

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:
   41|   120k|{
   42|       |    return ossl_ec_key_new_method_int(ctx, propq, NULL);
   43|   120k|}
EC_KEY_free:
   72|   358k|{
   73|   358k|    int i;
   74|       |
   75|   358k|    if (r == NULL)
  ------------------
  |  Branch (75:9): [True: 119k, False: 239k]
  ------------------
   76|   119k|        return;
   77|       |
   78|   239k|    CRYPTO_DOWN_REF(&r->references, &i);
   79|   239k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|   239k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   239k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   239k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   239k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   80|   239k|    if (i > 0)
  ------------------
  |  Branch (80:9): [True: 119k, False: 120k]
  ------------------
   81|   119k|        return;
   82|   120k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   120k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 120k]
  |  |  ------------------
  ------------------
   83|       |
   84|   120k|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (84:9): [True: 120k, False: 0]
  |  Branch (84:28): [True: 0, False: 120k]
  ------------------
   85|      0|        r->meth->finish(r);
   86|       |
   87|   120k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
   88|   120k|    ENGINE_finish(r->engine);
   89|   120k|#endif
   90|       |
   91|   120k|    if (r->group && r->group->meth->keyfinish)
  ------------------
  |  Branch (91:9): [True: 120k, False: 0]
  |  Branch (91:21): [True: 0, False: 120k]
  ------------------
   92|      0|        r->group->meth->keyfinish(r);
   93|       |
   94|   120k|#ifndef FIPS_MODULE
   95|   120k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EC_KEY, r, &r->ex_data);
  ------------------
  |  |  258|   120k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
   96|   120k|#endif
   97|   120k|    CRYPTO_FREE_REF(&r->references);
   98|   120k|    EC_GROUP_free(r->group);
   99|   120k|    EC_POINT_free(r->pub_key);
  100|   120k|    BN_clear_free(r->priv_key);
  101|   120k|    OPENSSL_free(r->propq);
  ------------------
  |  |  131|   120k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  102|       |
  103|   120k|    OPENSSL_clear_free((void *)r, sizeof(EC_KEY));
  ------------------
  |  |  129|   120k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  104|   120k|}
EC_KEY_up_ref:
  193|   119k|{
  194|   119k|    int i;
  195|       |
  196|   119k|    if (CRYPTO_UP_REF(&r->references, &i) <= 0)
  ------------------
  |  Branch (196:9): [True: 0, False: 119k]
  ------------------
  197|      0|        return 0;
  198|       |
  199|   119k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|   119k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   119k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   119k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   119k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|   119k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   119k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 119k]
  |  |  ------------------
  ------------------
  201|   119k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (201:13): [True: 119k, False: 0]
  ------------------
  202|   119k|}
EC_KEY_generate_key:
  210|    594|{
  211|    594|    if (eckey == NULL || eckey->group == NULL) {
  ------------------
  |  Branch (211:9): [True: 0, False: 594]
  |  Branch (211:26): [True: 0, False: 594]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return 0;
  214|      0|    }
  215|    594|    if (eckey->meth->keygen != NULL) {
  ------------------
  |  Branch (215:9): [True: 594, False: 0]
  ------------------
  216|    594|        int ret;
  217|       |
  218|    594|        ret = eckey->meth->keygen(eckey);
  219|    594|        if (ret == 1)
  ------------------
  |  Branch (219:13): [True: 594, False: 0]
  ------------------
  220|    594|            eckey->dirty_cnt++;
  221|       |
  222|    594|        return ret;
  223|    594|    }
  224|    594|    ERR_raise(ERR_LIB_EC, EC_R_OPERATION_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  225|      0|    return 0;
  226|    594|}
ossl_ec_key_gen:
  229|    594|{
  230|    594|    int ret;
  231|       |
  232|    594|    ret = eckey->group->meth->keygen(eckey);
  233|       |
  234|    594|    if (ret == 1)
  ------------------
  |  Branch (234:9): [True: 594, False: 0]
  ------------------
  235|    594|        eckey->dirty_cnt++;
  236|    594|    return ret;
  237|    594|}
ossl_ec_key_simple_generate_key:
  442|    594|{
  443|    594|    return ec_generate_key(eckey, 0);
  444|    594|}
ossl_ec_key_get_libctx:
  748|   242k|{
  749|   242k|    return key->libctx;
  750|   242k|}
ossl_ec_key_get0_propq:
  753|   121k|{
  754|   121k|    return key->propq;
  755|   121k|}
ossl_ec_key_set0_libctx:
  758|   119k|{
  759|   119k|    key->libctx = libctx;
  760|       |    /* Do we need to propagate this to the group? */
  761|   119k|}
EC_KEY_get0_group:
  764|   601k|{
  765|   601k|    return key->group;
  766|   601k|}
EC_KEY_set_group:
  769|   120k|{
  770|   120k|    if (key->meth->set_group != NULL && key->meth->set_group(key, group) == 0)
  ------------------
  |  Branch (770:9): [True: 0, False: 120k]
  |  Branch (770:41): [True: 0, False: 0]
  ------------------
  771|      0|        return 0;
  772|   120k|    EC_GROUP_free(key->group);
  773|   120k|    key->group = EC_GROUP_dup(group);
  774|   120k|    if (key->group != NULL && EC_GROUP_get_curve_name(key->group) == NID_sm2)
  ------------------
  |  | 1255|   120k|#define NID_sm2         1172
  ------------------
  |  Branch (774:9): [True: 120k, False: 0]
  |  Branch (774:31): [True: 0, False: 120k]
  ------------------
  775|      0|        EC_KEY_set_flags(key, EC_FLAG_SM2_RANGE);
  ------------------
  |  |  954|      0|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  776|       |
  777|   120k|    key->dirty_cnt++;
  778|   120k|    return (key->group == NULL) ? 0 : 1;
  ------------------
  |  Branch (778:12): [True: 0, False: 120k]
  ------------------
  779|   120k|}
EC_KEY_get0_private_key:
  782|   121k|{
  783|   121k|    return key->priv_key;
  784|   121k|}
EC_KEY_get0_public_key:
  882|   122k|{
  883|   122k|    return key->pub_key;
  884|   122k|}
EC_KEY_get_enc_flags:
  898|   121k|{
  899|   121k|    return key->enc_flag;
  900|   121k|}
EC_KEY_get_conv_form:
  908|   121k|{
  909|   121k|    return key->conv_form;
  910|   121k|}
EC_KEY_get_flags:
  935|   481k|{
  936|   481k|    return key->flags;
  937|   481k|}
EC_KEY_oct2key:
  968|   119k|{
  969|   119k|    if (key == NULL || key->group == NULL)
  ------------------
  |  Branch (969:9): [True: 0, False: 119k]
  |  Branch (969:24): [True: 0, False: 119k]
  ------------------
  970|      0|        return 0;
  971|   119k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (971:9): [True: 119k, False: 0]
  ------------------
  972|   119k|        key->pub_key = EC_POINT_new(key->group);
  973|   119k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (973:9): [True: 0, False: 119k]
  ------------------
  974|      0|        return 0;
  975|   119k|    if (EC_POINT_oct2point(key->group, key->pub_key, buf, len, ctx) == 0)
  ------------------
  |  Branch (975:9): [True: 0, False: 119k]
  ------------------
  976|      0|        return 0;
  977|   119k|    key->dirty_cnt++;
  978|       |    /*
  979|       |     * Save the point conversion form.
  980|       |     * For non-custom curves the first octet of the buffer (excluding
  981|       |     * the last significant bit) contains the point conversion form.
  982|       |     * EC_POINT_oct2point() has already performed sanity checking of
  983|       |     * the buffer so we know it is valid.
  984|       |     */
  985|   119k|    if ((key->group->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0)
  ------------------
  |  |   29|   119k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (985:9): [True: 119k, False: 0]
  ------------------
  986|   119k|        key->conv_form = (point_conversion_form_t)(buf[0] & ~0x01);
  987|   119k|    return 1;
  988|   119k|}
ec_key.c:ec_generate_key:
  302|    594|{
  303|    594|    int ok = 0;
  304|    594|    BIGNUM *priv_key = NULL;
  305|    594|    const BIGNUM *tmp = NULL;
  306|    594|    BIGNUM *order = NULL;
  307|    594|    EC_POINT *pub_key = NULL;
  308|    594|    const EC_GROUP *group = eckey->group;
  309|    594|    BN_CTX *ctx = BN_CTX_secure_new_ex(eckey->libctx);
  310|    594|    int sm2 = EC_KEY_get_flags(eckey) & EC_FLAG_SM2_RANGE ? 1 : 0;
  ------------------
  |  |  954|    594|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  |  Branch (310:15): [True: 0, False: 594]
  ------------------
  311|       |
  312|    594|    if (ctx == NULL)
  ------------------
  |  Branch (312:9): [True: 0, False: 594]
  ------------------
  313|      0|        goto err;
  314|       |
  315|    594|    if (eckey->priv_key == NULL) {
  ------------------
  |  Branch (315:9): [True: 594, False: 0]
  ------------------
  316|    594|        priv_key = BN_secure_new();
  317|    594|        if (priv_key == NULL)
  ------------------
  |  Branch (317:13): [True: 0, False: 594]
  ------------------
  318|      0|            goto err;
  319|    594|    } else
  320|      0|        priv_key = eckey->priv_key;
  321|       |
  322|       |    /*
  323|       |     * Steps (1-2): Check domain parameters and security strength.
  324|       |     * These steps must be done by the user. This would need to be
  325|       |     * stated in the security policy.
  326|       |     */
  327|       |
  328|    594|    tmp = EC_GROUP_get0_order(group);
  329|    594|    if (tmp == NULL)
  ------------------
  |  Branch (329:9): [True: 0, False: 594]
  ------------------
  330|      0|        goto err;
  331|       |
  332|       |    /*
  333|       |     * Steps (3-7): priv_key = DRBG_RAND(order_n_bits) (range [1, n-1]).
  334|       |     * Although this is slightly different from the standard, it is effectively
  335|       |     * equivalent as it gives an unbiased result ranging from 1..n-1. It is also
  336|       |     * faster as the standard needs to retry more often. Also doing
  337|       |     * 1 + rand[0..n-2] would effect the way that tests feed dummy entropy into
  338|       |     * rand so the simpler backward compatible method has been used here.
  339|       |     */
  340|       |
  341|       |    /* range of SM2 private key is [1, n-1) */
  342|    594|    if (sm2) {
  ------------------
  |  Branch (342:9): [True: 0, False: 594]
  ------------------
  343|      0|        order = BN_new();
  344|      0|        if (order == NULL || !BN_sub(order, tmp, BN_value_one()))
  ------------------
  |  Branch (344:13): [True: 0, False: 0]
  |  Branch (344:30): [True: 0, False: 0]
  ------------------
  345|      0|            goto err;
  346|    594|    } else {
  347|    594|        order = BN_dup(tmp);
  348|    594|        if (order == NULL)
  ------------------
  |  Branch (348:13): [True: 0, False: 594]
  ------------------
  349|      0|            goto err;
  350|    594|    }
  351|       |
  352|    594|    do
  353|    594|        if (!BN_priv_rand_range_ex(priv_key, order, 0, ctx))
  ------------------
  |  Branch (353:13): [True: 0, False: 594]
  ------------------
  354|      0|            goto err;
  355|    594|    while (BN_is_zero(priv_key));
  ------------------
  |  Branch (355:12): [True: 0, False: 594]
  ------------------
  356|       |
  357|    594|    if (eckey->pub_key == NULL) {
  ------------------
  |  Branch (357:9): [True: 594, False: 0]
  ------------------
  358|    594|        pub_key = EC_POINT_new(group);
  359|    594|        if (pub_key == NULL)
  ------------------
  |  Branch (359:13): [True: 0, False: 594]
  ------------------
  360|      0|            goto err;
  361|    594|    } else
  362|      0|        pub_key = eckey->pub_key;
  363|       |
  364|       |    /* Step (8) : pub_key = priv_key * G (where G is a point on the curve) */
  365|    594|    if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx))
  ------------------
  |  Branch (365:9): [True: 0, False: 594]
  ------------------
  366|      0|        goto err;
  367|       |
  368|    594|    eckey->priv_key = priv_key;
  369|    594|    eckey->pub_key = pub_key;
  370|    594|    priv_key = NULL;
  371|    594|    pub_key = NULL;
  372|       |
  373|    594|    eckey->dirty_cnt++;
  374|       |
  375|       |#ifdef FIPS_MODULE
  376|       |    pairwise_test = 1;
  377|       |#endif /* FIPS_MODULE */
  378|       |
  379|    594|    ok = 1;
  380|    594|    if (pairwise_test) {
  ------------------
  |  Branch (380:9): [True: 0, False: 594]
  ------------------
  381|      0|        OSSL_CALLBACK *cb = NULL;
  382|      0|        void *cbarg = NULL;
  383|       |
  384|      0|        OSSL_SELF_TEST_get_callback(eckey->libctx, &cb, &cbarg);
  385|      0|        ok = ecdsa_keygen_pairwise_test(eckey, cb, cbarg)
  ------------------
  |  Branch (385:14): [True: 0, False: 0]
  ------------------
  386|      0|            && ecdsa_keygen_knownanswer_test(eckey, ctx, cb, cbarg);
  ------------------
  |  Branch (386:16): [True: 0, False: 0]
  ------------------
  387|      0|    }
  388|    594|err:
  389|       |    /* Step (9): If there is an error return an invalid keypair. */
  390|    594|    if (!ok) {
  ------------------
  |  Branch (390:9): [True: 0, False: 594]
  ------------------
  391|      0|        ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
  ------------------
  |  |   32|      0|#define OSSL_SELF_TEST_TYPE_PCT "Conditional_PCT"
  ------------------
  392|      0|        BN_clear(eckey->priv_key);
  393|      0|        if (eckey->pub_key != NULL)
  ------------------
  |  Branch (393:13): [True: 0, False: 0]
  ------------------
  394|      0|            EC_POINT_set_to_infinity(group, eckey->pub_key);
  395|      0|    }
  396|       |
  397|    594|    EC_POINT_free(pub_key);
  398|    594|    BN_clear_free(priv_key);
  399|    594|    BN_CTX_free(ctx);
  400|    594|    BN_free(order);
  401|    594|    return ok;
  402|    594|}

EC_KEY_OpenSSL:
   40|   119k|{
   41|   119k|    return &openssl_ec_key_method;
   42|   119k|}
EC_KEY_get_default_method:
   45|   120k|{
   46|   120k|    return default_ec_key_meth;
   47|   120k|}
EC_KEY_get_method:
   58|   119k|{
   59|   119k|    return key->meth;
   60|   119k|}
ossl_ec_key_new_method_int:
   82|   120k|{
   83|   120k|    EC_KEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   120k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|       |
   85|   120k|    if (ret == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 120k]
  ------------------
   86|      0|        return NULL;
   87|       |
   88|   120k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (88:9): [True: 0, False: 120k]
  ------------------
   89|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   90|      0|        return NULL;
   91|      0|    }
   92|       |
   93|   120k|    ret->libctx = libctx;
   94|   120k|    if (propq != NULL) {
  ------------------
  |  Branch (94:9): [True: 0, False: 120k]
  ------------------
   95|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   96|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (96:13): [True: 0, False: 0]
  ------------------
   97|      0|            goto err;
   98|      0|    }
   99|       |
  100|   120k|    ret->meth = EC_KEY_get_default_method();
  101|   120k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  102|   120k|    if (engine != NULL) {
  ------------------
  |  Branch (102:9): [True: 0, False: 120k]
  ------------------
  103|      0|        if (!ENGINE_init(engine)) {
  ------------------
  |  Branch (103:13): [True: 0, False: 0]
  ------------------
  104|      0|            ERR_raise(ERR_LIB_EC, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  105|      0|            goto err;
  106|      0|        }
  107|      0|        ret->engine = engine;
  108|      0|    } else
  109|   120k|        ret->engine = ENGINE_get_default_EC();
  110|   120k|    if (ret->engine != NULL) {
  ------------------
  |  Branch (110:9): [True: 0, False: 120k]
  ------------------
  111|      0|        ret->meth = ENGINE_get_EC(ret->engine);
  112|      0|        if (ret->meth == NULL) {
  ------------------
  |  Branch (112:13): [True: 0, False: 0]
  ------------------
  113|      0|            ERR_raise(ERR_LIB_EC, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  114|      0|            goto err;
  115|      0|        }
  116|      0|    }
  117|   120k|#endif
  118|       |
  119|   120k|    ret->version = 1;
  120|   120k|    ret->conv_form = POINT_CONVERSION_UNCOMPRESSED;
  121|       |
  122|       |/* No ex_data inside the FIPS provider */
  123|   120k|#ifndef FIPS_MODULE
  124|   120k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EC_KEY, ret, &ret->ex_data)) {
  ------------------
  |  |  258|   120k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
  |  Branch (124:9): [True: 0, False: 120k]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        goto err;
  127|      0|    }
  128|   120k|#endif
  129|       |
  130|   120k|    if (ret->meth->init != NULL && ret->meth->init(ret) == 0) {
  ------------------
  |  Branch (130:9): [True: 0, False: 120k]
  |  Branch (130:36): [True: 0, False: 0]
  ------------------
  131|      0|        ERR_raise(ERR_LIB_EC, ERR_R_INIT_FAIL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  132|      0|        goto err;
  133|      0|    }
  134|   120k|    return ret;
  135|       |
  136|      0|err:
  137|      0|    EC_KEY_free(ret);
  138|       |    return NULL;
  139|   120k|}

ossl_ec_group_new_ex:
   32|   240k|{
   33|   240k|    EC_GROUP *ret;
   34|       |
   35|   240k|    if (meth == NULL) {
  ------------------
  |  Branch (35:9): [True: 0, False: 240k]
  ------------------
   36|      0|        ERR_raise(ERR_LIB_EC, EC_R_SLOT_FULL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   37|      0|        return NULL;
   38|      0|    }
   39|   240k|    if (meth->group_init == 0) {
  ------------------
  |  Branch (39:9): [True: 0, False: 240k]
  ------------------
   40|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   41|      0|        return NULL;
   42|      0|    }
   43|       |
   44|   240k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   240k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|   240k|    if (ret == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 240k]
  ------------------
   46|      0|        return NULL;
   47|       |
   48|   240k|    ret->libctx = libctx;
   49|   240k|    if (propq != NULL) {
  ------------------
  |  Branch (49:9): [True: 0, False: 240k]
  ------------------
   50|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|      0|            goto err;
   53|      0|    }
   54|   240k|    ret->meth = meth;
   55|   240k|    if ((ret->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|   240k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (55:9): [True: 240k, False: 0]
  ------------------
   56|   240k|        ret->order = BN_new();
   57|   240k|        if (ret->order == NULL)
  ------------------
  |  Branch (57:13): [True: 0, False: 240k]
  ------------------
   58|      0|            goto err;
   59|   240k|        ret->cofactor = BN_new();
   60|   240k|        if (ret->cofactor == NULL)
  ------------------
  |  Branch (60:13): [True: 0, False: 240k]
  ------------------
   61|      0|            goto err;
   62|   240k|    }
   63|   240k|    ret->asn1_flag = OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|   240k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
   64|   240k|    ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED;
   65|   240k|    if (!meth->group_init(ret))
  ------------------
  |  Branch (65:9): [True: 0, False: 240k]
  ------------------
   66|      0|        goto err;
   67|   240k|    return ret;
   68|       |
   69|      0|err:
   70|      0|    BN_free(ret->order);
   71|      0|    BN_free(ret->cofactor);
   72|      0|    OPENSSL_free(ret->propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   73|      0|    OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|       |    return NULL;
   75|   240k|}
EC_pre_comp_free:
   87|   360k|{
   88|   360k|    switch (group->pre_comp_type) {
  ------------------
  |  Branch (88:13): [True: 360k, False: 0]
  ------------------
   89|   360k|    case PCT_none:
  ------------------
  |  Branch (89:5): [True: 360k, False: 0]
  ------------------
   90|   360k|        break;
   91|      0|    case PCT_nistz256:
  ------------------
  |  Branch (91:5): [True: 0, False: 360k]
  ------------------
   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: 360k]
  ------------------
   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: 360k]
  ------------------
  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: 360k]
  ------------------
  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: 360k]
  ------------------
  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: 360k]
  ------------------
  117|      0|        EC_ec_pre_comp_free(group->pre_comp.ec);
  118|      0|        break;
  119|   360k|    }
  120|   360k|    group->pre_comp.ec = NULL;
  121|   360k|}
EC_GROUP_free:
  124|   360k|{
  125|   360k|    if (!group)
  ------------------
  |  Branch (125:9): [True: 120k, False: 240k]
  ------------------
  126|   120k|        return;
  127|       |
  128|   240k|    if (group->meth->group_finish != 0)
  ------------------
  |  Branch (128:9): [True: 240k, False: 0]
  ------------------
  129|   240k|        group->meth->group_finish(group);
  130|       |
  131|   240k|    EC_pre_comp_free(group);
  132|   240k|    BN_MONT_CTX_free(group->mont_data);
  133|   240k|    EC_POINT_free(group->generator);
  134|   240k|    BN_free(group->order);
  135|   240k|    BN_free(group->cofactor);
  136|   240k|    OPENSSL_free(group->seed);
  ------------------
  |  |  131|   240k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|   240k|    OPENSSL_free(group->propq);
  ------------------
  |  |  131|   240k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  138|   240k|    OPENSSL_free(group);
  ------------------
  |  |  131|   240k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  139|   240k|}
EC_GROUP_copy:
  163|   120k|{
  164|   120k|    if (dest->meth->group_copy == 0) {
  ------------------
  |  Branch (164:9): [True: 0, False: 120k]
  ------------------
  165|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|        return 0;
  167|      0|    }
  168|   120k|    if (dest->meth != src->meth) {
  ------------------
  |  Branch (168:9): [True: 0, False: 120k]
  ------------------
  169|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  170|      0|        return 0;
  171|      0|    }
  172|   120k|    if (dest == src)
  ------------------
  |  Branch (172:9): [True: 0, False: 120k]
  ------------------
  173|      0|        return 1;
  174|       |
  175|   120k|    dest->libctx = src->libctx;
  176|   120k|    dest->curve_name = src->curve_name;
  177|       |
  178|   120k|    EC_pre_comp_free(dest);
  179|       |
  180|       |    /* Copy precomputed */
  181|   120k|    dest->pre_comp_type = src->pre_comp_type;
  182|   120k|    switch (src->pre_comp_type) {
  ------------------
  |  Branch (182:13): [True: 120k, False: 0]
  ------------------
  183|   120k|    case PCT_none:
  ------------------
  |  Branch (183:5): [True: 120k, False: 0]
  ------------------
  184|   120k|        dest->pre_comp.ec = NULL;
  185|   120k|        break;
  186|      0|    case PCT_nistz256:
  ------------------
  |  Branch (186:5): [True: 0, False: 120k]
  ------------------
  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: 120k]
  ------------------
  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: 120k]
  ------------------
  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: 120k]
  ------------------
  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: 120k]
  ------------------
  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: 120k]
  ------------------
  212|      0|        dest->pre_comp.ec = EC_ec_pre_comp_dup(src->pre_comp.ec);
  213|      0|        break;
  214|   120k|    }
  215|       |
  216|   120k|    if (src->mont_data != NULL) {
  ------------------
  |  Branch (216:9): [True: 120k, False: 0]
  ------------------
  217|   120k|        if (dest->mont_data == NULL) {
  ------------------
  |  Branch (217:13): [True: 120k, False: 0]
  ------------------
  218|   120k|            dest->mont_data = BN_MONT_CTX_new();
  219|   120k|            if (dest->mont_data == NULL)
  ------------------
  |  Branch (219:17): [True: 0, False: 120k]
  ------------------
  220|      0|                return 0;
  221|   120k|        }
  222|   120k|        if (!BN_MONT_CTX_copy(dest->mont_data, src->mont_data))
  ------------------
  |  Branch (222:13): [True: 0, False: 120k]
  ------------------
  223|      0|            return 0;
  224|   120k|    } else {
  225|       |        /* src->generator == NULL */
  226|      0|        BN_MONT_CTX_free(dest->mont_data);
  227|      0|        dest->mont_data = NULL;
  228|      0|    }
  229|       |
  230|   120k|    if (src->generator != NULL) {
  ------------------
  |  Branch (230:9): [True: 120k, False: 0]
  ------------------
  231|   120k|        if (dest->generator == NULL) {
  ------------------
  |  Branch (231:13): [True: 120k, False: 0]
  ------------------
  232|   120k|            dest->generator = EC_POINT_new(dest);
  233|   120k|            if (dest->generator == NULL)
  ------------------
  |  Branch (233:17): [True: 0, False: 120k]
  ------------------
  234|      0|                return 0;
  235|   120k|        }
  236|   120k|        if (!EC_POINT_copy(dest->generator, src->generator))
  ------------------
  |  Branch (236:13): [True: 0, False: 120k]
  ------------------
  237|      0|            return 0;
  238|   120k|    } else {
  239|       |        /* src->generator == NULL */
  240|      0|        EC_POINT_clear_free(dest->generator);
  241|      0|        dest->generator = NULL;
  242|      0|    }
  243|       |
  244|   120k|    if ((src->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|   120k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (244:9): [True: 120k, False: 0]
  ------------------
  245|   120k|        if (!BN_copy(dest->order, src->order))
  ------------------
  |  Branch (245:13): [True: 0, False: 120k]
  ------------------
  246|      0|            return 0;
  247|   120k|        if (!BN_copy(dest->cofactor, src->cofactor))
  ------------------
  |  Branch (247:13): [True: 0, False: 120k]
  ------------------
  248|      0|            return 0;
  249|   120k|    }
  250|       |
  251|   120k|    dest->asn1_flag = src->asn1_flag;
  252|   120k|    dest->asn1_form = src->asn1_form;
  253|   120k|    dest->decoded_from_explicit_params = src->decoded_from_explicit_params;
  254|       |
  255|   120k|    if (src->seed) {
  ------------------
  |  Branch (255:9): [True: 119k, False: 289]
  ------------------
  256|   119k|        OPENSSL_free(dest->seed);
  ------------------
  |  |  131|   119k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  257|   119k|        if ((dest->seed = OPENSSL_malloc(src->seed_len)) == NULL)
  ------------------
  |  |  106|   119k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (257:13): [True: 0, False: 119k]
  ------------------
  258|      0|            return 0;
  259|   119k|        if (!memcpy(dest->seed, src->seed, src->seed_len))
  ------------------
  |  Branch (259:13): [True: 0, False: 119k]
  ------------------
  260|      0|            return 0;
  261|   119k|        dest->seed_len = src->seed_len;
  262|   119k|    } else {
  263|    289|        OPENSSL_free(dest->seed);
  ------------------
  |  |  131|    289|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  264|    289|        dest->seed = NULL;
  265|    289|        dest->seed_len = 0;
  266|    289|    }
  267|       |
  268|   120k|    return dest->meth->group_copy(dest, src);
  269|   120k|}
EC_GROUP_dup:
  272|   120k|{
  273|   120k|    EC_GROUP *t = NULL;
  274|   120k|    int ok = 0;
  275|       |
  276|   120k|    if (a == NULL)
  ------------------
  |  Branch (276:9): [True: 0, False: 120k]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|   120k|    if ((t = ossl_ec_group_new_ex(a->libctx, a->propq, a->meth)) == NULL)
  ------------------
  |  Branch (279:9): [True: 0, False: 120k]
  ------------------
  280|      0|        return NULL;
  281|   120k|    if (!EC_GROUP_copy(t, a))
  ------------------
  |  Branch (281:9): [True: 0, False: 120k]
  ------------------
  282|      0|        goto err;
  283|       |
  284|   120k|    ok = 1;
  285|       |
  286|   120k|err:
  287|   120k|    if (!ok) {
  ------------------
  |  Branch (287:9): [True: 0, False: 120k]
  ------------------
  288|      0|        EC_GROUP_free(t);
  289|      0|        return NULL;
  290|      0|    }
  291|   120k|    return t;
  292|   120k|}
EC_GROUP_set_generator:
  372|   107k|{
  373|   107k|    if (generator == NULL) {
  ------------------
  |  Branch (373:9): [True: 0, False: 107k]
  ------------------
  374|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  375|      0|        return 0;
  376|      0|    }
  377|       |
  378|       |    /* require group->field >= 1 */
  379|   107k|    if (group->field == NULL || BN_is_zero(group->field)
  ------------------
  |  Branch (379:9): [True: 0, False: 107k]
  |  Branch (379:33): [True: 0, False: 107k]
  ------------------
  380|   107k|        || BN_is_negative(group->field)) {
  ------------------
  |  Branch (380:12): [True: 0, False: 107k]
  ------------------
  381|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|   107k|    if (order == NULL || BN_is_zero(order) || BN_is_negative(order)
  ------------------
  |  Branch (390:9): [True: 0, False: 107k]
  |  Branch (390:26): [True: 0, False: 107k]
  |  Branch (390:47): [True: 0, False: 107k]
  ------------------
  391|   107k|        || BN_num_bits(order) > BN_num_bits(group->field) + 1) {
  ------------------
  |  Branch (391:12): [True: 0, False: 107k]
  ------------------
  392|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GROUP_ORDER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|   107k|    if (cofactor != NULL && BN_is_negative(cofactor)) {
  ------------------
  |  Branch (401:9): [True: 107k, False: 0]
  |  Branch (401:29): [True: 0, False: 107k]
  ------------------
  402|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_COFACTOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  403|      0|        return 0;
  404|      0|    }
  405|       |
  406|   107k|    if (group->generator == NULL) {
  ------------------
  |  Branch (406:9): [True: 107k, False: 0]
  ------------------
  407|   107k|        group->generator = EC_POINT_new(group);
  408|   107k|        if (group->generator == NULL)
  ------------------
  |  Branch (408:13): [True: 0, False: 107k]
  ------------------
  409|      0|            return 0;
  410|   107k|    }
  411|   107k|    if (!EC_POINT_copy(group->generator, generator))
  ------------------
  |  Branch (411:9): [True: 0, False: 107k]
  ------------------
  412|      0|        return 0;
  413|       |
  414|   107k|    if (!BN_copy(group->order, order))
  ------------------
  |  Branch (414:9): [True: 0, False: 107k]
  ------------------
  415|      0|        return 0;
  416|       |
  417|       |    /* Either take the provided positive cofactor, or try to compute it */
  418|   107k|    if (cofactor != NULL && !BN_is_zero(cofactor)) {
  ------------------
  |  Branch (418:9): [True: 107k, False: 0]
  |  Branch (418:29): [True: 107k, False: 0]
  ------------------
  419|   107k|        if (!BN_copy(group->cofactor, cofactor))
  ------------------
  |  Branch (419:13): [True: 0, False: 107k]
  ------------------
  420|      0|            return 0;
  421|   107k|    } 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|   107k|    if (BN_is_odd(group->order)) {
  ------------------
  |  Branch (431:9): [True: 107k, False: 0]
  ------------------
  432|   107k|        return ec_precompute_mont_data(group);
  433|   107k|    }
  434|       |
  435|      0|    BN_MONT_CTX_free(group->mont_data);
  436|       |    group->mont_data = NULL;
  437|      0|    return 1;
  438|   107k|}
EC_GROUP_get0_generator:
  441|    143|{
  442|    143|    return group->generator;
  443|    143|}
EC_GROUP_get0_order:
  461|   120k|{
  462|   120k|    return group->order;
  463|   120k|}
EC_GROUP_order_bits:
  466|   241k|{
  467|   241k|    return group->meth->group_order_bits(group);
  468|   241k|}
EC_GROUP_get0_cofactor:
  483|    594|{
  484|    594|    return group->cofactor;
  485|    594|}
EC_GROUP_set_curve_name:
  488|   120k|{
  489|   120k|    group->curve_name = nid;
  490|   120k|    group->asn1_flag = (nid != NID_undef)
  ------------------
  |  |   18|   120k|#define NID_undef                       0
  ------------------
  |  Branch (490:24): [True: 120k, False: 0]
  ------------------
  491|   120k|        ? OPENSSL_EC_NAMED_CURVE
  ------------------
  |  |   31|   120k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  492|   120k|        : OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|   120k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
  493|   120k|}
EC_GROUP_get_curve_name:
  496|   480k|{
  497|   480k|    return group->curve_name;
  498|   480k|}
EC_GROUP_get_field_type:
  506|   242k|{
  507|   242k|    return group->meth->field_type;
  508|   242k|}
EC_GROUP_set_asn1_flag:
  511|   119k|{
  512|   119k|    group->asn1_flag = flag;
  513|   119k|}
EC_GROUP_get_asn1_flag:
  516|   229k|{
  517|   229k|    return group->asn1_flag;
  518|   229k|}
EC_GROUP_get_point_conversion_form:
  528|   121k|{
  529|   121k|    return group->asn1_form;
  530|   121k|}
EC_GROUP_set_seed:
  533|   119k|{
  534|   119k|    OPENSSL_free(group->seed);
  ------------------
  |  |  131|   119k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  535|   119k|    group->seed = NULL;
  536|   119k|    group->seed_len = 0;
  537|       |
  538|   119k|    if (!len || !p)
  ------------------
  |  Branch (538:9): [True: 0, False: 119k]
  |  Branch (538:17): [True: 0, False: 119k]
  ------------------
  539|      0|        return 1;
  540|       |
  541|   119k|    if ((group->seed = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  106|   119k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (541:9): [True: 0, False: 119k]
  ------------------
  542|      0|        return 0;
  543|   119k|    memcpy(group->seed, p, len);
  544|   119k|    group->seed_len = len;
  545|       |
  546|   119k|    return len;
  547|   119k|}
EC_GROUP_set_curve:
  561|    289|{
  562|    289|    if (group->meth->group_set_curve == 0) {
  ------------------
  |  Branch (562:9): [True: 0, False: 289]
  ------------------
  563|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|        return 0;
  565|      0|    }
  566|    289|    return group->meth->group_set_curve(group, p, a, b, ctx);
  567|    289|}
EC_POINT_new:
  717|   480k|{
  718|   480k|    EC_POINT *ret;
  719|       |
  720|   480k|    if (group == NULL) {
  ------------------
  |  Branch (720:9): [True: 0, False: 480k]
  ------------------
  721|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  722|      0|        return NULL;
  723|      0|    }
  724|   480k|    if (group->meth->point_init == NULL) {
  ------------------
  |  Branch (724:9): [True: 0, False: 480k]
  ------------------
  725|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  726|      0|        return NULL;
  727|      0|    }
  728|       |
  729|   480k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   480k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  730|   480k|    if (ret == NULL)
  ------------------
  |  Branch (730:9): [True: 0, False: 480k]
  ------------------
  731|      0|        return NULL;
  732|       |
  733|   480k|    ret->meth = group->meth;
  734|   480k|    ret->curve_name = group->curve_name;
  735|       |
  736|   480k|    if (!ret->meth->point_init(ret)) {
  ------------------
  |  Branch (736:9): [True: 0, False: 480k]
  ------------------
  737|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  738|      0|        return NULL;
  739|      0|    }
  740|       |
  741|   480k|    return ret;
  742|   480k|}
EC_POINT_free:
  745|   481k|{
  746|   481k|    if (point == NULL)
  ------------------
  |  Branch (746:9): [True: 594, False: 480k]
  ------------------
  747|    594|        return;
  748|       |
  749|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
  750|       |    EC_POINT_clear_free(point);
  751|       |#else
  752|   480k|    if (point->meth->point_finish != 0)
  ------------------
  |  Branch (752:9): [True: 480k, False: 0]
  ------------------
  753|   480k|        point->meth->point_finish(point);
  754|   480k|    OPENSSL_free(point);
  ------------------
  |  |  131|   480k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  755|   480k|#endif
  756|   480k|}
EC_POINT_clear_free:
  759|    289|{
  760|    289|    if (point == NULL)
  ------------------
  |  Branch (760:9): [True: 0, False: 289]
  ------------------
  761|      0|        return;
  762|       |
  763|    289|    if (point->meth->point_clear_finish != 0)
  ------------------
  |  Branch (763:9): [True: 289, False: 0]
  ------------------
  764|    289|        point->meth->point_clear_finish(point);
  765|      0|    else if (point->meth->point_finish != 0)
  ------------------
  |  Branch (765:14): [True: 0, False: 0]
  ------------------
  766|      0|        point->meth->point_finish(point);
  767|    289|    OPENSSL_clear_free(point, sizeof(*point));
  ------------------
  |  |  129|    289|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  768|    289|}
EC_POINT_copy:
  771|   240k|{
  772|   240k|    if (dest->meth->point_copy == 0) {
  ------------------
  |  Branch (772:9): [True: 0, False: 240k]
  ------------------
  773|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  774|      0|        return 0;
  775|      0|    }
  776|   240k|    if (dest->meth != src->meth
  ------------------
  |  Branch (776:9): [True: 0, False: 240k]
  ------------------
  777|   240k|        || (dest->curve_name != src->curve_name
  ------------------
  |  Branch (777:13): [True: 12.0k, False: 228k]
  ------------------
  778|  12.0k|            && dest->curve_name != 0
  ------------------
  |  Branch (778:16): [True: 12.0k, False: 0]
  ------------------
  779|  12.0k|            && src->curve_name != 0)) {
  ------------------
  |  Branch (779:16): [True: 0, False: 12.0k]
  ------------------
  780|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  781|      0|        return 0;
  782|      0|    }
  783|   240k|    if (dest == src)
  ------------------
  |  Branch (783:9): [True: 0, False: 240k]
  ------------------
  784|      0|        return 1;
  785|   240k|    return dest->meth->point_copy(dest, src);
  786|   240k|}
EC_POINT_set_Jprojective_coordinates_GFp:
  832|   239k|{
  833|   239k|    if (group->meth->field_type != NID_X9_62_prime_field) {
  ------------------
  |  |  152|   239k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (833:9): [True: 0, False: 239k]
  ------------------
  834|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  835|      0|        return 0;
  836|      0|    }
  837|   239k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (837:9): [True: 0, False: 239k]
  ------------------
  838|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  839|      0|        return 0;
  840|      0|    }
  841|   239k|    return ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group, point,
  842|   239k|        x, y, z, ctx);
  843|   239k|}
EC_POINT_set_affine_coordinates:
  866|   239k|{
  867|   239k|    if (group->meth->point_set_affine_coordinates == NULL) {
  ------------------
  |  Branch (867:9): [True: 0, False: 239k]
  ------------------
  868|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  869|      0|        return 0;
  870|      0|    }
  871|   239k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (871:9): [True: 0, False: 239k]
  ------------------
  872|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  873|      0|        return 0;
  874|      0|    }
  875|   239k|    if (!group->meth->point_set_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (875:9): [True: 0, False: 239k]
  ------------------
  876|      0|        return 0;
  877|       |
  878|   239k|    if (EC_POINT_is_on_curve(group, point, ctx) <= 0) {
  ------------------
  |  Branch (878:9): [True: 0, False: 239k]
  ------------------
  879|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_IS_NOT_ON_CURVE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  880|      0|        return 0;
  881|      0|    }
  882|   239k|    return 1;
  883|   239k|}
EC_POINT_get_affine_coordinates:
  906|    594|{
  907|    594|    if (group->meth->point_get_affine_coordinates == NULL) {
  ------------------
  |  Branch (907:9): [True: 0, False: 594]
  ------------------
  908|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  909|      0|        return 0;
  910|      0|    }
  911|    594|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (911:9): [True: 0, False: 594]
  ------------------
  912|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  913|      0|        return 0;
  914|      0|    }
  915|    594|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (915:9): [True: 0, False: 594]
  ------------------
  916|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  917|      0|        return 0;
  918|      0|    }
  919|    594|    return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);
  920|    594|}
EC_POINT_is_at_infinity:
  983|   242k|{
  984|   242k|    if (group->meth->is_at_infinity == 0) {
  ------------------
  |  Branch (984:9): [True: 0, False: 242k]
  ------------------
  985|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  986|      0|        return 0;
  987|      0|    }
  988|   242k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (988:9): [True: 0, False: 242k]
  ------------------
  989|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  990|      0|        return 0;
  991|      0|    }
  992|   242k|    return group->meth->is_at_infinity(group, point);
  993|   242k|}
EC_POINT_is_on_curve:
 1004|   239k|{
 1005|   239k|    if (group->meth->is_on_curve == 0) {
  ------------------
  |  Branch (1005:9): [True: 0, False: 239k]
  ------------------
 1006|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1007|      0|        return 0;
 1008|      0|    }
 1009|   239k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (1009:9): [True: 0, False: 239k]
  ------------------
 1010|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1011|      0|        return 0;
 1012|      0|    }
 1013|   239k|    return group->meth->is_on_curve(group, point, ctx);
 1014|   239k|}
EC_POINT_cmp:
 1018|    162|{
 1019|    162|    if (group->meth->point_cmp == 0) {
  ------------------
  |  Branch (1019:9): [True: 0, False: 162]
  ------------------
 1020|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1021|      0|        return -1;
 1022|      0|    }
 1023|    162|    if (!ec_point_is_compat(a, group) || !ec_point_is_compat(b, group)) {
  ------------------
  |  Branch (1023:9): [True: 0, False: 162]
  |  Branch (1023:42): [True: 0, False: 162]
  ------------------
 1024|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1025|      0|        return -1;
 1026|      0|    }
 1027|    162|    return group->meth->point_cmp(group, a, b, ctx);
 1028|    162|}
EC_POINT_mul:
 1119|    594|{
 1120|    594|    int ret = 0;
 1121|    594|    size_t num;
 1122|    594|#ifndef FIPS_MODULE
 1123|    594|    BN_CTX *new_ctx = NULL;
 1124|    594|#endif
 1125|       |
 1126|    594|    if (!ec_point_is_compat(r, group)
  ------------------
  |  Branch (1126:9): [True: 0, False: 594]
  ------------------
 1127|    594|        || (point != NULL && !ec_point_is_compat(point, group))) {
  ------------------
  |  Branch (1127:13): [True: 0, False: 594]
  |  Branch (1127:30): [True: 0, False: 0]
  ------------------
 1128|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1129|      0|        return 0;
 1130|      0|    }
 1131|       |
 1132|    594|    if (g_scalar == NULL && p_scalar == NULL)
  ------------------
  |  Branch (1132:9): [True: 0, False: 594]
  |  Branch (1132:29): [True: 0, False: 0]
  ------------------
 1133|      0|        return EC_POINT_set_to_infinity(group, r);
 1134|       |
 1135|    594|#ifndef FIPS_MODULE
 1136|    594|    if (ctx == NULL)
  ------------------
  |  Branch (1136:9): [True: 0, False: 594]
  ------------------
 1137|      0|        ctx = new_ctx = BN_CTX_secure_new();
 1138|    594|#endif
 1139|    594|    if (ctx == NULL) {
  ------------------
  |  Branch (1139:9): [True: 0, False: 594]
  ------------------
 1140|      0|        ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1141|      0|        return 0;
 1142|      0|    }
 1143|       |
 1144|    594|    num = (point != NULL && p_scalar != NULL) ? 1 : 0;
  ------------------
  |  Branch (1144:12): [True: 0, False: 594]
  |  Branch (1144:29): [True: 0, False: 0]
  ------------------
 1145|    594|    if (group->meth->mul != NULL)
  ------------------
  |  Branch (1145:9): [True: 305, False: 289]
  ------------------
 1146|    305|        ret = group->meth->mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
 1147|    289|    else
 1148|       |        /* use default */
 1149|    289|        ret = ossl_ec_wNAF_mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
 1150|       |
 1151|    594|#ifndef FIPS_MODULE
 1152|    594|    BN_CTX_free(new_ctx);
 1153|    594|#endif
 1154|    594|    return ret;
 1155|    594|}
ossl_ec_group_simple_order_bits:
 1230|   241k|{
 1231|   241k|    if (group->order == NULL)
  ------------------
  |  Branch (1231:9): [True: 0, False: 241k]
  ------------------
 1232|      0|        return 0;
 1233|   241k|    return BN_num_bits(group->order);
 1234|   241k|}
ossl_ec_group_set_params:
 1506|    594|{
 1507|    594|    int encoding_flag = -1, format = -1;
 1508|    594|    const OSSL_PARAM *p;
 1509|       |
 1510|    594|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT);
  ------------------
  |  |  394|    594|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
 1511|    594|    if (p != NULL) {
  ------------------
  |  Branch (1511:9): [True: 0, False: 594]
  ------------------
 1512|      0|        if (!ossl_ec_pt_format_param2id(p, &format)) {
  ------------------
  |  Branch (1512:13): [True: 0, False: 0]
  ------------------
 1513|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1514|      0|            return 0;
 1515|      0|        }
 1516|      0|        EC_GROUP_set_point_conversion_form(group, format);
 1517|      0|    }
 1518|       |
 1519|    594|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ENCODING);
  ------------------
  |  |  387|    594|# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
  ------------------
 1520|    594|    if (p != NULL) {
  ------------------
  |  Branch (1520:9): [True: 0, False: 594]
  ------------------
 1521|      0|        if (!ossl_ec_encoding_param2id(p, &encoding_flag)) {
  ------------------
  |  Branch (1521:13): [True: 0, False: 0]
  ------------------
 1522|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1523|      0|            return 0;
 1524|      0|        }
 1525|      0|        EC_GROUP_set_asn1_flag(group, encoding_flag);
 1526|      0|    }
 1527|       |    /* Optional seed */
 1528|    594|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_SEED);
  ------------------
  |  |  397|    594|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
 1529|    594|    if (p != NULL) {
  ------------------
  |  Branch (1529:9): [True: 0, False: 594]
  ------------------
 1530|       |        /* The seed is allowed to be NULL */
 1531|      0|        if (p->data_type != OSSL_PARAM_OCTET_STRING
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (1531:13): [True: 0, False: 0]
  ------------------
 1532|      0|            || !EC_GROUP_set_seed(group, p->data, p->data_size)) {
  ------------------
  |  Branch (1532:16): [True: 0, False: 0]
  ------------------
 1533|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_SEED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1534|      0|            return 0;
 1535|      0|        }
 1536|      0|    }
 1537|    594|    return 1;
 1538|    594|}
EC_GROUP_new_from_params:
 1542|    594|{
 1543|    594|    const OSSL_PARAM *ptmp;
 1544|    594|    EC_GROUP *group = NULL;
 1545|       |
 1546|    594|#ifndef FIPS_MODULE
 1547|    594|    const OSSL_PARAM *pa, *pb;
 1548|    594|    int ok = 0;
 1549|    594|    EC_GROUP *named_group = NULL;
 1550|    594|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *order = NULL, *cofactor = NULL;
 1551|    594|    EC_POINT *point = NULL;
 1552|    594|    int field_bits = 0;
 1553|    594|    int is_prime_field = 1;
 1554|    594|    BN_CTX *bnctx = NULL;
 1555|    594|    const unsigned char *buf = NULL;
 1556|    594|    int encoding_flag = -1;
 1557|    594|#endif
 1558|       |
 1559|       |    /* This is the simple named group case */
 1560|    594|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_GROUP_NAME);
  ------------------
  |  |  420|    594|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1561|    594|    if (ptmp != NULL) {
  ------------------
  |  Branch (1561:9): [True: 594, False: 0]
  ------------------
 1562|    594|        int decoded = 0;
 1563|       |
 1564|    594|        if ((group = group_new_from_name(ptmp, libctx, propq)) == NULL)
  ------------------
  |  Branch (1564:13): [True: 0, False: 594]
  ------------------
 1565|      0|            return NULL;
 1566|    594|        if (!ossl_ec_group_set_params(group, params)) {
  ------------------
  |  Branch (1566:13): [True: 0, False: 594]
  ------------------
 1567|      0|            EC_GROUP_free(group);
 1568|      0|            return NULL;
 1569|      0|        }
 1570|       |
 1571|    594|        ptmp = OSSL_PARAM_locate_const(params,
 1572|    594|            OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS);
  ------------------
  |  |  386|    594|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
 1573|    594|        if (ptmp != NULL && !OSSL_PARAM_get_int(ptmp, &decoded)) {
  ------------------
  |  Branch (1573:13): [True: 0, False: 594]
  |  Branch (1573:29): [True: 0, False: 0]
  ------------------
 1574|      0|            ERR_raise(ERR_LIB_EC, EC_R_WRONG_CURVE_PARAMETERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1575|      0|            EC_GROUP_free(group);
 1576|      0|            return NULL;
 1577|      0|        }
 1578|    594|        group->decoded_from_explicit_params = decoded > 0;
 1579|    594|        return group;
 1580|    594|    }
 1581|       |#ifdef FIPS_MODULE
 1582|       |    ERR_raise(ERR_LIB_EC, EC_R_EXPLICIT_PARAMS_NOT_SUPPORTED);
 1583|       |    return NULL;
 1584|       |#else
 1585|       |    /* If it gets here then we are trying explicit parameters */
 1586|      0|    bnctx = BN_CTX_new_ex(libctx);
 1587|      0|    if (bnctx == NULL) {
  ------------------
  |  Branch (1587:9): [True: 0, False: 0]
  ------------------
 1588|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1589|      0|        return 0;
 1590|      0|    }
 1591|      0|    BN_CTX_start(bnctx);
 1592|       |
 1593|      0|    p = BN_CTX_get(bnctx);
 1594|      0|    a = BN_CTX_get(bnctx);
 1595|      0|    b = BN_CTX_get(bnctx);
 1596|      0|    order = BN_CTX_get(bnctx);
 1597|      0|    if (order == NULL) {
  ------------------
  |  Branch (1597:9): [True: 0, False: 0]
  ------------------
 1598|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1599|      0|        goto err;
 1600|      0|    }
 1601|       |
 1602|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_FIELD_TYPE);
  ------------------
  |  |  388|      0|# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
  ------------------
 1603|      0|    if (ptmp == NULL || ptmp->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1603:9): [True: 0, False: 0]
  |  Branch (1603:25): [True: 0, False: 0]
  ------------------
 1604|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1605|      0|        goto err;
 1606|      0|    }
 1607|      0|    if (OPENSSL_strcasecmp(ptmp->data, SN_X9_62_prime_field) == 0) {
  ------------------
  |  |  151|      0|#define SN_X9_62_prime_field            "prime-field"
  ------------------
  |  Branch (1607:9): [True: 0, False: 0]
  ------------------
 1608|      0|        is_prime_field = 1;
 1609|      0|    } else if (OPENSSL_strcasecmp(ptmp->data,
  ------------------
  |  Branch (1609:16): [True: 0, False: 0]
  ------------------
 1610|      0|                   SN_X9_62_characteristic_two_field)
  ------------------
  |  |  155|      0|#define SN_X9_62_characteristic_two_field               "characteristic-two-field"
  ------------------
 1611|      0|        == 0) {
 1612|      0|        is_prime_field = 0;
 1613|      0|    } else {
 1614|       |        /* Invalid field */
 1615|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNSUPPORTED_FIELD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1616|      0|        goto err;
 1617|      0|    }
 1618|       |
 1619|      0|    pa = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_A);
  ------------------
  |  |  377|      0|# define OSSL_PKEY_PARAM_EC_A "a"
  ------------------
 1620|      0|    if (!OSSL_PARAM_get_BN(pa, &a)) {
  ------------------
  |  Branch (1620:9): [True: 0, False: 0]
  ------------------
 1621|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_A);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1622|      0|        goto err;
 1623|      0|    }
 1624|      0|    pb = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_B);
  ------------------
  |  |  378|      0|# define OSSL_PKEY_PARAM_EC_B "b"
  ------------------
 1625|      0|    if (!OSSL_PARAM_get_BN(pb, &b)) {
  ------------------
  |  Branch (1625:9): [True: 0, False: 0]
  ------------------
 1626|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_B);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1627|      0|        goto err;
 1628|      0|    }
 1629|       |
 1630|       |    /* extract the prime number or irreducible polynomial */
 1631|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_P);
  ------------------
  |  |  393|      0|# define OSSL_PKEY_PARAM_EC_P "p"
  ------------------
 1632|      0|    if (!OSSL_PARAM_get_BN(ptmp, &p)) {
  ------------------
  |  Branch (1632:9): [True: 0, False: 0]
  ------------------
 1633|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_P);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1634|      0|        goto err;
 1635|      0|    }
 1636|       |
 1637|      0|    if (is_prime_field) {
  ------------------
  |  Branch (1637:9): [True: 0, False: 0]
  ------------------
 1638|      0|        if (BN_is_negative(p) || BN_is_zero(p)) {
  ------------------
  |  Branch (1638:13): [True: 0, False: 0]
  |  Branch (1638:34): [True: 0, False: 0]
  ------------------
 1639|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_P);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1640|      0|            goto err;
 1641|      0|        }
 1642|      0|        field_bits = BN_num_bits(p);
 1643|      0|        if (field_bits > OPENSSL_ECC_MAX_FIELD_BITS) {
  ------------------
  |  |  103|      0|#define OPENSSL_ECC_MAX_FIELD_BITS 661
  ------------------
  |  Branch (1643:13): [True: 0, False: 0]
  ------------------
 1644|      0|            ERR_raise(ERR_LIB_EC, EC_R_FIELD_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1645|      0|            goto err;
 1646|      0|        }
 1647|       |
 1648|       |        /* create the EC_GROUP structure */
 1649|      0|        group = EC_GROUP_new_curve_GFp(p, a, b, bnctx);
 1650|      0|    } else {
 1651|       |#ifdef OPENSSL_NO_EC2M
 1652|       |        ERR_raise(ERR_LIB_EC, EC_R_GF2M_NOT_SUPPORTED);
 1653|       |        goto err;
 1654|       |#else
 1655|       |        /* create the EC_GROUP structure */
 1656|      0|        group = EC_GROUP_new_curve_GF2m(p, a, b, NULL);
 1657|      0|        if (group != NULL) {
  ------------------
  |  Branch (1657:13): [True: 0, False: 0]
  ------------------
 1658|      0|            field_bits = EC_GROUP_get_degree(group);
 1659|      0|            if (field_bits > OPENSSL_ECC_MAX_FIELD_BITS) {
  ------------------
  |  |  103|      0|#define OPENSSL_ECC_MAX_FIELD_BITS 661
  ------------------
  |  Branch (1659:17): [True: 0, False: 0]
  ------------------
 1660|      0|                ERR_raise(ERR_LIB_EC, EC_R_FIELD_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1661|      0|                goto err;
 1662|      0|            }
 1663|      0|        }
 1664|      0|#endif /* OPENSSL_NO_EC2M */
 1665|      0|    }
 1666|       |
 1667|      0|    if (group == NULL) {
  ------------------
  |  Branch (1667:9): [True: 0, False: 0]
  ------------------
 1668|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1669|      0|        goto err;
 1670|      0|    }
 1671|       |
 1672|       |    /* Optional seed */
 1673|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_SEED);
  ------------------
  |  |  397|      0|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
 1674|      0|    if (ptmp != NULL) {
  ------------------
  |  Branch (1674:9): [True: 0, False: 0]
  ------------------
 1675|      0|        if (ptmp->data_type != OSSL_PARAM_OCTET_STRING) {
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (1675:13): [True: 0, False: 0]
  ------------------
 1676|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_SEED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1677|      0|            goto err;
 1678|      0|        }
 1679|      0|        if (!EC_GROUP_set_seed(group, ptmp->data, ptmp->data_size))
  ------------------
  |  Branch (1679:13): [True: 0, False: 0]
  ------------------
 1680|      0|            goto err;
 1681|      0|    }
 1682|       |
 1683|       |    /* generator base point */
 1684|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_GENERATOR);
  ------------------
  |  |  389|      0|# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
  ------------------
 1685|      0|    if (ptmp == NULL
  ------------------
  |  Branch (1685:9): [True: 0, False: 0]
  ------------------
 1686|      0|        || ptmp->data_type != OSSL_PARAM_OCTET_STRING) {
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (1686:12): [True: 0, False: 0]
  ------------------
 1687|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1688|      0|        goto err;
 1689|      0|    }
 1690|      0|    buf = (const unsigned char *)(ptmp->data);
 1691|      0|    if ((point = EC_POINT_new(group)) == NULL)
  ------------------
  |  Branch (1691:9): [True: 0, False: 0]
  ------------------
 1692|      0|        goto err;
 1693|      0|    EC_GROUP_set_point_conversion_form(group,
 1694|      0|        (point_conversion_form_t)buf[0] & ~0x01);
 1695|      0|    if (!EC_POINT_oct2point(group, point, buf, ptmp->data_size, bnctx)) {
  ------------------
  |  Branch (1695:9): [True: 0, False: 0]
  ------------------
 1696|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1697|      0|        goto err;
 1698|      0|    }
 1699|       |
 1700|       |    /* order */
 1701|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ORDER);
  ------------------
  |  |  392|      0|# define OSSL_PKEY_PARAM_EC_ORDER "order"
  ------------------
 1702|      0|    if (!OSSL_PARAM_get_BN(ptmp, &order)
  ------------------
  |  Branch (1702:9): [True: 0, False: 0]
  ------------------
 1703|      0|        || (BN_is_negative(order) || BN_is_zero(order))
  ------------------
  |  Branch (1703:13): [True: 0, False: 0]
  |  Branch (1703:38): [True: 0, False: 0]
  ------------------
 1704|      0|        || (BN_num_bits(order) > (int)field_bits + 1)) { /* Hasse bound */
  ------------------
  |  Branch (1704:12): [True: 0, False: 0]
  ------------------
 1705|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GROUP_ORDER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1706|      0|        goto err;
 1707|      0|    }
 1708|       |
 1709|       |    /* Optional cofactor */
 1710|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_COFACTOR);
  ------------------
  |  |  385|      0|# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
  ------------------
 1711|      0|    if (ptmp != NULL) {
  ------------------
  |  Branch (1711:9): [True: 0, False: 0]
  ------------------
 1712|      0|        cofactor = BN_CTX_get(bnctx);
 1713|      0|        if (cofactor == NULL || !OSSL_PARAM_get_BN(ptmp, &cofactor)) {
  ------------------
  |  Branch (1713:13): [True: 0, False: 0]
  |  Branch (1713:33): [True: 0, False: 0]
  ------------------
 1714|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_COFACTOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1715|      0|            goto err;
 1716|      0|        }
 1717|      0|    }
 1718|       |
 1719|       |    /* set the generator, order and cofactor (if present) */
 1720|      0|    if (!EC_GROUP_set_generator(group, point, order, cofactor)) {
  ------------------
  |  Branch (1720:9): [True: 0, False: 0]
  ------------------
 1721|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1722|      0|        goto err;
 1723|      0|    }
 1724|       |
 1725|      0|    named_group = ec_group_explicit_to_named(group, libctx, propq, bnctx);
 1726|      0|    if (named_group == NULL) {
  ------------------
  |  Branch (1726:9): [True: 0, False: 0]
  ------------------
 1727|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_NAMED_GROUP_CONVERSION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1728|      0|        goto err;
 1729|      0|    }
 1730|      0|    if (named_group == group) {
  ------------------
  |  Branch (1730:9): [True: 0, False: 0]
  ------------------
 1731|       |        /*
 1732|       |         * If we did not find a named group then the encoding should be explicit
 1733|       |         * if it was specified
 1734|       |         */
 1735|      0|        ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ENCODING);
  ------------------
  |  |  387|      0|# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
  ------------------
 1736|      0|        if (ptmp != NULL
  ------------------
  |  Branch (1736:13): [True: 0, False: 0]
  ------------------
 1737|      0|            && !ossl_ec_encoding_param2id(ptmp, &encoding_flag)) {
  ------------------
  |  Branch (1737:16): [True: 0, False: 0]
  ------------------
 1738|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1739|      0|            goto err;
 1740|      0|        }
 1741|      0|        if (encoding_flag == OPENSSL_EC_NAMED_CURVE) {
  ------------------
  |  |   31|      0|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  |  Branch (1741:13): [True: 0, False: 0]
  ------------------
 1742|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1743|      0|            goto err;
 1744|      0|        }
 1745|      0|        EC_GROUP_set_asn1_flag(group, OPENSSL_EC_EXPLICIT_CURVE);
  ------------------
  |  |   30|      0|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
 1746|      0|    } else {
 1747|      0|        EC_GROUP_free(group);
 1748|      0|        group = named_group;
 1749|      0|    }
 1750|       |    /* We've imported the group from explicit parameters, set it so. */
 1751|      0|    group->decoded_from_explicit_params = 1;
 1752|      0|    ok = 1;
 1753|      0|err:
 1754|      0|    if (!ok) {
  ------------------
  |  Branch (1754:9): [True: 0, False: 0]
  ------------------
 1755|      0|        EC_GROUP_free(group);
 1756|      0|        group = NULL;
 1757|      0|    }
 1758|      0|    EC_POINT_free(point);
 1759|      0|    BN_CTX_end(bnctx);
 1760|      0|    BN_CTX_free(bnctx);
 1761|       |
 1762|      0|    return group;
 1763|      0|#endif /* FIPS_MODULE */
 1764|      0|}
ec_lib.c:ec_precompute_mont_data:
 1189|   107k|{
 1190|   107k|    BN_CTX *ctx = BN_CTX_new_ex(group->libctx);
 1191|   107k|    int ret = 0;
 1192|       |
 1193|   107k|    BN_MONT_CTX_free(group->mont_data);
 1194|   107k|    group->mont_data = NULL;
 1195|       |
 1196|   107k|    if (ctx == NULL)
  ------------------
  |  Branch (1196:9): [True: 0, False: 107k]
  ------------------
 1197|      0|        goto err;
 1198|       |
 1199|   107k|    group->mont_data = BN_MONT_CTX_new();
 1200|   107k|    if (group->mont_data == NULL)
  ------------------
  |  Branch (1200:9): [True: 0, False: 107k]
  ------------------
 1201|      0|        goto err;
 1202|       |
 1203|   107k|    if (!BN_MONT_CTX_set(group->mont_data, group->order, ctx)) {
  ------------------
  |  Branch (1203:9): [True: 0, False: 107k]
  ------------------
 1204|      0|        BN_MONT_CTX_free(group->mont_data);
 1205|      0|        group->mont_data = NULL;
 1206|      0|        goto err;
 1207|      0|    }
 1208|       |
 1209|   107k|    ret = 1;
 1210|       |
 1211|   107k|err:
 1212|       |
 1213|   107k|    BN_CTX_free(ctx);
 1214|   107k|    return ret;
 1215|   107k|}
ec_lib.c:group_new_from_name:
 1477|    594|{
 1478|    594|    int ok = 0, nid;
 1479|    594|    const char *curve_name = NULL;
 1480|       |
 1481|    594|    switch (p->data_type) {
  ------------------
  |  Branch (1481:13): [True: 594, False: 0]
  ------------------
 1482|    594|    case OSSL_PARAM_UTF8_STRING:
  ------------------
  |  |  117|    594|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1482:5): [True: 594, False: 0]
  ------------------
 1483|       |        /* The OSSL_PARAM functions have no support for this */
 1484|    594|        curve_name = p->data;
 1485|    594|        ok = (curve_name != NULL);
 1486|    594|        break;
 1487|      0|    case OSSL_PARAM_UTF8_PTR:
  ------------------
  |  |  141|      0|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
  |  Branch (1487:5): [True: 0, False: 594]
  ------------------
 1488|      0|        ok = OSSL_PARAM_get_utf8_ptr(p, &curve_name);
 1489|      0|        break;
 1490|    594|    }
 1491|       |
 1492|    594|    if (ok) {
  ------------------
  |  Branch (1492:9): [True: 594, False: 0]
  ------------------
 1493|    594|        nid = ossl_ec_curve_name2nid(curve_name);
 1494|    594|        if (nid == NID_undef) {
  ------------------
  |  |   18|    594|#define NID_undef                       0
  ------------------
  |  Branch (1494:13): [True: 0, False: 594]
  ------------------
 1495|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_CURVE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1496|      0|            return NULL;
 1497|    594|        } else {
 1498|    594|            return EC_GROUP_new_by_curve_name_ex(libctx, propq, nid);
 1499|    594|        }
 1500|    594|    }
 1501|      0|    return NULL;
 1502|    594|}

ec_lib.c:ec_point_is_compat:
  333|   962k|{
  334|   962k|    return group->meth == point->meth
  ------------------
  |  Branch (334:12): [True: 962k, False: 0]
  ------------------
  335|   962k|        && (group->curve_name == 0
  ------------------
  |  Branch (335:13): [True: 48.3k, False: 913k]
  ------------------
  336|   913k|            || point->curve_name == 0
  ------------------
  |  Branch (336:16): [True: 0, False: 913k]
  ------------------
  337|   913k|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (337:16): [True: 913k, False: 0]
  ------------------
  338|   962k|}
ec_mult.c:ec_point_ladder_pre:
  765|    289|{
  766|    289|    if (group->meth->ladder_pre != NULL)
  ------------------
  |  Branch (766:9): [True: 289, False: 0]
  ------------------
  767|    289|        return group->meth->ladder_pre(group, r, s, p, ctx);
  768|       |
  769|      0|    if (!EC_POINT_copy(s, p)
  ------------------
  |  Branch (769:9): [True: 0, False: 0]
  ------------------
  770|      0|        || !EC_POINT_dbl(group, r, s, ctx))
  ------------------
  |  Branch (770:12): [True: 0, False: 0]
  ------------------
  771|      0|        return 0;
  772|       |
  773|      0|    return 1;
  774|      0|}
ec_mult.c:ec_point_ladder_step:
  779|   115k|{
  780|   115k|    if (group->meth->ladder_step != NULL)
  ------------------
  |  Branch (780:9): [True: 115k, False: 0]
  ------------------
  781|   115k|        return group->meth->ladder_step(group, r, s, p, ctx);
  782|       |
  783|      0|    if (!EC_POINT_add(group, s, r, s, ctx)
  ------------------
  |  Branch (783:9): [True: 0, False: 0]
  ------------------
  784|      0|        || !EC_POINT_dbl(group, r, r, ctx))
  ------------------
  |  Branch (784:12): [True: 0, False: 0]
  ------------------
  785|      0|        return 0;
  786|       |
  787|      0|    return 1;
  788|      0|}
ec_mult.c:ec_point_ladder_post:
  793|    289|{
  794|    289|    if (group->meth->ladder_post != NULL)
  ------------------
  |  Branch (794:9): [True: 289, False: 0]
  ------------------
  795|    289|        return group->meth->ladder_post(group, r, s, p, ctx);
  796|       |
  797|      0|    return 1;
  798|    289|}
ec_oct.c:ec_point_is_compat:
  333|   120k|{
  334|   120k|    return group->meth == point->meth
  ------------------
  |  Branch (334:12): [True: 120k, False: 0]
  ------------------
  335|   120k|        && (group->curve_name == 0
  ------------------
  |  Branch (335:13): [True: 0, False: 120k]
  ------------------
  336|   120k|            || point->curve_name == 0
  ------------------
  |  Branch (336:16): [True: 0, False: 120k]
  ------------------
  337|   120k|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (337:16): [True: 120k, False: 0]
  ------------------
  338|   120k|}

ossl_ec_scalar_mul_ladder:
  143|    289|{
  144|    289|    int i, cardinality_bits, group_top, kbit, pbit, Z_is_one;
  145|    289|    EC_POINT *p = NULL;
  146|    289|    EC_POINT *s = NULL;
  147|    289|    BIGNUM *k = NULL;
  148|    289|    BIGNUM *lambda = NULL;
  149|    289|    BIGNUM *cardinality = NULL;
  150|    289|    int ret = 0;
  151|       |
  152|       |    /* early exit if the input point is the point at infinity */
  153|    289|    if (point != NULL && EC_POINT_is_at_infinity(group, point))
  ------------------
  |  Branch (153:9): [True: 0, False: 289]
  |  Branch (153:26): [True: 0, False: 0]
  ------------------
  154|      0|        return EC_POINT_set_to_infinity(group, r);
  155|       |
  156|    289|    if (BN_is_zero(group->order)) {
  ------------------
  |  Branch (156:9): [True: 0, False: 289]
  ------------------
  157|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_ORDER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  158|      0|        return 0;
  159|      0|    }
  160|    289|    if (BN_is_zero(group->cofactor)) {
  ------------------
  |  Branch (160:9): [True: 0, False: 289]
  ------------------
  161|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_COFACTOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  162|      0|        return 0;
  163|      0|    }
  164|       |
  165|    289|    BN_CTX_start(ctx);
  166|       |
  167|    289|    if (((p = EC_POINT_new(group)) == NULL)
  ------------------
  |  Branch (167:9): [True: 0, False: 289]
  ------------------
  168|    289|        || ((s = EC_POINT_new(group)) == NULL)) {
  ------------------
  |  Branch (168:12): [True: 0, False: 289]
  ------------------
  169|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  170|      0|        goto err;
  171|      0|    }
  172|       |
  173|    289|    if (point == NULL) {
  ------------------
  |  Branch (173:9): [True: 289, False: 0]
  ------------------
  174|    289|        if (!EC_POINT_copy(p, group->generator)) {
  ------------------
  |  Branch (174:13): [True: 0, False: 289]
  ------------------
  175|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  176|      0|            goto err;
  177|      0|        }
  178|    289|    } 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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  181|      0|            goto err;
  182|      0|        }
  183|      0|    }
  184|       |
  185|    289|    EC_POINT_BN_set_flags(p, BN_FLG_CONSTTIME);
  ------------------
  |  |  105|    289|    do {                                \
  |  |  106|    289|        BN_set_flags((P)->X, (flags));  \
  |  |  107|    289|        BN_set_flags((P)->Y, (flags));  \
  |  |  108|    289|        BN_set_flags((P)->Z, (flags));  \
  |  |  109|    289|    } while (0)
  |  |  ------------------
  |  |  |  Branch (109:14): [Folded, False: 289]
  |  |  ------------------
  ------------------
  186|    289|    EC_POINT_BN_set_flags(r, BN_FLG_CONSTTIME);
  ------------------
  |  |  105|    289|    do {                                \
  |  |  106|    289|        BN_set_flags((P)->X, (flags));  \
  |  |  107|    289|        BN_set_flags((P)->Y, (flags));  \
  |  |  108|    289|        BN_set_flags((P)->Z, (flags));  \
  |  |  109|    289|    } while (0)
  |  |  ------------------
  |  |  |  Branch (109:14): [Folded, False: 289]
  |  |  ------------------
  ------------------
  187|    289|    EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME);
  ------------------
  |  |  105|    289|    do {                                \
  |  |  106|    289|        BN_set_flags((P)->X, (flags));  \
  |  |  107|    289|        BN_set_flags((P)->Y, (flags));  \
  |  |  108|    289|        BN_set_flags((P)->Z, (flags));  \
  |  |  109|    289|    } while (0)
  |  |  ------------------
  |  |  |  Branch (109:14): [Folded, False: 289]
  |  |  ------------------
  ------------------
  188|       |
  189|    289|    cardinality = BN_CTX_get(ctx);
  190|    289|    lambda = BN_CTX_get(ctx);
  191|    289|    k = BN_CTX_get(ctx);
  192|    289|    if (k == NULL) {
  ------------------
  |  Branch (192:9): [True: 0, False: 289]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        goto err;
  195|      0|    }
  196|       |
  197|    289|    if (!BN_mul(cardinality, group->order, group->cofactor, ctx)) {
  ------------------
  |  Branch (197:9): [True: 0, False: 289]
  ------------------
  198|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|    289|    cardinality_bits = BN_num_bits(cardinality);
  209|    289|    group_top = bn_get_top(cardinality);
  210|    289|    if ((bn_wexpand(k, group_top + 2) == NULL)
  ------------------
  |  Branch (210:9): [True: 0, False: 289]
  ------------------
  211|    289|        || (bn_wexpand(lambda, group_top + 2) == NULL)) {
  ------------------
  |  Branch (211:12): [True: 0, False: 289]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        goto err;
  214|      0|    }
  215|       |
  216|    289|    if (!BN_copy(k, scalar)) {
  ------------------
  |  Branch (216:9): [True: 0, False: 289]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        goto err;
  219|      0|    }
  220|       |
  221|    289|    BN_set_flags(k, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|    289|#define BN_FLG_CONSTTIME 0x04
  ------------------
  222|       |
  223|    289|    if ((BN_num_bits(k) > cardinality_bits) || (BN_is_negative(k))) {
  ------------------
  |  Branch (223:9): [True: 0, False: 289]
  |  Branch (223:48): [True: 0, False: 289]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  230|      0|            goto err;
  231|      0|        }
  232|      0|    }
  233|       |
  234|    289|    if (!BN_add(lambda, k, cardinality)) {
  ------------------
  |  Branch (234:9): [True: 0, False: 289]
  ------------------
  235|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  236|      0|        goto err;
  237|      0|    }
  238|    289|    BN_set_flags(lambda, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|    289|#define BN_FLG_CONSTTIME 0x04
  ------------------
  239|    289|    if (!BN_add(k, lambda, cardinality)) {
  ------------------
  |  Branch (239:9): [True: 0, False: 289]
  ------------------
  240|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  241|      0|        goto err;
  242|      0|    }
  243|       |    /*
  244|       |     * lambda := scalar + cardinality
  245|       |     * k := scalar + 2*cardinality
  246|       |     */
  247|    289|    kbit = BN_is_bit_set(lambda, cardinality_bits);
  248|    289|    BN_consttime_swap(kbit, k, lambda, group_top + 2);
  249|       |
  250|    289|    group_top = bn_get_top(group->field);
  251|    289|    if ((bn_wexpand(s->X, group_top) == NULL)
  ------------------
  |  Branch (251:9): [True: 0, False: 289]
  ------------------
  252|    289|        || (bn_wexpand(s->Y, group_top) == NULL)
  ------------------
  |  Branch (252:12): [True: 0, False: 289]
  ------------------
  253|    289|        || (bn_wexpand(s->Z, group_top) == NULL)
  ------------------
  |  Branch (253:12): [True: 0, False: 289]
  ------------------
  254|    289|        || (bn_wexpand(r->X, group_top) == NULL)
  ------------------
  |  Branch (254:12): [True: 0, False: 289]
  ------------------
  255|    289|        || (bn_wexpand(r->Y, group_top) == NULL)
  ------------------
  |  Branch (255:12): [True: 0, False: 289]
  ------------------
  256|    289|        || (bn_wexpand(r->Z, group_top) == NULL)
  ------------------
  |  Branch (256:12): [True: 0, False: 289]
  ------------------
  257|    289|        || (bn_wexpand(p->X, group_top) == NULL)
  ------------------
  |  Branch (257:12): [True: 0, False: 289]
  ------------------
  258|    289|        || (bn_wexpand(p->Y, group_top) == NULL)
  ------------------
  |  Branch (258:12): [True: 0, False: 289]
  ------------------
  259|    289|        || (bn_wexpand(p->Z, group_top) == NULL)) {
  ------------------
  |  Branch (259:12): [True: 0, False: 289]
  ------------------
  260|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  261|      0|        goto err;
  262|      0|    }
  263|       |
  264|       |    /* ensure input point is in affine coords for ladder step efficiency */
  265|    289|    if (!p->Z_is_one && (group->meth->make_affine == NULL || !group->meth->make_affine(group, p, ctx))) {
  ------------------
  |  Branch (265:9): [True: 0, False: 289]
  |  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  267|      0|        goto err;
  268|      0|    }
  269|       |
  270|       |    /* Initialize the Montgomery ladder */
  271|    289|    if (!ec_point_ladder_pre(group, r, s, p, ctx)) {
  ------------------
  |  Branch (271:9): [True: 0, False: 289]
  ------------------
  272|      0|        ERR_raise(ERR_LIB_EC, EC_R_LADDER_PRE_FAILURE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  273|      0|        goto err;
  274|      0|    }
  275|       |
  276|       |    /* top bit is a 1, in a fixed pos */
  277|    289|    pbit = 1;
  278|       |
  279|    289|#define EC_POINT_CSWAP(c, a, b, w, t)              \
  280|    289|    do {                                           \
  281|    289|        BN_consttime_swap(c, (a)->X, (b)->X, w);   \
  282|    289|        BN_consttime_swap(c, (a)->Y, (b)->Y, w);   \
  283|    289|        BN_consttime_swap(c, (a)->Z, (b)->Z, w);   \
  284|    289|        t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
  285|    289|        (a)->Z_is_one ^= (t);                      \
  286|    289|        (b)->Z_is_one ^= (t);                      \
  287|    289|    } 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|   116k|    for (i = cardinality_bits - 1; i >= 0; i--) {
  ------------------
  |  Branch (347:36): [True: 115k, False: 289]
  ------------------
  348|   115k|        kbit = BN_is_bit_set(k, i) ^ pbit;
  349|   115k|        EC_POINT_CSWAP(kbit, r, s, group_top, Z_is_one);
  ------------------
  |  |  280|   115k|    do {                                           \
  |  |  281|   115k|        BN_consttime_swap(c, (a)->X, (b)->X, w);   \
  |  |  282|   115k|        BN_consttime_swap(c, (a)->Y, (b)->Y, w);   \
  |  |  283|   115k|        BN_consttime_swap(c, (a)->Z, (b)->Z, w);   \
  |  |  284|   115k|        t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
  |  |  285|   115k|        (a)->Z_is_one ^= (t);                      \
  |  |  286|   115k|        (b)->Z_is_one ^= (t);                      \
  |  |  287|   115k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (287:14): [Folded, False: 115k]
  |  |  ------------------
  ------------------
  350|       |
  351|       |        /* Perform a single step of the Montgomery ladder */
  352|   115k|        if (!ec_point_ladder_step(group, r, s, p, ctx)) {
  ------------------
  |  Branch (352:13): [True: 0, False: 115k]
  ------------------
  353|      0|            ERR_raise(ERR_LIB_EC, EC_R_LADDER_STEP_FAILURE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|   115k|        pbit ^= kbit;
  361|   115k|    }
  362|       |    /* one final cswap to move the right value into r */
  363|    289|    EC_POINT_CSWAP(pbit, r, s, group_top, Z_is_one);
  ------------------
  |  |  280|    289|    do {                                           \
  |  |  281|    289|        BN_consttime_swap(c, (a)->X, (b)->X, w);   \
  |  |  282|    289|        BN_consttime_swap(c, (a)->Y, (b)->Y, w);   \
  |  |  283|    289|        BN_consttime_swap(c, (a)->Z, (b)->Z, w);   \
  |  |  284|    289|        t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
  |  |  285|    289|        (a)->Z_is_one ^= (t);                      \
  |  |  286|    289|        (b)->Z_is_one ^= (t);                      \
  |  |  287|    289|    } while (0)
  |  |  ------------------
  |  |  |  Branch (287:14): [Folded, False: 289]
  |  |  ------------------
  ------------------
  364|    289|#undef EC_POINT_CSWAP
  365|       |
  366|       |    /* Finalize ladder (and recover full point coordinates) */
  367|    289|    if (!ec_point_ladder_post(group, r, s, p, ctx)) {
  ------------------
  |  Branch (367:9): [True: 0, False: 289]
  ------------------
  368|      0|        ERR_raise(ERR_LIB_EC, EC_R_LADDER_POST_FAILURE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  369|      0|        goto err;
  370|      0|    }
  371|       |
  372|    289|    ret = 1;
  373|       |
  374|    289|err:
  375|    289|    EC_POINT_free(p);
  376|    289|    EC_POINT_clear_free(s);
  377|    289|    BN_CTX_end(ctx);
  378|       |
  379|    289|    return ret;
  380|    289|}
ossl_ec_wNAF_mul:
  406|    289|{
  407|    289|    const EC_POINT *generator = NULL;
  408|    289|    EC_POINT *tmp = NULL;
  409|    289|    size_t totalnum;
  410|    289|    size_t blocksize = 0, numblocks = 0; /* for wNAF splitting */
  411|    289|    size_t pre_points_per_block = 0;
  412|    289|    size_t i, j;
  413|    289|    int k;
  414|    289|    int r_is_inverted = 0;
  415|    289|    int r_is_at_infinity = 1;
  416|    289|    size_t *wsize = NULL; /* individual window sizes */
  417|    289|    signed char **wNAF = NULL; /* individual wNAFs */
  418|    289|    size_t *wNAF_len = NULL;
  419|    289|    size_t max_len = 0;
  420|    289|    size_t num_val;
  421|    289|    EC_POINT **val = NULL; /* precomputation */
  422|    289|    EC_POINT **v;
  423|    289|    EC_POINT ***val_sub = NULL; /* pointers to sub-arrays of 'val' or
  424|       |                                 * 'pre_comp->points' */
  425|    289|    const EC_PRE_COMP *pre_comp = NULL;
  426|    289|    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|    289|    int ret = 0;
  430|       |
  431|    289|    if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) {
  ------------------
  |  Branch (431:9): [True: 289, False: 0]
  |  Branch (431:38): [True: 289, 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|    289|        if ((scalar != group->order) && (scalar != NULL) && (num == 0)) {
  ------------------
  |  Branch (437:13): [True: 289, False: 0]
  |  Branch (437:41): [True: 289, False: 0]
  |  Branch (437:61): [True: 289, 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|    289|            return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx);
  447|    289|        }
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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]));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  506|      0|    wNAF_len = OPENSSL_malloc_array(totalnum, sizeof(wNAF_len[0]));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  507|       |    /* include space for pivot */
  508|      0|    wNAF = OPENSSL_malloc_array(totalnum + 1, sizeof(wNAF[0]));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  509|      0|    val_sub = OPENSSL_malloc_array(totalnum, sizeof(val_sub[0]));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  596|      0|                        OPENSSL_free(tmp_wNAF);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  611|      0|                            OPENSSL_free(tmp_wNAF);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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]);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  624|      0|                    if (wNAF[i] == NULL) {
  ------------------
  |  Branch (624:25): [True: 0, False: 0]
  ------------------
  625|      0|                        OPENSSL_free(tmp_wNAF);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  634|      0|                        OPENSSL_free(tmp_wNAF);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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]));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  777|      0|    OPENSSL_free(wNAF_len);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  783|       |
  784|      0|        OPENSSL_free(wNAF);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  791|      0|    }
  792|      0|    OPENSSL_free(val_sub);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  793|      0|    return ret;
  794|      0|}

EC_POINT_point2oct:
   76|  1.18k|{
   77|  1.18k|    if (point == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 1.18k]
  ------------------
   78|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   79|      0|        return 0;
   80|      0|    }
   81|  1.18k|    if (group->meth->point2oct == 0
  ------------------
  |  Branch (81:9): [True: 1.18k, False: 0]
  ------------------
   82|  1.18k|        && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) {
  ------------------
  |  |   26|  1.18k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (82:12): [True: 0, False: 1.18k]
  ------------------
   83|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   84|      0|        return 0;
   85|      0|    }
   86|  1.18k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 1.18k]
  ------------------
   87|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   88|      0|        return 0;
   89|      0|    }
   90|  1.18k|    if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
  ------------------
  |  |   26|  1.18k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (90:9): [True: 1.18k, False: 0]
  ------------------
   91|  1.18k|        if (group->meth->field_type == NID_X9_62_prime_field)
  ------------------
  |  |  152|  1.18k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (91:13): [True: 1.18k, False: 0]
  ------------------
   92|  1.18k|            return ossl_ec_GFp_simple_point2oct(group, point, form, buf, len,
   93|  1.18k|                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|  1.18k|#endif
  104|  1.18k|    }
  105|       |
  106|      0|    return group->meth->point2oct(group, point, form, buf, len, ctx);
  107|  1.18k|}
EC_POINT_oct2point:
  111|   119k|{
  112|   119k|    if (group->meth->oct2point == 0
  ------------------
  |  Branch (112:9): [True: 119k, False: 0]
  ------------------
  113|   119k|        && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) {
  ------------------
  |  |   26|   119k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (113:12): [True: 0, False: 119k]
  ------------------
  114|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  115|      0|        return 0;
  116|      0|    }
  117|   119k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (117:9): [True: 0, False: 119k]
  ------------------
  118|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|      0|        return 0;
  120|      0|    }
  121|   119k|    if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
  ------------------
  |  |   26|   119k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (121:9): [True: 119k, False: 0]
  ------------------
  122|   119k|        if (group->meth->field_type == NID_X9_62_prime_field)
  ------------------
  |  |  152|   119k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (122:13): [True: 119k, False: 0]
  ------------------
  123|   119k|            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|   119k|#endif
  133|   119k|    }
  134|      0|    return group->meth->oct2point(group, point, buf, len, ctx);
  135|   119k|}

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

ossl_ec_GFp_nist_group_copy:
   86|   107k|{
   87|   107k|    dest->field_mod_func = src->field_mod_func;
   88|       |
   89|   107k|    return ossl_ec_GFp_simple_group_copy(dest, src);
   90|   107k|}
ossl_ec_GFp_nist_field_mul:
  130|   215k|{
  131|   215k|    int ret = 0;
  132|   215k|    BN_CTX *ctx_new = NULL;
  133|       |
  134|   215k|    if (!group || !r || !a || !b) {
  ------------------
  |  Branch (134:9): [True: 0, False: 215k]
  |  Branch (134:19): [True: 0, False: 215k]
  |  Branch (134:25): [True: 0, False: 215k]
  |  Branch (134:31): [True: 0, False: 215k]
  ------------------
  135|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  136|      0|        goto err;
  137|      0|    }
  138|   215k|    if (!ctx)
  ------------------
  |  Branch (138:9): [True: 0, False: 215k]
  ------------------
  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|   215k|    if (!BN_mul(r, a, b, ctx))
  ------------------
  |  Branch (142:9): [True: 0, False: 215k]
  ------------------
  143|      0|        goto err;
  144|   215k|    if (!group->field_mod_func(r, r, group->field, ctx))
  ------------------
  |  Branch (144:9): [True: 0, False: 215k]
  ------------------
  145|      0|        goto err;
  146|       |
  147|   215k|    ret = 1;
  148|   215k|err:
  149|   215k|    BN_CTX_free(ctx_new);
  150|   215k|    return ret;
  151|   215k|}
ossl_ec_GFp_nist_field_sqr:
  155|   430k|{
  156|   430k|    int ret = 0;
  157|   430k|    BN_CTX *ctx_new = NULL;
  158|       |
  159|   430k|    if (!group || !r || !a) {
  ------------------
  |  Branch (159:9): [True: 0, False: 430k]
  |  Branch (159:19): [True: 0, False: 430k]
  |  Branch (159:25): [True: 0, False: 430k]
  ------------------
  160|      0|        ERR_raise(ERR_LIB_EC, EC_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|        goto err;
  162|      0|    }
  163|   430k|    if (!ctx)
  ------------------
  |  Branch (163:9): [True: 0, False: 430k]
  ------------------
  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|   430k|    if (!BN_sqr(r, a, ctx))
  ------------------
  |  Branch (167:9): [True: 0, False: 430k]
  ------------------
  168|      0|        goto err;
  169|   430k|    if (!group->field_mod_func(r, r, group->field, ctx))
  ------------------
  |  Branch (169:9): [True: 0, False: 430k]
  ------------------
  170|      0|        goto err;
  171|       |
  172|   430k|    ret = 1;
  173|   430k|err:
  174|   430k|    BN_CTX_free(ctx_new);
  175|   430k|    return ret;
  176|   430k|}

ossl_ec_GFp_nistp384_method:
 1496|   107k|{
 1497|   107k|    static const EC_METHOD ret = {
 1498|   107k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|   107k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1499|   107k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|   107k|#define NID_X9_62_prime_field           406
  ------------------
 1500|   107k|        ossl_ec_GFp_nistp384_group_init,
 1501|   107k|        ossl_ec_GFp_simple_group_finish,
 1502|   107k|        ossl_ec_GFp_simple_group_clear_finish,
 1503|   107k|        ossl_ec_GFp_nist_group_copy,
 1504|   107k|        ossl_ec_GFp_nistp384_group_set_curve,
 1505|   107k|        ossl_ec_GFp_simple_group_get_curve,
 1506|   107k|        ossl_ec_GFp_simple_group_get_degree,
 1507|   107k|        ossl_ec_group_simple_order_bits,
 1508|   107k|        ossl_ec_GFp_simple_group_check_discriminant,
 1509|   107k|        ossl_ec_GFp_simple_point_init,
 1510|   107k|        ossl_ec_GFp_simple_point_finish,
 1511|   107k|        ossl_ec_GFp_simple_point_clear_finish,
 1512|   107k|        ossl_ec_GFp_simple_point_copy,
 1513|   107k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1514|   107k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1515|   107k|        ossl_ec_GFp_nistp384_point_get_affine_coordinates,
 1516|   107k|        0, /* point_set_compressed_coordinates */
 1517|   107k|        0, /* point2oct */
 1518|   107k|        0, /* oct2point */
 1519|   107k|        ossl_ec_GFp_simple_add,
 1520|   107k|        ossl_ec_GFp_simple_dbl,
 1521|   107k|        ossl_ec_GFp_simple_invert,
 1522|   107k|        ossl_ec_GFp_simple_is_at_infinity,
 1523|   107k|        ossl_ec_GFp_simple_is_on_curve,
 1524|   107k|        ossl_ec_GFp_simple_cmp,
 1525|   107k|        ossl_ec_GFp_simple_make_affine,
 1526|   107k|        ossl_ec_GFp_simple_points_make_affine,
 1527|   107k|        ossl_ec_GFp_nistp384_points_mul,
 1528|   107k|        ossl_ec_GFp_nistp384_precompute_mult,
 1529|   107k|        ossl_ec_GFp_nistp384_have_precompute_mult,
 1530|   107k|        ossl_ec_GFp_nist_field_mul,
 1531|   107k|        ossl_ec_GFp_nist_field_sqr,
 1532|   107k|        0, /* field_div */
 1533|   107k|        ossl_ec_GFp_simple_field_inv,
 1534|   107k|        0, /* field_encode */
 1535|   107k|        0, /* field_decode */
 1536|   107k|        0, /* field_set_to_one */
 1537|   107k|        ossl_ec_key_simple_priv2oct,
 1538|   107k|        ossl_ec_key_simple_oct2priv,
 1539|   107k|        0, /* set private */
 1540|   107k|        ossl_ec_key_simple_generate_key,
 1541|   107k|        ossl_ec_key_simple_check_key,
 1542|   107k|        ossl_ec_key_simple_generate_public_key,
 1543|   107k|        0, /* keycopy */
 1544|   107k|        0, /* keyfinish */
 1545|   107k|        ossl_ecdh_simple_compute_key,
 1546|   107k|        ossl_ecdsa_simple_sign_setup,
 1547|   107k|        ossl_ecdsa_simple_sign_sig,
 1548|   107k|        ossl_ecdsa_simple_verify_sig,
 1549|   107k|        0, /* field_inverse_mod_ord */
 1550|   107k|        0, /* blind_coordinates */
 1551|   107k|        0, /* ladder_pre */
 1552|   107k|        0, /* ladder_step */
 1553|   107k|        0 /* ladder_post */
 1554|   107k|    };
 1555|       |
 1556|   107k|    return &ret;
 1557|   107k|}
ossl_ec_GFp_nistp384_group_init:
 1610|   215k|{
 1611|   215k|    int ret;
 1612|       |
 1613|   215k|    ret = ossl_ec_GFp_simple_group_init(group);
 1614|   215k|    group->a_is_minus3 = 1;
 1615|   215k|    return ret;
 1616|   215k|}
ossl_ec_GFp_nistp384_group_set_curve:
 1621|   107k|{
 1622|   107k|    int ret = 0;
 1623|   107k|    BIGNUM *curve_p, *curve_a, *curve_b;
 1624|   107k|#ifndef FIPS_MODULE
 1625|   107k|    BN_CTX *new_ctx = NULL;
 1626|       |
 1627|   107k|    if (ctx == NULL)
  ------------------
  |  Branch (1627:9): [True: 0, False: 107k]
  ------------------
 1628|      0|        ctx = new_ctx = BN_CTX_new();
 1629|   107k|#endif
 1630|   107k|    if (ctx == NULL)
  ------------------
  |  Branch (1630:9): [True: 0, False: 107k]
  ------------------
 1631|      0|        return 0;
 1632|       |
 1633|   107k|    BN_CTX_start(ctx);
 1634|   107k|    curve_p = BN_CTX_get(ctx);
 1635|   107k|    curve_a = BN_CTX_get(ctx);
 1636|   107k|    curve_b = BN_CTX_get(ctx);
 1637|   107k|    if (curve_b == NULL)
  ------------------
  |  Branch (1637:9): [True: 0, False: 107k]
  ------------------
 1638|      0|        goto err;
 1639|   107k|    BN_bin2bn(nistp384_curve_params[0], sizeof(felem_bytearray), curve_p);
 1640|   107k|    BN_bin2bn(nistp384_curve_params[1], sizeof(felem_bytearray), curve_a);
 1641|   107k|    BN_bin2bn(nistp384_curve_params[2], sizeof(felem_bytearray), curve_b);
 1642|   107k|    if ((BN_cmp(curve_p, p)) || (BN_cmp(curve_a, a)) || (BN_cmp(curve_b, b))) {
  ------------------
  |  Branch (1642:9): [True: 0, False: 107k]
  |  Branch (1642:33): [True: 0, False: 107k]
  |  Branch (1642:57): [True: 0, False: 107k]
  ------------------
 1643|      0|        ERR_raise(ERR_LIB_EC, EC_R_WRONG_CURVE_PARAMETERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1644|      0|        goto err;
 1645|      0|    }
 1646|   107k|    group->field_mod_func = BN_nist_mod_384;
 1647|   107k|    ret = ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx);
 1648|   107k|err:
 1649|   107k|    BN_CTX_end(ctx);
 1650|   107k|#ifndef FIPS_MODULE
 1651|   107k|    BN_CTX_free(new_ctx);
 1652|   107k|#endif
 1653|   107k|    return ret;
 1654|   107k|}
ossl_ec_GFp_nistp384_point_get_affine_coordinates:
 1664|     92|{
 1665|     92|    felem z1, z2, x_in, y_in, x_out, y_out;
 1666|     92|    widefelem tmp;
 1667|       |
 1668|     92|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (1668:9): [True: 0, False: 92]
  ------------------
 1669|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1670|      0|        return 0;
 1671|      0|    }
 1672|     92|    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: 92]
  |  Branch (1672:43): [True: 0, False: 92]
  |  Branch (1672:77): [True: 0, False: 92]
  ------------------
 1673|      0|        return 0;
 1674|     92|    felem_inv(z2, z1);
 1675|     92|    felem_square(tmp, z2);
  ------------------
  |  |  767|     92|#define felem_square felem_square_ref
  ------------------
 1676|     92|    felem_reduce(z1, tmp);
  ------------------
  |  |  769|     92|#define felem_reduce felem_reduce_ref
  ------------------
 1677|     92|    felem_mul(tmp, x_in, z1);
  ------------------
  |  |  768|     92|#define felem_mul felem_mul_ref
  ------------------
 1678|     92|    felem_reduce(x_in, tmp);
  ------------------
  |  |  769|     92|#define felem_reduce felem_reduce_ref
  ------------------
 1679|     92|    felem_contract(x_out, x_in);
 1680|     92|    if (x != NULL) {
  ------------------
  |  Branch (1680:9): [True: 92, False: 0]
  ------------------
 1681|     92|        if (!felem_to_BN(x, x_out)) {
  ------------------
  |  Branch (1681:13): [True: 0, False: 92]
  ------------------
 1682|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1683|      0|            return 0;
 1684|      0|        }
 1685|     92|    }
 1686|     92|    felem_mul(tmp, z1, z2);
  ------------------
  |  |  768|     92|#define felem_mul felem_mul_ref
  ------------------
 1687|     92|    felem_reduce(z1, tmp);
  ------------------
  |  |  769|     92|#define felem_reduce felem_reduce_ref
  ------------------
 1688|     92|    felem_mul(tmp, y_in, z1);
  ------------------
  |  |  768|     92|#define felem_mul felem_mul_ref
  ------------------
 1689|     92|    felem_reduce(y_in, tmp);
  ------------------
  |  |  769|     92|#define felem_reduce felem_reduce_ref
  ------------------
 1690|     92|    felem_contract(y_out, y_in);
 1691|     92|    if (y != NULL) {
  ------------------
  |  Branch (1691:9): [True: 92, False: 0]
  ------------------
 1692|     92|        if (!felem_to_BN(y, y_out)) {
  ------------------
  |  Branch (1692:13): [True: 0, False: 92]
  ------------------
 1693|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1694|      0|            return 0;
 1695|      0|        }
 1696|     92|    }
 1697|     92|    return 1;
 1698|     92|}
ossl_ec_GFp_nistp384_points_mul:
 1734|     92|{
 1735|     92|    int ret = 0;
 1736|     92|    int j;
 1737|     92|    int mixed = 0;
 1738|     92|    BIGNUM *x, *y, *z, *tmp_scalar;
 1739|     92|    felem_bytearray g_secret;
 1740|     92|    felem_bytearray *secrets = NULL;
 1741|     92|    felem(*pre_comp)[17][3] = NULL;
 1742|     92|    felem *tmp_felems = NULL;
 1743|     92|    unsigned int i;
 1744|     92|    int num_bytes;
 1745|     92|    int have_pre_comp = 0;
 1746|     92|    size_t num_points = num;
 1747|     92|    felem x_in, y_in, z_in, x_out, y_out, z_out;
 1748|     92|    NISTP384_PRE_COMP *pre = NULL;
 1749|     92|    felem(*g_pre_comp)[3] = NULL;
 1750|     92|    EC_POINT *generator = NULL;
 1751|     92|    const EC_POINT *p = NULL;
 1752|     92|    const BIGNUM *p_scalar = NULL;
 1753|       |
 1754|     92|    BN_CTX_start(ctx);
 1755|     92|    x = BN_CTX_get(ctx);
 1756|     92|    y = BN_CTX_get(ctx);
 1757|     92|    z = BN_CTX_get(ctx);
 1758|     92|    tmp_scalar = BN_CTX_get(ctx);
 1759|     92|    if (tmp_scalar == NULL)
  ------------------
  |  Branch (1759:9): [True: 0, False: 92]
  ------------------
 1760|      0|        goto err;
 1761|       |
 1762|     92|    if (scalar != NULL) {
  ------------------
  |  Branch (1762:9): [True: 92, False: 0]
  ------------------
 1763|     92|        pre = group->pre_comp.nistp384;
 1764|     92|        if (pre)
  ------------------
  |  Branch (1764:13): [True: 0, False: 92]
  ------------------
 1765|       |            /* we have precomputation, try to use it */
 1766|      0|            g_pre_comp = &pre->g_pre_comp[0];
 1767|     92|        else
 1768|       |            /* try to use the standard precomputation */
 1769|     92|            g_pre_comp = (felem(*)[3])gmul;
 1770|     92|        generator = EC_POINT_new(group);
 1771|     92|        if (generator == NULL)
  ------------------
  |  Branch (1771:13): [True: 0, False: 92]
  ------------------
 1772|      0|            goto err;
 1773|       |        /* get the generator from precomputation */
 1774|     92|        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: 92]
  |  Branch (1774:50): [True: 0, False: 92]
  |  Branch (1774:87): [True: 0, False: 92]
  ------------------
 1775|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1776|      0|            goto err;
 1777|      0|        }
 1778|     92|        if (!ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group,
  ------------------
  |  Branch (1778:13): [True: 0, False: 92]
  ------------------
 1779|     92|                generator,
 1780|     92|                x, y, z, ctx))
 1781|      0|            goto err;
 1782|     92|        if (0 == EC_POINT_cmp(group, generator, group->generator, ctx))
  ------------------
  |  Branch (1782:13): [True: 92, False: 0]
  ------------------
 1783|       |            /* precomputation matches generator */
 1784|     92|            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|     92|    }
 1792|       |
 1793|     92|    if (num_points > 0) {
  ------------------
  |  Branch (1793:9): [True: 0, False: 92]
  ------------------
 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));
  ------------------
  |  |  112|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1802|      0|        pre_comp = OPENSSL_calloc(num_points, sizeof(*pre_comp));
  ------------------
  |  |  112|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|     92|    if (scalar != NULL && have_pre_comp) {
  ------------------
  |  Branch (1871:9): [True: 92, False: 0]
  |  Branch (1871:27): [True: 92, False: 0]
  ------------------
 1872|     92|        memset(g_secret, 0, sizeof(g_secret));
 1873|       |        /* reduce scalar to 0 <= scalar < 2^384 */
 1874|     92|        if ((BN_num_bits(scalar) > 384) || (BN_is_negative(scalar))) {
  ------------------
  |  Branch (1874:13): [True: 0, False: 92]
  |  Branch (1874:44): [True: 0, False: 92]
  ------------------
 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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1881|      0|                goto err;
 1882|      0|            }
 1883|      0|            num_bytes = BN_bn2lebinpad(tmp_scalar, g_secret, sizeof(g_secret));
 1884|     92|        } else {
 1885|     92|            num_bytes = BN_bn2lebinpad(scalar, g_secret, sizeof(g_secret));
 1886|     92|        }
 1887|       |        /* do the multiplication with generator precomputation */
 1888|     92|        batch_mul(x_out, y_out, z_out,
 1889|     92|            (const felem_bytearray(*))secrets, num_points,
 1890|     92|            g_secret,
 1891|     92|            mixed, (const felem(*)[17][3])pre_comp,
 1892|     92|            (const felem(*)[3])g_pre_comp);
 1893|     92|    } 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|     92|    felem_contract(x_in, x_out);
 1901|     92|    felem_contract(y_in, y_out);
 1902|     92|    felem_contract(z_in, z_out);
 1903|     92|    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: 92]
  |  Branch (1903:36): [True: 0, False: 92]
  |  Branch (1903:63): [True: 0, False: 92]
  ------------------
 1904|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1905|      0|        goto err;
 1906|      0|    }
 1907|     92|    ret = ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group, r, x, y, z,
 1908|     92|        ctx);
 1909|       |
 1910|     92|err:
 1911|     92|    BN_CTX_end(ctx);
 1912|     92|    EC_POINT_free(generator);
 1913|     92|    OPENSSL_free(secrets);
  ------------------
  |  |  131|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1914|     92|    OPENSSL_free(pre_comp);
  ------------------
  |  |  131|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1915|     92|    OPENSSL_free(tmp_felems);
  ------------------
  |  |  131|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1916|     92|    return ret;
 1917|     92|}
ecp_nistp384.c:BN_to_felem:
  142|    276|{
  143|    276|    felem_bytearray b_out;
  144|    276|    int num_bytes;
  145|       |
  146|    276|    if (BN_is_negative(bn)) {
  ------------------
  |  Branch (146:9): [True: 0, False: 276]
  ------------------
  147|      0|        ERR_raise(ERR_LIB_EC, EC_R_BIGNUM_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  148|      0|        return 0;
  149|      0|    }
  150|    276|    num_bytes = BN_bn2lebinpad(bn, b_out, sizeof(b_out));
  151|    276|    if (num_bytes < 0) {
  ------------------
  |  Branch (151:9): [True: 0, False: 276]
  ------------------
  152|      0|        ERR_raise(ERR_LIB_EC, EC_R_BIGNUM_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  153|      0|        return 0;
  154|      0|    }
  155|    276|    bin48_to_felem(out, b_out);
  156|    276|    return 1;
  157|    276|}
ecp_nistp384.c:bin48_to_felem:
  117|    276|{
  118|    276|    memset(out, 0, 56);
  119|    276|    out[0] = (*((limb *)&in[0])) & bottom56bits;
  120|    276|    out[1] = (*((limb_aX *)&in[7])) & bottom56bits;
  121|    276|    out[2] = (*((limb_aX *)&in[14])) & bottom56bits;
  122|    276|    out[3] = (*((limb_aX *)&in[21])) & bottom56bits;
  123|    276|    out[4] = (*((limb_aX *)&in[28])) & bottom56bits;
  124|    276|    out[5] = (*((limb_aX *)&in[35])) & bottom56bits;
  125|    276|    memmove(&out[6], &in[42], 6);
  126|    276|}
ecp_nistp384.c:felem_inv:
  784|     92|{
  785|     92|    felem ftmp, ftmp2, ftmp3, ftmp4, ftmp5, ftmp6;
  786|     92|    unsigned int i = 0;
  787|       |
  788|     92|    felem_square_reduce(ftmp, in); /* 2^1 */
  ------------------
  |  |  771|     92|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  789|     92|    felem_mul_reduce(ftmp, ftmp, in); /* 2^1 + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  790|     92|    felem_assign(ftmp2, ftmp);
  791|       |
  792|     92|    felem_square_reduce(ftmp, ftmp); /* 2^2 + 2^1 */
  ------------------
  |  |  771|     92|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  793|     92|    felem_mul_reduce(ftmp, ftmp, in); /* 2^2 + 2^1 * 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  794|     92|    felem_assign(ftmp3, ftmp);
  795|       |
  796|    368|    for (i = 0; i < 3; i++)
  ------------------
  |  Branch (796:17): [True: 276, False: 92]
  ------------------
  797|    276|        felem_square_reduce(ftmp, ftmp); /* 2^5 + 2^4 + 2^3 */
  ------------------
  |  |  771|    276|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  798|     92|    felem_mul_reduce(ftmp, ftmp3, ftmp); /* 2^5 + 2^4 + 2^3 + 2^2 + 2^1 + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  799|     92|    felem_assign(ftmp4, ftmp);
  800|       |
  801|    644|    for (i = 0; i < 6; i++)
  ------------------
  |  Branch (801:17): [True: 552, False: 92]
  ------------------
  802|    552|        felem_square_reduce(ftmp, ftmp); /* 2^11 + ... + 2^6 */
  ------------------
  |  |  771|    552|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  803|     92|    felem_mul_reduce(ftmp, ftmp4, ftmp); /* 2^11 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  804|       |
  805|    368|    for (i = 0; i < 3; i++)
  ------------------
  |  Branch (805:17): [True: 276, False: 92]
  ------------------
  806|    276|        felem_square_reduce(ftmp, ftmp); /* 2^14 + ... + 2^3 */
  ------------------
  |  |  771|    276|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  807|     92|    felem_mul_reduce(ftmp, ftmp3, ftmp); /* 2^14 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  808|     92|    felem_assign(ftmp5, ftmp);
  809|       |
  810|  1.47k|    for (i = 0; i < 15; i++)
  ------------------
  |  Branch (810:17): [True: 1.38k, False: 92]
  ------------------
  811|  1.38k|        felem_square_reduce(ftmp, ftmp); /* 2^29 + ... + 2^15 */
  ------------------
  |  |  771|  1.38k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  812|     92|    felem_mul_reduce(ftmp, ftmp5, ftmp); /* 2^29 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  813|     92|    felem_assign(ftmp6, ftmp);
  814|       |
  815|  2.85k|    for (i = 0; i < 30; i++)
  ------------------
  |  Branch (815:17): [True: 2.76k, False: 92]
  ------------------
  816|  2.76k|        felem_square_reduce(ftmp, ftmp); /* 2^59 + ... + 2^30 */
  ------------------
  |  |  771|  2.76k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  817|     92|    felem_mul_reduce(ftmp, ftmp6, ftmp); /* 2^59 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  818|     92|    felem_assign(ftmp4, ftmp);
  819|       |
  820|  5.61k|    for (i = 0; i < 60; i++)
  ------------------
  |  Branch (820:17): [True: 5.52k, False: 92]
  ------------------
  821|  5.52k|        felem_square_reduce(ftmp, ftmp); /* 2^119 + ... + 2^60 */
  ------------------
  |  |  771|  5.52k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  822|     92|    felem_mul_reduce(ftmp, ftmp4, ftmp); /* 2^119 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  823|     92|    felem_assign(ftmp4, ftmp);
  824|       |
  825|  11.1k|    for (i = 0; i < 120; i++)
  ------------------
  |  Branch (825:17): [True: 11.0k, False: 92]
  ------------------
  826|  11.0k|        felem_square_reduce(ftmp, ftmp); /* 2^239 + ... + 2^120 */
  ------------------
  |  |  771|  11.0k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  827|     92|    felem_mul_reduce(ftmp, ftmp4, ftmp); /* 2^239 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  828|       |
  829|  1.47k|    for (i = 0; i < 15; i++)
  ------------------
  |  Branch (829:17): [True: 1.38k, False: 92]
  ------------------
  830|  1.38k|        felem_square_reduce(ftmp, ftmp); /* 2^254 + ... + 2^15 */
  ------------------
  |  |  771|  1.38k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  831|     92|    felem_mul_reduce(ftmp, ftmp5, ftmp); /* 2^254 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  832|       |
  833|  2.94k|    for (i = 0; i < 31; i++)
  ------------------
  |  Branch (833:17): [True: 2.85k, False: 92]
  ------------------
  834|  2.85k|        felem_square_reduce(ftmp, ftmp); /* 2^285 + ... + 2^31 */
  ------------------
  |  |  771|  2.85k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  835|     92|    felem_mul_reduce(ftmp, ftmp6, ftmp); /* 2^285 + ... + 2^31 + 2^29 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  836|       |
  837|    276|    for (i = 0; i < 2; i++)
  ------------------
  |  Branch (837:17): [True: 184, False: 92]
  ------------------
  838|    184|        felem_square_reduce(ftmp, ftmp); /* 2^287 + ... + 2^33 + 2^31 + ... + 2^2 */
  ------------------
  |  |  771|    184|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  839|     92|    felem_mul_reduce(ftmp, ftmp2, ftmp); /* 2^287 + ... + 2^33 + 2^31 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  840|       |
  841|  8.74k|    for (i = 0; i < 94; i++)
  ------------------
  |  Branch (841:17): [True: 8.64k, False: 92]
  ------------------
  842|  8.64k|        felem_square_reduce(ftmp, ftmp); /* 2^381 + ... + 2^127 + 2^125 + ... + 2^94 */
  ------------------
  |  |  771|  8.64k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  843|     92|    felem_mul_reduce(ftmp, ftmp6, ftmp); /* 2^381 + ... + 2^127 + 2^125 + ... + 2^94 + 2^29 + ... + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  844|       |
  845|    276|    for (i = 0; i < 2; i++)
  ------------------
  |  Branch (845:17): [True: 184, False: 92]
  ------------------
  846|    184|        felem_square_reduce(ftmp, ftmp); /* 2^383 + ... + 2^129 + 2^127 + ... + 2^96 + 2^31 + ... + 2^2 */
  ------------------
  |  |  771|    184|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  847|     92|    felem_mul_reduce(ftmp, in, ftmp); /* 2^383 + ... + 2^129 + 2^127 + ... + 2^96 + 2^31 + ... + 2^2 + 2^0 */
  ------------------
  |  |  772|     92|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  848|       |
  849|     92|    memcpy(out, ftmp, sizeof(felem));
  850|     92|}
ecp_nistp384.c:felem_square_reduce_ref:
  688|  71.3k|{
  689|  71.3k|    widefelem tmp;
  690|       |
  691|  71.3k|    felem_square_ref(tmp, in);
  692|  71.3k|    felem_reduce_ref(out, tmp);
  693|  71.3k|}
ecp_nistp384.c:felem_mul_reduce_ref:
  696|  55.3k|{
  697|  55.3k|    widefelem tmp;
  698|       |
  699|  55.3k|    felem_mul_ref(tmp, in1, in2);
  700|  55.3k|    felem_reduce_ref(out, tmp);
  701|  55.3k|}
ecp_nistp384.c:felem_assign:
  180|   100k|{
  181|   100k|    memcpy(out, in, sizeof(felem));
  182|   100k|}
ecp_nistp384.c:felem_square_ref:
  385|   107k|{
  386|   107k|    felem inx2;
  387|   107k|    felem_scalar(inx2, in, 2);
  388|       |
  389|   107k|    out[0] = ((uint128_t)in[0]) * in[0];
  390|       |
  391|   107k|    out[1] = ((uint128_t)in[0]) * inx2[1];
  392|       |
  393|   107k|    out[2] = ((uint128_t)in[0]) * inx2[2]
  394|   107k|        + ((uint128_t)in[1]) * in[1];
  395|       |
  396|   107k|    out[3] = ((uint128_t)in[0]) * inx2[3]
  397|   107k|        + ((uint128_t)in[1]) * inx2[2];
  398|       |
  399|   107k|    out[4] = ((uint128_t)in[0]) * inx2[4]
  400|   107k|        + ((uint128_t)in[1]) * inx2[3]
  401|   107k|        + ((uint128_t)in[2]) * in[2];
  402|       |
  403|   107k|    out[5] = ((uint128_t)in[0]) * inx2[5]
  404|   107k|        + ((uint128_t)in[1]) * inx2[4]
  405|   107k|        + ((uint128_t)in[2]) * inx2[3];
  406|       |
  407|   107k|    out[6] = ((uint128_t)in[0]) * inx2[6]
  408|   107k|        + ((uint128_t)in[1]) * inx2[5]
  409|   107k|        + ((uint128_t)in[2]) * inx2[4]
  410|   107k|        + ((uint128_t)in[3]) * in[3];
  411|       |
  412|   107k|    out[7] = ((uint128_t)in[1]) * inx2[6]
  413|   107k|        + ((uint128_t)in[2]) * inx2[5]
  414|   107k|        + ((uint128_t)in[3]) * inx2[4];
  415|       |
  416|   107k|    out[8] = ((uint128_t)in[2]) * inx2[6]
  417|   107k|        + ((uint128_t)in[3]) * inx2[5]
  418|   107k|        + ((uint128_t)in[4]) * in[4];
  419|       |
  420|   107k|    out[9] = ((uint128_t)in[3]) * inx2[6]
  421|   107k|        + ((uint128_t)in[4]) * inx2[5];
  422|       |
  423|   107k|    out[10] = ((uint128_t)in[4]) * inx2[6]
  424|   107k|        + ((uint128_t)in[5]) * in[5];
  425|       |
  426|   107k|    out[11] = ((uint128_t)in[5]) * inx2[6];
  427|       |
  428|   107k|    out[12] = ((uint128_t)in[6]) * in[6];
  429|   107k|}
ecp_nistp384.c:felem_scalar:
  195|   116k|{
  196|   116k|    unsigned int i;
  197|       |
  198|   931k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|   931k|#define NLIMBS 7
  ------------------
  |  Branch (198:17): [True: 815k, False: 116k]
  ------------------
  199|   815k|        out[i] = in[i] * scalar;
  200|   116k|}
ecp_nistp384.c:felem_reduce_ref:
  518|   190k|{
  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|   190k|    static const widelimb two124m68 = (((widelimb)1) << 124)
  525|   190k|        - (((widelimb)1) << 68);
  526|   190k|    static const widelimb two124m116m68 = (((widelimb)1) << 124)
  527|   190k|        - (((widelimb)1) << 116)
  528|   190k|        - (((widelimb)1) << 68);
  529|   190k|    static const widelimb two124p108m76 = (((widelimb)1) << 124)
  530|   190k|        + (((widelimb)1) << 108)
  531|   190k|        - (((widelimb)1) << 76);
  532|   190k|    static const widelimb two124m92m68 = (((widelimb)1) << 124)
  533|   190k|        - (((widelimb)1) << 92)
  534|   190k|        - (((widelimb)1) << 68);
  535|   190k|    widelimb temp, acc[9];
  536|   190k|    unsigned int i;
  537|       |
  538|   190k|    memcpy(acc, in, sizeof(widelimb) * 9);
  539|       |
  540|   190k|    acc[0] += two124p108m76;
  541|   190k|    acc[1] += two124m116m68;
  542|   190k|    acc[2] += two124m92m68;
  543|   190k|    acc[3] += two124m68;
  544|   190k|    acc[4] += two124m68;
  545|   190k|    acc[5] += two124m68;
  546|   190k|    acc[6] += two124m68;
  547|       |
  548|       |    /* [1]: Eliminate in[9], ..., in[12] */
  549|   190k|    acc[8] += in[12] >> 32;
  550|   190k|    acc[7] += (in[12] & 0xffffffff) << 24;
  551|   190k|    acc[7] += in[12] >> 8;
  552|   190k|    acc[6] += (in[12] & 0xff) << 48;
  553|   190k|    acc[6] -= in[12] >> 16;
  554|   190k|    acc[5] -= (in[12] & 0xffff) << 40;
  555|   190k|    acc[6] += in[12] >> 48;
  556|   190k|    acc[5] += (in[12] & 0xffffffffffff) << 8;
  557|       |
  558|   190k|    acc[7] += in[11] >> 32;
  559|   190k|    acc[6] += (in[11] & 0xffffffff) << 24;
  560|   190k|    acc[6] += in[11] >> 8;
  561|   190k|    acc[5] += (in[11] & 0xff) << 48;
  562|   190k|    acc[5] -= in[11] >> 16;
  563|   190k|    acc[4] -= (in[11] & 0xffff) << 40;
  564|   190k|    acc[5] += in[11] >> 48;
  565|   190k|    acc[4] += (in[11] & 0xffffffffffff) << 8;
  566|       |
  567|   190k|    acc[6] += in[10] >> 32;
  568|   190k|    acc[5] += (in[10] & 0xffffffff) << 24;
  569|   190k|    acc[5] += in[10] >> 8;
  570|   190k|    acc[4] += (in[10] & 0xff) << 48;
  571|   190k|    acc[4] -= in[10] >> 16;
  572|   190k|    acc[3] -= (in[10] & 0xffff) << 40;
  573|   190k|    acc[4] += in[10] >> 48;
  574|   190k|    acc[3] += (in[10] & 0xffffffffffff) << 8;
  575|       |
  576|   190k|    acc[5] += in[9] >> 32;
  577|   190k|    acc[4] += (in[9] & 0xffffffff) << 24;
  578|   190k|    acc[4] += in[9] >> 8;
  579|   190k|    acc[3] += (in[9] & 0xff) << 48;
  580|   190k|    acc[3] -= in[9] >> 16;
  581|   190k|    acc[2] -= (in[9] & 0xffff) << 40;
  582|   190k|    acc[3] += in[9] >> 48;
  583|   190k|    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|   190k|    acc[4] += acc[8] >> 32;
  592|   190k|    acc[3] += (acc[8] & 0xffffffff) << 24;
  593|   190k|    acc[3] += acc[8] >> 8;
  594|   190k|    acc[2] += (acc[8] & 0xff) << 48;
  595|   190k|    acc[2] -= acc[8] >> 16;
  596|   190k|    acc[1] -= (acc[8] & 0xffff) << 40;
  597|   190k|    acc[2] += acc[8] >> 48;
  598|   190k|    acc[1] += (acc[8] & 0xffffffffffff) << 8;
  599|       |
  600|   190k|    acc[3] += acc[7] >> 32;
  601|   190k|    acc[2] += (acc[7] & 0xffffffff) << 24;
  602|   190k|    acc[2] += acc[7] >> 8;
  603|   190k|    acc[1] += (acc[7] & 0xff) << 48;
  604|   190k|    acc[1] -= acc[7] >> 16;
  605|   190k|    acc[0] -= (acc[7] & 0xffff) << 40;
  606|   190k|    acc[1] += acc[7] >> 48;
  607|   190k|    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|   190k|    acc[5] += acc[4] >> 56;
  621|   190k|    acc[4] &= 0x00ffffffffffffff;
  622|       |
  623|   190k|    acc[6] += acc[5] >> 56;
  624|   190k|    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|   190k|    temp = acc[6] >> 48;
  634|   190k|    acc[6] &= 0x0000ffffffffffff;
  635|       |
  636|       |    /* temp < 2^80 */
  637|       |
  638|   190k|    acc[3] += temp >> 40;
  639|   190k|    acc[2] += (temp & 0xffffffffff) << 16;
  640|   190k|    acc[2] += temp >> 16;
  641|   190k|    acc[1] += (temp & 0xffff) << 40;
  642|   190k|    acc[1] -= temp >> 24;
  643|   190k|    acc[0] -= (temp & 0xffffff) << 32;
  644|   190k|    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|   190k|    acc[1] += acc[0] >> 56; /* acc[1] < acc_old[1] + 2^72 */
  653|   190k|    acc[0] &= 0x00ffffffffffffff;
  654|       |
  655|   190k|    acc[2] += acc[1] >> 56; /* acc[2] < acc_old[2] + 2^72 + 2^16 */
  656|   190k|    acc[1] &= 0x00ffffffffffffff;
  657|       |
  658|   190k|    acc[3] += acc[2] >> 56; /* acc[3] < acc_old[3] + 2^72 + 2^16 */
  659|   190k|    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|   190k|    acc[4] += acc[3] >> 56; /*-
  669|       |                             * acc[4] < acc_old[4] + 2^72 + 2^16
  670|       |                             *        < 2^72 + 2^56 + 2^16
  671|       |                             */
  672|   190k|    acc[3] &= 0x00ffffffffffffff;
  673|       |
  674|   190k|    acc[5] += acc[4] >> 56; /*-
  675|       |                             * acc[5] < acc_old[5] + 2^16 + 1
  676|       |                             *        < 2^56 + 2^16 + 1
  677|       |                             */
  678|   190k|    acc[4] &= 0x00ffffffffffffff;
  679|       |
  680|   190k|    acc[6] += acc[5] >> 56; /* acc[6] < 2^48 + 1 <= 2^48 */
  681|   190k|    acc[5] &= 0x00ffffffffffffff;
  682|       |
  683|  1.52M|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|  1.52M|#define NLIMBS 7
  ------------------
  |  Branch (683:17): [True: 1.33M, False: 190k]
  ------------------
  684|  1.33M|        out[i] = acc[i];
  685|   190k|}
ecp_nistp384.c:felem_mul_ref:
  432|   100k|{
  433|   100k|    out[0] = ((uint128_t)in1[0]) * in2[0];
  434|       |
  435|   100k|    out[1] = ((uint128_t)in1[0]) * in2[1]
  436|   100k|        + ((uint128_t)in1[1]) * in2[0];
  437|       |
  438|   100k|    out[2] = ((uint128_t)in1[0]) * in2[2]
  439|   100k|        + ((uint128_t)in1[1]) * in2[1]
  440|   100k|        + ((uint128_t)in1[2]) * in2[0];
  441|       |
  442|   100k|    out[3] = ((uint128_t)in1[0]) * in2[3]
  443|   100k|        + ((uint128_t)in1[1]) * in2[2]
  444|   100k|        + ((uint128_t)in1[2]) * in2[1]
  445|   100k|        + ((uint128_t)in1[3]) * in2[0];
  446|       |
  447|   100k|    out[4] = ((uint128_t)in1[0]) * in2[4]
  448|   100k|        + ((uint128_t)in1[1]) * in2[3]
  449|   100k|        + ((uint128_t)in1[2]) * in2[2]
  450|   100k|        + ((uint128_t)in1[3]) * in2[1]
  451|   100k|        + ((uint128_t)in1[4]) * in2[0];
  452|       |
  453|   100k|    out[5] = ((uint128_t)in1[0]) * in2[5]
  454|   100k|        + ((uint128_t)in1[1]) * in2[4]
  455|   100k|        + ((uint128_t)in1[2]) * in2[3]
  456|   100k|        + ((uint128_t)in1[3]) * in2[2]
  457|   100k|        + ((uint128_t)in1[4]) * in2[1]
  458|   100k|        + ((uint128_t)in1[5]) * in2[0];
  459|       |
  460|   100k|    out[6] = ((uint128_t)in1[0]) * in2[6]
  461|   100k|        + ((uint128_t)in1[1]) * in2[5]
  462|   100k|        + ((uint128_t)in1[2]) * in2[4]
  463|   100k|        + ((uint128_t)in1[3]) * in2[3]
  464|   100k|        + ((uint128_t)in1[4]) * in2[2]
  465|   100k|        + ((uint128_t)in1[5]) * in2[1]
  466|   100k|        + ((uint128_t)in1[6]) * in2[0];
  467|       |
  468|   100k|    out[7] = ((uint128_t)in1[1]) * in2[6]
  469|   100k|        + ((uint128_t)in1[2]) * in2[5]
  470|   100k|        + ((uint128_t)in1[3]) * in2[4]
  471|   100k|        + ((uint128_t)in1[4]) * in2[3]
  472|   100k|        + ((uint128_t)in1[5]) * in2[2]
  473|   100k|        + ((uint128_t)in1[6]) * in2[1];
  474|       |
  475|   100k|    out[8] = ((uint128_t)in1[2]) * in2[6]
  476|   100k|        + ((uint128_t)in1[3]) * in2[5]
  477|   100k|        + ((uint128_t)in1[4]) * in2[4]
  478|   100k|        + ((uint128_t)in1[5]) * in2[3]
  479|   100k|        + ((uint128_t)in1[6]) * in2[2];
  480|       |
  481|   100k|    out[9] = ((uint128_t)in1[3]) * in2[6]
  482|   100k|        + ((uint128_t)in1[4]) * in2[5]
  483|   100k|        + ((uint128_t)in1[5]) * in2[4]
  484|   100k|        + ((uint128_t)in1[6]) * in2[3];
  485|       |
  486|   100k|    out[10] = ((uint128_t)in1[4]) * in2[6]
  487|   100k|        + ((uint128_t)in1[5]) * in2[5]
  488|   100k|        + ((uint128_t)in1[6]) * in2[4];
  489|       |
  490|   100k|    out[11] = ((uint128_t)in1[5]) * in2[6]
  491|   100k|        + ((uint128_t)in1[6]) * in2[5];
  492|       |
  493|   100k|    out[12] = ((uint128_t)in1[6]) * in2[6];
  494|   100k|}
ecp_nistp384.c:felem_contract:
  888|    460|{
  889|    460|    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|    460|    int64_t tmp[NLIMBS], cond[5], a;
  897|    460|    unsigned int i;
  898|       |
  899|    460|    memcpy(tmp, in, sizeof(felem));
  900|       |
  901|       |    /* Case 1: a = 1 iff |in| >= 2^384 */
  902|    460|    a = (in[6] >> 48);
  903|    460|    tmp[0] += a;
  904|    460|    tmp[0] -= a << 32;
  905|    460|    tmp[1] += a << 40;
  906|    460|    tmp[2] += a << 16;
  907|    460|    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|    460|    a = tmp[0] >> 63;
  915|    460|    tmp[0] += a & two56;
  916|    460|    tmp[1] -= a & 1;
  917|       |
  918|       |    /* Carry 1 -> 2 -> 3 -> 4 -> 5 -> 6 */
  919|    460|    tmp[2] += tmp[1] >> 56;
  920|    460|    tmp[1] &= 0x00ffffffffffffff;
  921|       |
  922|    460|    tmp[3] += tmp[2] >> 56;
  923|    460|    tmp[2] &= 0x00ffffffffffffff;
  924|       |
  925|    460|    tmp[4] += tmp[3] >> 56;
  926|    460|    tmp[3] &= 0x00ffffffffffffff;
  927|       |
  928|    460|    tmp[5] += tmp[4] >> 56;
  929|    460|    tmp[4] &= 0x00ffffffffffffff;
  930|       |
  931|    460|    tmp[6] += tmp[5] >> 56; /* tmp[6] < 2^48 */
  932|    460|    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|    460|    cond[0] = ((tmp[6] | 0xff000000000000) & tmp[5] & tmp[4] & tmp[3] & (tmp[2] | 0x0000000001ffff)) + 1;
  940|       |    /* 0 iff 2^128 bit is one */
  941|    460|    cond[1] = (tmp[2] | ~0x00000000010000) + 1;
  942|       |    /* 0 iff (2^96..2^127) bits are all one */
  943|    460|    cond[2] = ((tmp[2] | 0xffffffffff0000) & (tmp[1] | 0x0000ffffffffff)) + 1;
  944|       |    /* 0 iff (2^32..2^95) bits are all zero */
  945|    460|    cond[3] = (tmp[1] & ~0xffff0000000000) | (tmp[0] & ~((int64_t)0x000000ffffffff));
  946|       |    /* 0 iff (2^0..2^31) bits are all one */
  947|    460|    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|  2.76k|    for (i = 0; i < 5; i++)
  ------------------
  |  Branch (953:17): [True: 2.30k, False: 460]
  ------------------
  954|  2.30k|        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|    460|    a = cond[0] & (cond[1] | (cond[2] & (~cond[3] | cond[4])));
  963|    460|    tmp[6] &= ~a;
  964|    460|    tmp[5] &= ~a;
  965|    460|    tmp[4] &= ~a;
  966|    460|    tmp[3] &= ~a;
  967|    460|    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|    460|    a = cond[0] & cond[1];
  976|    460|    tmp[2] &= ~a | 0xfffffffffeffff;
  977|    460|    tmp[1] += a & ((int64_t)1 << 40);
  978|       |
  979|       |    /* otherwise, clear bits 2^127 .. 2^96  */
  980|    460|    a = cond[0] & ~cond[1] & (cond[2] & (~cond[3] | cond[4]));
  981|    460|    tmp[2] &= ~a | 0xffffffffff0000;
  982|    460|    tmp[1] &= ~a | 0x0000ffffffffff;
  983|       |
  984|       |    /* finally, subtract the last 2^32 - 1 */
  985|    460|    a = cond[0] & (cond[1] | (cond[2] & (~cond[3] | cond[4])));
  986|    460|    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|    460|    a = tmp[0] >> 63;
  993|    460|    tmp[0] += a & two56;
  994|    460|    tmp[1] -= a & 1;
  995|       |
  996|       |    /* Carry 1 -> 2 -> 3 -> 4 -> 5 -> 6 */
  997|    460|    tmp[2] += tmp[1] >> 56;
  998|    460|    tmp[1] &= 0x00ffffffffffffff;
  999|       |
 1000|    460|    tmp[3] += tmp[2] >> 56;
 1001|    460|    tmp[2] &= 0x00ffffffffffffff;
 1002|       |
 1003|    460|    tmp[4] += tmp[3] >> 56;
 1004|    460|    tmp[3] &= 0x00ffffffffffffff;
 1005|       |
 1006|    460|    tmp[5] += tmp[4] >> 56;
 1007|    460|    tmp[4] &= 0x00ffffffffffffff;
 1008|       |
 1009|    460|    tmp[6] += tmp[5] >> 56;
 1010|    460|    tmp[5] &= 0x00ffffffffffffff;
 1011|       |
 1012|    460|    memcpy(out, tmp, sizeof(felem));
 1013|    460|}
ecp_nistp384.c:felem_to_BN:
  161|    736|{
  162|    736|    felem_bytearray b_out;
  163|       |
  164|    736|    felem_to_bin48(b_out, in);
  165|    736|    return BN_lebin2bn(b_out, sizeof(b_out), out);
  166|    736|}
ecp_nistp384.c:felem_to_bin48:
  129|    736|{
  130|    736|    memset(out, 0, 48);
  131|    736|    (*((limb *)&out[0])) |= (in[0] & bottom56bits);
  132|    736|    (*((limb_aX *)&out[7])) |= (in[1] & bottom56bits);
  133|    736|    (*((limb_aX *)&out[14])) |= (in[2] & bottom56bits);
  134|    736|    (*((limb_aX *)&out[21])) |= (in[3] & bottom56bits);
  135|    736|    (*((limb_aX *)&out[28])) |= (in[4] & bottom56bits);
  136|    736|    (*((limb_aX *)&out[35])) |= (in[5] & bottom56bits);
  137|    736|    memmove(&out[42], &in[6], 6);
  138|    736|}
ecp_nistp384.c:point_add:
 1107|  9.01k|{
 1108|  9.01k|    felem ftmp, ftmp2, ftmp3, ftmp4, ftmp5, ftmp6, x_out, y_out, z_out;
 1109|  9.01k|    widefelem tmp, tmp2;
 1110|  9.01k|    limb x_equal, y_equal, z1_is_zero, z2_is_zero;
 1111|  9.01k|    limb points_equal;
 1112|       |
 1113|  9.01k|    z1_is_zero = felem_is_zero(z1);
 1114|  9.01k|    z2_is_zero = felem_is_zero(z2);
 1115|       |
 1116|       |    /* ftmp = z1z1 = z1**2 */
 1117|  9.01k|    felem_square_reduce(ftmp, z1); /* ftmp[i] < 2^56 */
  ------------------
  |  |  771|  9.01k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
 1118|       |
 1119|  9.01k|    if (!mixed) {
  ------------------
  |  Branch (1119:9): [True: 0, False: 9.01k]
  ------------------
 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|  9.01k|    } else {
 1142|       |        /*
 1143|       |         * We'll assume z2 = 1 (special case z2 = 0 is handled later)
 1144|       |         */
 1145|       |
 1146|       |        /* u1 = ftmp3 = x1*z2z2 */
 1147|  9.01k|        felem_assign(ftmp3, x1); /* ftmp3[i] < 2^56 */
 1148|       |
 1149|       |        /* ftmp5 = 2*z1z2 */
 1150|  9.01k|        felem_scalar(ftmp5, z1, 2); /* ftmp5[i] < 2^57 */
 1151|       |
 1152|       |        /* s1 = ftmp6 = y1 * z2**3 */
 1153|  9.01k|        felem_assign(ftmp6, y1); /* ftmp6[i] < 2^56 */
 1154|  9.01k|    }
 1155|       |    /* ftmp3[i] < 2^56, ftmp5[i] < 2^57, ftmp6[i] < 2^56 */
 1156|       |
 1157|       |    /* u2 = x2*z1z1 */
 1158|  9.01k|    felem_mul(tmp, x2, ftmp); /* tmp[i] < 2^115 */
  ------------------
  |  |  768|  9.01k|#define felem_mul felem_mul_ref
  ------------------
 1159|       |
 1160|       |    /* h = ftmp4 = u2 - u1 */
 1161|  9.01k|    felem_diff_128_64(tmp, ftmp3); /* tmp[i] < 2^115 + 2^64 + 2^48 */
 1162|  9.01k|    felem_reduce(ftmp4, tmp); /* ftmp[4] < 2^56 */
  ------------------
  |  |  769|  9.01k|#define felem_reduce felem_reduce_ref
  ------------------
 1163|       |
 1164|  9.01k|    x_equal = felem_is_zero(ftmp4);
 1165|       |
 1166|       |    /* z_out = ftmp5 * h */
 1167|  9.01k|    felem_mul_reduce(z_out, ftmp5, ftmp4); /* z_out[i] < 2^56 */
  ------------------
  |  |  772|  9.01k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1168|       |
 1169|       |    /* ftmp = z1 * z1z1 */
 1170|  9.01k|    felem_mul_reduce(ftmp, ftmp, z1); /* ftmp[i] < 2^56 */
  ------------------
  |  |  772|  9.01k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1171|       |
 1172|       |    /* s2 = tmp = y2 * z1**3 */
 1173|  9.01k|    felem_mul(tmp, y2, ftmp); /* tmp[i] < 2^115 */
  ------------------
  |  |  768|  9.01k|#define felem_mul felem_mul_ref
  ------------------
 1174|       |
 1175|       |    /* r = ftmp5 = (s2 - s1)*2 */
 1176|  9.01k|    felem_diff_128_64(tmp, ftmp6); /* tmp[i] < 2^115 + 2^64 + 2^48 */
 1177|  9.01k|    felem_reduce(ftmp5, tmp); /* ftmp5[i] < 2^56 */
  ------------------
  |  |  769|  9.01k|#define felem_reduce felem_reduce_ref
  ------------------
 1178|  9.01k|    y_equal = felem_is_zero(ftmp5);
 1179|  9.01k|    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|  9.01k|    points_equal = (x_equal & y_equal & (~z1_is_zero) & (~z2_is_zero));
 1197|       |
 1198|  9.01k|    if (points_equal) {
  ------------------
  |  Branch (1198:9): [True: 0, False: 9.01k]
  ------------------
 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|  9.01k|    felem_assign(ftmp, ftmp4); /* ftmp[i] < 2^56 */
 1209|  9.01k|    felem_scalar64(ftmp, 2); /* ftmp[i] < 2^57 */
 1210|  9.01k|    felem_square_reduce(ftmp, ftmp); /* ftmp[i] < 2^56 */
  ------------------
  |  |  771|  9.01k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
 1211|       |
 1212|       |    /* J = ftmp2 = h * I */
 1213|  9.01k|    felem_mul_reduce(ftmp2, ftmp4, ftmp); /* ftmp2[i] < 2^56 */
  ------------------
  |  |  772|  9.01k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1214|       |
 1215|       |    /* V = ftmp4 = U1 * I */
 1216|  9.01k|    felem_mul_reduce(ftmp4, ftmp3, ftmp); /* ftmp4[i] < 2^56 */
  ------------------
  |  |  772|  9.01k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1217|       |
 1218|       |    /* x_out = r**2 - J - 2V */
 1219|  9.01k|    felem_square(tmp, ftmp5); /* tmp[i] < 2^117 */
  ------------------
  |  |  767|  9.01k|#define felem_square felem_square_ref
  ------------------
 1220|  9.01k|    felem_diff_128_64(tmp, ftmp2); /* tmp[i] < 2^117 + 2^64 + 2^48 */
 1221|  9.01k|    felem_assign(ftmp3, ftmp4); /* ftmp3[i] < 2^56 */
 1222|  9.01k|    felem_scalar64(ftmp4, 2); /* ftmp4[i] < 2^57 */
 1223|  9.01k|    felem_diff_128_64(tmp, ftmp4); /* tmp[i] < 2^117 + 2^65 + 2^49 */
 1224|  9.01k|    felem_reduce(x_out, tmp); /* x_out[i] < 2^56 */
  ------------------
  |  |  769|  9.01k|#define felem_reduce felem_reduce_ref
  ------------------
 1225|       |
 1226|       |    /* y_out = r(V-x_out) - 2 * s1 * J */
 1227|  9.01k|    felem_diff64(ftmp3, x_out); /* ftmp3[i] < 2^60 + 2^56 + 2^44 */
 1228|  9.01k|    felem_mul(tmp, ftmp5, ftmp3); /* tmp[i] < 2^116 */
  ------------------
  |  |  768|  9.01k|#define felem_mul felem_mul_ref
  ------------------
 1229|  9.01k|    felem_mul(tmp2, ftmp6, ftmp2); /* tmp2[i] < 2^115 */
  ------------------
  |  |  768|  9.01k|#define felem_mul felem_mul_ref
  ------------------
 1230|  9.01k|    felem_scalar128(tmp2, 2); /* tmp2[i] < 2^116 */
 1231|  9.01k|    felem_diff128(tmp, tmp2); /* tmp[i] < 2^127 + 2^116 + 2^111 */
 1232|  9.01k|    felem_reduce(y_out, tmp); /* y_out[i] < 2^56 */
  ------------------
  |  |  769|  9.01k|#define felem_reduce felem_reduce_ref
  ------------------
 1233|       |
 1234|  9.01k|    copy_conditional(x_out, x2, z1_is_zero);
 1235|  9.01k|    copy_conditional(x_out, x1, z2_is_zero);
 1236|  9.01k|    copy_conditional(y_out, y2, z1_is_zero);
 1237|  9.01k|    copy_conditional(y_out, y1, z2_is_zero);
 1238|  9.01k|    copy_conditional(z_out, z2, z1_is_zero);
 1239|  9.01k|    copy_conditional(z_out, z1, z2_is_zero);
 1240|  9.01k|    felem_assign(x3, x_out);
 1241|  9.01k|    felem_assign(y3, y_out);
 1242|  9.01k|    felem_assign(z3, z_out);
 1243|  9.01k|}
ecp_nistp384.c:felem_is_zero:
  861|  36.0k|{
  862|  36.0k|    limb zero, p384;
  863|       |
  864|  36.0k|    zero = in[0] | in[1] | in[2] | in[3] | in[4] | in[5] | in[6];
  865|  36.0k|    zero = ((int64_t)(zero)-1) >> 63;
  866|  36.0k|    p384 = (in[0] ^ 0x000000ffffffff) | (in[1] ^ 0xffff0000000000)
  867|  36.0k|        | (in[2] ^ 0xfffffffffeffff) | (in[3] ^ 0xffffffffffffff)
  868|  36.0k|        | (in[4] ^ 0xffffffffffffff) | (in[5] ^ 0xffffffffffffff)
  869|  36.0k|        | (in[6] ^ 0xffffffffffff);
  870|  36.0k|    p384 = ((int64_t)(p384)-1) >> 63;
  871|       |
  872|  36.0k|    return (zero | p384);
  873|  36.0k|}
ecp_nistp384.c:felem_sum64:
  186|  27.0k|{
  187|  27.0k|    unsigned int i;
  188|       |
  189|   216k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|   216k|#define NLIMBS 7
  ------------------
  |  Branch (189:17): [True: 189k, False: 27.0k]
  ------------------
  190|   189k|        out[i] += in[i];
  191|  27.0k|}
ecp_nistp384.c:felem_diff_128_64:
  306|  54.0k|{
  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|  54.0k|    static const widelimb two64m56m8 = (((widelimb)1) << 64)
  314|  54.0k|        - (((widelimb)1) << 56)
  315|  54.0k|        - (((widelimb)1) << 8);
  316|  54.0k|    static const widelimb two64m32m8 = (((widelimb)1) << 64)
  317|  54.0k|        - (((widelimb)1) << 32)
  318|  54.0k|        - (((widelimb)1) << 8);
  319|  54.0k|    static const widelimb two64m8 = (((widelimb)1) << 64)
  320|  54.0k|        - (((widelimb)1) << 8);
  321|  54.0k|    static const widelimb two64p48m16 = (((widelimb)1) << 64)
  322|  54.0k|        + (((widelimb)1) << 48)
  323|  54.0k|        - (((widelimb)1) << 16);
  324|  54.0k|    unsigned int i;
  325|       |
  326|  54.0k|    out[0] += two64p48m16;
  327|  54.0k|    out[1] += two64m56m8;
  328|  54.0k|    out[2] += two64m32m8;
  329|  54.0k|    out[3] += two64m8;
  330|  54.0k|    out[4] += two64m8;
  331|  54.0k|    out[5] += two64m8;
  332|  54.0k|    out[6] += two64m8;
  333|       |
  334|   432k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|   432k|#define NLIMBS 7
  ------------------
  |  Branch (334:17): [True: 378k, False: 54.0k]
  ------------------
  335|   378k|        out[i] -= in[i];
  336|  54.0k|}
ecp_nistp384.c:felem_scalar64:
  204|  54.0k|{
  205|  54.0k|    unsigned int i;
  206|       |
  207|   432k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|   432k|#define NLIMBS 7
  ------------------
  |  Branch (207:17): [True: 378k, False: 54.0k]
  ------------------
  208|   378k|        out[i] *= scalar;
  209|  54.0k|}
ecp_nistp384.c:felem_diff64:
  273|  27.0k|{
  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|  27.0k|    static const limb two60m52m4 = (((limb)1) << 60)
  281|  27.0k|        - (((limb)1) << 52)
  282|  27.0k|        - (((limb)1) << 4);
  283|  27.0k|    static const limb two60p44m12 = (((limb)1) << 60)
  284|  27.0k|        + (((limb)1) << 44)
  285|  27.0k|        - (((limb)1) << 12);
  286|  27.0k|    static const limb two60m28m4 = (((limb)1) << 60)
  287|  27.0k|        - (((limb)1) << 28)
  288|  27.0k|        - (((limb)1) << 4);
  289|  27.0k|    static const limb two60m4 = (((limb)1) << 60)
  290|  27.0k|        - (((limb)1) << 4);
  291|       |
  292|  27.0k|    out[0] += two60p44m12 - in[0];
  293|  27.0k|    out[1] += two60m52m4 - in[1];
  294|  27.0k|    out[2] += two60m28m4 - in[2];
  295|  27.0k|    out[3] += two60m4 - in[3];
  296|  27.0k|    out[4] += two60m4 - in[4];
  297|  27.0k|    out[5] += two60m4 - in[5];
  298|  27.0k|    out[6] += two60m4 - in[6];
  299|  27.0k|}
ecp_nistp384.c:felem_scalar128:
  213|  18.0k|{
  214|  18.0k|    unsigned int i;
  215|       |
  216|   252k|    for (i = 0; i < 2 * NLIMBS - 1; i++)
  ------------------
  |  |  105|   252k|#define NLIMBS 7
  ------------------
  |  Branch (216:17): [True: 234k, False: 18.0k]
  ------------------
  217|   234k|        out[i] *= scalar;
  218|  18.0k|}
ecp_nistp384.c:felem_diff128:
  343|  18.0k|{
  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|  18.0k|    static const widelimb two127 = ((widelimb)1) << 127;
  351|  18.0k|    static const widelimb two127m71 = (((widelimb)1) << 127)
  352|  18.0k|        - (((widelimb)1) << 71);
  353|  18.0k|    static const widelimb two127p111m79m71 = (((widelimb)1) << 127)
  354|  18.0k|        + (((widelimb)1) << 111)
  355|  18.0k|        - (((widelimb)1) << 79)
  356|  18.0k|        - (((widelimb)1) << 71);
  357|  18.0k|    static const widelimb two127m119m71 = (((widelimb)1) << 127)
  358|  18.0k|        - (((widelimb)1) << 119)
  359|  18.0k|        - (((widelimb)1) << 71);
  360|  18.0k|    static const widelimb two127m95m71 = (((widelimb)1) << 127)
  361|  18.0k|        - (((widelimb)1) << 95)
  362|  18.0k|        - (((widelimb)1) << 71);
  363|  18.0k|    unsigned int i;
  364|       |
  365|  18.0k|    out[0] += two127;
  366|  18.0k|    out[1] += two127m71;
  367|  18.0k|    out[2] += two127m71;
  368|  18.0k|    out[3] += two127m71;
  369|  18.0k|    out[4] += two127m71;
  370|  18.0k|    out[5] += two127m71;
  371|  18.0k|    out[6] += two127p111m79m71;
  372|  18.0k|    out[7] += two127m119m71;
  373|  18.0k|    out[8] += two127m95m71;
  374|  18.0k|    out[9] += two127m71;
  375|  18.0k|    out[10] += two127m71;
  376|  18.0k|    out[11] += two127m71;
  377|  18.0k|    out[12] += two127m71;
  378|       |
  379|   252k|    for (i = 0; i < 2 * NLIMBS - 1; i++)
  ------------------
  |  |  105|   252k|#define NLIMBS 7
  ------------------
  |  Branch (379:17): [True: 234k, False: 18.0k]
  ------------------
  380|   234k|        out[i] -= in[i];
  381|  18.0k|}
ecp_nistp384.c:copy_conditional:
 1085|  54.0k|{
 1086|  54.0k|    unsigned int i;
 1087|       |
 1088|   432k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|   432k|#define NLIMBS 7
  ------------------
  |  Branch (1088:17): [True: 378k, False: 54.0k]
  ------------------
 1089|   378k|        out[i] ^= mask & (in[i] ^ out[i]);
 1090|  54.0k|}
ecp_nistp384.c:point_double:
 1036|  9.01k|{
 1037|  9.01k|    widefelem tmp, tmp2;
 1038|  9.01k|    felem delta, gamma, beta, alpha, ftmp, ftmp2;
 1039|       |
 1040|  9.01k|    felem_assign(ftmp, x_in);
 1041|  9.01k|    felem_assign(ftmp2, x_in);
 1042|       |
 1043|       |    /* delta = z^2 */
 1044|  9.01k|    felem_square_reduce(delta, z_in); /* delta[i] < 2^56 */
  ------------------
  |  |  771|  9.01k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
 1045|       |
 1046|       |    /* gamma = y^2 */
 1047|  9.01k|    felem_square_reduce(gamma, y_in); /* gamma[i] < 2^56 */
  ------------------
  |  |  771|  9.01k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
 1048|       |
 1049|       |    /* beta = x*gamma */
 1050|  9.01k|    felem_mul_reduce(beta, x_in, gamma); /* beta[i] < 2^56 */
  ------------------
  |  |  772|  9.01k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1051|       |
 1052|       |    /* alpha = 3*(x-delta)*(x+delta) */
 1053|  9.01k|    felem_diff64(ftmp, delta); /* ftmp[i] < 2^60 + 2^58 + 2^44 */
 1054|  9.01k|    felem_sum64(ftmp2, delta); /* ftmp2[i] < 2^59 */
 1055|  9.01k|    felem_scalar64(ftmp2, 3); /* ftmp2[i] < 2^61 */
 1056|  9.01k|    felem_mul_reduce(alpha, ftmp, ftmp2); /* alpha[i] < 2^56 */
  ------------------
  |  |  772|  9.01k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1057|       |
 1058|       |    /* x' = alpha^2 - 8*beta */
 1059|  9.01k|    felem_square(tmp, alpha); /* tmp[i] < 2^115 */
  ------------------
  |  |  767|  9.01k|#define felem_square felem_square_ref
  ------------------
 1060|  9.01k|    felem_assign(ftmp, beta); /* ftmp[i] < 2^56 */
 1061|  9.01k|    felem_scalar64(ftmp, 8); /* ftmp[i] < 2^59 */
 1062|  9.01k|    felem_diff_128_64(tmp, ftmp); /* tmp[i] < 2^115 + 2^64 + 2^48 */
 1063|  9.01k|    felem_reduce(x_out, tmp); /* x_out[i] < 2^56 */
  ------------------
  |  |  769|  9.01k|#define felem_reduce felem_reduce_ref
  ------------------
 1064|       |
 1065|       |    /* z' = (y + z)^2 - gamma - delta */
 1066|  9.01k|    felem_sum64(delta, gamma); /* delta[i] < 2^57 */
 1067|  9.01k|    felem_assign(ftmp, y_in); /* ftmp[i] < 2^56 */
 1068|  9.01k|    felem_sum64(ftmp, z_in); /* ftmp[i] < 2^56 */
 1069|  9.01k|    felem_square(tmp, ftmp); /* tmp[i] < 2^115 */
  ------------------
  |  |  767|  9.01k|#define felem_square felem_square_ref
  ------------------
 1070|  9.01k|    felem_diff_128_64(tmp, delta); /* tmp[i] < 2^115 + 2^64 + 2^48 */
 1071|  9.01k|    felem_reduce(z_out, tmp); /* z_out[i] < 2^56 */
  ------------------
  |  |  769|  9.01k|#define felem_reduce felem_reduce_ref
  ------------------
 1072|       |
 1073|       |    /* y' = alpha*(4*beta - x') - 8*gamma^2 */
 1074|  9.01k|    felem_scalar64(beta, 4); /* beta[i] < 2^58 */
 1075|  9.01k|    felem_diff64(beta, x_out); /* beta[i] < 2^60 + 2^58 + 2^44 */
 1076|  9.01k|    felem_mul(tmp, alpha, beta); /* tmp[i] < 2^119 */
  ------------------
  |  |  768|  9.01k|#define felem_mul felem_mul_ref
  ------------------
 1077|  9.01k|    felem_square(tmp2, gamma); /* tmp2[i] < 2^115 */
  ------------------
  |  |  767|  9.01k|#define felem_square felem_square_ref
  ------------------
 1078|  9.01k|    felem_scalar128(tmp2, 8); /* tmp2[i] < 2^118 */
 1079|  9.01k|    felem_diff128(tmp, tmp2); /* tmp[i] < 2^127 + 2^119 + 2^111 */
 1080|  9.01k|    felem_reduce(y_out, tmp); /* tmp[i] < 2^56 */
  ------------------
  |  |  769|  9.01k|#define felem_reduce felem_reduce_ref
  ------------------
 1081|  9.01k|}
ecp_nistp384.c:batch_mul:
 1410|     92|{
 1411|     92|    int i, skip;
 1412|     92|    unsigned int num, gen_mul = (g_scalar != NULL);
 1413|     92|    felem nq[3], tmp[4];
 1414|     92|    limb bits;
 1415|     92|    u8 sign, digit;
 1416|       |
 1417|       |    /* set nq to the point at infinity */
 1418|     92|    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|     92|    skip = 1; /* save two point operations in the first
 1426|       |               * round */
 1427|  9.20k|    for (i = (num_points ? 380 : 98); i >= 0; --i) {
  ------------------
  |  Branch (1427:15): [True: 0, False: 92]
  |  Branch (1427:39): [True: 9.10k, False: 92]
  ------------------
 1428|       |        /* double */
 1429|  9.10k|        if (!skip)
  ------------------
  |  Branch (1429:13): [True: 9.01k, False: 92]
  ------------------
 1430|  9.01k|            point_double(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2]);
 1431|       |
 1432|       |        /* add multiples of the generator */
 1433|  9.10k|        if (gen_mul && (i <= 98)) {
  ------------------
  |  Branch (1433:13): [True: 9.10k, False: 0]
  |  Branch (1433:24): [True: 9.10k, False: 0]
  ------------------
 1434|  9.10k|            bits = get_bit(g_scalar, i + 285) << 3;
 1435|  9.10k|            if (i < 95) {
  ------------------
  |  Branch (1435:17): [True: 8.74k, False: 368]
  ------------------
 1436|  8.74k|                bits |= get_bit(g_scalar, i + 190) << 2;
 1437|  8.74k|                bits |= get_bit(g_scalar, i + 95) << 1;
 1438|  8.74k|                bits |= get_bit(g_scalar, i);
 1439|  8.74k|            }
 1440|       |            /* select the point to add, in constant time */
 1441|  9.10k|            select_point(bits, 16, g_pre_comp, tmp);
 1442|  9.10k|            if (!skip) {
  ------------------
  |  Branch (1442:17): [True: 9.01k, False: 92]
  ------------------
 1443|       |                /* The 1 argument below is for "mixed" */
 1444|  9.01k|                point_add(nq[0], nq[1], nq[2],
 1445|  9.01k|                    nq[0], nq[1], nq[2], 1,
 1446|  9.01k|                    tmp[0], tmp[1], tmp[2]);
 1447|  9.01k|            } else {
 1448|     92|                memcpy(nq, tmp, 3 * sizeof(felem));
 1449|     92|                skip = 0;
 1450|     92|            }
 1451|  9.10k|        }
 1452|       |
 1453|       |        /* do other additions every 5 doublings */
 1454|  9.10k|        if (num_points && (i % 5 == 0)) {
  ------------------
  |  Branch (1454:13): [True: 0, False: 9.10k]
  |  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|  9.10k|    }
 1484|     92|    felem_assign(x_out, nq[0]);
 1485|     92|    felem_assign(y_out, nq[1]);
 1486|     92|    felem_assign(z_out, nq[2]);
 1487|     92|}
ecp_nistp384.c:get_bit:
 1392|  35.3k|{
 1393|  35.3k|    if (i < 0 || i >= 384)
  ------------------
  |  Branch (1393:9): [True: 0, False: 35.3k]
  |  Branch (1393:18): [True: 0, False: 35.3k]
  ------------------
 1394|      0|        return 0;
 1395|  35.3k|    return (in[i >> 3] >> (i & 7)) & 1;
 1396|  35.3k|}
ecp_nistp384.c:select_point:
 1370|  9.10k|{
 1371|  9.10k|    unsigned int i, j;
 1372|  9.10k|    limb *outlimbs = &out[0][0];
 1373|       |
 1374|  9.10k|    memset(out, 0, sizeof(*out) * 3);
 1375|       |
 1376|   154k|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1376:17): [True: 145k, False: 9.10k]
  ------------------
 1377|   145k|        const limb *inlimbs = &pre_comp[i][0][0];
 1378|   145k|        limb mask = i ^ idx;
 1379|       |
 1380|   145k|        mask |= mask >> 4;
 1381|   145k|        mask |= mask >> 2;
 1382|   145k|        mask |= mask >> 1;
 1383|   145k|        mask &= 1;
 1384|   145k|        mask--;
 1385|  3.20M|        for (j = 0; j < NLIMBS * 3; j++)
  ------------------
  |  |  105|  3.20M|#define NLIMBS 7
  ------------------
  |  Branch (1385:21): [True: 3.06M, False: 145k]
  ------------------
 1386|  3.06M|            outlimbs[j] |= inlimbs[j] & mask;
 1387|   145k|    }
 1388|  9.10k|}

EC_GFp_nistp521_method:
 1588|     70|{
 1589|     70|    static const EC_METHOD ret = {
 1590|     70|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|     70|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1591|     70|        NID_X9_62_prime_field,
  ------------------
  |  |  152|     70|#define NID_X9_62_prime_field           406
  ------------------
 1592|     70|        ossl_ec_GFp_nistp521_group_init,
 1593|     70|        ossl_ec_GFp_simple_group_finish,
 1594|     70|        ossl_ec_GFp_simple_group_clear_finish,
 1595|     70|        ossl_ec_GFp_nist_group_copy,
 1596|     70|        ossl_ec_GFp_nistp521_group_set_curve,
 1597|     70|        ossl_ec_GFp_simple_group_get_curve,
 1598|     70|        ossl_ec_GFp_simple_group_get_degree,
 1599|     70|        ossl_ec_group_simple_order_bits,
 1600|     70|        ossl_ec_GFp_simple_group_check_discriminant,
 1601|     70|        ossl_ec_GFp_simple_point_init,
 1602|     70|        ossl_ec_GFp_simple_point_finish,
 1603|     70|        ossl_ec_GFp_simple_point_clear_finish,
 1604|     70|        ossl_ec_GFp_simple_point_copy,
 1605|     70|        ossl_ec_GFp_simple_point_set_to_infinity,
 1606|     70|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1607|     70|        ossl_ec_GFp_nistp521_point_get_affine_coordinates,
 1608|     70|        0 /* point_set_compressed_coordinates */,
 1609|     70|        0 /* point2oct */,
 1610|     70|        0 /* oct2point */,
 1611|     70|        ossl_ec_GFp_simple_add,
 1612|     70|        ossl_ec_GFp_simple_dbl,
 1613|     70|        ossl_ec_GFp_simple_invert,
 1614|     70|        ossl_ec_GFp_simple_is_at_infinity,
 1615|     70|        ossl_ec_GFp_simple_is_on_curve,
 1616|     70|        ossl_ec_GFp_simple_cmp,
 1617|     70|        ossl_ec_GFp_simple_make_affine,
 1618|     70|        ossl_ec_GFp_simple_points_make_affine,
 1619|     70|        ossl_ec_GFp_nistp521_points_mul,
 1620|     70|        ossl_ec_GFp_nistp521_precompute_mult,
 1621|     70|        ossl_ec_GFp_nistp521_have_precompute_mult,
 1622|     70|        ossl_ec_GFp_nist_field_mul,
 1623|     70|        ossl_ec_GFp_nist_field_sqr,
 1624|     70|        0 /* field_div */,
 1625|     70|        ossl_ec_GFp_simple_field_inv,
 1626|     70|        0 /* field_encode */,
 1627|     70|        0 /* field_decode */,
 1628|     70|        0, /* field_set_to_one */
 1629|     70|        ossl_ec_key_simple_priv2oct,
 1630|     70|        ossl_ec_key_simple_oct2priv,
 1631|     70|        0, /* set private */
 1632|     70|        ossl_ec_key_simple_generate_key,
 1633|     70|        ossl_ec_key_simple_check_key,
 1634|     70|        ossl_ec_key_simple_generate_public_key,
 1635|     70|        0, /* keycopy */
 1636|     70|        0, /* keyfinish */
 1637|     70|        ossl_ecdh_simple_compute_key,
 1638|     70|        ossl_ecdsa_simple_sign_setup,
 1639|     70|        ossl_ecdsa_simple_sign_sig,
 1640|     70|        ossl_ecdsa_simple_verify_sig,
 1641|     70|        0, /* field_inverse_mod_ord */
 1642|     70|        0, /* blind_coordinates */
 1643|     70|        0, /* ladder_pre */
 1644|     70|        0, /* ladder_step */
 1645|     70|        0 /* ladder_post */
 1646|     70|    };
 1647|       |
 1648|     70|    return &ret;
 1649|     70|}
ossl_ec_GFp_nistp521_group_init:
 1701|    140|{
 1702|    140|    int ret;
 1703|    140|    ret = ossl_ec_GFp_simple_group_init(group);
 1704|    140|    group->a_is_minus3 = 1;
 1705|    140|    return ret;
 1706|    140|}
ossl_ec_GFp_nistp521_group_set_curve:
 1711|     70|{
 1712|     70|    int ret = 0;
 1713|     70|    BIGNUM *curve_p, *curve_a, *curve_b;
 1714|     70|#ifndef FIPS_MODULE
 1715|     70|    BN_CTX *new_ctx = NULL;
 1716|       |
 1717|     70|    if (ctx == NULL)
  ------------------
  |  Branch (1717:9): [True: 0, False: 70]
  ------------------
 1718|      0|        ctx = new_ctx = BN_CTX_new();
 1719|     70|#endif
 1720|     70|    if (ctx == NULL)
  ------------------
  |  Branch (1720:9): [True: 0, False: 70]
  ------------------
 1721|      0|        return 0;
 1722|       |
 1723|     70|    BN_CTX_start(ctx);
 1724|     70|    curve_p = BN_CTX_get(ctx);
 1725|     70|    curve_a = BN_CTX_get(ctx);
 1726|     70|    curve_b = BN_CTX_get(ctx);
 1727|     70|    if (curve_b == NULL)
  ------------------
  |  Branch (1727:9): [True: 0, False: 70]
  ------------------
 1728|      0|        goto err;
 1729|     70|    BN_bin2bn(nistp521_curve_params[0], sizeof(felem_bytearray), curve_p);
 1730|     70|    BN_bin2bn(nistp521_curve_params[1], sizeof(felem_bytearray), curve_a);
 1731|     70|    BN_bin2bn(nistp521_curve_params[2], sizeof(felem_bytearray), curve_b);
 1732|     70|    if ((BN_cmp(curve_p, p)) || (BN_cmp(curve_a, a)) || (BN_cmp(curve_b, b))) {
  ------------------
  |  Branch (1732:9): [True: 0, False: 70]
  |  Branch (1732:33): [True: 0, False: 70]
  |  Branch (1732:57): [True: 0, False: 70]
  ------------------
 1733|      0|        ERR_raise(ERR_LIB_EC, EC_R_WRONG_CURVE_PARAMETERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1734|      0|        goto err;
 1735|      0|    }
 1736|     70|    group->field_mod_func = BN_nist_mod_521;
 1737|     70|    ret = ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx);
 1738|     70|err:
 1739|     70|    BN_CTX_end(ctx);
 1740|     70|#ifndef FIPS_MODULE
 1741|     70|    BN_CTX_free(new_ctx);
 1742|     70|#endif
 1743|     70|    return ret;
 1744|     70|}
ossl_ec_GFp_nistp521_point_get_affine_coordinates:
 1754|     70|{
 1755|     70|    felem z1, z2, x_in, y_in, x_out, y_out;
 1756|     70|    largefelem tmp;
 1757|       |
 1758|     70|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (1758:9): [True: 0, False: 70]
  ------------------
 1759|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1760|      0|        return 0;
 1761|      0|    }
 1762|     70|    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: 70]
  |  Branch (1762:43): [True: 0, False: 70]
  |  Branch (1762:77): [True: 0, False: 70]
  ------------------
 1763|      0|        return 0;
 1764|     70|    felem_inv(z2, z1);
 1765|     70|    felem_square(tmp, z2);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
 1766|     70|    felem_reduce(z1, tmp);
 1767|     70|    felem_mul(tmp, x_in, z1);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
 1768|     70|    felem_reduce(x_in, tmp);
 1769|     70|    felem_contract(x_out, x_in);
 1770|     70|    if (x != NULL) {
  ------------------
  |  Branch (1770:9): [True: 70, False: 0]
  ------------------
 1771|     70|        if (!felem_to_BN(x, x_out)) {
  ------------------
  |  Branch (1771:13): [True: 0, False: 70]
  ------------------
 1772|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1773|      0|            return 0;
 1774|      0|        }
 1775|     70|    }
 1776|     70|    felem_mul(tmp, z1, z2);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
 1777|     70|    felem_reduce(z1, tmp);
 1778|     70|    felem_mul(tmp, y_in, z1);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
 1779|     70|    felem_reduce(y_in, tmp);
 1780|     70|    felem_contract(y_out, y_in);
 1781|     70|    if (y != NULL) {
  ------------------
  |  Branch (1781:9): [True: 70, False: 0]
  ------------------
 1782|     70|        if (!felem_to_BN(y, y_out)) {
  ------------------
  |  Branch (1782:13): [True: 0, False: 70]
  ------------------
 1783|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1784|      0|            return 0;
 1785|      0|        }
 1786|     70|    }
 1787|     70|    return 1;
 1788|     70|}
ossl_ec_GFp_nistp521_points_mul:
 1828|     70|{
 1829|     70|    int ret = 0;
 1830|     70|    int j;
 1831|     70|    int mixed = 0;
 1832|     70|    BIGNUM *x, *y, *z, *tmp_scalar;
 1833|     70|    felem_bytearray g_secret;
 1834|     70|    felem_bytearray *secrets = NULL;
 1835|     70|    felem(*pre_comp)[17][3] = NULL;
 1836|     70|    felem *tmp_felems = NULL;
 1837|     70|    unsigned i;
 1838|     70|    int num_bytes;
 1839|     70|    int have_pre_comp = 0;
 1840|     70|    size_t num_points = num;
 1841|     70|    felem x_in, y_in, z_in, x_out, y_out, z_out;
 1842|     70|    NISTP521_PRE_COMP *pre = NULL;
 1843|     70|    felem(*g_pre_comp)[3] = NULL;
 1844|     70|    EC_POINT *generator = NULL;
 1845|     70|    const EC_POINT *p = NULL;
 1846|     70|    const BIGNUM *p_scalar = NULL;
 1847|       |
 1848|     70|    BN_CTX_start(ctx);
 1849|     70|    x = BN_CTX_get(ctx);
 1850|     70|    y = BN_CTX_get(ctx);
 1851|     70|    z = BN_CTX_get(ctx);
 1852|     70|    tmp_scalar = BN_CTX_get(ctx);
 1853|     70|    if (tmp_scalar == NULL)
  ------------------
  |  Branch (1853:9): [True: 0, False: 70]
  ------------------
 1854|      0|        goto err;
 1855|       |
 1856|     70|    if (scalar != NULL) {
  ------------------
  |  Branch (1856:9): [True: 70, False: 0]
  ------------------
 1857|     70|        pre = group->pre_comp.nistp521;
 1858|     70|        if (pre)
  ------------------
  |  Branch (1858:13): [True: 0, False: 70]
  ------------------
 1859|       |            /* we have precomputation, try to use it */
 1860|      0|            g_pre_comp = &pre->g_pre_comp[0];
 1861|     70|        else
 1862|       |            /* try to use the standard precomputation */
 1863|     70|            g_pre_comp = (felem(*)[3])gmul;
 1864|     70|        generator = EC_POINT_new(group);
 1865|     70|        if (generator == NULL)
  ------------------
  |  Branch (1865:13): [True: 0, False: 70]
  ------------------
 1866|      0|            goto err;
 1867|       |        /* get the generator from precomputation */
 1868|     70|        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: 70]
  |  Branch (1868:50): [True: 0, False: 70]
  |  Branch (1868:87): [True: 0, False: 70]
  ------------------
 1869|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1870|      0|            goto err;
 1871|      0|        }
 1872|     70|        if (!ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group,
  ------------------
  |  Branch (1872:13): [True: 0, False: 70]
  ------------------
 1873|     70|                generator,
 1874|     70|                x, y, z, ctx))
 1875|      0|            goto err;
 1876|     70|        if (0 == EC_POINT_cmp(group, generator, group->generator, ctx))
  ------------------
  |  Branch (1876:13): [True: 70, False: 0]
  ------------------
 1877|       |            /* precomputation matches generator */
 1878|     70|            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|     70|    }
 1886|       |
 1887|     70|    if (num_points > 0) {
  ------------------
  |  Branch (1887:9): [True: 0, False: 70]
  ------------------
 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));
  ------------------
  |  |  112|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1896|      0|        pre_comp = OPENSSL_calloc(num_points, sizeof(*pre_comp));
  ------------------
  |  |  112|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|     70|    if ((scalar != NULL) && (have_pre_comp)) {
  ------------------
  |  Branch (1970:9): [True: 70, False: 0]
  |  Branch (1970:29): [True: 70, False: 0]
  ------------------
 1971|     70|        memset(g_secret, 0, sizeof(g_secret));
 1972|       |        /* reduce scalar to 0 <= scalar < 2^521 */
 1973|     70|        if ((BN_num_bits(scalar) > 521) || (BN_is_negative(scalar))) {
  ------------------
  |  Branch (1973:13): [True: 0, False: 70]
  |  Branch (1973:44): [True: 0, False: 70]
  ------------------
 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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1980|      0|                goto err;
 1981|      0|            }
 1982|      0|            num_bytes = BN_bn2lebinpad(tmp_scalar, g_secret, sizeof(g_secret));
 1983|     70|        } else {
 1984|     70|            num_bytes = BN_bn2lebinpad(scalar, g_secret, sizeof(g_secret));
 1985|     70|        }
 1986|       |        /* do the multiplication with generator precomputation */
 1987|     70|        batch_mul(x_out, y_out, z_out,
 1988|     70|            (const felem_bytearray(*))secrets, num_points,
 1989|     70|            g_secret,
 1990|     70|            mixed, (const felem(*)[17][3])pre_comp,
 1991|     70|            (const felem(*)[3])g_pre_comp);
 1992|     70|    } 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|     70|    felem_contract(x_in, x_out);
 2000|     70|    felem_contract(y_in, y_out);
 2001|     70|    felem_contract(z_in, z_out);
 2002|     70|    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: 70]
  |  Branch (2002:36): [True: 0, False: 70]
  |  Branch (2002:63): [True: 0, False: 70]
  ------------------
 2003|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2004|      0|        goto err;
 2005|      0|    }
 2006|     70|    ret = ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group, r, x, y, z,
 2007|     70|        ctx);
 2008|       |
 2009|     70|err:
 2010|     70|    BN_CTX_end(ctx);
 2011|     70|    EC_POINT_free(generator);
 2012|     70|    OPENSSL_free(secrets);
  ------------------
  |  |  131|     70|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2013|     70|    OPENSSL_free(pre_comp);
  ------------------
  |  |  131|     70|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2014|     70|    OPENSSL_free(tmp_felems);
  ------------------
  |  |  131|     70|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2015|     70|    return ret;
 2016|     70|}
ecp_nistp521.c:BN_to_felem:
  176|    210|{
  177|    210|    felem_bytearray b_out;
  178|    210|    int num_bytes;
  179|       |
  180|    210|    if (BN_is_negative(bn)) {
  ------------------
  |  Branch (180:9): [True: 0, False: 210]
  ------------------
  181|      0|        ERR_raise(ERR_LIB_EC, EC_R_BIGNUM_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  182|      0|        return 0;
  183|      0|    }
  184|    210|    num_bytes = BN_bn2lebinpad(bn, b_out, sizeof(b_out));
  185|    210|    if (num_bytes < 0) {
  ------------------
  |  Branch (185:9): [True: 0, False: 210]
  ------------------
  186|      0|        ERR_raise(ERR_LIB_EC, EC_R_BIGNUM_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  187|      0|        return 0;
  188|      0|    }
  189|    210|    bin66_to_felem(out, b_out);
  190|    210|    return 1;
  191|    210|}
ecp_nistp521.c:bin66_to_felem:
  144|    210|{
  145|    210|    out[0] = (*((limb *)&in[0])) & bottom58bits;
  146|    210|    out[1] = (*((limb_aX *)&in[7]) >> 2) & bottom58bits;
  147|    210|    out[2] = (*((limb_aX *)&in[14]) >> 4) & bottom58bits;
  148|    210|    out[3] = (*((limb_aX *)&in[21]) >> 6) & bottom58bits;
  149|    210|    out[4] = (*((limb_aX *)&in[29])) & bottom58bits;
  150|    210|    out[5] = (*((limb_aX *)&in[36]) >> 2) & bottom58bits;
  151|    210|    out[6] = (*((limb_aX *)&in[43]) >> 4) & bottom58bits;
  152|    210|    out[7] = (*((limb_aX *)&in[50]) >> 6) & bottom58bits;
  153|    210|    out[8] = (*((limb_aX *)&in[58])) & bottom57bits;
  154|    210|}
ecp_nistp521.c:felem_inv:
  669|     70|{
  670|     70|    felem ftmp, ftmp2, ftmp3, ftmp4;
  671|     70|    largefelem tmp;
  672|     70|    unsigned i;
  673|       |
  674|     70|    felem_square(tmp, in);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  675|     70|    felem_reduce(ftmp, tmp); /* 2^1 */
  676|     70|    felem_mul(tmp, in, ftmp);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  677|     70|    felem_reduce(ftmp, tmp); /* 2^2 - 2^0 */
  678|     70|    felem_assign(ftmp2, ftmp);
  679|     70|    felem_square(tmp, ftmp);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  680|     70|    felem_reduce(ftmp, tmp); /* 2^3 - 2^1 */
  681|     70|    felem_mul(tmp, in, ftmp);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  682|     70|    felem_reduce(ftmp, tmp); /* 2^3 - 2^0 */
  683|     70|    felem_square(tmp, ftmp);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  684|     70|    felem_reduce(ftmp, tmp); /* 2^4 - 2^1 */
  685|       |
  686|     70|    felem_square(tmp, ftmp2);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  687|     70|    felem_reduce(ftmp3, tmp); /* 2^3 - 2^1 */
  688|     70|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  689|     70|    felem_reduce(ftmp3, tmp); /* 2^4 - 2^2 */
  690|     70|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  691|     70|    felem_reduce(ftmp3, tmp); /* 2^4 - 2^0 */
  692|       |
  693|     70|    felem_assign(ftmp2, ftmp3);
  694|     70|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  695|     70|    felem_reduce(ftmp3, tmp); /* 2^5 - 2^1 */
  696|     70|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  697|     70|    felem_reduce(ftmp3, tmp); /* 2^6 - 2^2 */
  698|     70|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  699|     70|    felem_reduce(ftmp3, tmp); /* 2^7 - 2^3 */
  700|     70|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  701|     70|    felem_reduce(ftmp3, tmp); /* 2^8 - 2^4 */
  702|     70|    felem_mul(tmp, ftmp3, ftmp);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  703|     70|    felem_reduce(ftmp4, tmp); /* 2^8 - 2^1 */
  704|     70|    felem_square(tmp, ftmp4);
  ------------------
  |  |  642|     70|#define felem_square felem_square_ref
  ------------------
  705|     70|    felem_reduce(ftmp4, tmp); /* 2^9 - 2^2 */
  706|     70|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  707|     70|    felem_reduce(ftmp3, tmp); /* 2^8 - 2^0 */
  708|     70|    felem_assign(ftmp2, ftmp3);
  709|       |
  710|    630|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (710:17): [True: 560, False: 70]
  ------------------
  711|    560|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|    560|#define felem_square felem_square_ref
  ------------------
  712|    560|        felem_reduce(ftmp3, tmp); /* 2^16 - 2^8 */
  713|    560|    }
  714|     70|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  715|     70|    felem_reduce(ftmp3, tmp); /* 2^16 - 2^0 */
  716|     70|    felem_assign(ftmp2, ftmp3);
  717|       |
  718|  1.19k|    for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (718:17): [True: 1.12k, False: 70]
  ------------------
  719|  1.12k|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|  1.12k|#define felem_square felem_square_ref
  ------------------
  720|  1.12k|        felem_reduce(ftmp3, tmp); /* 2^32 - 2^16 */
  721|  1.12k|    }
  722|     70|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  723|     70|    felem_reduce(ftmp3, tmp); /* 2^32 - 2^0 */
  724|     70|    felem_assign(ftmp2, ftmp3);
  725|       |
  726|  2.31k|    for (i = 0; i < 32; i++) {
  ------------------
  |  Branch (726:17): [True: 2.24k, False: 70]
  ------------------
  727|  2.24k|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|  2.24k|#define felem_square felem_square_ref
  ------------------
  728|  2.24k|        felem_reduce(ftmp3, tmp); /* 2^64 - 2^32 */
  729|  2.24k|    }
  730|     70|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  731|     70|    felem_reduce(ftmp3, tmp); /* 2^64 - 2^0 */
  732|     70|    felem_assign(ftmp2, ftmp3);
  733|       |
  734|  4.55k|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (734:17): [True: 4.48k, False: 70]
  ------------------
  735|  4.48k|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|  4.48k|#define felem_square felem_square_ref
  ------------------
  736|  4.48k|        felem_reduce(ftmp3, tmp); /* 2^128 - 2^64 */
  737|  4.48k|    }
  738|     70|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  739|     70|    felem_reduce(ftmp3, tmp); /* 2^128 - 2^0 */
  740|     70|    felem_assign(ftmp2, ftmp3);
  741|       |
  742|  9.03k|    for (i = 0; i < 128; i++) {
  ------------------
  |  Branch (742:17): [True: 8.96k, False: 70]
  ------------------
  743|  8.96k|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|  8.96k|#define felem_square felem_square_ref
  ------------------
  744|  8.96k|        felem_reduce(ftmp3, tmp); /* 2^256 - 2^128 */
  745|  8.96k|    }
  746|     70|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  747|     70|    felem_reduce(ftmp3, tmp); /* 2^256 - 2^0 */
  748|     70|    felem_assign(ftmp2, ftmp3);
  749|       |
  750|  17.9k|    for (i = 0; i < 256; i++) {
  ------------------
  |  Branch (750:17): [True: 17.9k, False: 70]
  ------------------
  751|  17.9k|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|  17.9k|#define felem_square felem_square_ref
  ------------------
  752|  17.9k|        felem_reduce(ftmp3, tmp); /* 2^512 - 2^256 */
  753|  17.9k|    }
  754|     70|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  755|     70|    felem_reduce(ftmp3, tmp); /* 2^512 - 2^0 */
  756|       |
  757|    700|    for (i = 0; i < 9; i++) {
  ------------------
  |  Branch (757:17): [True: 630, False: 70]
  ------------------
  758|    630|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|    630|#define felem_square felem_square_ref
  ------------------
  759|    630|        felem_reduce(ftmp3, tmp); /* 2^521 - 2^9 */
  760|    630|    }
  761|     70|    felem_mul(tmp, ftmp3, ftmp4);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  762|     70|    felem_reduce(ftmp3, tmp); /* 2^521 - 2^2 */
  763|     70|    felem_mul(tmp, ftmp3, in);
  ------------------
  |  |  643|     70|#define felem_mul felem_mul_ref
  ------------------
  764|     70|    felem_reduce(out, tmp); /* 2^521 - 3 */
  765|     70|}
ecp_nistp521.c:felem_assign:
  220|   137k|{
  221|   137k|    out[0] = in[0];
  222|   137k|    out[1] = in[1];
  223|   137k|    out[2] = in[2];
  224|   137k|    out[3] = in[3];
  225|   137k|    out[4] = in[4];
  226|   137k|    out[5] = in[5];
  227|   137k|    out[6] = in[6];
  228|   137k|    out[7] = in[7];
  229|   137k|    out[8] = in[8];
  230|   137k|}
ecp_nistp521.c:felem_square_ref:
  403|   109k|{
  404|   109k|    felem inx2, inx4;
  405|   109k|    felem_scalar(inx2, in, 2);
  406|   109k|    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|   109k|    out[0] = ((uint128_t)in[0]) * in[0];
  420|   109k|    out[1] = ((uint128_t)in[0]) * inx2[1];
  421|   109k|    out[2] = ((uint128_t)in[0]) * inx2[2] + ((uint128_t)in[1]) * in[1];
  422|   109k|    out[3] = ((uint128_t)in[0]) * inx2[3] + ((uint128_t)in[1]) * inx2[2];
  423|   109k|    out[4] = ((uint128_t)in[0]) * inx2[4] + ((uint128_t)in[1]) * inx2[3] + ((uint128_t)in[2]) * in[2];
  424|   109k|    out[5] = ((uint128_t)in[0]) * inx2[5] + ((uint128_t)in[1]) * inx2[4] + ((uint128_t)in[2]) * inx2[3];
  425|   109k|    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|   109k|    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|   109k|    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|   109k|    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|   109k|    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|   109k|    out[2] += ((uint128_t)in[3]) * inx4[8] + ((uint128_t)in[4]) * inx4[7] + ((uint128_t)in[5]) * inx4[6];
  446|       |
  447|       |    /* 12 */
  448|   109k|    out[3] += ((uint128_t)in[4]) * inx4[8] + ((uint128_t)in[5]) * inx4[7] + ((uint128_t)in[6]) * inx2[6];
  449|       |
  450|       |    /* 13 */
  451|   109k|    out[4] += ((uint128_t)in[5]) * inx4[8] + ((uint128_t)in[6]) * inx4[7];
  452|       |
  453|       |    /* 14 */
  454|   109k|    out[5] += ((uint128_t)in[6]) * inx4[8] + ((uint128_t)in[7]) * inx2[7];
  455|       |
  456|       |    /* 15 */
  457|   109k|    out[6] += ((uint128_t)in[7]) * inx4[8];
  458|       |
  459|       |    /* 16 */
  460|   109k|    out[7] += ((uint128_t)in[8]) * inx2[8];
  461|   109k|}
ecp_nistp521.c:felem_scalar:
  248|   329k|{
  249|   329k|    out[0] = in[0] * scalar;
  250|   329k|    out[1] = in[1] * scalar;
  251|   329k|    out[2] = in[2] * scalar;
  252|   329k|    out[3] = in[3] * scalar;
  253|   329k|    out[4] = in[4] * scalar;
  254|   329k|    out[5] = in[5] * scalar;
  255|   329k|    out[6] = in[6] * scalar;
  256|   329k|    out[7] = in[7] * scalar;
  257|   329k|    out[8] = in[8] * scalar;
  258|   329k|}
ecp_nistp521.c:felem_reduce:
  523|   192k|{
  524|   192k|    u64 overflow1, overflow2;
  525|       |
  526|   192k|    out[0] = ((limb)in[0]) & bottom58bits;
  527|   192k|    out[1] = ((limb)in[1]) & bottom58bits;
  528|   192k|    out[2] = ((limb)in[2]) & bottom58bits;
  529|   192k|    out[3] = ((limb)in[3]) & bottom58bits;
  530|   192k|    out[4] = ((limb)in[4]) & bottom58bits;
  531|   192k|    out[5] = ((limb)in[5]) & bottom58bits;
  532|   192k|    out[6] = ((limb)in[6]) & bottom58bits;
  533|   192k|    out[7] = ((limb)in[7]) & bottom58bits;
  534|   192k|    out[8] = ((limb)in[8]) & bottom58bits;
  535|       |
  536|       |    /* out[i] < 2^58 */
  537|       |
  538|   192k|    out[1] += ((limb)in[0]) >> 58;
  539|   192k|    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|   192k|    out[2] += ((limb)(in[0] >> 64)) >> 52;
  545|       |
  546|   192k|    out[2] += ((limb)in[1]) >> 58;
  547|   192k|    out[2] += (((limb)(in[1] >> 64)) & bottom52bits) << 6;
  548|   192k|    out[3] += ((limb)(in[1] >> 64)) >> 52;
  549|       |
  550|   192k|    out[3] += ((limb)in[2]) >> 58;
  551|   192k|    out[3] += (((limb)(in[2] >> 64)) & bottom52bits) << 6;
  552|   192k|    out[4] += ((limb)(in[2] >> 64)) >> 52;
  553|       |
  554|   192k|    out[4] += ((limb)in[3]) >> 58;
  555|   192k|    out[4] += (((limb)(in[3] >> 64)) & bottom52bits) << 6;
  556|   192k|    out[5] += ((limb)(in[3] >> 64)) >> 52;
  557|       |
  558|   192k|    out[5] += ((limb)in[4]) >> 58;
  559|   192k|    out[5] += (((limb)(in[4] >> 64)) & bottom52bits) << 6;
  560|   192k|    out[6] += ((limb)(in[4] >> 64)) >> 52;
  561|       |
  562|   192k|    out[6] += ((limb)in[5]) >> 58;
  563|   192k|    out[6] += (((limb)(in[5] >> 64)) & bottom52bits) << 6;
  564|   192k|    out[7] += ((limb)(in[5] >> 64)) >> 52;
  565|       |
  566|   192k|    out[7] += ((limb)in[6]) >> 58;
  567|   192k|    out[7] += (((limb)(in[6] >> 64)) & bottom52bits) << 6;
  568|   192k|    out[8] += ((limb)(in[6] >> 64)) >> 52;
  569|       |
  570|   192k|    out[8] += ((limb)in[7]) >> 58;
  571|   192k|    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|   192k|    overflow1 = ((limb)(in[7] >> 64)) >> 52;
  577|       |
  578|   192k|    overflow1 += ((limb)in[8]) >> 58;
  579|   192k|    overflow1 += (((limb)(in[8] >> 64)) & bottom52bits) << 6;
  580|   192k|    overflow2 = ((limb)(in[8] >> 64)) >> 52;
  581|       |
  582|   192k|    overflow1 <<= 1; /* overflow1 < 2^13 + 2^7 + 2^59 */
  583|   192k|    overflow2 <<= 1; /* overflow2 < 2^13 */
  584|       |
  585|   192k|    out[0] += overflow1; /* out[0] < 2^60 */
  586|   192k|    out[1] += overflow2; /* out[1] < 2^59 + 2^6 + 2^13 */
  587|       |
  588|   192k|    out[1] += out[0] >> 58;
  589|   192k|    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|   192k|}
ecp_nistp521.c:felem_mul_ref:
  472|   101k|{
  473|   101k|    felem in2x2;
  474|   101k|    felem_scalar(in2x2, in2, 2);
  475|       |
  476|   101k|    out[0] = ((uint128_t)in1[0]) * in2[0];
  477|       |
  478|   101k|    out[1] = ((uint128_t)in1[0]) * in2[1] + ((uint128_t)in1[1]) * in2[0];
  479|       |
  480|   101k|    out[2] = ((uint128_t)in1[0]) * in2[2] + ((uint128_t)in1[1]) * in2[1] + ((uint128_t)in1[2]) * in2[0];
  481|       |
  482|   101k|    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|   101k|    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|   101k|    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|   101k|    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|   101k|    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|   101k|    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|   101k|    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|   101k|    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|   101k|    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|   101k|    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|   101k|    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|   101k|    out[5] += ((uint128_t)in1[6]) * in2x2[8] + ((uint128_t)in1[7]) * in2x2[7] + ((uint128_t)in1[8]) * in2x2[6];
  507|       |
  508|   101k|    out[6] += ((uint128_t)in1[7]) * in2x2[8] + ((uint128_t)in1[8]) * in2x2[7];
  509|       |
  510|   101k|    out[7] += ((uint128_t)in1[8]) * in2x2[8];
  511|   101k|}
ecp_nistp521.c:felem_contract:
  859|    350|{
  860|    350|    limb is_p, is_greater, sign;
  861|    350|    static const limb two58 = ((limb)1) << 58;
  862|       |
  863|    350|    felem_assign(out, in);
  864|       |
  865|    350|    out[0] += out[8] >> 57;
  866|    350|    out[8] &= bottom57bits;
  867|       |    /* out[8] < 2^57 */
  868|    350|    out[1] += out[0] >> 58;
  869|    350|    out[0] &= bottom58bits;
  870|    350|    out[2] += out[1] >> 58;
  871|    350|    out[1] &= bottom58bits;
  872|    350|    out[3] += out[2] >> 58;
  873|    350|    out[2] &= bottom58bits;
  874|    350|    out[4] += out[3] >> 58;
  875|    350|    out[3] &= bottom58bits;
  876|    350|    out[5] += out[4] >> 58;
  877|    350|    out[4] &= bottom58bits;
  878|    350|    out[6] += out[5] >> 58;
  879|    350|    out[5] &= bottom58bits;
  880|    350|    out[7] += out[6] >> 58;
  881|    350|    out[6] &= bottom58bits;
  882|    350|    out[8] += out[7] >> 58;
  883|    350|    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|    350|    is_p = out[0] ^ kPrime[0];
  897|    350|    is_p |= out[1] ^ kPrime[1];
  898|    350|    is_p |= out[2] ^ kPrime[2];
  899|    350|    is_p |= out[3] ^ kPrime[3];
  900|    350|    is_p |= out[4] ^ kPrime[4];
  901|    350|    is_p |= out[5] ^ kPrime[5];
  902|    350|    is_p |= out[6] ^ kPrime[6];
  903|    350|    is_p |= out[7] ^ kPrime[7];
  904|    350|    is_p |= out[8] ^ kPrime[8];
  905|       |
  906|    350|    is_p--;
  907|    350|    is_p &= is_p << 32;
  908|    350|    is_p &= is_p << 16;
  909|    350|    is_p &= is_p << 8;
  910|    350|    is_p &= is_p << 4;
  911|    350|    is_p &= is_p << 2;
  912|    350|    is_p &= is_p << 1;
  913|    350|    is_p = 0 - (is_p >> 63);
  914|    350|    is_p = ~is_p;
  915|       |
  916|       |    /* is_p is 0 iff |out| == 2^521-1 and all ones otherwise */
  917|       |
  918|    350|    out[0] &= is_p;
  919|    350|    out[1] &= is_p;
  920|    350|    out[2] &= is_p;
  921|    350|    out[3] &= is_p;
  922|    350|    out[4] &= is_p;
  923|    350|    out[5] &= is_p;
  924|    350|    out[6] &= is_p;
  925|    350|    out[7] &= is_p;
  926|    350|    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|    350|    is_greater = out[8] >> 57;
  933|    350|    is_greater |= is_greater << 32;
  934|    350|    is_greater |= is_greater << 16;
  935|    350|    is_greater |= is_greater << 8;
  936|    350|    is_greater |= is_greater << 4;
  937|    350|    is_greater |= is_greater << 2;
  938|    350|    is_greater |= is_greater << 1;
  939|    350|    is_greater = 0 - (is_greater >> 63);
  940|       |
  941|    350|    out[0] -= kPrime[0] & is_greater;
  942|    350|    out[1] -= kPrime[1] & is_greater;
  943|    350|    out[2] -= kPrime[2] & is_greater;
  944|    350|    out[3] -= kPrime[3] & is_greater;
  945|    350|    out[4] -= kPrime[4] & is_greater;
  946|    350|    out[5] -= kPrime[5] & is_greater;
  947|    350|    out[6] -= kPrime[6] & is_greater;
  948|    350|    out[7] -= kPrime[7] & is_greater;
  949|    350|    out[8] -= kPrime[8] & is_greater;
  950|       |
  951|       |    /* Eliminate negative coefficients */
  952|    350|    sign = -(out[0] >> 63);
  953|    350|    out[0] += (two58 & sign);
  954|    350|    out[1] -= (1 & sign);
  955|    350|    sign = -(out[1] >> 63);
  956|    350|    out[1] += (two58 & sign);
  957|    350|    out[2] -= (1 & sign);
  958|    350|    sign = -(out[2] >> 63);
  959|    350|    out[2] += (two58 & sign);
  960|    350|    out[3] -= (1 & sign);
  961|    350|    sign = -(out[3] >> 63);
  962|    350|    out[3] += (two58 & sign);
  963|    350|    out[4] -= (1 & sign);
  964|    350|    sign = -(out[4] >> 63);
  965|    350|    out[4] += (two58 & sign);
  966|    350|    out[5] -= (1 & sign);
  967|    350|    sign = -(out[0] >> 63);
  968|    350|    out[5] += (two58 & sign);
  969|    350|    out[6] -= (1 & sign);
  970|    350|    sign = -(out[6] >> 63);
  971|    350|    out[6] += (two58 & sign);
  972|    350|    out[7] -= (1 & sign);
  973|    350|    sign = -(out[7] >> 63);
  974|    350|    out[7] += (two58 & sign);
  975|    350|    out[8] -= (1 & sign);
  976|    350|    sign = -(out[5] >> 63);
  977|    350|    out[5] += (two58 & sign);
  978|    350|    out[6] -= (1 & sign);
  979|    350|    sign = -(out[6] >> 63);
  980|    350|    out[6] += (two58 & sign);
  981|    350|    out[7] -= (1 & sign);
  982|    350|    sign = -(out[7] >> 63);
  983|    350|    out[7] += (two58 & sign);
  984|    350|    out[8] -= (1 & sign);
  985|    350|}
ecp_nistp521.c:felem_to_BN:
  195|    560|{
  196|    560|    felem_bytearray b_out;
  197|    560|    felem_to_bin66(b_out, in);
  198|    560|    return BN_lebin2bn(b_out, sizeof(b_out), out);
  199|    560|}
ecp_nistp521.c:felem_to_bin66:
  161|    560|{
  162|    560|    memset(out, 0, 66);
  163|    560|    (*((limb *)&out[0])) = in[0];
  164|    560|    (*((limb_aX *)&out[7])) |= in[1] << 2;
  165|    560|    (*((limb_aX *)&out[14])) |= in[2] << 4;
  166|    560|    (*((limb_aX *)&out[21])) |= in[3] << 6;
  167|    560|    (*((limb_aX *)&out[29])) = in[4];
  168|    560|    (*((limb_aX *)&out[36])) |= in[5] << 2;
  169|    560|    (*((limb_aX *)&out[43])) |= in[6] << 4;
  170|    560|    (*((limb_aX *)&out[50])) |= in[7] << 6;
  171|    560|    (*((limb_aX *)&out[58])) = in[8];
  172|    560|}
ecp_nistp521.c:point_add:
 1126|  9.10k|{
 1127|  9.10k|    felem ftmp, ftmp2, ftmp3, ftmp4, ftmp5, ftmp6, x_out, y_out, z_out;
 1128|  9.10k|    largefelem tmp, tmp2;
 1129|  9.10k|    limb x_equal, y_equal, z1_is_zero, z2_is_zero;
 1130|  9.10k|    limb points_equal;
 1131|       |
 1132|  9.10k|    z1_is_zero = felem_is_zero(z1);
 1133|  9.10k|    z2_is_zero = felem_is_zero(z2);
 1134|       |
 1135|       |    /* ftmp = z1z1 = z1**2 */
 1136|  9.10k|    felem_square(tmp, z1);
  ------------------
  |  |  642|  9.10k|#define felem_square felem_square_ref
  ------------------
 1137|  9.10k|    felem_reduce(ftmp, tmp);
 1138|       |
 1139|  9.10k|    if (!mixed) {
  ------------------
  |  Branch (1139:9): [True: 0, False: 9.10k]
  ------------------
 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|  9.10k|    } else {
 1170|       |        /*
 1171|       |         * We'll assume z2 = 1 (special case z2 = 0 is handled later)
 1172|       |         */
 1173|       |
 1174|       |        /* u1 = ftmp3 = x1*z2z2 */
 1175|  9.10k|        felem_assign(ftmp3, x1);
 1176|       |
 1177|       |        /* ftmp5 = 2*z1z2 */
 1178|  9.10k|        felem_scalar(ftmp5, z1, 2);
 1179|       |
 1180|       |        /* s1 = ftmp6 = y1 * z2**3 */
 1181|  9.10k|        felem_assign(ftmp6, y1);
 1182|  9.10k|    }
 1183|       |
 1184|       |    /* u2 = x2*z1z1 */
 1185|  9.10k|    felem_mul(tmp, x2, ftmp);
  ------------------
  |  |  643|  9.10k|#define felem_mul felem_mul_ref
  ------------------
 1186|       |    /* tmp[i] < 17*2^120 */
 1187|       |
 1188|       |    /* h = ftmp4 = u2 - u1 */
 1189|  9.10k|    felem_diff_128_64(tmp, ftmp3);
 1190|       |    /* tmp[i] < 17*2^120 + 2^63 */
 1191|  9.10k|    felem_reduce(ftmp4, tmp);
 1192|       |
 1193|  9.10k|    x_equal = felem_is_zero(ftmp4);
 1194|       |
 1195|       |    /* z_out = ftmp5 * h */
 1196|  9.10k|    felem_mul(tmp, ftmp5, ftmp4);
  ------------------
  |  |  643|  9.10k|#define felem_mul felem_mul_ref
  ------------------
 1197|  9.10k|    felem_reduce(z_out, tmp);
 1198|       |
 1199|       |    /* ftmp = z1 * z1z1 */
 1200|  9.10k|    felem_mul(tmp, ftmp, z1);
  ------------------
  |  |  643|  9.10k|#define felem_mul felem_mul_ref
  ------------------
 1201|  9.10k|    felem_reduce(ftmp, tmp);
 1202|       |
 1203|       |    /* s2 = tmp = y2 * z1**3 */
 1204|  9.10k|    felem_mul(tmp, y2, ftmp);
  ------------------
  |  |  643|  9.10k|#define felem_mul felem_mul_ref
  ------------------
 1205|       |    /* tmp[i] < 17*2^120 */
 1206|       |
 1207|       |    /* r = ftmp5 = (s2 - s1)*2 */
 1208|  9.10k|    felem_diff_128_64(tmp, ftmp6);
 1209|       |    /* tmp[i] < 17*2^120 + 2^63 */
 1210|  9.10k|    felem_reduce(ftmp5, tmp);
 1211|  9.10k|    y_equal = felem_is_zero(ftmp5);
 1212|  9.10k|    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|  9.10k|    points_equal = (x_equal & y_equal & (~z1_is_zero) & (~z2_is_zero));
 1231|       |
 1232|  9.10k|    if (points_equal) {
  ------------------
  |  Branch (1232:9): [True: 0, False: 9.10k]
  ------------------
 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|  9.10k|    felem_assign(ftmp, ftmp4);
 1255|  9.10k|    felem_scalar64(ftmp, 2);
 1256|       |    /* ftmp[i] < 2^61 */
 1257|  9.10k|    felem_square(tmp, ftmp);
  ------------------
  |  |  642|  9.10k|#define felem_square felem_square_ref
  ------------------
 1258|       |    /* tmp[i] < 17*2^122 */
 1259|  9.10k|    felem_reduce(ftmp, tmp);
 1260|       |
 1261|       |    /* J = ftmp2 = h * I */
 1262|  9.10k|    felem_mul(tmp, ftmp4, ftmp);
  ------------------
  |  |  643|  9.10k|#define felem_mul felem_mul_ref
  ------------------
 1263|  9.10k|    felem_reduce(ftmp2, tmp);
 1264|       |
 1265|       |    /* V = ftmp4 = U1 * I */
 1266|  9.10k|    felem_mul(tmp, ftmp3, ftmp);
  ------------------
  |  |  643|  9.10k|#define felem_mul felem_mul_ref
  ------------------
 1267|  9.10k|    felem_reduce(ftmp4, tmp);
 1268|       |
 1269|       |    /* x_out = r**2 - J - 2V */
 1270|  9.10k|    felem_square(tmp, ftmp5);
  ------------------
  |  |  642|  9.10k|#define felem_square felem_square_ref
  ------------------
 1271|       |    /* tmp[i] < 17*2^122 */
 1272|  9.10k|    felem_diff_128_64(tmp, ftmp2);
 1273|       |    /* tmp[i] < 17*2^122 + 2^63 */
 1274|  9.10k|    felem_assign(ftmp3, ftmp4);
 1275|  9.10k|    felem_scalar64(ftmp4, 2);
 1276|       |    /* ftmp4[i] < 2^61 */
 1277|  9.10k|    felem_diff_128_64(tmp, ftmp4);
 1278|       |    /* tmp[i] < 17*2^122 + 2^64 */
 1279|  9.10k|    felem_reduce(x_out, tmp);
 1280|       |
 1281|       |    /* y_out = r(V-x_out) - 2 * s1 * J */
 1282|  9.10k|    felem_diff64(ftmp3, x_out);
 1283|       |    /*
 1284|       |     * ftmp3[i] < 2^60 + 2^60 = 2^61
 1285|       |     */
 1286|  9.10k|    felem_mul(tmp, ftmp5, ftmp3);
  ------------------
  |  |  643|  9.10k|#define felem_mul felem_mul_ref
  ------------------
 1287|       |    /* tmp[i] < 17*2^122 */
 1288|  9.10k|    felem_mul(tmp2, ftmp6, ftmp2);
  ------------------
  |  |  643|  9.10k|#define felem_mul felem_mul_ref
  ------------------
 1289|       |    /* tmp2[i] < 17*2^120 */
 1290|  9.10k|    felem_scalar128(tmp2, 2);
 1291|       |    /* tmp2[i] < 17*2^121 */
 1292|  9.10k|    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|  9.10k|    felem_reduce(y_out, tmp);
 1299|       |
 1300|  9.10k|    copy_conditional(x_out, x2, z1_is_zero);
 1301|  9.10k|    copy_conditional(x_out, x1, z2_is_zero);
 1302|  9.10k|    copy_conditional(y_out, y2, z1_is_zero);
 1303|  9.10k|    copy_conditional(y_out, y1, z2_is_zero);
 1304|  9.10k|    copy_conditional(z_out, z2, z1_is_zero);
 1305|  9.10k|    copy_conditional(z_out, z1, z2_is_zero);
 1306|  9.10k|    felem_assign(x3, x_out);
 1307|  9.10k|    felem_assign(y3, y_out);
 1308|  9.10k|    felem_assign(z3, z_out);
 1309|  9.10k|}
ecp_nistp521.c:felem_is_zero:
  781|  36.4k|{
  782|  36.4k|    felem ftmp;
  783|  36.4k|    limb is_zero, is_p;
  784|  36.4k|    felem_assign(ftmp, in);
  785|       |
  786|  36.4k|    ftmp[0] += ftmp[8] >> 57;
  787|  36.4k|    ftmp[8] &= bottom57bits;
  788|       |    /* ftmp[8] < 2^57 */
  789|  36.4k|    ftmp[1] += ftmp[0] >> 58;
  790|  36.4k|    ftmp[0] &= bottom58bits;
  791|  36.4k|    ftmp[2] += ftmp[1] >> 58;
  792|  36.4k|    ftmp[1] &= bottom58bits;
  793|  36.4k|    ftmp[3] += ftmp[2] >> 58;
  794|  36.4k|    ftmp[2] &= bottom58bits;
  795|  36.4k|    ftmp[4] += ftmp[3] >> 58;
  796|  36.4k|    ftmp[3] &= bottom58bits;
  797|  36.4k|    ftmp[5] += ftmp[4] >> 58;
  798|  36.4k|    ftmp[4] &= bottom58bits;
  799|  36.4k|    ftmp[6] += ftmp[5] >> 58;
  800|  36.4k|    ftmp[5] &= bottom58bits;
  801|  36.4k|    ftmp[7] += ftmp[6] >> 58;
  802|  36.4k|    ftmp[6] &= bottom58bits;
  803|  36.4k|    ftmp[8] += ftmp[7] >> 58;
  804|  36.4k|    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|  36.4k|    is_zero = 0;
  814|  36.4k|    is_zero |= ftmp[0];
  815|  36.4k|    is_zero |= ftmp[1];
  816|  36.4k|    is_zero |= ftmp[2];
  817|  36.4k|    is_zero |= ftmp[3];
  818|  36.4k|    is_zero |= ftmp[4];
  819|  36.4k|    is_zero |= ftmp[5];
  820|  36.4k|    is_zero |= ftmp[6];
  821|  36.4k|    is_zero |= ftmp[7];
  822|  36.4k|    is_zero |= ftmp[8];
  823|       |
  824|  36.4k|    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|  36.4k|    is_zero = 0 - (is_zero >> 63);
  830|       |
  831|  36.4k|    is_p = ftmp[0] ^ kPrime[0];
  832|  36.4k|    is_p |= ftmp[1] ^ kPrime[1];
  833|  36.4k|    is_p |= ftmp[2] ^ kPrime[2];
  834|  36.4k|    is_p |= ftmp[3] ^ kPrime[3];
  835|  36.4k|    is_p |= ftmp[4] ^ kPrime[4];
  836|  36.4k|    is_p |= ftmp[5] ^ kPrime[5];
  837|  36.4k|    is_p |= ftmp[6] ^ kPrime[6];
  838|  36.4k|    is_p |= ftmp[7] ^ kPrime[7];
  839|  36.4k|    is_p |= ftmp[8] ^ kPrime[8];
  840|       |
  841|  36.4k|    is_p--;
  842|  36.4k|    is_p = 0 - (is_p >> 63);
  843|       |
  844|  36.4k|    is_zero |= is_p;
  845|  36.4k|    return is_zero;
  846|  36.4k|}
ecp_nistp521.c:felem_sum64:
  234|  27.3k|{
  235|  27.3k|    out[0] += in[0];
  236|  27.3k|    out[1] += in[1];
  237|  27.3k|    out[2] += in[2];
  238|  27.3k|    out[3] += in[3];
  239|  27.3k|    out[4] += in[4];
  240|  27.3k|    out[5] += in[5];
  241|  27.3k|    out[6] += in[6];
  242|  27.3k|    out[7] += in[7];
  243|  27.3k|    out[8] += in[8];
  244|  27.3k|}
ecp_nistp521.c:felem_diff_128_64:
  346|  54.6k|{
  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|  54.6k|    static const limb two63m6 = (((limb)1) << 63) - (((limb)1) << 6);
  356|  54.6k|    static const limb two63m5 = (((limb)1) << 63) - (((limb)1) << 5);
  357|       |
  358|  54.6k|    out[0] += two63m6 - in[0];
  359|  54.6k|    out[1] += two63m5 - in[1];
  360|  54.6k|    out[2] += two63m5 - in[2];
  361|  54.6k|    out[3] += two63m5 - in[3];
  362|  54.6k|    out[4] += two63m5 - in[4];
  363|  54.6k|    out[5] += two63m5 - in[5];
  364|  54.6k|    out[6] += two63m5 - in[6];
  365|  54.6k|    out[7] += two63m5 - in[7];
  366|  54.6k|    out[8] += two63m5 - in[8];
  367|  54.6k|}
ecp_nistp521.c:felem_scalar64:
  262|  54.6k|{
  263|  54.6k|    out[0] *= scalar;
  264|  54.6k|    out[1] *= scalar;
  265|  54.6k|    out[2] *= scalar;
  266|  54.6k|    out[3] *= scalar;
  267|  54.6k|    out[4] *= scalar;
  268|  54.6k|    out[5] *= scalar;
  269|  54.6k|    out[6] *= scalar;
  270|  54.6k|    out[7] *= scalar;
  271|  54.6k|    out[8] *= scalar;
  272|  54.6k|}
ecp_nistp521.c:felem_diff64:
  320|  27.3k|{
  321|       |    /*
  322|       |     * In order to prevent underflow, we add 0 mod p before subtracting.
  323|       |     */
  324|  27.3k|    static const limb two62m3 = (((limb)1) << 62) - (((limb)1) << 5);
  325|  27.3k|    static const limb two62m2 = (((limb)1) << 62) - (((limb)1) << 4);
  326|       |
  327|  27.3k|    out[0] += two62m3 - in[0];
  328|  27.3k|    out[1] += two62m2 - in[1];
  329|  27.3k|    out[2] += two62m2 - in[2];
  330|  27.3k|    out[3] += two62m2 - in[3];
  331|  27.3k|    out[4] += two62m2 - in[4];
  332|  27.3k|    out[5] += two62m2 - in[5];
  333|  27.3k|    out[6] += two62m2 - in[6];
  334|  27.3k|    out[7] += two62m2 - in[7];
  335|  27.3k|    out[8] += two62m2 - in[8];
  336|  27.3k|}
ecp_nistp521.c:felem_scalar128:
  276|  18.2k|{
  277|  18.2k|    out[0] *= scalar;
  278|  18.2k|    out[1] *= scalar;
  279|  18.2k|    out[2] *= scalar;
  280|  18.2k|    out[3] *= scalar;
  281|  18.2k|    out[4] *= scalar;
  282|  18.2k|    out[5] *= scalar;
  283|  18.2k|    out[6] *= scalar;
  284|  18.2k|    out[7] *= scalar;
  285|  18.2k|    out[8] *= scalar;
  286|  18.2k|}
ecp_nistp521.c:felem_diff128:
  377|  18.2k|{
  378|       |    /*
  379|       |     * In order to prevent underflow, we add 0 mod p before subtracting.
  380|       |     */
  381|  18.2k|    static const uint128_t two127m70 = (((uint128_t)1) << 127) - (((uint128_t)1) << 70);
  382|  18.2k|    static const uint128_t two127m69 = (((uint128_t)1) << 127) - (((uint128_t)1) << 69);
  383|       |
  384|  18.2k|    out[0] += (two127m70 - in[0]);
  385|  18.2k|    out[1] += (two127m69 - in[1]);
  386|  18.2k|    out[2] += (two127m69 - in[2]);
  387|  18.2k|    out[3] += (two127m69 - in[3]);
  388|  18.2k|    out[4] += (two127m69 - in[4]);
  389|  18.2k|    out[5] += (two127m69 - in[5]);
  390|  18.2k|    out[6] += (two127m69 - in[6]);
  391|  18.2k|    out[7] += (two127m69 - in[7]);
  392|  18.2k|    out[8] += (two127m69 - in[8]);
  393|  18.2k|}
ecp_nistp521.c:copy_conditional:
 1103|  54.6k|{
 1104|  54.6k|    unsigned i;
 1105|   546k|    for (i = 0; i < NLIMBS; ++i) {
  ------------------
  |  |  129|   546k|#define NLIMBS 9
  ------------------
  |  Branch (1105:17): [True: 491k, False: 54.6k]
  ------------------
 1106|   491k|        const limb tmp = mask & (in[i] ^ out[i]);
 1107|   491k|        out[i] ^= tmp;
 1108|   491k|    }
 1109|  54.6k|}
ecp_nistp521.c:point_double:
 1006|  9.10k|{
 1007|  9.10k|    largefelem tmp, tmp2;
 1008|  9.10k|    felem delta, gamma, beta, alpha, ftmp, ftmp2;
 1009|       |
 1010|  9.10k|    felem_assign(ftmp, x_in);
 1011|  9.10k|    felem_assign(ftmp2, x_in);
 1012|       |
 1013|       |    /* delta = z^2 */
 1014|  9.10k|    felem_square(tmp, z_in);
  ------------------
  |  |  642|  9.10k|#define felem_square felem_square_ref
  ------------------
 1015|  9.10k|    felem_reduce(delta, tmp); /* delta[i] < 2^59 + 2^14 */
 1016|       |
 1017|       |    /* gamma = y^2 */
 1018|  9.10k|    felem_square(tmp, y_in);
  ------------------
  |  |  642|  9.10k|#define felem_square felem_square_ref
  ------------------
 1019|  9.10k|    felem_reduce(gamma, tmp); /* gamma[i] < 2^59 + 2^14 */
 1020|       |
 1021|       |    /* beta = x*gamma */
 1022|  9.10k|    felem_mul(tmp, x_in, gamma);
  ------------------
  |  |  643|  9.10k|#define felem_mul felem_mul_ref
  ------------------
 1023|  9.10k|    felem_reduce(beta, tmp); /* beta[i] < 2^59 + 2^14 */
 1024|       |
 1025|       |    /* alpha = 3*(x-delta)*(x+delta) */
 1026|  9.10k|    felem_diff64(ftmp, delta);
 1027|       |    /* ftmp[i] < 2^61 */
 1028|  9.10k|    felem_sum64(ftmp2, delta);
 1029|       |    /* ftmp2[i] < 2^60 + 2^15 */
 1030|  9.10k|    felem_scalar64(ftmp2, 3);
 1031|       |    /* ftmp2[i] < 3*2^60 + 3*2^15 */
 1032|  9.10k|    felem_mul(tmp, ftmp, ftmp2);
  ------------------
  |  |  643|  9.10k|#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|  9.10k|    felem_reduce(alpha, tmp);
 1041|       |
 1042|       |    /* x' = alpha^2 - 8*beta */
 1043|  9.10k|    felem_square(tmp, alpha);
  ------------------
  |  |  642|  9.10k|#define felem_square felem_square_ref
  ------------------
 1044|       |    /*
 1045|       |     * tmp[i] < 17*2^120 < 2^125
 1046|       |     */
 1047|  9.10k|    felem_assign(ftmp, beta);
 1048|  9.10k|    felem_scalar64(ftmp, 8);
 1049|       |    /* ftmp[i] < 2^62 + 2^17 */
 1050|  9.10k|    felem_diff_128_64(tmp, ftmp);
 1051|       |    /* tmp[i] < 2^125 + 2^63 + 2^62 + 2^17 */
 1052|  9.10k|    felem_reduce(x_out, tmp);
 1053|       |
 1054|       |    /* z' = (y + z)^2 - gamma - delta */
 1055|  9.10k|    felem_sum64(delta, gamma);
 1056|       |    /* delta[i] < 2^60 + 2^15 */
 1057|  9.10k|    felem_assign(ftmp, y_in);
 1058|  9.10k|    felem_sum64(ftmp, z_in);
 1059|       |    /* ftmp[i] < 2^60 + 2^15 */
 1060|  9.10k|    felem_square(tmp, ftmp);
  ------------------
  |  |  642|  9.10k|#define felem_square felem_square_ref
  ------------------
 1061|       |    /*
 1062|       |     * tmp[i] < 17(2^122) < 2^127
 1063|       |     */
 1064|  9.10k|    felem_diff_128_64(tmp, delta);
 1065|       |    /* tmp[i] < 2^127 + 2^63 */
 1066|  9.10k|    felem_reduce(z_out, tmp);
 1067|       |
 1068|       |    /* y' = alpha*(4*beta - x') - 8*gamma^2 */
 1069|  9.10k|    felem_scalar64(beta, 4);
 1070|       |    /* beta[i] < 2^61 + 2^16 */
 1071|  9.10k|    felem_diff64(beta, x_out);
 1072|       |    /* beta[i] < 2^61 + 2^60 + 2^16 */
 1073|  9.10k|    felem_mul(tmp, alpha, beta);
  ------------------
  |  |  643|  9.10k|#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|  9.10k|    felem_square(tmp2, gamma);
  ------------------
  |  |  642|  9.10k|#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|  9.10k|    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|  9.10k|    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|  9.10k|    felem_reduce(y_out, tmp);
 1099|  9.10k|}
ecp_nistp521.c:batch_mul:
 1503|     70|{
 1504|     70|    int i, skip;
 1505|     70|    unsigned num, gen_mul = (g_scalar != NULL);
 1506|     70|    felem nq[3], tmp[4];
 1507|     70|    limb bits;
 1508|     70|    u8 sign, digit;
 1509|       |
 1510|       |    /* set nq to the point at infinity */
 1511|     70|    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|     70|    skip = 1; /* save two point operations in the first
 1519|       |               * round */
 1520|  9.24k|    for (i = (num_points ? 520 : 130); i >= 0; --i) {
  ------------------
  |  Branch (1520:15): [True: 0, False: 70]
  |  Branch (1520:40): [True: 9.17k, False: 70]
  ------------------
 1521|       |        /* double */
 1522|  9.17k|        if (!skip)
  ------------------
  |  Branch (1522:13): [True: 9.10k, False: 70]
  ------------------
 1523|  9.10k|            point_double(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2]);
 1524|       |
 1525|       |        /* add multiples of the generator */
 1526|  9.17k|        if (gen_mul && (i <= 130)) {
  ------------------
  |  Branch (1526:13): [True: 9.17k, False: 0]
  |  Branch (1526:24): [True: 9.17k, False: 0]
  ------------------
 1527|  9.17k|            bits = get_bit(g_scalar, i + 390) << 3;
 1528|  9.17k|            if (i < 130) {
  ------------------
  |  Branch (1528:17): [True: 9.10k, False: 70]
  ------------------
 1529|  9.10k|                bits |= get_bit(g_scalar, i + 260) << 2;
 1530|  9.10k|                bits |= get_bit(g_scalar, i + 130) << 1;
 1531|  9.10k|                bits |= get_bit(g_scalar, i);
 1532|  9.10k|            }
 1533|       |            /* select the point to add, in constant time */
 1534|  9.17k|            select_point(bits, 16, g_pre_comp, tmp);
 1535|  9.17k|            if (!skip) {
  ------------------
  |  Branch (1535:17): [True: 9.10k, False: 70]
  ------------------
 1536|       |                /* The 1 argument below is for "mixed" */
 1537|  9.10k|                point_add(nq[0], nq[1], nq[2],
 1538|  9.10k|                    nq[0], nq[1], nq[2], 1, tmp[0], tmp[1], tmp[2]);
 1539|  9.10k|            } else {
 1540|     70|                memcpy(nq, tmp, 3 * sizeof(felem));
 1541|     70|                skip = 0;
 1542|     70|            }
 1543|  9.17k|        }
 1544|       |
 1545|       |        /* do other additions every 5 doublings */
 1546|  9.17k|        if (num_points && (i % 5 == 0)) {
  ------------------
  |  Branch (1546:13): [True: 0, False: 9.17k]
  |  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|  9.17k|    }
 1576|     70|    felem_assign(x_out, nq[0]);
 1577|     70|    felem_assign(y_out, nq[1]);
 1578|     70|    felem_assign(z_out, nq[2]);
 1579|     70|}
ecp_nistp521.c:get_bit:
 1485|  36.4k|{
 1486|  36.4k|    if (i < 0)
  ------------------
  |  Branch (1486:9): [True: 0, False: 36.4k]
  ------------------
 1487|      0|        return 0;
 1488|  36.4k|    return (in[i >> 3] >> (i & 7)) & 1;
 1489|  36.4k|}
ecp_nistp521.c:select_point:
 1464|  9.17k|{
 1465|  9.17k|    unsigned i, j;
 1466|  9.17k|    limb *outlimbs = &out[0][0];
 1467|       |
 1468|  9.17k|    memset(out, 0, sizeof(*out) * 3);
 1469|       |
 1470|   155k|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1470:17): [True: 146k, False: 9.17k]
  ------------------
 1471|   146k|        const limb *inlimbs = &pre_comp[i][0][0];
 1472|   146k|        limb mask = i ^ idx;
 1473|   146k|        mask |= mask >> 4;
 1474|   146k|        mask |= mask >> 2;
 1475|   146k|        mask |= mask >> 1;
 1476|   146k|        mask &= 1;
 1477|   146k|        mask--;
 1478|  4.10M|        for (j = 0; j < NLIMBS * 3; j++)
  ------------------
  |  |  129|  4.10M|#define NLIMBS 9
  ------------------
  |  Branch (1478:21): [True: 3.96M, False: 146k]
  ------------------
 1479|  3.96M|            outlimbs[j] |= inlimbs[j] & mask;
 1480|   146k|    }
 1481|  9.17k|}

EC_GFp_nistz256_method:
 1570|  12.0k|{
 1571|  12.0k|    static const EC_METHOD ret = {
 1572|  12.0k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|  12.0k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1573|  12.0k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|  12.0k|#define NID_X9_62_prime_field           406
  ------------------
 1574|  12.0k|        ossl_ec_GFp_mont_group_init,
 1575|  12.0k|        ossl_ec_GFp_mont_group_finish,
 1576|  12.0k|        ossl_ec_GFp_mont_group_clear_finish,
 1577|  12.0k|        ossl_ec_GFp_mont_group_copy,
 1578|  12.0k|        ossl_ec_GFp_mont_group_set_curve,
 1579|  12.0k|        ossl_ec_GFp_simple_group_get_curve,
 1580|  12.0k|        ossl_ec_GFp_simple_group_get_degree,
 1581|  12.0k|        ossl_ec_group_simple_order_bits,
 1582|  12.0k|        ossl_ec_GFp_simple_group_check_discriminant,
 1583|  12.0k|        ossl_ec_GFp_simple_point_init,
 1584|  12.0k|        ossl_ec_GFp_simple_point_finish,
 1585|  12.0k|        ossl_ec_GFp_simple_point_clear_finish,
 1586|  12.0k|        ossl_ec_GFp_simple_point_copy,
 1587|  12.0k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1588|  12.0k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1589|  12.0k|        ecp_nistz256_get_affine,
 1590|  12.0k|        0, 0, 0,
 1591|  12.0k|        ossl_ec_GFp_simple_add,
 1592|  12.0k|        ossl_ec_GFp_simple_dbl,
 1593|  12.0k|        ossl_ec_GFp_simple_invert,
 1594|  12.0k|        ossl_ec_GFp_simple_is_at_infinity,
 1595|  12.0k|        ossl_ec_GFp_simple_is_on_curve,
 1596|  12.0k|        ossl_ec_GFp_simple_cmp,
 1597|  12.0k|        ossl_ec_GFp_simple_make_affine,
 1598|  12.0k|        ossl_ec_GFp_simple_points_make_affine,
 1599|  12.0k|        ecp_nistz256_points_mul, /* mul */
 1600|  12.0k|        ecp_nistz256_mult_precompute, /* precompute_mult */
 1601|  12.0k|        ecp_nistz256_window_have_precompute_mult, /* have_precompute_mult */
 1602|  12.0k|        ossl_ec_GFp_mont_field_mul,
 1603|  12.0k|        ossl_ec_GFp_mont_field_sqr,
 1604|  12.0k|        0, /* field_div */
 1605|  12.0k|        ossl_ec_GFp_mont_field_inv,
 1606|  12.0k|        ossl_ec_GFp_mont_field_encode,
 1607|  12.0k|        ossl_ec_GFp_mont_field_decode,
 1608|  12.0k|        ossl_ec_GFp_mont_field_set_to_one,
 1609|  12.0k|        ossl_ec_key_simple_priv2oct,
 1610|  12.0k|        ossl_ec_key_simple_oct2priv,
 1611|  12.0k|        0, /* set private */
 1612|  12.0k|        ossl_ec_key_simple_generate_key,
 1613|  12.0k|        ossl_ec_key_simple_check_key,
 1614|  12.0k|        ossl_ec_key_simple_generate_public_key,
 1615|  12.0k|        0, /* keycopy */
 1616|  12.0k|        0, /* keyfinish */
 1617|  12.0k|        ossl_ecdh_simple_compute_key,
 1618|  12.0k|        ossl_ecdsa_simple_sign_setup,
 1619|  12.0k|        ossl_ecdsa_simple_sign_sig,
 1620|  12.0k|        ossl_ecdsa_simple_verify_sig,
 1621|  12.0k|        ecp_nistz256_inv_mod_ord, /* can be #define-d NULL */
 1622|  12.0k|        0, /* blind_coordinates */
 1623|  12.0k|        0, /* ladder_pre */
 1624|  12.0k|        0, /* ladder_step */
 1625|  12.0k|        0, /* ladder_post */
 1626|  12.0k|        ecp_nistz256group_full_init
 1627|  12.0k|    };
 1628|       |
 1629|  12.0k|    return &ret;
 1630|  12.0k|}
ecp_nistz256.c:ecp_nistz256_get_affine:
 1149|    143|{
 1150|    143|    BN_ULONG z_inv2[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
 1151|    143|    BN_ULONG z_inv3[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
 1152|    143|    BN_ULONG x_aff[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
 1153|    143|    BN_ULONG y_aff[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
 1154|    143|    BN_ULONG point_x[P256_LIMBS], point_y[P256_LIMBS], point_z[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
 1155|    143|    BN_ULONG x_ret[P256_LIMBS], y_ret[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
 1156|       |
 1157|    143|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (1157:9): [True: 0, False: 143]
  ------------------
 1158|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1159|      0|        return 0;
 1160|      0|    }
 1161|       |
 1162|    143|    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: 143]
  |  Branch (1162:66): [True: 0, False: 143]
  |  Branch (1162:123): [True: 0, False: 143]
  ------------------
 1163|      0|        ERR_raise(ERR_LIB_EC, EC_R_COORDINATES_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1164|      0|        return 0;
 1165|      0|    }
 1166|       |
 1167|    143|    ecp_nistz256_mod_inverse(z_inv3, point_z);
 1168|    143|    ecp_nistz256_sqr_mont(z_inv2, z_inv3);
 1169|    143|    ecp_nistz256_mul_mont(x_aff, z_inv2, point_x);
 1170|       |
 1171|    143|    if (x != NULL) {
  ------------------
  |  Branch (1171:9): [True: 143, False: 0]
  ------------------
 1172|    143|        ecp_nistz256_from_mont(x_ret, x_aff);
 1173|    143|        if (!bn_set_words(x, x_ret, P256_LIMBS))
  ------------------
  |  |   41|    143|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    143|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    143|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1173:13): [True: 0, False: 143]
  ------------------
 1174|      0|            return 0;
 1175|    143|    }
 1176|       |
 1177|    143|    if (y != NULL) {
  ------------------
  |  Branch (1177:9): [True: 143, False: 0]
  ------------------
 1178|    143|        ecp_nistz256_mul_mont(z_inv3, z_inv3, z_inv2);
 1179|    143|        ecp_nistz256_mul_mont(y_aff, z_inv3, point_y);
 1180|    143|        ecp_nistz256_from_mont(y_ret, y_aff);
 1181|    143|        if (!bn_set_words(y, y_ret, P256_LIMBS))
  ------------------
  |  |   41|    143|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    143|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    143|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1181:13): [True: 0, False: 143]
  ------------------
 1182|      0|            return 0;
 1183|    143|    }
 1184|       |
 1185|    143|    return 1;
 1186|    143|}
ecp_nistz256.c:ecp_nistz256_bignum_to_field_elem:
  600|    429|{
  601|    429|    return bn_copy_words(out, in, P256_LIMBS);
  ------------------
  |  |   41|    429|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    429|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    429|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  602|    429|}
ecp_nistz256.c:ecp_nistz256_mod_inverse:
  520|    143|{
  521|       |    /*
  522|       |     * The poly is ffffffff 00000001 00000000 00000000 00000000 ffffffff
  523|       |     * ffffffff ffffffff We use FLT and used poly-2 as exponent
  524|       |     */
  525|    143|    BN_ULONG p2[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
  526|    143|    BN_ULONG p4[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
  527|    143|    BN_ULONG p8[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
  528|    143|    BN_ULONG p16[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
  529|    143|    BN_ULONG p32[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
  530|    143|    BN_ULONG res[P256_LIMBS];
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
  531|    143|    int i;
  532|       |
  533|    143|    ecp_nistz256_sqr_mont(res, in);
  534|    143|    ecp_nistz256_mul_mont(p2, res, in); /* 3*p */
  535|       |
  536|    143|    ecp_nistz256_sqr_mont(res, p2);
  537|    143|    ecp_nistz256_sqr_mont(res, res);
  538|    143|    ecp_nistz256_mul_mont(p4, res, p2); /* f*p */
  539|       |
  540|    143|    ecp_nistz256_sqr_mont(res, p4);
  541|    143|    ecp_nistz256_sqr_mont(res, res);
  542|    143|    ecp_nistz256_sqr_mont(res, res);
  543|    143|    ecp_nistz256_sqr_mont(res, res);
  544|    143|    ecp_nistz256_mul_mont(p8, res, p4); /* ff*p */
  545|       |
  546|    143|    ecp_nistz256_sqr_mont(res, p8);
  547|  1.14k|    for (i = 0; i < 7; i++)
  ------------------
  |  Branch (547:17): [True: 1.00k, False: 143]
  ------------------
  548|  1.00k|        ecp_nistz256_sqr_mont(res, res);
  549|    143|    ecp_nistz256_mul_mont(p16, res, p8); /* ffff*p */
  550|       |
  551|    143|    ecp_nistz256_sqr_mont(res, p16);
  552|  2.28k|    for (i = 0; i < 15; i++)
  ------------------
  |  Branch (552:17): [True: 2.14k, False: 143]
  ------------------
  553|  2.14k|        ecp_nistz256_sqr_mont(res, res);
  554|    143|    ecp_nistz256_mul_mont(p32, res, p16); /* ffffffff*p */
  555|       |
  556|    143|    ecp_nistz256_sqr_mont(res, p32);
  557|  4.57k|    for (i = 0; i < 31; i++)
  ------------------
  |  Branch (557:17): [True: 4.43k, False: 143]
  ------------------
  558|  4.43k|        ecp_nistz256_sqr_mont(res, res);
  559|    143|    ecp_nistz256_mul_mont(res, res, in);
  560|       |
  561|  18.4k|    for (i = 0; i < 32 * 4; i++)
  ------------------
  |  Branch (561:17): [True: 18.3k, False: 143]
  ------------------
  562|  18.3k|        ecp_nistz256_sqr_mont(res, res);
  563|    143|    ecp_nistz256_mul_mont(res, res, p32);
  564|       |
  565|  4.71k|    for (i = 0; i < 32; i++)
  ------------------
  |  Branch (565:17): [True: 4.57k, False: 143]
  ------------------
  566|  4.57k|        ecp_nistz256_sqr_mont(res, res);
  567|    143|    ecp_nistz256_mul_mont(res, res, p32);
  568|       |
  569|  2.43k|    for (i = 0; i < 16; i++)
  ------------------
  |  Branch (569:17): [True: 2.28k, False: 143]
  ------------------
  570|  2.28k|        ecp_nistz256_sqr_mont(res, res);
  571|    143|    ecp_nistz256_mul_mont(res, res, p16);
  572|       |
  573|  1.28k|    for (i = 0; i < 8; i++)
  ------------------
  |  Branch (573:17): [True: 1.14k, False: 143]
  ------------------
  574|  1.14k|        ecp_nistz256_sqr_mont(res, res);
  575|    143|    ecp_nistz256_mul_mont(res, res, p8);
  576|       |
  577|    143|    ecp_nistz256_sqr_mont(res, res);
  578|    143|    ecp_nistz256_sqr_mont(res, res);
  579|    143|    ecp_nistz256_sqr_mont(res, res);
  580|    143|    ecp_nistz256_sqr_mont(res, res);
  581|    143|    ecp_nistz256_mul_mont(res, res, p4);
  582|       |
  583|    143|    ecp_nistz256_sqr_mont(res, res);
  584|    143|    ecp_nistz256_sqr_mont(res, res);
  585|    143|    ecp_nistz256_mul_mont(res, res, p2);
  586|       |
  587|    143|    ecp_nistz256_sqr_mont(res, res);
  588|    143|    ecp_nistz256_sqr_mont(res, res);
  589|    143|    ecp_nistz256_mul_mont(res, res, in);
  590|       |
  591|    143|    memcpy(r, res, sizeof(res));
  592|    143|}
ecp_nistz256.c:ecp_nistz256_points_mul:
  936|    143|{
  937|    143|    int i = 0, ret = 0, no_precomp_for_generator = 0, p_is_infinity = 0;
  938|    143|    unsigned char p_str[33] = { 0 };
  939|    143|    const PRECOMP256_ROW *preComputedTable = NULL;
  940|    143|    const NISTZ256_PRE_COMP *pre_comp = NULL;
  941|    143|    const EC_POINT *generator = NULL;
  942|    143|    const BIGNUM **new_scalars = NULL;
  943|    143|    const EC_POINT **new_points = NULL;
  944|    143|    unsigned int idx = 0;
  945|    143|    const unsigned int window_size = 7;
  946|    143|    const unsigned int mask = (1 << (window_size + 1)) - 1;
  947|    143|    unsigned int wvalue;
  948|    143|    ALIGN32 union {
  ------------------
  |  |   30|    143|#define ALIGN32 __attribute((aligned(32)))
  ------------------
  949|    143|        P256_POINT p;
  950|    143|        P256_POINT_AFFINE a;
  951|    143|    } t, p;
  952|    143|    BIGNUM *tmp_scalar;
  953|       |
  954|    143|    if ((num + 1) == 0 || (num + 1) > OPENSSL_MALLOC_MAX_NELEMS(void *)) {
  ------------------
  |  |  168|    143|#define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U << (sizeof(int) * 8 - 1)) - 1) / sizeof(type))
  ------------------
  |  Branch (954:9): [True: 0, False: 143]
  |  Branch (954:27): [True: 0, False: 143]
  ------------------
  955|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  956|      0|        return 0;
  957|      0|    }
  958|       |
  959|    143|    memset(&p, 0, sizeof(p));
  960|    143|    BN_CTX_start(ctx);
  961|       |
  962|    143|    if (scalar) {
  ------------------
  |  Branch (962:9): [True: 143, False: 0]
  ------------------
  963|    143|        generator = EC_GROUP_get0_generator(group);
  964|    143|        if (generator == NULL) {
  ------------------
  |  Branch (964:13): [True: 0, False: 143]
  ------------------
  965|      0|            ERR_raise(ERR_LIB_EC, EC_R_UNDEFINED_GENERATOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  966|      0|            goto err;
  967|      0|        }
  968|       |
  969|       |        /* look if we can use precomputed multiples of generator */
  970|    143|        pre_comp = group->pre_comp.nistz256;
  971|       |
  972|    143|        if (pre_comp) {
  ------------------
  |  Branch (972:13): [True: 0, False: 143]
  ------------------
  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|    143|        if (preComputedTable == NULL && ecp_nistz256_is_affine_G(generator)) {
  ------------------
  |  Branch (994:13): [True: 143, False: 0]
  |  Branch (994:41): [True: 143, 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|    143|            preComputedTable = ecp_nistz256_precomputed;
 1002|    143|        }
 1003|       |
 1004|    143|        if (preComputedTable) {
  ------------------
  |  Branch (1004:13): [True: 143, False: 0]
  ------------------
 1005|    143|            BN_ULONG infty;
  ------------------
  |  |   37|    143|#define BN_ULONG unsigned long
  ------------------
 1006|       |
 1007|    143|            if ((BN_num_bits(scalar) > 256)
  ------------------
  |  Branch (1007:17): [True: 0, False: 143]
  ------------------
 1008|    143|                || BN_is_negative(scalar)) {
  ------------------
  |  Branch (1008:20): [True: 0, False: 143]
  ------------------
 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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1014|      0|                    goto err;
 1015|      0|                }
 1016|      0|                scalar = tmp_scalar;
 1017|      0|            }
 1018|       |
 1019|    715|            for (i = 0; i < bn_get_top(scalar) * BN_BYTES; i += BN_BYTES) {
  ------------------
  |  |   38|    715|#define BN_BYTES 8
  ------------------
                          for (i = 0; i < bn_get_top(scalar) * BN_BYTES; i += BN_BYTES) {
  ------------------
  |  |   38|    572|#define BN_BYTES 8
  ------------------
  |  Branch (1019:25): [True: 572, False: 143]
  ------------------
 1020|    572|                BN_ULONG d = bn_get_words(scalar)[i / BN_BYTES];
  ------------------
  |  |   37|    572|#define BN_ULONG unsigned long
  ------------------
                              BN_ULONG d = bn_get_words(scalar)[i / BN_BYTES];
  ------------------
  |  |   38|    572|#define BN_BYTES 8
  ------------------
 1021|       |
 1022|    572|                p_str[i + 0] = (unsigned char)d;
 1023|    572|                p_str[i + 1] = (unsigned char)(d >> 8);
 1024|    572|                p_str[i + 2] = (unsigned char)(d >> 16);
 1025|    572|                p_str[i + 3] = (unsigned char)(d >>= 24);
 1026|    572|                if (BN_BYTES == 8) {
  ------------------
  |  |   38|    572|#define BN_BYTES 8
  ------------------
  |  Branch (1026:21): [True: 572, Folded]
  ------------------
 1027|    572|                    d >>= 8;
 1028|    572|                    p_str[i + 4] = (unsigned char)d;
 1029|    572|                    p_str[i + 5] = (unsigned char)(d >> 8);
 1030|    572|                    p_str[i + 6] = (unsigned char)(d >> 16);
 1031|    572|                    p_str[i + 7] = (unsigned char)(d >> 24);
 1032|    572|                }
 1033|    572|            }
 1034|       |
 1035|    286|            for (; i < 33; i++)
  ------------------
  |  Branch (1035:20): [True: 143, False: 143]
  ------------------
 1036|    143|                p_str[i] = 0;
 1037|       |
 1038|       |            /* First window */
 1039|    143|            wvalue = (p_str[0] << 1) & mask;
 1040|    143|            idx += window_size;
 1041|       |
 1042|    143|            wvalue = _booth_recode_w7(wvalue);
 1043|       |
 1044|    143|            ecp_nistz256_gather_w7(&p.a, preComputedTable[0],
 1045|    143|                wvalue >> 1);
 1046|       |
 1047|    143|            ecp_nistz256_neg(p.p.Z, p.p.Y);
 1048|    143|            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|    143|            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|    143|            if (P256_LIMBS == 8)
  ------------------
  |  |   41|    143|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    143|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    143|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1056:17): [Folded, False: 143]
  ------------------
 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|    143|            infty = 0 - is_zero(infty);
 1060|    143|            infty = ~infty;
 1061|       |
 1062|    143|            p.p.Z[0] = ONE[0] & infty;
 1063|    143|            p.p.Z[1] = ONE[1] & infty;
 1064|    143|            p.p.Z[2] = ONE[2] & infty;
 1065|    143|            p.p.Z[3] = ONE[3] & infty;
 1066|    143|            if (P256_LIMBS == 8) {
  ------------------
  |  |   41|    143|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    143|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    143|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1066:17): [Folded, False: 143]
  ------------------
 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|  5.29k|            for (i = 1; i < 37; i++) {
  ------------------
  |  Branch (1073:25): [True: 5.14k, False: 143]
  ------------------
 1074|  5.14k|                unsigned int off = (idx - 1) / 8;
 1075|  5.14k|                wvalue = p_str[off] | p_str[off + 1] << 8;
 1076|  5.14k|                wvalue = (wvalue >> ((idx - 1) % 8)) & mask;
 1077|  5.14k|                idx += window_size;
 1078|       |
 1079|  5.14k|                wvalue = _booth_recode_w7(wvalue);
 1080|       |
 1081|  5.14k|                ecp_nistz256_gather_w7(&t.a,
 1082|  5.14k|                    preComputedTable[i], wvalue >> 1);
 1083|       |
 1084|  5.14k|                ecp_nistz256_neg(t.p.Z, t.a.Y);
 1085|  5.14k|                copy_conditional(t.a.Y, t.p.Z, wvalue & 1);
 1086|       |
 1087|  5.14k|                ecp_nistz256_point_add_affine(&p.p, &p.p, &t.a);
 1088|  5.14k|            }
 1089|    143|        } else {
 1090|      0|            p_is_infinity = 1;
 1091|      0|            no_precomp_for_generator = 1;
 1092|      0|        }
 1093|    143|    } else
 1094|      0|        p_is_infinity = 1;
 1095|       |
 1096|    143|    if (no_precomp_for_generator) {
  ------------------
  |  Branch (1096:9): [True: 0, False: 143]
  ------------------
 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 *));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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 *));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|    143|    if (num) {
  ------------------
  |  Branch (1119:9): [True: 0, False: 143]
  ------------------
 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|    143|    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)) {
  ------------------
  |  |   41|    143|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    143|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    143|#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)) {
  ------------------
  |  |   41|    143|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    143|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    143|#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)) {
  ------------------
  |  |   41|    143|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    143|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    143|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1132:9): [True: 0, False: 143]
  |  Branch (1132:51): [True: 0, False: 143]
  |  Branch (1132:93): [True: 0, False: 143]
  ------------------
 1133|      0|        goto err;
 1134|      0|    }
 1135|    143|    r->Z_is_one = is_one(r->Z) & 1;
 1136|       |
 1137|    143|    ret = 1;
 1138|       |
 1139|    143|err:
 1140|    143|    BN_CTX_end(ctx);
 1141|    143|    OPENSSL_free(new_points);
  ------------------
  |  |  131|    143|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1142|    143|    OPENSSL_free(new_scalars);
  ------------------
  |  |  131|    143|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1143|    143|    return ret;
 1144|    143|}
ecp_nistz256.c:ecp_nistz256_is_affine_G:
  791|    143|{
  792|    143|    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);
  ------------------
  |  |   41|    143|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    143|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    143|#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);
  ------------------
  |  |   41|    143|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    143|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    143|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (792:12): [True: 143, False: 0]
  |  Branch (792:56): [True: 143, False: 0]
  |  Branch (792:100): [True: 143, False: 0]
  |  Branch (792:148): [True: 143, False: 0]
  |  Branch (792:196): [True: 143, False: 0]
  ------------------
  793|    143|}
ecp_nistz256.c:is_equal:
  196|    286|{
  197|    286|    BN_ULONG res;
  ------------------
  |  |   37|    286|#define BN_ULONG unsigned long
  ------------------
  198|       |
  199|    286|    res = a[0] ^ b[0];
  200|    286|    res |= a[1] ^ b[1];
  201|    286|    res |= a[2] ^ b[2];
  202|    286|    res |= a[3] ^ b[3];
  203|    286|    if (P256_LIMBS == 8) {
  ------------------
  |  |   41|    286|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    286|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    286|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (203:9): [Folded, False: 286]
  ------------------
  204|      0|        res |= a[4] ^ b[4];
  205|      0|        res |= a[5] ^ b[5];
  206|      0|        res |= a[6] ^ b[6];
  207|      0|        res |= a[7] ^ b[7];
  208|      0|    }
  209|       |
  210|    286|    return is_zero(res);
  211|    286|}
ecp_nistz256.c:_booth_recode_w7:
  157|  5.29k|{
  158|  5.29k|    unsigned int s, d;
  159|       |
  160|  5.29k|    s = ~((in >> 7) - 1);
  161|  5.29k|    d = (1 << 8) - in - 1;
  162|  5.29k|    d = (d & s) | (in & ~s);
  163|  5.29k|    d = (d >> 1) + (d & 1);
  164|       |
  165|  5.29k|    return (d << 1) + (s & 1);
  166|  5.29k|}
ecp_nistz256.c:copy_conditional:
  170|  5.29k|{
  171|  5.29k|    BN_ULONG mask1 = 0 - move;
  ------------------
  |  |   37|  5.29k|#define BN_ULONG unsigned long
  ------------------
  172|  5.29k|    BN_ULONG mask2 = ~mask1;
  ------------------
  |  |   37|  5.29k|#define BN_ULONG unsigned long
  ------------------
  173|       |
  174|  5.29k|    dst[0] = (src[0] & mask1) ^ (dst[0] & mask2);
  175|  5.29k|    dst[1] = (src[1] & mask1) ^ (dst[1] & mask2);
  176|  5.29k|    dst[2] = (src[2] & mask1) ^ (dst[2] & mask2);
  177|  5.29k|    dst[3] = (src[3] & mask1) ^ (dst[3] & mask2);
  178|  5.29k|    if (P256_LIMBS == 8) {
  ------------------
  |  |   41|  5.29k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  5.29k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  5.29k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (178:9): [Folded, False: 5.29k]
  ------------------
  179|      0|        dst[4] = (src[4] & mask1) ^ (dst[4] & mask2);
  180|      0|        dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
  181|      0|        dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);
  182|      0|        dst[7] = (src[7] & mask1) ^ (dst[7] & mask2);
  183|      0|    }
  184|  5.29k|}
ecp_nistz256.c:is_zero:
  187|    715|{
  188|    715|    in |= (0 - in);
  189|    715|    in = ~in;
  190|    715|    in >>= BN_BITS2 - 1;
  ------------------
  |  |   54|    715|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|    715|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  191|    715|    return in;
  192|    715|}
ecp_nistz256.c:is_one:
  214|    286|{
  215|    286|    BN_ULONG res = 0;
  ------------------
  |  |   37|    286|#define BN_ULONG unsigned long
  ------------------
  216|    286|    BN_ULONG *a = bn_get_words(z);
  ------------------
  |  |   37|    286|#define BN_ULONG unsigned long
  ------------------
  217|       |
  218|    286|    if (bn_get_top(z) == (P256_LIMBS - P256_LIMBS / 8)) {
  ------------------
  |  |   41|    286|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    286|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    286|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (bn_get_top(z) == (P256_LIMBS - P256_LIMBS / 8)) {
  ------------------
  |  |   41|    286|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    286|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    286|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (218:9): [True: 286, False: 0]
  ------------------
  219|    286|        res = a[0] ^ ONE[0];
  220|    286|        res |= a[1] ^ ONE[1];
  221|    286|        res |= a[2] ^ ONE[2];
  222|    286|        res |= a[3] ^ ONE[3];
  223|    286|        if (P256_LIMBS == 8) {
  ------------------
  |  |   41|    286|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    286|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    286|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (223:13): [Folded, False: 286]
  ------------------
  224|      0|            res |= a[4] ^ ONE[4];
  225|      0|            res |= a[5] ^ ONE[5];
  226|      0|            res |= a[6] ^ ONE[6];
  227|       |            /*
  228|       |             * no check for a[7] (being zero) on 32-bit platforms,
  229|       |             * because value of "one" takes only 7 limbs.
  230|       |             */
  231|      0|        }
  232|    286|        res = is_zero(res);
  233|    286|    }
  234|       |
  235|    286|    return res;
  236|    286|}
ecp_nistz256.c:ecp_nistz256group_full_init:
 1445|  12.0k|{
 1446|  12.0k|    BN_CTX *ctx = NULL;
 1447|  12.0k|    BN_MONT_CTX *mont = NULL, *ordmont = NULL;
 1448|  12.0k|    const int param_len = 32;
 1449|  12.0k|    const int seed_len = 20;
 1450|  12.0k|    int ok = 0;
 1451|  12.0k|    uint32_t hi_order_n = 0xccd1c8aa;
 1452|  12.0k|    uint32_t lo_order_n = 0xee00bc4f;
 1453|  12.0k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *one = NULL,
 1454|  12.0k|           *order = NULL;
 1455|  12.0k|    EC_POINT *P = NULL;
 1456|       |
 1457|  12.0k|    if ((ctx = BN_CTX_new_ex(group->libctx)) == NULL) {
  ------------------
  |  Branch (1457:9): [True: 0, False: 12.0k]
  ------------------
 1458|      0|        ERR_raise(ERR_LIB_EC, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1459|      0|        return 0;
 1460|      0|    }
 1461|       |
 1462|  12.0k|    if (!EC_GROUP_set_seed(group, params, seed_len)) {
  ------------------
  |  Branch (1462:9): [True: 0, False: 12.0k]
  ------------------
 1463|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1464|      0|        goto err;
 1465|      0|    }
 1466|  12.0k|    params += seed_len;
 1467|       |
 1468|  12.0k|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1468:9): [True: 0, False: 12.0k]
  ------------------
 1469|  12.0k|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1469:12): [True: 0, False: 12.0k]
  ------------------
 1470|  12.0k|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1470:12): [True: 0, False: 12.0k]
  ------------------
 1471|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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.0k|    mont = BN_MONT_CTX_new();
 1480|  12.0k|    if (mont == NULL)
  ------------------
  |  Branch (1480:9): [True: 0, False: 12.0k]
  ------------------
 1481|      0|        goto err;
 1482|       |
 1483|  12.0k|    if (!ossl_bn_mont_ctx_set(mont, p, 256, params + 6 * param_len, param_len,
  ------------------
  |  Branch (1483:9): [True: 0, False: 12.0k]
  ------------------
 1484|  12.0k|            1, 0))
 1485|      0|        goto err;
 1486|       |
 1487|  12.0k|    one = BN_new();
 1488|  12.0k|    if (one == NULL) {
  ------------------
  |  Branch (1488:9): [True: 0, False: 12.0k]
  ------------------
 1489|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1490|      0|        goto err;
 1491|      0|    }
 1492|  12.0k|    if (!BN_to_montgomery(one, BN_value_one(), mont, ctx)) {
  ------------------
  |  Branch (1492:9): [True: 0, False: 12.0k]
  ------------------
 1493|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1494|      0|        goto err;
 1495|      0|    }
 1496|  12.0k|    group->field_data1 = mont;
 1497|  12.0k|    mont = NULL;
 1498|  12.0k|    group->field_data2 = one;
 1499|  12.0k|    one = NULL;
 1500|       |
 1501|  12.0k|    if (!ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx)) {
  ------------------
  |  Branch (1501:9): [True: 0, False: 12.0k]
  ------------------
 1502|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1503|      0|        goto err;
 1504|      0|    }
 1505|       |
 1506|  12.0k|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 12.0k]
  ------------------
 1507|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1508|      0|        goto err;
 1509|      0|    }
 1510|       |
 1511|  12.0k|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1511:9): [True: 0, False: 12.0k]
  ------------------
 1512|  12.0k|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1512:12): [True: 0, False: 12.0k]
  ------------------
 1513|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1514|      0|        goto err;
 1515|      0|    }
 1516|  12.0k|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (1516:9): [True: 0, False: 12.0k]
  ------------------
 1517|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1518|      0|        goto err;
 1519|      0|    }
 1520|  12.0k|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1520:9): [True: 0, False: 12.0k]
  ------------------
 1521|  12.0k|        || !BN_set_word(x, (BN_ULONG)1)) { /* cofactor is 1 */
  ------------------
  |  Branch (1521:12): [True: 0, False: 12.0k]
  ------------------
 1522|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1523|      0|        goto err;
 1524|      0|    }
 1525|       |
 1526|       |    /*
 1527|       |     * Set up generator and order and montgomery data
 1528|       |     */
 1529|  12.0k|    group->generator = EC_POINT_new(group);
 1530|  12.0k|    if (group->generator == NULL) {
  ------------------
  |  Branch (1530:9): [True: 0, False: 12.0k]
  ------------------
 1531|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1532|      0|        goto err;
 1533|      0|    }
 1534|  12.0k|    if (!EC_POINT_copy(group->generator, P))
  ------------------
  |  Branch (1534:9): [True: 0, False: 12.0k]
  ------------------
 1535|      0|        goto err;
 1536|  12.0k|    if (!BN_copy(group->order, order))
  ------------------
  |  Branch (1536:9): [True: 0, False: 12.0k]
  ------------------
 1537|      0|        goto err;
 1538|  12.0k|    if (!BN_set_word(group->cofactor, 1))
  ------------------
  |  Branch (1538:9): [True: 0, False: 12.0k]
  ------------------
 1539|      0|        goto err;
 1540|       |
 1541|  12.0k|    ordmont = BN_MONT_CTX_new();
 1542|  12.0k|    if (ordmont == NULL)
  ------------------
  |  Branch (1542:9): [True: 0, False: 12.0k]
  ------------------
 1543|      0|        goto err;
 1544|  12.0k|    if (!ossl_bn_mont_ctx_set(ordmont, order, 256, params + 7 * param_len,
  ------------------
  |  Branch (1544:9): [True: 0, False: 12.0k]
  ------------------
 1545|  12.0k|            param_len, lo_order_n, hi_order_n))
 1546|      0|        goto err;
 1547|       |
 1548|  12.0k|    group->mont_data = ordmont;
 1549|  12.0k|    ordmont = NULL;
 1550|       |
 1551|  12.0k|    ok = 1;
 1552|       |
 1553|  12.0k|err:
 1554|  12.0k|    EC_POINT_free(P);
 1555|  12.0k|    BN_CTX_free(ctx);
 1556|  12.0k|    BN_MONT_CTX_free(mont);
 1557|  12.0k|    BN_MONT_CTX_free(ordmont);
 1558|  12.0k|    BN_free(p);
 1559|  12.0k|    BN_free(one);
 1560|  12.0k|    BN_free(a);
 1561|  12.0k|    BN_free(b);
 1562|  12.0k|    BN_free(order);
 1563|  12.0k|    BN_free(x);
 1564|  12.0k|    BN_free(y);
 1565|       |
 1566|  12.0k|    return ok;
 1567|  12.0k|}

ossl_ec_GFp_simple_point2oct:
  162|  1.18k|{
  163|  1.18k|    size_t ret;
  164|  1.18k|    BN_CTX *new_ctx = NULL;
  165|  1.18k|    int used_ctx = 0;
  166|  1.18k|    BIGNUM *x, *y;
  167|  1.18k|    size_t field_len, i, skip;
  168|       |
  169|  1.18k|    if ((form != POINT_CONVERSION_COMPRESSED)
  ------------------
  |  Branch (169:9): [True: 1.18k, False: 0]
  ------------------
  170|  1.18k|        && (form != POINT_CONVERSION_UNCOMPRESSED)
  ------------------
  |  Branch (170:12): [True: 0, False: 1.18k]
  ------------------
  171|      0|        && (form != POINT_CONVERSION_HYBRID)) {
  ------------------
  |  Branch (171:12): [True: 0, False: 0]
  ------------------
  172|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  173|      0|        goto err;
  174|      0|    }
  175|       |
  176|  1.18k|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (176:9): [True: 0, False: 1.18k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|  1.18k|    field_len = BN_num_bytes(group->field);
  ------------------
  |  |  188|  1.18k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  190|  1.18k|    ret = (form == POINT_CONVERSION_COMPRESSED) ? 1 + field_len : 1 + 2 * field_len;
  ------------------
  |  Branch (190:11): [True: 0, False: 1.18k]
  ------------------
  191|       |
  192|       |    /* if 'buf' is NULL, just return required length */
  193|  1.18k|    if (buf != NULL) {
  ------------------
  |  Branch (193:9): [True: 594, False: 594]
  ------------------
  194|    594|        if (len < ret) {
  ------------------
  |  Branch (194:13): [True: 0, False: 594]
  ------------------
  195|      0|            ERR_raise(ERR_LIB_EC, EC_R_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  196|      0|            goto err;
  197|      0|        }
  198|       |
  199|    594|        if (ctx == NULL) {
  ------------------
  |  Branch (199:13): [True: 0, False: 594]
  ------------------
  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|    594|        BN_CTX_start(ctx);
  206|    594|        used_ctx = 1;
  207|    594|        x = BN_CTX_get(ctx);
  208|    594|        y = BN_CTX_get(ctx);
  209|    594|        if (y == NULL)
  ------------------
  |  Branch (209:13): [True: 0, False: 594]
  ------------------
  210|      0|            goto err;
  211|       |
  212|    594|        if (!EC_POINT_get_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (212:13): [True: 0, False: 594]
  ------------------
  213|      0|            goto err;
  214|       |
  215|    594|        if ((form == POINT_CONVERSION_COMPRESSED
  ------------------
  |  Branch (215:14): [True: 0, False: 594]
  ------------------
  216|    594|                || form == POINT_CONVERSION_HYBRID)
  ------------------
  |  Branch (216:20): [True: 0, False: 594]
  ------------------
  217|      0|            && BN_is_odd(y))
  ------------------
  |  Branch (217:16): [True: 0, False: 0]
  ------------------
  218|      0|            buf[0] = form + 1;
  219|    594|        else
  220|    594|            buf[0] = form;
  221|       |
  222|    594|        i = 1;
  223|       |
  224|    594|        skip = field_len - BN_num_bytes(x);
  ------------------
  |  |  188|    594|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  225|    594|        if (skip > field_len) {
  ------------------
  |  Branch (225:13): [True: 0, False: 594]
  ------------------
  226|      0|            ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  227|      0|            goto err;
  228|      0|        }
  229|    636|        while (skip > 0) {
  ------------------
  |  Branch (229:16): [True: 42, False: 594]
  ------------------
  230|     42|            buf[i++] = 0;
  231|     42|            skip--;
  232|     42|        }
  233|    594|        skip = BN_bn2bin(x, buf + i);
  234|    594|        i += skip;
  235|    594|        if (i != 1 + field_len) {
  ------------------
  |  Branch (235:13): [True: 0, False: 594]
  ------------------
  236|      0|            ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  237|      0|            goto err;
  238|      0|        }
  239|       |
  240|    594|        if (form == POINT_CONVERSION_UNCOMPRESSED
  ------------------
  |  Branch (240:13): [True: 594, False: 0]
  ------------------
  241|    594|            || form == POINT_CONVERSION_HYBRID) {
  ------------------
  |  Branch (241:16): [True: 0, False: 0]
  ------------------
  242|    594|            skip = field_len - BN_num_bytes(y);
  ------------------
  |  |  188|    594|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  243|    594|            if (skip > field_len) {
  ------------------
  |  Branch (243:17): [True: 0, False: 594]
  ------------------
  244|      0|                ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  245|      0|                goto err;
  246|      0|            }
  247|    638|            while (skip > 0) {
  ------------------
  |  Branch (247:20): [True: 44, False: 594]
  ------------------
  248|     44|                buf[i++] = 0;
  249|     44|                skip--;
  250|     44|            }
  251|    594|            skip = BN_bn2bin(y, buf + i);
  252|    594|            i += skip;
  253|    594|        }
  254|       |
  255|    594|        if (i != ret) {
  ------------------
  |  Branch (255:13): [True: 0, False: 594]
  ------------------
  256|      0|            ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  257|      0|            goto err;
  258|      0|        }
  259|    594|    }
  260|       |
  261|  1.18k|    if (used_ctx)
  ------------------
  |  Branch (261:9): [True: 594, False: 594]
  ------------------
  262|    594|        BN_CTX_end(ctx);
  263|  1.18k|    BN_CTX_free(new_ctx);
  264|  1.18k|    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|  1.18k|}
ossl_ec_GFp_simple_oct2point:
  276|   119k|{
  277|   119k|    point_conversion_form_t form;
  278|   119k|    int y_bit;
  279|   119k|    BN_CTX *new_ctx = NULL;
  280|   119k|    BIGNUM *x, *y;
  281|   119k|    int field_len, enc_len;
  282|   119k|    int ret = 0;
  283|       |
  284|   119k|    if (len == 0) {
  ------------------
  |  Branch (284:9): [True: 0, False: 119k]
  ------------------
  285|      0|        ERR_raise(ERR_LIB_EC, EC_R_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  286|      0|        return 0;
  287|      0|    }
  288|   119k|    form = buf[0];
  289|   119k|    y_bit = form & 1;
  290|   119k|    form = form & ~1U;
  291|   119k|    if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED)
  ------------------
  |  Branch (291:9): [True: 119k, False: 0]
  |  Branch (291:24): [True: 119k, False: 0]
  ------------------
  292|   119k|        && (form != POINT_CONVERSION_UNCOMPRESSED)
  ------------------
  |  Branch (292:12): [True: 0, False: 119k]
  ------------------
  293|      0|        && (form != POINT_CONVERSION_HYBRID)) {
  ------------------
  |  Branch (293:12): [True: 0, False: 0]
  ------------------
  294|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  295|      0|        return 0;
  296|      0|    }
  297|   119k|    if ((form == 0 || form == POINT_CONVERSION_UNCOMPRESSED) && y_bit) {
  ------------------
  |  Branch (297:10): [True: 0, False: 119k]
  |  Branch (297:23): [True: 119k, False: 0]
  |  Branch (297:65): [True: 0, False: 119k]
  ------------------
  298|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|        return 0;
  300|      0|    }
  301|       |
  302|   119k|    if (form == 0) {
  ------------------
  |  Branch (302:9): [True: 0, False: 119k]
  ------------------
  303|      0|        if (len != 1) {
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|   119k|    field_len = BN_num_bytes(group->field);
  ------------------
  |  |  188|   119k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  312|   119k|    enc_len = (form == POINT_CONVERSION_COMPRESSED) ? 1 + field_len : 1 + 2 * field_len;
  ------------------
  |  Branch (312:15): [True: 0, False: 119k]
  ------------------
  313|       |
  314|   119k|    if (len != (size_t)enc_len) {
  ------------------
  |  Branch (314:9): [True: 0, False: 119k]
  ------------------
  315|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        return 0;
  317|      0|    }
  318|       |
  319|   119k|    if (ctx == NULL) {
  ------------------
  |  Branch (319:9): [True: 119k, False: 0]
  ------------------
  320|   119k|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  321|   119k|        if (ctx == NULL)
  ------------------
  |  Branch (321:13): [True: 0, False: 119k]
  ------------------
  322|      0|            return 0;
  323|   119k|    }
  324|       |
  325|   119k|    BN_CTX_start(ctx);
  326|   119k|    x = BN_CTX_get(ctx);
  327|   119k|    y = BN_CTX_get(ctx);
  328|   119k|    if (y == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 119k]
  ------------------
  329|      0|        goto err;
  330|       |
  331|   119k|    if (!BN_bin2bn(buf + 1, field_len, x))
  ------------------
  |  Branch (331:9): [True: 0, False: 119k]
  ------------------
  332|      0|        goto err;
  333|   119k|    if (BN_ucmp(x, group->field) >= 0) {
  ------------------
  |  Branch (333:9): [True: 0, False: 119k]
  ------------------
  334|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  335|      0|        goto err;
  336|      0|    }
  337|       |
  338|   119k|    if (form == POINT_CONVERSION_COMPRESSED) {
  ------------------
  |  Branch (338:9): [True: 0, False: 119k]
  ------------------
  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|   119k|    } else {
  342|   119k|        if (!BN_bin2bn(buf + 1 + field_len, field_len, y))
  ------------------
  |  Branch (342:13): [True: 0, False: 119k]
  ------------------
  343|      0|            goto err;
  344|   119k|        if (BN_ucmp(y, group->field) >= 0) {
  ------------------
  |  Branch (344:13): [True: 0, False: 119k]
  ------------------
  345|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  346|      0|            goto err;
  347|      0|        }
  348|   119k|        if (form == POINT_CONVERSION_HYBRID) {
  ------------------
  |  Branch (348:13): [True: 0, False: 119k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|   119k|        if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (359:13): [True: 0, False: 119k]
  ------------------
  360|      0|            goto err;
  361|   119k|    }
  362|       |
  363|   119k|    ret = 1;
  364|       |
  365|   119k|err:
  366|   119k|    BN_CTX_end(ctx);
  367|   119k|    BN_CTX_free(new_ctx);
  368|   119k|    return ret;
  369|   119k|}

ossl_ec_GFp_simple_group_init:
   99|   240k|{
  100|   240k|    group->field = BN_new();
  101|   240k|    group->a = BN_new();
  102|   240k|    group->b = BN_new();
  103|   240k|    if (group->field == NULL || group->a == NULL || group->b == NULL) {
  ------------------
  |  Branch (103:9): [True: 0, False: 240k]
  |  Branch (103:33): [True: 0, False: 240k]
  |  Branch (103:53): [True: 0, False: 240k]
  ------------------
  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|   240k|    group->a_is_minus3 = 0;
  110|   240k|    return 1;
  111|   240k|}
ossl_ec_GFp_simple_group_finish:
  114|   240k|{
  115|   240k|    BN_free(group->field);
  116|   240k|    BN_free(group->a);
  117|   240k|    BN_free(group->b);
  118|   240k|}
ossl_ec_GFp_simple_group_copy:
  128|   120k|{
  129|   120k|    if (!BN_copy(dest->field, src->field))
  ------------------
  |  Branch (129:9): [True: 0, False: 120k]
  ------------------
  130|      0|        return 0;
  131|   120k|    if (!BN_copy(dest->a, src->a))
  ------------------
  |  Branch (131:9): [True: 0, False: 120k]
  ------------------
  132|      0|        return 0;
  133|   120k|    if (!BN_copy(dest->b, src->b))
  ------------------
  |  Branch (133:9): [True: 0, False: 120k]
  ------------------
  134|      0|        return 0;
  135|       |
  136|   120k|    dest->a_is_minus3 = src->a_is_minus3;
  137|       |
  138|   120k|    return 1;
  139|   120k|}
ossl_ec_GFp_simple_group_set_curve:
  144|   120k|{
  145|   120k|    int ret = 0;
  146|   120k|    BN_CTX *new_ctx = NULL;
  147|   120k|    BIGNUM *tmp_a;
  148|       |
  149|       |    /* p must be a prime > 3 */
  150|   120k|    if (BN_num_bits(p) <= 2 || !BN_is_odd(p)) {
  ------------------
  |  Branch (150:9): [True: 0, False: 120k]
  |  Branch (150:32): [True: 0, False: 120k]
  ------------------
  151|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  152|      0|        return 0;
  153|      0|    }
  154|       |
  155|   120k|    if (ctx == NULL) {
  ------------------
  |  Branch (155:9): [True: 0, False: 120k]
  ------------------
  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|   120k|    BN_CTX_start(ctx);
  162|   120k|    tmp_a = BN_CTX_get(ctx);
  163|   120k|    if (tmp_a == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 120k]
  ------------------
  164|      0|        goto err;
  165|       |
  166|       |    /* group->field */
  167|   120k|    if (!BN_copy(group->field, p))
  ------------------
  |  Branch (167:9): [True: 0, False: 120k]
  ------------------
  168|      0|        goto err;
  169|   120k|    BN_set_negative(group->field, 0);
  170|       |
  171|       |    /* group->a */
  172|   120k|    if (!BN_nnmod(tmp_a, a, p, ctx))
  ------------------
  |  Branch (172:9): [True: 0, False: 120k]
  ------------------
  173|      0|        goto err;
  174|   120k|    if (group->meth->field_encode != NULL) {
  ------------------
  |  Branch (174:9): [True: 12.3k, False: 107k]
  ------------------
  175|  12.3k|        if (!group->meth->field_encode(group, group->a, tmp_a, ctx))
  ------------------
  |  Branch (175:13): [True: 0, False: 12.3k]
  ------------------
  176|      0|            goto err;
  177|   107k|    } else if (!BN_copy(group->a, tmp_a))
  ------------------
  |  Branch (177:16): [True: 0, False: 107k]
  ------------------
  178|      0|        goto err;
  179|       |
  180|       |    /* group->b */
  181|   120k|    if (!BN_nnmod(group->b, b, p, ctx))
  ------------------
  |  Branch (181:9): [True: 0, False: 120k]
  ------------------
  182|      0|        goto err;
  183|   120k|    if (group->meth->field_encode != NULL)
  ------------------
  |  Branch (183:9): [True: 12.3k, False: 107k]
  ------------------
  184|  12.3k|        if (!group->meth->field_encode(group, group->b, group->b, ctx))
  ------------------
  |  Branch (184:13): [True: 0, False: 12.3k]
  ------------------
  185|      0|            goto err;
  186|       |
  187|       |    /* group->a_is_minus3 */
  188|   120k|    if (!BN_add_word(tmp_a, 3))
  ------------------
  |  Branch (188:9): [True: 0, False: 120k]
  ------------------
  189|      0|        goto err;
  190|   120k|    group->a_is_minus3 = (0 == BN_cmp(tmp_a, group->field));
  191|       |
  192|   120k|    ret = 1;
  193|       |
  194|   120k|err:
  195|   120k|    BN_CTX_end(ctx);
  196|   120k|    BN_CTX_free(new_ctx);
  197|   120k|    return ret;
  198|   120k|}
ossl_ec_GFp_simple_point_init:
  323|   480k|{
  324|   480k|    point->X = BN_new();
  325|   480k|    point->Y = BN_new();
  326|   480k|    point->Z = BN_new();
  327|   480k|    point->Z_is_one = 0;
  328|       |
  329|   480k|    if (point->X == NULL || point->Y == NULL || point->Z == NULL) {
  ------------------
  |  Branch (329:9): [True: 0, False: 480k]
  |  Branch (329:29): [True: 0, False: 480k]
  |  Branch (329:49): [True: 0, False: 480k]
  ------------------
  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|   480k|    return 1;
  336|   480k|}
ossl_ec_GFp_simple_point_finish:
  339|   480k|{
  340|   480k|    BN_free(point->X);
  341|   480k|    BN_free(point->Y);
  342|   480k|    BN_free(point->Z);
  343|   480k|}
ossl_ec_GFp_simple_point_clear_finish:
  346|    289|{
  347|    289|    BN_clear_free(point->X);
  348|    289|    BN_clear_free(point->Y);
  349|    289|    BN_clear_free(point->Z);
  350|    289|    point->Z_is_one = 0;
  351|    289|}
ossl_ec_GFp_simple_point_copy:
  354|   240k|{
  355|   240k|    if (!BN_copy(dest->X, src->X))
  ------------------
  |  Branch (355:9): [True: 0, False: 240k]
  ------------------
  356|      0|        return 0;
  357|   240k|    if (!BN_copy(dest->Y, src->Y))
  ------------------
  |  Branch (357:9): [True: 0, False: 240k]
  ------------------
  358|      0|        return 0;
  359|   240k|    if (!BN_copy(dest->Z, src->Z))
  ------------------
  |  Branch (359:9): [True: 0, False: 240k]
  ------------------
  360|      0|        return 0;
  361|   240k|    dest->Z_is_one = src->Z_is_one;
  362|   240k|    dest->curve_name = src->curve_name;
  363|       |
  364|   240k|    return 1;
  365|   240k|}
ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp:
  381|   239k|{
  382|   239k|    BN_CTX *new_ctx = NULL;
  383|   239k|    int ret = 0;
  384|       |
  385|   239k|    if (ctx == NULL) {
  ------------------
  |  Branch (385:9): [True: 0, False: 239k]
  ------------------
  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|   239k|    if (x != NULL) {
  ------------------
  |  Branch (391:9): [True: 239k, False: 0]
  ------------------
  392|   239k|        if (!BN_nnmod(point->X, x, group->field, ctx))
  ------------------
  |  Branch (392:13): [True: 0, False: 239k]
  ------------------
  393|      0|            goto err;
  394|   239k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (394:13): [True: 24.3k, False: 215k]
  ------------------
  395|  24.3k|            if (!group->meth->field_encode(group, point->X, point->X, ctx))
  ------------------
  |  Branch (395:17): [True: 0, False: 24.3k]
  ------------------
  396|      0|                goto err;
  397|  24.3k|        }
  398|   239k|    }
  399|       |
  400|   239k|    if (y != NULL) {
  ------------------
  |  Branch (400:9): [True: 239k, False: 0]
  ------------------
  401|   239k|        if (!BN_nnmod(point->Y, y, group->field, ctx))
  ------------------
  |  Branch (401:13): [True: 0, False: 239k]
  ------------------
  402|      0|            goto err;
  403|   239k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (403:13): [True: 24.3k, False: 215k]
  ------------------
  404|  24.3k|            if (!group->meth->field_encode(group, point->Y, point->Y, ctx))
  ------------------
  |  Branch (404:17): [True: 0, False: 24.3k]
  ------------------
  405|      0|                goto err;
  406|  24.3k|        }
  407|   239k|    }
  408|       |
  409|   239k|    if (z != NULL) {
  ------------------
  |  Branch (409:9): [True: 239k, False: 0]
  ------------------
  410|   239k|        int Z_is_one;
  411|       |
  412|   239k|        if (!BN_nnmod(point->Z, z, group->field, ctx))
  ------------------
  |  Branch (412:13): [True: 0, False: 239k]
  ------------------
  413|      0|            goto err;
  414|   239k|        Z_is_one = BN_is_one(point->Z);
  415|   239k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (415:13): [True: 24.3k, False: 215k]
  ------------------
  416|  24.3k|            if (Z_is_one && (group->meth->field_set_to_one != 0)) {
  ------------------
  |  Branch (416:17): [True: 24.3k, False: 0]
  |  Branch (416:29): [True: 24.3k, False: 0]
  ------------------
  417|  24.3k|                if (!group->meth->field_set_to_one(group, point->Z, ctx))
  ------------------
  |  Branch (417:21): [True: 0, False: 24.3k]
  ------------------
  418|      0|                    goto err;
  419|  24.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|  24.3k|        }
  424|   239k|        point->Z_is_one = Z_is_one;
  425|   239k|    }
  426|       |
  427|   239k|    ret = 1;
  428|       |
  429|   239k|err:
  430|   239k|    BN_CTX_free(new_ctx);
  431|   239k|    return ret;
  432|   239k|}
ossl_ec_GFp_simple_point_set_affine_coordinates:
  487|   239k|{
  488|   239k|    if (x == NULL || y == NULL) {
  ------------------
  |  Branch (488:9): [True: 0, False: 239k]
  |  Branch (488:22): [True: 0, False: 239k]
  ------------------
  489|       |        /*
  490|       |         * unlike for projective coordinates, we do not tolerate this
  491|       |         */
  492|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  493|      0|        return 0;
  494|      0|    }
  495|       |
  496|   239k|    return EC_POINT_set_Jprojective_coordinates_GFp(group, point, x, y,
  497|   239k|        BN_value_one(), ctx);
  498|   239k|}
ossl_ec_GFp_simple_point_get_affine_coordinates:
  504|    289|{
  505|    289|    BN_CTX *new_ctx = NULL;
  506|    289|    BIGNUM *Z, *Z_1, *Z_2, *Z_3;
  507|    289|    const BIGNUM *Z_;
  508|    289|    int ret = 0;
  509|       |
  510|    289|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (510:9): [True: 0, False: 289]
  ------------------
  511|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  512|      0|        return 0;
  513|      0|    }
  514|       |
  515|    289|    if (ctx == NULL) {
  ------------------
  |  Branch (515:9): [True: 0, False: 289]
  ------------------
  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|    289|    BN_CTX_start(ctx);
  522|    289|    Z = BN_CTX_get(ctx);
  523|    289|    Z_1 = BN_CTX_get(ctx);
  524|    289|    Z_2 = BN_CTX_get(ctx);
  525|    289|    Z_3 = BN_CTX_get(ctx);
  526|    289|    if (Z_3 == NULL)
  ------------------
  |  Branch (526:9): [True: 0, False: 289]
  ------------------
  527|      0|        goto err;
  528|       |
  529|       |    /* transform  (X, Y, Z)  into  (x, y) := (X/Z^2, Y/Z^3) */
  530|       |
  531|    289|    if (group->meth->field_decode != NULL) {
  ------------------
  |  Branch (531:9): [True: 289, False: 0]
  ------------------
  532|    289|        if (!group->meth->field_decode(group, Z, point->Z, ctx))
  ------------------
  |  Branch (532:13): [True: 0, False: 289]
  ------------------
  533|      0|            goto err;
  534|    289|        Z_ = Z;
  535|    289|    } else {
  536|      0|        Z_ = point->Z;
  537|      0|    }
  538|       |
  539|    289|    if (BN_is_one(Z_)) {
  ------------------
  |  Branch (539:9): [True: 289, False: 0]
  ------------------
  540|    289|        if (group->meth->field_decode != NULL) {
  ------------------
  |  Branch (540:13): [True: 289, False: 0]
  ------------------
  541|    289|            if (x != NULL) {
  ------------------
  |  Branch (541:17): [True: 289, False: 0]
  ------------------
  542|    289|                if (!group->meth->field_decode(group, x, point->X, ctx))
  ------------------
  |  Branch (542:21): [True: 0, False: 289]
  ------------------
  543|      0|                    goto err;
  544|    289|            }
  545|    289|            if (y != NULL) {
  ------------------
  |  Branch (545:17): [True: 289, False: 0]
  ------------------
  546|    289|                if (!group->meth->field_decode(group, y, point->Y, ctx))
  ------------------
  |  Branch (546:21): [True: 0, False: 289]
  ------------------
  547|      0|                    goto err;
  548|    289|            }
  549|    289|        } 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|    289|    } 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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|    289|    ret = 1;
  605|       |
  606|    289|err:
  607|    289|    BN_CTX_end(ctx);
  608|    289|    BN_CTX_free(new_ctx);
  609|    289|    return ret;
  610|    289|}
ossl_ec_GFp_simple_is_at_infinity:
  951|   242k|{
  952|   242k|    return BN_is_zero(point->Z);
  953|   242k|}
ossl_ec_GFp_simple_is_on_curve:
  957|   239k|{
  958|   239k|    int (*field_mul)(const EC_GROUP *, BIGNUM *, const BIGNUM *,
  959|   239k|        const BIGNUM *, BN_CTX *);
  960|   239k|    int (*field_sqr)(const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);
  961|   239k|    const BIGNUM *p;
  962|   239k|    BN_CTX *new_ctx = NULL;
  963|   239k|    BIGNUM *rh, *tmp, *Z4, *Z6;
  964|   239k|    int ret = -1;
  965|       |
  966|   239k|    if (EC_POINT_is_at_infinity(group, point))
  ------------------
  |  Branch (966:9): [True: 0, False: 239k]
  ------------------
  967|      0|        return 1;
  968|       |
  969|   239k|    field_mul = group->meth->field_mul;
  970|   239k|    field_sqr = group->meth->field_sqr;
  971|   239k|    p = group->field;
  972|       |
  973|   239k|    if (ctx == NULL) {
  ------------------
  |  Branch (973:9): [True: 0, False: 239k]
  ------------------
  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|   239k|    BN_CTX_start(ctx);
  980|   239k|    rh = BN_CTX_get(ctx);
  981|   239k|    tmp = BN_CTX_get(ctx);
  982|   239k|    Z4 = BN_CTX_get(ctx);
  983|   239k|    Z6 = BN_CTX_get(ctx);
  984|   239k|    if (Z6 == NULL)
  ------------------
  |  Branch (984:9): [True: 0, False: 239k]
  ------------------
  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|   239k|    if (!field_sqr(group, rh, point->X, ctx))
  ------------------
  |  Branch (998:9): [True: 0, False: 239k]
  ------------------
  999|      0|        goto err;
 1000|       |
 1001|   239k|    if (!point->Z_is_one) {
  ------------------
  |  Branch (1001:9): [True: 0, False: 239k]
  ------------------
 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|   239k|    } else {
 1034|       |        /* point->Z_is_one */
 1035|       |
 1036|       |        /* rh := (rh + a)*X */
 1037|   239k|        if (!BN_mod_add_quick(rh, rh, group->a, p))
  ------------------
  |  Branch (1037:13): [True: 0, False: 239k]
  ------------------
 1038|      0|            goto err;
 1039|   239k|        if (!field_mul(group, rh, rh, point->X, ctx))
  ------------------
  |  Branch (1039:13): [True: 0, False: 239k]
  ------------------
 1040|      0|            goto err;
 1041|       |        /* rh := rh + b */
 1042|   239k|        if (!BN_mod_add_quick(rh, rh, group->b, p))
  ------------------
  |  Branch (1042:13): [True: 0, False: 239k]
  ------------------
 1043|      0|            goto err;
 1044|   239k|    }
 1045|       |
 1046|       |    /* 'lh' := Y^2 */
 1047|   239k|    if (!field_sqr(group, tmp, point->Y, ctx))
  ------------------
  |  Branch (1047:9): [True: 0, False: 239k]
  ------------------
 1048|      0|        goto err;
 1049|       |
 1050|   239k|    ret = (0 == BN_ucmp(tmp, rh));
 1051|       |
 1052|   239k|err:
 1053|   239k|    BN_CTX_end(ctx);
 1054|   239k|    BN_CTX_free(new_ctx);
 1055|   239k|    return ret;
 1056|   239k|}
ossl_ec_GFp_simple_cmp:
 1060|    162|{
 1061|       |    /*-
 1062|       |     * return values:
 1063|       |     *  -1   error
 1064|       |     *   0   equal (in affine coordinates)
 1065|       |     *   1   not equal
 1066|       |     */
 1067|       |
 1068|    162|    int (*field_mul)(const EC_GROUP *, BIGNUM *, const BIGNUM *,
 1069|    162|        const BIGNUM *, BN_CTX *);
 1070|    162|    int (*field_sqr)(const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);
 1071|    162|    BN_CTX *new_ctx = NULL;
 1072|    162|    BIGNUM *tmp1, *tmp2, *Za23, *Zb23;
 1073|    162|    const BIGNUM *tmp1_, *tmp2_;
 1074|    162|    int ret = -1;
 1075|       |
 1076|    162|    if (EC_POINT_is_at_infinity(group, a)) {
  ------------------
  |  Branch (1076:9): [True: 0, False: 162]
  ------------------
 1077|      0|        return EC_POINT_is_at_infinity(group, b) ? 0 : 1;
  ------------------
  |  Branch (1077:16): [True: 0, False: 0]
  ------------------
 1078|      0|    }
 1079|       |
 1080|    162|    if (EC_POINT_is_at_infinity(group, b))
  ------------------
  |  Branch (1080:9): [True: 0, False: 162]
  ------------------
 1081|      0|        return 1;
 1082|       |
 1083|    162|    if (a->Z_is_one && b->Z_is_one) {
  ------------------
  |  Branch (1083:9): [True: 162, False: 0]
  |  Branch (1083:24): [True: 162, False: 0]
  ------------------
 1084|    162|        return ((BN_cmp(a->X, b->X) == 0) && BN_cmp(a->Y, b->Y) == 0) ? 0 : 1;
  ------------------
  |  Branch (1084:17): [True: 162, False: 0]
  |  Branch (1084:46): [True: 162, False: 0]
  ------------------
 1085|    162|    }
 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|    289|{
 1494|    289|    BIGNUM *t1, *t2, *t3, *t4, *t5 = NULL;
 1495|       |
 1496|    289|    t1 = s->Z;
 1497|    289|    t2 = r->Z;
 1498|    289|    t3 = s->X;
 1499|    289|    t4 = r->X;
 1500|    289|    t5 = s->Y;
 1501|       |
 1502|    289|    if (!p->Z_is_one /* r := 2p */
  ------------------
  |  Branch (1502:9): [True: 0, False: 289]
  ------------------
 1503|    289|        || !group->meth->field_sqr(group, t3, p->X, ctx)
  ------------------
  |  Branch (1503:12): [True: 0, False: 289]
  ------------------
 1504|    289|        || !BN_mod_sub_quick(t4, t3, group->a, group->field)
  ------------------
  |  Branch (1504:12): [True: 0, False: 289]
  ------------------
 1505|    289|        || !group->meth->field_sqr(group, t4, t4, ctx)
  ------------------
  |  Branch (1505:12): [True: 0, False: 289]
  ------------------
 1506|    289|        || !group->meth->field_mul(group, t5, p->X, group->b, ctx)
  ------------------
  |  Branch (1506:12): [True: 0, False: 289]
  ------------------
 1507|    289|        || !BN_mod_lshift_quick(t5, t5, 3, group->field)
  ------------------
  |  Branch (1507:12): [True: 0, False: 289]
  ------------------
 1508|       |        /* r->X coord output */
 1509|    289|        || !BN_mod_sub_quick(r->X, t4, t5, group->field)
  ------------------
  |  Branch (1509:12): [True: 0, False: 289]
  ------------------
 1510|    289|        || !BN_mod_add_quick(t1, t3, group->a, group->field)
  ------------------
  |  Branch (1510:12): [True: 0, False: 289]
  ------------------
 1511|    289|        || !group->meth->field_mul(group, t2, p->X, t1, ctx)
  ------------------
  |  Branch (1511:12): [True: 0, False: 289]
  ------------------
 1512|    289|        || !BN_mod_add_quick(t2, group->b, t2, group->field)
  ------------------
  |  Branch (1512:12): [True: 0, False: 289]
  ------------------
 1513|       |        /* r->Z coord output */
 1514|    289|        || !BN_mod_lshift_quick(r->Z, t2, 2, group->field))
  ------------------
  |  Branch (1514:12): [True: 0, False: 289]
  ------------------
 1515|      0|        return 0;
 1516|       |
 1517|       |    /* make sure lambda (r->Y here for storage) is not zero */
 1518|    289|    do {
 1519|    289|        if (!BN_priv_rand_range_ex(r->Y, group->field, 0, ctx))
  ------------------
  |  Branch (1519:13): [True: 0, False: 289]
  ------------------
 1520|      0|            return 0;
 1521|    289|    } while (BN_is_zero(r->Y));
  ------------------
  |  Branch (1521:14): [True: 0, False: 289]
  ------------------
 1522|       |
 1523|       |    /* make sure lambda (s->Z here for storage) is not zero */
 1524|    289|    do {
 1525|    289|        if (!BN_priv_rand_range_ex(s->Z, group->field, 0, ctx))
  ------------------
  |  Branch (1525:13): [True: 0, False: 289]
  ------------------
 1526|      0|            return 0;
 1527|    289|    } while (BN_is_zero(s->Z));
  ------------------
  |  Branch (1527:14): [True: 0, False: 289]
  ------------------
 1528|       |
 1529|       |    /* if field_encode defined convert between representations */
 1530|    289|    if (group->meth->field_encode != NULL
  ------------------
  |  Branch (1530:9): [True: 289, False: 0]
  ------------------
 1531|    289|        && (!group->meth->field_encode(group, r->Y, r->Y, ctx)
  ------------------
  |  Branch (1531:13): [True: 0, False: 289]
  ------------------
 1532|    289|            || !group->meth->field_encode(group, s->Z, s->Z, ctx)))
  ------------------
  |  Branch (1532:16): [True: 0, False: 289]
  ------------------
 1533|      0|        return 0;
 1534|       |
 1535|       |    /* blind r and s independently */
 1536|    289|    if (!group->meth->field_mul(group, r->Z, r->Z, r->Y, ctx)
  ------------------
  |  Branch (1536:9): [True: 0, False: 289]
  ------------------
 1537|    289|        || !group->meth->field_mul(group, r->X, r->X, r->Y, ctx)
  ------------------
  |  Branch (1537:12): [True: 0, False: 289]
  ------------------
 1538|    289|        || !group->meth->field_mul(group, s->X, p->X, s->Z, ctx)) /* s := p */
  ------------------
  |  Branch (1538:12): [True: 0, False: 289]
  ------------------
 1539|      0|        return 0;
 1540|       |
 1541|    289|    r->Z_is_one = 0;
 1542|    289|    s->Z_is_one = 0;
 1543|       |
 1544|    289|    return 1;
 1545|    289|}
ossl_ec_GFp_simple_ladder_step:
 1563|   115k|{
 1564|   115k|    int ret = 0;
 1565|   115k|    BIGNUM *t0, *t1, *t2, *t3, *t4, *t5, *t6 = NULL;
 1566|       |
 1567|   115k|    BN_CTX_start(ctx);
 1568|   115k|    t0 = BN_CTX_get(ctx);
 1569|   115k|    t1 = BN_CTX_get(ctx);
 1570|   115k|    t2 = BN_CTX_get(ctx);
 1571|   115k|    t3 = BN_CTX_get(ctx);
 1572|   115k|    t4 = BN_CTX_get(ctx);
 1573|   115k|    t5 = BN_CTX_get(ctx);
 1574|   115k|    t6 = BN_CTX_get(ctx);
 1575|       |
 1576|   115k|    if (t6 == NULL
  ------------------
  |  Branch (1576:9): [True: 0, False: 115k]
  ------------------
 1577|   115k|        || !group->meth->field_mul(group, t6, r->X, s->X, ctx)
  ------------------
  |  Branch (1577:12): [True: 0, False: 115k]
  ------------------
 1578|   115k|        || !group->meth->field_mul(group, t0, r->Z, s->Z, ctx)
  ------------------
  |  Branch (1578:12): [True: 0, False: 115k]
  ------------------
 1579|   115k|        || !group->meth->field_mul(group, t4, r->X, s->Z, ctx)
  ------------------
  |  Branch (1579:12): [True: 0, False: 115k]
  ------------------
 1580|   115k|        || !group->meth->field_mul(group, t3, r->Z, s->X, ctx)
  ------------------
  |  Branch (1580:12): [True: 0, False: 115k]
  ------------------
 1581|   115k|        || !group->meth->field_mul(group, t5, group->a, t0, ctx)
  ------------------
  |  Branch (1581:12): [True: 0, False: 115k]
  ------------------
 1582|   115k|        || !BN_mod_add_quick(t5, t6, t5, group->field)
  ------------------
  |  Branch (1582:12): [True: 0, False: 115k]
  ------------------
 1583|   115k|        || !BN_mod_add_quick(t6, t3, t4, group->field)
  ------------------
  |  Branch (1583:12): [True: 0, False: 115k]
  ------------------
 1584|   115k|        || !group->meth->field_mul(group, t5, t6, t5, ctx)
  ------------------
  |  Branch (1584:12): [True: 0, False: 115k]
  ------------------
 1585|   115k|        || !group->meth->field_sqr(group, t0, t0, ctx)
  ------------------
  |  Branch (1585:12): [True: 0, False: 115k]
  ------------------
 1586|   115k|        || !BN_mod_lshift_quick(t2, group->b, 2, group->field)
  ------------------
  |  Branch (1586:12): [True: 0, False: 115k]
  ------------------
 1587|   115k|        || !group->meth->field_mul(group, t0, t2, t0, ctx)
  ------------------
  |  Branch (1587:12): [True: 0, False: 115k]
  ------------------
 1588|   115k|        || !BN_mod_lshift1_quick(t5, t5, group->field)
  ------------------
  |  Branch (1588:12): [True: 0, False: 115k]
  ------------------
 1589|   115k|        || !BN_mod_sub_quick(t3, t4, t3, group->field)
  ------------------
  |  Branch (1589:12): [True: 0, False: 115k]
  ------------------
 1590|       |        /* s->Z coord output */
 1591|   115k|        || !group->meth->field_sqr(group, s->Z, t3, ctx)
  ------------------
  |  Branch (1591:12): [True: 0, False: 115k]
  ------------------
 1592|   115k|        || !group->meth->field_mul(group, t4, s->Z, p->X, ctx)
  ------------------
  |  Branch (1592:12): [True: 0, False: 115k]
  ------------------
 1593|   115k|        || !BN_mod_add_quick(t0, t0, t5, group->field)
  ------------------
  |  Branch (1593:12): [True: 0, False: 115k]
  ------------------
 1594|       |        /* s->X coord output */
 1595|   115k|        || !BN_mod_sub_quick(s->X, t0, t4, group->field)
  ------------------
  |  Branch (1595:12): [True: 0, False: 115k]
  ------------------
 1596|   115k|        || !group->meth->field_sqr(group, t4, r->X, ctx)
  ------------------
  |  Branch (1596:12): [True: 0, False: 115k]
  ------------------
 1597|   115k|        || !group->meth->field_sqr(group, t5, r->Z, ctx)
  ------------------
  |  Branch (1597:12): [True: 0, False: 115k]
  ------------------
 1598|   115k|        || !group->meth->field_mul(group, t6, t5, group->a, ctx)
  ------------------
  |  Branch (1598:12): [True: 0, False: 115k]
  ------------------
 1599|   115k|        || !BN_mod_add_quick(t1, r->X, r->Z, group->field)
  ------------------
  |  Branch (1599:12): [True: 0, False: 115k]
  ------------------
 1600|   115k|        || !group->meth->field_sqr(group, t1, t1, ctx)
  ------------------
  |  Branch (1600:12): [True: 0, False: 115k]
  ------------------
 1601|   115k|        || !BN_mod_sub_quick(t1, t1, t4, group->field)
  ------------------
  |  Branch (1601:12): [True: 0, False: 115k]
  ------------------
 1602|   115k|        || !BN_mod_sub_quick(t1, t1, t5, group->field)
  ------------------
  |  Branch (1602:12): [True: 0, False: 115k]
  ------------------
 1603|   115k|        || !BN_mod_sub_quick(t3, t4, t6, group->field)
  ------------------
  |  Branch (1603:12): [True: 0, False: 115k]
  ------------------
 1604|   115k|        || !group->meth->field_sqr(group, t3, t3, ctx)
  ------------------
  |  Branch (1604:12): [True: 0, False: 115k]
  ------------------
 1605|   115k|        || !group->meth->field_mul(group, t0, t5, t1, ctx)
  ------------------
  |  Branch (1605:12): [True: 0, False: 115k]
  ------------------
 1606|   115k|        || !group->meth->field_mul(group, t0, t2, t0, ctx)
  ------------------
  |  Branch (1606:12): [True: 0, False: 115k]
  ------------------
 1607|       |        /* r->X coord output */
 1608|   115k|        || !BN_mod_sub_quick(r->X, t3, t0, group->field)
  ------------------
  |  Branch (1608:12): [True: 0, False: 115k]
  ------------------
 1609|   115k|        || !BN_mod_add_quick(t3, t4, t6, group->field)
  ------------------
  |  Branch (1609:12): [True: 0, False: 115k]
  ------------------
 1610|   115k|        || !group->meth->field_sqr(group, t4, t5, ctx)
  ------------------
  |  Branch (1610:12): [True: 0, False: 115k]
  ------------------
 1611|   115k|        || !group->meth->field_mul(group, t4, t4, t2, ctx)
  ------------------
  |  Branch (1611:12): [True: 0, False: 115k]
  ------------------
 1612|   115k|        || !group->meth->field_mul(group, t1, t1, t3, ctx)
  ------------------
  |  Branch (1612:12): [True: 0, False: 115k]
  ------------------
 1613|   115k|        || !BN_mod_lshift1_quick(t1, t1, group->field)
  ------------------
  |  Branch (1613:12): [True: 0, False: 115k]
  ------------------
 1614|       |        /* r->Z coord output */
 1615|   115k|        || !BN_mod_add_quick(r->Z, t4, t1, group->field))
  ------------------
  |  Branch (1615:12): [True: 0, False: 115k]
  ------------------
 1616|      0|        goto err;
 1617|       |
 1618|   115k|    ret = 1;
 1619|       |
 1620|   115k|err:
 1621|   115k|    BN_CTX_end(ctx);
 1622|   115k|    return ret;
 1623|   115k|}
ossl_ec_GFp_simple_ladder_post:
 1651|    289|{
 1652|    289|    int ret = 0;
 1653|    289|    BIGNUM *t0, *t1, *t2, *t3, *t4, *t5, *t6 = NULL;
 1654|       |
 1655|    289|    if (BN_is_zero(r->Z))
  ------------------
  |  Branch (1655:9): [True: 0, False: 289]
  ------------------
 1656|      0|        return EC_POINT_set_to_infinity(group, r);
 1657|       |
 1658|    289|    if (BN_is_zero(s->Z)) {
  ------------------
  |  Branch (1658:9): [True: 0, False: 289]
  ------------------
 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|    289|    BN_CTX_start(ctx);
 1666|    289|    t0 = BN_CTX_get(ctx);
 1667|    289|    t1 = BN_CTX_get(ctx);
 1668|    289|    t2 = BN_CTX_get(ctx);
 1669|    289|    t3 = BN_CTX_get(ctx);
 1670|    289|    t4 = BN_CTX_get(ctx);
 1671|    289|    t5 = BN_CTX_get(ctx);
 1672|    289|    t6 = BN_CTX_get(ctx);
 1673|       |
 1674|    289|    if (t6 == NULL
  ------------------
  |  Branch (1674:9): [True: 0, False: 289]
  ------------------
 1675|    289|        || !BN_mod_lshift1_quick(t4, p->Y, group->field)
  ------------------
  |  Branch (1675:12): [True: 0, False: 289]
  ------------------
 1676|    289|        || !group->meth->field_mul(group, t6, r->X, t4, ctx)
  ------------------
  |  Branch (1676:12): [True: 0, False: 289]
  ------------------
 1677|    289|        || !group->meth->field_mul(group, t6, s->Z, t6, ctx)
  ------------------
  |  Branch (1677:12): [True: 0, False: 289]
  ------------------
 1678|    289|        || !group->meth->field_mul(group, t5, r->Z, t6, ctx)
  ------------------
  |  Branch (1678:12): [True: 0, False: 289]
  ------------------
 1679|    289|        || !BN_mod_lshift1_quick(t1, group->b, group->field)
  ------------------
  |  Branch (1679:12): [True: 0, False: 289]
  ------------------
 1680|    289|        || !group->meth->field_mul(group, t1, s->Z, t1, ctx)
  ------------------
  |  Branch (1680:12): [True: 0, False: 289]
  ------------------
 1681|    289|        || !group->meth->field_sqr(group, t3, r->Z, ctx)
  ------------------
  |  Branch (1681:12): [True: 0, False: 289]
  ------------------
 1682|    289|        || !group->meth->field_mul(group, t2, t3, t1, ctx)
  ------------------
  |  Branch (1682:12): [True: 0, False: 289]
  ------------------
 1683|    289|        || !group->meth->field_mul(group, t6, r->Z, group->a, ctx)
  ------------------
  |  Branch (1683:12): [True: 0, False: 289]
  ------------------
 1684|    289|        || !group->meth->field_mul(group, t1, p->X, r->X, ctx)
  ------------------
  |  Branch (1684:12): [True: 0, False: 289]
  ------------------
 1685|    289|        || !BN_mod_add_quick(t1, t1, t6, group->field)
  ------------------
  |  Branch (1685:12): [True: 0, False: 289]
  ------------------
 1686|    289|        || !group->meth->field_mul(group, t1, s->Z, t1, ctx)
  ------------------
  |  Branch (1686:12): [True: 0, False: 289]
  ------------------
 1687|    289|        || !group->meth->field_mul(group, t0, p->X, r->Z, ctx)
  ------------------
  |  Branch (1687:12): [True: 0, False: 289]
  ------------------
 1688|    289|        || !BN_mod_add_quick(t6, r->X, t0, group->field)
  ------------------
  |  Branch (1688:12): [True: 0, False: 289]
  ------------------
 1689|    289|        || !group->meth->field_mul(group, t6, t6, t1, ctx)
  ------------------
  |  Branch (1689:12): [True: 0, False: 289]
  ------------------
 1690|    289|        || !BN_mod_add_quick(t6, t6, t2, group->field)
  ------------------
  |  Branch (1690:12): [True: 0, False: 289]
  ------------------
 1691|    289|        || !BN_mod_sub_quick(t0, t0, r->X, group->field)
  ------------------
  |  Branch (1691:12): [True: 0, False: 289]
  ------------------
 1692|    289|        || !group->meth->field_sqr(group, t0, t0, ctx)
  ------------------
  |  Branch (1692:12): [True: 0, False: 289]
  ------------------
 1693|    289|        || !group->meth->field_mul(group, t0, t0, s->X, ctx)
  ------------------
  |  Branch (1693:12): [True: 0, False: 289]
  ------------------
 1694|    289|        || !BN_mod_sub_quick(t0, t6, t0, group->field)
  ------------------
  |  Branch (1694:12): [True: 0, False: 289]
  ------------------
 1695|    289|        || !group->meth->field_mul(group, t1, s->Z, t4, ctx)
  ------------------
  |  Branch (1695:12): [True: 0, False: 289]
  ------------------
 1696|    289|        || !group->meth->field_mul(group, t1, t3, t1, ctx)
  ------------------
  |  Branch (1696:12): [True: 0, False: 289]
  ------------------
 1697|    289|        || (group->meth->field_decode != NULL
  ------------------
  |  Branch (1697:13): [True: 289, False: 0]
  ------------------
 1698|    289|            && !group->meth->field_decode(group, t1, t1, ctx))
  ------------------
  |  Branch (1698:16): [True: 0, False: 289]
  ------------------
 1699|    289|        || !group->meth->field_inv(group, t1, t1, ctx)
  ------------------
  |  Branch (1699:12): [True: 0, False: 289]
  ------------------
 1700|    289|        || (group->meth->field_encode != NULL
  ------------------
  |  Branch (1700:13): [True: 289, False: 0]
  ------------------
 1701|    289|            && !group->meth->field_encode(group, t1, t1, ctx))
  ------------------
  |  Branch (1701:16): [True: 0, False: 289]
  ------------------
 1702|    289|        || !group->meth->field_mul(group, r->X, t5, t1, ctx)
  ------------------
  |  Branch (1702:12): [True: 0, False: 289]
  ------------------
 1703|    289|        || !group->meth->field_mul(group, r->Y, t0, t1, ctx))
  ------------------
  |  Branch (1703:12): [True: 0, False: 289]
  ------------------
 1704|      0|        goto err;
 1705|       |
 1706|    289|    if (group->meth->field_set_to_one != NULL) {
  ------------------
  |  Branch (1706:9): [True: 289, False: 0]
  ------------------
 1707|    289|        if (!group->meth->field_set_to_one(group, r->Z, ctx))
  ------------------
  |  Branch (1707:13): [True: 0, False: 289]
  ------------------
 1708|      0|            goto err;
 1709|    289|    } 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|    289|    r->Z_is_one = 1;
 1715|    289|    ret = 1;
 1716|       |
 1717|    289|err:
 1718|    289|    BN_CTX_end(ctx);
 1719|    289|    return ret;
 1720|    289|}

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

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

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

OSSL_DECODER_up_ref:
   53|  2.49M|{
   54|  2.49M|    int ref = 0;
   55|       |
   56|  2.49M|    CRYPTO_UP_REF(&decoder->base.refcnt, &ref);
   57|  2.49M|    return 1;
   58|  2.49M|}
OSSL_DECODER_free:
   61|  2.49M|{
   62|  2.49M|    int ref = 0;
   63|       |
   64|  2.49M|    if (decoder == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 2.49M]
  ------------------
   65|      0|        return;
   66|       |
   67|  2.49M|    CRYPTO_DOWN_REF(&decoder->base.refcnt, &ref);
   68|  2.49M|    if (ref > 0)
  ------------------
  |  Branch (68:9): [True: 2.49M, False: 76]
  ------------------
   69|  2.49M|        return;
   70|     76|    OPENSSL_free(decoder->base.name);
  ------------------
  |  |  131|     76|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   71|     76|    ossl_property_free(decoder->base.parsed_propdef);
   72|     76|    ossl_provider_free(decoder->base.prov);
   73|     76|    CRYPTO_FREE_REF(&decoder->base.refcnt);
   74|     76|    OPENSSL_free(decoder);
  ------------------
  |  |  131|     76|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|     76|}
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:
  ------------------
  |  |  984|     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:
  ------------------
  |  |  985|     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:
  ------------------
  |  |  986|      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:
  ------------------
  |  |  987|      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:
  ------------------
  |  |  988|     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:
  ------------------
  |  |  989|     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:
  ------------------
  |  |  990|     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:
  ------------------
  |  |  991|     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:
  ------------------
  |  |  992|     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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|    920|{
  439|    920|    OSSL_METHOD_STORE *store = get_decoder_store(libctx);
  440|       |
  441|    920|    if (store != NULL)
  ------------------
  |  Branch (441:9): [True: 920, False: 0]
  ------------------
  442|    920|        return ossl_method_store_cache_flush_all(store);
  443|      0|    return 1;
  444|    920|}
ossl_decoder_store_remove_all_provided:
  447|    920|{
  448|    920|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  449|    920|    OSSL_METHOD_STORE *store = get_decoder_store(libctx);
  450|       |
  451|    920|    if (store != NULL)
  ------------------
  |  Branch (451:9): [True: 920, False: 0]
  ------------------
  452|    920|        return ossl_method_store_remove_all_provided(store, prov);
  453|      0|    return 1;
  454|    920|}
OSSL_DECODER_get0_provider:
  461|  3.37M|{
  462|  3.37M|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|  3.37M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.37M|    __FILE__, __LINE__)
  ------------------
  |  Branch (462:9): [True: 0, False: 3.37M]
  ------------------
  463|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  464|      0|        return 0;
  465|      0|    }
  466|       |
  467|  3.37M|    return decoder->base.prov;
  468|  3.37M|}
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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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.18M|{
  493|  1.18M|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|  1.18M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.18M|    __FILE__, __LINE__)
  ------------------
  |  Branch (493:9): [True: 0, False: 1.18M]
  ------------------
  494|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  495|      0|        return 0;
  496|      0|    }
  497|       |
  498|  1.18M|    return decoder->base.id;
  499|  1.18M|}
OSSL_DECODER_is_a:
  512|  1.18M|{
  513|  1.18M|    if (decoder->base.prov != NULL) {
  ------------------
  |  Branch (513:9): [True: 1.18M, False: 0]
  ------------------
  514|  1.18M|        OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  515|  1.18M|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  516|       |
  517|  1.18M|        return ossl_namemap_name2num(namemap, name) == decoder->base.id;
  518|  1.18M|    }
  519|      0|    return 0;
  520|  1.18M|}
ossl_decoder_fast_is_a:
  531|  1.19M|{
  532|  1.19M|    int id = *id_cache;
  533|       |
  534|  1.19M|    if (id <= 0)
  ------------------
  |  Branch (534:9): [True: 1.18M, False: 1.35k]
  ------------------
  535|  1.18M|        *id_cache = id = resolve_name(decoder, name);
  536|       |
  537|  1.19M|    return id > 0 && ossl_decoder_get_number(decoder) == id;
  ------------------
  |  Branch (537:12): [True: 1.18M, False: 311]
  |  Branch (537:22): [True: 1.18M, False: 1.31k]
  ------------------
  538|  1.19M|}
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|   435k|{
  630|   435k|    OSSL_DECODER_CTX *ctx;
  631|       |
  632|   435k|    ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  633|   435k|    return ctx;
  634|   435k|}
OSSL_DECODER_CTX_free:
  666|   871k|{
  667|   871k|    if (ctx != NULL) {
  ------------------
  |  Branch (667:9): [True: 435k, False: 435k]
  ------------------
  668|   435k|        if (ctx->cleanup != NULL)
  ------------------
  |  Branch (668:13): [True: 435k, False: 0]
  ------------------
  669|   435k|            ctx->cleanup(ctx->construct_data);
  670|   435k|        sk_OSSL_DECODER_INSTANCE_pop_free(ctx->decoder_insts,
  671|   435k|            ossl_decoder_instance_free);
  672|   435k|        ossl_pw_clear_passphrase_data(&ctx->pwdata);
  673|   435k|        OPENSSL_free(ctx);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  674|   435k|    }
  675|   871k|}
decoder_meth.c:ossl_decoder_new:
   39|     76|{
   40|     76|    OSSL_DECODER *decoder = NULL;
   41|       |
   42|     76|    if ((decoder = OPENSSL_zalloc(sizeof(*decoder))) == NULL)
  ------------------
  |  |  108|     76|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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;
  ------------------
  |  |  364|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  365|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, code,
  ------------------
  |  |  123|      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:ossl_decoder_free:
   28|     76|{
   29|     76|    OSSL_DECODER_free(data);
   30|     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.93k|{
  113|  1.93k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_STORE_INDEX);
  ------------------
  |  |  109|  1.93k|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  114|  1.93k|}
decoder_meth.c:resolve_name:
  523|  1.18M|{
  524|  1.18M|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  525|  1.18M|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  526|       |
  527|  1.18M|    return ossl_namemap_name2num(namemap, name);
  528|  1.18M|}
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:
  764|    785|{
  765|    785|    DECODER_CACHE *cache = OPENSSL_malloc(sizeof(*cache));
  ------------------
  |  |  106|    785|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  766|       |
  767|    785|    if (cache == NULL)
  ------------------
  |  Branch (767:9): [True: 0, False: 785]
  ------------------
  768|      0|        return NULL;
  769|       |
  770|    785|    cache->lock = CRYPTO_THREAD_lock_new();
  771|    785|    if (cache->lock == NULL) {
  ------------------
  |  Branch (771:9): [True: 0, False: 785]
  ------------------
  772|      0|        OPENSSL_free(cache);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  773|      0|        return NULL;
  774|      0|    }
  775|    785|    cache->hashtable = lh_DECODER_CACHE_ENTRY_new(decoder_cache_entry_hash,
  776|    785|        decoder_cache_entry_cmp);
  777|    785|    if (cache->hashtable == NULL) {
  ------------------
  |  Branch (777:9): [True: 0, False: 785]
  ------------------
  778|      0|        CRYPTO_THREAD_lock_free(cache->lock);
  779|      0|        OPENSSL_free(cache);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  780|      0|        return NULL;
  781|      0|    }
  782|       |
  783|    785|    return cache;
  784|    785|}
ossl_decoder_cache_free:
  787|    785|{
  788|    785|    DECODER_CACHE *cache = (DECODER_CACHE *)vcache;
  789|       |
  790|    785|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  791|    785|    lh_DECODER_CACHE_ENTRY_free(cache->hashtable);
  792|    785|    CRYPTO_THREAD_lock_free(cache->lock);
  793|    785|    OPENSSL_free(cache);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  794|    785|}
ossl_decoder_cache_flush:
  801|  2.62k|{
  802|  2.62k|    DECODER_CACHE *cache
  803|  2.62k|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  118|  2.62k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  804|       |
  805|  2.62k|    if (cache == NULL)
  ------------------
  |  Branch (805:9): [True: 785, False: 1.84k]
  ------------------
  806|    785|        return 0;
  807|       |
  808|  1.84k|    if (!CRYPTO_THREAD_write_lock(cache->lock)) {
  ------------------
  |  Branch (808:9): [True: 0, False: 1.84k]
  ------------------
  809|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  810|      0|        return 0;
  811|      0|    }
  812|       |
  813|  1.84k|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  814|  1.84k|    lh_DECODER_CACHE_ENTRY_flush(cache->hashtable);
  815|       |
  816|  1.84k|    CRYPTO_THREAD_unlock(cache->lock);
  817|  1.84k|    return 1;
  818|  1.84k|}
OSSL_DECODER_CTX_new_for_pkey:
  826|   435k|{
  827|   435k|    OSSL_DECODER_CTX *ctx = NULL;
  828|   435k|    OSSL_PARAM decoder_params[] = {
  829|   435k|        OSSL_PARAM_END,
  ------------------
  |  |   25|   435k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  830|   435k|        OSSL_PARAM_END,
  ------------------
  |  |   25|   435k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  831|   435k|        OSSL_PARAM_END
  ------------------
  |  |   25|   435k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  832|   435k|    };
  833|   435k|    DECODER_CACHE *cache
  834|   435k|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  118|   435k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  835|   435k|    DECODER_CACHE_ENTRY cacheent, *res, *newcache = NULL;
  836|   435k|    int i = 0;
  837|       |
  838|   435k|    if (cache == NULL) {
  ------------------
  |  Branch (838:9): [True: 0, False: 435k]
  ------------------
  839|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  840|      0|        return NULL;
  841|      0|    }
  842|   435k|    if (input_structure != NULL)
  ------------------
  |  Branch (842:9): [True: 435k, False: 0]
  ------------------
  843|   435k|        decoder_params[i++] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  357|   435k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  844|   435k|            (char *)input_structure, 0);
  845|   435k|    if (propquery != NULL)
  ------------------
  |  Branch (845:9): [True: 0, False: 435k]
  ------------------
  846|      0|        decoder_params[i++] = OSSL_PARAM_construct_utf8_string(OSSL_DECODER_PARAM_PROPERTIES,
  ------------------
  |  |  224|      0|# define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  132|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  ------------------
  ------------------
  847|      0|            (char *)propquery, 0);
  848|       |
  849|       |    /* It is safe to cast away the const here */
  850|   435k|    cacheent.input_type = (char *)input_type;
  851|   435k|    cacheent.input_structure = (char *)input_structure;
  852|   435k|    cacheent.keytype = (char *)keytype;
  853|   435k|    cacheent.selection = selection;
  854|   435k|    cacheent.propquery = (char *)propquery;
  855|       |
  856|   435k|    if (!CRYPTO_THREAD_read_lock(cache->lock)) {
  ------------------
  |  Branch (856:9): [True: 0, False: 435k]
  ------------------
  857|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  858|      0|        return NULL;
  859|      0|    }
  860|       |
  861|       |    /* First see if we have a template OSSL_DECODER_CTX */
  862|   435k|    res = lh_DECODER_CACHE_ENTRY_retrieve(cache->hashtable, &cacheent);
  863|       |
  864|   435k|    if (res == NULL) {
  ------------------
  |  Branch (864:9): [True: 2, False: 435k]
  ------------------
  865|       |        /*
  866|       |         * There is no template so we will have to construct one. This will be
  867|       |         * time consuming so release the lock and we will later upgrade it to a
  868|       |         * write lock.
  869|       |         */
  870|      2|        CRYPTO_THREAD_unlock(cache->lock);
  871|       |
  872|      2|        if ((ctx = OSSL_DECODER_CTX_new()) == NULL) {
  ------------------
  |  Branch (872:13): [True: 0, False: 2]
  ------------------
  873|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  874|      0|            return NULL;
  875|      0|        }
  876|       |
  877|      2|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      2|    do {                           \
  |  |  222|      2|        BIO *trc_out = NULL;       \
  |  |  223|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  878|      0|        {
  879|      0|            BIO_printf(trc_out,
  880|      0|                "(ctx %p) Looking for %s decoders with selection %d\n",
  881|      0|                (void *)ctx, keytype, selection);
  882|      0|            BIO_printf(trc_out, "    input type: %s, input structure: %s\n",
  883|      0|                input_type, input_structure);
  884|      0|        }
  885|      2|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      2|    }                            \
  |  |  227|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  886|       |
  887|      2|        if (OSSL_DECODER_CTX_set_input_type(ctx, input_type)
  ------------------
  |  Branch (887:13): [True: 2, False: 0]
  ------------------
  888|      2|            && OSSL_DECODER_CTX_set_input_structure(ctx, input_structure)
  ------------------
  |  Branch (888:16): [True: 2, False: 0]
  ------------------
  889|      2|            && OSSL_DECODER_CTX_set_selection(ctx, selection)
  ------------------
  |  Branch (889:16): [True: 2, False: 0]
  ------------------
  890|      2|            && ossl_decoder_ctx_setup_for_pkey(ctx, keytype, libctx, propquery)
  ------------------
  |  Branch (890:16): [True: 2, False: 0]
  ------------------
  891|      2|            && OSSL_DECODER_CTX_add_extra(ctx, libctx, propquery)
  ------------------
  |  Branch (891:16): [True: 2, False: 0]
  ------------------
  892|      2|            && (propquery == NULL
  ------------------
  |  Branch (892:17): [True: 2, False: 0]
  ------------------
  893|      2|                || OSSL_DECODER_CTX_set_params(ctx, decoder_params))) {
  ------------------
  |  Branch (893:20): [True: 0, False: 0]
  ------------------
  894|      2|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      2|    do {                           \
  |  |  222|      2|        BIO *trc_out = NULL;       \
  |  |  223|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  895|      0|            {
  896|      0|                BIO_printf(trc_out, "(ctx %p) Got %d decoders\n",
  897|      0|                    (void *)ctx, OSSL_DECODER_CTX_get_num_decoders(ctx));
  898|      0|            }
  899|      2|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      2|    }                            \
  |  |  227|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  900|      2|        } else {
  901|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  902|      0|            OSSL_DECODER_CTX_free(ctx);
  903|      0|            return NULL;
  904|      0|        }
  905|       |
  906|      2|        newcache = OPENSSL_zalloc(sizeof(*newcache));
  ------------------
  |  |  108|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  907|      2|        if (newcache == NULL) {
  ------------------
  |  Branch (907:13): [True: 0, False: 2]
  ------------------
  908|      0|            OSSL_DECODER_CTX_free(ctx);
  909|      0|            return NULL;
  910|      0|        }
  911|       |
  912|      2|        if (input_type != NULL) {
  ------------------
  |  Branch (912:13): [True: 2, False: 0]
  ------------------
  913|      2|            newcache->input_type = OPENSSL_strdup(input_type);
  ------------------
  |  |  135|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  914|      2|            if (newcache->input_type == NULL)
  ------------------
  |  Branch (914:17): [True: 0, False: 2]
  ------------------
  915|      0|                goto err;
  916|      2|        }
  917|      2|        if (input_structure != NULL) {
  ------------------
  |  Branch (917:13): [True: 2, False: 0]
  ------------------
  918|      2|            newcache->input_structure = OPENSSL_strdup(input_structure);
  ------------------
  |  |  135|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  919|      2|            if (newcache->input_structure == NULL)
  ------------------
  |  Branch (919:17): [True: 0, False: 2]
  ------------------
  920|      0|                goto err;
  921|      2|        }
  922|      2|        if (keytype != NULL) {
  ------------------
  |  Branch (922:13): [True: 2, False: 0]
  ------------------
  923|      2|            newcache->keytype = OPENSSL_strdup(keytype);
  ------------------
  |  |  135|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  924|      2|            if (newcache->keytype == NULL)
  ------------------
  |  Branch (924:17): [True: 0, False: 2]
  ------------------
  925|      0|                goto err;
  926|      2|        }
  927|      2|        if (propquery != NULL) {
  ------------------
  |  Branch (927:13): [True: 0, False: 2]
  ------------------
  928|      0|            newcache->propquery = OPENSSL_strdup(propquery);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  929|      0|            if (newcache->propquery == NULL)
  ------------------
  |  Branch (929:17): [True: 0, False: 0]
  ------------------
  930|      0|                goto err;
  931|      0|        }
  932|      2|        newcache->selection = selection;
  933|      2|        newcache->template = ctx;
  934|       |
  935|      2|        if (!CRYPTO_THREAD_write_lock(cache->lock)) {
  ------------------
  |  Branch (935:13): [True: 0, False: 2]
  ------------------
  936|      0|            ctx = NULL;
  937|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  938|      0|            goto err;
  939|      0|        }
  940|      2|        res = lh_DECODER_CACHE_ENTRY_retrieve(cache->hashtable, &cacheent);
  941|      2|        if (res == NULL) {
  ------------------
  |  Branch (941:13): [True: 2, False: 0]
  ------------------
  942|      2|            (void)lh_DECODER_CACHE_ENTRY_insert(cache->hashtable, newcache);
  943|      2|            if (lh_DECODER_CACHE_ENTRY_error(cache->hashtable)) {
  ------------------
  |  Branch (943:17): [True: 0, False: 2]
  ------------------
  944|      0|                ctx = NULL;
  945|      0|                CRYPTO_THREAD_unlock(cache->lock);
  946|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  947|      0|                goto err;
  948|      0|            }
  949|      2|        } else {
  950|       |            /*
  951|       |             * We raced with another thread to construct this and lost. Free
  952|       |             * what we just created and use the entry from the hashtable instead
  953|       |             */
  954|      0|            decoder_cache_entry_free(newcache);
  955|      0|            ctx = res->template;
  956|      0|        }
  957|   435k|    } else {
  958|   435k|        ctx = res->template;
  959|   435k|    }
  960|       |
  961|   435k|    ctx = ossl_decoder_ctx_for_pkey_dup(ctx, pkey, input_type, input_structure);
  962|   435k|    CRYPTO_THREAD_unlock(cache->lock);
  963|       |
  964|   435k|    return ctx;
  965|      0|err:
  966|      0|    decoder_cache_entry_free(newcache);
  967|      0|    OSSL_DECODER_CTX_free(ctx);
  968|       |    return NULL;
  969|   435k|}
decoder_pkey.c:decoder_cache_entry_hash:
  694|   435k|{
  695|   435k|    unsigned long hash = 17;
  696|       |
  697|   435k|    hash = (hash * 23)
  698|   435k|        + (cache->propquery == NULL
  ------------------
  |  Branch (698:12): [True: 435k, False: 0]
  ------------------
  699|   435k|                ? 0
  700|   435k|                : ossl_lh_strcasehash(cache->propquery));
  701|   435k|    hash = (hash * 23)
  702|   435k|        + (cache->input_structure == NULL
  ------------------
  |  Branch (702:12): [True: 0, False: 435k]
  ------------------
  703|   435k|                ? 0
  704|   435k|                : ossl_lh_strcasehash(cache->input_structure));
  705|   435k|    hash = (hash * 23)
  706|   435k|        + (cache->input_type == NULL
  ------------------
  |  Branch (706:12): [True: 0, False: 435k]
  ------------------
  707|   435k|                ? 0
  708|   435k|                : ossl_lh_strcasehash(cache->input_type));
  709|   435k|    hash = (hash * 23)
  710|   435k|        + (cache->keytype == NULL
  ------------------
  |  Branch (710:12): [True: 0, False: 435k]
  ------------------
  711|   435k|                ? 0
  712|   435k|                : ossl_lh_strcasehash(cache->keytype));
  713|       |
  714|   435k|    hash ^= cache->selection;
  715|       |
  716|   435k|    return hash;
  717|   435k|}
decoder_pkey.c:decoder_cache_entry_cmp:
  740|   435k|{
  741|   435k|    int cmp;
  742|       |
  743|   435k|    if (a->selection != b->selection)
  ------------------
  |  Branch (743:9): [True: 0, False: 435k]
  ------------------
  744|      0|        return (a->selection < b->selection) ? -1 : 1;
  ------------------
  |  Branch (744:16): [True: 0, False: 0]
  ------------------
  745|       |
  746|   435k|    cmp = nullstrcmp(a->keytype, b->keytype, 1);
  747|   435k|    if (cmp != 0)
  ------------------
  |  Branch (747:9): [True: 0, False: 435k]
  ------------------
  748|      0|        return cmp;
  749|       |
  750|   435k|    cmp = nullstrcmp(a->input_type, b->input_type, 1);
  751|   435k|    if (cmp != 0)
  ------------------
  |  Branch (751:9): [True: 0, False: 435k]
  ------------------
  752|      0|        return cmp;
  753|       |
  754|   435k|    cmp = nullstrcmp(a->input_structure, b->input_structure, 1);
  755|   435k|    if (cmp != 0)
  ------------------
  |  Branch (755:9): [True: 0, False: 435k]
  ------------------
  756|      0|        return cmp;
  757|       |
  758|   435k|    cmp = nullstrcmp(a->propquery, b->propquery, 0);
  759|       |
  760|   435k|    return cmp;
  761|   435k|}
decoder_pkey.c:nullstrcmp:
  720|  1.74M|{
  721|  1.74M|    if (a == NULL || b == NULL) {
  ------------------
  |  Branch (721:9): [True: 435k, False: 1.30M]
  |  Branch (721:22): [True: 0, False: 1.30M]
  ------------------
  722|   435k|        if (a == NULL) {
  ------------------
  |  Branch (722:13): [True: 435k, False: 0]
  ------------------
  723|   435k|            if (b == NULL)
  ------------------
  |  Branch (723:17): [True: 435k, False: 0]
  ------------------
  724|   435k|                return 0;
  725|      0|            else
  726|      0|                return 1;
  727|   435k|        } else {
  728|      0|            return -1;
  729|      0|        }
  730|  1.30M|    } else {
  731|  1.30M|        if (casecmp)
  ------------------
  |  Branch (731:13): [True: 1.30M, False: 0]
  ------------------
  732|  1.30M|            return OPENSSL_strcasecmp(a, b);
  733|      0|        else
  734|      0|            return strcmp(a, b);
  735|  1.30M|    }
  736|  1.74M|}
decoder_pkey.c:decoder_cache_entry_free:
  682|      2|{
  683|      2|    if (entry == NULL)
  ------------------
  |  Branch (683:9): [True: 0, False: 2]
  ------------------
  684|      0|        return;
  685|      2|    OPENSSL_free(entry->input_type);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  686|      2|    OPENSSL_free(entry->input_structure);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  687|      2|    OPENSSL_free(entry->keytype);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  688|      2|    OPENSSL_free(entry->propquery);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  689|      2|    OSSL_DECODER_CTX_free(entry->template);
  690|      2|    OPENSSL_free(entry);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  691|      2|}
decoder_pkey.c:ossl_decoder_ctx_setup_for_pkey:
  435|      2|{
  436|      2|    int ok = 0;
  437|      2|    struct decoder_pkey_data_st *process_data = NULL;
  438|      2|    struct collect_data_st collect_data = { NULL };
  439|      2|    STACK_OF(EVP_KEYMGMT) *keymgmts = NULL;
  ------------------
  |  |   33|      2|#define STACK_OF(type) struct stack_st_##type
  ------------------
  440|      2|    OSSL_PROPERTY_LIST **plp;
  441|      2|    OSSL_PROPERTY_LIST *pq = NULL, *p2 = NULL;
  442|       |
  443|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      2|    do {                           \
  |  |  222|      2|        BIO *trc_out = NULL;       \
  |  |  223|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  444|      0|    {
  445|      0|        const char *input_type = ctx->start_input_type;
  446|      0|        const char *input_structure = ctx->input_structure;
  447|       |
  448|      0|        BIO_printf(trc_out,
  449|      0|            "(ctx %p) Looking for decoders producing %s%s%s%s%s%s\n",
  450|      0|            (void *)ctx,
  451|      0|            keytype != NULL ? keytype : "",
  ------------------
  |  Branch (451:13): [True: 0, False: 0]
  ------------------
  452|      0|            keytype != NULL ? " keys" : "keys of any type",
  ------------------
  |  Branch (452:13): [True: 0, False: 0]
  ------------------
  453|      0|            input_type != NULL ? " from " : "",
  ------------------
  |  Branch (453:13): [True: 0, False: 0]
  ------------------
  454|      0|            input_type != NULL ? input_type : "",
  ------------------
  |  Branch (454:13): [True: 0, False: 0]
  ------------------
  455|      0|            input_structure != NULL ? " with " : "",
  ------------------
  |  Branch (455:13): [True: 0, False: 0]
  ------------------
  456|      0|            input_structure != NULL ? input_structure : "");
  ------------------
  |  Branch (456:13): [True: 0, False: 0]
  ------------------
  457|      0|    }
  458|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      2|    }                            \
  |  |  227|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  459|       |
  460|       |    /* Allocate data. */
  461|      2|    if ((process_data = OPENSSL_zalloc(sizeof(*process_data))) == NULL)
  ------------------
  |  |  108|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (461:9): [True: 0, False: 2]
  ------------------
  462|      0|        goto err;
  463|      2|    if ((propquery != NULL
  ------------------
  |  Branch (463:10): [True: 0, False: 2]
  ------------------
  464|      0|            && (process_data->propq = OPENSSL_strdup(propquery)) == NULL))
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (464:16): [True: 0, False: 0]
  ------------------
  465|      0|        goto err;
  466|       |
  467|       |    /* Allocate our list of EVP_KEYMGMTs. */
  468|      2|    keymgmts = sk_EVP_KEYMGMT_new_null();
  469|      2|    if (keymgmts == NULL) {
  ------------------
  |  Branch (469:9): [True: 0, False: 2]
  ------------------
  470|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  471|      0|        goto err;
  472|      0|    }
  473|       |
  474|      2|    process_data->object = NULL;
  475|      2|    process_data->libctx = libctx;
  476|      2|    process_data->selection = ctx->selection;
  477|      2|    process_data->keymgmts = keymgmts;
  478|       |
  479|       |    /*
  480|       |     * Collect passed and default properties to prioritize the decoders.
  481|       |     */
  482|      2|    if (propquery != NULL)
  ------------------
  |  Branch (482:9): [True: 0, False: 2]
  ------------------
  483|      0|        p2 = pq = ossl_parse_query(libctx, propquery, 1);
  484|       |
  485|      2|    plp = ossl_ctx_global_properties(libctx, 0);
  486|      2|    if (plp != NULL && *plp != NULL) {
  ------------------
  |  Branch (486:9): [True: 2, False: 0]
  |  Branch (486:24): [True: 0, False: 2]
  ------------------
  487|      0|        if (pq == NULL) {
  ------------------
  |  Branch (487:13): [True: 0, False: 0]
  ------------------
  488|      0|            pq = *plp;
  489|      0|        } else {
  490|      0|            p2 = ossl_property_merge(pq, *plp);
  491|      0|            ossl_property_free(pq);
  492|      0|            if (p2 == NULL)
  ------------------
  |  Branch (492:17): [True: 0, False: 0]
  ------------------
  493|      0|                goto err;
  494|      0|            pq = p2;
  495|      0|        }
  496|      0|    }
  497|       |
  498|       |    /*
  499|       |     * Enumerate all keymgmts into a stack.
  500|       |     *
  501|       |     * We could nest EVP_KEYMGMT_do_all_provided inside
  502|       |     * OSSL_DECODER_do_all_provided or vice versa but these functions become
  503|       |     * bottlenecks if called repeatedly, which is why we collect the
  504|       |     * EVP_KEYMGMTs into a stack here and call both functions only once.
  505|       |     *
  506|       |     * We resolve the keytype string to a name ID so we don't have to resolve it
  507|       |     * multiple times, avoiding repeated calls to EVP_KEYMGMT_is_a, which is a
  508|       |     * performance bottleneck. However, we do this lazily on the first call to
  509|       |     * collect_keymgmt made by EVP_KEYMGMT_do_all_provided, rather than do it
  510|       |     * upfront, as this ensures that the names for all loaded providers have
  511|       |     * been registered by the time we try to resolve the keytype string.
  512|       |     */
  513|      2|    collect_data.ctx = ctx;
  514|      2|    collect_data.libctx = libctx;
  515|      2|    collect_data.keymgmts = keymgmts;
  516|      2|    collect_data.keytype = keytype;
  517|      2|    collect_data.pq = pq;
  518|      2|    EVP_KEYMGMT_do_all_provided(libctx, collect_keymgmt, &collect_data);
  519|       |
  520|      2|    if (collect_data.error_occurred)
  ------------------
  |  Branch (520:9): [True: 0, False: 2]
  ------------------
  521|      0|        goto err;
  522|       |
  523|       |    /* Enumerate all matching decoders. */
  524|      2|    OSSL_DECODER_do_all_provided(libctx, collect_decoder, &collect_data);
  525|       |
  526|      2|    if (collect_data.error_occurred)
  ------------------
  |  Branch (526:9): [True: 0, False: 2]
  ------------------
  527|      0|        goto err;
  528|       |
  529|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      2|    do {                           \
  |  |  222|      2|        BIO *trc_out = NULL;       \
  |  |  223|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  530|      0|    {
  531|      0|        BIO_printf(trc_out,
  532|      0|            "(ctx %p) Got %d decoders producing keys\n",
  533|      0|            (void *)ctx, collect_data.total);
  534|      0|    }
  535|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      2|    }                            \
  |  |  227|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  536|       |
  537|       |    /*
  538|       |     * Finish initializing the decoder context. If one or more decoders matched
  539|       |     * above then the number of decoders attached to the OSSL_DECODER_CTX will
  540|       |     * be nonzero. Else nothing was found and we do nothing.
  541|       |     */
  542|      2|    if (OSSL_DECODER_CTX_get_num_decoders(ctx) != 0) {
  ------------------
  |  Branch (542:9): [True: 2, False: 0]
  ------------------
  543|      2|        if (!OSSL_DECODER_CTX_set_construct(ctx, decoder_construct_pkey)
  ------------------
  |  Branch (543:13): [True: 0, False: 2]
  ------------------
  544|      2|            || !OSSL_DECODER_CTX_set_construct_data(ctx, process_data)
  ------------------
  |  Branch (544:16): [True: 0, False: 2]
  ------------------
  545|      2|            || !OSSL_DECODER_CTX_set_cleanup(ctx,
  ------------------
  |  Branch (545:16): [True: 0, False: 2]
  ------------------
  546|      2|                decoder_clean_pkey_construct_arg))
  547|      0|            goto err;
  548|       |
  549|      2|        process_data = NULL; /* Avoid it being freed */
  550|      2|    }
  551|       |
  552|      2|    ok = 1;
  553|      2|err:
  554|      2|    decoder_clean_pkey_construct_arg(process_data);
  555|      2|    ossl_property_free(p2);
  556|      2|    return ok;
  557|      2|}
decoder_pkey.c:collect_keymgmt:
  404|     80|{
  405|     80|    struct collect_data_st *data = arg;
  406|       |
  407|     80|    if (!check_keymgmt(keymgmt, data))
  ------------------
  |  Branch (407:9): [True: 77, False: 3]
  ------------------
  408|     77|        return;
  409|       |
  410|       |    /*
  411|       |     * We have to ref EVP_KEYMGMT here because in the success case,
  412|       |     * data->keymgmts is referenced by the constructor we register in the
  413|       |     * OSSL_DECODER_CTX. The registered cleanup function
  414|       |     * (decoder_clean_pkey_construct_arg) unrefs every element of the stack and
  415|       |     * frees it.
  416|       |     */
  417|      3|    if (!EVP_KEYMGMT_up_ref(keymgmt))
  ------------------
  |  Branch (417:9): [True: 0, False: 3]
  ------------------
  418|      0|        return;
  419|       |
  420|      3|    if (sk_EVP_KEYMGMT_push(data->keymgmts, keymgmt) <= 0) {
  ------------------
  |  Branch (420:9): [True: 0, False: 3]
  ------------------
  421|      0|        EVP_KEYMGMT_free(keymgmt);
  422|      0|        data->error_occurred = 1;
  423|      0|    }
  424|      3|}
decoder_pkey.c:check_keymgmt:
  365|     80|{
  366|       |    /* If no keytype was specified, everything matches. */
  367|     80|    if (data->keytype == NULL)
  ------------------
  |  Branch (367:9): [True: 0, False: 80]
  ------------------
  368|      0|        return 1;
  369|       |
  370|     80|    if (!data->keytype_resolved) {
  ------------------
  |  Branch (370:9): [True: 2, False: 78]
  ------------------
  371|       |        /* We haven't cached the IDs from the keytype string yet. */
  372|      2|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(data->libctx);
  373|      2|        data->keytype_id = ossl_namemap_name2num(namemap, data->keytype);
  374|       |
  375|       |        /*
  376|       |         * If keytype is a value ambiguously used for both EC and SM2,
  377|       |         * collect the ID for SM2 as well.
  378|       |         */
  379|      2|        if (data->keytype_id != 0
  ------------------
  |  Branch (379:13): [True: 2, False: 0]
  ------------------
  380|      2|            && (strcmp(data->keytype, "id-ecPublicKey") == 0
  ------------------
  |  Branch (380:17): [True: 1, False: 1]
  ------------------
  381|      1|                || strcmp(data->keytype, "1.2.840.10045.2.1") == 0))
  ------------------
  |  Branch (381:20): [True: 0, False: 1]
  ------------------
  382|      1|            data->sm2_id = ossl_namemap_name2num(namemap, "SM2");
  383|       |
  384|       |        /*
  385|       |         * If keytype_id is zero the name was not found, but we still
  386|       |         * set keytype_resolved to avoid trying all this again.
  387|       |         */
  388|      2|        data->keytype_resolved = 1;
  389|      2|    }
  390|       |
  391|       |    /* Specified keytype could not be resolved, so nothing matches. */
  392|     80|    if (data->keytype_id == 0)
  ------------------
  |  Branch (392:9): [True: 0, False: 80]
  ------------------
  393|      0|        return 0;
  394|       |
  395|       |    /* Does not match the keytype specified, so skip. */
  396|     80|    if (keymgmt->name_id != data->keytype_id
  ------------------
  |  Branch (396:9): [True: 78, False: 2]
  ------------------
  397|     78|        && keymgmt->name_id != data->sm2_id)
  ------------------
  |  Branch (397:12): [True: 77, False: 1]
  ------------------
  398|     77|        return 0;
  399|       |
  400|      3|    return 1;
  401|     80|}
decoder_pkey.c:collect_decoder:
  314|    152|{
  315|    152|    struct collect_data_st *data = arg;
  316|    152|    STACK_OF(EVP_KEYMGMT) *keymgmts = data->keymgmts;
  ------------------
  |  |   33|    152|#define STACK_OF(type) struct stack_st_##type
  ------------------
  317|    152|    int i, end_i;
  318|    152|    EVP_KEYMGMT *keymgmt;
  319|    152|    const OSSL_PROVIDER *prov;
  320|    152|    void *provctx;
  321|       |
  322|    152|    if (data->error_occurred)
  ------------------
  |  Branch (322:9): [True: 0, False: 152]
  ------------------
  323|      0|        return;
  324|       |
  325|    152|    prov = OSSL_DECODER_get0_provider(decoder);
  326|    152|    provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
  327|       |
  328|       |    /*
  329|       |     * Either the caller didn't give us a selection, or if they did, the decoder
  330|       |     * must tell us if it supports that selection to be accepted. If the decoder
  331|       |     * doesn't have |does_selection|, it's seen as taking anything.
  332|       |     */
  333|    152|    if (decoder->does_selection != NULL
  ------------------
  |  Branch (333:9): [True: 146, False: 6]
  ------------------
  334|    146|        && !decoder->does_selection(provctx, data->ctx->selection))
  ------------------
  |  Branch (334:12): [True: 76, False: 70]
  ------------------
  335|     76|        return;
  336|       |
  337|     76|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|     76|    do {                           \
  |  |  222|     76|        BIO *trc_out = NULL;       \
  |  |  223|     76|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 76]
  |  |  ------------------
  ------------------
  338|      0|    {
  339|      0|        BIO_printf(trc_out,
  340|      0|            "(ctx %p) Checking out decoder %p:\n"
  341|      0|            "    %s with %s\n",
  342|      0|            (void *)data->ctx, (void *)decoder,
  343|      0|            OSSL_DECODER_get0_name(decoder),
  344|      0|            OSSL_DECODER_get0_properties(decoder));
  345|      0|    }
  346|     76|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|     76|    }                            \
  |  |  227|     76|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 76]
  |  |  ------------------
  ------------------
  347|       |
  348|     76|    end_i = sk_EVP_KEYMGMT_num(keymgmts);
  349|    184|    for (i = 0; i < end_i; ++i) {
  ------------------
  |  Branch (349:17): [True: 113, False: 71]
  ------------------
  350|    113|        keymgmt = sk_EVP_KEYMGMT_value(keymgmts, i);
  351|       |
  352|       |        /* Only add this decoder once */
  353|    113|        if (collect_decoder_keymgmt(keymgmt, decoder, provctx, data))
  ------------------
  |  Branch (353:13): [True: 5, False: 108]
  ------------------
  354|      5|            break;
  355|    108|        if (data->error_occurred)
  ------------------
  |  Branch (355:13): [True: 0, False: 108]
  ------------------
  356|      0|            return;
  357|    108|    }
  358|     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)
  ------------------
  |  |  221|      5|    do {                           \
  |  |  222|      5|        BIO *trc_out = NULL;       \
  |  |  223|      5|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 5]
  |  |  ------------------
  ------------------
  277|      0|    {
  278|      0|        BIO_printf(trc_out,
  279|      0|            "(ctx %p) Checking out decoder %p:\n"
  280|      0|            "    %s with %s\n",
  281|      0|            (void *)data->ctx, (void *)decoder,
  282|      0|            OSSL_DECODER_get0_name(decoder),
  283|      0|            OSSL_DECODER_get0_properties(decoder));
  284|      0|    }
  285|      5|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      5|    }                            \
  |  |  227|      5|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 5]
  |  |  ------------------
  ------------------
  286|       |
  287|       |    /*
  288|       |     * Get the property match score so the decoders can be prioritized later.
  289|       |     */
  290|      5|    props = ossl_decoder_parsed_properties(decoder);
  291|      5|    if (data->pq != NULL && props != NULL) {
  ------------------
  |  Branch (291:9): [True: 0, False: 5]
  |  Branch (291:29): [True: 0, False: 0]
  ------------------
  292|      0|        di->score = ossl_property_match_count(data->pq, props);
  293|       |        /*
  294|       |         * Mismatch of mandatory properties is not an error, the decoder is just
  295|       |         * ignored, continue.
  296|       |         */
  297|      0|        if (di->score < 0) {
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|      0|            ossl_decoder_instance_free(di);
  299|      0|            return 0;
  300|      0|        }
  301|      0|    }
  302|       |
  303|      5|    if (!ossl_decoder_ctx_add_decoder_inst(data->ctx, di)) {
  ------------------
  |  Branch (303:9): [True: 0, False: 5]
  ------------------
  304|      0|        ossl_decoder_instance_free(di);
  305|      0|        data->error_occurred = 1;
  306|      0|        return 0;
  307|      0|    }
  308|       |
  309|      5|    ++data->total;
  310|      5|    return 1;
  311|      5|}
decoder_pkey.c:decoder_construct_pkey:
   74|   871k|{
   75|   871k|    struct decoder_pkey_data_st *data = construct_data;
   76|   871k|    OSSL_DECODER *decoder = OSSL_DECODER_INSTANCE_get_decoder(decoder_inst);
   77|   871k|    void *decoderctx = OSSL_DECODER_INSTANCE_get_decoder_ctx(decoder_inst);
   78|   871k|    const OSSL_PROVIDER *decoder_prov = OSSL_DECODER_get0_provider(decoder);
   79|   871k|    EVP_KEYMGMT *keymgmt = NULL;
   80|   871k|    const OSSL_PROVIDER *keymgmt_prov = NULL;
   81|   871k|    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|   871k|    void *object_ref = NULL;
   91|   871k|    size_t object_ref_sz = 0;
   92|   871k|    const OSSL_PARAM *p;
   93|       |
   94|   871k|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_TYPE);
  ------------------
  |  |  358|   871k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
   95|   871k|    if (p != NULL) {
  ------------------
  |  Branch (95:9): [True: 871k, False: 0]
  ------------------
   96|   871k|        char *object_type = NULL;
   97|       |
   98|   871k|        if (!OSSL_PARAM_get_utf8_string(p, &object_type, 0))
  ------------------
  |  Branch (98:13): [True: 0, False: 871k]
  ------------------
   99|      0|            return 0;
  100|   871k|        OPENSSL_free(data->object_type);
  ------------------
  |  |  131|   871k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  101|   871k|        data->object_type = object_type;
  102|   871k|    }
  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|   871k|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_REFERENCE);
  ------------------
  |  |  361|   871k|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  110|   871k|    if (p == NULL || p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|   435k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (110:9): [True: 435k, False: 435k]
  |  Branch (110:22): [True: 0, False: 435k]
  ------------------
  111|   435k|        return 0;
  112|   435k|    object_ref = p->data;
  113|   435k|    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|   435k|    end = sk_EVP_KEYMGMT_num(data->keymgmts);
  120|   435k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (120:17): [True: 435k, False: 0]
  ------------------
  121|   435k|        keymgmt = sk_EVP_KEYMGMT_value(data->keymgmts, i);
  122|   435k|        keymgmt_prov = EVP_KEYMGMT_get0_provider(keymgmt);
  123|       |
  124|   435k|        if (keymgmt_prov == decoder_prov
  ------------------
  |  Branch (124:13): [True: 435k, False: 0]
  ------------------
  125|   435k|            && evp_keymgmt_has_load(keymgmt)
  ------------------
  |  Branch (125:16): [True: 435k, False: 0]
  ------------------
  126|   435k|            && EVP_KEYMGMT_is_a(keymgmt, data->object_type))
  ------------------
  |  Branch (126:16): [True: 435k, False: 0]
  ------------------
  127|   435k|            break;
  128|   435k|    }
  129|   435k|    if (i < end) {
  ------------------
  |  Branch (129:9): [True: 435k, False: 0]
  ------------------
  130|       |        /* To allow it to be freed further down */
  131|   435k|        if (!EVP_KEYMGMT_up_ref(keymgmt))
  ------------------
  |  Branch (131:13): [True: 0, False: 435k]
  ------------------
  132|      0|            return 0;
  133|   435k|    } 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|   435k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (140:9): [True: 435k, False: 0]
  ------------------
  141|   435k|        EVP_PKEY *pkey = NULL;
  142|   435k|        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|   435k|        if (keymgmt_prov == decoder_prov) {
  ------------------
  |  Branch (152:13): [True: 435k, False: 0]
  ------------------
  153|   435k|            keydata = evp_keymgmt_load(keymgmt, object_ref, object_ref_sz);
  154|   435k|        } 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;
  ------------------
  |  |  652|      0|    (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  650|      0|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  640|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  641|      0|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  647|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  ------------------
  |  |  |  |  |  |  642|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  ------------------
  |  |  |  |  648|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  643|      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|   435k|        if (keydata == NULL)
  ------------------
  |  Branch (182:13): [True: 0, False: 435k]
  ------------------
  183|      0|            ossl_decoder_ctx_set_harderr(data->ctx);
  184|       |
  185|   435k|        if (keydata != NULL
  ------------------
  |  Branch (185:13): [True: 435k, False: 0]
  ------------------
  186|   435k|            && (pkey = evp_keymgmt_util_make_pkey(keymgmt, keydata)) == NULL)
  ------------------
  |  Branch (186:16): [True: 0, False: 435k]
  ------------------
  187|      0|            evp_keymgmt_freedata(keymgmt, keydata);
  188|       |
  189|   435k|        *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|   435k|        EVP_KEYMGMT_free(keymgmt);
  196|   435k|    }
  197|       |    /*
  198|       |     * We successfully looked through, |*ctx->object| determines if we
  199|       |     * actually found something.
  200|       |     */
  201|       |    return (*data->object != NULL);
  202|   435k|}
decoder_pkey.c:decoder_clean_pkey_construct_arg:
  205|   435k|{
  206|   435k|    struct decoder_pkey_data_st *data = construct_data;
  207|       |
  208|   435k|    if (data != NULL) {
  ------------------
  |  Branch (208:9): [True: 435k, False: 2]
  ------------------
  209|   435k|        sk_EVP_KEYMGMT_pop_free(data->keymgmts, EVP_KEYMGMT_free);
  210|   435k|        OPENSSL_free(data->propq);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  211|   435k|        OPENSSL_free(data->object_type);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|   435k|        OPENSSL_free(data);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  213|   435k|    }
  214|   435k|}
decoder_pkey.c:ossl_decoder_ctx_for_pkey_dup:
  579|   435k|{
  580|   435k|    OSSL_DECODER_CTX *dest;
  581|   435k|    struct decoder_pkey_data_st *process_data_src, *process_data_dest = NULL;
  582|       |
  583|   435k|    if (src == NULL)
  ------------------
  |  Branch (583:9): [True: 0, False: 435k]
  ------------------
  584|      0|        return NULL;
  585|       |
  586|   435k|    if ((dest = OSSL_DECODER_CTX_new()) == NULL) {
  ------------------
  |  Branch (586:9): [True: 0, False: 435k]
  ------------------
  587|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  588|      0|        return NULL;
  589|      0|    }
  590|       |
  591|   435k|    if (!OSSL_DECODER_CTX_set_input_type(dest, input_type)
  ------------------
  |  Branch (591:9): [True: 0, False: 435k]
  ------------------
  592|   435k|        || !OSSL_DECODER_CTX_set_input_structure(dest, input_structure)) {
  ------------------
  |  Branch (592:12): [True: 0, False: 435k]
  ------------------
  593|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  594|      0|        goto err;
  595|      0|    }
  596|   435k|    dest->selection = src->selection;
  597|       |
  598|   435k|    if (src->decoder_insts != NULL) {
  ------------------
  |  Branch (598:9): [True: 435k, False: 0]
  ------------------
  599|   435k|        dest->decoder_insts
  600|   435k|            = sk_OSSL_DECODER_INSTANCE_deep_copy(src->decoder_insts,
  601|   435k|                ossl_decoder_instance_dup,
  602|   435k|                ossl_decoder_instance_free);
  603|   435k|        if (dest->decoder_insts == NULL) {
  ------------------
  |  Branch (603:13): [True: 0, False: 435k]
  ------------------
  604|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  605|      0|            goto err;
  606|      0|        }
  607|   435k|    }
  608|       |
  609|   435k|    if (!OSSL_DECODER_CTX_set_construct(dest,
  ------------------
  |  Branch (609:9): [True: 0, False: 435k]
  ------------------
  610|   435k|            OSSL_DECODER_CTX_get_construct(src))) {
  611|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  612|      0|        goto err;
  613|      0|    }
  614|       |
  615|   435k|    process_data_src = OSSL_DECODER_CTX_get_construct_data(src);
  616|   435k|    if (process_data_src != NULL) {
  ------------------
  |  Branch (616:9): [True: 435k, False: 0]
  ------------------
  617|   435k|        process_data_dest = OPENSSL_zalloc(sizeof(*process_data_dest));
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  618|   435k|        if (process_data_dest == NULL) {
  ------------------
  |  Branch (618:13): [True: 0, False: 435k]
  ------------------
  619|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  620|      0|            goto err;
  621|      0|        }
  622|   435k|        if (process_data_src->propq != NULL) {
  ------------------
  |  Branch (622:13): [True: 0, False: 435k]
  ------------------
  623|      0|            process_data_dest->propq = OPENSSL_strdup(process_data_src->propq);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  624|      0|            if (process_data_dest->propq == NULL) {
  ------------------
  |  Branch (624:17): [True: 0, False: 0]
  ------------------
  625|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  626|      0|                goto err;
  627|      0|            }
  628|      0|        }
  629|       |
  630|   435k|        if (process_data_src->keymgmts != NULL) {
  ------------------
  |  Branch (630:13): [True: 435k, False: 0]
  ------------------
  631|   435k|            process_data_dest->keymgmts
  632|   435k|                = sk_EVP_KEYMGMT_deep_copy(process_data_src->keymgmts,
  633|   435k|                    keymgmt_dup,
  634|   435k|                    EVP_KEYMGMT_free);
  635|   435k|            if (process_data_dest->keymgmts == NULL) {
  ------------------
  |  Branch (635:17): [True: 0, False: 435k]
  ------------------
  636|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  637|      0|                goto err;
  638|      0|            }
  639|   435k|        }
  640|       |
  641|   435k|        process_data_dest->object = (void **)pkey;
  642|   435k|        process_data_dest->libctx = process_data_src->libctx;
  643|   435k|        process_data_dest->selection = process_data_src->selection;
  644|   435k|        process_data_dest->ctx = dest;
  645|   435k|        if (!OSSL_DECODER_CTX_set_construct_data(dest, process_data_dest)) {
  ------------------
  |  Branch (645:13): [True: 0, False: 435k]
  ------------------
  646|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  647|      0|            goto err;
  648|      0|        }
  649|   435k|        process_data_dest = NULL;
  650|   435k|    }
  651|       |
  652|   435k|    if (!OSSL_DECODER_CTX_set_cleanup(dest,
  ------------------
  |  Branch (652:9): [True: 0, False: 435k]
  ------------------
  653|   435k|            OSSL_DECODER_CTX_get_cleanup(src))) {
  654|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  655|      0|        goto err;
  656|      0|    }
  657|       |
  658|   435k|    return dest;
  659|      0|err:
  660|      0|    decoder_clean_pkey_construct_arg(process_data_dest);
  661|      0|    OSSL_DECODER_CTX_free(dest);
  662|       |    return NULL;
  663|   435k|}
decoder_pkey.c:keymgmt_dup:
  561|   555k|{
  562|   555k|    if (!EVP_KEYMGMT_up_ref((EVP_KEYMGMT *)keymgmt))
  ------------------
  |  Branch (562:9): [True: 0, False: 555k]
  ------------------
  563|      0|        return NULL;
  564|       |
  565|   555k|    return (EVP_KEYMGMT *)keymgmt;
  566|   555k|}

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

ENGINE_load_builtin_engines:
   14|  1.66k|{
   15|  1.66k|    OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL);
  ------------------
  |  |  535|  1.66k|    (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  513|  1.66k|#define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L
  |  |  ------------------
  |  |                   (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  514|  1.66k|#define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L
  |  |  ------------------
  |  |  536|  1.66k|        | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  516|  1.66k|#define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L
  |  |  ------------------
  |  |                       | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  517|  1.66k|#define OPENSSL_INIT_ENGINE_CAPI 0x00002000L
  |  |  ------------------
  |  |                       | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  518|  1.66k|#define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L
  |  |  ------------------
  ------------------
   16|  1.66k|}

ENGINE_ctrl:
  126|  16.5k|{
  127|  16.5k|    int ctrl_exists;
  128|       |
  129|  16.5k|    if (e == NULL) {
  ------------------
  |  Branch (129:9): [True: 0, False: 16.5k]
  ------------------
  130|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  131|      0|        return 0;
  132|      0|    }
  133|       |
  134|  16.5k|    ctrl_exists = ((e->ctrl == NULL) ? 0 : 1);
  ------------------
  |  Branch (134:20): [True: 0, False: 16.5k]
  ------------------
  135|       |
  136|       |    /*
  137|       |     * Intercept any "root-level" commands before trying to hand them on to
  138|       |     * ctrl() handlers.
  139|       |     */
  140|  16.5k|    switch (cmd) {
  141|      0|    case ENGINE_CTRL_HAS_CTRL_FUNCTION:
  ------------------
  |  |  184|      0|#define ENGINE_CTRL_HAS_CTRL_FUNCTION 10
  ------------------
  |  Branch (141:5): [True: 0, False: 16.5k]
  ------------------
  142|      0|        return ctrl_exists;
  143|      0|    case ENGINE_CTRL_GET_FIRST_CMD_TYPE:
  ------------------
  |  |  189|      0|#define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11
  ------------------
  |  Branch (143:5): [True: 0, False: 16.5k]
  ------------------
  144|      0|    case ENGINE_CTRL_GET_NEXT_CMD_TYPE:
  ------------------
  |  |  194|      0|#define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12
  ------------------
  |  Branch (144:5): [True: 0, False: 16.5k]
  ------------------
  145|  4.14k|    case ENGINE_CTRL_GET_CMD_FROM_NAME:
  ------------------
  |  |  199|  4.14k|#define ENGINE_CTRL_GET_CMD_FROM_NAME 13
  ------------------
  |  Branch (145:5): [True: 4.14k, False: 12.4k]
  ------------------
  146|  4.14k|    case ENGINE_CTRL_GET_NAME_LEN_FROM_CMD:
  ------------------
  |  |  208|  4.14k|#define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14
  ------------------
  |  Branch (146:5): [True: 0, False: 16.5k]
  ------------------
  147|  4.14k|    case ENGINE_CTRL_GET_NAME_FROM_CMD:
  ------------------
  |  |  209|  4.14k|#define ENGINE_CTRL_GET_NAME_FROM_CMD 15
  ------------------
  |  Branch (147:5): [True: 0, False: 16.5k]
  ------------------
  148|  4.14k|    case ENGINE_CTRL_GET_DESC_LEN_FROM_CMD:
  ------------------
  |  |  211|  4.14k|#define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16
  ------------------
  |  Branch (148:5): [True: 0, False: 16.5k]
  ------------------
  149|  4.14k|    case ENGINE_CTRL_GET_DESC_FROM_CMD:
  ------------------
  |  |  212|  4.14k|#define ENGINE_CTRL_GET_DESC_FROM_CMD 17
  ------------------
  |  Branch (149:5): [True: 0, False: 16.5k]
  ------------------
  150|  12.4k|    case ENGINE_CTRL_GET_CMD_FLAGS:
  ------------------
  |  |  218|  12.4k|#define ENGINE_CTRL_GET_CMD_FLAGS 18
  ------------------
  |  Branch (150:5): [True: 8.29k, False: 8.29k]
  ------------------
  151|  12.4k|        if (ctrl_exists && !(e->flags & ENGINE_FLAGS_MANUAL_CMD_CTRL))
  ------------------
  |  |   76|  12.4k|#define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x0002
  ------------------
  |  Branch (151:13): [True: 12.4k, False: 0]
  |  Branch (151:28): [True: 12.4k, False: 0]
  ------------------
  152|  12.4k|            return int_ctrl_helper(e, cmd, i, p, f);
  153|      0|        if (!ctrl_exists) {
  ------------------
  |  Branch (153:13): [True: 0, False: 0]
  ------------------
  154|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_NO_CONTROL_FUNCTION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  155|       |            /*
  156|       |             * For these cmd-related functions, failure is indicated by a -1
  157|       |             * return value (because 0 is used as a valid return in some
  158|       |             * places).
  159|       |             */
  160|      0|            return -1;
  161|      0|        }
  162|  4.14k|    default:
  ------------------
  |  Branch (162:5): [True: 4.14k, False: 12.4k]
  ------------------
  163|  4.14k|        break;
  164|  16.5k|    }
  165|       |    /* Anything else requires a ctrl() handler to exist. */
  166|  4.14k|    if (!ctrl_exists) {
  ------------------
  |  Branch (166:9): [True: 0, False: 4.14k]
  ------------------
  167|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_NO_CONTROL_FUNCTION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  168|      0|        return 0;
  169|      0|    }
  170|  4.14k|    return e->ctrl(e, cmd, i, p, f);
  171|  4.14k|}
ENGINE_cmd_is_executable:
  174|  4.14k|{
  175|  4.14k|    int flags;
  176|  4.14k|    if ((flags = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FLAGS, cmd, NULL, NULL)) < 0) {
  ------------------
  |  |  218|  4.14k|#define ENGINE_CTRL_GET_CMD_FLAGS 18
  ------------------
  |  Branch (176:9): [True: 0, False: 4.14k]
  ------------------
  177|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_CMD_NUMBER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  178|      0|        return 0;
  179|      0|    }
  180|  4.14k|    if (!(flags & ENGINE_CMD_FLAG_NO_INPUT) && !(flags & ENGINE_CMD_FLAG_NUMERIC) && !(flags & ENGINE_CMD_FLAG_STRING))
  ------------------
  |  |  121|  4.14k|#define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004
  ------------------
                  if (!(flags & ENGINE_CMD_FLAG_NO_INPUT) && !(flags & ENGINE_CMD_FLAG_NUMERIC) && !(flags & ENGINE_CMD_FLAG_STRING))
  ------------------
  |  |  111|  3.31k|#define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001
  ------------------
                  if (!(flags & ENGINE_CMD_FLAG_NO_INPUT) && !(flags & ENGINE_CMD_FLAG_NUMERIC) && !(flags & ENGINE_CMD_FLAG_STRING))
  ------------------
  |  |  116|  1.65k|#define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002
  ------------------
  |  Branch (180:9): [True: 3.31k, False: 829]
  |  Branch (180:48): [True: 1.65k, False: 1.65k]
  |  Branch (180:86): [True: 0, False: 1.65k]
  ------------------
  181|      0|        return 0;
  182|  4.14k|    return 1;
  183|  4.14k|}
ENGINE_ctrl_cmd_string:
  224|  4.14k|{
  225|  4.14k|    int num, flags;
  226|  4.14k|    long l;
  227|  4.14k|    char *ptr;
  228|       |
  229|  4.14k|    if (e == NULL || cmd_name == NULL) {
  ------------------
  |  Branch (229:9): [True: 0, False: 4.14k]
  |  Branch (229:22): [True: 0, False: 4.14k]
  ------------------
  230|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  231|      0|        return 0;
  232|      0|    }
  233|  4.14k|    if (e->ctrl == NULL
  ------------------
  |  Branch (233:9): [True: 0, False: 4.14k]
  ------------------
  234|  4.14k|        || (num = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FROM_NAME,
  ------------------
  |  |  199|  4.14k|#define ENGINE_CTRL_GET_CMD_FROM_NAME 13
  ------------------
  |  Branch (234:12): [True: 0, False: 4.14k]
  ------------------
  235|  4.14k|                0, (void *)cmd_name, NULL))
  236|  4.14k|            <= 0) {
  237|       |        /*
  238|       |         * If the command didn't *have* to be supported, we fake success.
  239|       |         * This allows certain settings to be specified for multiple ENGINEs
  240|       |         * and only require a change of ENGINE id (without having to
  241|       |         * selectively apply settings). Eg. changing from a hardware device
  242|       |         * back to the regular software ENGINE without editing the config
  243|       |         * file, etc.
  244|       |         */
  245|      0|        if (cmd_optional) {
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  ------------------
  246|      0|            ERR_clear_error();
  247|      0|            return 1;
  248|      0|        }
  249|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_CMD_NAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  250|      0|        return 0;
  251|      0|    }
  252|  4.14k|    if (!ENGINE_cmd_is_executable(e, num)) {
  ------------------
  |  Branch (252:9): [True: 0, False: 4.14k]
  ------------------
  253|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_CMD_NOT_EXECUTABLE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  254|      0|        return 0;
  255|      0|    }
  256|       |
  257|  4.14k|    flags = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FLAGS, num, NULL, NULL);
  ------------------
  |  |  218|  4.14k|#define ENGINE_CTRL_GET_CMD_FLAGS 18
  ------------------
  258|  4.14k|    if (flags < 0) {
  ------------------
  |  Branch (258:9): [True: 0, False: 4.14k]
  ------------------
  259|       |        /*
  260|       |         * Shouldn't happen, given that ENGINE_cmd_is_executable() returned
  261|       |         * success.
  262|       |         */
  263|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  264|      0|        return 0;
  265|      0|    }
  266|       |    /*
  267|       |     * If the command takes no input, there must be no input. And vice versa.
  268|       |     */
  269|  4.14k|    if (flags & ENGINE_CMD_FLAG_NO_INPUT) {
  ------------------
  |  |  121|  4.14k|#define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004
  ------------------
  |  Branch (269:9): [True: 829, False: 3.31k]
  ------------------
  270|    829|        if (arg != NULL) {
  ------------------
  |  Branch (270:13): [True: 0, False: 829]
  ------------------
  271|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_COMMAND_TAKES_NO_INPUT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|            return 0;
  273|      0|        }
  274|       |        /*
  275|       |         * We deliberately force the result of ENGINE_ctrl() to 0 or 1 rather
  276|       |         * than returning it as "return data". This is to ensure usage of
  277|       |         * these commands is consistent across applications and that certain
  278|       |         * applications don't understand it one way, and others another.
  279|       |         */
  280|    829|        if (ENGINE_ctrl(e, num, 0, (void *)arg, NULL) > 0)
  ------------------
  |  Branch (280:13): [True: 0, False: 829]
  ------------------
  281|      0|            return 1;
  282|    829|        return 0;
  283|    829|    }
  284|       |    /* So, we require input */
  285|  3.31k|    if (arg == NULL) {
  ------------------
  |  Branch (285:9): [True: 0, False: 3.31k]
  ------------------
  286|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_COMMAND_TAKES_INPUT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  287|      0|        return 0;
  288|      0|    }
  289|       |    /* If it takes string input, that's easy */
  290|  3.31k|    if (flags & ENGINE_CMD_FLAG_STRING) {
  ------------------
  |  |  116|  3.31k|#define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002
  ------------------
  |  Branch (290:9): [True: 1.65k, False: 1.65k]
  ------------------
  291|       |        /* Same explanation as above */
  292|  1.65k|        if (ENGINE_ctrl(e, num, 0, (void *)arg, NULL) > 0)
  ------------------
  |  Branch (292:13): [True: 1.65k, False: 0]
  ------------------
  293|  1.65k|            return 1;
  294|      0|        return 0;
  295|  1.65k|    }
  296|       |    /*
  297|       |     * If it doesn't take numeric either, then it is unsupported for use in a
  298|       |     * config-setting situation, which is what this function is for. This
  299|       |     * should never happen though, because ENGINE_cmd_is_executable() was
  300|       |     * used.
  301|       |     */
  302|  1.65k|    if (!(flags & ENGINE_CMD_FLAG_NUMERIC)) {
  ------------------
  |  |  111|  1.65k|#define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001
  ------------------
  |  Branch (302:9): [True: 0, False: 1.65k]
  ------------------
  303|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  304|      0|        return 0;
  305|      0|    }
  306|  1.65k|    l = strtol(arg, &ptr, 10);
  307|  1.65k|    if ((arg == ptr) || (*ptr != '\0')) {
  ------------------
  |  Branch (307:9): [True: 0, False: 1.65k]
  |  Branch (307:25): [True: 0, False: 1.65k]
  ------------------
  308|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  309|      0|        return 0;
  310|      0|    }
  311|       |    /*
  312|       |     * Force the result of the control command to 0 or 1, for the reasons
  313|       |     * mentioned before.
  314|       |     */
  315|  1.65k|    if (ENGINE_ctrl(e, num, l, NULL, NULL) > 0)
  ------------------
  |  Branch (315:9): [True: 1.65k, False: 0]
  ------------------
  316|  1.65k|        return 1;
  317|      0|    return 0;
  318|  1.65k|}
eng_ctrl.c:int_ctrl_helper:
   66|  12.4k|{
   67|  12.4k|    int idx;
   68|  12.4k|    char *s = (char *)p;
   69|  12.4k|    const ENGINE_CMD_DEFN *cdp;
   70|       |
   71|       |    /* Take care of the easy one first (eg. it requires no searches) */
   72|  12.4k|    if (cmd == ENGINE_CTRL_GET_FIRST_CMD_TYPE) {
  ------------------
  |  |  189|  12.4k|#define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11
  ------------------
  |  Branch (72:9): [True: 0, False: 12.4k]
  ------------------
   73|      0|        if ((e->cmd_defns == NULL) || int_ctrl_cmd_is_null(e->cmd_defns))
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  |  Branch (73:39): [True: 0, False: 0]
  ------------------
   74|      0|            return 0;
   75|      0|        return e->cmd_defns->cmd_num;
   76|      0|    }
   77|       |    /* One or two commands require that "p" be a valid string buffer */
   78|  12.4k|    if ((cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) || (cmd == ENGINE_CTRL_GET_NAME_FROM_CMD) || (cmd == ENGINE_CTRL_GET_DESC_FROM_CMD)) {
  ------------------
  |  |  199|  12.4k|#define ENGINE_CTRL_GET_CMD_FROM_NAME 13
  ------------------
                  if ((cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) || (cmd == ENGINE_CTRL_GET_NAME_FROM_CMD) || (cmd == ENGINE_CTRL_GET_DESC_FROM_CMD)) {
  ------------------
  |  |  209|  8.29k|#define ENGINE_CTRL_GET_NAME_FROM_CMD 15
  ------------------
                  if ((cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) || (cmd == ENGINE_CTRL_GET_NAME_FROM_CMD) || (cmd == ENGINE_CTRL_GET_DESC_FROM_CMD)) {
  ------------------
  |  |  212|  8.29k|#define ENGINE_CTRL_GET_DESC_FROM_CMD 17
  ------------------
  |  Branch (78:9): [True: 4.14k, False: 8.29k]
  |  Branch (78:51): [True: 0, False: 8.29k]
  |  Branch (78:93): [True: 0, False: 8.29k]
  ------------------
   79|  4.14k|        if (s == NULL) {
  ------------------
  |  Branch (79:13): [True: 0, False: 4.14k]
  ------------------
   80|      0|            ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   81|      0|            return -1;
   82|      0|        }
   83|  4.14k|    }
   84|       |    /* Now handle cmd_name -> cmd_num conversion */
   85|  12.4k|    if (cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) {
  ------------------
  |  |  199|  12.4k|#define ENGINE_CTRL_GET_CMD_FROM_NAME 13
  ------------------
  |  Branch (85:9): [True: 4.14k, False: 8.29k]
  ------------------
   86|  4.14k|        if ((e->cmd_defns == NULL)
  ------------------
  |  Branch (86:13): [True: 0, False: 4.14k]
  ------------------
   87|  4.14k|            || ((idx = int_ctrl_cmd_by_name(e->cmd_defns, s)) < 0)) {
  ------------------
  |  Branch (87:16): [True: 0, False: 4.14k]
  ------------------
   88|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_CMD_NAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   89|      0|            return -1;
   90|      0|        }
   91|  4.14k|        return e->cmd_defns[idx].cmd_num;
   92|  4.14k|    }
   93|       |    /*
   94|       |     * For the rest of the commands, the 'long' argument must specify a valid
   95|       |     * command number - so we need to conduct a search.
   96|       |     */
   97|  8.29k|    if ((e->cmd_defns == NULL)
  ------------------
  |  Branch (97:9): [True: 0, False: 8.29k]
  ------------------
   98|  8.29k|        || ((idx = int_ctrl_cmd_by_num(e->cmd_defns, (unsigned int)i)) < 0)) {
  ------------------
  |  Branch (98:12): [True: 0, False: 8.29k]
  ------------------
   99|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_CMD_NUMBER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|        return -1;
  101|      0|    }
  102|       |    /* Now the logic splits depending on command type */
  103|  8.29k|    cdp = &e->cmd_defns[idx];
  104|  8.29k|    switch (cmd) {
  ------------------
  |  Branch (104:13): [True: 8.29k, False: 0]
  ------------------
  105|      0|    case ENGINE_CTRL_GET_NEXT_CMD_TYPE:
  ------------------
  |  |  194|      0|#define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12
  ------------------
  |  Branch (105:5): [True: 0, False: 8.29k]
  ------------------
  106|      0|        cdp++;
  107|      0|        return int_ctrl_cmd_is_null(cdp) ? 0 : cdp->cmd_num;
  ------------------
  |  Branch (107:16): [True: 0, False: 0]
  ------------------
  108|      0|    case ENGINE_CTRL_GET_NAME_LEN_FROM_CMD:
  ------------------
  |  |  208|      0|#define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14
  ------------------
  |  Branch (108:5): [True: 0, False: 8.29k]
  ------------------
  109|      0|        return (int)strlen(cdp->cmd_name);
  110|      0|    case ENGINE_CTRL_GET_NAME_FROM_CMD:
  ------------------
  |  |  209|      0|#define ENGINE_CTRL_GET_NAME_FROM_CMD 15
  ------------------
  |  Branch (110:5): [True: 0, False: 8.29k]
  ------------------
  111|      0|        return (int)strlen(strcpy(s, cdp->cmd_name));
  112|      0|    case ENGINE_CTRL_GET_DESC_LEN_FROM_CMD:
  ------------------
  |  |  211|      0|#define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16
  ------------------
  |  Branch (112:5): [True: 0, False: 8.29k]
  ------------------
  113|      0|        return (int)strlen(cdp->cmd_desc == NULL ? int_no_description
  ------------------
  |  Branch (113:28): [True: 0, False: 0]
  ------------------
  114|      0|                                                 : cdp->cmd_desc);
  115|      0|    case ENGINE_CTRL_GET_DESC_FROM_CMD:
  ------------------
  |  |  212|      0|#define ENGINE_CTRL_GET_DESC_FROM_CMD 17
  ------------------
  |  Branch (115:5): [True: 0, False: 8.29k]
  ------------------
  116|      0|        return (int)strlen(strcpy(s, cdp->cmd_desc == NULL ? int_no_description : cdp->cmd_desc));
  ------------------
  |  Branch (116:38): [True: 0, False: 0]
  ------------------
  117|  8.29k|    case ENGINE_CTRL_GET_CMD_FLAGS:
  ------------------
  |  |  218|  8.29k|#define ENGINE_CTRL_GET_CMD_FLAGS 18
  ------------------
  |  Branch (117:5): [True: 8.29k, False: 0]
  ------------------
  118|  8.29k|        return cdp->cmd_flags;
  119|  8.29k|    }
  120|       |    /* Shouldn't really be here ... */
  121|  8.29k|    ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  122|      0|    return -1;
  123|  8.29k|}
eng_ctrl.c:int_ctrl_cmd_is_null:
   28|  66.3k|{
   29|  66.3k|    if ((defn->cmd_num == 0) || (defn->cmd_name == NULL))
  ------------------
  |  Branch (29:9): [True: 0, False: 66.3k]
  |  Branch (29:33): [True: 0, False: 66.3k]
  ------------------
   30|      0|        return 1;
   31|  66.3k|    return 0;
   32|  66.3k|}
eng_ctrl.c:int_ctrl_cmd_by_name:
   35|  4.14k|{
   36|  4.14k|    int idx = 0;
   37|  20.7k|    while (!int_ctrl_cmd_is_null(defn) && (strcmp(defn->cmd_name, s) != 0)) {
  ------------------
  |  Branch (37:12): [True: 20.7k, False: 0]
  |  Branch (37:43): [True: 16.5k, False: 4.14k]
  ------------------
   38|  16.5k|        idx++;
   39|  16.5k|        defn++;
   40|  16.5k|    }
   41|  4.14k|    if (int_ctrl_cmd_is_null(defn))
  ------------------
  |  Branch (41:9): [True: 0, False: 4.14k]
  ------------------
   42|       |        /* The given name wasn't found */
   43|      0|        return -1;
   44|  4.14k|    return idx;
   45|  4.14k|}
eng_ctrl.c:int_ctrl_cmd_by_num:
   48|  8.29k|{
   49|  8.29k|    int idx = 0;
   50|       |    /*
   51|       |     * NB: It is stipulated that 'cmd_defn' lists are ordered by cmd_num. So
   52|       |     * our searches don't need to take any longer than necessary.
   53|       |     */
   54|  41.4k|    while (!int_ctrl_cmd_is_null(defn) && (defn->cmd_num < num)) {
  ------------------
  |  Branch (54:12): [True: 41.4k, False: 0]
  |  Branch (54:43): [True: 33.1k, False: 8.29k]
  ------------------
   55|  33.1k|        idx++;
   56|  33.1k|        defn++;
   57|  33.1k|    }
   58|  8.29k|    if (defn->cmd_num == num)
  ------------------
  |  Branch (58:9): [True: 8.29k, False: 0]
  ------------------
   59|  8.29k|        return idx;
   60|       |    /* The given cmd_num wasn't found */
   61|      0|    return -1;
   62|  8.29k|}

engine_load_dynamic_int:
  251|      1|{
  252|      1|    ENGINE *toadd = engine_dynamic();
  253|      1|    if (!toadd)
  ------------------
  |  Branch (253:9): [True: 0, False: 1]
  ------------------
  254|      0|        return;
  255|       |
  256|      1|    ERR_set_mark();
  257|      1|    ENGINE_add(toadd);
  258|       |    /*
  259|       |     * If the "add" worked, it gets a structural reference. So either way, we
  260|       |     * release our just-created reference.
  261|       |     */
  262|      1|    ENGINE_free(toadd);
  263|       |    /*
  264|       |     * If the "add" didn't work, it was probably a conflict because it was
  265|       |     * already added (eg. someone calling ENGINE_load_blah then calling
  266|       |     * ENGINE_load_builtin_engines() perhaps).
  267|       |     */
  268|      1|    ERR_pop_to_mark();
  269|      1|}
eng_dyn.c:engine_dynamic:
  239|      1|{
  240|      1|    ENGINE *ret = ENGINE_new();
  241|      1|    if (ret == NULL)
  ------------------
  |  Branch (241:9): [True: 0, False: 1]
  ------------------
  242|      0|        return NULL;
  243|      1|    if (!ENGINE_set_id(ret, engine_dynamic_id) || !ENGINE_set_name(ret, engine_dynamic_name) || !ENGINE_set_init_function(ret, dynamic_init) || !ENGINE_set_finish_function(ret, dynamic_finish) || !ENGINE_set_ctrl_function(ret, dynamic_ctrl) || !ENGINE_set_flags(ret, ENGINE_FLAGS_BY_ID_COPY) || !ENGINE_set_cmd_defns(ret, dynamic_cmd_defns)) {
  ------------------
  |  |   88|      1|#define ENGINE_FLAGS_BY_ID_COPY (int)0x0004
  ------------------
  |  Branch (243:9): [True: 0, False: 1]
  |  Branch (243:51): [True: 0, False: 1]
  |  Branch (243:97): [True: 0, False: 1]
  |  Branch (243:145): [True: 0, False: 1]
  |  Branch (243:197): [True: 0, False: 1]
  |  Branch (243:245): [True: 0, False: 1]
  |  Branch (243:296): [True: 0, False: 1]
  ------------------
  244|      0|        ENGINE_free(ret);
  245|      0|        return NULL;
  246|      0|    }
  247|      1|    return ret;
  248|      1|}
eng_dyn.c:dynamic_init:
  272|      3|{
  273|       |    /*
  274|       |     * We always return failure - the "dynamic" engine itself can't be used
  275|       |     * for anything.
  276|       |     */
  277|      3|    return 0;
  278|      3|}
eng_dyn.c:dynamic_ctrl:
  290|  4.14k|{
  291|  4.14k|    dynamic_data_ctx *ctx = dynamic_get_data_ctx(e);
  292|  4.14k|    int initialised;
  293|       |
  294|  4.14k|    if (!ctx) {
  ------------------
  |  Branch (294:9): [True: 0, False: 4.14k]
  ------------------
  295|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_NOT_LOADED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  296|      0|        return 0;
  297|      0|    }
  298|  4.14k|    initialised = ((ctx->dynamic_dso == NULL) ? 0 : 1);
  ------------------
  |  Branch (298:20): [True: 4.14k, False: 0]
  ------------------
  299|       |    /* All our control commands require the ENGINE to be uninitialised */
  300|  4.14k|    if (initialised) {
  ------------------
  |  Branch (300:9): [True: 0, False: 4.14k]
  ------------------
  301|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_ALREADY_LOADED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  302|      0|        return 0;
  303|      0|    }
  304|  4.14k|    switch (cmd) {
  305|      0|    case DYNAMIC_CMD_SO_PATH:
  ------------------
  |  |   33|      0|#define DYNAMIC_CMD_SO_PATH ENGINE_CMD_BASE
  |  |  ------------------
  |  |  |  |  224|      0|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (305:5): [True: 0, False: 4.14k]
  ------------------
  306|       |        /* a NULL 'p' or a string of zero-length is the same thing */
  307|      0|        if (p && (strlen((const char *)p) < 1))
  ------------------
  |  Branch (307:13): [True: 0, False: 0]
  |  Branch (307:18): [True: 0, False: 0]
  ------------------
  308|      0|            p = NULL;
  309|      0|        OPENSSL_free(ctx->DYNAMIC_LIBNAME);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  310|      0|        if (p)
  ------------------
  |  Branch (310:13): [True: 0, False: 0]
  ------------------
  311|      0|            ctx->DYNAMIC_LIBNAME = OPENSSL_strdup(p);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  312|      0|        else
  313|      0|            ctx->DYNAMIC_LIBNAME = NULL;
  314|      0|        return (ctx->DYNAMIC_LIBNAME ? 1 : 0);
  ------------------
  |  Branch (314:17): [True: 0, False: 0]
  ------------------
  315|      0|    case DYNAMIC_CMD_NO_VCHECK:
  ------------------
  |  |   34|      0|#define DYNAMIC_CMD_NO_VCHECK (ENGINE_CMD_BASE + 1)
  |  |  ------------------
  |  |  |  |  224|      0|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (315:5): [True: 0, False: 4.14k]
  ------------------
  316|      0|        ctx->no_vcheck = ((i == 0) ? 0 : 1);
  ------------------
  |  Branch (316:27): [True: 0, False: 0]
  ------------------
  317|      0|        return 1;
  318|    829|    case DYNAMIC_CMD_ID:
  ------------------
  |  |   35|    829|#define DYNAMIC_CMD_ID (ENGINE_CMD_BASE + 2)
  |  |  ------------------
  |  |  |  |  224|    829|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (318:5): [True: 829, False: 3.31k]
  ------------------
  319|       |        /* a NULL 'p' or a string of zero-length is the same thing */
  320|    829|        if (p && (strlen((const char *)p) < 1))
  ------------------
  |  Branch (320:13): [True: 829, False: 0]
  |  Branch (320:18): [True: 0, False: 829]
  ------------------
  321|      0|            p = NULL;
  322|    829|        OPENSSL_free(ctx->engine_id);
  ------------------
  |  |  131|    829|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  323|    829|        if (p)
  ------------------
  |  Branch (323:13): [True: 829, False: 0]
  ------------------
  324|    829|            ctx->engine_id = OPENSSL_strdup(p);
  ------------------
  |  |  135|    829|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  325|      0|        else
  326|      0|            ctx->engine_id = NULL;
  327|    829|        return (ctx->engine_id ? 1 : 0);
  ------------------
  |  Branch (327:17): [True: 829, False: 0]
  ------------------
  328|    829|    case DYNAMIC_CMD_LIST_ADD:
  ------------------
  |  |   36|    829|#define DYNAMIC_CMD_LIST_ADD (ENGINE_CMD_BASE + 3)
  |  |  ------------------
  |  |  |  |  224|    829|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (328:5): [True: 829, False: 3.31k]
  ------------------
  329|    829|        if ((i < 0) || (i > 2)) {
  ------------------
  |  Branch (329:13): [True: 0, False: 829]
  |  Branch (329:24): [True: 0, False: 829]
  ------------------
  330|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  331|      0|            return 0;
  332|      0|        }
  333|    829|        ctx->list_add_value = (int)i;
  334|    829|        return 1;
  335|    829|    case DYNAMIC_CMD_LOAD:
  ------------------
  |  |   39|    829|#define DYNAMIC_CMD_LOAD (ENGINE_CMD_BASE + 6)
  |  |  ------------------
  |  |  |  |  224|    829|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (335:5): [True: 829, False: 3.31k]
  ------------------
  336|    829|        return dynamic_load(e, ctx);
  337|    829|    case DYNAMIC_CMD_DIR_LOAD:
  ------------------
  |  |   37|    829|#define DYNAMIC_CMD_DIR_LOAD (ENGINE_CMD_BASE + 4)
  |  |  ------------------
  |  |  |  |  224|    829|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (337:5): [True: 829, False: 3.31k]
  ------------------
  338|    829|        if ((i < 0) || (i > 2)) {
  ------------------
  |  Branch (338:13): [True: 0, False: 829]
  |  Branch (338:24): [True: 0, False: 829]
  ------------------
  339|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  340|      0|            return 0;
  341|      0|        }
  342|    829|        ctx->dir_load = (int)i;
  343|    829|        return 1;
  344|    829|    case DYNAMIC_CMD_DIR_ADD:
  ------------------
  |  |   38|    829|#define DYNAMIC_CMD_DIR_ADD (ENGINE_CMD_BASE + 5)
  |  |  ------------------
  |  |  |  |  224|    829|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (344:5): [True: 829, False: 3.31k]
  ------------------
  345|       |        /* a NULL 'p' or a string of zero-length is the same thing */
  346|    829|        if (p == NULL || (strlen((const char *)p) < 1)) {
  ------------------
  |  Branch (346:13): [True: 0, False: 829]
  |  Branch (346:26): [True: 0, False: 829]
  ------------------
  347|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  348|      0|            return 0;
  349|      0|        }
  350|    829|        {
  351|    829|            char *tmp_str = OPENSSL_strdup(p);
  ------------------
  |  |  135|    829|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  352|    829|            if (tmp_str == NULL)
  ------------------
  |  Branch (352:17): [True: 0, False: 829]
  ------------------
  353|      0|                return 0;
  354|    829|            if (!sk_OPENSSL_STRING_push(ctx->dirs, tmp_str)) {
  ------------------
  |  |  242|    829|#define sk_OPENSSL_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
  ------------------
  |  Branch (354:17): [True: 0, False: 829]
  ------------------
  355|      0|                OPENSSL_free(tmp_str);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|      0|                ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  357|      0|                return 0;
  358|      0|            }
  359|    829|        }
  360|    829|        return 1;
  361|      0|    default:
  ------------------
  |  Branch (361:5): [True: 0, False: 4.14k]
  ------------------
  362|      0|        break;
  363|  4.14k|    }
  364|  4.14k|    ERR_raise(ERR_LIB_ENGINE, ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  365|      0|    return 0;
  366|  4.14k|}
eng_dyn.c:dynamic_get_data_ctx:
  202|  4.14k|{
  203|  4.14k|    dynamic_data_ctx *ctx;
  204|  4.14k|    if (dynamic_ex_data_idx < 0) {
  ------------------
  |  Branch (204:9): [True: 1, False: 4.14k]
  ------------------
  205|       |        /*
  206|       |         * Create and register the ENGINE ex_data, and associate our "free"
  207|       |         * function with it to ensure any allocated contexts get freed when
  208|       |         * an ENGINE goes underground.
  209|       |         */
  210|      1|        int new_idx = ENGINE_get_ex_new_index(0, NULL, NULL, NULL,
  ------------------
  |  |  531|      1|    CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_ENGINE, l, p, newf, dupf, freef)
  |  |  ------------------
  |  |  |  |  260|      1|#define CRYPTO_EX_INDEX_ENGINE 10
  |  |  ------------------
  ------------------
  211|      1|            dynamic_data_ctx_free_func);
  212|      1|        if (new_idx == -1) {
  ------------------
  |  Branch (212:13): [True: 0, False: 1]
  ------------------
  213|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_NO_INDEX);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  214|      0|            return NULL;
  215|      0|        }
  216|      1|        if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (216:13): [True: 0, False: 1]
  ------------------
  217|      0|            return NULL;
  218|       |        /* Avoid a race by checking again inside this lock */
  219|      1|        if (dynamic_ex_data_idx < 0) {
  ------------------
  |  Branch (219:13): [True: 1, False: 0]
  ------------------
  220|       |            /* Good, someone didn't beat us to it */
  221|      1|            dynamic_ex_data_idx = new_idx;
  222|      1|            new_idx = -1;
  223|      1|        }
  224|      1|        CRYPTO_THREAD_unlock(global_engine_lock);
  225|       |        /*
  226|       |         * In theory we could "give back" the index here if (new_idx>-1), but
  227|       |         * it's not possible and wouldn't gain us much if it were.
  228|       |         */
  229|      1|    }
  230|  4.14k|    ctx = (dynamic_data_ctx *)ENGINE_get_ex_data(e, dynamic_ex_data_idx);
  231|       |    /* Check if the context needs to be created */
  232|  4.14k|    if ((ctx == NULL) && !dynamic_set_data_ctx(e, &ctx))
  ------------------
  |  Branch (232:9): [True: 829, False: 3.31k]
  |  Branch (232:26): [True: 0, False: 829]
  ------------------
  233|       |        /* "set_data" will set errors if necessary */
  234|      0|        return NULL;
  235|  4.14k|    return ctx;
  236|  4.14k|}
eng_dyn.c:dynamic_data_ctx_free_func:
  140|    835|{
  141|    835|    if (ptr) {
  ------------------
  |  Branch (141:9): [True: 829, False: 6]
  ------------------
  142|    829|        dynamic_data_ctx *ctx = (dynamic_data_ctx *)ptr;
  143|    829|        DSO_free(ctx->dynamic_dso);
  144|    829|        OPENSSL_free(ctx->DYNAMIC_LIBNAME);
  ------------------
  |  |  131|    829|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  145|    829|        OPENSSL_free(ctx->engine_id);
  ------------------
  |  |  131|    829|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  146|    829|        sk_OPENSSL_STRING_pop_free(ctx->dirs, int_free_str);
  ------------------
  |  |  246|    829|#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))
  ------------------
  147|    829|        OPENSSL_free(ctx);
  ------------------
  |  |  131|    829|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|    829|    }
  149|    835|}
eng_dyn.c:int_free_str:
  124|    829|{
  125|    829|    OPENSSL_free(s);
  ------------------
  |  |  131|    829|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  126|    829|}
eng_dyn.c:dynamic_set_data_ctx:
  158|    829|{
  159|    829|    dynamic_data_ctx *c = OPENSSL_zalloc(sizeof(*c));
  ------------------
  |  |  108|    829|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  160|    829|    int ret = 0;
  161|       |
  162|    829|    if (c == NULL)
  ------------------
  |  Branch (162:9): [True: 0, False: 829]
  ------------------
  163|      0|        return 0;
  164|    829|    c->dirs = sk_OPENSSL_STRING_new_null();
  ------------------
  |  |  235|    829|#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new_null())
  ------------------
  165|    829|    if (c->dirs == NULL) {
  ------------------
  |  Branch (165:9): [True: 0, False: 829]
  ------------------
  166|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  167|      0|        goto end;
  168|      0|    }
  169|    829|    c->DYNAMIC_F1 = "v_check";
  170|    829|    c->DYNAMIC_F2 = "bind_engine";
  171|    829|    c->dir_load = 1;
  172|    829|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (172:9): [True: 0, False: 829]
  ------------------
  173|      0|        goto end;
  174|    829|    if ((*ctx = (dynamic_data_ctx *)ENGINE_get_ex_data(e,
  ------------------
  |  Branch (174:9): [True: 829, False: 0]
  ------------------
  175|    829|             dynamic_ex_data_idx))
  176|    829|        == NULL) {
  177|       |        /* Good, we're the first */
  178|    829|        ret = ENGINE_set_ex_data(e, dynamic_ex_data_idx, c);
  179|    829|        if (ret) {
  ------------------
  |  Branch (179:13): [True: 829, False: 0]
  ------------------
  180|    829|            *ctx = c;
  181|    829|            c = NULL;
  182|    829|        }
  183|    829|    }
  184|    829|    CRYPTO_THREAD_unlock(global_engine_lock);
  185|    829|    ret = 1;
  186|       |    /*
  187|       |     * If we lost the race to set the context, c is non-NULL and *ctx is the
  188|       |     * context of the thread that won.
  189|       |     */
  190|    829|end:
  191|    829|    if (c != NULL)
  ------------------
  |  Branch (191:9): [True: 0, False: 829]
  ------------------
  192|      0|        sk_OPENSSL_STRING_free(c->dirs);
  ------------------
  |  |  238|      0|#define sk_OPENSSL_STRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_STRING_sk_type(sk))
  ------------------
  193|    829|    OPENSSL_free(c);
  ------------------
  |  |  131|    829|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  194|    829|    return ret;
  195|    829|}
eng_dyn.c:dynamic_load:
  413|    829|{
  414|    829|    ENGINE cpy;
  415|    829|    dynamic_fns fns;
  416|       |
  417|    829|    if (ctx->dynamic_dso == NULL)
  ------------------
  |  Branch (417:9): [True: 829, False: 0]
  ------------------
  418|    829|        ctx->dynamic_dso = DSO_new();
  419|    829|    if (ctx->dynamic_dso == NULL)
  ------------------
  |  Branch (419:9): [True: 0, False: 829]
  ------------------
  420|      0|        return 0;
  421|    829|    if (!ctx->DYNAMIC_LIBNAME) {
  ------------------
  |  Branch (421:9): [True: 829, False: 0]
  ------------------
  422|    829|        if (!ctx->engine_id)
  ------------------
  |  Branch (422:13): [True: 0, False: 829]
  ------------------
  423|      0|            return 0;
  424|    829|        DSO_ctrl(ctx->dynamic_dso, DSO_CTRL_SET_FLAGS,
  ------------------
  |  |   19|    829|#define DSO_CTRL_SET_FLAGS 2
  ------------------
  425|    829|            DSO_FLAG_NAME_TRANSLATION_EXT_ONLY, NULL);
  ------------------
  |  |   41|    829|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  426|    829|        ctx->DYNAMIC_LIBNAME = DSO_convert_filename(ctx->dynamic_dso, ctx->engine_id);
  427|    829|    }
  428|    829|    if (!int_load(ctx)) {
  ------------------
  |  Branch (428:9): [True: 829, False: 0]
  ------------------
  429|    829|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_DSO_NOT_FOUND);
  ------------------
  |  |  404|    829|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|    829|    (ERR_new(),                                                  \
  |  |  |  |  407|    829|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    829|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|    829|        ERR_set_error)
  |  |  ------------------
  ------------------
  430|    829|        DSO_free(ctx->dynamic_dso);
  431|    829|        ctx->dynamic_dso = NULL;
  432|    829|        return 0;
  433|    829|    }
  434|       |    /* We have to find a bind function otherwise it'll always end badly */
  435|      0|    if (!(ctx->bind_engine = (dynamic_bind_engine)DSO_bind_func(ctx->dynamic_dso,
  ------------------
  |  Branch (435:9): [True: 0, False: 0]
  ------------------
  436|      0|              ctx->DYNAMIC_F2))) {
  437|      0|        ctx->bind_engine = NULL;
  438|      0|        DSO_free(ctx->dynamic_dso);
  439|      0|        ctx->dynamic_dso = NULL;
  440|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_DSO_FAILURE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  441|      0|        return 0;
  442|      0|    }
  443|       |    /* Do we perform version checking? */
  444|      0|    if (!ctx->no_vcheck) {
  ------------------
  |  Branch (444:9): [True: 0, False: 0]
  ------------------
  445|      0|        unsigned long vcheck_res = 0;
  446|       |        /*
  447|       |         * Now we try to find a version checking function and decide how to
  448|       |         * cope with failure if/when it fails.
  449|       |         */
  450|      0|        ctx->v_check = (dynamic_v_check_fn)DSO_bind_func(ctx->dynamic_dso,
  451|      0|            ctx->DYNAMIC_F1);
  452|      0|        if (ctx->v_check)
  ------------------
  |  Branch (452:13): [True: 0, False: 0]
  ------------------
  453|      0|            vcheck_res = ctx->v_check(OSSL_DYNAMIC_VERSION);
  ------------------
  |  |  722|      0|#define OSSL_DYNAMIC_VERSION (unsigned long)0x00030000
  ------------------
  454|       |        /*
  455|       |         * We fail if the version checker veto'd the load *or* if it is
  456|       |         * deferring to us (by returning its version) and we think it is too
  457|       |         * old. Also fail if this is engine for openssl 1.1.x.
  458|       |         */
  459|      0|        if (vcheck_res < OSSL_DYNAMIC_OLDEST || using_libcrypto_11(ctx)) {
  ------------------
  |  |  727|      0|#define OSSL_DYNAMIC_OLDEST (unsigned long)0x00030000
  ------------------
  |  Branch (459:13): [True: 0, False: 0]
  |  Branch (459:49): [True: 0, False: 0]
  ------------------
  460|       |            /* Fail */
  461|      0|            ctx->bind_engine = NULL;
  462|      0|            ctx->v_check = NULL;
  463|      0|            DSO_free(ctx->dynamic_dso);
  464|      0|            ctx->dynamic_dso = NULL;
  465|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_VERSION_INCOMPATIBILITY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  466|      0|            return 0;
  467|      0|        }
  468|      0|    }
  469|       |    /*
  470|       |     * First binary copy the ENGINE structure so that we can roll back if the
  471|       |     * hand-over fails
  472|       |     */
  473|      0|    memcpy(&cpy, e, sizeof(ENGINE));
  474|       |    /*
  475|       |     * Provide the ERR, "ex_data", memory, and locking callbacks so the
  476|       |     * loaded library uses our state rather than its own. FIXME: As noted in
  477|       |     * engine.h, much of this would be simplified if each area of code
  478|       |     * provided its own "summary" structure of all related callbacks. It
  479|       |     * would also increase opaqueness.
  480|       |     */
  481|      0|    fns.static_state = ENGINE_get_static_state();
  482|      0|    CRYPTO_get_mem_functions(&fns.mem_fns.malloc_fn, &fns.mem_fns.realloc_fn,
  483|      0|        &fns.mem_fns.free_fn);
  484|       |    /*
  485|       |     * Now that we've loaded the dynamic engine, make sure no "dynamic"
  486|       |     * ENGINE elements will show through.
  487|       |     */
  488|      0|    engine_set_all_null(e);
  489|       |
  490|       |    /* Try to bind the ENGINE onto our own ENGINE structure */
  491|      0|    if (!engine_add_dynamic_id(e, (ENGINE_DYNAMIC_ID)ctx->bind_engine, 1)
  ------------------
  |  Branch (491:9): [True: 0, False: 0]
  ------------------
  492|      0|        || !ctx->bind_engine(e, ctx->engine_id, &fns)) {
  ------------------
  |  Branch (492:12): [True: 0, False: 0]
  ------------------
  493|      0|        engine_remove_dynamic_id(e, 1);
  494|      0|        ctx->bind_engine = NULL;
  495|      0|        ctx->v_check = NULL;
  496|      0|        DSO_free(ctx->dynamic_dso);
  497|      0|        ctx->dynamic_dso = NULL;
  498|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INIT_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|       |        /* Copy the original ENGINE structure back */
  500|      0|        memcpy(e, &cpy, sizeof(ENGINE));
  501|      0|        return 0;
  502|      0|    }
  503|       |    /* Do we try to add this ENGINE to the internal list too? */
  504|      0|    if (ctx->list_add_value > 0) {
  ------------------
  |  Branch (504:9): [True: 0, False: 0]
  ------------------
  505|      0|        if (!ENGINE_add(e)) {
  ------------------
  |  Branch (505:13): [True: 0, False: 0]
  ------------------
  506|       |            /* Do we tolerate this or fail? */
  507|      0|            if (ctx->list_add_value > 1) {
  ------------------
  |  Branch (507:17): [True: 0, False: 0]
  ------------------
  508|       |                /*
  509|       |                 * Fail - NB: By this time, it's too late to rollback, and
  510|       |                 * trying to do so allows the bind_engine() code to have
  511|       |                 * created leaks. We just have to fail where we are, after
  512|       |                 * the ENGINE has changed.
  513|       |                 */
  514|      0|                ERR_raise(ERR_LIB_ENGINE, ENGINE_R_CONFLICTING_ENGINE_ID);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  515|      0|                return 0;
  516|      0|            }
  517|       |            /* Tolerate */
  518|      0|            ERR_clear_error();
  519|      0|        }
  520|      0|    }
  521|      0|    return 1;
  522|      0|}
eng_dyn.c:int_load:
  369|    829|{
  370|    829|    int num, loop;
  371|       |    /* Unless told not to, try a direct load */
  372|    829|    if ((ctx->dir_load != 2) && (DSO_load(ctx->dynamic_dso, ctx->DYNAMIC_LIBNAME, NULL, 0)) != NULL)
  ------------------
  |  Branch (372:9): [True: 0, False: 829]
  |  Branch (372:33): [True: 0, False: 0]
  ------------------
  373|      0|        return 1;
  374|       |    /* If we're not allowed to use 'dirs' or we have none, fail */
  375|    829|    if (!ctx->dir_load || (num = sk_OPENSSL_STRING_num(ctx->dirs)) < 1)
  ------------------
  |  |  232|    829|#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
  ------------------
  |  Branch (375:9): [True: 0, False: 829]
  |  Branch (375:27): [True: 0, False: 829]
  ------------------
  376|      0|        return 0;
  377|  1.65k|    for (loop = 0; loop < num; loop++) {
  ------------------
  |  Branch (377:20): [True: 829, False: 829]
  ------------------
  378|    829|        const char *s = sk_OPENSSL_STRING_value(ctx->dirs, loop);
  ------------------
  |  |  233|    829|#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
  ------------------
  379|    829|        char *merge = DSO_merge(ctx->dynamic_dso, ctx->DYNAMIC_LIBNAME, s);
  380|    829|        if (!merge)
  ------------------
  |  Branch (380:13): [True: 0, False: 829]
  ------------------
  381|      0|            return 0;
  382|    829|        if (DSO_load(ctx->dynamic_dso, merge, NULL, 0)) {
  ------------------
  |  Branch (382:13): [True: 0, False: 829]
  ------------------
  383|       |            /* Found what we're looking for */
  384|      0|            OPENSSL_free(merge);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  385|      0|            return 1;
  386|      0|        }
  387|    829|        OPENSSL_free(merge);
  ------------------
  |  |  131|    829|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  388|    829|    }
  389|    829|    return 0;
  390|    829|}

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

ENGINE_set_default:
   18|      2|{
   19|      2|    if ((flags & ENGINE_METHOD_CIPHERS) && !ENGINE_set_default_ciphers(e))
  ------------------
  |  |   49|      2|#define ENGINE_METHOD_CIPHERS (unsigned int)0x0040
  ------------------
  |  Branch (19:9): [True: 2, False: 0]
  |  Branch (19:44): [True: 0, False: 2]
  ------------------
   20|      0|        return 0;
   21|      2|    if ((flags & ENGINE_METHOD_DIGESTS) && !ENGINE_set_default_digests(e))
  ------------------
  |  |   50|      2|#define ENGINE_METHOD_DIGESTS (unsigned int)0x0080
  ------------------
  |  Branch (21:9): [True: 2, False: 0]
  |  Branch (21:44): [True: 0, False: 2]
  ------------------
   22|      0|        return 0;
   23|      2|    if ((flags & ENGINE_METHOD_RSA) && !ENGINE_set_default_RSA(e))
  ------------------
  |  |   45|      2|#define ENGINE_METHOD_RSA (unsigned int)0x0001
  ------------------
  |  Branch (23:9): [True: 2, False: 0]
  |  Branch (23:40): [True: 0, False: 2]
  ------------------
   24|      0|        return 0;
   25|      2|#ifndef OPENSSL_NO_DSA
   26|      2|    if ((flags & ENGINE_METHOD_DSA) && !ENGINE_set_default_DSA(e))
  ------------------
  |  |   46|      2|#define ENGINE_METHOD_DSA (unsigned int)0x0002
  ------------------
  |  Branch (26:9): [True: 2, False: 0]
  |  Branch (26:40): [True: 0, False: 2]
  ------------------
   27|      0|        return 0;
   28|      2|#endif
   29|      2|#ifndef OPENSSL_NO_DH
   30|      2|    if ((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e))
  ------------------
  |  |   47|      2|#define ENGINE_METHOD_DH (unsigned int)0x0004
  ------------------
  |  Branch (30:9): [True: 2, False: 0]
  |  Branch (30:39): [True: 0, False: 2]
  ------------------
   31|      0|        return 0;
   32|      2|#endif
   33|      2|#ifndef OPENSSL_NO_EC
   34|      2|    if ((flags & ENGINE_METHOD_EC) && !ENGINE_set_default_EC(e))
  ------------------
  |  |   53|      2|#define ENGINE_METHOD_EC (unsigned int)0x0800
  ------------------
  |  Branch (34:9): [True: 2, False: 0]
  |  Branch (34:39): [True: 0, False: 2]
  ------------------
   35|      0|        return 0;
   36|      2|#endif
   37|      2|    if ((flags & ENGINE_METHOD_RAND) && !ENGINE_set_default_RAND(e))
  ------------------
  |  |   48|      2|#define ENGINE_METHOD_RAND (unsigned int)0x0008
  ------------------
  |  Branch (37:9): [True: 2, False: 0]
  |  Branch (37:41): [True: 0, False: 2]
  ------------------
   38|      0|        return 0;
   39|      2|    if ((flags & ENGINE_METHOD_PKEY_METHS)
  ------------------
  |  |   51|      2|#define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200
  ------------------
  |  Branch (39:9): [True: 2, False: 0]
  ------------------
   40|      2|        && !ENGINE_set_default_pkey_meths(e))
  ------------------
  |  Branch (40:12): [True: 0, False: 2]
  ------------------
   41|      0|        return 0;
   42|      2|    if ((flags & ENGINE_METHOD_PKEY_ASN1_METHS)
  ------------------
  |  |   52|      2|#define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400
  ------------------
  |  Branch (42:9): [True: 2, False: 0]
  ------------------
   43|      2|        && !ENGINE_set_default_pkey_asn1_meths(e))
  ------------------
  |  Branch (43:12): [True: 0, False: 2]
  ------------------
   44|      0|        return 0;
   45|      2|    return 1;
   46|      2|}
ENGINE_register_complete:
   94|      2|{
   95|      2|    ENGINE_register_ciphers(e);
   96|      2|    ENGINE_register_digests(e);
   97|      2|    ENGINE_register_RSA(e);
   98|      2|#ifndef OPENSSL_NO_DSA
   99|      2|    ENGINE_register_DSA(e);
  100|      2|#endif
  101|      2|#ifndef OPENSSL_NO_DH
  102|      2|    ENGINE_register_DH(e);
  103|      2|#endif
  104|      2|#ifndef OPENSSL_NO_EC
  105|      2|    ENGINE_register_EC(e);
  106|      2|#endif
  107|      2|    ENGINE_register_RAND(e);
  108|      2|    ENGINE_register_pkey_meths(e);
  109|      2|    ENGINE_register_pkey_asn1_meths(e);
  110|      2|    return 1;
  111|      2|}
ENGINE_register_all_complete:
  114|      1|{
  115|      1|    ENGINE *e;
  116|       |
  117|      4|    for (e = ENGINE_get_first(); e; e = ENGINE_get_next(e))
  ------------------
  |  Branch (117:34): [True: 3, False: 1]
  ------------------
  118|      3|        if (!(e->flags & ENGINE_FLAGS_NO_REGISTER_ALL))
  ------------------
  |  |   96|      3|#define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008
  ------------------
  |  Branch (118:13): [True: 2, False: 1]
  ------------------
  119|      2|            ENGINE_register_complete(e);
  120|      1|    return 1;
  121|      1|}

engine_unlocked_init:
   21|      9|{
   22|      9|    int to_return = 1;
   23|       |
   24|      9|    if ((e->funct_ref == 0) && e->init)
  ------------------
  |  Branch (24:9): [True: 6, False: 3]
  |  Branch (24:32): [True: 6, False: 0]
  ------------------
   25|       |        /*
   26|       |         * This is the first functional reference and the engine requires
   27|       |         * initialisation so we do it now.
   28|       |         */
   29|      6|        to_return = e->init(e);
   30|      9|    if (to_return) {
  ------------------
  |  Branch (30:9): [True: 5, False: 4]
  ------------------
   31|      5|        int ref;
   32|       |
   33|       |        /*
   34|       |         * OK, we return a functional reference which is also a structural
   35|       |         * reference.
   36|       |         */
   37|      5|        if (!CRYPTO_UP_REF(&e->struct_ref, &ref)) {
  ------------------
  |  Branch (37:13): [True: 0, False: 5]
  ------------------
   38|      0|            e->finish(e);
   39|      0|            return 0;
   40|      0|        }
   41|      5|        e->funct_ref++;
   42|      5|        ENGINE_REF_PRINT(e, 0, 1);
  ------------------
  |  |   29|      5|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      5|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      5|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      5|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      5|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      5|        ((isfunct)                                        \
  |  |   33|      5|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      5|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      5|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      5|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   43|      5|        ENGINE_REF_PRINT(e, 1, 1);
  ------------------
  |  |   29|      5|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      5|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      5|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      5|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      5|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      5|        ((isfunct)                                        \
  |  |   33|      5|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      5|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      5|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      5|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   44|      5|    }
   45|      9|    return to_return;
   46|      9|}
engine_unlocked_finish:
   53|      5|{
   54|      5|    int to_return = 1;
   55|       |
   56|       |    /*
   57|       |     * Reduce the functional reference count here so if it's the terminating
   58|       |     * case, we can release the lock safely and call the finish() handler
   59|       |     * without risk of a race. We get a race if we leave the count until
   60|       |     * after and something else is calling "finish" at the same time -
   61|       |     * there's a chance that both threads will together take the count from 2
   62|       |     * to 0 without either calling finish().
   63|       |     */
   64|      5|    e->funct_ref--;
   65|      5|    ENGINE_REF_PRINT(e, 1, -1);
  ------------------
  |  |   29|      5|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      5|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      5|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      5|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      5|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      5|        ((isfunct)                                        \
  |  |   33|      5|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      5|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      5|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      5|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   66|      5|    if ((e->funct_ref == 0) && e->finish) {
  ------------------
  |  Branch (66:9): [True: 2, False: 3]
  |  Branch (66:32): [True: 0, False: 2]
  ------------------
   67|      0|        if (unlock_for_handlers)
  ------------------
  |  Branch (67:13): [True: 0, False: 0]
  ------------------
   68|      0|            CRYPTO_THREAD_unlock(global_engine_lock);
   69|      0|        to_return = e->finish(e);
   70|      0|        if (unlock_for_handlers)
  ------------------
  |  Branch (70:13): [True: 0, False: 0]
  ------------------
   71|      0|            if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (71:17): [True: 0, False: 0]
  ------------------
   72|      0|                return 0;
   73|      0|        if (!to_return)
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  ------------------
   74|      0|            return 0;
   75|      0|    }
   76|      5|    REF_ASSERT_ISNT(e->funct_ref < 0);
  ------------------
  |  |  293|      5|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 5]
  |  |  ------------------
  ------------------
   77|       |    /* Release the structural reference too */
   78|      5|    if (!engine_free_util(e, 0)) {
  ------------------
  |  Branch (78:9): [True: 0, False: 5]
  ------------------
   79|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_FINISH_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   80|      0|        return 0;
   81|      0|    }
   82|      5|    return to_return;
   83|      5|}
ENGINE_init:
   87|      7|{
   88|      7|    int ret;
   89|      7|    if (e == NULL) {
  ------------------
  |  Branch (89:9): [True: 0, False: 7]
  ------------------
   90|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   91|      0|        return 0;
   92|      0|    }
   93|      7|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|      7|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 7, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (93:9): [True: 0, False: 7]
  ------------------
   94|       |        /* Maybe this should be raised in do_engine_lock_init() */
   95|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   96|      0|        return 0;
   97|      0|    }
   98|      7|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (98:9): [True: 0, False: 7]
  ------------------
   99|      0|        return 0;
  100|      7|    ret = engine_unlocked_init(e);
  101|      7|    CRYPTO_THREAD_unlock(global_engine_lock);
  102|      7|    return ret;
  103|      7|}
ENGINE_finish:
  107|  8.08M|{
  108|  8.08M|    int to_return = 1;
  109|       |
  110|  8.08M|    if (e == NULL)
  ------------------
  |  Branch (110:9): [True: 8.08M, False: 3]
  ------------------
  111|  8.08M|        return 1;
  112|      3|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (112:9): [True: 0, False: 3]
  ------------------
  113|      0|        return 0;
  114|      3|    to_return = engine_unlocked_finish(e, 1);
  115|      3|    CRYPTO_THREAD_unlock(global_engine_lock);
  116|      3|    if (!to_return) {
  ------------------
  |  Branch (116:9): [True: 0, False: 3]
  ------------------
  117|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_FINISH_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  118|      0|        return 0;
  119|      0|    }
  120|      3|    return to_return;
  121|      3|}

ENGINE_new:
   28|    835|{
   29|    835|    ENGINE *ret;
   30|       |
   31|    835|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|    835|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 835, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (31:9): [True: 0, False: 835]
  ------------------
   32|       |        /* Maybe this should be raised in do_engine_lock_init() */
   33|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   34|      0|        return 0;
   35|      0|    }
   36|    835|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  108|    835|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (36:9): [True: 0, False: 835]
  ------------------
   37|      0|        return NULL;
   38|    835|    if (!CRYPTO_NEW_REF(&ret->struct_ref, 1)) {
  ------------------
  |  Branch (38:9): [True: 0, False: 835]
  ------------------
   39|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|      0|        return NULL;
   41|      0|    }
   42|    835|    ENGINE_REF_PRINT(ret, 0, 1);
  ------------------
  |  |   29|    835|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|    835|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|    835|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|    835|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|    835|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|    835|        ((isfunct)                                        \
  |  |   33|    835|                ? ((e)->funct_ref - (diff))               \
  |  |   34|    835|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|    835|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|    835|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   43|    835|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ENGINE, ret, &ret->ex_data)) {
  ------------------
  |  |  260|    835|#define CRYPTO_EX_INDEX_ENGINE 10
  ------------------
  |  Branch (43:9): [True: 0, False: 835]
  ------------------
   44|      0|        CRYPTO_FREE_REF(&ret->struct_ref);
   45|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   46|      0|        return NULL;
   47|      0|    }
   48|    835|    return ret;
   49|    835|}
engine_free_util:
   78|    850|{
   79|    850|    int i;
   80|       |
   81|    850|    if (e == NULL)
  ------------------
  |  Branch (81:9): [True: 0, False: 850]
  ------------------
   82|      0|        return 1;
   83|    850|    CRYPTO_DOWN_REF(&e->struct_ref, &i);
   84|    850|    ENGINE_REF_PRINT(e, 0, -1);
  ------------------
  |  |   29|    850|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|    850|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|    850|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|    850|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|    850|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|    850|        ((isfunct)                                        \
  |  |   33|    850|                ? ((e)->funct_ref - (diff))               \
  |  |   34|    850|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|    850|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|    850|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   85|    850|    if (i > 0)
  ------------------
  |  Branch (85:9): [True: 15, False: 835]
  ------------------
   86|     15|        return 1;
   87|    835|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|    835|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 835]
  |  |  ------------------
  ------------------
   88|       |    /* Free up any dynamically allocated public key methods */
   89|    835|    engine_pkey_meths_free(e);
   90|    835|    engine_pkey_asn1_meths_free(e);
   91|       |    /*
   92|       |     * Give the ENGINE a chance to do any structural cleanup corresponding to
   93|       |     * allocation it did in its constructor (eg. unload error strings)
   94|       |     */
   95|    835|    if (e->destroy)
  ------------------
  |  Branch (95:9): [True: 0, False: 835]
  ------------------
   96|      0|        e->destroy(e);
   97|    835|    engine_remove_dynamic_id(e, not_locked);
   98|    835|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ENGINE, e, &e->ex_data);
  ------------------
  |  |  260|    835|#define CRYPTO_EX_INDEX_ENGINE 10
  ------------------
   99|    835|    CRYPTO_FREE_REF(&e->struct_ref);
  100|    835|    OPENSSL_free(e);
  ------------------
  |  |  131|    835|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  101|    835|    return 1;
  102|    850|}
ENGINE_free:
  105|    842|{
  106|    842|    return engine_free_util(e, 1);
  107|    842|}
engine_cleanup_add_first:
  139|      1|{
  140|      1|    ENGINE_CLEANUP_ITEM *item;
  141|       |
  142|      1|    if (!int_cleanup_check(1))
  ------------------
  |  Branch (142:9): [True: 0, False: 1]
  ------------------
  143|      0|        return 0;
  144|      1|    item = int_cleanup_item(cb);
  145|      1|    if (item != NULL) {
  ------------------
  |  Branch (145:9): [True: 1, False: 0]
  ------------------
  146|      1|        if (sk_ENGINE_CLEANUP_ITEM_insert(cleanup_stack, item, 0))
  ------------------
  |  Branch (146:13): [True: 1, False: 0]
  ------------------
  147|      1|            return 1;
  148|      0|        OPENSSL_free(item);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  149|      0|    }
  150|      0|    return 0;
  151|      1|}
engine_cleanup_add_last:
  154|      1|{
  155|      1|    ENGINE_CLEANUP_ITEM *item;
  156|       |
  157|      1|    if (!int_cleanup_check(1))
  ------------------
  |  Branch (157:9): [True: 0, False: 1]
  ------------------
  158|      0|        return 0;
  159|      1|    item = int_cleanup_item(cb);
  160|      1|    if (item != NULL) {
  ------------------
  |  Branch (160:9): [True: 1, False: 0]
  ------------------
  161|      1|        if (sk_ENGINE_CLEANUP_ITEM_push(cleanup_stack, item) > 0)
  ------------------
  |  Branch (161:13): [True: 1, False: 0]
  ------------------
  162|      1|            return 1;
  163|      0|        OPENSSL_free(item);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  164|      0|    }
  165|      0|    return 0;
  166|      1|}
engine_cleanup_int:
  176|      1|{
  177|      1|    if (int_cleanup_check(0)) {
  ------------------
  |  Branch (177:9): [True: 1, False: 0]
  ------------------
  178|      1|        sk_ENGINE_CLEANUP_ITEM_pop_free(cleanup_stack,
  179|      1|            engine_cleanup_cb_free);
  180|      1|        cleanup_stack = NULL;
  181|      1|    }
  182|      1|    CRYPTO_THREAD_lock_free(global_engine_lock);
  183|       |    global_engine_lock = NULL;
  184|      1|}
ENGINE_set_ex_data:
  189|    829|{
  190|    829|    return CRYPTO_set_ex_data(&e->ex_data, idx, arg);
  191|    829|}
ENGINE_get_ex_data:
  194|  4.97k|{
  195|  4.97k|    return CRYPTO_get_ex_data(&e->ex_data, idx);
  196|  4.97k|}
ENGINE_set_id:
  204|      3|{
  205|      3|    if (id == NULL) {
  ------------------
  |  Branch (205:9): [True: 0, False: 3]
  ------------------
  206|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  207|      0|        return 0;
  208|      0|    }
  209|      3|    e->id = id;
  210|      3|    return 1;
  211|      3|}
ENGINE_set_name:
  214|      3|{
  215|      3|    if (name == NULL) {
  ------------------
  |  Branch (215:9): [True: 0, False: 3]
  ------------------
  216|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  217|      0|        return 0;
  218|      0|    }
  219|      3|    e->name = name;
  220|      3|    return 1;
  221|      3|}
ENGINE_set_init_function:
  230|      3|{
  231|      3|    e->init = init_f;
  232|      3|    return 1;
  233|      3|}
ENGINE_set_finish_function:
  236|      1|{
  237|      1|    e->finish = finish_f;
  238|      1|    return 1;
  239|      1|}
ENGINE_set_ctrl_function:
  242|      1|{
  243|      1|    e->ctrl = ctrl_f;
  244|      1|    return 1;
  245|      1|}
ENGINE_set_flags:
  248|      2|{
  249|      2|    e->flags = flags;
  250|      2|    return 1;
  251|      2|}
ENGINE_set_cmd_defns:
  254|      1|{
  255|      1|    e->cmd_defns = defns;
  256|      1|    return 1;
  257|      1|}
eng_lib.c:do_engine_lock_init:
   22|      1|{
   23|      1|    global_engine_lock = CRYPTO_THREAD_lock_new();
   24|       |    return global_engine_lock != NULL;
   25|      1|}
eng_lib.c:int_cleanup_check:
  119|      3|{
  120|      3|    if (cleanup_stack)
  ------------------
  |  Branch (120:9): [True: 2, False: 1]
  ------------------
  121|      2|        return 1;
  122|      1|    if (!create)
  ------------------
  |  Branch (122:9): [True: 0, False: 1]
  ------------------
  123|      0|        return 0;
  124|      1|    cleanup_stack = sk_ENGINE_CLEANUP_ITEM_new_null();
  125|      1|    return (cleanup_stack ? 1 : 0);
  ------------------
  |  Branch (125:13): [True: 1, False: 0]
  ------------------
  126|      1|}
eng_lib.c:int_cleanup_item:
  129|      2|{
  130|      2|    ENGINE_CLEANUP_ITEM *item;
  131|       |
  132|      2|    if ((item = OPENSSL_malloc(sizeof(*item))) == NULL)
  ------------------
  |  |  106|      2|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (132:9): [True: 0, False: 2]
  ------------------
  133|      0|        return NULL;
  134|      2|    item->cb = cb;
  135|      2|    return item;
  136|      2|}
eng_lib.c:engine_cleanup_cb_free:
  170|      2|{
  171|      2|    (*(item->cb))();
  172|      2|    OPENSSL_free(item);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  173|      2|}

engine_add_dynamic_id:
  152|    832|{
  153|    832|    int result = 0;
  154|    832|    ENGINE *iterator = NULL;
  155|       |
  156|    832|    if (e == NULL)
  ------------------
  |  Branch (156:9): [True: 0, False: 832]
  ------------------
  157|      0|        return 0;
  158|       |
  159|    832|    if (e->dynamic_id == NULL && dynamic_id == NULL)
  ------------------
  |  Branch (159:9): [True: 832, False: 0]
  |  Branch (159:34): [True: 832, False: 0]
  ------------------
  160|    832|        return 0;
  161|       |
  162|      0|    if (not_locked && !CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (162:9): [True: 0, False: 0]
  |  Branch (162:23): [True: 0, False: 0]
  ------------------
  163|      0|        return 0;
  164|       |
  165|      0|    if (dynamic_id != NULL) {
  ------------------
  |  Branch (165:9): [True: 0, False: 0]
  ------------------
  166|      0|        iterator = engine_dyn_list_head;
  167|      0|        while (iterator != NULL) {
  ------------------
  |  Branch (167:16): [True: 0, False: 0]
  ------------------
  168|      0|            if (iterator->dynamic_id == dynamic_id)
  ------------------
  |  Branch (168:17): [True: 0, False: 0]
  ------------------
  169|      0|                goto err;
  170|      0|            iterator = iterator->next;
  171|      0|        }
  172|      0|        if (e->dynamic_id != NULL)
  ------------------
  |  Branch (172:13): [True: 0, False: 0]
  ------------------
  173|      0|            goto err;
  174|      0|        e->dynamic_id = dynamic_id;
  175|      0|    }
  176|       |
  177|      0|    if (engine_dyn_list_head == NULL) {
  ------------------
  |  Branch (177:9): [True: 0, False: 0]
  ------------------
  178|       |        /* We are adding to an empty list. */
  179|      0|        if (engine_dyn_list_tail != NULL)
  ------------------
  |  Branch (179:13): [True: 0, False: 0]
  ------------------
  180|      0|            goto err;
  181|      0|        engine_dyn_list_head = e;
  182|      0|        e->prev_dyn = NULL;
  183|      0|    } else {
  184|       |        /* We are adding to the tail of an existing list. */
  185|      0|        if (engine_dyn_list_tail == NULL
  ------------------
  |  Branch (185:13): [True: 0, False: 0]
  ------------------
  186|      0|            || engine_dyn_list_tail->next_dyn != NULL)
  ------------------
  |  Branch (186:16): [True: 0, False: 0]
  ------------------
  187|      0|            goto err;
  188|      0|        engine_dyn_list_tail->next_dyn = e;
  189|      0|        e->prev_dyn = engine_dyn_list_tail;
  190|      0|    }
  191|       |
  192|      0|    engine_dyn_list_tail = e;
  193|      0|    e->next_dyn = NULL;
  194|      0|    result = 1;
  195|       |
  196|      0|err:
  197|      0|    if (not_locked)
  ------------------
  |  Branch (197:9): [True: 0, False: 0]
  ------------------
  198|      0|        CRYPTO_THREAD_unlock(global_engine_lock);
  199|      0|    return result;
  200|      0|}
engine_remove_dynamic_id:
  204|    835|{
  205|    835|    if (e == NULL || e->dynamic_id == NULL)
  ------------------
  |  Branch (205:9): [True: 0, False: 835]
  |  Branch (205:22): [True: 835, False: 0]
  ------------------
  206|    835|        return;
  207|       |
  208|      0|    if (not_locked && !CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (208:9): [True: 0, False: 0]
  |  Branch (208:23): [True: 0, False: 0]
  ------------------
  209|      0|        return;
  210|       |
  211|      0|    e->dynamic_id = NULL;
  212|       |
  213|       |    /* un-link e from the chain. */
  214|      0|    if (e->next_dyn != NULL)
  ------------------
  |  Branch (214:9): [True: 0, False: 0]
  ------------------
  215|      0|        e->next_dyn->prev_dyn = e->prev_dyn;
  216|      0|    if (e->prev_dyn != NULL)
  ------------------
  |  Branch (216:9): [True: 0, False: 0]
  ------------------
  217|      0|        e->prev_dyn->next_dyn = e->next_dyn;
  218|       |    /* Correct our head/tail if necessary. */
  219|      0|    if (engine_dyn_list_head == e)
  ------------------
  |  Branch (219:9): [True: 0, False: 0]
  ------------------
  220|      0|        engine_dyn_list_head = e->next_dyn;
  221|      0|    if (engine_dyn_list_tail == e)
  ------------------
  |  Branch (221:9): [True: 0, False: 0]
  ------------------
  222|      0|        engine_dyn_list_tail = e->prev_dyn;
  223|       |
  224|      0|    if (not_locked)
  ------------------
  |  Branch (224:9): [True: 0, False: 0]
  ------------------
  225|      0|        CRYPTO_THREAD_unlock(global_engine_lock);
  226|      0|}
ENGINE_get_first:
  230|      1|{
  231|      1|    ENGINE *ret;
  232|       |
  233|      1|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (233:9): [True: 0, False: 1]
  ------------------
  234|       |        /* Maybe this should be raised in do_engine_lock_init() */
  235|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  236|      0|        return NULL;
  237|      0|    }
  238|       |
  239|      1|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (239:9): [True: 0, False: 1]
  ------------------
  240|      0|        return NULL;
  241|      1|    ret = engine_list_head;
  242|      1|    if (ret) {
  ------------------
  |  Branch (242:9): [True: 1, False: 0]
  ------------------
  243|      1|        int ref;
  244|       |
  245|      1|        if (!CRYPTO_UP_REF(&ret->struct_ref, &ref)) {
  ------------------
  |  Branch (245:13): [True: 0, False: 1]
  ------------------
  246|      0|            CRYPTO_THREAD_unlock(global_engine_lock);
  247|      0|            ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  248|      0|            return NULL;
  249|      0|        }
  250|      1|        ENGINE_REF_PRINT(ret, 0, 1);
  ------------------
  |  |   29|      1|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      1|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      1|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      1|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      1|        ((isfunct)                                        \
  |  |   33|      1|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      1|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      1|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      1|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
  251|      1|    }
  252|      1|    CRYPTO_THREAD_unlock(global_engine_lock);
  253|      1|    return ret;
  254|      1|}
ENGINE_get_next:
  285|      3|{
  286|      3|    ENGINE *ret = NULL;
  287|      3|    if (e == NULL) {
  ------------------
  |  Branch (287:9): [True: 0, False: 3]
  ------------------
  288|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|      0|        return NULL;
  290|      0|    }
  291|      3|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (291:9): [True: 0, False: 3]
  ------------------
  292|      0|        return NULL;
  293|      3|    ret = e->next;
  294|      3|    if (ret) {
  ------------------
  |  Branch (294:9): [True: 2, False: 1]
  ------------------
  295|      2|        int ref;
  296|       |
  297|       |        /* Return a valid structural reference to the next ENGINE */
  298|      2|        if (!CRYPTO_UP_REF(&ret->struct_ref, &ref)) {
  ------------------
  |  Branch (298:13): [True: 0, False: 2]
  ------------------
  299|      0|            CRYPTO_THREAD_unlock(global_engine_lock);
  300|      0|            ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  301|      0|            return NULL;
  302|      0|        }
  303|      2|        ENGINE_REF_PRINT(ret, 0, 1);
  ------------------
  |  |   29|      2|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      2|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      2|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      2|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      2|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      2|        ((isfunct)                                        \
  |  |   33|      2|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      2|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      2|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      2|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
  304|      2|    }
  305|      3|    CRYPTO_THREAD_unlock(global_engine_lock);
  306|       |    /* Release the structural reference to the previous ENGINE */
  307|      3|    ENGINE_free(e);
  308|      3|    return ret;
  309|      3|}
ENGINE_add:
  340|      3|{
  341|      3|    int to_return = 1;
  342|      3|    if (e == NULL) {
  ------------------
  |  Branch (342:9): [True: 0, False: 3]
  ------------------
  343|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  344|      0|        return 0;
  345|      0|    }
  346|      3|    if ((e->id == NULL) || (e->name == NULL)) {
  ------------------
  |  Branch (346:9): [True: 0, False: 3]
  |  Branch (346:28): [True: 0, False: 3]
  ------------------
  347|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_ID_OR_NAME_MISSING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  348|      0|        return 0;
  349|      0|    }
  350|      3|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (350:9): [True: 0, False: 3]
  ------------------
  351|      0|        return 0;
  352|      3|    if (!engine_list_add(e)) {
  ------------------
  |  Branch (352:9): [True: 0, False: 3]
  ------------------
  353|       |        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  354|      0|        to_return = 0;
  355|      0|    }
  356|      3|    CRYPTO_THREAD_unlock(global_engine_lock);
  357|      3|    return to_return;
  358|      3|}
ENGINE_remove:
  362|      3|{
  363|      3|    int to_return = 1;
  364|      3|    if (e == NULL) {
  ------------------
  |  Branch (364:9): [True: 0, False: 3]
  ------------------
  365|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  366|      0|        return 0;
  367|      0|    }
  368|      3|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (368:9): [True: 0, False: 3]
  ------------------
  369|      0|        return 0;
  370|      3|    if (!engine_list_remove(e)) {
  ------------------
  |  Branch (370:9): [True: 0, False: 3]
  ------------------
  371|       |        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        to_return = 0;
  373|      0|    }
  374|      3|    CRYPTO_THREAD_unlock(global_engine_lock);
  375|      3|    return to_return;
  376|      3|}
ENGINE_by_id:
  409|  1.66k|{
  410|  1.66k|    ENGINE *iterator;
  411|  1.66k|    const char *load_dir = NULL;
  412|  1.66k|    if (id == NULL) {
  ------------------
  |  Branch (412:9): [True: 0, False: 1.66k]
  ------------------
  413|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  414|      0|        return NULL;
  415|      0|    }
  416|  1.66k|    ENGINE_load_builtin_engines();
  417|       |
  418|  1.66k|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|  1.66k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1.66k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (418:9): [True: 0, False: 1.66k]
  ------------------
  419|       |        /* Maybe this should be raised in do_engine_lock_init() */
  420|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  421|      0|        return NULL;
  422|      0|    }
  423|       |
  424|  1.66k|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (424:9): [True: 0, False: 1.66k]
  ------------------
  425|      0|        return NULL;
  426|  1.66k|    iterator = engine_list_head;
  427|  4.98k|    while (iterator && (strcmp(id, iterator->id) != 0))
  ------------------
  |  Branch (427:12): [True: 4.15k, False: 829]
  |  Branch (427:24): [True: 3.32k, False: 836]
  ------------------
  428|  3.32k|        iterator = iterator->next;
  429|  1.66k|    if (iterator != NULL) {
  ------------------
  |  Branch (429:9): [True: 836, False: 829]
  ------------------
  430|       |        /*
  431|       |         * We need to return a structural reference. If this is an ENGINE
  432|       |         * type that returns copies, make a duplicate - otherwise increment
  433|       |         * the existing ENGINE's reference count.
  434|       |         */
  435|    836|        if (iterator->flags & ENGINE_FLAGS_BY_ID_COPY) {
  ------------------
  |  |   88|    836|#define ENGINE_FLAGS_BY_ID_COPY (int)0x0004
  ------------------
  |  Branch (435:13): [True: 832, False: 4]
  ------------------
  436|    832|            ENGINE *cp = ENGINE_new();
  437|    832|            if (cp == NULL)
  ------------------
  |  Branch (437:17): [True: 0, False: 832]
  ------------------
  438|      0|                iterator = NULL;
  439|    832|            else {
  440|    832|                engine_cpy(cp, iterator);
  441|    832|                iterator = cp;
  442|    832|            }
  443|    832|        } else {
  444|      4|            int ref;
  445|       |
  446|      4|            if (!CRYPTO_UP_REF(&iterator->struct_ref, &ref)) {
  ------------------
  |  Branch (446:17): [True: 0, False: 4]
  ------------------
  447|      0|                CRYPTO_THREAD_unlock(global_engine_lock);
  448|      0|                ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  449|      0|                return NULL;
  450|      0|            }
  451|      4|            ENGINE_REF_PRINT(iterator, 0, 1);
  ------------------
  |  |   29|      4|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      4|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      4|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      4|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      4|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      4|        ((isfunct)                                        \
  |  |   33|      4|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      4|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      4|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      4|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
  452|      4|        }
  453|    836|    }
  454|  1.66k|    CRYPTO_THREAD_unlock(global_engine_lock);
  455|  1.66k|    if (iterator != NULL)
  ------------------
  |  Branch (455:9): [True: 836, False: 829]
  ------------------
  456|    836|        return iterator;
  457|       |    /*
  458|       |     * Prevent infinite recursion if we're looking for the dynamic engine.
  459|       |     */
  460|    829|    if (strcmp(id, "dynamic")) {
  ------------------
  |  Branch (460:9): [True: 829, False: 0]
  ------------------
  461|    829|        if ((load_dir = ossl_safe_getenv("OPENSSL_ENGINES")) == NULL)
  ------------------
  |  Branch (461:13): [True: 829, False: 0]
  ------------------
  462|    829|            load_dir = ossl_get_enginesdir();
  463|    829|        iterator = ENGINE_by_id("dynamic");
  464|    829|        if (!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) || !ENGINE_ctrl_cmd_string(iterator, "DIR_LOAD", "2", 0) || !ENGINE_ctrl_cmd_string(iterator, "DIR_ADD", load_dir, 0) || !ENGINE_ctrl_cmd_string(iterator, "LIST_ADD", "1", 0) || !ENGINE_ctrl_cmd_string(iterator, "LOAD", NULL, 0))
  ------------------
  |  Branch (464:13): [True: 0, False: 829]
  |  Branch (464:26): [True: 0, False: 829]
  |  Branch (464:76): [True: 0, False: 829]
  |  Branch (464:133): [True: 0, False: 829]
  |  Branch (464:194): [True: 0, False: 829]
  |  Branch (464:251): [True: 829, False: 0]
  ------------------
  465|    829|            goto notfound;
  466|      0|        return iterator;
  467|    829|    }
  468|    829|notfound:
  469|    829|    ENGINE_free(iterator);
  470|    829|    ERR_raise_data(ERR_LIB_ENGINE, ENGINE_R_NO_SUCH_ENGINE, "id=%s", id);
  ------------------
  |  |  406|    829|    (ERR_new(),                                                  \
  |  |  407|    829|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    829|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    829|        ERR_set_error)
  ------------------
                  ERR_raise_data(ERR_LIB_ENGINE, ENGINE_R_NO_SUCH_ENGINE, "id=%s", id);
  ------------------
  |  |  101|    829|#define ERR_LIB_ENGINE 38
  ------------------
                  ERR_raise_data(ERR_LIB_ENGINE, ENGINE_R_NO_SUCH_ENGINE, "id=%s", id);
  ------------------
  |  |   54|    829|#define ENGINE_R_NO_SUCH_ENGINE 116
  ------------------
  471|    829|    return NULL;
  472|       |    /* EEK! Experimental code ends */
  473|    829|}
eng_list.c:engine_list_add:
   58|      3|{
   59|      3|    int conflict = 0;
   60|      3|    ENGINE *iterator = NULL;
   61|      3|    int ref;
   62|       |
   63|      3|    if (e == NULL) {
  ------------------
  |  Branch (63:9): [True: 0, False: 3]
  ------------------
   64|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   65|      0|        return 0;
   66|      0|    }
   67|      3|    iterator = engine_list_head;
   68|      6|    while (iterator && !conflict) {
  ------------------
  |  Branch (68:12): [True: 3, False: 3]
  |  Branch (68:24): [True: 3, False: 0]
  ------------------
   69|      3|        conflict = (strcmp(iterator->id, e->id) == 0);
   70|      3|        iterator = iterator->next;
   71|      3|    }
   72|      3|    if (conflict) {
  ------------------
  |  Branch (72:9): [True: 0, False: 3]
  ------------------
   73|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_CONFLICTING_ENGINE_ID);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   74|      0|        return 0;
   75|      0|    }
   76|       |
   77|       |    /*
   78|       |     * Having the engine in the list assumes a structural reference.
   79|       |     */
   80|      3|    if (!CRYPTO_UP_REF(&e->struct_ref, &ref)) {
  ------------------
  |  Branch (80:9): [True: 0, False: 3]
  ------------------
   81|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   82|      0|        return 0;
   83|      0|    }
   84|      3|    ENGINE_REF_PRINT(e, 0, 1);
  ------------------
  |  |   29|      3|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      3|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      3|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      3|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      3|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      3|        ((isfunct)                                        \
  |  |   33|      3|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      3|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      3|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      3|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   85|      3|    if (engine_list_head == NULL) {
  ------------------
  |  Branch (85:9): [True: 1, False: 2]
  ------------------
   86|       |        /* We are adding to an empty list. */
   87|      1|        if (engine_list_tail != NULL) {
  ------------------
  |  Branch (87:13): [True: 0, False: 1]
  ------------------
   88|      0|            CRYPTO_DOWN_REF(&e->struct_ref, &ref);
   89|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   90|      0|            return 0;
   91|      0|        }
   92|       |        /*
   93|       |         * The first time the list allocates, we should register the cleanup.
   94|       |         */
   95|      1|        if (!engine_cleanup_add_last(engine_list_cleanup)) {
  ------------------
  |  Branch (95:13): [True: 0, False: 1]
  ------------------
   96|      0|            CRYPTO_DOWN_REF(&e->struct_ref, &ref);
   97|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|            return 0;
   99|      0|        }
  100|      1|        engine_list_head = e;
  101|      1|        e->prev = NULL;
  102|      2|    } else {
  103|       |        /* We are adding to the tail of an existing list. */
  104|      2|        if ((engine_list_tail == NULL) || (engine_list_tail->next != NULL)) {
  ------------------
  |  Branch (104:13): [True: 0, False: 2]
  |  Branch (104:43): [True: 0, False: 2]
  ------------------
  105|      0|            CRYPTO_DOWN_REF(&e->struct_ref, &ref);
  106|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  107|      0|            return 0;
  108|      0|        }
  109|      2|        engine_list_tail->next = e;
  110|      2|        e->prev = engine_list_tail;
  111|      2|    }
  112|       |
  113|       |    /* However it came to be, e is the last item in the list. */
  114|      3|    engine_list_tail = e;
  115|       |    e->next = NULL;
  116|      3|    return 1;
  117|      3|}
eng_list.c:engine_list_cleanup:
   43|      1|{
   44|      1|    ENGINE *iterator = engine_list_head;
   45|       |
   46|      4|    while (iterator != NULL) {
  ------------------
  |  Branch (46:12): [True: 3, False: 1]
  ------------------
   47|      3|        ENGINE_remove(iterator);
   48|      3|        iterator = engine_list_head;
   49|      3|    }
   50|      1|    return;
   51|      1|}
eng_list.c:engine_list_remove:
  120|      3|{
  121|      3|    ENGINE *iterator;
  122|       |
  123|      3|    if (e == NULL) {
  ------------------
  |  Branch (123:9): [True: 0, False: 3]
  ------------------
  124|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  125|      0|        return 0;
  126|      0|    }
  127|       |    /* We need to check that e is in our linked list! */
  128|      3|    iterator = engine_list_head;
  129|      3|    while (iterator && (iterator != e))
  ------------------
  |  Branch (129:12): [True: 3, False: 0]
  |  Branch (129:24): [True: 0, False: 3]
  ------------------
  130|      0|        iterator = iterator->next;
  131|      3|    if (iterator == NULL) {
  ------------------
  |  Branch (131:9): [True: 0, False: 3]
  ------------------
  132|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_ENGINE_IS_NOT_IN_LIST);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  133|      0|        return 0;
  134|      0|    }
  135|       |    /* un-link e from the chain. */
  136|      3|    if (e->next)
  ------------------
  |  Branch (136:9): [True: 2, False: 1]
  ------------------
  137|      2|        e->next->prev = e->prev;
  138|      3|    if (e->prev)
  ------------------
  |  Branch (138:9): [True: 0, False: 3]
  ------------------
  139|      0|        e->prev->next = e->next;
  140|       |    /* Correct our head/tail if necessary. */
  141|      3|    if (engine_list_head == e)
  ------------------
  |  Branch (141:9): [True: 3, False: 0]
  ------------------
  142|      3|        engine_list_head = e->next;
  143|      3|    if (engine_list_tail == e)
  ------------------
  |  Branch (143:9): [True: 1, False: 2]
  ------------------
  144|      1|        engine_list_tail = e->prev;
  145|      3|    engine_free_util(e, 0);
  146|      3|    return 1;
  147|      3|}
eng_list.c:engine_cpy:
  379|    832|{
  380|    832|    dest->id = src->id;
  381|    832|    dest->name = src->name;
  382|    832|    dest->rsa_meth = src->rsa_meth;
  383|    832|#ifndef OPENSSL_NO_DSA
  384|    832|    dest->dsa_meth = src->dsa_meth;
  385|    832|#endif
  386|    832|#ifndef OPENSSL_NO_DH
  387|    832|    dest->dh_meth = src->dh_meth;
  388|    832|#endif
  389|    832|#ifndef OPENSSL_NO_EC
  390|    832|    dest->ec_meth = src->ec_meth;
  391|    832|#endif
  392|    832|    dest->rand_meth = src->rand_meth;
  393|    832|    dest->ciphers = src->ciphers;
  394|    832|    dest->digests = src->digests;
  395|    832|    dest->pkey_meths = src->pkey_meths;
  396|    832|    dest->destroy = src->destroy;
  397|    832|    dest->init = src->init;
  398|    832|    dest->finish = src->finish;
  399|    832|    dest->ctrl = src->ctrl;
  400|    832|    dest->load_privkey = src->load_privkey;
  401|    832|    dest->load_pubkey = src->load_pubkey;
  402|    832|    dest->cmd_defns = src->cmd_defns;
  403|    832|    dest->flags = src->flags;
  404|    832|    dest->dynamic_id = src->dynamic_id;
  405|       |    engine_add_dynamic_id(dest, NULL, 0);
  406|    832|}

engine_load_rdrand_int:
   95|      1|{
   96|      1|    if (OPENSSL_ia32cap_P[1] & (1 << (62 - 32))) {
  ------------------
  |  Branch (96:9): [True: 1, False: 0]
  ------------------
   97|      1|        ENGINE *toadd = ENGINE_rdrand();
   98|      1|        if (!toadd)
  ------------------
  |  Branch (98:13): [True: 0, False: 1]
  ------------------
   99|      0|            return;
  100|      1|        ERR_set_mark();
  101|      1|        ENGINE_add(toadd);
  102|       |        /*
  103|       |         * If the "add" worked, it gets a structural reference. So either way, we
  104|       |         * release our just-created reference.
  105|       |         */
  106|      1|        ENGINE_free(toadd);
  107|       |        /*
  108|       |         * If the "add" didn't work, it was probably a conflict because it was
  109|       |         * already added (eg. someone calling ENGINE_load_blah then calling
  110|       |         * ENGINE_load_builtin_engines() perhaps).
  111|       |         */
  112|      1|        ERR_pop_to_mark();
  113|      1|    }
  114|      1|}
eng_rdrand.c:ENGINE_rdrand:
   83|      1|{
   84|      1|    ENGINE *ret = ENGINE_new();
   85|      1|    if (ret == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 1]
  ------------------
   86|      0|        return NULL;
   87|      1|    if (!bind_helper(ret)) {
  ------------------
  |  Branch (87:9): [True: 0, False: 1]
  ------------------
   88|      0|        ENGINE_free(ret);
   89|      0|        return NULL;
   90|      0|    }
   91|      1|    return ret;
   92|      1|}
eng_rdrand.c:bind_helper:
   75|      1|{
   76|      1|    if (!ENGINE_set_id(e, engine_e_rdrand_id) || !ENGINE_set_name(e, engine_e_rdrand_name) || !ENGINE_set_flags(e, ENGINE_FLAGS_NO_REGISTER_ALL) || !ENGINE_set_init_function(e, rdrand_init) || !ENGINE_set_RAND(e, &rdrand_meth))
  ------------------
  |  |   96|      1|#define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008
  ------------------
  |  Branch (76:9): [True: 0, False: 1]
  |  Branch (76:50): [True: 0, False: 1]
  |  Branch (76:95): [True: 0, False: 1]
  |  Branch (76:149): [True: 0, False: 1]
  |  Branch (76:194): [True: 0, False: 1]
  ------------------
   77|      0|        return 0;
   78|       |
   79|      1|    return 1;
   80|      1|}
eng_rdrand.c:rdrand_init:
   67|      2|{
   68|      2|    return 1;
   69|      2|}

engine_table_register:
   86|      2|{
   87|      2|    int ret = 0, added = 0;
   88|      2|    ENGINE_PILE tmplate, *fnd;
   89|       |
   90|      2|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (90:9): [True: 0, False: 2]
  ------------------
   91|      0|        return 0;
   92|      2|    if (!(*table))
  ------------------
  |  Branch (92:9): [True: 1, False: 1]
  ------------------
   93|      1|        added = 1;
   94|      2|    if (!int_table_check(table, 1))
  ------------------
  |  Branch (94:9): [True: 0, False: 2]
  ------------------
   95|      0|        goto end;
   96|       |    /* The cleanup callback needs to be added */
   97|      2|    if (added && !engine_cleanup_add_first(cleanup)) {
  ------------------
  |  Branch (97:9): [True: 1, False: 1]
  |  Branch (97:18): [True: 0, False: 1]
  ------------------
   98|      0|        lh_ENGINE_PILE_free(&(*table)->piles);
   99|      0|        *table = NULL;
  100|      0|        goto end;
  101|      0|    }
  102|      4|    while (num_nids--) {
  ------------------
  |  Branch (102:12): [True: 2, False: 2]
  ------------------
  103|      2|        tmplate.nid = *nids;
  104|      2|        fnd = lh_ENGINE_PILE_retrieve(&(*table)->piles, &tmplate);
  105|      2|        if (!fnd) {
  ------------------
  |  Branch (105:13): [True: 1, False: 1]
  ------------------
  106|      1|            fnd = OPENSSL_malloc(sizeof(*fnd));
  ------------------
  |  |  106|      1|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  107|      1|            if (fnd == NULL)
  ------------------
  |  Branch (107:17): [True: 0, False: 1]
  ------------------
  108|      0|                goto end;
  109|      1|            fnd->uptodate = 1;
  110|      1|            fnd->nid = *nids;
  111|      1|            fnd->sk = sk_ENGINE_new_null();
  112|      1|            if (!fnd->sk) {
  ------------------
  |  Branch (112:17): [True: 0, False: 1]
  ------------------
  113|      0|                OPENSSL_free(fnd);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  114|      0|                goto end;
  115|      0|            }
  116|      1|            fnd->funct = NULL;
  117|      1|            (void)lh_ENGINE_PILE_insert(&(*table)->piles, fnd);
  118|      1|            if (lh_ENGINE_PILE_retrieve(&(*table)->piles, &tmplate) != fnd) {
  ------------------
  |  Branch (118:17): [True: 0, False: 1]
  ------------------
  119|      0|                sk_ENGINE_free(fnd->sk);
  120|      0|                OPENSSL_free(fnd);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|      0|                goto end;
  122|      0|            }
  123|      1|        }
  124|       |        /* A registration shouldn't add duplicate entries */
  125|      2|        (void)sk_ENGINE_delete_ptr(fnd->sk, e);
  126|       |        /*
  127|       |         * if 'setdefault', this ENGINE goes to the head of the list
  128|       |         */
  129|      2|        if (!sk_ENGINE_push(fnd->sk, e))
  ------------------
  |  Branch (129:13): [True: 0, False: 2]
  ------------------
  130|      0|            goto end;
  131|       |        /* "touch" this ENGINE_PILE */
  132|      2|        fnd->uptodate = 0;
  133|      2|        if (setdefault) {
  ------------------
  |  Branch (133:13): [True: 2, False: 0]
  ------------------
  134|      2|            if (!engine_unlocked_init(e)) {
  ------------------
  |  Branch (134:17): [True: 0, False: 2]
  ------------------
  135|      0|                ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INIT_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  136|      0|                goto end;
  137|      0|            }
  138|      2|            if (fnd->funct)
  ------------------
  |  Branch (138:17): [True: 1, False: 1]
  ------------------
  139|      1|                engine_unlocked_finish(fnd->funct, 0);
  140|      2|            fnd->funct = e;
  141|      2|            fnd->uptodate = 1;
  142|      2|        }
  143|      2|        nids++;
  144|      2|    }
  145|      2|    ret = 1;
  146|      2|end:
  147|      2|    CRYPTO_THREAD_unlock(global_engine_lock);
  148|      2|    return ret;
  149|      2|}
engine_table_cleanup:
  188|      1|{
  189|      1|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (189:9): [True: 0, False: 1]
  ------------------
  190|      0|        return;
  191|      1|    if (*table) {
  ------------------
  |  Branch (191:9): [True: 1, False: 0]
  ------------------
  192|      1|        lh_ENGINE_PILE_doall(&(*table)->piles, int_cleanup_cb_doall);
  193|      1|        lh_ENGINE_PILE_free(&(*table)->piles);
  194|       |        *table = NULL;
  195|      1|    }
  196|      1|    CRYPTO_THREAD_unlock(global_engine_lock);
  197|      1|}
ossl_engine_table_select:
  202|  2.95M|{
  203|  2.95M|    ENGINE *ret = NULL;
  204|  2.95M|    ENGINE_PILE tmplate, *fnd = NULL;
  205|  2.95M|    int initres, loop = 0;
  206|       |
  207|  2.95M|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
  208|       |    /* Load the config before trying to check if engines are available */
  209|  2.95M|    OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  510|  2.95M|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  210|  2.95M|#endif
  211|       |
  212|  2.95M|    if (!(*table)) {
  ------------------
  |  Branch (212:9): [True: 2.95M, False: 0]
  ------------------
  213|  2.95M|        OSSL_TRACE3(ENGINE_TABLE,
  ------------------
  |  |  297|  2.95M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  ------------------
  |  |  |  |  285|  2.95M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  214|  2.95M|            "%s:%d, nid=%d, nothing registered!\n",
  215|  2.95M|            f, l, nid);
  216|  2.95M|        return NULL;
  217|  2.95M|    }
  218|       |
  219|      0|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (219:9): [True: 0, False: 0]
  ------------------
  220|      0|        return NULL;
  221|       |
  222|      0|    ERR_set_mark();
  223|       |    /*
  224|       |     * Check again inside the lock otherwise we could race against cleanup
  225|       |     * operations. But don't worry about a debug printout
  226|       |     */
  227|      0|    if (!int_table_check(table, 0))
  ------------------
  |  Branch (227:9): [True: 0, False: 0]
  ------------------
  228|      0|        goto end;
  229|      0|    tmplate.nid = nid;
  230|      0|    fnd = lh_ENGINE_PILE_retrieve(&(*table)->piles, &tmplate);
  231|      0|    if (!fnd)
  ------------------
  |  Branch (231:9): [True: 0, False: 0]
  ------------------
  232|      0|        goto end;
  233|      0|    if (fnd->funct && engine_unlocked_init(fnd->funct)) {
  ------------------
  |  Branch (233:9): [True: 0, False: 0]
  |  Branch (233:23): [True: 0, False: 0]
  ------------------
  234|      0|        OSSL_TRACE4(ENGINE_TABLE,
  ------------------
  |  |  299|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  235|      0|            "%s:%d, nid=%d, using ENGINE '%s' cached\n",
  236|      0|            f, l, nid, fnd->funct->id);
  237|      0|        ret = fnd->funct;
  238|      0|        goto end;
  239|      0|    }
  240|      0|    if (fnd->uptodate) {
  ------------------
  |  Branch (240:9): [True: 0, False: 0]
  ------------------
  241|      0|        ret = fnd->funct;
  242|      0|        goto end;
  243|      0|    }
  244|      0|trynext:
  245|      0|    ret = sk_ENGINE_value(fnd->sk, loop++);
  246|      0|    if (!ret) {
  ------------------
  |  Branch (246:9): [True: 0, False: 0]
  ------------------
  247|      0|        OSSL_TRACE3(ENGINE_TABLE,
  ------------------
  |  |  297|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  248|      0|            "%s:%d, nid=%d, "
  249|      0|            "no registered implementations would initialise\n",
  250|      0|            f, l, nid);
  251|      0|        goto end;
  252|      0|    }
  253|       |    /* Try to initialise the ENGINE? */
  254|      0|    if ((ret->funct_ref > 0) || !(table_flags & ENGINE_TABLE_FLAG_NOINIT))
  ------------------
  |  |   64|      0|#define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x0001
  ------------------
  |  Branch (254:9): [True: 0, False: 0]
  |  Branch (254:33): [True: 0, False: 0]
  ------------------
  255|      0|        initres = engine_unlocked_init(ret);
  256|      0|    else
  257|      0|        initres = 0;
  258|      0|    if (initres) {
  ------------------
  |  Branch (258:9): [True: 0, False: 0]
  ------------------
  259|       |        /* Update 'funct' */
  260|      0|        if ((fnd->funct != ret) && engine_unlocked_init(ret)) {
  ------------------
  |  Branch (260:13): [True: 0, False: 0]
  |  Branch (260:36): [True: 0, False: 0]
  ------------------
  261|       |            /* If there was a previous default we release it. */
  262|      0|            if (fnd->funct)
  ------------------
  |  Branch (262:17): [True: 0, False: 0]
  ------------------
  263|      0|                engine_unlocked_finish(fnd->funct, 0);
  264|      0|            fnd->funct = ret;
  265|      0|            OSSL_TRACE4(ENGINE_TABLE,
  ------------------
  |  |  299|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  266|      0|                "%s:%d, nid=%d, setting default to '%s'\n",
  267|      0|                f, l, nid, ret->id);
  268|      0|        }
  269|      0|        OSSL_TRACE4(ENGINE_TABLE,
  ------------------
  |  |  299|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  270|      0|            "%s:%d, nid=%d, using newly initialised '%s'\n",
  271|      0|            f, l, nid, ret->id);
  272|      0|        goto end;
  273|      0|    }
  274|      0|    goto trynext;
  275|      0|end:
  276|       |    /*
  277|       |     * If it failed, it is unlikely to succeed again until some future
  278|       |     * registrations have taken place. In all cases, we cache.
  279|       |     */
  280|      0|    if (fnd)
  ------------------
  |  Branch (280:9): [True: 0, False: 0]
  ------------------
  281|      0|        fnd->uptodate = 1;
  282|      0|    if (ret)
  ------------------
  |  Branch (282:9): [True: 0, False: 0]
  ------------------
  283|      0|        OSSL_TRACE4(ENGINE_TABLE,
  ------------------
  |  |  299|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  284|      0|            "%s:%d, nid=%d, caching ENGINE '%s'\n",
  285|      0|            f, l, nid, ret->id);
  286|      0|    else
  287|      0|        OSSL_TRACE3(ENGINE_TABLE,
  ------------------
  |  |  297|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  288|      0|            "%s:%d, nid=%d, caching 'no matching ENGINE'\n",
  289|      0|            f, l, nid);
  290|      0|    CRYPTO_THREAD_unlock(global_engine_lock);
  291|       |    /*
  292|       |     * Whatever happened, any failed init()s are not failures in this
  293|       |     * context, so clear our error state.
  294|       |     */
  295|      0|    ERR_pop_to_mark();
  296|      0|    return ret;
  297|      0|}
engine_table_doall:
  310|  2.09M|{
  311|  2.09M|    ENGINE_PILE_DOALL dall;
  312|  2.09M|    dall.cb = cb;
  313|  2.09M|    dall.arg = arg;
  314|  2.09M|    if (table)
  ------------------
  |  Branch (314:9): [True: 0, False: 2.09M]
  ------------------
  315|      0|        lh_ENGINE_PILE_doall_ENGINE_PILE_DOALL(&table->piles, int_dall, &dall);
  316|  2.09M|}
eng_table.c:int_table_check:
   66|      2|{
   67|      2|    LHASH_OF(ENGINE_PILE) *lh;
  ------------------
  |  |  156|      2|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   68|       |
   69|      2|    if (*t)
  ------------------
  |  Branch (69:9): [True: 1, False: 1]
  ------------------
   70|      1|        return 1;
   71|      1|    if (!create)
  ------------------
  |  Branch (71:9): [True: 0, False: 1]
  ------------------
   72|      0|        return 0;
   73|      1|    if ((lh = lh_ENGINE_PILE_new(engine_pile_hash, engine_pile_cmp)) == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 1]
  ------------------
   74|      0|        return 0;
   75|      1|    *t = (ENGINE_TABLE *)lh;
   76|      1|    return 1;
   77|      1|}
eng_table.c:engine_pile_hash:
   56|      4|{
   57|      4|    return c->nid;
   58|      4|}
eng_table.c:engine_pile_cmp:
   61|      2|{
   62|      2|    return a->nid - b->nid;
   63|      2|}
eng_table.c:int_cleanup_cb_doall:
  178|      1|{
  179|      1|    if (p == NULL)
  ------------------
  |  Branch (179:9): [True: 0, False: 1]
  ------------------
  180|      0|        return;
  181|      1|    sk_ENGINE_free(p->sk);
  182|      1|    if (p->funct)
  ------------------
  |  Branch (182:9): [True: 1, False: 0]
  ------------------
  183|      1|        engine_unlocked_finish(p->funct, 0);
  184|      1|    OPENSSL_free(p);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  185|      1|}

ENGINE_register_pkey_asn1_meths:
   39|      2|{
   40|      2|    if (e->pkey_asn1_meths) {
  ------------------
  |  Branch (40:9): [True: 0, False: 2]
  ------------------
   41|      0|        const int *nids;
   42|      0|        int num_nids = e->pkey_asn1_meths(e, NULL, &nids, 0);
   43|      0|        if (num_nids > 0)
  ------------------
  |  Branch (43:13): [True: 0, False: 0]
  ------------------
   44|      0|            return engine_table_register(&pkey_asn1_meth_table,
   45|      0|                engine_unregister_all_pkey_asn1_meths,
   46|      0|                e, nids, num_nids, 0);
   47|      0|    }
   48|      2|    return 1;
   49|      2|}
ENGINE_set_default_pkey_asn1_meths:
   60|      2|{
   61|      2|    if (e->pkey_asn1_meths) {
  ------------------
  |  Branch (61:9): [True: 0, False: 2]
  ------------------
   62|      0|        const int *nids;
   63|      0|        int num_nids = e->pkey_asn1_meths(e, NULL, &nids, 0);
   64|      0|        if (num_nids > 0)
  ------------------
  |  Branch (64:13): [True: 0, False: 0]
  ------------------
   65|      0|            return engine_table_register(&pkey_asn1_meth_table,
   66|      0|                engine_unregister_all_pkey_asn1_meths,
   67|      0|                e, nids, num_nids, 1);
   68|      0|    }
   69|      2|    return 1;
   70|      2|}
ENGINE_get_pkey_asn1_meth_engine:
   78|  1.11M|{
   79|  1.11M|    return ossl_engine_table_select(&pkey_asn1_meth_table, nid,
   80|  1.11M|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   81|  1.11M|}
engine_pkey_asn1_meths_free:
  117|    835|{
  118|    835|    int i;
  119|    835|    EVP_PKEY_ASN1_METHOD *pkm;
  120|    835|    if (e->pkey_asn1_meths) {
  ------------------
  |  Branch (120:9): [True: 0, False: 835]
  ------------------
  121|      0|        const int *pknids;
  122|      0|        int npknids;
  123|      0|        npknids = e->pkey_asn1_meths(e, NULL, &pknids, 0);
  124|      0|        for (i = 0; i < npknids; i++) {
  ------------------
  |  Branch (124:21): [True: 0, False: 0]
  ------------------
  125|      0|            if (e->pkey_asn1_meths(e, &pkm, NULL, pknids[i])) {
  ------------------
  |  Branch (125:17): [True: 0, False: 0]
  ------------------
  126|      0|                EVP_PKEY_asn1_free(pkm);
  127|      0|            }
  128|      0|        }
  129|      0|    }
  130|    835|}
ENGINE_pkey_asn1_find_str:
  191|  2.09M|{
  192|  2.09M|    ENGINE_FIND_STR fstr;
  193|  2.09M|    fstr.e = NULL;
  194|  2.09M|    fstr.ameth = NULL;
  195|  2.09M|    fstr.str = str;
  196|  2.09M|    fstr.len = len;
  197|       |
  198|  2.09M|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|  2.09M|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2.09M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (198:9): [True: 0, False: 2.09M]
  ------------------
  199|       |        /* Maybe this should be raised in do_engine_lock_init() */
  200|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  201|      0|        return NULL;
  202|      0|    }
  203|       |
  204|  2.09M|    if (!CRYPTO_THREAD_read_lock(global_engine_lock))
  ------------------
  |  Branch (204:9): [True: 0, False: 2.09M]
  ------------------
  205|      0|        return NULL;
  206|  2.09M|    engine_table_doall(pkey_asn1_meth_table, look_str_cb, &fstr);
  207|       |    /* If found obtain a structural reference to engine */
  208|  2.09M|    if (fstr.e != NULL) {
  ------------------
  |  Branch (208:9): [True: 0, False: 2.09M]
  ------------------
  209|      0|        int ref;
  210|       |
  211|      0|        if (!CRYPTO_UP_REF(&fstr.e->struct_ref, &ref)) {
  ------------------
  |  Branch (211:13): [True: 0, False: 0]
  ------------------
  212|      0|            CRYPTO_THREAD_unlock(global_engine_lock);
  213|      0|            ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  214|      0|            return NULL;
  215|      0|        }
  216|      0|        ENGINE_REF_PRINT(fstr.e, 0, 1);
  ------------------
  |  |   29|      0|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      0|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      0|        ((isfunct)                                        \
  |  |   33|      0|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      0|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      0|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      0|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
  217|      0|    }
  218|  2.09M|    *pe = fstr.e;
  219|  2.09M|    CRYPTO_THREAD_unlock(global_engine_lock);
  220|  2.09M|    return fstr.ameth;
  221|  2.09M|}

ENGINE_register_ciphers:
   28|      2|{
   29|      2|    if (e->ciphers) {
  ------------------
  |  Branch (29:9): [True: 0, False: 2]
  ------------------
   30|      0|        const int *nids;
   31|      0|        int num_nids = e->ciphers(e, NULL, &nids, 0);
   32|      0|        if (num_nids > 0)
  ------------------
  |  Branch (32:13): [True: 0, False: 0]
  ------------------
   33|      0|            return engine_table_register(&cipher_table,
   34|      0|                engine_unregister_all_ciphers, e,
   35|      0|                nids, num_nids, 0);
   36|      0|    }
   37|      2|    return 1;
   38|      2|}
ENGINE_set_default_ciphers:
   49|      2|{
   50|      2|    if (e->ciphers) {
  ------------------
  |  Branch (50:9): [True: 0, False: 2]
  ------------------
   51|      0|        const int *nids;
   52|      0|        int num_nids = e->ciphers(e, NULL, &nids, 0);
   53|      0|        if (num_nids > 0)
  ------------------
  |  Branch (53:13): [True: 0, False: 0]
  ------------------
   54|      0|            return engine_table_register(&cipher_table,
   55|      0|                engine_unregister_all_ciphers, e,
   56|      0|                nids, num_nids, 1);
   57|      0|    }
   58|      2|    return 1;
   59|      2|}
ENGINE_get_cipher_engine:
   67|  68.9k|{
   68|  68.9k|    return ossl_engine_table_select(&cipher_table, nid,
   69|  68.9k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   70|  68.9k|}

ENGINE_register_DH:
   29|      2|{
   30|      2|    if (e->dh_meth)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&dh_table,
   32|      0|            engine_unregister_all_DH, e, &dummy_nid,
   33|      0|            1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_DH:
   46|      2|{
   47|      2|    if (e->dh_meth)
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      0|        return engine_table_register(&dh_table,
   49|      0|            engine_unregister_all_DH, e, &dummy_nid,
   50|      0|            1, 1);
   51|      2|    return 1;
   52|      2|}
ENGINE_get_default_DH:
   60|     86|{
   61|     86|    return ossl_engine_table_select(&dh_table, dummy_nid,
   62|     86|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   63|     86|}

ENGINE_register_digests:
   28|      2|{
   29|      2|    if (e->digests) {
  ------------------
  |  Branch (29:9): [True: 0, False: 2]
  ------------------
   30|      0|        const int *nids;
   31|      0|        int num_nids = e->digests(e, NULL, &nids, 0);
   32|      0|        if (num_nids > 0)
  ------------------
  |  Branch (32:13): [True: 0, False: 0]
  ------------------
   33|      0|            return engine_table_register(&digest_table,
   34|      0|                engine_unregister_all_digests, e,
   35|      0|                nids, num_nids, 0);
   36|      0|    }
   37|      2|    return 1;
   38|      2|}
ENGINE_set_default_digests:
   49|      2|{
   50|      2|    if (e->digests) {
  ------------------
  |  Branch (50:9): [True: 0, False: 2]
  ------------------
   51|      0|        const int *nids;
   52|      0|        int num_nids = e->digests(e, NULL, &nids, 0);
   53|      0|        if (num_nids > 0)
  ------------------
  |  Branch (53:13): [True: 0, False: 0]
  ------------------
   54|      0|            return engine_table_register(&digest_table,
   55|      0|                engine_unregister_all_digests, e,
   56|      0|                nids, num_nids, 1);
   57|      0|    }
   58|      2|    return 1;
   59|      2|}
ENGINE_get_digest_engine:
   67|   833k|{
   68|   833k|    return ossl_engine_table_select(&digest_table, nid,
   69|   833k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   70|   833k|}

ENGINE_register_DSA:
   29|      2|{
   30|      2|    if (e->dsa_meth)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&dsa_table,
   32|      0|            engine_unregister_all_DSA, e, &dummy_nid,
   33|      0|            1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_DSA:
   46|      2|{
   47|      2|    if (e->dsa_meth)
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      0|        return engine_table_register(&dsa_table,
   49|      0|            engine_unregister_all_DSA, e, &dummy_nid,
   50|      0|            1, 1);
   51|      2|    return 1;
   52|      2|}

ENGINE_register_EC:
   29|      2|{
   30|      2|    if (e->ec_meth != NULL)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&dh_table,
   32|      0|            engine_unregister_all_EC, e, &dummy_nid,
   33|      0|            1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_EC:
   46|      2|{
   47|      2|    if (e->ec_meth != NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      0|        return engine_table_register(&dh_table,
   49|      0|            engine_unregister_all_EC, e, &dummy_nid,
   50|      0|            1, 1);
   51|      2|    return 1;
   52|      2|}
ENGINE_get_default_EC:
   60|   120k|{
   61|   120k|    return ossl_engine_table_select(&dh_table, dummy_nid,
   62|   120k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   63|   120k|}

ENGINE_register_pkey_meths:
   29|      2|{
   30|      2|    if (e->pkey_meths) {
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        const int *nids;
   32|      0|        int num_nids = e->pkey_meths(e, NULL, &nids, 0);
   33|      0|        if (num_nids > 0)
  ------------------
  |  Branch (33:13): [True: 0, False: 0]
  ------------------
   34|      0|            return engine_table_register(&pkey_meth_table,
   35|      0|                engine_unregister_all_pkey_meths, e,
   36|      0|                nids, num_nids, 0);
   37|      0|    }
   38|      2|    return 1;
   39|      2|}
ENGINE_set_default_pkey_meths:
   50|      2|{
   51|      2|    if (e->pkey_meths) {
  ------------------
  |  Branch (51:9): [True: 0, False: 2]
  ------------------
   52|      0|        const int *nids;
   53|      0|        int num_nids = e->pkey_meths(e, NULL, &nids, 0);
   54|      0|        if (num_nids > 0)
  ------------------
  |  Branch (54:13): [True: 0, False: 0]
  ------------------
   55|      0|            return engine_table_register(&pkey_meth_table,
   56|      0|                engine_unregister_all_pkey_meths, e,
   57|      0|                nids, num_nids, 1);
   58|      0|    }
   59|      2|    return 1;
   60|      2|}
ENGINE_get_pkey_meth_engine:
   68|   509k|{
   69|   509k|    return ossl_engine_table_select(&pkey_meth_table, nid,
   70|   509k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   71|   509k|}
engine_pkey_meths_free:
  104|    835|{
  105|    835|    int i;
  106|    835|    EVP_PKEY_METHOD *pkm;
  107|    835|    if (e->pkey_meths) {
  ------------------
  |  Branch (107:9): [True: 0, False: 835]
  ------------------
  108|      0|        const int *pknids;
  109|      0|        int npknids;
  110|      0|        npknids = e->pkey_meths(e, NULL, &pknids, 0);
  111|      0|        for (i = 0; i < npknids; i++) {
  ------------------
  |  Branch (111:21): [True: 0, False: 0]
  ------------------
  112|      0|            if (e->pkey_meths(e, &pkm, NULL, pknids[i])) {
  ------------------
  |  Branch (112:17): [True: 0, False: 0]
  ------------------
  113|      0|                EVP_PKEY_meth_free(pkm);
  114|      0|            }
  115|      0|        }
  116|      0|    }
  117|    835|}

ENGINE_register_RAND:
   29|      2|{
   30|      2|    if (e->rand_meth)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&rand_table,
   32|      0|            engine_unregister_all_RAND, e,
   33|      0|            &dummy_nid, 1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_RAND:
   46|      2|{
   47|      2|    if (e->rand_meth)
  ------------------
  |  Branch (47:9): [True: 2, False: 0]
  ------------------
   48|      2|        return engine_table_register(&rand_table,
   49|      2|            engine_unregister_all_RAND, e,
   50|      2|            &dummy_nid, 1, 1);
   51|      0|    return 1;
   52|      2|}
ENGINE_get_default_RAND:
   60|      1|{
   61|      1|    return ossl_engine_table_select(&rand_table, dummy_nid,
   62|      1|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   63|      1|}
ENGINE_set_RAND:
   73|      1|{
   74|      1|    e->rand_meth = rand_meth;
   75|      1|    return 1;
   76|      1|}
tb_rand.c:engine_unregister_all_RAND:
   24|      1|{
   25|      1|    engine_table_cleanup(&rand_table);
   26|      1|}

ENGINE_register_RSA:
   29|      2|{
   30|      2|    if (e->rsa_meth)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&rsa_table,
   32|      0|            engine_unregister_all_RSA, e, &dummy_nid,
   33|      0|            1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_RSA:
   46|      2|{
   47|      2|    if (e->rsa_meth)
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      0|        return engine_table_register(&rsa_table,
   49|      0|            engine_unregister_all_RSA, e, &dummy_nid,
   50|      0|            1, 1);
   51|      2|    return 1;
   52|      2|}
ENGINE_get_default_RSA:
   60|   316k|{
   61|   316k|    return ossl_engine_table_select(&rsa_table, dummy_nid,
   62|   316k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   63|   316k|}

OSSL_ERR_STATE_free:
  201|      1|{
  202|      1|    int i;
  203|       |
  204|      1|    if (state == NULL)
  ------------------
  |  Branch (204:9): [True: 0, False: 1]
  ------------------
  205|      0|        return;
  206|     17|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   57|     17|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (206:17): [True: 16, False: 1]
  ------------------
  207|     16|        err_clear(state, i, 1);
  208|     16|    }
  209|      1|    CRYPTO_free(state, OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                  CRYPTO_free(state, OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
  210|      1|}
err_cleanup:
  232|      1|{
  233|      1|    CRYPTO_THREAD_lock_free(err_string_lock);
  234|      1|    err_string_lock = NULL;
  235|      1|#ifndef OPENSSL_NO_ERR
  236|      1|    lh_ERR_STRING_DATA_free(int_error_hash);
  ------------------
  |  |  378|      1|#define lh_ERR_STRING_DATA_free(lh) OPENSSL_LH_free(ossl_check_ERR_STRING_DATA_lh_type(lh))
  ------------------
  237|       |    int_error_hash = NULL;
  238|      1|#endif
  239|      1|}
ossl_err_load_ERR_strings:
  269|     37|{
  270|     37|#ifndef OPENSSL_NO_ERR
  271|     37|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|     37|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (271:9): [True: 0, False: 37]
  ------------------
  272|      0|        return 0;
  273|       |
  274|     37|    err_load_strings(ERR_str_libraries);
  275|     37|    err_load_strings(ERR_str_reasons);
  276|     37|#endif
  277|     37|    return 1;
  278|     37|}
ERR_load_strings_const:
  294|     36|{
  295|     36|#ifndef OPENSSL_NO_ERR
  296|     36|    if (ossl_err_load_ERR_strings() == 0)
  ------------------
  |  Branch (296:9): [True: 0, False: 36]
  ------------------
  297|      0|        return 0;
  298|     36|    err_load_strings(str);
  299|     36|#endif
  300|       |
  301|     36|    return 1;
  302|     36|}
ERR_clear_error:
  332|  4.51k|{
  333|  4.51k|    int i;
  334|  4.51k|    ERR_STATE *es;
  335|       |
  336|  4.51k|    es = ossl_err_get_state_int();
  337|  4.51k|    if (es == NULL)
  ------------------
  |  Branch (337:9): [True: 0, False: 4.51k]
  ------------------
  338|      0|        return;
  339|       |
  340|  76.7k|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   57|  76.7k|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (340:17): [True: 72.2k, False: 4.51k]
  ------------------
  341|  72.2k|        err_clear(es, i, 0);
  342|  72.2k|    }
  343|  4.51k|    es->top = es->bottom = 0;
  344|  4.51k|}
ERR_get_error:
  347|    571|{
  348|    571|    return get_error_values(EV_POP, NULL, NULL, NULL, NULL, NULL);
  349|    571|}
ERR_peek_error:
  372|  3.50k|{
  373|  3.50k|    return get_error_values(EV_PEEK, NULL, NULL, NULL, NULL, NULL);
  374|  3.50k|}
ERR_peek_last_error:
  407|  1.31M|{
  408|  1.31M|    return get_error_values(EV_PEEK_LAST, NULL, NULL, NULL, NULL, NULL);
  409|  1.31M|}
ossl_err_string_int:
  520|    650|{
  521|    650|    char lsbuf[64], rsbuf[256];
  522|    650|    const char *ls, *rs = NULL;
  523|    650|    unsigned long l, r;
  524|       |
  525|    650|    if (len == 0)
  ------------------
  |  Branch (525:9): [True: 0, False: 650]
  ------------------
  526|      0|        return;
  527|       |
  528|    650|    l = ERR_GET_LIB(e);
  529|    650|    ls = ERR_lib_error_string(e);
  530|    650|    if (ls == NULL) {
  ------------------
  |  Branch (530:9): [True: 2, False: 648]
  ------------------
  531|      2|        BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
  532|      2|        ls = lsbuf;
  533|      2|    }
  534|       |
  535|       |    /*
  536|       |     * ERR_reason_error_string() can't safely return system error strings,
  537|       |     * since it would call openssl_strerror_r(), which needs a buffer for
  538|       |     * thread safety.  So for system errors, we call openssl_strerror_r()
  539|       |     * directly instead.
  540|       |     */
  541|    650|    r = ERR_GET_REASON(e);
  542|    650|#ifndef OPENSSL_NO_ERR
  543|    650|    if (ERR_SYSTEM_ERROR(e)) {
  ------------------
  |  |  241|    650|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|    650|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 14, False: 636]
  |  |  ------------------
  ------------------
  544|     14|        if (openssl_strerror_r(r, rsbuf, sizeof(rsbuf)))
  ------------------
  |  Branch (544:13): [True: 14, False: 0]
  ------------------
  545|     14|            rs = rsbuf;
  546|    636|    } else {
  547|    636|        rs = ERR_reason_error_string(e);
  548|    636|    }
  549|    650|#endif
  550|    650|    if (rs == NULL) {
  ------------------
  |  Branch (550:9): [True: 13, False: 637]
  ------------------
  551|     13|        BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)",
  552|     13|            r & ~(ERR_RFLAGS_MASK << ERR_RFLAGS_OFFSET));
  ------------------
  |  |  231|     13|#define ERR_RFLAGS_MASK 0x1F
  ------------------
                          r & ~(ERR_RFLAGS_MASK << ERR_RFLAGS_OFFSET));
  ------------------
  |  |  230|     13|#define ERR_RFLAGS_OFFSET 18L
  ------------------
  553|     13|        rs = rsbuf;
  554|     13|    }
  555|       |
  556|    650|    BIO_snprintf(buf, len, "error:%08lX:%s:%s:%s", e, ls, func, rs);
  557|    650|    if (strlen(buf) == len - 1) {
  ------------------
  |  Branch (557:9): [True: 0, False: 650]
  ------------------
  558|       |        /* Didn't fit; use a minimal format. */
  559|      0|        BIO_snprintf(buf, len, "err:%lx:%lx:%lx:%lx", e, l, 0L, r);
  560|      0|    }
  561|    650|}
ERR_error_string_n:
  564|    650|{
  565|    650|    ossl_err_string_int(e, "", buf, len);
  566|    650|}
ERR_lib_error_string:
  583|    650|{
  584|    650|#ifndef OPENSSL_NO_ERR
  585|    650|    ERR_STRING_DATA d, *p;
  586|    650|    unsigned long l;
  587|       |
  588|    650|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|    650|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 650, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (588:9): [True: 0, False: 650]
  ------------------
  589|      0|        return NULL;
  590|      0|    }
  591|       |
  592|    650|    l = ERR_GET_LIB(e);
  593|    650|    d.error = ERR_PACK(l, 0, 0);
  ------------------
  |  |  281|    650|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  229|    650|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  228|    650|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  232|    650|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  594|    650|    p = int_err_get_item(&d);
  595|    650|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (595:13): [True: 2, False: 648]
  ------------------
  596|       |#else
  597|       |    return NULL;
  598|       |#endif
  599|    650|}
ERR_reason_error_string:
  609|    672|{
  610|    672|#ifndef OPENSSL_NO_ERR
  611|    672|    ERR_STRING_DATA d, *p = NULL;
  612|    672|    unsigned long l, r;
  613|       |
  614|    672|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|    672|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 672, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (614:9): [True: 0, False: 672]
  ------------------
  615|      0|        return NULL;
  616|      0|    }
  617|       |
  618|       |    /*
  619|       |     * ERR_reason_error_string() can't safely return system error strings,
  620|       |     * since openssl_strerror_r() needs a buffer for thread safety, and we
  621|       |     * haven't got one that would serve any sensible purpose.
  622|       |     */
  623|    672|    if (ERR_SYSTEM_ERROR(e))
  ------------------
  |  |  241|    672|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|    672|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 672]
  |  |  ------------------
  ------------------
  624|      0|        return NULL;
  625|       |
  626|    672|    l = ERR_GET_LIB(e);
  627|    672|    r = ERR_GET_REASON(e);
  628|    672|    d.error = ERR_PACK(l, 0, r);
  ------------------
  |  |  281|    672|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  229|    672|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  228|    672|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  232|    672|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  629|    672|    p = int_err_get_item(&d);
  630|    672|    if (p == NULL) {
  ------------------
  |  Branch (630:9): [True: 49, False: 623]
  ------------------
  631|     49|        d.error = ERR_PACK(0, 0, r);
  ------------------
  |  |  281|     49|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  229|     49|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  228|     49|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  232|     49|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  632|     49|        p = int_err_get_item(&d);
  633|     49|    }
  634|    672|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (634:13): [True: 49, False: 623]
  ------------------
  635|       |#else
  636|       |    return NULL;
  637|       |#endif
  638|    672|}
ossl_err_get_state_int:
  666|  21.2M|{
  667|  21.2M|    ERR_STATE *state;
  668|  21.2M|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|  21.2M|#define get_last_sys_error() errno
  ------------------
  669|       |
  670|  21.2M|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|  21.2M|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (670:9): [True: 0, False: 21.2M]
  ------------------
  671|      0|        return NULL;
  672|       |
  673|  21.2M|    state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  674|  21.2M|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   25|  21.2M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  675|  21.2M|    if (state == (ERR_STATE *)-1)
  ------------------
  |  Branch (675:9): [True: 0, False: 21.2M]
  ------------------
  676|      0|        return NULL;
  677|       |
  678|  21.2M|    if (state == NULL) {
  ------------------
  |  Branch (678:9): [True: 1, False: 21.2M]
  ------------------
  679|      1|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (679:13): [True: 0, False: 1]
  ------------------
  680|      1|                CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)-1))
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  681|      0|            return NULL;
  682|       |
  683|      1|        state = OSSL_ERR_STATE_new();
  684|      1|        if (state == NULL) {
  ------------------
  |  Branch (684:13): [True: 0, False: 1]
  ------------------
  685|      0|            CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  686|      0|                CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   25|      0|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  687|      0|            return NULL;
  688|      0|        }
  689|       |
  690|      1|        if (!ossl_init_thread_start(NULL, NULL, err_delete_thread_state)
  ------------------
  |  Branch (690:13): [True: 0, False: 1]
  ------------------
  691|      1|            || !CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (691:16): [True: 0, False: 1]
  ------------------
  692|      1|                CRYPTO_THREAD_NO_CONTEXT, state)) {
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  693|      0|            OSSL_ERR_STATE_free(state);
  694|      0|            CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  695|      0|                CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   25|      0|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  696|      0|            return NULL;
  697|      0|        }
  698|       |
  699|       |        /* Ignore failures from these */
  700|      1|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ------------------
  |  |  505|      1|#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
  ------------------
  701|      1|    }
  702|       |
  703|  21.2M|    set_sys_error(saveerrno);
  ------------------
  |  |   32|  21.2M|#define set_sys_error(e) errno = (e)
  ------------------
  704|  21.2M|    return state;
  705|  21.2M|}
err_shelve_state:
  719|      1|{
  720|      1|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|      1|#define get_last_sys_error() errno
  ------------------
  721|       |
  722|       |    /*
  723|       |     * Note, at present our only caller is OPENSSL_init_crypto(), indirectly
  724|       |     * via ossl_init_load_crypto_nodelete(), by which point the requested
  725|       |     * "base" initialization has already been performed, so the below call is a
  726|       |     * NOOP, that re-enters OPENSSL_init_crypto() only to quickly return.
  727|       |     *
  728|       |     * If are no other valid callers of this function, the call below can be
  729|       |     * removed, avoiding the re-entry into OPENSSL_init_crypto().  If there are
  730|       |     * potential uses that are not from inside OPENSSL_init_crypto(), then this
  731|       |     * call is needed, but some care is required to make sure that the re-entry
  732|       |     * remains a NOOP.
  733|       |     */
  734|      1|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      1|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (734:9): [True: 0, False: 1]
  ------------------
  735|      0|        return 0;
  736|       |
  737|      1|    *state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  738|      1|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  739|      1|    if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (739:9): [True: 0, False: 1]
  ------------------
  740|      1|            CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)-1))
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  741|      0|        return 0;
  742|       |
  743|      1|    set_sys_error(saveerrno);
  ------------------
  |  |   32|      1|#define set_sys_error(e) errno = (e)
  ------------------
  744|      1|    return 1;
  745|      1|}
err_unshelve_state:
  752|      1|{
  753|      1|    if (state != (void *)-1)
  ------------------
  |  Branch (753:9): [True: 1, False: 0]
  ------------------
  754|      1|        CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  755|      1|            CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)state);
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  756|      1|}
ERR_get_next_error_library:
  759|  1.84k|{
  760|  1.84k|    int ret;
  761|       |
  762|  1.84k|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|  1.84k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1.84k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (762:9): [True: 0, False: 1.84k]
  ------------------
  763|      0|        return 0;
  764|       |
  765|  1.84k|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (765:9): [True: 0, False: 1.84k]
  ------------------
  766|      0|        return 0;
  767|  1.84k|    ret = int_err_library_number++;
  768|  1.84k|    CRYPTO_THREAD_unlock(err_string_lock);
  769|  1.84k|    return ret;
  770|  1.84k|}
ERR_add_error_data:
  807|  1.30k|{
  808|  1.30k|    va_list args;
  809|  1.30k|    va_start(args, num);
  810|  1.30k|    ERR_add_error_vdata(num, args);
  811|       |    va_end(args);
  812|  1.30k|}
ERR_add_error_vdata:
  815|  1.30k|{
  816|  1.30k|    int i;
  817|  1.30k|    size_t len, size;
  818|  1.30k|    int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   50|  1.30k|#define ERR_TXT_MALLOCED 0x01
  ------------------
                  int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   51|  1.30k|#define ERR_TXT_STRING 0x02
  ------------------
  819|  1.30k|    char *str, *arg;
  820|  1.30k|    ERR_STATE *es;
  821|       |
  822|       |    /* Get the current error data; if an allocated string get it. */
  823|  1.30k|    es = ossl_err_get_state_int();
  824|  1.30k|    if (es == NULL)
  ------------------
  |  Branch (824:9): [True: 0, False: 1.30k]
  ------------------
  825|      0|        return;
  826|  1.30k|    i = es->top;
  827|       |
  828|       |    /*
  829|       |     * If err_data is allocated already, reuse the space.
  830|       |     * Otherwise, allocate a small new buffer.
  831|       |     */
  832|  1.30k|    if ((es->err_data_flags[i] & flags) == flags
  ------------------
  |  Branch (832:9): [True: 0, False: 1.30k]
  ------------------
  833|      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__)
  ------------------
  834|      0|        str = es->err_data[i];
  835|      0|        size = es->err_data_size[i];
  836|       |
  837|       |        /*
  838|       |         * To protect the string we just grabbed from tampering by other
  839|       |         * functions we may call, or to protect them from freeing a pointer
  840|       |         * that may no longer be valid at that point, we clear away the
  841|       |         * data pointer and the flags.  We will set them again at the end
  842|       |         * of this function.
  843|       |         */
  844|      0|        es->err_data[i] = NULL;
  845|      0|        es->err_data_flags[i] = 0;
  846|  1.30k|    } else if ((str = OPENSSL_malloc(size = 81)) == NULL) {
  ------------------
  |  |  106|  1.30k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (846:16): [True: 0, False: 1.30k]
  ------------------
  847|      0|        return;
  848|  1.30k|    } else {
  849|  1.30k|        str[0] = '\0';
  850|  1.30k|    }
  851|  1.30k|    len = strlen(str);
  852|       |
  853|  3.92k|    while (--num >= 0) {
  ------------------
  |  Branch (853:12): [True: 2.61k, False: 1.30k]
  ------------------
  854|  2.61k|        arg = va_arg(args, char *);
  855|  2.61k|        if (arg == NULL)
  ------------------
  |  Branch (855:13): [True: 0, False: 2.61k]
  ------------------
  856|      0|            arg = "<NULL>";
  857|  2.61k|        len += strlen(arg);
  858|  2.61k|        if (len >= size) {
  ------------------
  |  Branch (858:13): [True: 0, False: 2.61k]
  ------------------
  859|      0|            char *p;
  860|       |
  861|      0|            size = len + 20;
  862|      0|            p = OPENSSL_realloc(str, size);
  ------------------
  |  |  120|      0|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  863|      0|            if (p == NULL) {
  ------------------
  |  Branch (863:17): [True: 0, False: 0]
  ------------------
  864|      0|                OPENSSL_free(str);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  865|      0|                return;
  866|      0|            }
  867|      0|            str = p;
  868|      0|        }
  869|  2.61k|        OPENSSL_strlcat(str, arg, size);
  870|  2.61k|    }
  871|  1.30k|    if (!err_set_error_data_int(str, size, flags, 0))
  ------------------
  |  Branch (871:9): [True: 0, False: 1.30k]
  ------------------
  872|      0|        OPENSSL_free(str);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  873|  1.30k|}
err.c:do_err_strings_init:
  213|      1|{
  214|      1|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      1|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (214:9): [True: 0, False: 1]
  ------------------
  215|      0|        return 0;
  216|      1|    err_string_lock = CRYPTO_THREAD_lock_new();
  217|      1|    if (err_string_lock == NULL)
  ------------------
  |  Branch (217:9): [True: 0, False: 1]
  ------------------
  218|      0|        return 0;
  219|      1|#ifndef OPENSSL_NO_ERR
  220|      1|    int_error_hash = lh_ERR_STRING_DATA_new(err_string_data_hash,
  ------------------
  |  |  377|      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))
  ------------------
  221|      1|        err_string_data_cmp);
  222|      1|    if (int_error_hash == NULL) {
  ------------------
  |  Branch (222:9): [True: 0, False: 1]
  ------------------
  223|      0|        CRYPTO_THREAD_lock_free(err_string_lock);
  224|      0|        err_string_lock = NULL;
  225|      0|        return 0;
  226|      0|    }
  227|      1|#endif
  228|      1|    return 1;
  229|      1|}
err.c:err_string_data_hash:
  171|  6.22k|{
  172|  6.22k|    unsigned long ret, l;
  173|       |
  174|  6.22k|    l = a->error;
  175|  6.22k|    ret = l ^ ERR_GET_LIB(l);
  176|  6.22k|    return (ret ^ ret % 19 * 13);
  177|  6.22k|}
err.c:err_string_data_cmp:
  181|  4.61k|{
  182|  4.61k|    if (a->error == b->error)
  ------------------
  |  Branch (182:9): [True: 4.22k, False: 390]
  ------------------
  183|  4.22k|        return 0;
  184|    390|    return a->error > b->error ? 1 : -1;
  ------------------
  |  Branch (184:12): [True: 288, False: 102]
  ------------------
  185|  4.61k|}
err.c:err_load_strings:
  257|    110|{
  258|    110|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (258:9): [True: 0, False: 110]
  ------------------
  259|      0|        return 0;
  260|  4.96k|    for (; str->error; str++)
  ------------------
  |  Branch (260:12): [True: 4.85k, False: 110]
  ------------------
  261|  4.85k|        (void)lh_ERR_STRING_DATA_insert(int_error_hash,
  ------------------
  |  |  380|  4.96k|#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)))
  ------------------
  262|    110|            (ERR_STRING_DATA *)str);
  263|    110|    CRYPTO_THREAD_unlock(err_string_lock);
  264|    110|    return 1;
  265|    110|}
err.c:get_error_values:
  445|  1.31M|{
  446|  1.31M|    int i = 0;
  447|  1.31M|    ERR_STATE *es;
  448|  1.31M|    unsigned long ret;
  449|       |
  450|  1.31M|    es = ossl_err_get_state_int();
  451|  1.31M|    if (es == NULL)
  ------------------
  |  Branch (451:9): [True: 0, False: 1.31M]
  ------------------
  452|      0|        return 0;
  453|       |
  454|       |    /*
  455|       |     * Clear anything that should have been cleared earlier. We do this
  456|       |     * here because this doesn't have constant-time issues.
  457|       |     */
  458|  1.31M|    while (es->bottom != es->top) {
  ------------------
  |  Branch (458:12): [True: 1.08M, False: 232k]
  ------------------
  459|  1.08M|        if (es->err_flags[es->top] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   55|  1.08M|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (459:13): [True: 0, False: 1.08M]
  ------------------
  460|      0|            err_clear(es, es->top, 0);
  461|      0|            es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   57|      0|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (461:23): [True: 0, False: 0]
  ------------------
  462|      0|            continue;
  463|      0|        }
  464|  1.08M|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   57|  1.08M|#define ERR_NUM_ERRORS 16
  ------------------
  465|  1.08M|        if (es->err_flags[i] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   55|  1.08M|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (465:13): [True: 0, False: 1.08M]
  ------------------
  466|      0|            es->bottom = i;
  467|      0|            err_clear(es, es->bottom, 0);
  468|      0|            continue;
  469|      0|        }
  470|  1.08M|        break;
  471|  1.08M|    }
  472|       |
  473|       |    /* If everything has been cleared, the stack is empty. */
  474|  1.31M|    if (es->bottom == es->top)
  ------------------
  |  Branch (474:9): [True: 232k, False: 1.08M]
  ------------------
  475|   232k|        return 0;
  476|       |
  477|       |    /* Which error, the top of stack (latest one) or the first one? */
  478|  1.08M|    if (g == EV_PEEK_LAST)
  ------------------
  |  Branch (478:9): [True: 1.08M, False: 3.76k]
  ------------------
  479|  1.08M|        i = es->top;
  480|  3.76k|    else
  481|  3.76k|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   57|  3.76k|#define ERR_NUM_ERRORS 16
  ------------------
  482|       |
  483|  1.08M|    ret = es->err_buffer[i];
  484|  1.08M|    if (g == EV_POP) {
  ------------------
  |  Branch (484:9): [True: 569, False: 1.08M]
  ------------------
  485|    569|        es->bottom = i;
  486|    569|        es->err_buffer[i] = 0;
  487|    569|    }
  488|       |
  489|  1.08M|    if (file != NULL) {
  ------------------
  |  Branch (489:9): [True: 0, False: 1.08M]
  ------------------
  490|      0|        *file = es->err_file[i];
  491|      0|        if (*file == NULL)
  ------------------
  |  Branch (491:13): [True: 0, False: 0]
  ------------------
  492|      0|            *file = "";
  493|      0|    }
  494|  1.08M|    if (line != NULL)
  ------------------
  |  Branch (494:9): [True: 0, False: 1.08M]
  ------------------
  495|      0|        *line = es->err_line[i];
  496|  1.08M|    if (func != NULL) {
  ------------------
  |  Branch (496:9): [True: 0, False: 1.08M]
  ------------------
  497|      0|        *func = es->err_func[i];
  498|      0|        if (*func == NULL)
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  ------------------
  499|      0|            *func = "";
  500|      0|    }
  501|  1.08M|    if (flags != NULL)
  ------------------
  |  Branch (501:9): [True: 0, False: 1.08M]
  ------------------
  502|      0|        *flags = es->err_data_flags[i];
  503|  1.08M|    if (data == NULL) {
  ------------------
  |  Branch (503:9): [True: 1.08M, False: 0]
  ------------------
  504|  1.08M|        if (g == EV_POP) {
  ------------------
  |  Branch (504:13): [True: 569, False: 1.08M]
  ------------------
  505|    569|            err_clear_data(es, i, 0);
  506|    569|        }
  507|  1.08M|    } else {
  508|      0|        *data = es->err_data[i];
  509|      0|        if (*data == NULL) {
  ------------------
  |  Branch (509:13): [True: 0, False: 0]
  ------------------
  510|      0|            *data = "";
  511|      0|            if (flags != NULL)
  ------------------
  |  Branch (511:17): [True: 0, False: 0]
  ------------------
  512|      0|                *flags = 0;
  513|      0|        }
  514|      0|    }
  515|  1.08M|    return ret;
  516|  1.31M|}
err.c:int_err_get_item:
  188|  1.37k|{
  189|  1.37k|    ERR_STRING_DATA *p = NULL;
  190|       |
  191|  1.37k|    if (!CRYPTO_THREAD_read_lock(err_string_lock))
  ------------------
  |  Branch (191:9): [True: 0, False: 1.37k]
  ------------------
  192|      0|        return NULL;
  193|  1.37k|    p = lh_ERR_STRING_DATA_retrieve(int_error_hash, d);
  ------------------
  |  |  382|  1.37k|#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)))
  ------------------
  194|  1.37k|    CRYPTO_THREAD_unlock(err_string_lock);
  195|       |
  196|  1.37k|    return p;
  197|  1.37k|}
err.c:err_delete_thread_state:
  641|      1|{
  642|      1|    ERR_STATE *state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  643|      1|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  644|       |
  645|      1|    if (state == NULL)
  ------------------
  |  Branch (645:9): [True: 0, False: 1]
  ------------------
  646|      0|        return;
  647|       |
  648|      1|    CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  649|      1|        CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  650|      1|    OSSL_ERR_STATE_free(state);
  651|      1|}
err.c:err_set_error_data_int:
  774|  1.30k|{
  775|  1.30k|    ERR_STATE *es;
  776|       |
  777|  1.30k|    es = ossl_err_get_state_int();
  778|  1.30k|    if (es == NULL)
  ------------------
  |  Branch (778:9): [True: 0, False: 1.30k]
  ------------------
  779|      0|        return 0;
  780|       |
  781|  1.30k|    err_clear_data(es, es->top, deallocate);
  782|  1.30k|    err_set_data(es, es->top, data, size, flags);
  783|       |
  784|  1.30k|    return 1;
  785|  1.30k|}

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

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

err.c:err_clear:
   86|  72.2k|{
   87|  72.2k|    err_clear_data(es, i, (deall));
   88|  72.2k|    es->err_marks[i] = 0;
   89|  72.2k|    es->err_flags[i] = 0;
   90|  72.2k|    es->err_buffer[i] = 0;
   91|  72.2k|    es->err_line[i] = -1;
   92|  72.2k|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  131|  72.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|  72.2k|    es->err_file[i] = NULL;
   94|  72.2k|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  131|  72.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   95|       |    es->err_func[i] = NULL;
   96|  72.2k|}
err.c:err_clear_data:
   22|  74.1k|{
   23|  74.1k|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   50|  74.1k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (23:9): [True: 74.1k, False: 2]
  ------------------
   24|  74.1k|        if (deall) {
  ------------------
  |  Branch (24:13): [True: 16, False: 74.1k]
  ------------------
   25|     16|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  131|     16|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|     16|            es->err_data[i] = NULL;
   27|     16|            es->err_data_size[i] = 0;
   28|     16|            es->err_data_flags[i] = 0;
   29|  74.1k|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (29:20): [True: 74.1k, False: 0]
  ------------------
   30|  74.1k|            es->err_data[i][0] = '\0';
   31|  74.1k|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   50|  74.1k|#define ERR_TXT_MALLOCED 0x01
  ------------------
   32|  74.1k|        }
   33|  74.1k|    } else {
   34|       |        es->err_data[i] = NULL;
   35|      2|        es->err_data_size[i] = 0;
   36|      2|        es->err_data_flags[i] = 0;
   37|      2|    }
   38|  74.1k|}
err.c:err_set_data:
   77|  1.30k|{
   78|  1.30k|    if ((es->err_data_flags[i] & ERR_TXT_MALLOCED) != 0)
  ------------------
  |  |   50|  1.30k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (78:9): [True: 1.30k, False: 0]
  ------------------
   79|  1.30k|        OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  131|  1.30k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|  1.30k|    es->err_data[i] = data;
   81|  1.30k|    es->err_data_size[i] = datasz;
   82|  1.30k|    es->err_data_flags[i] = flags;
   83|  1.30k|}
err_blocks.c:err_get_slot:
   15|  2.18M|{
   16|  2.18M|    es->top = (es->top + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   57|  2.18M|#define ERR_NUM_ERRORS 16
  ------------------
   17|  2.18M|    if (es->top == es->bottom)
  ------------------
  |  Branch (17:9): [True: 3.39k, False: 2.17M]
  ------------------
   18|  3.39k|        es->bottom = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   57|  3.39k|#define ERR_NUM_ERRORS 16
  ------------------
   19|  2.18M|}
err_blocks.c:err_clear:
   86|  2.18M|{
   87|  2.18M|    err_clear_data(es, i, (deall));
   88|  2.18M|    es->err_marks[i] = 0;
   89|  2.18M|    es->err_flags[i] = 0;
   90|  2.18M|    es->err_buffer[i] = 0;
   91|  2.18M|    es->err_line[i] = -1;
   92|  2.18M|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  131|  2.18M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|  2.18M|    es->err_file[i] = NULL;
   94|  2.18M|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  131|  2.18M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   95|       |    es->err_func[i] = NULL;
   96|  2.18M|}
err_blocks.c:err_set_debug:
   51|  2.18M|{
   52|       |    /*
   53|       |     * We dup the file and fn strings because they may be provider owned. If the
   54|       |     * provider gets unloaded, they may not be valid anymore.
   55|       |     */
   56|  2.18M|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  131|  2.18M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   57|  2.18M|    if (file == NULL || file[0] == '\0')
  ------------------
  |  Branch (57:9): [True: 0, False: 2.18M]
  |  Branch (57:25): [True: 0, False: 2.18M]
  ------------------
   58|      0|        es->err_file[i] = NULL;
   59|  2.18M|    else if ((es->err_file[i] = CRYPTO_malloc(strlen(file) + 1,
  ------------------
  |  Branch (59:14): [True: 2.18M, False: 0]
  ------------------
   60|  2.18M|                  NULL, 0))
   61|  2.18M|        != NULL)
   62|       |        /* We cannot use OPENSSL_strdup due to possible recursion */
   63|  2.18M|        strcpy(es->err_file[i], file);
   64|       |
   65|  2.18M|    es->err_line[i] = line;
   66|  2.18M|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  131|  2.18M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|  2.18M|    if (fn == NULL || fn[0] == '\0')
  ------------------
  |  Branch (67:9): [True: 1.47k, False: 2.18M]
  |  Branch (67:23): [True: 0, False: 2.18M]
  ------------------
   68|  1.47k|        es->err_func[i] = NULL;
   69|  2.18M|    else if ((es->err_func[i] = CRYPTO_malloc(strlen(fn) + 1,
  ------------------
  |  Branch (69:14): [True: 2.18M, False: 0]
  ------------------
   70|  2.18M|                  NULL, 0))
   71|  2.18M|        != NULL)
   72|  2.18M|        strcpy(es->err_func[i], fn);
   73|  2.18M|}
err_blocks.c:err_clear_data:
   22|  4.36M|{
   23|  4.36M|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   50|  4.36M|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (23:9): [True: 4.27M, False: 85.7k]
  ------------------
   24|  4.27M|        if (deall) {
  ------------------
  |  Branch (24:13): [True: 0, False: 4.27M]
  ------------------
   25|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|      0|            es->err_data[i] = NULL;
   27|      0|            es->err_data_size[i] = 0;
   28|      0|            es->err_data_flags[i] = 0;
   29|  4.27M|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (29:20): [True: 4.27M, False: 0]
  ------------------
   30|  4.27M|            es->err_data[i][0] = '\0';
   31|  4.27M|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   50|  4.27M|#define ERR_TXT_MALLOCED 0x01
  ------------------
   32|  4.27M|        }
   33|  4.27M|    } else {
   34|       |        es->err_data[i] = NULL;
   35|  85.7k|        es->err_data_size[i] = 0;
   36|  85.7k|        es->err_data_flags[i] = 0;
   37|  85.7k|    }
   38|  4.36M|}
err_blocks.c:err_set_error:
   42|  2.18M|{
   43|  2.18M|    es->err_buffer[i] = lib == ERR_LIB_SYS
  ------------------
  |  |   74|  2.18M|#define ERR_LIB_SYS 2
  ------------------
  |  Branch (43:25): [True: 1.01k, False: 2.18M]
  ------------------
   44|  2.18M|        ? (unsigned int)(ERR_SYSTEM_FLAG | reason)
  ------------------
  |  |  220|  1.01k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  ------------------
   45|  2.18M|        : ERR_PACK(lib, 0, reason);
  ------------------
  |  |  281|  4.36M|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  229|  2.18M|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  228|  2.18M|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  232|  2.18M|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
   46|  2.18M|}
err_blocks.c:err_set_data:
   77|  85.6k|{
   78|  85.6k|    if ((es->err_data_flags[i] & ERR_TXT_MALLOCED) != 0)
  ------------------
  |  |   50|  85.6k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (78:9): [True: 0, False: 85.6k]
  ------------------
   79|      0|        OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|  85.6k|    es->err_data[i] = data;
   81|  85.6k|    es->err_data_size[i] = datasz;
   82|  85.6k|    es->err_data_flags[i] = flags;
   83|  85.6k|}
err_mark.c:err_clear:
   86|  2.17M|{
   87|  2.17M|    err_clear_data(es, i, (deall));
   88|  2.17M|    es->err_marks[i] = 0;
   89|  2.17M|    es->err_flags[i] = 0;
   90|  2.17M|    es->err_buffer[i] = 0;
   91|  2.17M|    es->err_line[i] = -1;
   92|  2.17M|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  131|  2.17M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|  2.17M|    es->err_file[i] = NULL;
   94|  2.17M|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  131|  2.17M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   95|       |    es->err_func[i] = NULL;
   96|  2.17M|}
err_mark.c:err_clear_data:
   22|  2.17M|{
   23|  2.17M|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   50|  2.17M|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (23:9): [True: 2.17M, False: 2]
  ------------------
   24|  2.17M|        if (deall) {
  ------------------
  |  Branch (24:13): [True: 0, False: 2.17M]
  ------------------
   25|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|      0|            es->err_data[i] = NULL;
   27|      0|            es->err_data_size[i] = 0;
   28|      0|            es->err_data_flags[i] = 0;
   29|  2.17M|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (29:20): [True: 2.17M, False: 0]
  ------------------
   30|  2.17M|            es->err_data[i][0] = '\0';
   31|  2.17M|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   50|  2.17M|#define ERR_TXT_MALLOCED 0x01
  ------------------
   32|  2.17M|        }
   33|  2.17M|    } else {
   34|       |        es->err_data[i] = NULL;
   35|      2|        es->err_data_size[i] = 0;
   36|      2|        es->err_data_flags[i] = 0;
   37|      2|    }
   38|  2.17M|}

ERR_set_mark:
   16|  6.68M|{
   17|  6.68M|    ERR_STATE *es;
   18|       |
   19|  6.68M|    es = ossl_err_get_state_int();
   20|  6.68M|    if (es == NULL)
  ------------------
  |  Branch (20:9): [True: 0, False: 6.68M]
  ------------------
   21|      0|        return 0;
   22|       |
   23|  6.68M|    if (es->bottom == es->top)
  ------------------
  |  Branch (23:9): [True: 3.25M, False: 3.43M]
  ------------------
   24|  3.25M|        return 0;
   25|  3.43M|    es->err_marks[es->top]++;
   26|  3.43M|    return 1;
   27|  6.68M|}
ERR_pop_to_mark:
   43|  4.49M|{
   44|  4.49M|    ERR_STATE *es;
   45|       |
   46|  4.49M|    es = ossl_err_get_state_int();
   47|  4.49M|    if (es == NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 4.49M]
  ------------------
   48|      0|        return 0;
   49|       |
   50|  6.66M|    while (es->bottom != es->top
  ------------------
  |  Branch (50:12): [True: 4.57M, False: 2.08M]
  ------------------
   51|  4.57M|        && es->err_marks[es->top] == 0) {
  ------------------
  |  Branch (51:12): [True: 2.17M, False: 2.40M]
  ------------------
   52|  2.17M|        err_clear(es, es->top, 0);
   53|  2.17M|        es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   57|    801|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (53:19): [True: 2.17M, False: 801]
  ------------------
   54|  2.17M|    }
   55|       |
   56|  4.49M|    if (es->bottom == es->top)
  ------------------
  |  Branch (56:9): [True: 2.08M, False: 2.40M]
  ------------------
   57|  2.08M|        return 0;
   58|  2.40M|    es->err_marks[es->top]--;
   59|  2.40M|    return 1;
   60|  4.49M|}
ERR_clear_last_mark:
   82|  2.19M|{
   83|  2.19M|    ERR_STATE *es;
   84|  2.19M|    int top;
   85|       |
   86|  2.19M|    es = ossl_err_get_state_int();
   87|  2.19M|    if (es == NULL)
  ------------------
  |  Branch (87:9): [True: 0, False: 2.19M]
  ------------------
   88|      0|        return 0;
   89|       |
   90|  2.19M|    top = es->top;
   91|  2.19M|    while (es->bottom != top
  ------------------
  |  Branch (91:12): [True: 1.02M, False: 1.16M]
  ------------------
   92|  1.02M|        && es->err_marks[top] == 0) {
  ------------------
  |  Branch (92:12): [True: 2.35k, False: 1.02M]
  ------------------
   93|  2.35k|        top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   57|     71|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (93:15): [True: 2.28k, False: 71]
  ------------------
   94|  2.35k|    }
   95|       |
   96|  2.19M|    if (es->bottom == top)
  ------------------
  |  Branch (96:9): [True: 1.16M, False: 1.02M]
  ------------------
   97|  1.16M|        return 0;
   98|  1.02M|    es->err_marks[top]--;
   99|  1.02M|    return 1;
  100|  2.19M|}

OSSL_ERR_STATE_new:
   22|      1|{
   23|       |    return CRYPTO_zalloc(sizeof(ERR_STATE), NULL, 0);
   24|      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());
  ------------------
  |  |  997|      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());
  ------------------
  |  | 1001|      1|#define EVP_des_ede_cfb EVP_des_ede_cfb64
  ------------------
   25|      1|    EVP_add_cipher(EVP_des_ede3_cfb());
  ------------------
  |  | 1003|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1030|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1184|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1192|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1040|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1047|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1054|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1061|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1069|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1085|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1100|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1121|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1131|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1141|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1153|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1161|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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());
  ------------------
  |  | 1169|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  705|      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");
  ------------------
  |  |  707|      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");
  ------------------
  |  |  707|      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);
  ------------------
  |  |  707|      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");
  ------------------
  |  |  707|      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");
  ------------------
  |  |  707|      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:
   45|   386k|{
   46|   386k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (46:9): [True: 386k, False: 0]
  ------------------
   47|   386k|        if (ctx->digest != NULL && ctx->digest->freectx != NULL)
  ------------------
  |  Branch (47:13): [True: 386k, False: 0]
  |  Branch (47:36): [True: 386k, False: 0]
  ------------------
   48|   386k|            ctx->digest->freectx(ctx->algctx);
   49|   386k|        ctx->algctx = NULL;
   50|   386k|        EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
  ------------------
  |  |  217|   386k|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
   51|   386k|    }
   52|       |
   53|       |    /* Code below to be removed when legacy support is dropped. */
   54|       |
   55|       |    /*
   56|       |     * Don't assume ctx->md_data was cleaned in EVP_Digest_Final, because
   57|       |     * sometimes only copies of the context are ever finalised.
   58|       |     */
   59|   386k|    cleanup_old_md_data(ctx, force);
   60|   386k|    if (force)
  ------------------
  |  Branch (60:9): [True: 0, False: 386k]
  ------------------
   61|      0|        ctx->digest = NULL;
   62|       |
   63|   386k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_ENGINE)
   64|   386k|    ENGINE_finish(ctx->engine);
   65|   386k|    ctx->engine = NULL;
   66|   386k|#endif
   67|       |
   68|       |    /* Non legacy code, this has to be later than the ctx->digest cleaning */
   69|   386k|    if (!keep_fetched) {
  ------------------
  |  Branch (69:9): [True: 386k, False: 0]
  ------------------
   70|   386k|        EVP_MD_free(ctx->fetched_digest);
   71|   386k|        ctx->fetched_digest = NULL;
   72|       |        ctx->reqdigest = NULL;
   73|   386k|    }
   74|   386k|}
EVP_MD_CTX_reset:
   99|   386k|{
  100|   386k|    return evp_md_ctx_reset_ex(ctx, 0);
  101|   386k|}
EVP_MD_CTX_new:
  130|   386k|{
  131|   386k|    return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
  ------------------
  |  |  108|   386k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  132|   386k|}
EVP_MD_CTX_free:
  135|   416k|{
  136|   416k|    if (ctx == NULL)
  ------------------
  |  Branch (136:9): [True: 29.3k, False: 386k]
  ------------------
  137|  29.3k|        return;
  138|       |
  139|   386k|    EVP_MD_CTX_reset(ctx);
  140|   386k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   386k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  141|   386k|}
evp_md_ctx_free_algctx:
  144|   391k|{
  145|   391k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (145:9): [True: 4.42k, False: 386k]
  ------------------
  146|  4.42k|        if (!ossl_assert(ctx->digest != NULL)) {
  ------------------
  |  |   52|  4.42k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  4.42k|    __FILE__, __LINE__)
  ------------------
  |  Branch (146:13): [True: 0, False: 4.42k]
  ------------------
  147|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  148|      0|            return 0;
  149|      0|        }
  150|  4.42k|        if (ctx->digest->freectx != NULL)
  ------------------
  |  Branch (150:13): [True: 4.42k, False: 0]
  ------------------
  151|  4.42k|            ctx->digest->freectx(ctx->algctx);
  152|  4.42k|        ctx->algctx = NULL;
  153|  4.42k|    }
  154|   391k|    return 1;
  155|   391k|}
EVP_DigestInit_ex:
  381|   410k|{
  382|       |    return evp_md_init_internal(ctx, type, NULL, impl);
  383|   410k|}
EVP_DigestUpdate:
  386|   777k|{
  387|   777k|    if (ossl_unlikely(count == 0))
  ------------------
  |  |   23|   777k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 589, False: 777k]
  |  |  ------------------
  ------------------
  388|    589|        return 1;
  389|       |
  390|   777k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|   777k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 777k]
  |  |  ------------------
  ------------------
  391|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  392|      0|        return 0;
  393|      0|    }
  394|       |
  395|   777k|    if (ossl_unlikely(ctx->pctx != NULL)
  ------------------
  |  |   23|  1.55M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 777k]
  |  |  ------------------
  ------------------
  396|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  744|   777k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  397|      0|        && ctx->pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (397:12): [True: 0, False: 0]
  ------------------
  398|      0|#ifndef FIPS_MODULE
  399|       |        /*
  400|       |         * Prior to OpenSSL 3.0 EVP_DigestSignUpdate() and
  401|       |         * EVP_DigestVerifyUpdate() were just macros for EVP_DigestUpdate().
  402|       |         * Some code calls EVP_DigestUpdate() directly even when initialised
  403|       |         * with EVP_DigestSignInit_ex() or
  404|       |         * EVP_DigestVerifyInit_ex(), so we detect that and redirect to
  405|       |         * the correct EVP_Digest*Update() function
  406|       |         */
  407|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (407:13): [True: 0, False: 0]
  ------------------
  408|      0|            return EVP_DigestSignUpdate(ctx, data, count);
  409|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_VERIFYCTX)
  ------------------
  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (409:13): [True: 0, False: 0]
  ------------------
  410|      0|            return EVP_DigestVerifyUpdate(ctx, data, count);
  411|      0|#endif
  412|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  413|      0|        return 0;
  414|      0|    }
  415|       |
  416|   777k|    if (ctx->digest == NULL
  ------------------
  |  Branch (416:9): [True: 0, False: 777k]
  ------------------
  417|   777k|        || ctx->digest->prov == NULL
  ------------------
  |  Branch (417:12): [True: 0, False: 777k]
  ------------------
  418|   777k|        || ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) != 0))
  ------------------
  |  |   23|   777k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 777k]
  |  |  ------------------
  ------------------
  419|      0|        goto legacy;
  420|       |
  421|   777k|    if (ossl_unlikely(ctx->digest->dupdate == NULL)) {
  ------------------
  |  |   23|   777k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 777k]
  |  |  ------------------
  ------------------
  422|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  423|      0|        return 0;
  424|      0|    }
  425|   777k|    return ctx->digest->dupdate(ctx->algctx, data, count);
  426|       |
  427|       |    /* Code below to be removed when legacy support is dropped. */
  428|      0|legacy:
  429|      0|    return ctx->update != NULL ? ctx->update(ctx, data, count) : 0;
  ------------------
  |  Branch (429:12): [True: 0, False: 0]
  ------------------
  430|   777k|}
EVP_DigestFinal_ex:
  443|   388k|{
  444|   388k|    int ret, sz;
  445|   388k|    size_t size = 0;
  446|   388k|    size_t mdsize = 0;
  447|       |
  448|   388k|    if (ossl_unlikely(ctx->digest == NULL))
  ------------------
  |  |   23|   388k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 388k]
  |  |  ------------------
  ------------------
  449|      0|        return 0;
  450|       |
  451|   388k|    sz = EVP_MD_CTX_get_size(ctx);
  ------------------
  |  |  589|   388k|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
  452|   388k|    if (ossl_unlikely(sz < 0))
  ------------------
  |  |   23|   388k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 388k]
  |  |  ------------------
  ------------------
  453|      0|        return 0;
  454|   388k|    mdsize = sz;
  455|   388k|    if (ossl_unlikely(ctx->digest->prov == NULL))
  ------------------
  |  |   23|   388k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 388k]
  |  |  ------------------
  ------------------
  456|      0|        goto legacy;
  457|       |
  458|   388k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|   388k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 388k]
  |  |  ------------------
  ------------------
  459|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  460|      0|        return 0;
  461|      0|    }
  462|       |
  463|   388k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|   388k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 388k]
  |  |  ------------------
  ------------------
  464|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  465|      0|        return 0;
  466|      0|    }
  467|       |
  468|   388k|    ret = ctx->digest->dfinal(ctx->algctx, md, &size, mdsize);
  469|       |
  470|   388k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|   388k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  471|       |
  472|   388k|    if (isize != NULL) {
  ------------------
  |  Branch (472:9): [True: 2.95k, False: 385k]
  ------------------
  473|  2.95k|        if (ossl_likely(size <= UINT_MAX)) {
  ------------------
  |  |   22|  2.95k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.95k, False: 0]
  |  |  ------------------
  ------------------
  474|  2.95k|            *isize = (unsigned int)size;
  475|  2.95k|        } else {
  476|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  477|      0|            ret = 0;
  478|      0|        }
  479|  2.95k|    }
  480|       |
  481|   388k|    return ret;
  482|       |
  483|       |    /* Code below to be removed when legacy support is dropped. */
  484|      0|legacy:
  485|      0|    OPENSSL_assert(mdsize <= EVP_MAX_MD_SIZE);
  ------------------
  |  |  476|      0|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (476:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  486|      0|    ret = ctx->digest->final(ctx, md);
  487|      0|    if (isize != NULL)
  ------------------
  |  Branch (487:9): [True: 0, False: 0]
  ------------------
  488|      0|        *isize = (unsigned int)mdsize;
  489|      0|    if (ctx->digest->cleanup) {
  ------------------
  |  Branch (489:9): [True: 0, False: 0]
  ------------------
  490|      0|        ctx->digest->cleanup(ctx);
  491|      0|        EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
  ------------------
  |  |  217|      0|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
  492|      0|    }
  493|      0|    OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size);
  494|      0|    return ret;
  495|   388k|}
EVP_DigestFinalXOF:
  499|  8.86k|{
  500|  8.86k|    int ret = 0;
  501|  8.86k|    OSSL_PARAM params[2];
  502|  8.86k|    size_t i = 0;
  503|       |
  504|  8.86k|    if (ossl_unlikely(ctx->digest == NULL)) {
  ------------------
  |  |   23|  8.86k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.86k]
  |  |  ------------------
  ------------------
  505|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  506|      0|        return 0;
  507|      0|    }
  508|       |
  509|  8.86k|    if (ossl_unlikely(ctx->digest->prov == NULL))
  ------------------
  |  |   23|  8.86k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.86k]
  |  |  ------------------
  ------------------
  510|      0|        goto legacy;
  511|       |
  512|  8.86k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|  8.86k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.86k]
  |  |  ------------------
  ------------------
  513|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  514|      0|        return 0;
  515|      0|    }
  516|       |
  517|  8.86k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  8.86k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.86k]
  |  |  ------------------
  ------------------
  518|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  519|      0|        return 0;
  520|      0|    }
  521|       |
  522|       |    /*
  523|       |     * For backward compatibility we pass the XOFLEN via a param here so that
  524|       |     * older providers can use the supplied value. Ideally we should have just
  525|       |     * used the size passed into ctx->digest->dfinal().
  526|       |     */
  527|  8.86k|    params[i++] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_XOFLEN, &size);
  ------------------
  |  |  232|  8.86k|# define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
  ------------------
  528|  8.86k|    params[i++] = OSSL_PARAM_construct_end();
  529|       |
  530|  8.86k|    if (ossl_likely(EVP_MD_CTX_set_params(ctx, params) >= 0))
  ------------------
  |  |   22|  8.86k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 8.86k, False: 0]
  |  |  ------------------
  ------------------
  531|  8.86k|        ret = ctx->digest->dfinal(ctx->algctx, md, &size, size);
  532|       |
  533|  8.86k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|  8.86k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  534|       |
  535|  8.86k|    return ret;
  536|       |
  537|      0|legacy:
  538|      0|    if (EVP_MD_xof(ctx->digest)
  ------------------
  |  Branch (538:9): [True: 0, False: 0]
  ------------------
  539|      0|        && size <= INT_MAX
  ------------------
  |  Branch (539:12): [True: 0, False: 0]
  ------------------
  540|      0|        && ctx->digest->md_ctrl(ctx, EVP_MD_CTRL_XOF_LEN, (int)size, NULL)) {
  ------------------
  |  |  204|      0|#define EVP_MD_CTRL_XOF_LEN 0x3
  ------------------
  |  Branch (540:12): [True: 0, False: 0]
  ------------------
  541|      0|        ret = ctx->digest->final(ctx, md);
  542|      0|        if (ctx->digest->cleanup != NULL) {
  ------------------
  |  Branch (542:13): [True: 0, False: 0]
  ------------------
  543|      0|            ctx->digest->cleanup(ctx);
  544|      0|            EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
  ------------------
  |  |  217|      0|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
  545|      0|        }
  546|      0|        OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size);
  547|      0|    } else {
  548|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NOT_XOF_OR_INVALID_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  549|      0|    }
  550|       |
  551|      0|    return ret;
  552|  8.86k|}
EVP_DigestSqueeze:
  556|  40.1k|{
  557|  40.1k|    if (ctx->digest == NULL) {
  ------------------
  |  Branch (557:9): [True: 0, False: 40.1k]
  ------------------
  558|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  559|      0|        return 0;
  560|      0|    }
  561|       |
  562|  40.1k|    if (ctx->digest->prov == NULL) {
  ------------------
  |  Branch (562:9): [True: 0, False: 40.1k]
  ------------------
  563|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|        return 0;
  565|      0|    }
  566|       |
  567|  40.1k|    if (ctx->digest->dsqueeze == NULL) {
  ------------------
  |  Branch (567:9): [True: 0, False: 40.1k]
  ------------------
  568|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_METHOD_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  569|      0|        return 0;
  570|      0|    }
  571|       |
  572|  40.1k|    return ctx->digest->dsqueeze(ctx->algctx, md, &size, size);
  573|  40.1k|}
EVP_Digest:
  729|   378k|{
  730|   378k|    EVP_MD_CTX *ctx = EVP_MD_CTX_new();
  731|   378k|    int ret;
  732|       |
  733|   378k|    if (ctx == NULL)
  ------------------
  |  Branch (733:9): [True: 0, False: 378k]
  ------------------
  734|      0|        return 0;
  735|   378k|    EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT);
  ------------------
  |  |  215|   378k|#define EVP_MD_CTX_FLAG_ONESHOT 0x0001 /* digest update will be \
  ------------------
  736|   378k|    ret = EVP_DigestInit_ex(ctx, type, impl)
  ------------------
  |  Branch (736:11): [True: 378k, False: 0]
  ------------------
  737|   378k|        && EVP_DigestUpdate(ctx, data, count)
  ------------------
  |  Branch (737:12): [True: 378k, False: 0]
  ------------------
  738|   378k|        && EVP_DigestFinal_ex(ctx, md, size);
  ------------------
  |  Branch (738:12): [True: 378k, False: 0]
  ------------------
  739|   378k|    EVP_MD_CTX_free(ctx);
  740|       |
  741|   378k|    return ret;
  742|   378k|}
EVP_MD_CTX_set_params:
  777|  8.86k|{
  778|  8.86k|    EVP_PKEY_CTX *pctx = ctx->pctx;
  779|       |
  780|       |    /* If we have a pctx then we should try that first */
  781|  8.86k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|  17.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.86k]
  |  |  ------------------
  ------------------
  782|      0|        && (pctx->operation == EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (782:13): [True: 0, False: 0]
  ------------------
  783|      0|            || pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (783:16): [True: 0, False: 0]
  ------------------
  784|      0|        && pctx->op.sig.algctx != NULL
  ------------------
  |  Branch (784:12): [True: 0, False: 0]
  ------------------
  785|      0|        && pctx->op.sig.signature->set_ctx_md_params != NULL)
  ------------------
  |  Branch (785:12): [True: 0, False: 0]
  ------------------
  786|      0|        return pctx->op.sig.signature->set_ctx_md_params(pctx->op.sig.algctx,
  787|      0|            params);
  788|       |
  789|  8.86k|    if (ossl_likely(ctx->digest != NULL && ctx->digest->set_ctx_params != NULL))
  ------------------
  |  |   22|  17.7k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 8.86k, False: 0]
  |  |  |  Branch (22:44): [True: 8.86k, False: 0]
  |  |  |  Branch (22:44): [True: 8.86k, False: 0]
  |  |  ------------------
  ------------------
  790|  8.86k|        return ctx->digest->set_ctx_params(ctx->algctx, params);
  791|       |
  792|      0|    return 0;
  793|  8.86k|}
EVP_MD_CTX_gettable_params:
  863|   388k|{
  864|   388k|    EVP_PKEY_CTX *pctx;
  865|   388k|    void *provctx;
  866|       |
  867|   388k|    if (ossl_unlikely(ctx == NULL))
  ------------------
  |  |   23|   388k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 388k]
  |  |  ------------------
  ------------------
  868|      0|        return NULL;
  869|       |
  870|       |    /* If we have a pctx then we should try that first */
  871|   388k|    pctx = ctx->pctx;
  872|   388k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|   776k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 388k]
  |  |  ------------------
  ------------------
  873|      0|        && (pctx->operation == EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (873:13): [True: 0, False: 0]
  ------------------
  874|      0|            || pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (874:16): [True: 0, False: 0]
  ------------------
  875|      0|        && pctx->op.sig.signature != NULL
  ------------------
  |  Branch (875:12): [True: 0, False: 0]
  ------------------
  876|      0|        && pctx->op.sig.signature->gettable_ctx_md_params != NULL
  ------------------
  |  Branch (876:12): [True: 0, False: 0]
  ------------------
  877|      0|        && pctx->op.sig.algctx != NULL)
  ------------------
  |  Branch (877:12): [True: 0, False: 0]
  ------------------
  878|      0|        return pctx->op.sig.signature->gettable_ctx_md_params(
  879|      0|            pctx->op.sig.algctx);
  880|       |
  881|   388k|    if (ossl_unlikely(ctx->digest != NULL
  ------------------
  |  |   23|   776k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 388k]
  |  |  |  Branch (23:46): [True: 388k, False: 0]
  |  |  |  Branch (23:46): [True: 0, False: 388k]
  |  |  ------------------
  ------------------
  882|   388k|            && ctx->digest->gettable_ctx_params != NULL)) {
  883|      0|        provctx = ossl_provider_ctx(EVP_MD_get0_provider(ctx->digest));
  884|      0|        return ctx->digest->gettable_ctx_params(ctx->algctx, provctx);
  885|      0|    }
  886|   388k|    return NULL;
  887|   388k|}
evp_md_new:
  943|  17.0k|{
  944|  17.0k|    EVP_MD *md = OPENSSL_zalloc(sizeof(*md));
  ------------------
  |  |  108|  17.0k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  945|       |
  946|  17.0k|    if (md != NULL && !CRYPTO_NEW_REF(&md->refcnt, 1)) {
  ------------------
  |  Branch (946:9): [True: 17.0k, False: 0]
  |  Branch (946:23): [True: 0, False: 17.0k]
  ------------------
  947|      0|        OPENSSL_free(md);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  948|      0|        return NULL;
  949|      0|    }
  950|  17.0k|    return md;
  951|  17.0k|}
EVP_MD_fetch:
 1162|   435k|{
 1163|   435k|    EVP_MD *md = evp_generic_fetch(ctx, OSSL_OP_DIGEST, algorithm, properties,
  ------------------
  |  |  283|   435k|#define OSSL_OP_DIGEST 1
  ------------------
 1164|   435k|        evp_md_from_algorithm, evp_md_up_ref, evp_md_free);
 1165|       |
 1166|   435k|    return md;
 1167|   435k|}
EVP_MD_up_ref:
 1170|   822k|{
 1171|   822k|    int ref = 0;
 1172|       |
 1173|   822k|    if (md->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  254|   822k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1173:9): [True: 822k, False: 0]
  ------------------
 1174|   822k|        CRYPTO_UP_REF(&md->refcnt, &ref);
 1175|   822k|    return 1;
 1176|   822k|}
EVP_MD_free:
 1179|  1.22M|{
 1180|  1.22M|    int i;
 1181|       |
 1182|  1.22M|    if (md == NULL || md->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  254|   839k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1182:9): [True: 386k, False: 839k]
  |  Branch (1182:23): [True: 0, False: 839k]
  ------------------
 1183|   386k|        return;
 1184|       |
 1185|   839k|    CRYPTO_DOWN_REF(&md->refcnt, &i);
 1186|   839k|    if (i > 0)
  ------------------
  |  Branch (1186:9): [True: 822k, False: 17.0k]
  ------------------
 1187|   822k|        return;
 1188|  17.0k|    evp_md_free_int(md);
 1189|  17.0k|}
digest.c:cleanup_old_md_data:
   30|   797k|{
   31|   797k|    if (ctx->digest != NULL) {
  ------------------
  |  Branch (31:9): [True: 410k, False: 386k]
  ------------------
   32|   410k|        if (ctx->digest->cleanup != NULL
  ------------------
  |  Branch (32:13): [True: 0, False: 410k]
  ------------------
   33|      0|            && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_CLEANED))
  ------------------
  |  |  217|      0|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
  |  Branch (33:16): [True: 0, False: 0]
  ------------------
   34|      0|            ctx->digest->cleanup(ctx);
   35|   410k|        if (ctx->md_data != NULL && ctx->digest->ctx_size > 0
  ------------------
  |  Branch (35:13): [True: 0, False: 410k]
  |  Branch (35:37): [True: 0, False: 0]
  ------------------
   36|      0|            && (!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)
  ------------------
  |  |  219|      0|#define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data \
  ------------------
  |  Branch (36:17): [True: 0, False: 0]
  ------------------
   37|      0|                || force)) {
  ------------------
  |  Branch (37:20): [True: 0, False: 0]
  ------------------
   38|      0|            OPENSSL_clear_free(ctx->md_data, ctx->digest->ctx_size);
  ------------------
  |  |  129|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|       |            ctx->md_data = NULL;
   40|      0|        }
   41|   410k|    }
   42|   797k|}
digest.c:evp_md_ctx_reset_ex:
   77|   386k|{
   78|   386k|    if (ctx == NULL)
  ------------------
  |  Branch (78:9): [True: 0, False: 386k]
  ------------------
   79|      0|        return 1;
   80|       |
   81|       |    /*
   82|       |     * pctx should be freed by the user of EVP_MD_CTX
   83|       |     * if EVP_MD_CTX_FLAG_KEEP_PKEY_CTX is set
   84|       |     */
   85|   386k|    if (!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX)) {
  ------------------
  |  |   32|   386k|#define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400
  ------------------
  |  Branch (85:9): [True: 386k, False: 0]
  ------------------
   86|   386k|        EVP_PKEY_CTX_free(ctx->pctx);
   87|   386k|        ctx->pctx = NULL;
   88|   386k|    }
   89|       |
   90|   386k|    evp_md_ctx_clear_digest(ctx, 0, keep_fetched);
   91|   386k|    if (!keep_fetched)
  ------------------
  |  Branch (91:9): [True: 386k, False: 0]
  ------------------
   92|   386k|        OPENSSL_cleanse(ctx, sizeof(*ctx));
   93|       |
   94|   386k|    return 1;
   95|   386k|}
digest.c:evp_md_init_internal:
  159|   410k|{
  160|   410k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  161|   410k|    ENGINE *tmpimpl = NULL;
  162|   410k|#endif
  163|       |
  164|   410k|#if !defined(FIPS_MODULE)
  165|   410k|    if (ctx->pctx != NULL
  ------------------
  |  Branch (165:9): [True: 0, False: 410k]
  ------------------
  166|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  744|   410k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  167|      0|        && ctx->pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (167:12): [True: 0, False: 0]
  ------------------
  168|       |        /*
  169|       |         * Prior to OpenSSL 3.0 calling EVP_DigestInit_ex() on an mdctx
  170|       |         * previously initialised with EVP_DigestSignInit() would retain
  171|       |         * information about the key, and re-initialise for another sign
  172|       |         * operation. So in that case we redirect to EVP_DigestSignInit()
  173|       |         */
  174|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|            return EVP_DigestSignInit(ctx, NULL, type, impl, NULL);
  176|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_VERIFYCTX)
  ------------------
  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (176:13): [True: 0, False: 0]
  ------------------
  177|      0|            return EVP_DigestVerifyInit(ctx, NULL, type, impl, NULL);
  178|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|        return 0;
  180|      0|    }
  181|   410k|#endif
  182|       |
  183|   410k|    EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_CLEANED | EVP_MD_CTX_FLAG_FINALISED);
  ------------------
  |  |  217|   410k|#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|   410k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  184|       |
  185|   410k|    if (type != NULL) {
  ------------------
  |  Branch (185:9): [True: 410k, False: 0]
  ------------------
  186|   410k|        ctx->reqdigest = type;
  187|   410k|    } else {
  188|      0|        if (ossl_unlikely(ctx->digest == NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  189|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_NO_DIGEST_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  190|      0|            return 0;
  191|      0|        }
  192|      0|        type = ctx->digest;
  193|      0|    }
  194|       |
  195|       |    /* Code below to be removed when legacy support is dropped. */
  196|   410k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  197|       |    /*
  198|       |     * Whether it's nice or not, "Inits" can be used on "Final"'d contexts so
  199|       |     * this context may already have an ENGINE! Try to avoid releasing the
  200|       |     * previous handle, re-querying for an ENGINE, and having a
  201|       |     * reinitialisation, when it may all be unnecessary.
  202|       |     */
  203|   410k|    if (ossl_unlikely(ctx->engine != NULL)
  ------------------
  |  |   23|   820k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 410k]
  |  |  ------------------
  ------------------
  204|      0|        && ctx->digest != NULL
  ------------------
  |  Branch (204:12): [True: 0, False: 0]
  ------------------
  205|      0|        && type->type == ctx->digest->type)
  ------------------
  |  Branch (205:12): [True: 0, False: 0]
  ------------------
  206|      0|        goto skip_to_init;
  207|       |
  208|       |    /*
  209|       |     * Ensure an ENGINE left lying around from last time is cleared (the
  210|       |     * previous check attempted to avoid this if the same ENGINE and
  211|       |     * EVP_MD could be used).
  212|       |     */
  213|   410k|    ENGINE_finish(ctx->engine);
  214|   410k|    ctx->engine = NULL;
  215|       |
  216|   410k|    if (impl == NULL)
  ------------------
  |  Branch (216:9): [True: 410k, False: 0]
  ------------------
  217|   410k|        tmpimpl = ENGINE_get_digest_engine(type->type);
  218|   410k|#endif
  219|       |
  220|       |    /*
  221|       |     * If there are engines involved or EVP_MD_CTX_FLAG_NO_INIT is set then we
  222|       |     * should use legacy handling for now.
  223|       |     */
  224|   410k|    if (impl != NULL
  ------------------
  |  Branch (224:9): [True: 0, False: 410k]
  ------------------
  225|   410k|#if !defined(OPENSSL_NO_ENGINE)
  226|   410k|        || ctx->engine != NULL
  ------------------
  |  Branch (226:12): [True: 0, False: 410k]
  ------------------
  227|   410k|#if !defined(FIPS_MODULE)
  228|   410k|        || tmpimpl != NULL
  ------------------
  |  Branch (228:12): [True: 0, False: 410k]
  ------------------
  229|   410k|#endif
  230|   410k|#endif
  231|   410k|        || (ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) != 0
  ------------------
  |  |  239|   410k|#define EVP_MD_CTX_FLAG_NO_INIT 0x0100 /* Don't initialize md_data */
  ------------------
  |  Branch (231:12): [True: 0, False: 410k]
  ------------------
  232|   410k|        || (type != NULL && type->origin == EVP_ORIG_METH)
  ------------------
  |  |  256|   410k|#define EVP_ORIG_METH 2
  ------------------
  |  Branch (232:13): [True: 410k, False: 0]
  |  Branch (232:29): [True: 0, False: 410k]
  ------------------
  233|   410k|        || (type == NULL && ctx->digest != NULL
  ------------------
  |  Branch (233:13): [True: 0, False: 410k]
  |  Branch (233:29): [True: 0, False: 0]
  ------------------
  234|      0|            && ctx->digest->origin == EVP_ORIG_METH)) {
  ------------------
  |  |  256|      0|#define EVP_ORIG_METH 2
  ------------------
  |  Branch (234:16): [True: 0, False: 0]
  ------------------
  235|       |        /* If we were using provided hash before, cleanup algctx */
  236|      0|        if (!evp_md_ctx_free_algctx(ctx))
  ------------------
  |  Branch (236:13): [True: 0, False: 0]
  ------------------
  237|      0|            return 0;
  238|      0|        if (ctx->digest == ctx->fetched_digest)
  ------------------
  |  Branch (238:13): [True: 0, False: 0]
  ------------------
  239|      0|            ctx->digest = NULL;
  240|      0|        EVP_MD_free(ctx->fetched_digest);
  241|      0|        ctx->fetched_digest = NULL;
  242|      0|        goto legacy;
  243|      0|    }
  244|       |
  245|   410k|    cleanup_old_md_data(ctx, 1);
  246|       |
  247|       |    /* Start of non-legacy code below */
  248|   410k|    if (ossl_likely(ctx->digest == type)) {
  ------------------
  |  |   22|   410k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 19.2k, False: 391k]
  |  |  ------------------
  ------------------
  249|  19.2k|        if (ossl_unlikely(!ossl_assert(type->prov != NULL))) {
  ------------------
  |  |   23|  19.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 19.2k]
  |  |  ------------------
  ------------------
  250|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  251|      0|            return 0;
  252|      0|        }
  253|   391k|    } else {
  254|   391k|        if (!evp_md_ctx_free_algctx(ctx))
  ------------------
  |  Branch (254:13): [True: 0, False: 391k]
  ------------------
  255|      0|            return 0;
  256|   391k|    }
  257|       |
  258|   410k|    if (ossl_unlikely(type->prov == NULL)) {
  ------------------
  |  |   23|   410k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 6.84k, False: 403k]
  |  |  ------------------
  ------------------
  259|       |#ifdef FIPS_MODULE
  260|       |        /* We only do explicit fetches inside the FIPS module */
  261|       |        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  262|       |        return 0;
  263|       |#else
  264|       |        /* The NULL digest is a special case */
  265|  6.84k|        EVP_MD *provmd = EVP_MD_fetch(NULL,
  266|  6.84k|            type->type != NID_undef ? OBJ_nid2sn(type->type)
  ------------------
  |  |   18|  6.84k|#define NID_undef                       0
  ------------------
  |  Branch (266:13): [True: 6.84k, False: 0]
  ------------------
  267|  6.84k|                                    : "NULL",
  268|  6.84k|            "");
  269|       |
  270|  6.84k|        if (provmd == NULL) {
  ------------------
  |  Branch (270:13): [True: 0, False: 6.84k]
  ------------------
  271|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|            return 0;
  273|      0|        }
  274|  6.84k|        type = provmd;
  275|  6.84k|        EVP_MD_free(ctx->fetched_digest);
  276|  6.84k|        ctx->fetched_digest = provmd;
  277|  6.84k|#endif
  278|  6.84k|    }
  279|       |
  280|   410k|    if (ossl_unlikely(type->prov != NULL && ctx->fetched_digest != type)) {
  ------------------
  |  |   23|   820k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 384k, False: 26.1k]
  |  |  |  Branch (23:46): [True: 410k, False: 0]
  |  |  |  Branch (23:46): [True: 384k, False: 26.1k]
  |  |  ------------------
  ------------------
  281|   384k|        if (ossl_unlikely(!EVP_MD_up_ref((EVP_MD *)type))) {
  ------------------
  |  |   23|   384k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 384k]
  |  |  ------------------
  ------------------
  282|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  283|      0|            return 0;
  284|      0|        }
  285|   384k|        EVP_MD_free(ctx->fetched_digest);
  286|   384k|        ctx->fetched_digest = (EVP_MD *)type;
  287|   384k|    }
  288|   410k|    ctx->digest = type;
  289|   410k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (289:9): [True: 391k, False: 19.2k]
  ------------------
  290|   391k|        ctx->algctx = ctx->digest->newctx(ossl_provider_ctx(type->prov));
  291|   391k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (291:13): [True: 0, False: 391k]
  ------------------
  292|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  293|      0|            return 0;
  294|      0|        }
  295|   391k|    }
  296|       |
  297|   410k|    if (ctx->digest->dinit == NULL) {
  ------------------
  |  Branch (297:9): [True: 0, False: 410k]
  ------------------
  298|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|        return 0;
  300|      0|    }
  301|       |
  302|   410k|    return ctx->digest->dinit(ctx->algctx, params);
  303|       |
  304|       |    /* Code below to be removed when legacy support is dropped. */
  305|      0|legacy:
  306|       |
  307|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  308|      0|    if (type) {
  ------------------
  |  Branch (308:9): [True: 0, False: 0]
  ------------------
  309|      0|        if (impl != NULL) {
  ------------------
  |  Branch (309:13): [True: 0, False: 0]
  ------------------
  310|      0|            if (!ENGINE_init(impl)) {
  ------------------
  |  Branch (310:17): [True: 0, False: 0]
  ------------------
  311|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  312|      0|                return 0;
  313|      0|            }
  314|      0|        } else {
  315|       |            /* Ask if an ENGINE is reserved for this job */
  316|      0|            impl = tmpimpl;
  317|      0|        }
  318|      0|        if (impl != NULL) {
  ------------------
  |  Branch (318:13): [True: 0, False: 0]
  ------------------
  319|       |            /* There's an ENGINE for this job ... (apparently) */
  320|      0|            const EVP_MD *d = ENGINE_get_digest(impl, type->type);
  321|       |
  322|      0|            if (d == NULL) {
  ------------------
  |  Branch (322:17): [True: 0, False: 0]
  ------------------
  323|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  324|      0|                ENGINE_finish(impl);
  325|      0|                return 0;
  326|      0|            }
  327|       |            /* We'll use the ENGINE's private digest definition */
  328|      0|            type = d;
  329|       |            /*
  330|       |             * Store the ENGINE functional reference so we know 'type' came
  331|       |             * from an ENGINE and we need to release it when done.
  332|       |             */
  333|      0|            ctx->engine = impl;
  334|      0|        } else
  335|      0|            ctx->engine = NULL;
  336|      0|    }
  337|      0|#endif
  338|      0|    if (ctx->digest != type) {
  ------------------
  |  Branch (338:9): [True: 0, False: 0]
  ------------------
  339|      0|        cleanup_old_md_data(ctx, 1);
  340|       |
  341|      0|        ctx->digest = type;
  342|      0|        if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) {
  ------------------
  |  |  239|      0|#define EVP_MD_CTX_FLAG_NO_INIT 0x0100 /* Don't initialize md_data */
  ------------------
  |  Branch (342:13): [True: 0, False: 0]
  |  Branch (342:56): [True: 0, False: 0]
  ------------------
  343|      0|            ctx->update = type->update;
  344|      0|            ctx->md_data = OPENSSL_zalloc(type->ctx_size);
  ------------------
  |  |  108|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  345|      0|            if (ctx->md_data == NULL)
  ------------------
  |  Branch (345:17): [True: 0, False: 0]
  ------------------
  346|      0|                return 0;
  347|      0|        }
  348|      0|    }
  349|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  350|      0|skip_to_init:
  351|      0|#endif
  352|      0|#ifndef FIPS_MODULE
  353|      0|    if (ctx->pctx != NULL
  ------------------
  |  Branch (353:9): [True: 0, False: 0]
  ------------------
  354|      0|        && (!EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  744|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (354:13): [True: 0, False: 0]
  ------------------
  355|      0|            || ctx->pctx->op.sig.signature == NULL)) {
  ------------------
  |  Branch (355:16): [True: 0, False: 0]
  ------------------
  356|      0|        int r;
  357|      0|        r = EVP_PKEY_CTX_ctrl(ctx->pctx, -1, EVP_PKEY_OP_TYPE_SIG,
  ------------------
  |  | 1781|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  ------------------
  |  |  |  | 1765|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  ------------------
  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  ------------------
  |  |  |  | 1775|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  ------------------
  |  | 1782|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  ------------------
  |  |  |  | 1766|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  ------------------
  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  ------------------
  |  |  |  | 1776|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  ------------------
  |  | 1783|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  ------------------
  |  |  |  | 1767|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  ------------------
  |  | 1784|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  ------------------
  |  |  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  ------------------
  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  ------------------
  |  |  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  ------------------
  ------------------
  358|      0|            EVP_PKEY_CTRL_DIGESTINIT, 0, ctx);
  ------------------
  |  | 1810|      0|#define EVP_PKEY_CTRL_DIGESTINIT 7
  ------------------
  359|      0|        if (r <= 0 && (r != -2))
  ------------------
  |  Branch (359:13): [True: 0, False: 0]
  |  Branch (359:23): [True: 0, False: 0]
  ------------------
  360|      0|            return 0;
  361|      0|    }
  362|      0|#endif
  363|      0|    if (ctx->flags & EVP_MD_CTX_FLAG_NO_INIT)
  ------------------
  |  |  239|      0|#define EVP_MD_CTX_FLAG_NO_INIT 0x0100 /* Don't initialize md_data */
  ------------------
  |  Branch (363:9): [True: 0, False: 0]
  ------------------
  364|      0|        return 1;
  365|      0|    return ctx->digest->init(ctx);
  366|      0|}
digest.c:evp_md_from_algorithm:
 1019|  17.0k|{
 1020|  17.0k|    const OSSL_DISPATCH *fns = algodef->implementation;
 1021|  17.0k|    EVP_MD *md = NULL;
 1022|  17.0k|    int fncnt = 0;
 1023|       |
 1024|       |    /* EVP_MD_fetch() will set the legacy NID if available */
 1025|  17.0k|    if ((md = evp_md_new()) == NULL) {
  ------------------
  |  Branch (1025:9): [True: 0, False: 17.0k]
  ------------------
 1026|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1027|      0|        return NULL;
 1028|      0|    }
 1029|       |
 1030|  17.0k|#ifndef FIPS_MODULE
 1031|  17.0k|    md->type = NID_undef;
  ------------------
  |  |   18|  17.0k|#define NID_undef                       0
  ------------------
 1032|  17.0k|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &md->type)
  ------------------
  |  Branch (1032:9): [True: 0, False: 17.0k]
  ------------------
 1033|  17.0k|        || md->type == -1) {
  ------------------
  |  Branch (1033:12): [True: 0, False: 17.0k]
  ------------------
 1034|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1035|      0|        goto err;
 1036|      0|    }
 1037|  17.0k|#endif
 1038|       |
 1039|  17.0k|    md->name_id = name_id;
 1040|  17.0k|    if ((md->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (1040:9): [True: 0, False: 17.0k]
  ------------------
 1041|      0|        goto err;
 1042|       |
 1043|  17.0k|    md->description = algodef->algorithm_description;
 1044|       |
 1045|   190k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1045:12): [True: 173k, False: 17.0k]
  ------------------
 1046|   173k|        switch (fns->function_id) {
  ------------------
  |  Branch (1046:17): [True: 173k, False: 0]
  ------------------
 1047|  17.0k|        case OSSL_FUNC_DIGEST_NEWCTX:
  ------------------
  |  |  303|  17.0k|#define OSSL_FUNC_DIGEST_NEWCTX 1
  ------------------
  |  Branch (1047:9): [True: 17.0k, False: 156k]
  ------------------
 1048|  17.0k|            if (md->newctx == NULL) {
  ------------------
  |  Branch (1048:17): [True: 17.0k, False: 0]
  ------------------
 1049|  17.0k|                md->newctx = OSSL_FUNC_digest_newctx(fns);
 1050|  17.0k|                fncnt++;
 1051|  17.0k|            }
 1052|  17.0k|            break;
 1053|  17.0k|        case OSSL_FUNC_DIGEST_INIT:
  ------------------
  |  |  304|  17.0k|#define OSSL_FUNC_DIGEST_INIT 2
  ------------------
  |  Branch (1053:9): [True: 17.0k, False: 156k]
  ------------------
 1054|  17.0k|            if (md->dinit == NULL) {
  ------------------
  |  Branch (1054:17): [True: 17.0k, False: 0]
  ------------------
 1055|  17.0k|                md->dinit = OSSL_FUNC_digest_init(fns);
 1056|  17.0k|                fncnt++;
 1057|  17.0k|            }
 1058|  17.0k|            break;
 1059|  17.0k|        case OSSL_FUNC_DIGEST_UPDATE:
  ------------------
  |  |  305|  17.0k|#define OSSL_FUNC_DIGEST_UPDATE 3
  ------------------
  |  Branch (1059:9): [True: 17.0k, False: 156k]
  ------------------
 1060|  17.0k|            if (md->dupdate == NULL) {
  ------------------
  |  Branch (1060:17): [True: 17.0k, False: 0]
  ------------------
 1061|  17.0k|                md->dupdate = OSSL_FUNC_digest_update(fns);
 1062|  17.0k|                fncnt++;
 1063|  17.0k|            }
 1064|  17.0k|            break;
 1065|  17.0k|        case OSSL_FUNC_DIGEST_FINAL:
  ------------------
  |  |  306|  17.0k|#define OSSL_FUNC_DIGEST_FINAL 4
  ------------------
  |  Branch (1065:9): [True: 17.0k, False: 156k]
  ------------------
 1066|  17.0k|            if (md->dfinal == NULL) {
  ------------------
  |  Branch (1066:17): [True: 17.0k, False: 0]
  ------------------
 1067|  17.0k|                md->dfinal = OSSL_FUNC_digest_final(fns);
 1068|  17.0k|                fncnt++;
 1069|  17.0k|            }
 1070|  17.0k|            break;
 1071|  2.52k|        case OSSL_FUNC_DIGEST_SQUEEZE:
  ------------------
  |  |  316|  2.52k|#define OSSL_FUNC_DIGEST_SQUEEZE 14
  ------------------
  |  Branch (1071:9): [True: 2.52k, False: 170k]
  ------------------
 1072|  2.52k|            if (md->dsqueeze == NULL) {
  ------------------
  |  Branch (1072:17): [True: 2.52k, False: 0]
  ------------------
 1073|  2.52k|                md->dsqueeze = OSSL_FUNC_digest_squeeze(fns);
 1074|  2.52k|                fncnt++;
 1075|  2.52k|            }
 1076|  2.52k|            break;
 1077|      0|        case OSSL_FUNC_DIGEST_DIGEST:
  ------------------
  |  |  307|      0|#define OSSL_FUNC_DIGEST_DIGEST 5
  ------------------
  |  Branch (1077:9): [True: 0, False: 173k]
  ------------------
 1078|      0|            if (md->digest == NULL)
  ------------------
  |  Branch (1078:17): [True: 0, False: 0]
  ------------------
 1079|      0|                md->digest = OSSL_FUNC_digest_digest(fns);
 1080|       |            /* We don't increment fnct for this as it is stand alone */
 1081|      0|            break;
 1082|  17.0k|        case OSSL_FUNC_DIGEST_FREECTX:
  ------------------
  |  |  308|  17.0k|#define OSSL_FUNC_DIGEST_FREECTX 6
  ------------------
  |  Branch (1082:9): [True: 17.0k, False: 156k]
  ------------------
 1083|  17.0k|            if (md->freectx == NULL) {
  ------------------
  |  Branch (1083:17): [True: 17.0k, False: 0]
  ------------------
 1084|  17.0k|                md->freectx = OSSL_FUNC_digest_freectx(fns);
 1085|  17.0k|                fncnt++;
 1086|  17.0k|            }
 1087|  17.0k|            break;
 1088|  17.0k|        case OSSL_FUNC_DIGEST_DUPCTX:
  ------------------
  |  |  309|  17.0k|#define OSSL_FUNC_DIGEST_DUPCTX 7
  ------------------
  |  Branch (1088:9): [True: 17.0k, False: 156k]
  ------------------
 1089|  17.0k|            if (md->dupctx == NULL)
  ------------------
  |  Branch (1089:17): [True: 17.0k, False: 0]
  ------------------
 1090|  17.0k|                md->dupctx = OSSL_FUNC_digest_dupctx(fns);
 1091|  17.0k|            break;
 1092|  17.0k|        case OSSL_FUNC_DIGEST_GET_PARAMS:
  ------------------
  |  |  310|  17.0k|#define OSSL_FUNC_DIGEST_GET_PARAMS 8
  ------------------
  |  Branch (1092:9): [True: 17.0k, False: 156k]
  ------------------
 1093|  17.0k|            if (md->get_params == NULL)
  ------------------
  |  Branch (1093:17): [True: 17.0k, False: 0]
  ------------------
 1094|  17.0k|                md->get_params = OSSL_FUNC_digest_get_params(fns);
 1095|  17.0k|            break;
 1096|  5.04k|        case OSSL_FUNC_DIGEST_SET_CTX_PARAMS:
  ------------------
  |  |  311|  5.04k|#define OSSL_FUNC_DIGEST_SET_CTX_PARAMS 9
  ------------------
  |  Branch (1096:9): [True: 5.04k, False: 168k]
  ------------------
 1097|  5.04k|            if (md->set_ctx_params == NULL)
  ------------------
  |  Branch (1097:17): [True: 5.04k, False: 0]
  ------------------
 1098|  5.04k|                md->set_ctx_params = OSSL_FUNC_digest_set_ctx_params(fns);
 1099|  5.04k|            break;
 1100|  3.78k|        case OSSL_FUNC_DIGEST_GET_CTX_PARAMS:
  ------------------
  |  |  312|  3.78k|#define OSSL_FUNC_DIGEST_GET_CTX_PARAMS 10
  ------------------
  |  Branch (1100:9): [True: 3.78k, False: 169k]
  ------------------
 1101|  3.78k|            if (md->get_ctx_params == NULL)
  ------------------
  |  Branch (1101:17): [True: 3.78k, False: 0]
  ------------------
 1102|  3.78k|                md->get_ctx_params = OSSL_FUNC_digest_get_ctx_params(fns);
 1103|  3.78k|            break;
 1104|  17.0k|        case OSSL_FUNC_DIGEST_GETTABLE_PARAMS:
  ------------------
  |  |  313|  17.0k|#define OSSL_FUNC_DIGEST_GETTABLE_PARAMS 11
  ------------------
  |  Branch (1104:9): [True: 17.0k, False: 156k]
  ------------------
 1105|  17.0k|            if (md->gettable_params == NULL)
  ------------------
  |  Branch (1105:17): [True: 17.0k, False: 0]
  ------------------
 1106|  17.0k|                md->gettable_params = OSSL_FUNC_digest_gettable_params(fns);
 1107|  17.0k|            break;
 1108|  5.04k|        case OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  314|  5.04k|#define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS 12
  ------------------
  |  Branch (1108:9): [True: 5.04k, False: 168k]
  ------------------
 1109|  5.04k|            if (md->settable_ctx_params == NULL)
  ------------------
  |  Branch (1109:17): [True: 5.04k, False: 0]
  ------------------
 1110|  5.04k|                md->settable_ctx_params = OSSL_FUNC_digest_settable_ctx_params(fns);
 1111|  5.04k|            break;
 1112|  3.78k|        case OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  315|  3.78k|#define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (1112:9): [True: 3.78k, False: 169k]
  ------------------
 1113|  3.78k|            if (md->gettable_ctx_params == NULL)
  ------------------
  |  Branch (1113:17): [True: 3.78k, False: 0]
  ------------------
 1114|  3.78k|                md->gettable_ctx_params = OSSL_FUNC_digest_gettable_ctx_params(fns);
 1115|  3.78k|            break;
 1116|  17.0k|        case OSSL_FUNC_DIGEST_COPYCTX:
  ------------------
  |  |  317|  17.0k|#define OSSL_FUNC_DIGEST_COPYCTX 15
  ------------------
  |  Branch (1116:9): [True: 17.0k, False: 156k]
  ------------------
 1117|  17.0k|            if (md->copyctx == NULL)
  ------------------
  |  Branch (1117:17): [True: 17.0k, False: 0]
  ------------------
 1118|  17.0k|                md->copyctx = OSSL_FUNC_digest_copyctx(fns);
 1119|  17.0k|            break;
 1120|   173k|        }
 1121|   173k|    }
 1122|  17.0k|    if ((fncnt != 0 && fncnt != 5 && fncnt != 6)
  ------------------
  |  Branch (1122:10): [True: 17.0k, False: 0]
  |  Branch (1122:24): [True: 2.52k, False: 14.4k]
  |  Branch (1122:38): [True: 0, False: 2.52k]
  ------------------
 1123|  17.0k|        || (fncnt == 0 && md->digest == NULL)) {
  ------------------
  |  Branch (1123:13): [True: 0, False: 17.0k]
  |  Branch (1123:27): [True: 0, False: 0]
  ------------------
 1124|       |        /*
 1125|       |         * In order to be a consistent set of functions we either need the
 1126|       |         * whole set of init/update/final etc functions or none of them.
 1127|       |         * The "digest" function can standalone. We at least need one way to
 1128|       |         * generate digests.
 1129|       |         */
 1130|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1131|      0|        goto err;
 1132|      0|    }
 1133|  17.0k|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (1133:9): [True: 17.0k, False: 0]
  |  Branch (1133:25): [True: 0, False: 17.0k]
  ------------------
 1134|      0|        goto err;
 1135|       |
 1136|  17.0k|    md->prov = prov;
 1137|       |
 1138|  17.0k|    if (!evp_md_cache_constants(md)) {
  ------------------
  |  Branch (1138:9): [True: 0, False: 17.0k]
  ------------------
 1139|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1140|      0|        goto err;
 1141|      0|    }
 1142|       |
 1143|  17.0k|    return md;
 1144|       |
 1145|      0|err:
 1146|      0|    EVP_MD_free(md);
 1147|       |    return NULL;
 1148|  17.0k|}
digest.c:set_legacy_nid:
  960|  44.7k|{
  961|  44.7k|    int nid;
  962|  44.7k|    int *legacy_nid = vlegacy_nid;
  963|       |    /*
  964|       |     * We use lowest level function to get the associated method, because
  965|       |     * higher level functions such as EVP_get_digestbyname() have changed
  966|       |     * to look at providers too.
  967|       |     */
  968|  44.7k|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|  44.7k|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  969|       |
  970|  44.7k|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (970:9): [True: 0, False: 44.7k]
  ------------------
  971|      0|        return;
  972|       |
  973|  44.7k|    if (legacy_method == NULL)
  ------------------
  |  Branch (973:9): [True: 30.2k, False: 14.4k]
  ------------------
  974|  30.2k|        return;
  975|  14.4k|    nid = EVP_MD_nid(legacy_method);
  ------------------
  |  |  554|  14.4k|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  976|  14.4k|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|  28.9k|#define NID_undef                       0
  ------------------
  |  Branch (976:9): [True: 2.52k, False: 11.9k]
  |  Branch (976:37): [True: 0, False: 2.52k]
  ------------------
  977|      0|        *legacy_nid = -1;
  978|      0|        return;
  979|      0|    }
  980|  14.4k|    *legacy_nid = nid;
  981|  14.4k|}
digest.c:evp_md_cache_constants:
  985|  17.0k|{
  986|  17.0k|    int ok, xof = 0, algid_absent = 0;
  987|  17.0k|    size_t blksz = 0;
  988|  17.0k|    size_t mdsize = 0;
  989|  17.0k|    OSSL_PARAM params[5];
  990|       |
  991|       |    /*
  992|       |     * Note that these parameters are 'constants' that are only set up
  993|       |     * during the EVP_MD_fetch(). For this reason the XOF functions set the
  994|       |     * md_size to 0, since the output size is unknown.
  995|       |     */
  996|  17.0k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  226|  17.0k|# define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  997|  17.0k|    params[1] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_SIZE, &mdsize);
  ------------------
  |  |  229|  17.0k|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
  998|  17.0k|    params[2] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_XOF, &xof);
  ------------------
  |  |  231|  17.0k|# define OSSL_DIGEST_PARAM_XOF "xof"
  ------------------
  999|  17.0k|    params[3] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_ALGID_ABSENT,
  ------------------
  |  |  225|  17.0k|# define OSSL_DIGEST_PARAM_ALGID_ABSENT "algid-absent"
  ------------------
 1000|  17.0k|        &algid_absent);
 1001|  17.0k|    params[4] = OSSL_PARAM_construct_end();
 1002|  17.0k|    ok = evp_do_md_getparams(md, params) > 0;
 1003|  17.0k|    if (mdsize > INT_MAX || blksz > INT_MAX)
  ------------------
  |  Branch (1003:9): [True: 0, False: 17.0k]
  |  Branch (1003:29): [True: 0, False: 17.0k]
  ------------------
 1004|      0|        ok = 0;
 1005|  17.0k|    if (ok) {
  ------------------
  |  Branch (1005:9): [True: 17.0k, False: 0]
  ------------------
 1006|  17.0k|        md->block_size = (int)blksz;
 1007|  17.0k|        md->md_size = (int)mdsize;
 1008|  17.0k|        if (xof)
  ------------------
  |  Branch (1008:13): [True: 2.52k, False: 14.4k]
  ------------------
 1009|  2.52k|            md->flags |= EVP_MD_FLAG_XOF;
  ------------------
  |  |  179|  2.52k|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
 1010|  17.0k|        if (algid_absent)
  ------------------
  |  Branch (1010:13): [True: 11.3k, False: 5.67k]
  ------------------
 1011|  11.3k|            md->flags |= EVP_MD_FLAG_DIGALGID_ABSENT;
  ------------------
  |  |  191|  11.3k|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
 1012|  17.0k|    }
 1013|  17.0k|    return ok;
 1014|  17.0k|}
digest.c:evp_md_up_ref:
 1151|   438k|{
 1152|   438k|    return EVP_MD_up_ref(md);
 1153|   438k|}
digest.c:evp_md_free:
 1156|  39.9k|{
 1157|  39.9k|    EVP_MD_free(md);
 1158|  39.9k|}

EVP_aes_128_cbc:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_ecb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_ofb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_cfb128:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_cfb1:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_cfb8:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_ctr:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_cbc:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_ecb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_ofb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_cfb128:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_cfb1:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_cfb8:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_ctr:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_cbc:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_ecb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_ofb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_cfb128:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_cfb1:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_cfb8:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_ctr:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_gcm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_192_gcm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_256_gcm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_128_xts:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_256_xts:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_128_ccm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_192_ccm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_256_ccm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_128_wrap:
 3775|      1|{
 3776|      1|    return &aes_128_wrap;
 3777|      1|}
EVP_aes_192_wrap:
 3789|      1|{
 3790|      1|    return &aes_192_wrap;
 3791|      1|}
EVP_aes_256_wrap:
 3803|      1|{
 3804|      1|    return &aes_256_wrap;
 3805|      1|}
EVP_aes_128_wrap_pad:
 3817|      1|{
 3818|      1|    return &aes_128_wrap_pad;
 3819|      1|}
EVP_aes_192_wrap_pad:
 3831|      1|{
 3832|      1|    return &aes_192_wrap_pad;
 3833|      1|}
EVP_aes_256_wrap_pad:
 3845|      1|{
 3846|      1|    return &aes_256_wrap_pad;
 3847|      1|}
EVP_aes_128_ocb:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_192_ocb:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_256_ocb:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }

EVP_aes_128_cbc_hmac_sha1:
  937|      1|{
  938|      1|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ? &aesni_128_cbc_hmac_sha1_cipher : NULL);
  ------------------
  |  |   45|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (938:13): [True: 1, False: 0]
  ------------------
  939|      1|}
EVP_aes_256_cbc_hmac_sha1:
  942|      1|{
  943|      1|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ? &aesni_256_cbc_hmac_sha1_cipher : NULL);
  ------------------
  |  |   45|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (943:13): [True: 1, False: 0]
  ------------------
  944|      1|}

EVP_aes_128_cbc_hmac_sha256:
  913|      1|{
  914|      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);
  ------------------
  |  |   45|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (914:13): [True: 1, False: 0]
  |  Branch (914:55): [True: 1, False: 0]
  ------------------
  915|      1|}
EVP_aes_256_cbc_hmac_sha256:
  918|      1|{
  919|      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);
  ------------------
  |  |   45|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (919:13): [True: 1, False: 0]
  |  Branch (919:55): [True: 1, False: 0]
  ------------------
  920|      1|}

EVP_aria_128_ctr:
  174|      1|    {                                                                                 \
  175|      1|        return &aria_##keylen##_##mode;                                               \
  176|      1|    }
EVP_aria_192_ctr:
  174|      1|    {                                                                                 \
  175|      1|        return &aria_##keylen##_##mode;                                               \
  176|      1|    }
EVP_aria_256_ctr:
  174|      1|    {                                                                                 \
  175|      1|        return &aria_##keylen##_##mode;                                               \
  176|      1|    }
EVP_aria_128_gcm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_192_gcm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_256_gcm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_128_ccm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_192_ccm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_256_ccm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }

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

EVP_chacha20:
  147|      1|{
  148|      1|    return &chacha20;
  149|      1|}
EVP_chacha20_poly1305:
  626|      1|{
  627|      1|    return (&chacha20_poly1305);
  628|      1|}

EVP_des_ede:
  301|      1|{
  302|      1|    return &des_ede_ecb;
  303|      1|}
EVP_des_ede3:
  306|      1|{
  307|      1|    return &des_ede3_ecb;
  308|      1|}
EVP_des_ede3_wrap:
  421|      1|{
  422|      1|    return &des3_wrap;
  423|      1|}

EVP_rc2_64_cbc:
   83|      1|{
   84|      1|    return &r2_64_cbc_cipher;
   85|      1|}
EVP_rc2_40_cbc:
   88|      1|{
   89|      1|    return &r2_40_cbc_cipher;
   90|      1|}

EVP_rc4:
   68|      1|{
   69|      1|    return &r4_cipher;
   70|      1|}
EVP_rc4_40:
   73|      1|{
   74|      1|    return &r4_40_cipher;
   75|      1|}

EVP_rc4_hmac_md5:
  263|      1|{
  264|      1|    return &r4_hmac_md5_cipher;
  265|      1|}

EVP_sm4_cbc:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }
EVP_sm4_ecb:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }
EVP_sm4_ofb:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }
EVP_sm4_cfb128:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }
EVP_sm4_ctr:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }

EVP_desx_cbc:
   56|      1|{
   57|      1|    return &d_xcbc_cipher;
   58|      1|}

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

EVP_ENCODE_CTX_new:
  349|   435k|{
  350|   435k|    return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  351|   435k|}
EVP_ENCODE_CTX_free:
  354|   441k|{
  355|   441k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   441k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|   441k|}
EVP_DecodeInit:
  495|   435k|{
  496|       |    /* Only ctx->num and ctx->flags are used during decoding. */
  497|   435k|    ctx->num = 0;
  498|   435k|    ctx->length = 0;
  499|   435k|    ctx->line_num = 0;
  500|   435k|    ctx->flags = 0;
  501|   435k|}
EVP_DecodeUpdate:
  525|   435k|{
  526|   435k|    int seof = 0, eof = 0, rv = -1, ret = 0, i, v, tmp, n, decoded_len;
  527|   435k|    unsigned char *d;
  528|   435k|    const unsigned char *table;
  529|       |
  530|   435k|    n = ctx->num;
  531|   435k|    d = ctx->enc_data;
  532|       |
  533|   435k|    if (n > 0 && d[n - 1] == '=') {
  ------------------
  |  Branch (533:9): [True: 0, False: 435k]
  |  Branch (533:18): [True: 0, False: 0]
  ------------------
  534|      0|        eof++;
  535|      0|        if (n > 1 && d[n - 2] == '=')
  ------------------
  |  Branch (535:13): [True: 0, False: 0]
  |  Branch (535:22): [True: 0, False: 0]
  ------------------
  536|      0|            eof++;
  537|      0|    }
  538|       |
  539|       |    /* Legacy behaviour: an empty input chunk signals end of input. */
  540|   435k|    if (inl == 0) {
  ------------------
  |  Branch (540:9): [True: 0, False: 435k]
  ------------------
  541|      0|        rv = 0;
  542|      0|        goto end;
  543|      0|    }
  544|       |
  545|   435k|    if ((ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  899|   435k|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (545:9): [True: 0, False: 435k]
  ------------------
  546|      0|        table = srpdata_ascii2bin;
  547|   435k|    else
  548|   435k|        table = data_ascii2bin;
  549|       |
  550|   631M|    for (i = 0; i < inl; i++) {
  ------------------
  |  Branch (550:17): [True: 631M, False: 435k]
  ------------------
  551|   631M|        tmp = *(in++);
  552|   631M|        v = conv_ascii2bin(tmp, table);
  553|   631M|        if (v == B64_ERROR) {
  ------------------
  |  |   65|   631M|#define B64_ERROR 0xFF
  ------------------
  |  Branch (553:13): [True: 0, False: 631M]
  ------------------
  554|      0|            rv = -1;
  555|      0|            goto end;
  556|      0|        }
  557|       |
  558|   631M|        if (tmp == '=') {
  ------------------
  |  Branch (558:13): [True: 361k, False: 631M]
  ------------------
  559|   361k|            eof++;
  560|   631M|        } else if (eof > 0 && B64_BASE64(v)) {
  ------------------
  |  |   67|   250k|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   66|   250k|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (67:23): [True: 0, False: 250k]
  |  |  ------------------
  ------------------
  |  Branch (560:20): [True: 250k, False: 630M]
  ------------------
  561|       |            /* More data after padding. */
  562|      0|            rv = -1;
  563|      0|            goto end;
  564|      0|        }
  565|       |
  566|   631M|        if (eof > 2) {
  ------------------
  |  Branch (566:13): [True: 0, False: 631M]
  ------------------
  567|      0|            rv = -1;
  568|      0|            goto end;
  569|      0|        }
  570|       |
  571|   631M|        if (v == B64_EOF) {
  ------------------
  |  |   63|   631M|#define B64_EOF 0xF2
  ------------------
  |  Branch (571:13): [True: 0, False: 631M]
  ------------------
  572|      0|            seof = 1;
  573|      0|            goto tail;
  574|      0|        }
  575|       |
  576|       |        /* Only save valid base64 characters. */
  577|   631M|        if (B64_BASE64(v)) {
  ------------------
  |  |   67|   631M|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   66|   631M|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (67:23): [True: 621M, False: 9.90M]
  |  |  ------------------
  ------------------
  578|   621M|            if (n >= 64) {
  ------------------
  |  Branch (578:17): [True: 0, False: 621M]
  ------------------
  579|       |                /*
  580|       |                 * We increment n once per loop, and empty the buffer as soon as
  581|       |                 * we reach 64 characters, so this can only happen if someone's
  582|       |                 * manually messed with the ctx. Refuse to write any more data.
  583|       |                 */
  584|      0|                rv = -1;
  585|      0|                goto end;
  586|      0|            }
  587|   621M|            OPENSSL_assert(n < (int)sizeof(ctx->enc_data));
  ------------------
  |  |  476|   621M|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (476:12): [True: 621M, False: 0]
  |  |  ------------------
  ------------------
  588|   621M|            d[n++] = tmp;
  589|   621M|        }
  590|       |
  591|   631M|        if (n == 64) {
  ------------------
  |  Branch (591:13): [True: 9.50M, False: 621M]
  ------------------
  592|  9.50M|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  593|  9.50M|            n = 0;
  594|  9.50M|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (594:17): [True: 0, False: 9.50M]
  |  Branch (594:37): [True: 0, False: 9.50M]
  |  Branch (594:57): [True: 0, False: 0]
  ------------------
  595|      0|                rv = -1;
  596|      0|                goto end;
  597|      0|            }
  598|  9.50M|            ret += decoded_len;
  599|  9.50M|            out += decoded_len;
  600|  9.50M|        }
  601|   631M|    }
  602|       |
  603|       |    /*
  604|       |     * Legacy behaviour: if the current line is a full base64-block (i.e., has
  605|       |     * 0 mod 4 base64 characters), it is processed immediately. We keep this
  606|       |     * behaviour as applications may not be calling EVP_DecodeFinal properly.
  607|       |     */
  608|   435k|tail:
  609|   435k|    if (n > 0) {
  ------------------
  |  Branch (609:9): [True: 400k, False: 35.8k]
  ------------------
  610|   400k|        if ((n & 3) == 0) {
  ------------------
  |  Branch (610:13): [True: 400k, False: 0]
  ------------------
  611|   400k|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  612|   400k|            n = 0;
  613|   400k|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (613:17): [True: 0, False: 400k]
  |  Branch (613:37): [True: 0, False: 400k]
  |  Branch (613:57): [True: 0, False: 0]
  ------------------
  614|      0|                rv = -1;
  615|      0|                goto end;
  616|      0|            }
  617|   400k|            ret += decoded_len;
  618|   400k|        } else if (seof) {
  ------------------
  |  Branch (618:20): [True: 0, False: 0]
  ------------------
  619|       |            /* EOF in the middle of a base64 block. */
  620|      0|            rv = -1;
  621|      0|            goto end;
  622|      0|        }
  623|   400k|    }
  624|       |
  625|   435k|    rv = seof || (n == 0 && eof) ? 0 : 1;
  ------------------
  |  Branch (625:10): [True: 0, False: 435k]
  |  Branch (625:19): [True: 435k, False: 0]
  |  Branch (625:29): [True: 250k, False: 185k]
  ------------------
  626|   435k|end:
  627|       |    /* Legacy behaviour. This should probably rather be zeroed on error. */
  628|   435k|    *outl = ret;
  629|   435k|    ctx->num = n;
  630|   435k|    return rv;
  631|   435k|}
EVP_DecodeFinal:
  719|   435k|{
  720|   435k|    int i;
  721|       |
  722|   435k|    *outl = 0;
  723|   435k|    if (ctx->num != 0) {
  ------------------
  |  Branch (723:9): [True: 0, False: 435k]
  ------------------
  724|      0|        i = evp_decodeblock_int(ctx, out, ctx->enc_data, ctx->num, -1);
  725|      0|        if (i < 0)
  ------------------
  |  Branch (725:13): [True: 0, False: 0]
  ------------------
  726|      0|            return -1;
  727|      0|        ctx->num = 0;
  728|      0|        *outl = i;
  729|      0|        return 1;
  730|      0|    } else
  731|   435k|        return 1;
  732|   435k|}
encode.c:conv_ascii2bin:
  333|  1.27G|{
  334|  1.27G|    if (a & 0x80)
  ------------------
  |  Branch (334:9): [True: 0, False: 1.27G]
  ------------------
  335|      0|        return B64_ERROR;
  ------------------
  |  |   65|      0|#define B64_ERROR 0xFF
  ------------------
  336|  1.27G|    return table[a];
  337|  1.27G|}
encode.c:evp_decodeblock_int:
  636|  9.90M|{
  637|  9.90M|    int i, ret = 0, a, b, c, d;
  638|  9.90M|    unsigned long l;
  639|  9.90M|    const unsigned char *table;
  640|       |
  641|  9.90M|    if (eof < -1 || eof > 2)
  ------------------
  |  Branch (641:9): [True: 0, False: 9.90M]
  |  Branch (641:21): [True: 0, False: 9.90M]
  ------------------
  642|      0|        return -1;
  643|       |
  644|  9.90M|    if (ctx != NULL && (ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  899|  9.90M|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (644:9): [True: 9.90M, False: 0]
  |  Branch (644:24): [True: 0, False: 9.90M]
  ------------------
  645|      0|        table = srpdata_ascii2bin;
  646|  9.90M|    else
  647|  9.90M|        table = data_ascii2bin;
  648|       |
  649|       |    /* trim whitespace from the start of the line. */
  650|  9.90M|    while ((n > 0) && (conv_ascii2bin(*f, table) == B64_WS)) {
  ------------------
  |  |   64|  9.90M|#define B64_WS 0xE0
  ------------------
  |  Branch (650:12): [True: 9.90M, False: 0]
  |  Branch (650:23): [True: 0, False: 9.90M]
  ------------------
  651|      0|        f++;
  652|      0|        n--;
  653|      0|    }
  654|       |
  655|       |    /*
  656|       |     * strip off stuff at the end of the line ascii2bin values B64_WS,
  657|       |     * B64_EOLN, B64_EOLN and B64_EOF
  658|       |     */
  659|  9.90M|    while ((n > 3) && (B64_NOT_BASE64(conv_ascii2bin(f[n - 1], table))))
  ------------------
  |  |   66|  9.90M|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  ------------------
  |  Branch (659:12): [True: 9.90M, False: 0]
  |  Branch (659:23): [True: 0, False: 9.90M]
  ------------------
  660|      0|        n--;
  661|       |
  662|  9.90M|    if (n % 4 != 0)
  ------------------
  |  Branch (662:9): [True: 0, False: 9.90M]
  ------------------
  663|      0|        return -1;
  664|  9.90M|    if (n == 0)
  ------------------
  |  Branch (664:9): [True: 0, False: 9.90M]
  ------------------
  665|      0|        return 0;
  666|       |
  667|       |    /* all 4-byte blocks except the last one do not have padding. */
  668|   155M|    for (i = 0; i < n - 4; i += 4) {
  ------------------
  |  Branch (668:17): [True: 145M, False: 9.90M]
  ------------------
  669|   145M|        a = conv_ascii2bin(*(f++), table);
  670|   145M|        b = conv_ascii2bin(*(f++), table);
  671|   145M|        c = conv_ascii2bin(*(f++), table);
  672|   145M|        d = conv_ascii2bin(*(f++), table);
  673|   145M|        if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (673:13): [True: 0, False: 145M]
  ------------------
  674|      0|            return -1;
  675|   145M|        l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  676|   145M|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  677|   145M|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  678|   145M|        *(t++) = (unsigned char)(l) & 0xff;
  679|   145M|        ret += 3;
  680|   145M|    }
  681|       |
  682|       |    /* process the last block that may have padding. */
  683|  9.90M|    a = conv_ascii2bin(*(f++), table);
  684|  9.90M|    b = conv_ascii2bin(*(f++), table);
  685|  9.90M|    c = conv_ascii2bin(*(f++), table);
  686|  9.90M|    d = conv_ascii2bin(*(f++), table);
  687|  9.90M|    if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (687:9): [True: 0, False: 9.90M]
  ------------------
  688|      0|        return -1;
  689|  9.90M|    l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  690|       |
  691|  9.90M|    if (eof == -1)
  ------------------
  |  Branch (691:9): [True: 0, False: 9.90M]
  ------------------
  692|      0|        eof = (c == '=') + (d == '=');
  693|       |
  694|  9.90M|    switch (eof) {
  ------------------
  |  Branch (694:13): [True: 9.90M, False: 0]
  ------------------
  695|   110k|    case 2:
  ------------------
  |  Branch (695:5): [True: 110k, False: 9.79M]
  ------------------
  696|   110k|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  697|   110k|        break;
  698|   140k|    case 1:
  ------------------
  |  Branch (698:5): [True: 140k, False: 9.76M]
  ------------------
  699|   140k|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  700|   140k|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  701|   140k|        break;
  702|  9.65M|    case 0:
  ------------------
  |  Branch (702:5): [True: 9.65M, False: 250k]
  ------------------
  703|  9.65M|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  704|  9.65M|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  705|  9.65M|        *(t++) = (unsigned char)(l) & 0xff;
  706|  9.65M|        break;
  707|  9.90M|    }
  708|  9.90M|    ret += 3 - eof;
  709|       |
  710|  9.90M|    return ret;
  711|  9.90M|}

EVP_CIPHER_CTX_reset:
   34|  4.95k|{
   35|  4.95k|    if (ctx == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 4.95k]
  ------------------
   36|      0|        return 1;
   37|       |
   38|  4.95k|    if (ctx->cipher == NULL || ctx->cipher->prov == NULL)
  ------------------
  |  Branch (38:9): [True: 0, False: 4.95k]
  |  Branch (38:32): [True: 0, False: 4.95k]
  ------------------
   39|      0|        goto legacy;
   40|       |
   41|  4.95k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (41:9): [True: 4.95k, False: 0]
  ------------------
   42|  4.95k|        if (ctx->cipher->freectx != NULL)
  ------------------
  |  Branch (42:13): [True: 4.95k, False: 0]
  ------------------
   43|  4.95k|            ctx->cipher->freectx(ctx->algctx);
   44|  4.95k|        ctx->algctx = NULL;
   45|  4.95k|    }
   46|  4.95k|    if (ctx->fetched_cipher != NULL)
  ------------------
  |  Branch (46:9): [True: 4.95k, False: 0]
  ------------------
   47|  4.95k|        EVP_CIPHER_free(ctx->fetched_cipher);
   48|  4.95k|    memset(ctx, 0, sizeof(*ctx));
   49|  4.95k|    ctx->iv_len = -1;
   50|       |
   51|  4.95k|    return 1;
   52|       |
   53|       |    /* Remove legacy code below when legacy support is removed. */
   54|      0|legacy:
   55|       |
   56|      0|    if (ctx->cipher != NULL) {
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|        if (ctx->cipher->cleanup && !ctx->cipher->cleanup(ctx))
  ------------------
  |  Branch (57:13): [True: 0, False: 0]
  |  Branch (57:37): [True: 0, False: 0]
  ------------------
   58|      0|            return 0;
   59|       |        /* Cleanse cipher context data */
   60|      0|        if (ctx->cipher_data && ctx->cipher->ctx_size)
  ------------------
  |  Branch (60:13): [True: 0, False: 0]
  |  Branch (60:33): [True: 0, False: 0]
  ------------------
   61|      0|            OPENSSL_cleanse(ctx->cipher_data, ctx->cipher->ctx_size);
   62|      0|    }
   63|      0|    OPENSSL_free(ctx->cipher_data);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   64|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
   65|      0|    ENGINE_finish(ctx->engine);
   66|      0|#endif
   67|      0|    memset(ctx, 0, sizeof(*ctx));
   68|      0|    ctx->iv_len = -1;
   69|      0|    return 1;
   70|      0|}
EVP_CIPHER_CTX_new:
   73|  4.95k|{
   74|  4.95k|    EVP_CIPHER_CTX *ctx;
   75|       |
   76|  4.95k|    ctx = OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
  ------------------
  |  |  108|  4.95k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  4.95k|    if (ctx == NULL)
  ------------------
  |  Branch (77:9): [True: 0, False: 4.95k]
  ------------------
   78|      0|        return NULL;
   79|       |
   80|  4.95k|    ctx->iv_len = -1;
   81|  4.95k|    return ctx;
   82|  4.95k|}
EVP_CIPHER_CTX_free:
   85|  16.6k|{
   86|  16.6k|    if (ctx == NULL)
  ------------------
  |  Branch (86:9): [True: 11.7k, False: 4.95k]
  ------------------
   87|  11.7k|        return;
   88|  4.95k|    EVP_CIPHER_CTX_reset(ctx);
   89|  4.95k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  4.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   90|  4.95k|}
EVP_CipherInit_ex:
  652|  99.8k|{
  653|       |    return evp_cipher_init_internal(ctx, cipher, impl, key, iv, enc, 0, NULL);
  654|  99.8k|}
EVP_CipherUpdate:
  718|  94.6k|{
  719|  94.6k|    if (ctx->encrypt)
  ------------------
  |  Branch (719:9): [True: 94.6k, False: 0]
  ------------------
  720|  94.6k|        return EVP_EncryptUpdate(ctx, out, outl, in, inl);
  721|      0|    else
  722|      0|        return EVP_DecryptUpdate(ctx, out, outl, in, inl);
  723|  94.6k|}
EVP_EncryptUpdate:
  977|  94.6k|{
  978|  94.6k|    int ret;
  979|  94.6k|    size_t soutl, inl_ = (size_t)inl;
  980|  94.6k|    int blocksize;
  981|       |
  982|  94.6k|    if (inl < 0) {
  ------------------
  |  Branch (982:9): [True: 0, False: 94.6k]
  ------------------
  983|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  984|      0|        return 0;
  985|      0|    }
  986|       |
  987|  94.6k|    if (ossl_likely(outl != NULL)) {
  ------------------
  |  |   22|  94.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 94.6k, False: 0]
  |  |  ------------------
  ------------------
  988|  94.6k|        *outl = 0;
  989|  94.6k|    } else {
  990|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  991|      0|        return 0;
  992|      0|    }
  993|       |
  994|       |    /* Prevent accidental use of decryption context when encrypting */
  995|  94.6k|    if (ossl_unlikely(!ctx->encrypt)) {
  ------------------
  |  |   23|  94.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 94.6k]
  |  |  ------------------
  ------------------
  996|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  997|      0|        return 0;
  998|      0|    }
  999|       |
 1000|  94.6k|    if (ossl_unlikely(ctx->cipher == NULL)) {
  ------------------
  |  |   23|  94.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 94.6k]
  |  |  ------------------
  ------------------
 1001|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1002|      0|        return 0;
 1003|      0|    }
 1004|       |
 1005|  94.6k|    if (ossl_unlikely(ctx->cipher->prov == NULL))
  ------------------
  |  |   23|  94.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 94.6k]
  |  |  ------------------
  ------------------
 1006|      0|        goto legacy;
 1007|       |
 1008|  94.6k|    blocksize = ctx->cipher->block_size;
 1009|       |
 1010|  94.6k|    if (ossl_unlikely(ctx->cipher->cupdate == NULL || blocksize < 1)) {
  ------------------
  |  |   23|   189k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 94.6k]
  |  |  |  Branch (23:46): [True: 0, False: 94.6k]
  |  |  |  Branch (23:46): [True: 0, False: 94.6k]
  |  |  ------------------
  ------------------
 1011|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1012|      0|        return 0;
 1013|      0|    }
 1014|       |
 1015|  94.6k|    ret = ctx->cipher->cupdate(ctx->algctx, out, &soutl,
 1016|  94.6k|        inl_ + (size_t)(blocksize == 1 ? 0 : blocksize),
  ------------------
  |  Branch (1016:25): [True: 26.1k, False: 68.5k]
  ------------------
 1017|  94.6k|        in, inl_);
 1018|       |
 1019|  94.6k|    if (ossl_likely(ret)) {
  ------------------
  |  |   22|  94.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 94.6k, False: 0]
  |  |  ------------------
  ------------------
 1020|  94.6k|        if (ossl_unlikely(soutl > INT_MAX)) {
  ------------------
  |  |   23|  94.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 94.6k]
  |  |  ------------------
  ------------------
 1021|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1022|      0|            return 0;
 1023|      0|        }
 1024|  94.6k|        *outl = (int)soutl;
 1025|  94.6k|    }
 1026|       |
 1027|  94.6k|    return ret;
 1028|       |
 1029|       |    /* Code below to be removed when legacy support is dropped. */
 1030|      0|legacy:
 1031|       |
 1032|      0|    return evp_EncryptDecryptUpdate(ctx, out, outl, in, inl);
 1033|  94.6k|}
EVP_CIPHER_get_params:
 1647|  37.8k|{
 1648|  37.8k|    if (cipher != NULL && cipher->get_params != NULL)
  ------------------
  |  Branch (1648:9): [True: 37.8k, False: 0]
  |  Branch (1648:27): [True: 37.8k, False: 0]
  ------------------
 1649|  37.8k|        return cipher->get_params(params);
 1650|      0|    return 0;
 1651|  37.8k|}
EVP_CIPHER_gettable_ctx_params:
 1705|  81.9k|{
 1706|  81.9k|    void *provctx;
 1707|       |
 1708|  81.9k|    if (cipher != NULL && cipher->gettable_ctx_params != NULL) {
  ------------------
  |  Branch (1708:9): [True: 81.9k, False: 0]
  |  Branch (1708:27): [True: 81.9k, False: 0]
  ------------------
 1709|  81.9k|        provctx = ossl_provider_ctx(EVP_CIPHER_get0_provider(cipher));
 1710|  81.9k|        return cipher->gettable_ctx_params(NULL, provctx);
 1711|  81.9k|    }
 1712|      0|    return NULL;
 1713|  81.9k|}
evp_cipher_new:
 1848|  81.9k|{
 1849|  81.9k|    EVP_CIPHER *cipher = OPENSSL_zalloc(sizeof(EVP_CIPHER));
  ------------------
  |  |  108|  81.9k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1850|       |
 1851|  81.9k|    if (cipher != NULL && !CRYPTO_NEW_REF(&cipher->refcnt, 1)) {
  ------------------
  |  Branch (1851:9): [True: 81.9k, False: 0]
  |  Branch (1851:27): [True: 0, False: 81.9k]
  ------------------
 1852|      0|        OPENSSL_free(cipher);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1853|      0|        return NULL;
 1854|      0|    }
 1855|  81.9k|    return cipher;
 1856|  81.9k|}
EVP_CIPHER_fetch:
 2076|  64.0k|{
 2077|  64.0k|    EVP_CIPHER *cipher = evp_generic_fetch(ctx, OSSL_OP_CIPHER, algorithm, properties,
  ------------------
  |  |  284|  64.0k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
 2078|  64.0k|        evp_cipher_from_algorithm, evp_cipher_up_ref,
 2079|  64.0k|        evp_cipher_free);
 2080|       |
 2081|  64.0k|    return cipher;
 2082|  64.0k|}
evp_cipher_fetch_from_prov:
 2087|  3.30k|{
 2088|  3.30k|    return evp_generic_fetch_from_prov(prov, OSSL_OP_CIPHER,
  ------------------
  |  |  284|  3.30k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
 2089|  3.30k|        algorithm, properties,
 2090|  3.30k|        evp_cipher_from_algorithm,
 2091|  3.30k|        evp_cipher_up_ref,
 2092|  3.30k|        evp_cipher_free);
 2093|  3.30k|}
EVP_CIPHER_up_ref:
 2105|   135k|{
 2106|   135k|    int ref = 0;
 2107|       |
 2108|   135k|    if (cipher->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  254|   135k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (2108:9): [True: 135k, False: 0]
  ------------------
 2109|   135k|        CRYPTO_UP_REF(&cipher->refcnt, &ref);
 2110|   135k|    return 1;
 2111|   135k|}
evp_cipher_free_int:
 2114|  81.9k|{
 2115|  81.9k|    OPENSSL_free(cipher->type_name);
  ------------------
  |  |  131|  81.9k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2116|  81.9k|    ossl_provider_free(cipher->prov);
 2117|  81.9k|    CRYPTO_FREE_REF(&cipher->refcnt);
 2118|  81.9k|    OPENSSL_free(cipher);
  ------------------
  |  |  131|  81.9k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2119|  81.9k|}
EVP_CIPHER_free:
 2122|   225k|{
 2123|   225k|    int i;
 2124|       |
 2125|   225k|    if (cipher == NULL || cipher->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  254|   217k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (2125:9): [True: 8.26k, False: 217k]
  |  Branch (2125:27): [True: 0, False: 217k]
  ------------------
 2126|  8.26k|        return;
 2127|       |
 2128|   217k|    CRYPTO_DOWN_REF(&cipher->refcnt, &i);
 2129|   217k|    if (i > 0)
  ------------------
  |  Branch (2129:9): [True: 135k, False: 81.9k]
  ------------------
 2130|   135k|        return;
 2131|  81.9k|    evp_cipher_free_int(cipher);
 2132|  81.9k|}
evp_enc.c:evp_cipher_init_internal:
   98|  99.8k|{
   99|  99.8k|    int n;
  100|  99.8k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  101|  99.8k|    ENGINE *tmpimpl = NULL;
  102|  99.8k|#endif
  103|       |
  104|       |    /*
  105|       |     * enc == 1 means we are encrypting.
  106|       |     * enc == 0 means we are decrypting.
  107|       |     * enc == -1 means, use the previously initialised value for encrypt/decrypt
  108|       |     */
  109|  99.8k|    if (enc == -1) {
  ------------------
  |  Branch (109:9): [True: 94.8k, False: 4.95k]
  ------------------
  110|  94.8k|        enc = ctx->encrypt;
  111|  94.8k|    } else {
  112|  4.95k|        if (enc)
  ------------------
  |  Branch (112:13): [True: 4.95k, False: 0]
  ------------------
  113|  4.95k|            enc = 1;
  114|  4.95k|        ctx->encrypt = enc;
  115|  4.95k|    }
  116|       |
  117|  99.8k|    if (cipher == NULL && ctx->cipher == NULL) {
  ------------------
  |  Branch (117:9): [True: 94.8k, False: 4.95k]
  |  Branch (117:27): [True: 0, False: 94.8k]
  ------------------
  118|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|      0|        return 0;
  120|      0|    }
  121|       |
  122|       |    /* Code below to be removed when legacy support is dropped. */
  123|  99.8k|    if (is_pipeline)
  ------------------
  |  Branch (123:9): [True: 0, False: 99.8k]
  ------------------
  124|      0|        goto nonlegacy;
  125|       |
  126|  99.8k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  127|       |    /*
  128|       |     * Whether it's nice or not, "Inits" can be used on "Final"'d contexts so
  129|       |     * this context may already have an ENGINE! Try to avoid releasing the
  130|       |     * previous handle, re-querying for an ENGINE, and having a
  131|       |     * reinitialisation, when it may all be unnecessary.
  132|       |     */
  133|  99.8k|    if (ctx->engine && ctx->cipher
  ------------------
  |  Branch (133:9): [True: 0, False: 99.8k]
  |  Branch (133:24): [True: 0, False: 0]
  ------------------
  134|      0|        && (cipher == NULL || cipher->nid == ctx->cipher->nid))
  ------------------
  |  Branch (134:13): [True: 0, False: 0]
  |  Branch (134:31): [True: 0, False: 0]
  ------------------
  135|      0|        goto skip_to_init;
  136|       |
  137|  99.8k|    if (cipher != NULL && impl == NULL) {
  ------------------
  |  Branch (137:9): [True: 4.95k, False: 94.8k]
  |  Branch (137:27): [True: 4.95k, False: 0]
  ------------------
  138|       |        /* Ask if an ENGINE is reserved for this job */
  139|  4.95k|        tmpimpl = ENGINE_get_cipher_engine(cipher->nid);
  140|  4.95k|    }
  141|  99.8k|#endif
  142|       |
  143|       |    /*
  144|       |     * If there are engines involved then we should use legacy handling for now.
  145|       |     */
  146|  99.8k|    if (ctx->engine != NULL
  ------------------
  |  Branch (146:9): [True: 0, False: 99.8k]
  ------------------
  147|  99.8k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  148|  99.8k|        || tmpimpl != NULL
  ------------------
  |  Branch (148:12): [True: 0, False: 99.8k]
  ------------------
  149|  99.8k|#endif
  150|  99.8k|        || impl != NULL
  ------------------
  |  Branch (150:12): [True: 0, False: 99.8k]
  ------------------
  151|  99.8k|        || (cipher != NULL && cipher->origin == EVP_ORIG_METH)
  ------------------
  |  |  256|  4.95k|#define EVP_ORIG_METH 2
  ------------------
  |  Branch (151:13): [True: 4.95k, False: 94.8k]
  |  Branch (151:31): [True: 0, False: 4.95k]
  ------------------
  152|  99.8k|        || (cipher == NULL && ctx->cipher != NULL
  ------------------
  |  Branch (152:13): [True: 94.8k, False: 4.95k]
  |  Branch (152:31): [True: 94.8k, False: 0]
  ------------------
  153|  94.8k|            && ctx->cipher->origin == EVP_ORIG_METH)) {
  ------------------
  |  |  256|  94.8k|#define EVP_ORIG_METH 2
  ------------------
  |  Branch (153:16): [True: 0, False: 94.8k]
  ------------------
  154|      0|        if (ctx->cipher == ctx->fetched_cipher)
  ------------------
  |  Branch (154:13): [True: 0, False: 0]
  ------------------
  155|      0|            ctx->cipher = NULL;
  156|      0|        EVP_CIPHER_free(ctx->fetched_cipher);
  157|      0|        ctx->fetched_cipher = NULL;
  158|      0|        goto legacy;
  159|      0|    }
  160|       |    /*
  161|       |     * Ensure a context left lying around from last time is cleared
  162|       |     * (legacy code)
  163|       |     */
  164|  99.8k|    if (cipher != NULL && ctx->cipher != NULL) {
  ------------------
  |  Branch (164:9): [True: 4.95k, False: 94.8k]
  |  Branch (164:27): [True: 0, False: 4.95k]
  ------------------
  165|      0|        if (ctx->cipher->cleanup != NULL && !ctx->cipher->cleanup(ctx))
  ------------------
  |  Branch (165:13): [True: 0, False: 0]
  |  Branch (165:45): [True: 0, False: 0]
  ------------------
  166|      0|            return 0;
  167|      0|        OPENSSL_clear_free(ctx->cipher_data, ctx->cipher->ctx_size);
  ------------------
  |  |  129|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  168|      0|        ctx->cipher_data = NULL;
  169|      0|    }
  170|       |
  171|       |    /* Start of non-legacy code below */
  172|  99.8k|nonlegacy:
  173|       |    /* Ensure a context left lying around from last time is cleared */
  174|  99.8k|    if (cipher != NULL && ctx->cipher != NULL) {
  ------------------
  |  Branch (174:9): [True: 4.95k, False: 94.8k]
  |  Branch (174:27): [True: 0, False: 4.95k]
  ------------------
  175|      0|        unsigned long flags = ctx->flags;
  176|       |
  177|      0|        EVP_CIPHER_CTX_reset(ctx);
  178|       |        /* Restore encrypt and flags */
  179|      0|        ctx->encrypt = enc;
  180|      0|        ctx->flags = flags;
  181|      0|    }
  182|       |
  183|  99.8k|    if (cipher == NULL)
  ------------------
  |  Branch (183:9): [True: 94.8k, False: 4.95k]
  ------------------
  184|  94.8k|        cipher = ctx->cipher;
  185|       |
  186|  99.8k|    if (cipher->prov == NULL) {
  ------------------
  |  Branch (186:9): [True: 0, False: 99.8k]
  ------------------
  187|       |#ifdef FIPS_MODULE
  188|       |        /* We only do explicit fetches inside the FIPS module */
  189|       |        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  190|       |        return 0;
  191|       |#else
  192|      0|        EVP_CIPHER *provciph = EVP_CIPHER_fetch(NULL,
  193|      0|            cipher->nid == NID_undef ? "NULL"
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (193:13): [True: 0, False: 0]
  ------------------
  194|      0|                                     : OBJ_nid2sn(cipher->nid),
  195|      0|            "");
  196|       |
  197|      0|        if (provciph == NULL)
  ------------------
  |  Branch (197:13): [True: 0, False: 0]
  ------------------
  198|      0|            return 0;
  199|      0|        cipher = provciph;
  200|      0|        EVP_CIPHER_free(ctx->fetched_cipher);
  201|      0|        ctx->fetched_cipher = provciph;
  202|      0|#endif
  203|      0|    }
  204|       |
  205|  99.8k|    if (!ossl_assert(cipher->prov != NULL)) {
  ------------------
  |  |   52|  99.8k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  99.8k|    __FILE__, __LINE__)
  ------------------
  |  Branch (205:9): [True: 0, False: 99.8k]
  ------------------
  206|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  207|      0|        return 0;
  208|      0|    }
  209|       |
  210|  99.8k|    if (cipher != ctx->fetched_cipher) {
  ------------------
  |  Branch (210:9): [True: 4.95k, False: 94.8k]
  ------------------
  211|  4.95k|        if (!EVP_CIPHER_up_ref((EVP_CIPHER *)cipher)) {
  ------------------
  |  Branch (211:13): [True: 0, False: 4.95k]
  ------------------
  212|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|            return 0;
  214|      0|        }
  215|  4.95k|        EVP_CIPHER_free(ctx->fetched_cipher);
  216|       |        /* Coverity false positive, the reference counting is confusing it */
  217|       |        /* coverity[use_after_free] */
  218|  4.95k|        ctx->fetched_cipher = (EVP_CIPHER *)cipher;
  219|  4.95k|    }
  220|  99.8k|    ctx->cipher = cipher;
  221|       |
  222|  99.8k|    if (is_pipeline && !EVP_CIPHER_can_pipeline(cipher, enc)) {
  ------------------
  |  Branch (222:9): [True: 0, False: 99.8k]
  |  Branch (222:24): [True: 0, False: 0]
  ------------------
  223|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_PIPELINE_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  224|      0|        return 0;
  225|      0|    }
  226|       |
  227|  99.8k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (227:9): [True: 4.95k, False: 94.8k]
  ------------------
  228|  4.95k|        ctx->algctx = ctx->cipher->newctx(ossl_provider_ctx(cipher->prov));
  229|  4.95k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (229:13): [True: 0, False: 4.95k]
  ------------------
  230|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  231|      0|            return 0;
  232|      0|        }
  233|  4.95k|    }
  234|       |
  235|  99.8k|    if ((ctx->flags & EVP_CIPH_NO_PADDING) != 0) {
  ------------------
  |  |  335|  99.8k|#define EVP_CIPH_NO_PADDING 0x100
  ------------------
  |  Branch (235:9): [True: 0, False: 99.8k]
  ------------------
  236|       |        /*
  237|       |         * If this ctx was already set up for no padding then we need to tell
  238|       |         * the new cipher about it.
  239|       |         */
  240|      0|        if (!EVP_CIPHER_CTX_set_padding(ctx, 0))
  ------------------
  |  Branch (240:13): [True: 0, False: 0]
  ------------------
  241|      0|            return 0;
  242|      0|    }
  243|       |
  244|  99.8k|#ifndef FIPS_MODULE
  245|       |    /*
  246|       |     * Fix for CVE-2023-5363
  247|       |     * Passing in a size as part of the init call takes effect late
  248|       |     * so, force such to occur before the initialisation.
  249|       |     *
  250|       |     * The FIPS provider's internal library context is used in a manner
  251|       |     * such that this is not an issue.
  252|       |     */
  253|  99.8k|    if (params != NULL) {
  ------------------
  |  Branch (253:9): [True: 0, False: 99.8k]
  ------------------
  254|      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 }
  ------------------
  255|      0|            OSSL_PARAM_END };
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
  256|      0|        OSSL_PARAM *q = param_lens;
  257|      0|        const OSSL_PARAM *p;
  258|       |
  259|      0|        p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN);
  ------------------
  |  |  200|      0|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  260|      0|        if (p != NULL)
  ------------------
  |  Branch (260:13): [True: 0, False: 0]
  ------------------
  261|      0|            memcpy(q++, p, sizeof(*q));
  262|       |
  263|       |        /*
  264|       |         * Note that OSSL_CIPHER_PARAM_AEAD_IVLEN is a synonym for
  265|       |         * OSSL_CIPHER_PARAM_IVLEN so both are covered here.
  266|       |         */
  267|      0|        p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_IVLEN);
  ------------------
  |  |  199|      0|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  268|      0|        if (p != NULL)
  ------------------
  |  Branch (268:13): [True: 0, False: 0]
  ------------------
  269|      0|            memcpy(q++, p, sizeof(*q));
  270|       |
  271|      0|        if (q != param_lens) {
  ------------------
  |  Branch (271:13): [True: 0, False: 0]
  ------------------
  272|      0|            if (!EVP_CIPHER_CTX_set_params(ctx, param_lens)) {
  ------------------
  |  Branch (272:17): [True: 0, False: 0]
  ------------------
  273|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  274|      0|                return 0;
  275|      0|            }
  276|      0|        }
  277|      0|    }
  278|  99.8k|#endif
  279|       |
  280|  99.8k|    if (is_pipeline)
  ------------------
  |  Branch (280:9): [True: 0, False: 99.8k]
  ------------------
  281|      0|        return 1;
  282|       |
  283|  99.8k|    if (enc) {
  ------------------
  |  Branch (283:9): [True: 99.8k, False: 0]
  ------------------
  284|  99.8k|        if (ctx->cipher->einit == NULL) {
  ------------------
  |  Branch (284:13): [True: 0, False: 99.8k]
  ------------------
  285|       |            /*
  286|       |             * We still should be able to set the IV using the new API
  287|       |             * if the key is not specified and old API is not available
  288|       |             */
  289|      0|            if (key == NULL && ctx->cipher->einit_skey != NULL) {
  ------------------
  |  Branch (289:17): [True: 0, False: 0]
  |  Branch (289:32): [True: 0, False: 0]
  ------------------
  290|      0|                return ctx->cipher->einit_skey(ctx->algctx, NULL,
  291|      0|                    iv,
  292|      0|                    iv == NULL ? 0
  ------------------
  |  Branch (292:21): [True: 0, False: 0]
  ------------------
  293|      0|                               : EVP_CIPHER_CTX_get_iv_length(ctx),
  294|      0|                    params);
  295|      0|            }
  296|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  297|      0|            return 0;
  298|      0|        }
  299|       |
  300|  99.8k|        return ctx->cipher->einit(ctx->algctx,
  301|  99.8k|            key,
  302|  99.8k|            key == NULL ? 0
  ------------------
  |  Branch (302:13): [True: 29.4k, False: 70.4k]
  ------------------
  303|  99.8k|                        : EVP_CIPHER_CTX_get_key_length(ctx),
  304|  99.8k|            iv,
  305|  99.8k|            iv == NULL ? 0
  ------------------
  |  Branch (305:13): [True: 73.7k, False: 26.1k]
  ------------------
  306|  99.8k|                       : EVP_CIPHER_CTX_get_iv_length(ctx),
  307|  99.8k|            params);
  308|  99.8k|    }
  309|       |
  310|      0|    if (ctx->cipher->dinit == NULL) {
  ------------------
  |  Branch (310:9): [True: 0, False: 0]
  ------------------
  311|       |        /*
  312|       |         * We still should be able to set the IV using the new API
  313|       |         * if the key is not specified and old API is not available
  314|       |         */
  315|      0|        if (key == NULL && ctx->cipher->dinit_skey != NULL) {
  ------------------
  |  Branch (315:13): [True: 0, False: 0]
  |  Branch (315:28): [True: 0, False: 0]
  ------------------
  316|      0|            return ctx->cipher->dinit_skey(ctx->algctx, NULL,
  317|      0|                iv,
  318|      0|                iv == NULL ? 0
  ------------------
  |  Branch (318:17): [True: 0, False: 0]
  ------------------
  319|      0|                           : EVP_CIPHER_CTX_get_iv_length(ctx),
  320|      0|                params);
  321|      0|        }
  322|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  323|      0|        return 0;
  324|      0|    }
  325|       |
  326|      0|    return ctx->cipher->dinit(ctx->algctx,
  327|      0|        key,
  328|      0|        key == NULL ? 0
  ------------------
  |  Branch (328:9): [True: 0, False: 0]
  ------------------
  329|      0|                    : EVP_CIPHER_CTX_get_key_length(ctx),
  330|      0|        iv,
  331|      0|        iv == NULL ? 0
  ------------------
  |  Branch (331:9): [True: 0, False: 0]
  ------------------
  332|      0|                   : EVP_CIPHER_CTX_get_iv_length(ctx),
  333|      0|        params);
  334|       |
  335|       |    /* Code below to be removed when legacy support is dropped. */
  336|      0|legacy:
  337|       |
  338|      0|    if (cipher != NULL) {
  ------------------
  |  Branch (338:9): [True: 0, False: 0]
  ------------------
  339|       |        /*
  340|       |         * Ensure a context left lying around from last time is cleared (we
  341|       |         * previously attempted to avoid this if the same ENGINE and
  342|       |         * EVP_CIPHER could be used).
  343|       |         */
  344|      0|        if (ctx->cipher) {
  ------------------
  |  Branch (344:13): [True: 0, False: 0]
  ------------------
  345|      0|            unsigned long flags = ctx->flags;
  346|      0|            EVP_CIPHER_CTX_reset(ctx);
  347|       |            /* Restore encrypt and flags */
  348|      0|            ctx->encrypt = enc;
  349|      0|            ctx->flags = flags;
  350|      0|        }
  351|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  352|      0|        if (impl != NULL) {
  ------------------
  |  Branch (352:13): [True: 0, False: 0]
  ------------------
  353|      0|            if (!ENGINE_init(impl)) {
  ------------------
  |  Branch (353:17): [True: 0, False: 0]
  ------------------
  354|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  355|      0|                return 0;
  356|      0|            }
  357|      0|        } else {
  358|      0|            impl = tmpimpl;
  359|      0|        }
  360|      0|        if (impl != NULL) {
  ------------------
  |  Branch (360:13): [True: 0, False: 0]
  ------------------
  361|       |            /* There's an ENGINE for this job ... (apparently) */
  362|      0|            const EVP_CIPHER *c = ENGINE_get_cipher(impl, cipher->nid);
  363|       |
  364|      0|            if (c == NULL) {
  ------------------
  |  Branch (364:17): [True: 0, False: 0]
  ------------------
  365|       |                /*
  366|       |                 * One positive side-effect of US's export control history,
  367|       |                 * is that we should at least be able to avoid using US
  368|       |                 * misspellings of "initialisation"?
  369|       |                 */
  370|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  371|      0|                return 0;
  372|      0|            }
  373|       |            /* We'll use the ENGINE's private cipher definition */
  374|      0|            cipher = c;
  375|       |            /*
  376|       |             * Store the ENGINE functional reference so we know 'cipher' came
  377|       |             * from an ENGINE and we need to release it when done.
  378|       |             */
  379|      0|            ctx->engine = impl;
  380|      0|        } else {
  381|      0|            ctx->engine = NULL;
  382|      0|        }
  383|      0|#endif
  384|       |
  385|      0|        ctx->cipher = cipher;
  386|      0|        if (ctx->cipher->ctx_size) {
  ------------------
  |  Branch (386:13): [True: 0, False: 0]
  ------------------
  387|      0|            ctx->cipher_data = OPENSSL_zalloc(ctx->cipher->ctx_size);
  ------------------
  |  |  108|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  388|      0|            if (ctx->cipher_data == NULL) {
  ------------------
  |  Branch (388:17): [True: 0, False: 0]
  ------------------
  389|      0|                ctx->cipher = NULL;
  390|      0|                return 0;
  391|      0|            }
  392|      0|        } else {
  393|      0|            ctx->cipher_data = NULL;
  394|      0|        }
  395|      0|        ctx->key_len = cipher->key_len;
  396|       |        /* Preserve wrap enable flag, zero everything else */
  397|      0|        ctx->flags &= EVP_CIPHER_CTX_FLAG_WRAP_ALLOW;
  ------------------
  |  |  375|      0|#define EVP_CIPHER_CTX_FLAG_WRAP_ALLOW 0x1
  ------------------
  398|      0|        if (ctx->cipher->flags & EVP_CIPH_CTRL_INIT) {
  ------------------
  |  |  331|      0|#define EVP_CIPH_CTRL_INIT 0x40
  ------------------
  |  Branch (398:13): [True: 0, False: 0]
  ------------------
  399|      0|            if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL) <= 0) {
  ------------------
  |  |  379|      0|#define EVP_CTRL_INIT 0x0
  ------------------
  |  Branch (399:17): [True: 0, False: 0]
  ------------------
  400|      0|                ctx->cipher = NULL;
  401|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  402|      0|                return 0;
  403|      0|            }
  404|      0|        }
  405|      0|    }
  406|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  407|      0|skip_to_init:
  408|      0|#endif
  409|      0|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (409:9): [True: 0, False: 0]
  ------------------
  410|      0|        return 0;
  411|       |
  412|       |    /* we assume block size is a power of 2 in *cryptUpdate */
  413|      0|    OPENSSL_assert(ctx->cipher->block_size == 1
  ------------------
  |  |  476|      0|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (476:13): [True: 0, False: 0]
  |  |  |  Branch (476:13): [True: 0, False: 0]
  |  |  |  Branch (476:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  414|      0|        || ctx->cipher->block_size == 8
  415|      0|        || ctx->cipher->block_size == 16);
  416|       |
  417|      0|    if (!(ctx->flags & EVP_CIPHER_CTX_FLAG_WRAP_ALLOW)
  ------------------
  |  |  375|      0|#define EVP_CIPHER_CTX_FLAG_WRAP_ALLOW 0x1
  ------------------
  |  Branch (417:9): [True: 0, False: 0]
  ------------------
  418|      0|        && EVP_CIPHER_CTX_get_mode(ctx) == EVP_CIPH_WRAP_MODE) {
  ------------------
  |  |  674|      0|#define EVP_CIPHER_CTX_get_mode(c) EVP_CIPHER_get_mode(EVP_CIPHER_CTX_get0_cipher(c))
  ------------------
                      && EVP_CIPHER_CTX_get_mode(ctx) == EVP_CIPH_WRAP_MODE) {
  ------------------
  |  |  319|      0|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  |  Branch (418:12): [True: 0, False: 0]
  ------------------
  419|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_WRAP_MODE_NOT_ALLOWED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  420|      0|        return 0;
  421|      0|    }
  422|       |
  423|      0|    if ((EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(ctx))
  ------------------
  |  Branch (423:9): [True: 0, False: 0]
  ------------------
  424|      0|            & EVP_CIPH_CUSTOM_IV)
  ------------------
  |  |  327|      0|#define EVP_CIPH_CUSTOM_IV 0x10
  ------------------
  425|      0|        == 0) {
  426|      0|        switch (EVP_CIPHER_CTX_get_mode(ctx)) {
  ------------------
  |  |  674|      0|#define EVP_CIPHER_CTX_get_mode(c) EVP_CIPHER_get_mode(EVP_CIPHER_CTX_get0_cipher(c))
  ------------------
  427|       |
  428|      0|        case EVP_CIPH_STREAM_CIPHER:
  ------------------
  |  |  310|      0|#define EVP_CIPH_STREAM_CIPHER 0x0
  ------------------
  |  Branch (428:9): [True: 0, False: 0]
  ------------------
  429|      0|        case EVP_CIPH_ECB_MODE:
  ------------------
  |  |  311|      0|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  |  Branch (429:9): [True: 0, False: 0]
  ------------------
  430|      0|            break;
  431|       |
  432|      0|        case EVP_CIPH_CFB_MODE:
  ------------------
  |  |  313|      0|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  |  Branch (432:9): [True: 0, False: 0]
  ------------------
  433|      0|        case EVP_CIPH_OFB_MODE:
  ------------------
  |  |  314|      0|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  |  Branch (433:9): [True: 0, False: 0]
  ------------------
  434|       |
  435|      0|            ctx->num = 0;
  436|       |            /* fall-through */
  437|       |
  438|      0|        case EVP_CIPH_CBC_MODE:
  ------------------
  |  |  312|      0|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (438:9): [True: 0, False: 0]
  ------------------
  439|      0|            n = EVP_CIPHER_CTX_get_iv_length(ctx);
  440|      0|            if (n < 0 || n > (int)sizeof(ctx->iv)) {
  ------------------
  |  Branch (440:17): [True: 0, False: 0]
  |  Branch (440:26): [True: 0, False: 0]
  ------------------
  441|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_IV_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  442|      0|                return 0;
  443|      0|            }
  444|      0|            if (iv != NULL)
  ------------------
  |  Branch (444:17): [True: 0, False: 0]
  ------------------
  445|      0|                memcpy(ctx->oiv, iv, n);
  446|      0|            memcpy(ctx->iv, ctx->oiv, n);
  447|      0|            break;
  448|       |
  449|      0|        case EVP_CIPH_CTR_MODE:
  ------------------
  |  |  315|      0|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  |  Branch (449:9): [True: 0, False: 0]
  ------------------
  450|      0|            ctx->num = 0;
  451|       |            /* Don't reuse IV for CTR mode */
  452|      0|            if (iv != NULL) {
  ------------------
  |  Branch (452:17): [True: 0, False: 0]
  ------------------
  453|      0|                n = EVP_CIPHER_CTX_get_iv_length(ctx);
  454|      0|                if (n <= 0 || n > (int)sizeof(ctx->iv)) {
  ------------------
  |  Branch (454:21): [True: 0, False: 0]
  |  Branch (454:31): [True: 0, False: 0]
  ------------------
  455|      0|                    ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_IV_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  456|      0|                    return 0;
  457|      0|                }
  458|      0|                memcpy(ctx->iv, iv, n);
  459|      0|            }
  460|      0|            break;
  461|       |
  462|      0|        default:
  ------------------
  |  Branch (462:9): [True: 0, False: 0]
  ------------------
  463|      0|            return 0;
  464|      0|        }
  465|      0|    }
  466|       |
  467|      0|    if (key != NULL || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {
  ------------------
  |  |  329|      0|#define EVP_CIPH_ALWAYS_CALL_INIT 0x20
  ------------------
  |  Branch (467:9): [True: 0, False: 0]
  |  Branch (467:24): [True: 0, False: 0]
  ------------------
  468|      0|        if (!ctx->cipher->init(ctx, key, iv, enc))
  ------------------
  |  Branch (468:13): [True: 0, False: 0]
  ------------------
  469|      0|            return 0;
  470|      0|    }
  471|      0|    ctx->buf_len = 0;
  472|      0|    ctx->final_used = 0;
  473|      0|    ctx->block_mask = ctx->cipher->block_size - 1;
  474|      0|    return 1;
  475|      0|}
evp_enc.c:evp_cipher_from_algorithm:
 1892|  81.9k|{
 1893|  81.9k|    const OSSL_DISPATCH *fns = algodef->implementation;
 1894|  81.9k|    EVP_CIPHER *cipher = NULL;
 1895|  81.9k|    int fnciphcnt = 0, encinit = 0, decinit = 0, fnpipecnt = 0, fnctxcnt = 0;
 1896|       |
 1897|  81.9k|    if ((cipher = evp_cipher_new()) == NULL) {
  ------------------
  |  Branch (1897:9): [True: 0, False: 81.9k]
  ------------------
 1898|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1899|      0|        return NULL;
 1900|      0|    }
 1901|       |
 1902|  81.9k|#ifndef FIPS_MODULE
 1903|  81.9k|    cipher->nid = NID_undef;
  ------------------
  |  |   18|  81.9k|#define NID_undef                       0
  ------------------
 1904|  81.9k|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &cipher->nid)
  ------------------
  |  Branch (1904:9): [True: 0, False: 81.9k]
  ------------------
 1905|  81.9k|        || cipher->nid == -1) {
  ------------------
  |  Branch (1905:12): [True: 0, False: 81.9k]
  ------------------
 1906|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1907|      0|        goto err;
 1908|      0|    }
 1909|  81.9k|#endif
 1910|       |
 1911|  81.9k|    cipher->name_id = name_id;
 1912|  81.9k|    if ((cipher->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (1912:9): [True: 0, False: 81.9k]
  ------------------
 1913|      0|        goto err;
 1914|       |
 1915|  81.9k|    cipher->description = algodef->algorithm_description;
 1916|       |
 1917|  1.30M|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1917:12): [True: 1.22M, False: 81.9k]
  ------------------
 1918|  1.22M|        switch (fns->function_id) {
  ------------------
  |  Branch (1918:17): [True: 1.22M, False: 0]
  ------------------
 1919|  81.9k|        case OSSL_FUNC_CIPHER_NEWCTX:
  ------------------
  |  |  351|  81.9k|#define OSSL_FUNC_CIPHER_NEWCTX 1
  ------------------
  |  Branch (1919:9): [True: 81.9k, False: 1.14M]
  ------------------
 1920|  81.9k|            if (cipher->newctx != NULL)
  ------------------
  |  Branch (1920:17): [True: 0, False: 81.9k]
  ------------------
 1921|      0|                break;
 1922|  81.9k|            cipher->newctx = OSSL_FUNC_cipher_newctx(fns);
 1923|  81.9k|            fnctxcnt++;
 1924|  81.9k|            break;
 1925|  81.9k|        case OSSL_FUNC_CIPHER_ENCRYPT_INIT:
  ------------------
  |  |  352|  81.9k|#define OSSL_FUNC_CIPHER_ENCRYPT_INIT 2
  ------------------
  |  Branch (1925:9): [True: 81.9k, False: 1.14M]
  ------------------
 1926|  81.9k|            if (cipher->einit != NULL)
  ------------------
  |  Branch (1926:17): [True: 0, False: 81.9k]
  ------------------
 1927|      0|                break;
 1928|  81.9k|            cipher->einit = OSSL_FUNC_cipher_encrypt_init(fns);
 1929|  81.9k|            encinit = 1;
 1930|  81.9k|            break;
 1931|  81.9k|        case OSSL_FUNC_CIPHER_DECRYPT_INIT:
  ------------------
  |  |  353|  81.9k|#define OSSL_FUNC_CIPHER_DECRYPT_INIT 3
  ------------------
  |  Branch (1931:9): [True: 81.9k, False: 1.14M]
  ------------------
 1932|  81.9k|            if (cipher->dinit != NULL)
  ------------------
  |  Branch (1932:17): [True: 0, False: 81.9k]
  ------------------
 1933|      0|                break;
 1934|  81.9k|            cipher->dinit = OSSL_FUNC_cipher_decrypt_init(fns);
 1935|  81.9k|            decinit = 1;
 1936|  81.9k|            break;
 1937|  42.8k|        case OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT:
  ------------------
  |  |  369|  42.8k|#define OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT 19
  ------------------
  |  Branch (1937:9): [True: 42.8k, False: 1.18M]
  ------------------
 1938|  42.8k|            if (cipher->einit_skey != NULL)
  ------------------
  |  Branch (1938:17): [True: 0, False: 42.8k]
  ------------------
 1939|      0|                break;
 1940|  42.8k|            cipher->einit_skey = OSSL_FUNC_cipher_encrypt_skey_init(fns);
 1941|  42.8k|            encinit = 1;
 1942|  42.8k|            break;
 1943|  42.8k|        case OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT:
  ------------------
  |  |  370|  42.8k|#define OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT 20
  ------------------
  |  Branch (1943:9): [True: 42.8k, False: 1.18M]
  ------------------
 1944|  42.8k|            if (cipher->dinit_skey != NULL)
  ------------------
  |  Branch (1944:17): [True: 0, False: 42.8k]
  ------------------
 1945|      0|                break;
 1946|  42.8k|            cipher->dinit_skey = OSSL_FUNC_cipher_decrypt_skey_init(fns);
 1947|  42.8k|            decinit = 1;
 1948|  42.8k|            break;
 1949|  81.9k|        case OSSL_FUNC_CIPHER_UPDATE:
  ------------------
  |  |  354|  81.9k|#define OSSL_FUNC_CIPHER_UPDATE 4
  ------------------
  |  Branch (1949:9): [True: 81.9k, False: 1.14M]
  ------------------
 1950|  81.9k|            if (cipher->cupdate != NULL)
  ------------------
  |  Branch (1950:17): [True: 0, False: 81.9k]
  ------------------
 1951|      0|                break;
 1952|  81.9k|            cipher->cupdate = OSSL_FUNC_cipher_update(fns);
 1953|  81.9k|            fnciphcnt++;
 1954|  81.9k|            break;
 1955|  81.9k|        case OSSL_FUNC_CIPHER_FINAL:
  ------------------
  |  |  355|  81.9k|#define OSSL_FUNC_CIPHER_FINAL 5
  ------------------
  |  Branch (1955:9): [True: 81.9k, False: 1.14M]
  ------------------
 1956|  81.9k|            if (cipher->cfinal != NULL)
  ------------------
  |  Branch (1956:17): [True: 0, False: 81.9k]
  ------------------
 1957|      0|                break;
 1958|  81.9k|            cipher->cfinal = OSSL_FUNC_cipher_final(fns);
 1959|  81.9k|            fnciphcnt++;
 1960|  81.9k|            break;
 1961|  74.3k|        case OSSL_FUNC_CIPHER_CIPHER:
  ------------------
  |  |  356|  74.3k|#define OSSL_FUNC_CIPHER_CIPHER 6
  ------------------
  |  Branch (1961:9): [True: 74.3k, False: 1.14M]
  ------------------
 1962|  74.3k|            if (cipher->ccipher != NULL)
  ------------------
  |  Branch (1962:17): [True: 0, False: 74.3k]
  ------------------
 1963|      0|                break;
 1964|  74.3k|            cipher->ccipher = OSSL_FUNC_cipher_cipher(fns);
 1965|  74.3k|            break;
 1966|      0|        case OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT:
  ------------------
  |  |  365|      0|#define OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT 15
  ------------------
  |  Branch (1966:9): [True: 0, False: 1.22M]
  ------------------
 1967|      0|            if (cipher->p_einit != NULL)
  ------------------
  |  Branch (1967:17): [True: 0, False: 0]
  ------------------
 1968|      0|                break;
 1969|      0|            cipher->p_einit = OSSL_FUNC_cipher_pipeline_encrypt_init(fns);
 1970|      0|            fnpipecnt++;
 1971|      0|            break;
 1972|      0|        case OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT:
  ------------------
  |  |  366|      0|#define OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT 16
  ------------------
  |  Branch (1972:9): [True: 0, False: 1.22M]
  ------------------
 1973|      0|            if (cipher->p_dinit != NULL)
  ------------------
  |  Branch (1973:17): [True: 0, False: 0]
  ------------------
 1974|      0|                break;
 1975|      0|            cipher->p_dinit = OSSL_FUNC_cipher_pipeline_decrypt_init(fns);
 1976|      0|            fnpipecnt++;
 1977|      0|            break;
 1978|      0|        case OSSL_FUNC_CIPHER_PIPELINE_UPDATE:
  ------------------
  |  |  367|      0|#define OSSL_FUNC_CIPHER_PIPELINE_UPDATE 17
  ------------------
  |  Branch (1978:9): [True: 0, False: 1.22M]
  ------------------
 1979|      0|            if (cipher->p_cupdate != NULL)
  ------------------
  |  Branch (1979:17): [True: 0, False: 0]
  ------------------
 1980|      0|                break;
 1981|      0|            cipher->p_cupdate = OSSL_FUNC_cipher_pipeline_update(fns);
 1982|      0|            fnpipecnt++;
 1983|      0|            break;
 1984|      0|        case OSSL_FUNC_CIPHER_PIPELINE_FINAL:
  ------------------
  |  |  368|      0|#define OSSL_FUNC_CIPHER_PIPELINE_FINAL 18
  ------------------
  |  Branch (1984:9): [True: 0, False: 1.22M]
  ------------------
 1985|      0|            if (cipher->p_cfinal != NULL)
  ------------------
  |  Branch (1985:17): [True: 0, False: 0]
  ------------------
 1986|      0|                break;
 1987|      0|            cipher->p_cfinal = OSSL_FUNC_cipher_pipeline_final(fns);
 1988|      0|            fnpipecnt++;
 1989|      0|            break;
 1990|  81.9k|        case OSSL_FUNC_CIPHER_FREECTX:
  ------------------
  |  |  357|  81.9k|#define OSSL_FUNC_CIPHER_FREECTX 7
  ------------------
  |  Branch (1990:9): [True: 81.9k, False: 1.14M]
  ------------------
 1991|  81.9k|            if (cipher->freectx != NULL)
  ------------------
  |  Branch (1991:17): [True: 0, False: 81.9k]
  ------------------
 1992|      0|                break;
 1993|  81.9k|            cipher->freectx = OSSL_FUNC_cipher_freectx(fns);
 1994|  81.9k|            fnctxcnt++;
 1995|  81.9k|            break;
 1996|  81.2k|        case OSSL_FUNC_CIPHER_DUPCTX:
  ------------------
  |  |  358|  81.2k|#define OSSL_FUNC_CIPHER_DUPCTX 8
  ------------------
  |  Branch (1996:9): [True: 81.2k, False: 1.14M]
  ------------------
 1997|  81.2k|            if (cipher->dupctx != NULL)
  ------------------
  |  Branch (1997:17): [True: 0, False: 81.2k]
  ------------------
 1998|      0|                break;
 1999|  81.2k|            cipher->dupctx = OSSL_FUNC_cipher_dupctx(fns);
 2000|  81.2k|            break;
 2001|  81.9k|        case OSSL_FUNC_CIPHER_GET_PARAMS:
  ------------------
  |  |  359|  81.9k|#define OSSL_FUNC_CIPHER_GET_PARAMS 9
  ------------------
  |  Branch (2001:9): [True: 81.9k, False: 1.14M]
  ------------------
 2002|  81.9k|            if (cipher->get_params != NULL)
  ------------------
  |  Branch (2002:17): [True: 0, False: 81.9k]
  ------------------
 2003|      0|                break;
 2004|  81.9k|            cipher->get_params = OSSL_FUNC_cipher_get_params(fns);
 2005|  81.9k|            break;
 2006|  81.9k|        case OSSL_FUNC_CIPHER_GET_CTX_PARAMS:
  ------------------
  |  |  360|  81.9k|#define OSSL_FUNC_CIPHER_GET_CTX_PARAMS 10
  ------------------
  |  Branch (2006:9): [True: 81.9k, False: 1.14M]
  ------------------
 2007|  81.9k|            if (cipher->get_ctx_params != NULL)
  ------------------
  |  Branch (2007:17): [True: 0, False: 81.9k]
  ------------------
 2008|      0|                break;
 2009|  81.9k|            cipher->get_ctx_params = OSSL_FUNC_cipher_get_ctx_params(fns);
 2010|  81.9k|            break;
 2011|  81.9k|        case OSSL_FUNC_CIPHER_SET_CTX_PARAMS:
  ------------------
  |  |  361|  81.9k|#define OSSL_FUNC_CIPHER_SET_CTX_PARAMS 11
  ------------------
  |  Branch (2011:9): [True: 81.9k, False: 1.14M]
  ------------------
 2012|  81.9k|            if (cipher->set_ctx_params != NULL)
  ------------------
  |  Branch (2012:17): [True: 0, False: 81.9k]
  ------------------
 2013|      0|                break;
 2014|  81.9k|            cipher->set_ctx_params = OSSL_FUNC_cipher_set_ctx_params(fns);
 2015|  81.9k|            break;
 2016|  81.9k|        case OSSL_FUNC_CIPHER_GETTABLE_PARAMS:
  ------------------
  |  |  362|  81.9k|#define OSSL_FUNC_CIPHER_GETTABLE_PARAMS 12
  ------------------
  |  Branch (2016:9): [True: 81.9k, False: 1.14M]
  ------------------
 2017|  81.9k|            if (cipher->gettable_params != NULL)
  ------------------
  |  Branch (2017:17): [True: 0, False: 81.9k]
  ------------------
 2018|      0|                break;
 2019|  81.9k|            cipher->gettable_params = OSSL_FUNC_cipher_gettable_params(fns);
 2020|  81.9k|            break;
 2021|  81.9k|        case OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  363|  81.9k|#define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (2021:9): [True: 81.9k, False: 1.14M]
  ------------------
 2022|  81.9k|            if (cipher->gettable_ctx_params != NULL)
  ------------------
  |  Branch (2022:17): [True: 0, False: 81.9k]
  ------------------
 2023|      0|                break;
 2024|  81.9k|            cipher->gettable_ctx_params = OSSL_FUNC_cipher_gettable_ctx_params(fns);
 2025|  81.9k|            break;
 2026|  81.9k|        case OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  364|  81.9k|#define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS 14
  ------------------
  |  Branch (2026:9): [True: 81.9k, False: 1.14M]
  ------------------
 2027|  81.9k|            if (cipher->settable_ctx_params != NULL)
  ------------------
  |  Branch (2027:17): [True: 0, False: 81.9k]
  ------------------
 2028|      0|                break;
 2029|  81.9k|            cipher->settable_ctx_params = OSSL_FUNC_cipher_settable_ctx_params(fns);
 2030|  81.9k|            break;
 2031|  1.22M|        }
 2032|  1.22M|    }
 2033|  81.9k|    fnciphcnt += encinit + decinit;
 2034|  81.9k|    if ((fnciphcnt != 0 && fnciphcnt != 3 && fnciphcnt != 4)
  ------------------
  |  Branch (2034:10): [True: 81.9k, False: 0]
  |  Branch (2034:28): [True: 81.9k, False: 0]
  |  Branch (2034:46): [True: 0, False: 81.9k]
  ------------------
 2035|  81.9k|        || (fnciphcnt == 0 && cipher->ccipher == NULL && fnpipecnt == 0)
  ------------------
  |  Branch (2035:13): [True: 0, False: 81.9k]
  |  Branch (2035:31): [True: 0, False: 0]
  |  Branch (2035:58): [True: 0, False: 0]
  ------------------
 2036|  81.9k|        || (fnpipecnt != 0 && (fnpipecnt < 3 || cipher->p_cupdate == NULL || cipher->p_cfinal == NULL))
  ------------------
  |  Branch (2036:13): [True: 0, False: 81.9k]
  |  Branch (2036:32): [True: 0, False: 0]
  |  Branch (2036:49): [True: 0, False: 0]
  |  Branch (2036:78): [True: 0, False: 0]
  ------------------
 2037|  81.9k|        || fnctxcnt != 2) {
  ------------------
  |  Branch (2037:12): [True: 0, False: 81.9k]
  ------------------
 2038|       |        /*
 2039|       |         * In order to be a consistent set of functions we must have at least
 2040|       |         * a complete set of "encrypt" functions, or a complete set of "decrypt"
 2041|       |         * functions, or a single "cipher" function. In all cases we need both
 2042|       |         * the "newctx" and "freectx" functions.
 2043|       |         */
 2044|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2045|      0|        goto err;
 2046|      0|    }
 2047|  81.9k|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (2047:9): [True: 81.9k, False: 0]
  |  Branch (2047:25): [True: 0, False: 81.9k]
  ------------------
 2048|      0|        goto err;
 2049|       |
 2050|  81.9k|    cipher->prov = prov;
 2051|       |
 2052|  81.9k|    if (!evp_cipher_cache_constants(cipher)) {
  ------------------
  |  Branch (2052:9): [True: 0, False: 81.9k]
  ------------------
 2053|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2054|      0|        goto err;
 2055|      0|    }
 2056|       |
 2057|  81.9k|    return cipher;
 2058|       |
 2059|      0|err:
 2060|      0|    EVP_CIPHER_free(cipher);
 2061|       |    return NULL;
 2062|  81.9k|}
evp_enc.c:set_legacy_nid:
 1866|   153k|{
 1867|   153k|    int nid;
 1868|   153k|    int *legacy_nid = vlegacy_nid;
 1869|       |    /*
 1870|       |     * We use lowest level function to get the associated method, because
 1871|       |     * higher level functions such as EVP_get_cipherbyname() have changed
 1872|       |     * to look at providers too.
 1873|       |     */
 1874|   153k|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_CIPHER_METH);
  ------------------
  |  |   26|   153k|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
 1875|       |
 1876|   153k|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (1876:9): [True: 0, False: 153k]
  ------------------
 1877|      0|        return;
 1878|   153k|    if (legacy_method == NULL)
  ------------------
  |  Branch (1878:9): [True: 68.6k, False: 84.4k]
  ------------------
 1879|  68.6k|        return;
 1880|  84.4k|    nid = EVP_CIPHER_get_nid(legacy_method);
 1881|  84.4k|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|   168k|#define NID_undef                       0
  ------------------
  |  Branch (1881:9): [True: 16.3k, False: 68.0k]
  |  Branch (1881:37): [True: 0, False: 16.3k]
  ------------------
 1882|      0|        *legacy_nid = -1;
 1883|      0|        return;
 1884|      0|    }
 1885|  84.4k|    *legacy_nid = nid;
 1886|  84.4k|}
evp_enc.c:evp_cipher_up_ref:
 2065|   130k|{
 2066|   130k|    return EVP_CIPHER_up_ref(cipher);
 2067|   130k|}
evp_enc.c:evp_cipher_free:
 2070|   171k|{
 2071|   171k|    EVP_CIPHER_free(cipher);
 2072|   171k|}

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

evp_generic_fetch:
  398|   762k|{
  399|   762k|    struct evp_method_data_st methdata;
  400|   762k|    void *method;
  401|       |
  402|   762k|    methdata.libctx = libctx;
  403|   762k|    methdata.tmp_store = NULL;
  404|       |    method = inner_evp_generic_fetch(&methdata, NULL, operation_id,
  405|   762k|        name, properties,
  406|   762k|        new_method, up_ref_method, free_method);
  407|   762k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  408|   762k|    return method;
  409|   762k|}
evp_generic_fetch_from_prov:
  424|  3.30k|{
  425|  3.30k|    struct evp_method_data_st methdata;
  426|  3.30k|    void *method;
  427|       |
  428|  3.30k|    methdata.libctx = ossl_provider_libctx(prov);
  429|       |    methdata.tmp_store = NULL;
  430|  3.30k|    method = inner_evp_generic_fetch(&methdata, prov, operation_id,
  431|  3.30k|        name, properties,
  432|  3.30k|        new_method, up_ref_method, free_method);
  433|  3.30k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  434|  3.30k|    return method;
  435|  3.30k|}
evp_method_store_cache_flush:
  438|    920|{
  439|    920|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  440|       |
  441|    920|    if (store != NULL)
  ------------------
  |  Branch (441:9): [True: 920, False: 0]
  ------------------
  442|    920|        return ossl_method_store_cache_flush_all(store);
  443|      0|    return 1;
  444|    920|}
evp_method_store_remove_all_provided:
  447|    920|{
  448|    920|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  449|    920|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  450|       |
  451|    920|    if (store != NULL)
  ------------------
  |  Branch (451:9): [True: 920, False: 0]
  ------------------
  452|    920|        return ossl_method_store_remove_all_provided(store, prov);
  453|      0|    return 1;
  454|    920|}
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.19M|{
  661|       |    /*
  662|       |     * For a |prov| that is NULL, the library context will be NULL
  663|       |     */
  664|  1.19M|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  665|  1.19M|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  666|       |
  667|  1.19M|    if (prov == NULL)
  ------------------
  |  Branch (667:9): [True: 378k, False: 814k]
  ------------------
  668|   378k|        number = ossl_namemap_name2num(namemap, legacy_name);
  669|  1.19M|    return ossl_namemap_name2num(namemap, name) == number;
  670|  1.19M|}
evp_names_do_all:
  675|   566k|{
  676|   566k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  677|   566k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  678|       |
  679|   566k|    return ossl_namemap_doall_names(namemap, number, fn, data);
  680|   566k|}
evp_fetch.c:inner_evp_generic_fetch:
  259|   765k|{
  260|   765k|    OSSL_METHOD_STORE *store = get_evp_method_store(methdata->libctx);
  261|   765k|    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|   765k|    const char *const propq = properties != NULL ? properties : "";
  ------------------
  |  Branch (271:31): [True: 86.2k, False: 679k]
  ------------------
  272|   765k|#endif /* FIPS_MODULE */
  273|   765k|    uint32_t meth_id = 0;
  274|   765k|    void *method = NULL;
  275|   765k|    int unsupported, name_id;
  276|       |
  277|   765k|    if (store == NULL || namemap == NULL) {
  ------------------
  |  Branch (277:9): [True: 0, False: 765k]
  |  Branch (277:26): [True: 0, False: 765k]
  ------------------
  278|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|   765k|    if (!ossl_assert(operation_id > 0)) {
  ------------------
  |  |   52|   765k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   765k|    __FILE__, __LINE__)
  ------------------
  |  Branch (286:9): [True: 0, False: 765k]
  ------------------
  287|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|   765k|    name_id = name != NULL ? ossl_namemap_name2num(namemap, name) : 0;
  ------------------
  |  Branch (292:15): [True: 765k, False: 2]
  ------------------
  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|   765k|    if (name_id != 0 && (meth_id = evp_method_id(name_id, operation_id)) == 0) {
  ------------------
  |  Branch (302:9): [True: 733k, False: 31.8k]
  |  Branch (302:25): [True: 0, False: 733k]
  ------------------
  303|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|   765k|    unsupported = name_id == 0;
  312|       |
  313|   765k|    if (meth_id == 0
  ------------------
  |  Branch (313:9): [True: 31.8k, False: 733k]
  ------------------
  314|   733k|        || !ossl_method_store_cache_get(store, prov, meth_id, propq, &method)) {
  ------------------
  |  Branch (314:12): [True: 47.6k, False: 686k]
  ------------------
  315|  79.4k|        OSSL_METHOD_CONSTRUCT_METHOD mcm = {
  316|  79.4k|            get_tmp_evp_method_store,
  317|  79.4k|            reserve_evp_method_store,
  318|  79.4k|            unreserve_evp_method_store,
  319|  79.4k|            get_evp_method_from_store,
  320|  79.4k|            put_evp_method_in_store,
  321|  79.4k|            construct_evp_method,
  322|  79.4k|            destruct_evp_method
  323|  79.4k|        };
  324|       |
  325|  79.4k|        methdata->operation_id = operation_id;
  326|  79.4k|        methdata->name_id = name_id;
  327|  79.4k|        methdata->names = name;
  328|  79.4k|        methdata->propquery = propq;
  329|  79.4k|        methdata->method_from_algorithm = new_method;
  330|  79.4k|        methdata->refcnt_up_method = up_ref_method;
  331|  79.4k|        methdata->destruct_method = free_method;
  332|  79.4k|        methdata->flag_construct_error_occurred = 0;
  333|  79.4k|        if ((method = ossl_method_construct(methdata->libctx, operation_id,
  ------------------
  |  Branch (333:13): [True: 27.8k, False: 51.5k]
  ------------------
  334|  79.4k|                 &prov, 0 /* !force_cache */,
  335|  79.4k|                 &mcm, methdata))
  336|  79.4k|            != 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|  27.8k|            if (name_id == 0)
  ------------------
  |  Branch (349:17): [True: 1.10k, False: 26.7k]
  ------------------
  350|  1.10k|                name_id = ossl_namemap_name2num(namemap, name);
  351|  27.8k|            if (name_id == 0) {
  ------------------
  |  Branch (351:17): [True: 0, False: 27.8k]
  ------------------
  352|      0|                ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  365|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  353|      0|                    "Algorithm %s cannot be found", name);
  354|      0|                free_method(method);
  355|      0|                method = NULL;
  356|  27.8k|            } else {
  357|  27.8k|                meth_id = evp_method_id(name_id, operation_id);
  358|  27.8k|                if (meth_id != 0)
  ------------------
  |  Branch (358:21): [True: 27.8k, False: 0]
  ------------------
  359|  27.8k|                    ossl_method_store_cache_set(store, prov, meth_id, propq,
  360|  27.8k|                        method, up_ref_method, free_method);
  361|  27.8k|            }
  362|  27.8k|        }
  363|       |
  364|       |        /*
  365|       |         * If we never were in the constructor, the algorithm to be fetched
  366|       |         * is unsupported.
  367|       |         */
  368|  79.4k|        unsupported = !methdata->flag_construct_error_occurred;
  369|  79.4k|    }
  370|       |
  371|   765k|    if ((name_id != 0 || name != NULL) && method == NULL) {
  ------------------
  |  Branch (371:10): [True: 735k, False: 30.7k]
  |  Branch (371:26): [True: 30.7k, False: 2]
  |  Branch (371:43): [True: 51.5k, False: 714k]
  ------------------
  372|  51.5k|        int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  364|  51.5k|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|  51.5k|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|  51.5k|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  365|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (372:20): [True: 51.5k, False: 0]
  ------------------
  373|       |
  374|  51.5k|        if (name == NULL)
  ------------------
  |  Branch (374:13): [True: 0, False: 51.5k]
  ------------------
  375|      0|            name = ossl_namemap_num2name(namemap, name_id, 0);
  376|  51.5k|        ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |  406|  51.5k|    (ERR_new(),                                                  \
  |  |  407|  51.5k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  51.5k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  51.5k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |   78|  51.5k|#define ERR_LIB_EVP 6
  ------------------
  377|  51.5k|            "%s, Algorithm (%s : %d), Properties (%s)",
  378|  51.5k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  379|  51.5k|            name == NULL ? "<null>" : name, name_id,
  ------------------
  |  Branch (379:13): [True: 0, False: 51.5k]
  ------------------
  380|  51.5k|            properties == NULL ? "<null>" : properties);
  ------------------
  |  Branch (380:13): [True: 34.7k, False: 16.8k]
  ------------------
  381|   714k|    } else {
  382|   714k|        OSSL_TRACE4(QUERY, "%s, Algorithm (%s : %d), Properties (%s)\n",
  ------------------
  |  |  299|   714k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|   714k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  383|   714k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  384|   714k|            name == NULL ? "<null>" : name, name_id,
  385|   714k|            properties == NULL ? "<null>" : properties);
  386|   714k|    }
  387|       |
  388|   765k|    return method;
  389|   765k|}
evp_fetch.c:evp_method_id:
  117|   979k|{
  118|   979k|    if (!ossl_assert(name_id > 0 && name_id <= METHOD_ID_NAME_MAX)
  ------------------
  |  |   52|  1.95M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 979k, False: 0]
  |  |  |  Branch (52:41): [True: 979k, False: 0]
  |  |  ------------------
  |  |   53|  1.95M|    __FILE__, __LINE__)
  ------------------
  |  Branch (118:9): [True: 0, False: 979k]
  ------------------
  119|   979k|        || !ossl_assert(operation_id > 0
  ------------------
  |  |   52|  1.95M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 979k, False: 0]
  |  |  |  Branch (52:41): [True: 979k, False: 0]
  |  |  ------------------
  |  |   53|   979k|    __FILE__, __LINE__)
  ------------------
  |  Branch (119:12): [True: 0, False: 979k]
  ------------------
  120|   979k|            && operation_id <= METHOD_ID_OPERATION_MAX))
  121|      0|        return 0;
  122|   979k|    return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  114|   979k|#define METHOD_ID_NAME_OFFSET 8
  ------------------
                  return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  113|   979k|#define METHOD_ID_NAME_MASK 0x7FFFFF00
  ------------------
  123|   979k|        | (operation_id & METHOD_ID_OPERATION_MASK));
  ------------------
  |  |  111|   979k|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  124|   979k|}
evp_fetch.c:reserve_evp_method_store:
   73|   142k|{
   74|   142k|    struct evp_method_data_st *methdata = data;
   75|       |
   76|   142k|    if (store == NULL
  ------------------
  |  Branch (76:9): [True: 142k, False: 0]
  ------------------
   77|   142k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (77:12): [True: 0, False: 142k]
  ------------------
   78|      0|        return 0;
   79|       |
   80|   142k|    return ossl_method_lock_store(store);
   81|   142k|}
evp_fetch.c:unreserve_evp_method_store:
   84|   142k|{
   85|   142k|    struct evp_method_data_st *methdata = data;
   86|       |
   87|   142k|    if (store == NULL
  ------------------
  |  Branch (87:9): [True: 142k, False: 0]
  ------------------
   88|   142k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (88:12): [True: 0, False: 142k]
  ------------------
   89|      0|        return 0;
   90|       |
   91|   142k|    return ossl_method_unlock_store(store);
   92|   142k|}
evp_fetch.c:get_evp_method_from_store:
  128|  79.4k|{
  129|  79.4k|    struct evp_method_data_st *methdata = data;
  130|  79.4k|    void *method = NULL;
  131|  79.4k|    int name_id;
  132|  79.4k|    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|  79.4k|    if ((name_id = methdata->name_id) == 0 && methdata->names != NULL) {
  ------------------
  |  Branch (139:9): [True: 31.8k, False: 47.6k]
  |  Branch (139:47): [True: 31.8k, False: 2]
  ------------------
  140|  31.8k|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  141|  31.8k|        const char *names = methdata->names;
  142|  31.8k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|  31.8k|#define NAME_SEPARATOR ':'
  ------------------
  143|  31.8k|        size_t l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (143:21): [True: 31.8k, False: 0]
  ------------------
  144|       |
  145|  31.8k|        if (namemap == 0)
  ------------------
  |  Branch (145:13): [True: 0, False: 31.8k]
  ------------------
  146|      0|            return NULL;
  147|  31.8k|        name_id = ossl_namemap_name2num_n(namemap, names, l);
  148|  31.8k|    }
  149|       |
  150|  79.4k|    if (name_id == 0
  ------------------
  |  Branch (150:9): [True: 30.6k, False: 48.8k]
  ------------------
  151|  48.8k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (151:12): [True: 0, False: 48.8k]
  ------------------
  152|  30.6k|        return NULL;
  153|       |
  154|  48.8k|    if (store == NULL
  ------------------
  |  Branch (154:9): [True: 48.8k, False: 0]
  ------------------
  155|  48.8k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (155:12): [True: 0, False: 48.8k]
  ------------------
  156|      0|        return NULL;
  157|       |
  158|  48.8k|    if (!ossl_method_store_fetch(store, meth_id, methdata->propquery, prov,
  ------------------
  |  Branch (158:9): [True: 20.9k, False: 27.8k]
  ------------------
  159|  48.8k|            &method))
  160|  20.9k|        return NULL;
  161|  27.8k|    return method;
  162|  48.8k|}
evp_fetch.c:put_evp_method_in_store:
  168|   168k|{
  169|   168k|    struct evp_method_data_st *methdata = data;
  170|   168k|    OSSL_NAMEMAP *namemap;
  171|   168k|    int name_id;
  172|   168k|    uint32_t meth_id;
  173|   168k|    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|   168k|    if (names != NULL) {
  ------------------
  |  Branch (181:9): [True: 168k, False: 0]
  ------------------
  182|   168k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|   168k|#define NAME_SEPARATOR ':'
  ------------------
  183|       |
  184|   168k|        l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (184:14): [True: 51.8k, False: 117k]
  ------------------
  185|   168k|    }
  186|       |
  187|   168k|    if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL
  ------------------
  |  Branch (187:9): [True: 0, False: 168k]
  ------------------
  188|   168k|        || (name_id = ossl_namemap_name2num_n(namemap, names, l)) == 0
  ------------------
  |  Branch (188:12): [True: 0, False: 168k]
  ------------------
  189|   168k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (189:12): [True: 0, False: 168k]
  ------------------
  190|      0|        return 0;
  191|       |
  192|   168k|    OSSL_TRACE1(QUERY, "put_evp_method_in_store: original store: %p\n", store);
  ------------------
  |  |  293|   168k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  285|   168k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  193|   168k|    if (store == NULL
  ------------------
  |  Branch (193:9): [True: 168k, False: 0]
  ------------------
  194|   168k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (194:12): [True: 0, False: 168k]
  ------------------
  195|      0|        return 0;
  196|       |
  197|   168k|    OSSL_TRACE5(QUERY,
  ------------------
  |  |  301|   168k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5))
  |  |  ------------------
  |  |  |  |  285|   168k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  198|   168k|        "put_evp_method_in_store: "
  199|   168k|        "store: %p, names: %s, operation_id %d, method_id: %d, properties: %s\n",
  200|   168k|        store, names, methdata->operation_id, meth_id, propdef ? propdef : "<null>");
  201|   168k|    return ossl_method_store_add(store, prov, meth_id, propdef, method,
  202|   168k|        methdata->refcnt_up_method,
  203|   168k|        methdata->destruct_method);
  204|   168k|}
evp_fetch.c:construct_evp_method:
  212|   168k|{
  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|   168k|    struct evp_method_data_st *methdata = data;
  221|   168k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  222|   168k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  223|   168k|    const char *names = algodef->algorithm_names;
  224|   168k|    int name_id = ossl_namemap_add_names(namemap, 0, names, NAME_SEPARATOR);
  ------------------
  |  |   24|   168k|#define NAME_SEPARATOR ':'
  ------------------
  225|   168k|    void *method;
  226|       |
  227|   168k|    if (name_id == 0)
  ------------------
  |  Branch (227:9): [True: 0, False: 168k]
  ------------------
  228|      0|        return NULL;
  229|       |
  230|   168k|    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|   168k|    if (method == NULL)
  ------------------
  |  Branch (237:9): [True: 0, False: 168k]
  ------------------
  238|      0|        methdata->flag_construct_error_occurred = 1;
  239|       |
  240|   168k|    return method;
  241|   168k|}
evp_fetch.c:destruct_evp_method:
  244|   168k|{
  245|   168k|    struct evp_method_data_st *methdata = data;
  246|       |
  247|   168k|    methdata->destruct_method(method);
  248|   168k|}
evp_fetch.c:dealloc_tmp_evp_method_store:
   61|   765k|{
   62|   765k|    OSSL_TRACE1(QUERY, "Deallocating the tmp_store %p\n", store);
  ------------------
  |  |  293|   765k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  285|   765k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   63|   765k|    if (store != NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 765k]
  ------------------
   64|      0|        ossl_method_store_free(store);
   65|   765k|}
evp_fetch.c:get_evp_method_store:
   68|  1.27M|{
   69|  1.27M|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX);
  ------------------
  |  |   96|  1.27M|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
   70|  1.27M|}
evp_fetch.c:filter_on_operation_id:
  623|    536|{
  624|    536|    struct filter_data_st *data = arg;
  625|       |
  626|    536|    if ((id & METHOD_ID_OPERATION_MASK) == data->operation_id)
  ------------------
  |  |  111|    536|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  |  Branch (626:9): [True: 80, False: 456]
  ------------------
  627|     80|        data->user_fn(method, data->user_arg);
  628|    536|}

EVP_CIPHER_get_type:
  255|   115k|{
  256|   115k|    int nid;
  257|   115k|    nid = EVP_CIPHER_get_nid(cipher);
  258|       |
  259|   115k|    switch (nid) {
  260|       |
  261|  1.89k|    case NID_rc2_cbc:
  ------------------
  |  | 1303|  1.89k|#define NID_rc2_cbc             37
  ------------------
  |  Branch (261:5): [True: 1.89k, False: 113k]
  ------------------
  262|  3.15k|    case NID_rc2_64_cbc:
  ------------------
  |  | 1324|  3.15k|#define NID_rc2_64_cbc          166
  ------------------
  |  Branch (262:5): [True: 1.26k, False: 114k]
  ------------------
  263|  4.41k|    case NID_rc2_40_cbc:
  ------------------
  |  | 1320|  4.41k|#define NID_rc2_40_cbc          98
  ------------------
  |  Branch (263:5): [True: 1.26k, False: 114k]
  ------------------
  264|       |
  265|  4.41k|        return NID_rc2_cbc;
  ------------------
  |  | 1303|  4.41k|#define NID_rc2_cbc             37
  ------------------
  266|       |
  267|    630|    case NID_rc4:
  ------------------
  |  | 1328|    630|#define NID_rc4         5
  ------------------
  |  Branch (267:5): [True: 630, False: 114k]
  ------------------
  268|  1.26k|    case NID_rc4_40:
  ------------------
  |  | 1333|  1.26k|#define NID_rc4_40              97
  ------------------
  |  Branch (268:5): [True: 630, False: 114k]
  ------------------
  269|       |
  270|  1.26k|        return NID_rc4;
  ------------------
  |  | 1328|  1.26k|#define NID_rc4         5
  ------------------
  271|       |
  272|    630|    case NID_aes_128_cfb128:
  ------------------
  |  | 3112|    630|#define NID_aes_128_cfb128              421
  ------------------
  |  Branch (272:5): [True: 630, False: 114k]
  ------------------
  273|  1.26k|    case NID_aes_128_cfb8:
  ------------------
  |  | 3233|  1.26k|#define NID_aes_128_cfb8                653
  ------------------
  |  Branch (273:5): [True: 630, False: 114k]
  ------------------
  274|  1.89k|    case NID_aes_128_cfb1:
  ------------------
  |  | 3221|  1.89k|#define NID_aes_128_cfb1                650
  ------------------
  |  Branch (274:5): [True: 630, False: 114k]
  ------------------
  275|       |
  276|  1.89k|        return NID_aes_128_cfb128;
  ------------------
  |  | 3112|  1.89k|#define NID_aes_128_cfb128              421
  ------------------
  277|       |
  278|    630|    case NID_aes_192_cfb128:
  ------------------
  |  | 3150|    630|#define NID_aes_192_cfb128              425
  ------------------
  |  Branch (278:5): [True: 630, False: 114k]
  ------------------
  279|  1.26k|    case NID_aes_192_cfb8:
  ------------------
  |  | 3237|  1.26k|#define NID_aes_192_cfb8                654
  ------------------
  |  Branch (279:5): [True: 630, False: 114k]
  ------------------
  280|  1.89k|    case NID_aes_192_cfb1:
  ------------------
  |  | 3225|  1.89k|#define NID_aes_192_cfb1                651
  ------------------
  |  Branch (280:5): [True: 630, False: 114k]
  ------------------
  281|       |
  282|  1.89k|        return NID_aes_192_cfb128;
  ------------------
  |  | 3150|  1.89k|#define NID_aes_192_cfb128              425
  ------------------
  283|       |
  284|    630|    case NID_aes_256_cfb128:
  ------------------
  |  | 3188|    630|#define NID_aes_256_cfb128              429
  ------------------
  |  Branch (284:5): [True: 630, False: 114k]
  ------------------
  285|  1.26k|    case NID_aes_256_cfb8:
  ------------------
  |  | 3241|  1.26k|#define NID_aes_256_cfb8                655
  ------------------
  |  Branch (285:5): [True: 630, False: 114k]
  ------------------
  286|  1.89k|    case NID_aes_256_cfb1:
  ------------------
  |  | 3229|  1.89k|#define NID_aes_256_cfb1                652
  ------------------
  |  Branch (286:5): [True: 630, False: 114k]
  ------------------
  287|       |
  288|  1.89k|        return NID_aes_256_cfb128;
  ------------------
  |  | 3188|  1.89k|#define NID_aes_256_cfb128              429
  ------------------
  289|       |
  290|    630|    case NID_des_cfb64:
  ------------------
  |  | 2282|    630|#define NID_des_cfb64           30
  ------------------
  |  Branch (290:5): [True: 630, False: 114k]
  ------------------
  291|  1.26k|    case NID_des_cfb8:
  ------------------
  |  | 3273|  1.26k|#define NID_des_cfb8            657
  ------------------
  |  Branch (291:5): [True: 630, False: 114k]
  ------------------
  292|  1.89k|    case NID_des_cfb1:
  ------------------
  |  | 3269|  1.89k|#define NID_des_cfb1            656
  ------------------
  |  Branch (292:5): [True: 630, False: 114k]
  ------------------
  293|       |
  294|  1.89k|        return NID_des_cfb64;
  ------------------
  |  | 2282|  1.89k|#define NID_des_cfb64           30
  ------------------
  295|       |
  296|    630|    case NID_des_ede3_cfb64:
  ------------------
  |  | 2323|    630|#define NID_des_ede3_cfb64              61
  ------------------
  |  Branch (296:5): [True: 630, False: 114k]
  ------------------
  297|  1.26k|    case NID_des_ede3_cfb8:
  ------------------
  |  | 3281|  1.26k|#define NID_des_ede3_cfb8               659
  ------------------
  |  Branch (297:5): [True: 630, False: 114k]
  ------------------
  298|  1.89k|    case NID_des_ede3_cfb1:
  ------------------
  |  | 3277|  1.89k|#define NID_des_ede3_cfb1               658
  ------------------
  |  Branch (298:5): [True: 630, False: 114k]
  ------------------
  299|       |
  300|  1.89k|        return NID_des_cfb64;
  ------------------
  |  | 2282|  1.89k|#define NID_des_cfb64           30
  ------------------
  301|       |
  302|   100k|    default:
  ------------------
  |  Branch (302:5): [True: 100k, False: 15.1k]
  ------------------
  303|       |#ifdef FIPS_MODULE
  304|       |        return NID_undef;
  305|       |#else
  306|   100k|    {
  307|       |        /* Check it has an OID and it is valid */
  308|   100k|        ASN1_OBJECT *otmp = OBJ_nid2obj(nid);
  309|       |
  310|   100k|        if (OBJ_get0_data(otmp) == NULL)
  ------------------
  |  Branch (310:13): [True: 30.2k, False: 69.9k]
  ------------------
  311|  30.2k|            nid = NID_undef;
  ------------------
  |  |   18|  30.2k|#define NID_undef                       0
  ------------------
  312|   100k|        ASN1_OBJECT_free(otmp);
  313|   100k|        return nid;
  314|  1.26k|    }
  315|   115k|#endif
  316|   115k|    }
  317|   115k|}
evp_cipher_cache_constants:
  320|  81.9k|{
  321|  81.9k|    int ok, aead = 0, custom_iv = 0, cts = 0, multiblock = 0, randkey = 0;
  322|  81.9k|    int encrypt_then_mac = 0;
  323|  81.9k|    size_t ivlen = 0;
  324|  81.9k|    size_t blksz = 0;
  325|  81.9k|    size_t keylen = 0;
  326|  81.9k|    unsigned int mode = 0;
  327|  81.9k|    OSSL_PARAM params[11];
  328|       |
  329|  81.9k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  189|  81.9k|# define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  330|  81.9k|    params[1] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN, &ivlen);
  ------------------
  |  |  199|  81.9k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  331|  81.9k|    params[2] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &keylen);
  ------------------
  |  |  200|  81.9k|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  332|  81.9k|    params[3] = OSSL_PARAM_construct_uint(OSSL_CIPHER_PARAM_MODE, &mode);
  ------------------
  |  |  201|  81.9k|# define OSSL_CIPHER_PARAM_MODE "mode"
  ------------------
  333|  81.9k|    params[4] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_AEAD, &aead);
  ------------------
  |  |  175|  81.9k|# define OSSL_CIPHER_PARAM_AEAD "aead"
  ------------------
  334|  81.9k|    params[5] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CUSTOM_IV,
  ------------------
  |  |  192|  81.9k|# define OSSL_CIPHER_PARAM_CUSTOM_IV "custom-iv"
  ------------------
  335|  81.9k|        &custom_iv);
  336|  81.9k|    params[6] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CTS, &cts);
  ------------------
  |  |  190|  81.9k|# define OSSL_CIPHER_PARAM_CTS "cts"
  ------------------
  337|  81.9k|    params[7] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK,
  ------------------
  |  |  209|  81.9k|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK "tls-multi"
  ------------------
  338|  81.9k|        &multiblock);
  339|  81.9k|    params[8] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_HAS_RAND_KEY,
  ------------------
  |  |  197|  81.9k|# define OSSL_CIPHER_PARAM_HAS_RAND_KEY "has-randkey"
  ------------------
  340|  81.9k|        &randkey);
  341|  81.9k|    params[9] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC,
  ------------------
  |  |  194|  81.9k|# define OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC "encrypt-then-mac"
  ------------------
  342|  81.9k|        &encrypt_then_mac);
  343|  81.9k|    params[10] = OSSL_PARAM_construct_end();
  344|  81.9k|    ok = evp_do_ciph_getparams(cipher, params) > 0;
  345|  81.9k|    if (ok) {
  ------------------
  |  Branch (345:9): [True: 81.9k, False: 0]
  ------------------
  346|  81.9k|        cipher->block_size = (int)blksz;
  347|  81.9k|        cipher->iv_len = (int)ivlen;
  348|  81.9k|        cipher->key_len = (int)keylen;
  349|  81.9k|        cipher->flags = mode;
  350|  81.9k|        if (aead)
  ------------------
  |  Branch (350:13): [True: 17.6k, False: 64.2k]
  ------------------
  351|  17.6k|            cipher->flags |= EVP_CIPH_FLAG_AEAD_CIPHER;
  ------------------
  |  |  357|  17.6k|#define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
  ------------------
  352|  81.9k|        if (custom_iv)
  ------------------
  |  Branch (352:13): [True: 25.8k, False: 56.0k]
  ------------------
  353|  25.8k|            cipher->flags |= EVP_CIPH_CUSTOM_IV;
  ------------------
  |  |  327|  25.8k|#define EVP_CIPH_CUSTOM_IV 0x10
  ------------------
  354|  81.9k|        if (cts)
  ------------------
  |  Branch (354:13): [True: 3.78k, False: 78.1k]
  ------------------
  355|  3.78k|            cipher->flags |= EVP_CIPH_FLAG_CTS;
  ------------------
  |  |  355|  3.78k|#define EVP_CIPH_FLAG_CTS 0x4000
  ------------------
  356|  81.9k|        if (multiblock)
  ------------------
  |  Branch (356:13): [True: 2.52k, False: 79.3k]
  ------------------
  357|  2.52k|            cipher->flags |= EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK;
  ------------------
  |  |  358|  2.52k|#define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0x400000
  ------------------
  358|  81.9k|        if (cipher->ccipher != NULL)
  ------------------
  |  Branch (358:13): [True: 74.3k, False: 7.56k]
  ------------------
  359|  74.3k|            cipher->flags |= EVP_CIPH_FLAG_CUSTOM_CIPHER;
  ------------------
  |  |  356|  74.3k|#define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000
  ------------------
  360|  81.9k|        if (randkey)
  ------------------
  |  Branch (360:13): [True: 6.93k, False: 74.9k]
  ------------------
  361|  6.93k|            cipher->flags |= EVP_CIPH_RAND_KEY;
  ------------------
  |  |  337|  6.93k|#define EVP_CIPH_RAND_KEY 0x200
  ------------------
  362|  81.9k|        if (encrypt_then_mac)
  ------------------
  |  Branch (362:13): [True: 0, False: 81.9k]
  ------------------
  363|      0|            cipher->flags |= EVP_CIPH_FLAG_ENC_THEN_MAC;
  ------------------
  |  |  368|      0|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  364|  81.9k|        if (OSSL_PARAM_locate_const(EVP_CIPHER_gettable_ctx_params(cipher),
  ------------------
  |  Branch (364:13): [True: 0, False: 81.9k]
  ------------------
  365|  81.9k|                OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS))
  ------------------
  |  |  187|  81.9k|# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
  |  |  ------------------
  |  |  |  |  126|  81.9k|# define OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS "algorithm-id-params"
  |  |  ------------------
  ------------------
  366|      0|            cipher->flags |= EVP_CIPH_FLAG_CUSTOM_ASN1;
  ------------------
  |  |  362|      0|#define EVP_CIPH_FLAG_CUSTOM_ASN1 0x1000000
  ------------------
  367|  81.9k|    }
  368|  81.9k|    return ok;
  369|  81.9k|}
EVP_CIPHER_get_iv_length:
  491|  1.65k|{
  492|  1.65k|    return (cipher == NULL) ? 0 : cipher->iv_len;
  ------------------
  |  Branch (492:12): [True: 0, False: 1.65k]
  ------------------
  493|  1.65k|}
EVP_CIPHER_CTX_get_iv_length:
  496|  26.1k|{
  497|  26.1k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (497:9): [True: 0, False: 26.1k]
  ------------------
  498|      0|        return 0;
  499|       |
  500|  26.1k|    if (ctx->iv_len < 0) {
  ------------------
  |  Branch (500:9): [True: 1.65k, False: 24.4k]
  ------------------
  501|  1.65k|        int rv, len = EVP_CIPHER_get_iv_length(ctx->cipher);
  502|  1.65k|        size_t v = len;
  503|  1.65k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  1.65k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  1.65k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  504|       |
  505|  1.65k|        if (ctx->cipher->get_ctx_params != NULL) {
  ------------------
  |  Branch (505:13): [True: 1.65k, False: 0]
  ------------------
  506|  1.65k|            params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN,
  ------------------
  |  |  199|  1.65k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  507|  1.65k|                &v);
  508|  1.65k|            rv = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  509|  1.65k|            if (rv > 0) {
  ------------------
  |  Branch (509:17): [True: 1.65k, False: 0]
  ------------------
  510|  1.65k|                if (OSSL_PARAM_modified(params)
  ------------------
  |  Branch (510:21): [True: 1.65k, False: 0]
  ------------------
  511|  1.65k|                    && !OSSL_PARAM_get_int(params, &len))
  ------------------
  |  Branch (511:24): [True: 0, False: 1.65k]
  ------------------
  512|      0|                    return -1;
  513|  1.65k|            } else if (rv != EVP_CTRL_RET_UNSUPPORTED) {
  ------------------
  |  |   13|      0|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  |  Branch (513:24): [True: 0, False: 0]
  ------------------
  514|      0|                return -1;
  515|      0|            }
  516|  1.65k|        }
  517|       |        /* Code below to be removed when legacy support is dropped. */
  518|      0|        else if ((EVP_CIPHER_get_flags(ctx->cipher)
  ------------------
  |  Branch (518:18): [True: 0, False: 0]
  ------------------
  519|      0|                     & EVP_CIPH_CUSTOM_IV_LENGTH)
  ------------------
  |  |  341|      0|#define EVP_CIPH_CUSTOM_IV_LENGTH 0x800
  ------------------
  520|      0|            != 0) {
  521|      0|            rv = EVP_CIPHER_CTX_ctrl((EVP_CIPHER_CTX *)ctx, EVP_CTRL_GET_IVLEN,
  ------------------
  |  |  442|      0|#define EVP_CTRL_GET_IVLEN 0x25
  ------------------
  522|      0|                0, &len);
  523|      0|            if (rv <= 0)
  ------------------
  |  Branch (523:17): [True: 0, False: 0]
  ------------------
  524|      0|                return -1;
  525|      0|        }
  526|       |        /*-
  527|       |         * Casting away the const is annoying but required here.  We need to
  528|       |         * cache the result for performance reasons.
  529|       |         */
  530|  1.65k|        ((EVP_CIPHER_CTX *)ctx)->iv_len = len;
  531|  1.65k|    }
  532|  26.1k|    return ctx->iv_len;
  533|  26.1k|}
EVP_CIPHER_get_key_length:
  638|  1.65k|{
  639|  1.65k|    return cipher->key_len;
  640|  1.65k|}
EVP_CIPHER_CTX_get_key_length:
  643|  70.4k|{
  644|  70.4k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (644:9): [True: 0, False: 70.4k]
  ------------------
  645|      0|        return 0;
  646|       |
  647|  70.4k|    if (ctx->key_len <= 0 && ctx->cipher->prov != NULL) {
  ------------------
  |  Branch (647:9): [True: 4.95k, False: 65.4k]
  |  Branch (647:30): [True: 4.95k, False: 0]
  ------------------
  648|  4.95k|        int ok;
  649|  4.95k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.95k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.95k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  650|  4.95k|        size_t len;
  651|       |
  652|  4.95k|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &len);
  ------------------
  |  |  200|  4.95k|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  653|  4.95k|        ok = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  654|  4.95k|        if (ok <= 0)
  ------------------
  |  Branch (654:13): [True: 0, False: 4.95k]
  ------------------
  655|      0|            return EVP_CTRL_RET_UNSUPPORTED;
  ------------------
  |  |   13|      0|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  656|       |
  657|       |        /*-
  658|       |         * The if branch should never be taken since EVP_MAX_KEY_LENGTH is
  659|       |         * less than INT_MAX but best to be safe.
  660|       |         *
  661|       |         * Casting away the const is annoying but required here.  We need to
  662|       |         * cache the result for performance reasons.
  663|       |         */
  664|  4.95k|        if (!OSSL_PARAM_get_int(params, &((EVP_CIPHER_CTX *)ctx)->key_len))
  ------------------
  |  Branch (664:13): [True: 0, False: 4.95k]
  ------------------
  665|      0|            return -1;
  666|  4.95k|        ((EVP_CIPHER_CTX *)ctx)->key_len = (int)len;
  667|  4.95k|    }
  668|  70.4k|    return ctx->key_len;
  669|  70.4k|}
EVP_CIPHER_get_nid:
  672|   199k|{
  673|   199k|    return (cipher == NULL) ? NID_undef : cipher->nid;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (673:12): [True: 0, False: 199k]
  ------------------
  674|   199k|}
EVP_CIPHER_get0_provider:
  728|   119k|{
  729|   119k|    return cipher->prov;
  730|   119k|}
EVP_MD_is_a:
  738|   378k|{
  739|   378k|    if (md == NULL)
  ------------------
  |  Branch (739:9): [True: 0, False: 378k]
  ------------------
  740|      0|        return 0;
  741|   378k|    if (md->prov != NULL)
  ------------------
  |  Branch (741:9): [True: 0, False: 378k]
  ------------------
  742|      0|        return evp_is_a(md->prov, md->name_id, NULL, name);
  743|   378k|    return evp_is_a(NULL, 0, EVP_MD_get0_name(md), name);
  744|   378k|}
EVP_MD_get0_name:
  763|   756k|{
  764|   756k|    if (md == NULL)
  ------------------
  |  Branch (764:9): [True: 0, False: 756k]
  ------------------
  765|      0|        return NULL;
  766|   756k|    if (md->type_name != NULL)
  ------------------
  |  Branch (766:9): [True: 0, False: 756k]
  ------------------
  767|      0|        return md->type_name;
  768|   756k|#ifndef FIPS_MODULE
  769|   756k|    return OBJ_nid2sn(EVP_MD_nid(md));
  ------------------
  |  |  554|   756k|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  770|       |#else
  771|       |    return NULL;
  772|       |#endif
  773|   756k|}
EVP_MD_get0_provider:
  786|   402k|{
  787|   402k|    return md->prov;
  788|   402k|}
EVP_MD_get_type:
  791|  1.24M|{
  792|  1.24M|    return md->type;
  793|  1.24M|}
EVP_MD_get_size:
  810|   773k|{
  811|   773k|    if (md == NULL) {
  ------------------
  |  Branch (811:9): [True: 0, False: 773k]
  ------------------
  812|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_MESSAGE_DIGEST_IS_NULL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  813|      0|        return -1;
  814|      0|    }
  815|   773k|    return md->md_size;
  816|   773k|}
EVP_MD_xof:
  819|  10.3k|{
  820|  10.3k|    return md != NULL && ((EVP_MD_get_flags(md) & EVP_MD_FLAG_XOF) != 0);
  ------------------
  |  |  179|  10.3k|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
  |  Branch (820:12): [True: 10.3k, False: 0]
  |  Branch (820:26): [True: 8.86k, False: 1.47k]
  ------------------
  821|  10.3k|}
EVP_MD_get_flags:
  824|  10.3k|{
  825|  10.3k|    return md->flags;
  826|  10.3k|}
evp_md_free_int:
  862|  17.0k|{
  863|  17.0k|    OPENSSL_free(md->type_name);
  ------------------
  |  |  131|  17.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  864|  17.0k|    ossl_provider_free(md->prov);
  865|  17.0k|    CRYPTO_FREE_REF(&md->refcnt);
  866|  17.0k|    OPENSSL_free(md);
  ------------------
  |  |  131|  17.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  867|  17.0k|}
EVP_MD_CTX_get0_md:
 1014|   398k|{
 1015|   398k|    if (ctx == NULL)
  ------------------
  |  Branch (1015:9): [True: 0, False: 398k]
  ------------------
 1016|      0|        return NULL;
 1017|   398k|    return ctx->reqdigest;
 1018|   398k|}
EVP_MD_CTX_get_size_ex:
 1033|   388k|{
 1034|   388k|    EVP_MD_CTX *c = (EVP_MD_CTX *)ctx;
 1035|   388k|    const OSSL_PARAM *gettables;
 1036|       |
 1037|   388k|    gettables = EVP_MD_CTX_gettable_params(c);
 1038|   388k|    if (gettables != NULL
  ------------------
  |  Branch (1038:9): [True: 0, False: 388k]
  ------------------
 1039|      0|        && OSSL_PARAM_locate_const(gettables,
  ------------------
  |  Branch (1039:12): [True: 0, False: 0]
  ------------------
 1040|      0|               OSSL_DIGEST_PARAM_SIZE)
  ------------------
  |  |  229|      0|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
 1041|      0|            != NULL) {
 1042|      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 }
  ------------------
 1043|      0|        size_t sz = 0;
 1044|       |
 1045|       |        /*
 1046|       |         * For XOF's EVP_MD_get_size() returns 0
 1047|       |         * So try to get the xoflen instead. This will return -1 if the
 1048|       |         * xof length has not been set.
 1049|       |         */
 1050|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_SIZE, &sz);
  ------------------
  |  |  229|      0|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
 1051|      0|        if (EVP_MD_CTX_get_params(c, params) != 1
  ------------------
  |  Branch (1051:13): [True: 0, False: 0]
  ------------------
 1052|      0|            || sz > INT_MAX
  ------------------
  |  Branch (1052:16): [True: 0, False: 0]
  ------------------
 1053|      0|            || sz == 0)
  ------------------
  |  Branch (1053:16): [True: 0, False: 0]
  ------------------
 1054|      0|            return -1;
 1055|      0|        return (int)sz;
 1056|      0|    }
 1057|       |    /* Normal digests have a constant fixed size output */
 1058|   388k|    return EVP_MD_get_size(EVP_MD_CTX_get0_md(ctx));
 1059|   388k|}
EVP_MD_CTX_set_flags:
 1106|   765k|{
 1107|   765k|    ctx->flags |= flags;
 1108|   765k|}
EVP_MD_CTX_clear_flags:
 1111|   410k|{
 1112|   410k|    ctx->flags &= ~flags;
 1113|   410k|}
EVP_MD_CTX_test_flags:
 1116|   386k|{
 1117|   386k|    return (ctx->flags & flags);
 1118|   386k|}
EVP_PKEY_CTX_set_group_name:
 1155|  3.56k|{
 1156|  3.56k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  3.56k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  3.56k|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1157|       |
 1158|  3.56k|    if (ctx == NULL || !EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  753|  3.56k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1799|  3.56k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1762|  3.56k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1763|  3.56k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1158:9): [True: 0, False: 3.56k]
  |  Branch (1158:24): [True: 0, False: 3.56k]
  ------------------
 1159|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_COMMAND_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1160|       |        /* Uses the same return values as EVP_PKEY_CTX_ctrl */
 1161|      0|        return -2;
 1162|      0|    }
 1163|       |
 1164|  3.56k|    if (name == NULL)
  ------------------
  |  Branch (1164:9): [True: 0, False: 3.56k]
  ------------------
 1165|      0|        return -1;
 1166|       |
 1167|  3.56k|    params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  420|  3.56k|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1168|  3.56k|        (char *)name, 0);
 1169|  3.56k|    return EVP_PKEY_CTX_set_params(ctx, params);
 1170|  3.56k|}
EVP_PKEY_Q_keygen:
 1221|  2.81k|{
 1222|  2.81k|    va_list args;
 1223|  2.81k|    size_t bits;
 1224|  2.81k|    char *name;
 1225|  2.81k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  2.81k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  2.81k|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1226|  2.81k|    EVP_PKEY *ret = NULL;
 1227|       |
 1228|  2.81k|    va_start(args, type);
 1229|       |
 1230|  2.81k|    if (OPENSSL_strcasecmp(type, "RSA") == 0) {
  ------------------
  |  Branch (1230:9): [True: 0, False: 2.81k]
  ------------------
 1231|      0|        bits = va_arg(args, size_t);
 1232|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_PKEY_PARAM_RSA_BITS, &bits);
  ------------------
  |  |  442|      0|# define OSSL_PKEY_PARAM_RSA_BITS OSSL_PKEY_PARAM_BITS
  |  |  ------------------
  |  |  |  |  366|      0|# define OSSL_PKEY_PARAM_BITS "bits"
  |  |  ------------------
  ------------------
 1233|  2.81k|    } else if (OPENSSL_strcasecmp(type, "EC") == 0) {
  ------------------
  |  Branch (1233:16): [True: 0, False: 2.81k]
  ------------------
 1234|      0|        name = va_arg(args, char *);
 1235|      0|        params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  420|      0|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1236|      0|            name, 0);
 1237|      0|    }
 1238|       |
 1239|  2.81k|    ret = evp_pkey_keygen(libctx, type, propq, params);
 1240|       |
 1241|       |    va_end(args);
 1242|  2.81k|    return ret;
 1243|  2.81k|}
evp_lib.c:evp_pkey_keygen:
 1206|  2.81k|{
 1207|  2.81k|    EVP_PKEY *pkey = NULL;
 1208|  2.81k|    EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_name(libctx, name, propq);
 1209|       |
 1210|  2.81k|    if (ctx != NULL
  ------------------
  |  Branch (1210:9): [True: 2.81k, False: 0]
  ------------------
 1211|  2.81k|        && EVP_PKEY_keygen_init(ctx) > 0
  ------------------
  |  Branch (1211:12): [True: 2.81k, False: 0]
  ------------------
 1212|  2.81k|        && EVP_PKEY_CTX_set_params(ctx, params))
  ------------------
  |  Branch (1212:12): [True: 2.81k, False: 0]
  ------------------
 1213|  2.81k|        (void)EVP_PKEY_generate(ctx, &pkey);
 1214|       |
 1215|  2.81k|    EVP_PKEY_CTX_free(ctx);
 1216|  2.81k|    return pkey;
 1217|  2.81k|}

EVP_PBE_cleanup:
  295|      1|{
  296|      1|    sk_EVP_PBE_CTL_pop_free(pbe_algs, free_evp_pbe_ctl);
  297|       |    pbe_algs = NULL;
  298|      1|}

EVP_PKEY_type:
   64|   655k|{
   65|   655k|#ifndef OPENSSL_NO_DEPRECATED_3_6
   66|   655k|    int ret;
   67|   655k|    const EVP_PKEY_ASN1_METHOD *ameth;
   68|   655k|    ENGINE *e;
   69|       |
   70|   655k|    ameth = EVP_PKEY_asn1_find(&e, type);
   71|   655k|    if (ameth)
  ------------------
  |  Branch (71:9): [True: 557k, False: 97.7k]
  ------------------
   72|   557k|        ret = ameth->pkey_id;
   73|  97.7k|    else
   74|  97.7k|        ret = NID_undef;
  ------------------
  |  |   18|  97.7k|#define NID_undef                       0
  ------------------
   75|   655k|#ifndef OPENSSL_NO_ENGINE
   76|   655k|    ENGINE_finish(e);
   77|   655k|#endif
   78|   655k|    return ret;
   79|       |#else
   80|       |    size_t i;
   81|       |
   82|       |    for (i = 0; i < OSSL_NELEM(base_id_conversion); i++) {
   83|       |        if (type == base_id_conversion[i].pkey_id)
   84|       |            return base_id_conversion[i].pkey_base_id;
   85|       |    }
   86|       |    return NID_undef;
   87|       |#endif
   88|   655k|}

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

EVP_KEYEXCH_free:
  162|  15.3k|{
  163|  15.3k|    int i;
  164|       |
  165|  15.3k|    if (exchange == NULL)
  ------------------
  |  Branch (165:9): [True: 0, False: 15.3k]
  ------------------
  166|      0|        return;
  167|  15.3k|    CRYPTO_DOWN_REF(&exchange->refcnt, &i);
  168|  15.3k|    if (i > 0)
  ------------------
  |  Branch (168:9): [True: 10.9k, False: 4.41k]
  ------------------
  169|  10.9k|        return;
  170|  4.41k|    OPENSSL_free(exchange->type_name);
  ------------------
  |  |  131|  4.41k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  171|  4.41k|    ossl_provider_free(exchange->prov);
  172|  4.41k|    CRYPTO_FREE_REF(&exchange->refcnt);
  173|  4.41k|    OPENSSL_free(exchange);
  ------------------
  |  |  131|  4.41k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  174|  4.41k|}
EVP_KEYEXCH_up_ref:
  177|  10.9k|{
  178|  10.9k|    int ref = 0;
  179|       |
  180|  10.9k|    CRYPTO_UP_REF(&exchange->refcnt, &ref);
  181|  10.9k|    return 1;
  182|  10.9k|}
EVP_KEYEXCH_fetch:
  191|  5.56k|{
  192|  5.56k|    return evp_generic_fetch(ctx, OSSL_OP_KEYEXCH, algorithm, properties,
  ------------------
  |  |  289|  5.56k|#define OSSL_OP_KEYEXCH 11
  ------------------
  193|  5.56k|        evp_keyexch_from_algorithm,
  194|  5.56k|        evp_keyexch_up_ref,
  195|  5.56k|        evp_keyexch_free);
  196|  5.56k|}
exchange.c:evp_keyexch_from_algorithm:
   53|  4.41k|{
   54|  4.41k|    const OSSL_DISPATCH *fns = algodef->implementation;
   55|  4.41k|    EVP_KEYEXCH *exchange = NULL;
   56|  4.41k|    int fncnt = 0, sparamfncnt = 0, gparamfncnt = 0, derive_found = 0;
   57|       |
   58|  4.41k|    if ((exchange = evp_keyexch_new(prov)) == NULL) {
  ------------------
  |  Branch (58:9): [True: 0, False: 4.41k]
  ------------------
   59|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   60|      0|        goto err;
   61|      0|    }
   62|       |
   63|  4.41k|    exchange->name_id = name_id;
   64|  4.41k|    if ((exchange->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 4.41k]
  ------------------
   65|      0|        goto err;
   66|  4.41k|    exchange->description = algodef->algorithm_description;
   67|       |
   68|  44.7k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (68:12): [True: 40.3k, False: 4.41k]
  ------------------
   69|  40.3k|        switch (fns->function_id) {
  ------------------
  |  Branch (69:17): [True: 40.3k, False: 0]
  ------------------
   70|  4.41k|        case OSSL_FUNC_KEYEXCH_NEWCTX:
  ------------------
  |  |  761|  4.41k|#define OSSL_FUNC_KEYEXCH_NEWCTX 1
  ------------------
  |  Branch (70:9): [True: 4.41k, False: 35.9k]
  ------------------
   71|  4.41k|            if (exchange->newctx != NULL)
  ------------------
  |  Branch (71:17): [True: 0, False: 4.41k]
  ------------------
   72|      0|                break;
   73|  4.41k|            exchange->newctx = OSSL_FUNC_keyexch_newctx(fns);
   74|  4.41k|            fncnt++;
   75|  4.41k|            break;
   76|  4.41k|        case OSSL_FUNC_KEYEXCH_INIT:
  ------------------
  |  |  762|  4.41k|#define OSSL_FUNC_KEYEXCH_INIT 2
  ------------------
  |  Branch (76:9): [True: 4.41k, False: 35.9k]
  ------------------
   77|  4.41k|            if (exchange->init != NULL)
  ------------------
  |  Branch (77:17): [True: 0, False: 4.41k]
  ------------------
   78|      0|                break;
   79|  4.41k|            exchange->init = OSSL_FUNC_keyexch_init(fns);
   80|  4.41k|            fncnt++;
   81|  4.41k|            break;
   82|  2.52k|        case OSSL_FUNC_KEYEXCH_SET_PEER:
  ------------------
  |  |  764|  2.52k|#define OSSL_FUNC_KEYEXCH_SET_PEER 4
  ------------------
  |  Branch (82:9): [True: 2.52k, False: 37.8k]
  ------------------
   83|  2.52k|            if (exchange->set_peer != NULL)
  ------------------
  |  Branch (83:17): [True: 0, False: 2.52k]
  ------------------
   84|      0|                break;
   85|  2.52k|            exchange->set_peer = OSSL_FUNC_keyexch_set_peer(fns);
   86|  2.52k|            break;
   87|  4.41k|        case OSSL_FUNC_KEYEXCH_DERIVE:
  ------------------
  |  |  763|  4.41k|#define OSSL_FUNC_KEYEXCH_DERIVE 3
  ------------------
  |  Branch (87:9): [True: 4.41k, False: 35.9k]
  ------------------
   88|  4.41k|            if (exchange->derive != NULL)
  ------------------
  |  Branch (88:17): [True: 0, False: 4.41k]
  ------------------
   89|      0|                break;
   90|  4.41k|            exchange->derive = OSSL_FUNC_keyexch_derive(fns);
   91|  4.41k|            derive_found = 1;
   92|  4.41k|            break;
   93|  4.41k|        case OSSL_FUNC_KEYEXCH_FREECTX:
  ------------------
  |  |  765|  4.41k|#define OSSL_FUNC_KEYEXCH_FREECTX 5
  ------------------
  |  Branch (93:9): [True: 4.41k, False: 35.9k]
  ------------------
   94|  4.41k|            if (exchange->freectx != NULL)
  ------------------
  |  Branch (94:17): [True: 0, False: 4.41k]
  ------------------
   95|      0|                break;
   96|  4.41k|            exchange->freectx = OSSL_FUNC_keyexch_freectx(fns);
   97|  4.41k|            fncnt++;
   98|  4.41k|            break;
   99|  4.41k|        case OSSL_FUNC_KEYEXCH_DUPCTX:
  ------------------
  |  |  766|  4.41k|#define OSSL_FUNC_KEYEXCH_DUPCTX 6
  ------------------
  |  Branch (99:9): [True: 4.41k, False: 35.9k]
  ------------------
  100|  4.41k|            if (exchange->dupctx != NULL)
  ------------------
  |  Branch (100:17): [True: 0, False: 4.41k]
  ------------------
  101|      0|                break;
  102|  4.41k|            exchange->dupctx = OSSL_FUNC_keyexch_dupctx(fns);
  103|  4.41k|            break;
  104|  4.41k|        case OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS:
  ------------------
  |  |  769|  4.41k|#define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS 9
  ------------------
  |  Branch (104:9): [True: 4.41k, False: 35.9k]
  ------------------
  105|  4.41k|            if (exchange->get_ctx_params != NULL)
  ------------------
  |  Branch (105:17): [True: 0, False: 4.41k]
  ------------------
  106|      0|                break;
  107|  4.41k|            exchange->get_ctx_params = OSSL_FUNC_keyexch_get_ctx_params(fns);
  108|  4.41k|            gparamfncnt++;
  109|  4.41k|            break;
  110|  4.41k|        case OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  770|  4.41k|#define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS 10
  ------------------
  |  Branch (110:9): [True: 4.41k, False: 35.9k]
  ------------------
  111|  4.41k|            if (exchange->gettable_ctx_params != NULL)
  ------------------
  |  Branch (111:17): [True: 0, False: 4.41k]
  ------------------
  112|      0|                break;
  113|  4.41k|            exchange->gettable_ctx_params
  114|  4.41k|                = OSSL_FUNC_keyexch_gettable_ctx_params(fns);
  115|  4.41k|            gparamfncnt++;
  116|  4.41k|            break;
  117|  3.15k|        case OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS:
  ------------------
  |  |  767|  3.15k|#define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS 7
  ------------------
  |  Branch (117:9): [True: 3.15k, False: 37.1k]
  ------------------
  118|  3.15k|            if (exchange->set_ctx_params != NULL)
  ------------------
  |  Branch (118:17): [True: 0, False: 3.15k]
  ------------------
  119|      0|                break;
  120|  3.15k|            exchange->set_ctx_params = OSSL_FUNC_keyexch_set_ctx_params(fns);
  121|  3.15k|            sparamfncnt++;
  122|  3.15k|            break;
  123|  3.15k|        case OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  768|  3.15k|#define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS 8
  ------------------
  |  Branch (123:9): [True: 3.15k, False: 37.1k]
  ------------------
  124|  3.15k|            if (exchange->settable_ctx_params != NULL)
  ------------------
  |  Branch (124:17): [True: 0, False: 3.15k]
  ------------------
  125|      0|                break;
  126|  3.15k|            exchange->settable_ctx_params
  127|  3.15k|                = OSSL_FUNC_keyexch_settable_ctx_params(fns);
  128|  3.15k|            sparamfncnt++;
  129|  3.15k|            break;
  130|    630|        case OSSL_FUNC_KEYEXCH_DERIVE_SKEY:
  ------------------
  |  |  771|    630|#define OSSL_FUNC_KEYEXCH_DERIVE_SKEY 11
  ------------------
  |  Branch (130:9): [True: 630, False: 39.6k]
  ------------------
  131|    630|            if (exchange->derive_skey != NULL)
  ------------------
  |  Branch (131:17): [True: 0, False: 630]
  ------------------
  132|      0|                break;
  133|    630|            exchange->derive_skey = OSSL_FUNC_keyexch_derive_skey(fns);
  134|    630|            derive_found = 1;
  135|    630|            break;
  136|  40.3k|        }
  137|  40.3k|    }
  138|  4.41k|    fncnt += derive_found;
  139|  4.41k|    if (fncnt != 4
  ------------------
  |  Branch (139:9): [True: 0, False: 4.41k]
  ------------------
  140|  4.41k|        || (gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (140:13): [True: 4.41k, False: 0]
  |  Branch (140:33): [True: 0, False: 4.41k]
  ------------------
  141|  4.41k|        || (sparamfncnt != 0 && sparamfncnt != 2)) {
  ------------------
  |  Branch (141:13): [True: 3.15k, False: 1.26k]
  |  Branch (141:33): [True: 0, False: 3.15k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|      0|        goto err;
  152|      0|    }
  153|       |
  154|  4.41k|    return exchange;
  155|       |
  156|      0|err:
  157|      0|    EVP_KEYEXCH_free(exchange);
  158|       |    return NULL;
  159|  4.41k|}
exchange.c:evp_keyexch_new:
   33|  4.41k|{
   34|  4.41k|    EVP_KEYEXCH *exchange = OPENSSL_zalloc(sizeof(EVP_KEYEXCH));
  ------------------
  |  |  108|  4.41k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   35|       |
   36|  4.41k|    if (exchange == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 4.41k]
  ------------------
   37|      0|        return NULL;
   38|       |
   39|  4.41k|    if (!CRYPTO_NEW_REF(&exchange->refcnt, 1)
  ------------------
  |  Branch (39:9): [True: 0, False: 4.41k]
  ------------------
   40|  4.41k|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (40:12): [True: 0, False: 4.41k]
  ------------------
   41|      0|        CRYPTO_FREE_REF(&exchange->refcnt);
   42|      0|        OPENSSL_free(exchange);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|        return NULL;
   44|      0|    }
   45|  4.41k|    exchange->prov = prov;
   46|       |
   47|  4.41k|    return exchange;
   48|  4.41k|}
exchange.c:evp_keyexch_up_ref:
   28|  10.9k|{
   29|  10.9k|    return EVP_KEYEXCH_up_ref(data);
   30|  10.9k|}
exchange.c:evp_keyexch_free:
   23|  9.92k|{
   24|  9.92k|    EVP_KEYEXCH_free(data);
   25|  9.92k|}

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

EVP_KEYMGMT_fetch:
  279|   249k|{
  280|   249k|    return evp_generic_fetch(ctx, OSSL_OP_KEYMGMT, algorithm, properties,
  ------------------
  |  |  288|   249k|#define OSSL_OP_KEYMGMT 10
  ------------------
  281|   249k|        keymgmt_from_algorithm,
  282|   249k|        evp_keymgmt_up_ref,
  283|   249k|        evp_keymgmt_free);
  284|   249k|}
EVP_KEYMGMT_up_ref:
  287|  1.71M|{
  288|  1.71M|    int ref = 0;
  289|       |
  290|  1.71M|    CRYPTO_UP_REF(&keymgmt->refcnt, &ref);
  291|  1.71M|    return 1;
  292|  1.71M|}
EVP_KEYMGMT_free:
  295|  1.73M|{
  296|  1.73M|    int ref = 0;
  297|       |
  298|  1.73M|    if (keymgmt == NULL)
  ------------------
  |  Branch (298:9): [True: 0, False: 1.73M]
  ------------------
  299|      0|        return;
  300|       |
  301|  1.73M|    CRYPTO_DOWN_REF(&keymgmt->refcnt, &ref);
  302|  1.73M|    if (ref > 0)
  ------------------
  |  Branch (302:9): [True: 1.71M, False: 25.2k]
  ------------------
  303|  1.71M|        return;
  304|  25.2k|    OPENSSL_free(keymgmt->type_name);
  ------------------
  |  |  131|  25.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  305|  25.2k|    ossl_provider_free(keymgmt->prov);
  306|  25.2k|    CRYPTO_FREE_REF(&keymgmt->refcnt);
  307|  25.2k|    OPENSSL_free(keymgmt);
  ------------------
  |  |  131|  25.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  308|  25.2k|}
EVP_KEYMGMT_get0_provider:
  311|   450k|{
  312|   450k|    return keymgmt->prov;
  313|   450k|}
evp_keymgmt_get_legacy_alg:
  321|  76.7k|{
  322|  76.7k|    return keymgmt->legacy_alg;
  323|  76.7k|}
EVP_KEYMGMT_is_a:
  336|   814k|{
  337|   814k|    return keymgmt != NULL
  ------------------
  |  Branch (337:12): [True: 814k, False: 0]
  ------------------
  338|   814k|        && evp_is_a(keymgmt->prov, keymgmt->name_id, NULL, name);
  ------------------
  |  Branch (338:12): [True: 814k, False: 0]
  ------------------
  339|   814k|}
EVP_KEYMGMT_do_all_provided:
  344|      2|{
  345|      2|    evp_generic_do_all(libctx, OSSL_OP_KEYMGMT,
  ------------------
  |  |  288|      2|#define OSSL_OP_KEYMGMT 10
  ------------------
  346|      2|        (void (*)(void *, void *))fn, arg,
  347|      2|        keymgmt_from_algorithm,
  348|      2|        evp_keymgmt_up_ref,
  349|      2|        evp_keymgmt_free);
  350|      2|}
EVP_KEYMGMT_names_do_all:
  355|   467k|{
  356|   467k|    if (keymgmt->prov != NULL)
  ------------------
  |  Branch (356:9): [True: 467k, False: 0]
  ------------------
  357|   467k|        return evp_names_do_all(keymgmt->prov, keymgmt->name_id, fn, data);
  358|       |
  359|      0|    return 1;
  360|   467k|}
evp_keymgmt_freedata:
  380|   442k|{
  381|       |    /* This is mandatory, no need to check for its presence */
  382|   442k|    keymgmt->free(keydata);
  383|   442k|}
evp_keymgmt_gen_init:
  387|  6.38k|{
  388|  6.38k|    void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt));
  389|       |
  390|  6.38k|    if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (390:9): [True: 0, False: 6.38k]
  ------------------
  391|      0|        return NULL;
  392|  6.38k|    return keymgmt->gen_init(provctx, selection, params);
  393|  6.38k|}
evp_keymgmt_gen_set_params:
  411|  6.38k|{
  412|  6.38k|    if (keymgmt->gen_set_params == NULL)
  ------------------
  |  Branch (412:9): [True: 0, False: 6.38k]
  ------------------
  413|      0|        return 0;
  414|  6.38k|    return keymgmt->gen_set_params(genctx, params);
  415|  6.38k|}
evp_keymgmt_gen:
  445|  6.38k|{
  446|  6.38k|    void *ret;
  447|  6.38k|    const char *desc = keymgmt->description != NULL ? keymgmt->description : "";
  ------------------
  |  Branch (447:24): [True: 6.38k, False: 0]
  ------------------
  448|       |
  449|  6.38k|    if (keymgmt->gen == NULL) {
  ------------------
  |  Branch (449:9): [True: 0, False: 6.38k]
  ------------------
  450|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |  108|      0|#define EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED 236
  ------------------
  451|      0|            "%s key generation:%s", keymgmt->type_name, desc);
  452|      0|        return NULL;
  453|      0|    }
  454|       |
  455|  6.38k|    ERR_set_mark();
  456|  6.38k|    ret = keymgmt->gen(genctx, cb, cbarg);
  457|  6.38k|    if (ret == NULL && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (457:9): [True: 0, False: 6.38k]
  |  Branch (457:24): [True: 0, False: 0]
  ------------------
  458|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |  107|      0|#define EVP_R_PROVIDER_KEYMGMT_FAILURE 233
  ------------------
  459|      0|            "%s key generation:%s", keymgmt->type_name, desc);
  460|  6.38k|    ERR_clear_last_mark();
  461|  6.38k|    return ret;
  462|  6.38k|}
evp_keymgmt_gen_cleanup:
  465|  6.38k|{
  466|  6.38k|    if (keymgmt->gen_cleanup != NULL)
  ------------------
  |  Branch (466:9): [True: 6.38k, False: 0]
  ------------------
  467|  6.38k|        keymgmt->gen_cleanup(genctx);
  468|  6.38k|}
evp_keymgmt_has_load:
  471|   871k|{
  472|   871k|    return keymgmt != NULL && keymgmt->load != NULL;
  ------------------
  |  Branch (472:12): [True: 871k, False: 0]
  |  Branch (472:31): [True: 871k, False: 0]
  ------------------
  473|   871k|}
evp_keymgmt_load:
  477|   435k|{
  478|   435k|    if (evp_keymgmt_has_load(keymgmt))
  ------------------
  |  Branch (478:9): [True: 435k, False: 0]
  ------------------
  479|   435k|        return keymgmt->load(objref, objref_sz);
  480|      0|    return NULL;
  481|   435k|}
evp_keymgmt_get_params:
  485|   449k|{
  486|   449k|    if (keymgmt->get_params == NULL)
  ------------------
  |  Branch (486:9): [True: 0, False: 449k]
  ------------------
  487|      0|        return 1;
  488|   449k|    return keymgmt->get_params(keydata, params);
  489|   449k|}
evp_keymgmt_export:
  564|  2.81k|{
  565|  2.81k|    if (keymgmt->export == NULL)
  ------------------
  |  Branch (565:9): [True: 0, False: 2.81k]
  ------------------
  566|      0|        return 0;
  567|  2.81k|    return keymgmt->export(keydata, selection, param_cb, cbarg);
  568|  2.81k|}
keymgmt_meth.c:keymgmt_from_algorithm:
   66|  25.2k|{
   67|  25.2k|    const OSSL_DISPATCH *fns = algodef->implementation;
   68|  25.2k|    EVP_KEYMGMT *keymgmt = NULL;
   69|  25.2k|    int setparamfncnt = 0, getparamfncnt = 0;
   70|  25.2k|    int setgenparamfncnt = 0;
   71|  25.2k|    int importfncnt = 0, exportfncnt = 0;
   72|  25.2k|    int importtypesfncnt = 0, exporttypesfncnt = 0;
   73|  25.2k|    int getgenparamfncnt = 0;
   74|       |
   75|  25.2k|    if ((keymgmt = keymgmt_new()) == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 25.2k]
  ------------------
   76|      0|        return NULL;
   77|       |
   78|  25.2k|    keymgmt->name_id = name_id;
   79|  25.2k|    if ((keymgmt->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (79:9): [True: 0, False: 25.2k]
  ------------------
   80|      0|        EVP_KEYMGMT_free(keymgmt);
   81|      0|        return NULL;
   82|      0|    }
   83|  25.2k|    keymgmt->description = algodef->algorithm_description;
   84|       |
   85|   469k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (85:12): [True: 444k, False: 25.2k]
  ------------------
   86|   444k|        switch (fns->function_id) {
  ------------------
  |  Branch (86:17): [True: 444k, False: 0]
  ------------------
   87|  25.2k|        case OSSL_FUNC_KEYMGMT_NEW:
  ------------------
  |  |  658|  25.2k|#define OSSL_FUNC_KEYMGMT_NEW 1
  ------------------
  |  Branch (87:9): [True: 25.2k, False: 419k]
  ------------------
   88|  25.2k|            if (keymgmt->new == NULL)
  ------------------
  |  Branch (88:17): [True: 25.2k, False: 0]
  ------------------
   89|  25.2k|                keymgmt->new = OSSL_FUNC_keymgmt_new(fns);
   90|  25.2k|            break;
   91|  23.3k|        case OSSL_FUNC_KEYMGMT_GEN_INIT:
  ------------------
  |  |  662|  23.3k|#define OSSL_FUNC_KEYMGMT_GEN_INIT 2
  ------------------
  |  Branch (91:9): [True: 23.3k, False: 421k]
  ------------------
   92|  23.3k|            if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (92:17): [True: 23.3k, False: 0]
  ------------------
   93|  23.3k|                keymgmt->gen_init = OSSL_FUNC_keymgmt_gen_init(fns);
   94|  23.3k|            break;
   95|  3.15k|        case OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE:
  ------------------
  |  |  663|  3.15k|#define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE 3
  ------------------
  |  Branch (95:9): [True: 3.15k, False: 441k]
  ------------------
   96|  3.15k|            if (keymgmt->gen_set_template == NULL)
  ------------------
  |  Branch (96:17): [True: 3.15k, False: 0]
  ------------------
   97|  3.15k|                keymgmt->gen_set_template = OSSL_FUNC_keymgmt_gen_set_template(fns);
   98|  3.15k|            break;
   99|  23.3k|        case OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS:
  ------------------
  |  |  664|  23.3k|#define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS 4
  ------------------
  |  Branch (99:9): [True: 23.3k, False: 421k]
  ------------------
  100|  23.3k|            if (keymgmt->gen_set_params == NULL) {
  ------------------
  |  Branch (100:17): [True: 23.3k, False: 0]
  ------------------
  101|  23.3k|                setgenparamfncnt++;
  102|  23.3k|                keymgmt->gen_set_params = OSSL_FUNC_keymgmt_gen_set_params(fns);
  103|  23.3k|            }
  104|  23.3k|            break;
  105|  23.3k|        case OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS:
  ------------------
  |  |  665|  23.3k|#define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS 5
  ------------------
  |  Branch (105:9): [True: 23.3k, False: 421k]
  ------------------
  106|  23.3k|            if (keymgmt->gen_settable_params == NULL) {
  ------------------
  |  Branch (106:17): [True: 23.3k, False: 0]
  ------------------
  107|  23.3k|                setgenparamfncnt++;
  108|  23.3k|                keymgmt->gen_settable_params = OSSL_FUNC_keymgmt_gen_settable_params(fns);
  109|  23.3k|            }
  110|  23.3k|            break;
  111|  1.26k|        case OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS:
  ------------------
  |  |  668|  1.26k|#define OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS 15
  ------------------
  |  Branch (111:9): [True: 1.26k, False: 443k]
  ------------------
  112|  1.26k|            if (keymgmt->gen_get_params == NULL) {
  ------------------
  |  Branch (112:17): [True: 1.26k, False: 0]
  ------------------
  113|  1.26k|                getgenparamfncnt++;
  114|  1.26k|                keymgmt->gen_get_params = OSSL_FUNC_keymgmt_gen_get_params(fns);
  115|  1.26k|            }
  116|  1.26k|            break;
  117|  1.26k|        case OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS:
  ------------------
  |  |  669|  1.26k|#define OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS 16
  ------------------
  |  Branch (117:9): [True: 1.26k, False: 443k]
  ------------------
  118|  1.26k|            if (keymgmt->gen_gettable_params == NULL) {
  ------------------
  |  Branch (118:17): [True: 1.26k, False: 0]
  ------------------
  119|  1.26k|                getgenparamfncnt++;
  120|  1.26k|                keymgmt->gen_gettable_params = OSSL_FUNC_keymgmt_gen_gettable_params(fns);
  121|  1.26k|            }
  122|  1.26k|            break;
  123|  23.3k|        case OSSL_FUNC_KEYMGMT_GEN:
  ------------------
  |  |  666|  23.3k|#define OSSL_FUNC_KEYMGMT_GEN 6
  ------------------
  |  Branch (123:9): [True: 23.3k, False: 421k]
  ------------------
  124|  23.3k|            if (keymgmt->gen == NULL)
  ------------------
  |  Branch (124:17): [True: 23.3k, False: 0]
  ------------------
  125|  23.3k|                keymgmt->gen = OSSL_FUNC_keymgmt_gen(fns);
  126|  23.3k|            break;
  127|  23.3k|        case OSSL_FUNC_KEYMGMT_GEN_CLEANUP:
  ------------------
  |  |  667|  23.3k|#define OSSL_FUNC_KEYMGMT_GEN_CLEANUP 7
  ------------------
  |  Branch (127:9): [True: 23.3k, False: 421k]
  ------------------
  128|  23.3k|            if (keymgmt->gen_cleanup == NULL)
  ------------------
  |  Branch (128:17): [True: 23.3k, False: 0]
  ------------------
  129|  23.3k|                keymgmt->gen_cleanup = OSSL_FUNC_keymgmt_gen_cleanup(fns);
  130|  23.3k|            break;
  131|  25.2k|        case OSSL_FUNC_KEYMGMT_FREE:
  ------------------
  |  |  694|  25.2k|#define OSSL_FUNC_KEYMGMT_FREE 10
  ------------------
  |  Branch (131:9): [True: 25.2k, False: 419k]
  ------------------
  132|  25.2k|            if (keymgmt->free == NULL)
  ------------------
  |  Branch (132:17): [True: 25.2k, False: 0]
  ------------------
  133|  25.2k|                keymgmt->free = OSSL_FUNC_keymgmt_free(fns);
  134|  25.2k|            break;
  135|  18.2k|        case OSSL_FUNC_KEYMGMT_LOAD:
  ------------------
  |  |  689|  18.2k|#define OSSL_FUNC_KEYMGMT_LOAD 8
  ------------------
  |  Branch (135:9): [True: 18.2k, False: 426k]
  ------------------
  136|  18.2k|            if (keymgmt->load == NULL)
  ------------------
  |  Branch (136:17): [True: 18.2k, False: 0]
  ------------------
  137|  18.2k|                keymgmt->load = OSSL_FUNC_keymgmt_load(fns);
  138|  18.2k|            break;
  139|  23.3k|        case OSSL_FUNC_KEYMGMT_GET_PARAMS:
  ------------------
  |  |  698|  23.3k|#define OSSL_FUNC_KEYMGMT_GET_PARAMS 11
  ------------------
  |  Branch (139:9): [True: 23.3k, False: 421k]
  ------------------
  140|  23.3k|            if (keymgmt->get_params == NULL) {
  ------------------
  |  Branch (140:17): [True: 23.3k, False: 0]
  ------------------
  141|  23.3k|                getparamfncnt++;
  142|  23.3k|                keymgmt->get_params = OSSL_FUNC_keymgmt_get_params(fns);
  143|  23.3k|            }
  144|  23.3k|            break;
  145|  23.3k|        case OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS:
  ------------------
  |  |  699|  23.3k|#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
  ------------------
  |  Branch (145:9): [True: 23.3k, False: 421k]
  ------------------
  146|  23.3k|            if (keymgmt->gettable_params == NULL) {
  ------------------
  |  Branch (146:17): [True: 23.3k, False: 0]
  ------------------
  147|  23.3k|                getparamfncnt++;
  148|  23.3k|                keymgmt->gettable_params = OSSL_FUNC_keymgmt_gettable_params(fns);
  149|  23.3k|            }
  150|  23.3k|            break;
  151|  11.9k|        case OSSL_FUNC_KEYMGMT_SET_PARAMS:
  ------------------
  |  |  705|  11.9k|#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
  ------------------
  |  Branch (151:9): [True: 11.9k, False: 432k]
  ------------------
  152|  11.9k|            if (keymgmt->set_params == NULL) {
  ------------------
  |  Branch (152:17): [True: 11.9k, False: 0]
  ------------------
  153|  11.9k|                setparamfncnt++;
  154|  11.9k|                keymgmt->set_params = OSSL_FUNC_keymgmt_set_params(fns);
  155|  11.9k|            }
  156|  11.9k|            break;
  157|  11.9k|        case OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS:
  ------------------
  |  |  706|  11.9k|#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
  ------------------
  |  Branch (157:9): [True: 11.9k, False: 432k]
  ------------------
  158|  11.9k|            if (keymgmt->settable_params == NULL) {
  ------------------
  |  Branch (158:17): [True: 11.9k, False: 0]
  ------------------
  159|  11.9k|                setparamfncnt++;
  160|  11.9k|                keymgmt->settable_params = OSSL_FUNC_keymgmt_settable_params(fns);
  161|  11.9k|            }
  162|  11.9k|            break;
  163|  2.52k|        case OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME:
  ------------------
  |  |  713|  2.52k|#define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 20
  ------------------
  |  Branch (163:9): [True: 2.52k, False: 442k]
  ------------------
  164|  2.52k|            if (keymgmt->query_operation_name == NULL)
  ------------------
  |  Branch (164:17): [True: 2.52k, False: 0]
  ------------------
  165|  2.52k|                keymgmt->query_operation_name = OSSL_FUNC_keymgmt_query_operation_name(fns);
  166|  2.52k|            break;
  167|  25.2k|        case OSSL_FUNC_KEYMGMT_HAS:
  ------------------
  |  |  718|  25.2k|#define OSSL_FUNC_KEYMGMT_HAS 21
  ------------------
  |  Branch (167:9): [True: 25.2k, False: 419k]
  ------------------
  168|  25.2k|            if (keymgmt->has == NULL)
  ------------------
  |  Branch (168:17): [True: 25.2k, False: 0]
  ------------------
  169|  25.2k|                keymgmt->has = OSSL_FUNC_keymgmt_has(fns);
  170|  25.2k|            break;
  171|  20.7k|        case OSSL_FUNC_KEYMGMT_DUP:
  ------------------
  |  |  747|  20.7k|#define OSSL_FUNC_KEYMGMT_DUP 44
  ------------------
  |  Branch (171:9): [True: 20.7k, False: 423k]
  ------------------
  172|  20.7k|            if (keymgmt->dup == NULL)
  ------------------
  |  Branch (172:17): [True: 20.7k, False: 0]
  ------------------
  173|  20.7k|                keymgmt->dup = OSSL_FUNC_keymgmt_dup(fns);
  174|  20.7k|            break;
  175|  18.2k|        case OSSL_FUNC_KEYMGMT_VALIDATE:
  ------------------
  |  |  722|  18.2k|#define OSSL_FUNC_KEYMGMT_VALIDATE 22
  ------------------
  |  Branch (175:9): [True: 18.2k, False: 426k]
  ------------------
  176|  18.2k|            if (keymgmt->validate == NULL)
  ------------------
  |  Branch (176:17): [True: 18.2k, False: 0]
  ------------------
  177|  18.2k|                keymgmt->validate = OSSL_FUNC_keymgmt_validate(fns);
  178|  18.2k|            break;
  179|  23.3k|        case OSSL_FUNC_KEYMGMT_MATCH:
  ------------------
  |  |  726|  23.3k|#define OSSL_FUNC_KEYMGMT_MATCH 23
  ------------------
  |  Branch (179:9): [True: 23.3k, False: 421k]
  ------------------
  180|  23.3k|            if (keymgmt->match == NULL)
  ------------------
  |  Branch (180:17): [True: 23.3k, False: 0]
  ------------------
  181|  23.3k|                keymgmt->match = OSSL_FUNC_keymgmt_match(fns);
  182|  23.3k|            break;
  183|  23.3k|        case OSSL_FUNC_KEYMGMT_IMPORT:
  ------------------
  |  |  732|  23.3k|#define OSSL_FUNC_KEYMGMT_IMPORT 40
  ------------------
  |  Branch (183:9): [True: 23.3k, False: 421k]
  ------------------
  184|  23.3k|            if (keymgmt->import == NULL) {
  ------------------
  |  Branch (184:17): [True: 23.3k, False: 0]
  ------------------
  185|  23.3k|                importfncnt++;
  186|  23.3k|                keymgmt->import = OSSL_FUNC_keymgmt_import(fns);
  187|  23.3k|            }
  188|  23.3k|            break;
  189|  23.3k|        case OSSL_FUNC_KEYMGMT_IMPORT_TYPES:
  ------------------
  |  |  733|  23.3k|#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES 41
  ------------------
  |  Branch (189:9): [True: 23.3k, False: 421k]
  ------------------
  190|  23.3k|            if (keymgmt->import_types == NULL) {
  ------------------
  |  Branch (190:17): [True: 23.3k, False: 0]
  ------------------
  191|  23.3k|                if (importtypesfncnt == 0)
  ------------------
  |  Branch (191:21): [True: 23.3k, False: 0]
  ------------------
  192|  23.3k|                    importfncnt++;
  193|  23.3k|                importtypesfncnt++;
  194|  23.3k|                keymgmt->import_types = OSSL_FUNC_keymgmt_import_types(fns);
  195|  23.3k|            }
  196|  23.3k|            break;
  197|      0|        case OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX:
  ------------------
  |  |  752|      0|#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX 45
  ------------------
  |  Branch (197:9): [True: 0, False: 444k]
  ------------------
  198|      0|            if (keymgmt->import_types_ex == NULL) {
  ------------------
  |  Branch (198:17): [True: 0, False: 0]
  ------------------
  199|      0|                if (importtypesfncnt == 0)
  ------------------
  |  Branch (199:21): [True: 0, False: 0]
  ------------------
  200|      0|                    importfncnt++;
  201|      0|                importtypesfncnt++;
  202|      0|                keymgmt->import_types_ex = OSSL_FUNC_keymgmt_import_types_ex(fns);
  203|      0|            }
  204|      0|            break;
  205|  23.3k|        case OSSL_FUNC_KEYMGMT_EXPORT:
  ------------------
  |  |  734|  23.3k|#define OSSL_FUNC_KEYMGMT_EXPORT 42
  ------------------
  |  Branch (205:9): [True: 23.3k, False: 421k]
  ------------------
  206|  23.3k|            if (keymgmt->export == NULL) {
  ------------------
  |  Branch (206:17): [True: 23.3k, False: 0]
  ------------------
  207|  23.3k|                exportfncnt++;
  208|  23.3k|                keymgmt->export = OSSL_FUNC_keymgmt_export(fns);
  209|  23.3k|            }
  210|  23.3k|            break;
  211|  23.3k|        case OSSL_FUNC_KEYMGMT_EXPORT_TYPES:
  ------------------
  |  |  735|  23.3k|#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES 43
  ------------------
  |  Branch (211:9): [True: 23.3k, False: 421k]
  ------------------
  212|  23.3k|            if (keymgmt->export_types == NULL) {
  ------------------
  |  Branch (212:17): [True: 23.3k, False: 0]
  ------------------
  213|  23.3k|                if (exporttypesfncnt == 0)
  ------------------
  |  Branch (213:21): [True: 23.3k, False: 0]
  ------------------
  214|  23.3k|                    exportfncnt++;
  215|  23.3k|                exporttypesfncnt++;
  216|  23.3k|                keymgmt->export_types = OSSL_FUNC_keymgmt_export_types(fns);
  217|  23.3k|            }
  218|  23.3k|            break;
  219|      0|        case OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX:
  ------------------
  |  |  753|      0|#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX 46
  ------------------
  |  Branch (219:9): [True: 0, False: 444k]
  ------------------
  220|      0|            if (keymgmt->export_types_ex == NULL) {
  ------------------
  |  Branch (220:17): [True: 0, False: 0]
  ------------------
  221|      0|                if (exporttypesfncnt == 0)
  ------------------
  |  Branch (221:21): [True: 0, False: 0]
  ------------------
  222|      0|                    exportfncnt++;
  223|      0|                exporttypesfncnt++;
  224|      0|                keymgmt->export_types_ex = OSSL_FUNC_keymgmt_export_types_ex(fns);
  225|      0|            }
  226|      0|            break;
  227|   444k|        }
  228|   444k|    }
  229|       |    /*
  230|       |     * Try to check that the method is sensible.
  231|       |     * At least one constructor and the destructor are MANDATORY
  232|       |     * The functions 'has' is MANDATORY
  233|       |     * It makes no sense being able to free stuff if you can't create it.
  234|       |     * It makes no sense providing OSSL_PARAM descriptors for import and
  235|       |     * export if you can't import or export.
  236|       |     */
  237|  25.2k|    if (keymgmt->free == NULL
  ------------------
  |  Branch (237:9): [True: 0, False: 25.2k]
  ------------------
  238|  25.2k|        || (keymgmt->new == NULL
  ------------------
  |  Branch (238:13): [True: 0, False: 25.2k]
  ------------------
  239|      0|            && keymgmt->gen == NULL
  ------------------
  |  Branch (239:16): [True: 0, False: 0]
  ------------------
  240|      0|            && keymgmt->load == NULL)
  ------------------
  |  Branch (240:16): [True: 0, False: 0]
  ------------------
  241|  25.2k|        || keymgmt->has == NULL
  ------------------
  |  Branch (241:12): [True: 0, False: 25.2k]
  ------------------
  242|  25.2k|        || (getparamfncnt != 0 && getparamfncnt != 2)
  ------------------
  |  Branch (242:13): [True: 23.3k, False: 1.89k]
  |  Branch (242:35): [True: 0, False: 23.3k]
  ------------------
  243|  25.2k|        || (setparamfncnt != 0 && setparamfncnt != 2)
  ------------------
  |  Branch (243:13): [True: 11.9k, False: 13.2k]
  |  Branch (243:35): [True: 0, False: 11.9k]
  ------------------
  244|  25.2k|        || (setgenparamfncnt != 0 && setgenparamfncnt != 2)
  ------------------
  |  Branch (244:13): [True: 23.3k, False: 1.89k]
  |  Branch (244:38): [True: 0, False: 23.3k]
  ------------------
  245|  25.2k|        || (getgenparamfncnt != 0 && getgenparamfncnt != 2)
  ------------------
  |  Branch (245:13): [True: 1.26k, False: 23.9k]
  |  Branch (245:38): [True: 0, False: 1.26k]
  ------------------
  246|  25.2k|        || (importfncnt != 0 && importfncnt != 2)
  ------------------
  |  Branch (246:13): [True: 23.3k, False: 1.89k]
  |  Branch (246:33): [True: 0, False: 23.3k]
  ------------------
  247|  25.2k|        || (exportfncnt != 0 && exportfncnt != 2)
  ------------------
  |  Branch (247:13): [True: 23.3k, False: 1.89k]
  |  Branch (247:33): [True: 0, False: 23.3k]
  ------------------
  248|  25.2k|        || (keymgmt->gen != NULL
  ------------------
  |  Branch (248:13): [True: 23.3k, False: 1.89k]
  ------------------
  249|  23.3k|            && (keymgmt->gen_init == NULL
  ------------------
  |  Branch (249:17): [True: 0, False: 23.3k]
  ------------------
  250|  23.3k|                || keymgmt->gen_cleanup == NULL))) {
  ------------------
  |  Branch (250:20): [True: 0, False: 23.3k]
  ------------------
  251|      0|        EVP_KEYMGMT_free(keymgmt);
  252|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|        return NULL;
  254|      0|    }
  255|  25.2k|    keymgmt->prov = prov;
  256|  25.2k|    if (prov != NULL)
  ------------------
  |  Branch (256:9): [True: 25.2k, False: 0]
  ------------------
  257|  25.2k|        ossl_provider_up_ref(prov);
  258|       |
  259|  25.2k|#ifndef FIPS_MODULE
  260|  25.2k|    keymgmt->legacy_alg = get_legacy_alg_type_from_keymgmt(keymgmt);
  261|  25.2k|#endif
  262|       |
  263|  25.2k|    return keymgmt;
  264|  25.2k|}
keymgmt_meth.c:keymgmt_new:
   31|  25.2k|{
   32|  25.2k|    EVP_KEYMGMT *keymgmt = NULL;
   33|       |
   34|  25.2k|    if ((keymgmt = OPENSSL_zalloc(sizeof(*keymgmt))) == NULL)
  ------------------
  |  |  108|  25.2k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (34:9): [True: 0, False: 25.2k]
  ------------------
   35|      0|        return NULL;
   36|  25.2k|    if (!CRYPTO_NEW_REF(&keymgmt->refcnt, 1)) {
  ------------------
  |  Branch (36:9): [True: 0, False: 25.2k]
  ------------------
   37|      0|        EVP_KEYMGMT_free(keymgmt);
   38|      0|        return NULL;
   39|      0|    }
   40|  25.2k|    return keymgmt;
   41|  25.2k|}
keymgmt_meth.c:get_legacy_alg_type_from_keymgmt:
   54|  25.2k|{
   55|  25.2k|    int type = NID_undef;
  ------------------
  |  |   18|  25.2k|#define NID_undef                       0
  ------------------
   56|       |
   57|  25.2k|    EVP_KEYMGMT_names_do_all(keymgmt, help_get_legacy_alg_type_from_keymgmt,
   58|  25.2k|        &type);
   59|  25.2k|    return type;
   60|  25.2k|}
keymgmt_meth.c:help_get_legacy_alg_type_from_keymgmt:
   46|  67.4k|{
   47|  67.4k|    int *type = arg;
   48|       |
   49|  67.4k|    if (*type == NID_undef)
  ------------------
  |  |   18|  67.4k|#define NID_undef                       0
  ------------------
  |  Branch (49:9): [True: 52.9k, False: 14.4k]
  ------------------
   50|  52.9k|        *type = evp_pkey_name2type(keytype);
   51|  67.4k|}
keymgmt_meth.c:evp_keymgmt_up_ref:
   26|   280k|{
   27|   280k|    return EVP_KEYMGMT_up_ref(data);
   28|   280k|}
keymgmt_meth.c:evp_keymgmt_free:
   21|  61.3k|{
   22|  61.3k|    EVP_KEYMGMT_free(data);
   23|  61.3k|}

EVP_blake2b512:
   51|      1|{
   52|      1|    return &blake2b_md;
   53|      1|}
EVP_blake2s256:
   66|      1|{
   67|      1|    return &blake2s_md;
   68|      1|}

EVP_md4:
   32|      1|{
   33|      1|    return &md4_md;
   34|      1|}

EVP_md5:
   32|      1|{
   33|      1|    return &md5_md;
   34|      1|}

EVP_md5_sha1:
   39|      1|{
   40|      1|    return &md5_sha1_md;
   41|      1|}

EVP_mdc2:
   33|      1|{
   34|      1|    return &mdc2_md;
   35|      1|}

EVP_ripemd160:
   33|      1|{
   34|      1|    return &ripemd160_md;
   35|      1|}

EVP_sha1:
  101|   378k|{
  102|   378k|    return &sha1_md;
  103|   378k|}
EVP_sha224:
  116|      1|{
  117|      1|    return &sha224_md;
  118|      1|}
EVP_sha256:
  131|  6.85k|{
  132|  6.85k|    return &sha256_md;
  133|  6.85k|}
EVP_sha512_224:
  146|      1|{
  147|      1|    return &sha512_224_md;
  148|      1|}
EVP_sha512_256:
  161|      1|{
  162|      1|    return &sha512_256_md;
  163|      1|}
EVP_sha384:
  176|      1|{
  177|      1|    return &sha384_md;
  178|      1|}
EVP_sha512:
  191|      1|{
  192|      1|    return &sha512_md;
  193|      1|}

EVP_whirlpool:
   33|      1|{
   34|      1|    return &whirlpool_md;
   35|      1|}

EVP_MAC_CTX_free:
   40|  11.7k|{
   41|  11.7k|    if (ctx == NULL)
  ------------------
  |  Branch (41:9): [True: 11.7k, False: 0]
  ------------------
   42|  11.7k|        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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|   305k|{
  132|       |    return evp_get_digestbyname_ex(NULL, name);
  133|   305k|}
evp_get_digestbyname_ex:
  136|   305k|{
  137|   305k|    const EVP_MD *dp;
  138|   305k|    OSSL_NAMEMAP *namemap;
  139|   305k|    int id;
  140|   305k|    int do_retry = 1;
  141|       |
  142|   305k|    if (!OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL))
  ------------------
  |  |  507|   305k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  |  Branch (142:9): [True: 0, False: 305k]
  ------------------
  143|      0|        return NULL;
  144|       |
  145|   305k|    dp = (const EVP_MD *)OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|   305k|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  146|       |
  147|   305k|    if (dp != NULL)
  ------------------
  |  Branch (147:9): [True: 305k, False: 0]
  ------------------
  148|   305k|        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_cleanup_int:
  180|      1|{
  181|      1|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_KDF_METH);
  ------------------
  |  |   30|      1|#define OBJ_NAME_TYPE_KDF_METH 0x06
  ------------------
  182|      1|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_CIPHER_METH);
  ------------------
  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
  183|      1|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|      1|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  184|       |    /*
  185|       |     * The above calls will only clean out the contents of the name hash
  186|       |     * table, but not the hash table itself.  The following line does that
  187|       |     * part.  -- Richard Levitte
  188|       |     */
  189|      1|    OBJ_NAME_cleanup(-1);
  190|       |
  191|      1|    EVP_PBE_cleanup();
  192|      1|    OBJ_sigid_free();
  193|       |
  194|      1|    evp_app_cleanup_int();
  195|      1|}

evp_pkey_get0_RSA_int:
   41|   316k|{
   42|   316k|    if (pkey->type != EVP_PKEY_RSA && pkey->type != EVP_PKEY_RSA_PSS) {
  ------------------
  |  |   63|   316k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   633k|#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: 316k]
  |  Branch (42:39): [True: 0, False: 0]
  ------------------
   43|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_EXPECTING_AN_RSA_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|   316k|    return evp_pkey_get_legacy((EVP_PKEY *)pkey);
   47|   316k|}
EVP_PKEY_get1_RSA:
   55|   316k|{
   56|   316k|    RSA *ret = evp_pkey_get0_RSA_int(pkey);
   57|       |
   58|   316k|    if (ret != NULL && !RSA_up_ref(ret))
  ------------------
  |  Branch (58:9): [True: 316k, False: 0]
  |  Branch (58:24): [True: 0, False: 316k]
  ------------------
   59|      0|        ret = NULL;
   60|       |
   61|   316k|    return ret;
   62|   316k|}
evp_pkey_get0_EC_KEY_int:
   77|   119k|{
   78|   119k|    if (EVP_PKEY_get_base_id(pkey) != EVP_PKEY_EC) {
  ------------------
  |  |   73|   119k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   119k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (78:9): [True: 0, False: 119k]
  ------------------
   79|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_EXPECTING_A_EC_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   80|      0|        return NULL;
   81|      0|    }
   82|   119k|    return evp_pkey_get_legacy((EVP_PKEY *)pkey);
   83|   119k|}
EVP_PKEY_get1_EC_KEY:
   91|   119k|{
   92|   119k|    EC_KEY *ret = evp_pkey_get0_EC_KEY_int(pkey);
   93|       |
   94|   119k|    if (ret != NULL && !EC_KEY_up_ref(ret))
  ------------------
  |  Branch (94:9): [True: 119k, False: 0]
  |  Branch (94:24): [True: 0, False: 119k]
  ------------------
   95|      0|        ret = NULL;
   96|   119k|    return ret;
   97|   119k|}

EVP_PKEY_set_type:
  722|   942k|{
  723|   942k|    return pkey_set_type(pkey, NULL, type, NULL, -1, NULL);
  724|   942k|}
EVP_PKEY_assign:
  792|   435k|{
  793|   435k|#ifndef OPENSSL_NO_EC
  794|   435k|    int pktype;
  795|       |
  796|   435k|    pktype = EVP_PKEY_type(type);
  797|   435k|    if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   73|   435k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   871k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
                  if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   74|   316k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|   316k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (797:9): [True: 435k, False: 0]
  |  Branch (797:27): [True: 119k, False: 316k]
  |  Branch (797:52): [True: 0, False: 316k]
  ------------------
  798|   119k|        const EC_GROUP *group = EC_KEY_get0_group(key);
  799|       |
  800|   119k|        if (group != NULL) {
  ------------------
  |  Branch (800:13): [True: 119k, False: 0]
  ------------------
  801|   119k|            int curve = EC_GROUP_get_curve_name(group);
  802|       |
  803|       |            /*
  804|       |             * Regardless of what is requested the SM2 curve must be SM2 type,
  805|       |             * and non SM2 curves are EC type.
  806|       |             */
  807|   119k|            if (curve == NID_sm2 && pktype == EVP_PKEY_EC)
  ------------------
  |  | 1255|   238k|#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 (807:17): [True: 0, False: 119k]
  |  Branch (807:37): [True: 0, False: 0]
  ------------------
  808|      0|                type = EVP_PKEY_SM2;
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  809|   119k|            else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  | 1255|   238k|#define NID_sm2         1172
  ------------------
                          else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  |   74|   119k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|   119k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (809:22): [True: 119k, False: 0]
  |  Branch (809:42): [True: 0, False: 119k]
  ------------------
  810|      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
  |  |  ------------------
  ------------------
  811|   119k|        }
  812|   119k|    }
  813|   435k|#endif
  814|       |
  815|   435k|    if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
  ------------------
  |  Branch (815:9): [True: 0, False: 435k]
  |  Branch (815:25): [True: 0, False: 435k]
  ------------------
  816|      0|        return 0;
  817|       |
  818|   435k|    pkey->pkey.ptr = key;
  819|   435k|    detect_foreign_key(pkey);
  820|       |
  821|       |    return (key != NULL);
  822|   435k|}
EVP_PKEY_get_id:
 1024|   119k|{
 1025|   119k|    return pkey->type;
 1026|   119k|}
EVP_PKEY_get_base_id:
 1029|   119k|{
 1030|   119k|    return EVP_PKEY_type(pkey->type);
 1031|   119k|}
evp_pkey_name2type:
 1061|  59.3k|{
 1062|  59.3k|    int type;
 1063|  59.3k|    size_t i;
 1064|       |
 1065|   715k|    for (i = 0; i < OSSL_NELEM(standard_name2type); i++) {
  ------------------
  |  |   14|   715k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1065:17): [True: 663k, False: 51.3k]
  ------------------
 1066|   663k|        if (OPENSSL_strcasecmp(name, standard_name2type[i].ptr) == 0)
  ------------------
  |  Branch (1066:13): [True: 7.90k, False: 656k]
  ------------------
 1067|  7.90k|            return (int)standard_name2type[i].id;
 1068|   663k|    }
 1069|       |
 1070|  51.3k|    if ((type = EVP_PKEY_type(OBJ_sn2nid(name))) != NID_undef)
  ------------------
  |  |   18|  51.3k|#define NID_undef                       0
  ------------------
  |  Branch (1070:9): [True: 2.52k, False: 48.8k]
  ------------------
 1071|  2.52k|        return type;
 1072|  48.8k|    return EVP_PKEY_type(OBJ_ln2nid(name));
 1073|  51.3k|}
EVP_PKEY_is_a:
 1088|   378k|{
 1089|   378k|    if (pkey == NULL)
  ------------------
  |  Branch (1089:9): [True: 0, False: 378k]
  ------------------
 1090|      0|        return 0;
 1091|   378k|    if (pkey->keymgmt == NULL)
  ------------------
  |  Branch (1091:9): [True: 0, False: 378k]
  ------------------
 1092|      0|        return pkey->type == evp_pkey_name2type(name);
 1093|   378k|    return EVP_KEYMGMT_is_a(pkey->keymgmt, name);
 1094|   378k|}
EVP_PKEY_get1_encoded_public_key:
 1442|  3.56k|{
 1443|  3.56k|    if (pkey == NULL)
  ------------------
  |  Branch (1443:9): [True: 0, False: 3.56k]
  ------------------
 1444|      0|        return 0;
 1445|  3.56k|#ifndef FIPS_MODULE
 1446|  3.56k|    if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  652|  3.56k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (652:5): [True: 3.56k, False: 0]
  |  |  ------------------
  ------------------
 1447|  3.56k|#endif
 1448|  3.56k|    {
 1449|  3.56k|        size_t return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  3.56k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
 1450|  3.56k|        unsigned char *buf;
 1451|       |
 1452|       |        /*
 1453|       |         * We know that this is going to fail, but it will give us a size
 1454|       |         * to allocate.
 1455|       |         */
 1456|  3.56k|        EVP_PKEY_get_octet_string_param(pkey,
 1457|  3.56k|            OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  398|  3.56k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1458|  3.56k|            NULL, 0, &return_size);
 1459|  3.56k|        if (return_size == OSSL_PARAM_UNMODIFIED)
  ------------------
  |  |   22|  3.56k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (1459:13): [True: 0, False: 3.56k]
  ------------------
 1460|      0|            return 0;
 1461|       |
 1462|  3.56k|        *ppub = NULL;
 1463|  3.56k|        buf = OPENSSL_malloc(return_size);
  ------------------
  |  |  106|  3.56k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1464|  3.56k|        if (buf == NULL)
  ------------------
  |  Branch (1464:13): [True: 0, False: 3.56k]
  ------------------
 1465|      0|            return 0;
 1466|       |
 1467|  3.56k|        if (!EVP_PKEY_get_octet_string_param(pkey,
  ------------------
  |  Branch (1467:13): [True: 0, False: 3.56k]
  ------------------
 1468|  3.56k|                OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  398|  3.56k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1469|  3.56k|                buf, return_size, NULL)) {
 1470|      0|            OPENSSL_free(buf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1471|      0|            return 0;
 1472|      0|        }
 1473|  3.56k|        *ppub = buf;
 1474|  3.56k|        return return_size;
 1475|  3.56k|    }
 1476|       |
 1477|      0|#ifndef FIPS_MODULE
 1478|      0|    {
 1479|      0|        int rv = evp_pkey_asn1_ctrl(pkey, ASN1_PKEY_CTRL_GET1_TLS_ENCPT, 0, ppub);
  ------------------
  |  | 1615|      0|#define ASN1_PKEY_CTRL_GET1_TLS_ENCPT 0xa
  ------------------
 1480|      0|        if (rv <= 0)
  ------------------
  |  Branch (1480:13): [True: 0, False: 0]
  ------------------
 1481|      0|            return 0;
 1482|      0|        return rv;
 1483|      0|    }
 1484|      0|#endif /* !FIPS_MODULE */
 1485|      0|}
EVP_PKEY_new:
 1490|   881k|{
 1491|   881k|    EVP_PKEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   881k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1492|       |
 1493|   881k|    if (ret == NULL)
  ------------------
  |  Branch (1493:9): [True: 0, False: 881k]
  ------------------
 1494|      0|        return NULL;
 1495|       |
 1496|   881k|    ret->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|   881k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   881k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1497|   881k|    ret->save_type = EVP_PKEY_NONE;
  ------------------
  |  |   62|   881k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   881k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1498|       |
 1499|   881k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (1499:9): [True: 0, False: 881k]
  ------------------
 1500|      0|        goto err;
 1501|       |
 1502|   881k|    ret->lock = CRYPTO_THREAD_lock_new();
 1503|   881k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (1503:9): [True: 0, False: 881k]
  ------------------
 1504|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1505|      0|        goto err;
 1506|      0|    }
 1507|       |
 1508|   881k|#ifndef FIPS_MODULE
 1509|   881k|    ret->save_parameters = 1;
 1510|   881k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, ret, &ret->ex_data)) {
  ------------------
  |  |  268|   881k|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
  |  Branch (1510:9): [True: 0, False: 881k]
  ------------------
 1511|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1512|      0|        goto err;
 1513|      0|    }
 1514|   881k|#endif
 1515|   881k|    return ret;
 1516|       |
 1517|      0|err:
 1518|      0|    CRYPTO_FREE_REF(&ret->references);
 1519|      0|    CRYPTO_THREAD_lock_free(ret->lock);
 1520|      0|    OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1521|       |    return NULL;
 1522|   881k|}
EVP_PKEY_set_type_by_keymgmt:
 1675|   442k|{
 1676|   442k|#ifndef FIPS_MODULE
 1677|   442k|#define EVP_PKEY_TYPE_STR str[0]
 1678|   442k|#define EVP_PKEY_TYPE_STRLEN (str[0] == NULL ? -1 : (int)strlen(str[0]))
 1679|       |    /*
 1680|       |     * Find at most two strings that have an associated EVP_PKEY_ASN1_METHOD
 1681|       |     * Ideally, only one should be found.  If two (or more) are found, the
 1682|       |     * match is ambiguous.  This should never happen, but...
 1683|       |     */
 1684|   442k|    const char *str[2] = { NULL, NULL };
 1685|       |
 1686|   442k|    if (!EVP_KEYMGMT_names_do_all(keymgmt, find_ameth, &str)
  ------------------
  |  Branch (1686:9): [True: 0, False: 442k]
  ------------------
 1687|   442k|        || str[1] != NULL) {
  ------------------
  |  Branch (1687:12): [True: 0, False: 442k]
  ------------------
 1688|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1689|      0|        return 0;
 1690|      0|    }
 1691|       |#else
 1692|       |#define EVP_PKEY_TYPE_STR NULL
 1693|       |#define EVP_PKEY_TYPE_STRLEN -1
 1694|       |#endif
 1695|   442k|    return pkey_set_type(pkey, NULL, EVP_PKEY_NONE,
  ------------------
  |  |   62|   442k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   442k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1696|   442k|        EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1677|   442k|#define EVP_PKEY_TYPE_STR str[0]
  ------------------
                      EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1678|   442k|#define EVP_PKEY_TYPE_STRLEN (str[0] == NULL ? -1 : (int)strlen(str[0]))
  |  |  ------------------
  |  |  |  Branch (1678:31): [True: 2.88k, False: 439k]
  |  |  ------------------
  ------------------
 1697|   442k|        keymgmt);
 1698|       |
 1699|   442k|#undef EVP_PKEY_TYPE_STR
 1700|   442k|#undef EVP_PKEY_TYPE_STRLEN
 1701|   442k|}
EVP_PKEY_up_ref:
 1704|   506k|{
 1705|   506k|    int i;
 1706|       |
 1707|   506k|    if (CRYPTO_UP_REF(&pkey->references, &i) <= 0)
  ------------------
  |  Branch (1707:9): [True: 0, False: 506k]
  ------------------
 1708|      0|        return 0;
 1709|       |
 1710|   506k|    REF_PRINT_COUNT("EVP_PKEY", i, pkey);
  ------------------
  |  |  301|   506k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   506k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   506k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   506k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1711|   506k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   506k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 506k]
  |  |  ------------------
  ------------------
 1712|   506k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (1712:13): [True: 506k, False: 0]
  ------------------
 1713|   506k|}
evp_pkey_free_legacy:
 1778|   887k|{
 1779|   887k|    const EVP_PKEY_ASN1_METHOD *ameth = x->ameth;
 1780|   887k|    ENGINE *tmpe = NULL;
 1781|       |
 1782|   887k|    if (ameth == NULL && x->legacy_cache_pkey.ptr != NULL)
  ------------------
  |  Branch (1782:9): [True: 448k, False: 438k]
  |  Branch (1782:26): [True: 0, False: 448k]
  ------------------
 1783|      0|        ameth = EVP_PKEY_asn1_find(&tmpe, x->type);
 1784|       |
 1785|   887k|    if (ameth != NULL) {
  ------------------
  |  Branch (1785:9): [True: 438k, False: 448k]
  ------------------
 1786|   438k|        if (x->legacy_cache_pkey.ptr != NULL) {
  ------------------
  |  Branch (1786:13): [True: 0, False: 438k]
  ------------------
 1787|       |            /*
 1788|       |             * We should never have both a legacy origin key, and a key in the
 1789|       |             * legacy cache.
 1790|       |             */
 1791|      0|            assert(x->pkey.ptr == NULL);
  ------------------
  |  Branch (1791:13): [True: 0, False: 0]
  |  Branch (1791:13): [True: 0, False: 0]
  ------------------
 1792|       |            /*
 1793|       |             * For the purposes of freeing we make the legacy cache look like
 1794|       |             * a legacy origin key.
 1795|       |             */
 1796|      0|            x->pkey = x->legacy_cache_pkey;
 1797|      0|            x->legacy_cache_pkey.ptr = NULL;
 1798|      0|        }
 1799|   438k|        if (ameth->pkey_free != NULL)
  ------------------
  |  Branch (1799:13): [True: 438k, False: 0]
  ------------------
 1800|   438k|            ameth->pkey_free(x);
 1801|   438k|        x->pkey.ptr = NULL;
 1802|   438k|    }
 1803|   887k|#ifndef OPENSSL_NO_ENGINE
 1804|   887k|    ENGINE_finish(tmpe);
 1805|   887k|    ENGINE_finish(x->engine);
 1806|   887k|    x->engine = NULL;
 1807|   887k|    ENGINE_finish(x->pmeth_engine);
 1808|       |    x->pmeth_engine = NULL;
 1809|   887k|#endif
 1810|   887k|}
EVP_PKEY_free:
 1831|  2.41M|{
 1832|  2.41M|    int i;
 1833|       |
 1834|  2.41M|    if (x == NULL)
  ------------------
  |  Branch (1834:9): [True: 1.02M, False: 1.38M]
  ------------------
 1835|  1.02M|        return;
 1836|       |
 1837|  1.38M|    CRYPTO_DOWN_REF(&x->references, &i);
 1838|  1.38M|    REF_PRINT_COUNT("EVP_PKEY", i, x);
  ------------------
  |  |  301|  1.38M|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  1.38M|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  1.38M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  1.38M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1839|  1.38M|    if (i > 0)
  ------------------
  |  Branch (1839:9): [True: 506k, False: 881k]
  ------------------
 1840|   506k|        return;
 1841|   881k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   881k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 881k]
  |  |  ------------------
  ------------------
 1842|   881k|    evp_pkey_free_it(x);
 1843|   881k|#ifndef FIPS_MODULE
 1844|   881k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, x, &x->ex_data);
  ------------------
  |  |  268|   881k|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
 1845|   881k|#endif
 1846|   881k|    CRYPTO_THREAD_lock_free(x->lock);
 1847|   881k|    CRYPTO_FREE_REF(&x->references);
 1848|   881k|#ifndef FIPS_MODULE
 1849|   881k|    sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free);
  ------------------
  |  |  287|   881k|#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))
  ------------------
 1850|   881k|#endif
 1851|   881k|    OPENSSL_free(x);
  ------------------
  |  |  131|   881k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1852|   881k|}
evp_pkey_get_legacy:
 2155|   435k|{
 2156|   435k|    EVP_PKEY *tmp_copy = NULL;
 2157|   435k|    void *ret = NULL;
 2158|       |
 2159|   435k|    if (!ossl_assert(pk != NULL))
  ------------------
  |  |   52|   435k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   435k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2159:9): [True: 0, False: 435k]
  ------------------
 2160|      0|        return NULL;
 2161|       |
 2162|       |    /*
 2163|       |     * If this isn't an assigned provider side key, we just use any existing
 2164|       |     * origin legacy key.
 2165|       |     */
 2166|   435k|    if (!evp_pkey_is_assigned(pk))
  ------------------
  |  |  644|   435k|    ((pk)->pkey.ptr != NULL || (pk)->keydata != NULL)
  |  |  ------------------
  |  |  |  Branch (644:6): [True: 435k, False: 0]
  |  |  |  Branch (644:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2167|      0|        return NULL;
 2168|   435k|    if (!evp_pkey_is_provided(pk))
  ------------------
  |  |  652|   435k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (2168:9): [True: 435k, False: 0]
  ------------------
 2169|   435k|        return pk->pkey.ptr;
 2170|       |
 2171|      0|    if (!CRYPTO_THREAD_read_lock(pk->lock))
  ------------------
  |  Branch (2171:9): [True: 0, False: 0]
  ------------------
 2172|      0|        return NULL;
 2173|       |
 2174|      0|    ret = pk->legacy_cache_pkey.ptr;
 2175|       |
 2176|      0|    if (!CRYPTO_THREAD_unlock(pk->lock))
  ------------------
  |  Branch (2176:9): [True: 0, False: 0]
  ------------------
 2177|      0|        return NULL;
 2178|       |
 2179|      0|    if (ret != NULL)
  ------------------
  |  Branch (2179:9): [True: 0, False: 0]
  ------------------
 2180|      0|        return ret;
 2181|       |
 2182|      0|    if (!evp_pkey_copy_downgraded(&tmp_copy, pk))
  ------------------
  |  Branch (2182:9): [True: 0, False: 0]
  ------------------
 2183|      0|        goto err;
 2184|       |
 2185|      0|    if (!CRYPTO_THREAD_write_lock(pk->lock))
  ------------------
  |  Branch (2185:9): [True: 0, False: 0]
  ------------------
 2186|      0|        goto err;
 2187|       |
 2188|       |    /* Check again in case some other thread has updated it in the meantime */
 2189|      0|    ret = pk->legacy_cache_pkey.ptr;
 2190|      0|    if (ret == NULL) {
  ------------------
  |  Branch (2190:9): [True: 0, False: 0]
  ------------------
 2191|       |        /* Steal the legacy key reference from the temporary copy */
 2192|      0|        ret = pk->legacy_cache_pkey.ptr = tmp_copy->pkey.ptr;
 2193|      0|        tmp_copy->pkey.ptr = NULL;
 2194|      0|    }
 2195|       |
 2196|      0|    if (!CRYPTO_THREAD_unlock(pk->lock)) {
  ------------------
  |  Branch (2196:9): [True: 0, False: 0]
  ------------------
 2197|      0|        ret = NULL;
 2198|      0|        goto err;
 2199|      0|    }
 2200|       |
 2201|      0|err:
 2202|      0|    EVP_PKEY_free(tmp_copy);
 2203|       |
 2204|      0|    return ret;
 2205|      0|}
EVP_PKEY_get_octet_string_param:
 2260|  7.12k|{
 2261|  7.12k|    OSSL_PARAM params[2];
 2262|  7.12k|    int ret1 = 0, ret2 = 0;
 2263|       |
 2264|  7.12k|    if (key_name == NULL)
  ------------------
  |  Branch (2264:9): [True: 0, False: 7.12k]
  ------------------
 2265|      0|        return 0;
 2266|       |
 2267|  7.12k|    params[0] = OSSL_PARAM_construct_octet_string(key_name, buf, max_buf_sz);
 2268|  7.12k|    params[1] = OSSL_PARAM_construct_end();
 2269|  7.12k|    if ((ret1 = EVP_PKEY_get_params(pkey, params)))
  ------------------
  |  Branch (2269:9): [True: 7.12k, False: 0]
  ------------------
 2270|  7.12k|        ret2 = OSSL_PARAM_modified(params);
 2271|  7.12k|    if (ret2 && out_len != NULL)
  ------------------
  |  Branch (2271:9): [True: 7.12k, False: 0]
  |  Branch (2271:17): [True: 3.56k, False: 3.56k]
  ------------------
 2272|  3.56k|        *out_len = params[0].return_size;
 2273|  7.12k|    return ret1 && ret2;
  ------------------
  |  Branch (2273:12): [True: 7.12k, False: 0]
  |  Branch (2273:20): [True: 7.12k, False: 0]
  ------------------
 2274|  7.12k|}
EVP_PKEY_get_params:
 2446|  7.12k|{
 2447|  7.12k|    if (pkey != NULL) {
  ------------------
  |  Branch (2447:9): [True: 7.12k, False: 0]
  ------------------
 2448|  7.12k|        if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  652|  7.12k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (652:5): [True: 7.12k, False: 0]
  |  |  ------------------
  ------------------
 2449|  7.12k|            return evp_keymgmt_get_params(pkey->keymgmt, pkey->keydata, params) > 0;
 2450|      0|#ifndef FIPS_MODULE
 2451|      0|        else if (evp_pkey_is_legacy(pkey))
  ------------------
  |  |  650|      0|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|      0|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|      0|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (650:6): [True: 0, False: 0]
  |  |  |  Branch (650:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2452|      0|            return evp_pkey_get_params_to_ctrl(pkey, params) > 0;
 2453|  7.12k|#endif
 2454|  7.12k|    }
 2455|  7.12k|    ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2456|      0|    return 0;
 2457|  7.12k|}
p_lib.c:detect_foreign_key:
  758|   435k|{
  759|   435k|    switch (pkey->type) {
  760|   316k|    case EVP_PKEY_RSA:
  ------------------
  |  |   63|   316k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   316k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (760:5): [True: 316k, False: 119k]
  ------------------
  761|   316k|    case EVP_PKEY_RSA_PSS:
  ------------------
  |  |   65|   316k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|   316k|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (761:5): [True: 0, False: 435k]
  ------------------
  762|   316k|        pkey->foreign = pkey->pkey.rsa != NULL
  ------------------
  |  Branch (762:25): [True: 316k, False: 0]
  ------------------
  763|   316k|            && ossl_rsa_is_foreign(pkey->pkey.rsa);
  ------------------
  |  Branch (763:16): [True: 0, False: 316k]
  ------------------
  764|   316k|        break;
  765|      0|#ifndef OPENSSL_NO_EC
  766|      0|    case EVP_PKEY_SM2:
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (766:5): [True: 0, False: 435k]
  ------------------
  767|      0|        break;
  768|   119k|    case EVP_PKEY_EC:
  ------------------
  |  |   73|   119k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   119k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (768:5): [True: 119k, False: 316k]
  ------------------
  769|   119k|        pkey->foreign = pkey->pkey.ec != NULL
  ------------------
  |  Branch (769:25): [True: 119k, False: 0]
  ------------------
  770|   119k|            && ossl_ec_key_is_foreign(pkey->pkey.ec);
  ------------------
  |  Branch (770:16): [True: 0, False: 119k]
  ------------------
  771|   119k|        break;
  772|      0|#endif
  773|      0|#ifndef OPENSSL_NO_DSA
  774|      0|    case EVP_PKEY_DSA:
  ------------------
  |  |   66|      0|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|      0|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (774:5): [True: 0, False: 435k]
  ------------------
  775|      0|        pkey->foreign = pkey->pkey.dsa != NULL
  ------------------
  |  Branch (775:25): [True: 0, False: 0]
  ------------------
  776|      0|            && ossl_dsa_is_foreign(pkey->pkey.dsa);
  ------------------
  |  Branch (776:16): [True: 0, False: 0]
  ------------------
  777|      0|        break;
  778|      0|#endif
  779|      0|#ifndef OPENSSL_NO_DH
  780|      0|    case EVP_PKEY_DH:
  ------------------
  |  |   71|      0|#define EVP_PKEY_DH NID_dhKeyAgreement
  |  |  ------------------
  |  |  |  |  621|      0|#define NID_dhKeyAgreement              28
  |  |  ------------------
  ------------------
  |  Branch (780:5): [True: 0, False: 435k]
  ------------------
  781|      0|        pkey->foreign = pkey->pkey.dh != NULL
  ------------------
  |  Branch (781:25): [True: 0, False: 0]
  ------------------
  782|      0|            && ossl_dh_is_foreign(pkey->pkey.dh);
  ------------------
  |  Branch (782:16): [True: 0, False: 0]
  ------------------
  783|      0|        break;
  784|      0|#endif
  785|      0|    default:
  ------------------
  |  Branch (785:5): [True: 0, False: 435k]
  ------------------
  786|      0|        pkey->foreign = 0;
  787|      0|        break;
  788|   435k|    }
  789|   435k|}
p_lib.c:pkey_set_type:
 1539|  3.02M|{
 1540|  3.02M|#ifndef FIPS_MODULE
 1541|  3.02M|    const EVP_PKEY_ASN1_METHOD *ameth = NULL;
 1542|  3.02M|    ENGINE **eptr = (e == NULL) ? &e : NULL;
  ------------------
  |  Branch (1542:21): [True: 3.02M, False: 0]
  ------------------
 1543|  3.02M|#endif
 1544|       |
 1545|       |    /*
 1546|       |     * The setups can't set both legacy and provider side methods.
 1547|       |     * It is forbidden
 1548|       |     */
 1549|  3.02M|    if (!ossl_assert(type == EVP_PKEY_NONE || keymgmt == NULL)
  ------------------
  |  |   52|  6.04M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 2.08M, False: 942k]
  |  |  |  Branch (52:41): [True: 942k, False: 0]
  |  |  ------------------
  |  |   53|  6.04M|    __FILE__, __LINE__)
  ------------------
  |  Branch (1549:9): [True: 0, False: 3.02M]
  ------------------
 1550|  3.02M|        || !ossl_assert(e == NULL || keymgmt == NULL)) {
  ------------------
  |  |   52|  3.02M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 3.02M, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  3.02M|    __FILE__, __LINE__)
  ------------------
  |  Branch (1550:12): [True: 0, False: 3.02M]
  ------------------
 1551|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1552|      0|        return 0;
 1553|      0|    }
 1554|       |
 1555|  3.02M|    if (pkey != NULL) {
  ------------------
  |  Branch (1555:9): [True: 1.38M, False: 1.63M]
  ------------------
 1556|  1.38M|        int free_it = 0;
 1557|       |
 1558|  1.38M|#ifndef FIPS_MODULE
 1559|  1.38M|        free_it = free_it || pkey->pkey.ptr != NULL;
  ------------------
  |  Branch (1559:19): [True: 0, False: 1.38M]
  |  Branch (1559:30): [True: 0, False: 1.38M]
  ------------------
 1560|  1.38M|#endif
 1561|  1.38M|        free_it = free_it || pkey->keydata != NULL;
  ------------------
  |  Branch (1561:19): [True: 0, False: 1.38M]
  |  Branch (1561:30): [True: 0, False: 1.38M]
  ------------------
 1562|  1.38M|        if (free_it)
  ------------------
  |  Branch (1562:13): [True: 0, False: 1.38M]
  ------------------
 1563|      0|            evp_pkey_free_it(pkey);
 1564|  1.38M|#ifndef FIPS_MODULE
 1565|       |        /*
 1566|       |         * If key type matches and a method exists then this lookup has
 1567|       |         * succeeded once so just indicate success.
 1568|       |         */
 1569|  1.38M|        if (pkey->type != EVP_PKEY_NONE
  ------------------
  |  |   62|  1.38M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  2.76M|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1569:13): [True: 503k, False: 881k]
  ------------------
 1570|   503k|            && type == pkey->save_type
  ------------------
  |  Branch (1570:16): [True: 487k, False: 16.3k]
  ------------------
 1571|   487k|            && pkey->ameth != NULL)
  ------------------
  |  Branch (1571:16): [True: 487k, False: 0]
  ------------------
 1572|   487k|            return 1;
 1573|   897k|#ifndef OPENSSL_NO_ENGINE
 1574|       |        /* If we have ENGINEs release them */
 1575|   897k|        ENGINE_finish(pkey->engine);
 1576|   897k|        pkey->engine = NULL;
 1577|   897k|        ENGINE_finish(pkey->pmeth_engine);
 1578|   897k|        pkey->pmeth_engine = NULL;
 1579|   897k|#endif
 1580|   897k|#endif
 1581|   897k|    }
 1582|  2.53M|#ifndef FIPS_MODULE
 1583|  2.53M|    if (str != NULL)
  ------------------
  |  Branch (1583:9): [True: 2.07M, False: 457k]
  ------------------
 1584|  2.07M|        ameth = EVP_PKEY_asn1_find_str(eptr, str, len);
 1585|   457k|    else if (type != EVP_PKEY_NONE)
  ------------------
  |  |   62|   457k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   457k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1585:14): [True: 455k, False: 2.88k]
  ------------------
 1586|   455k|        ameth = EVP_PKEY_asn1_find(eptr, type);
 1587|  2.53M|#ifndef OPENSSL_NO_ENGINE
 1588|  2.53M|    if (pkey == NULL && eptr != NULL)
  ------------------
  |  Branch (1588:9): [True: 1.63M, False: 897k]
  |  Branch (1588:25): [True: 1.63M, False: 0]
  ------------------
 1589|  1.63M|        ENGINE_finish(e);
 1590|  2.53M|#endif
 1591|  2.53M|#endif
 1592|       |
 1593|  2.53M|    {
 1594|  2.53M|        int check = 1;
 1595|       |
 1596|  2.53M|#ifndef FIPS_MODULE
 1597|  2.53M|        check = check && ameth == NULL;
  ------------------
  |  Branch (1597:17): [True: 2.53M, False: 0]
  |  Branch (1597:26): [True: 1.20M, False: 1.33M]
  ------------------
 1598|  2.53M|#endif
 1599|  2.53M|        check = check && keymgmt == NULL;
  ------------------
  |  Branch (1599:17): [True: 1.20M, False: 1.33M]
  |  Branch (1599:26): [True: 1.19M, False: 2.88k]
  ------------------
 1600|  2.53M|        if (check) {
  ------------------
  |  Branch (1600:13): [True: 1.19M, False: 1.33M]
  ------------------
 1601|  1.19M|            ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  404|  1.19M|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|  1.19M|    (ERR_new(),                                                  \
  |  |  |  |  407|  1.19M|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  1.19M|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|  1.19M|        ERR_set_error)
  |  |  ------------------
  ------------------
 1602|  1.19M|            return 0;
 1603|  1.19M|        }
 1604|  2.53M|    }
 1605|  1.33M|    if (pkey != NULL) {
  ------------------
  |  Branch (1605:9): [True: 897k, False: 439k]
  ------------------
 1606|   897k|        if (keymgmt != NULL && !EVP_KEYMGMT_up_ref(keymgmt)) {
  ------------------
  |  Branch (1606:13): [True: 442k, False: 455k]
  |  Branch (1606:32): [True: 0, False: 442k]
  ------------------
 1607|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1608|      0|            return 0;
 1609|      0|        }
 1610|       |
 1611|   897k|        pkey->keymgmt = keymgmt;
 1612|       |
 1613|   897k|        pkey->save_type = type;
 1614|   897k|        pkey->type = type;
 1615|       |
 1616|   897k|#ifndef FIPS_MODULE
 1617|       |        /*
 1618|       |         * If the internal "origin" key is provider side, don't save |ameth|.
 1619|       |         * The main reason is that |ameth| is one factor to detect that the
 1620|       |         * internal "origin" key is a legacy one.
 1621|       |         */
 1622|   897k|        if (keymgmt == NULL)
  ------------------
  |  Branch (1622:13): [True: 455k, False: 442k]
  ------------------
 1623|   455k|            pkey->ameth = ameth;
 1624|       |
 1625|       |        /*
 1626|       |         * The EVP_PKEY_ASN1_METHOD |pkey_id| retains its legacy key purpose
 1627|       |         * for any key type that has a legacy implementation, regardless of
 1628|       |         * if the internal key is a legacy or a provider side one.  When
 1629|       |         * there is no legacy implementation for the key, the type becomes
 1630|       |         * EVP_PKEY_KEYMGMT, which indicates that one should be cautious
 1631|       |         * with functions that expect legacy internal keys.
 1632|       |         */
 1633|   897k|        if (ameth != NULL) {
  ------------------
  |  Branch (1633:13): [True: 894k, False: 2.88k]
  ------------------
 1634|   894k|            if (type == EVP_PKEY_NONE)
  ------------------
  |  |   62|   894k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   894k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1634:17): [True: 439k, False: 455k]
  ------------------
 1635|   439k|                pkey->type = ameth->pkey_id;
 1636|   894k|        } else {
 1637|  2.88k|            pkey->type = EVP_PKEY_KEYMGMT;
  ------------------
  |  |  103|  2.88k|#define EVP_PKEY_KEYMGMT -1
  ------------------
 1638|  2.88k|        }
 1639|   897k|#ifndef OPENSSL_NO_ENGINE
 1640|   897k|        if (eptr == NULL && e != NULL && !ENGINE_init(e)) {
  ------------------
  |  Branch (1640:13): [True: 0, False: 897k]
  |  Branch (1640:29): [True: 0, False: 0]
  |  Branch (1640:42): [True: 0, False: 0]
  ------------------
 1641|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1642|      0|            return 0;
 1643|      0|        }
 1644|   897k|#endif
 1645|   897k|        pkey->engine = e;
 1646|   897k|#endif
 1647|   897k|    }
 1648|  1.33M|    return 1;
 1649|  1.33M|}
p_lib.c:find_ameth:
 1653|  1.63M|{
 1654|  1.63M|    const char **str = data;
 1655|       |
 1656|       |    /*
 1657|       |     * The error messages from pkey_set_type() are uninteresting here,
 1658|       |     * and misleading.
 1659|       |     */
 1660|  1.63M|    ERR_set_mark();
 1661|       |
 1662|  1.63M|    if (pkey_set_type(NULL, NULL, EVP_PKEY_NONE, name, (int)strlen(name),
  ------------------
  |  |   62|  1.63M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  1.63M|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1662:9): [True: 439k, False: 1.19M]
  ------------------
 1663|  1.63M|            NULL)) {
 1664|   439k|        if (str[0] == NULL)
  ------------------
  |  Branch (1664:13): [True: 439k, False: 0]
  ------------------
 1665|   439k|            str[0] = name;
 1666|      0|        else if (str[1] == NULL)
  ------------------
  |  Branch (1666:18): [True: 0, False: 0]
  ------------------
 1667|      0|            str[1] = name;
 1668|   439k|    }
 1669|       |
 1670|  1.63M|    ERR_pop_to_mark();
 1671|  1.63M|}
p_lib.c:evp_pkey_free_it:
 1814|   881k|{
 1815|       |    /* internal function; x is never NULL */
 1816|   881k|    evp_keymgmt_util_clear_operation_cache(x);
 1817|   881k|#ifndef FIPS_MODULE
 1818|   881k|    evp_pkey_free_legacy(x);
 1819|   881k|#endif
 1820|       |
 1821|   881k|    if (x->keymgmt != NULL) {
  ------------------
  |  Branch (1821:9): [True: 442k, False: 438k]
  ------------------
 1822|   442k|        evp_keymgmt_freedata(x->keymgmt, x->keydata);
 1823|   442k|        EVP_KEYMGMT_free(x->keymgmt);
 1824|   442k|        x->keymgmt = NULL;
 1825|   442k|        x->keydata = NULL;
 1826|   442k|    }
 1827|   881k|    x->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|   881k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   881k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1828|   881k|}

EVP_PKEY_keygen_init:
   98|  6.38k|{
   99|  6.38k|    return gen_init(ctx, EVP_PKEY_OP_KEYGEN);
  ------------------
  |  | 1763|  6.38k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  100|  6.38k|}
EVP_PKEY_generate:
  127|  6.38k|{
  128|  6.38k|    int ret = 0;
  129|  6.38k|    EVP_PKEY *allocated_pkey = NULL;
  130|       |    /* Legacy compatible keygen callback info, only used with provider impls */
  131|  6.38k|    int gentmp[2];
  132|       |
  133|  6.38k|    if (ppkey == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 6.38k]
  ------------------
  134|      0|        return -1;
  135|       |
  136|  6.38k|    if (ctx == NULL)
  ------------------
  |  Branch (136:9): [True: 0, False: 6.38k]
  ------------------
  137|      0|        goto not_supported;
  138|       |
  139|  6.38k|    if ((ctx->operation & EVP_PKEY_OP_TYPE_GEN) == 0)
  ------------------
  |  | 1799|  6.38k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1762|  6.38k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  ------------------
  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1763|  6.38k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (139:9): [True: 0, False: 6.38k]
  ------------------
  140|      0|        goto not_initialized;
  141|       |
  142|  6.38k|    if (*ppkey == NULL)
  ------------------
  |  Branch (142:9): [True: 6.38k, False: 0]
  ------------------
  143|  6.38k|        *ppkey = allocated_pkey = EVP_PKEY_new();
  144|       |
  145|  6.38k|    if (*ppkey == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 6.38k]
  ------------------
  146|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  147|      0|        return -1;
  148|      0|    }
  149|       |
  150|  6.38k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (150:9): [True: 0, False: 6.38k]
  ------------------
  151|      0|        goto legacy;
  152|       |
  153|       |    /*
  154|       |     * Assigning gentmp to ctx->keygen_info is something our legacy
  155|       |     * implementations do.  Because the provider implementations aren't
  156|       |     * allowed to reach into our EVP_PKEY_CTX, we need to provide similar
  157|       |     * space for backward compatibility.  It's ok that we attach a local
  158|       |     * variable, as it should only be useful in the calls down from here.
  159|       |     * This is cleared as soon as it isn't useful any more, i.e. directly
  160|       |     * after the evp_keymgmt_util_gen() call.
  161|       |     */
  162|  6.38k|    ctx->keygen_info = gentmp;
  163|  6.38k|    ctx->keygen_info_count = 2;
  164|       |
  165|  6.38k|    ret = 1;
  166|  6.38k|    if (ctx->pkey != NULL) {
  ------------------
  |  Branch (166:9): [True: 0, False: 6.38k]
  ------------------
  167|      0|        EVP_KEYMGMT *tmp_keymgmt = ctx->keymgmt;
  168|      0|        void *keydata = evp_pkey_export_to_provider(ctx->pkey, ctx->libctx,
  169|      0|            &tmp_keymgmt, ctx->propquery);
  170|       |
  171|      0|        if (tmp_keymgmt == NULL)
  ------------------
  |  Branch (171:13): [True: 0, False: 0]
  ------------------
  172|      0|            goto not_supported;
  173|       |        /*
  174|       |         * It's ok if keydata is NULL here.  The backend is expected to deal
  175|       |         * with that as it sees fit.
  176|       |         */
  177|      0|        ret = evp_keymgmt_gen_set_template(ctx->keymgmt,
  178|      0|            ctx->op.keymgmt.genctx, keydata);
  179|      0|    }
  180|       |
  181|       |    /*
  182|       |     * the returned value from evp_keymgmt_util_gen() is cached in *ppkey,
  183|       |     * so we do not need to save it, just check it.
  184|       |     */
  185|  6.38k|    ret = ret
  ------------------
  |  Branch (185:11): [True: 6.38k, False: 0]
  ------------------
  186|  6.38k|        && (evp_keymgmt_util_gen(*ppkey, ctx->keymgmt, ctx->op.keymgmt.genctx,
  ------------------
  |  Branch (186:12): [True: 6.38k, False: 0]
  ------------------
  187|  6.38k|                ossl_callback_to_pkey_gencb, ctx)
  188|  6.38k|            != NULL);
  189|       |
  190|  6.38k|    ctx->keygen_info = NULL;
  191|       |
  192|  6.38k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_DEPRECATED_3_6)
  193|       |    /* In case |*ppkey| was originally a legacy key */
  194|  6.38k|    if (ret)
  ------------------
  |  Branch (194:9): [True: 6.38k, False: 0]
  ------------------
  195|  6.38k|        evp_pkey_free_legacy(*ppkey);
  196|  6.38k|#endif
  197|       |
  198|       |    /*
  199|       |     * Because we still have legacy keys
  200|       |     */
  201|  6.38k|    (*ppkey)->type = ctx->legacy_keytype;
  202|       |
  203|  6.38k|    goto end;
  204|       |
  205|      0|legacy:
  206|       |#ifdef FIPS_MODULE
  207|       |    goto not_supported;
  208|       |#else
  209|       |    /*
  210|       |     * If we get here then we're using legacy paramgen/keygen. In that case
  211|       |     * the pkey in ctx (if there is one) had better not be provided (because the
  212|       |     * legacy methods may not know how to handle it). However we can only get
  213|       |     * here if ctx->op.keymgmt.genctx == NULL, but that should never be the case
  214|       |     * if ctx->pkey is provided because we don't allow this when we initialise
  215|       |     * the ctx.
  216|       |     */
  217|      0|    if (ctx->pkey != NULL && !ossl_assert(!evp_pkey_is_provided(ctx->pkey)))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (217:9): [True: 0, False: 0]
  |  Branch (217:30): [True: 0, False: 0]
  ------------------
  218|      0|        goto not_accessible;
  219|       |
  220|      0|    switch (ctx->operation) {
  221|      0|    case EVP_PKEY_OP_PARAMGEN:
  ------------------
  |  | 1762|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (221:5): [True: 0, False: 0]
  ------------------
  222|      0|        ret = ctx->pmeth->paramgen(ctx, *ppkey);
  223|      0|        break;
  224|      0|    case EVP_PKEY_OP_KEYGEN:
  ------------------
  |  | 1763|      0|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (224:5): [True: 0, False: 0]
  ------------------
  225|      0|        ret = ctx->pmeth->keygen(ctx, *ppkey);
  226|      0|        break;
  227|      0|    default:
  ------------------
  |  Branch (227:5): [True: 0, False: 0]
  ------------------
  228|      0|        goto not_supported;
  229|      0|    }
  230|      0|#endif
  231|       |
  232|  6.38k|end:
  233|  6.38k|    if (ret <= 0) {
  ------------------
  |  Branch (233:9): [True: 0, False: 6.38k]
  ------------------
  234|      0|        if (allocated_pkey != NULL)
  ------------------
  |  Branch (234:13): [True: 0, False: 0]
  ------------------
  235|      0|            *ppkey = NULL;
  236|      0|        EVP_PKEY_free(allocated_pkey);
  237|      0|    }
  238|  6.38k|    return ret;
  239|       |
  240|      0|not_supported:
  241|      0|    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  242|      0|    ret = -2;
  243|      0|    goto end;
  244|      0|not_initialized:
  245|      0|    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  246|      0|    ret = -1;
  247|      0|    goto end;
  248|      0|#ifndef FIPS_MODULE
  249|      0|not_accessible:
  250|       |    ERR_raise(ERR_LIB_EVP, EVP_R_INACCESSIBLE_DOMAIN_PARAMETERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  251|      0|    ret = -1;
  252|      0|    goto end;
  253|      0|#endif
  254|      0|}
EVP_PKEY_keygen:
  266|  3.56k|{
  267|  3.56k|    if (ctx->operation != EVP_PKEY_OP_KEYGEN) {
  ------------------
  |  | 1763|  3.56k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (267:9): [True: 0, False: 3.56k]
  ------------------
  268|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        return -1;
  270|      0|    }
  271|  3.56k|    return EVP_PKEY_generate(ctx, ppkey);
  272|  3.56k|}
EVP_PKEY_export:
  437|  2.81k|{
  438|  2.81k|    if (pkey == NULL) {
  ------------------
  |  Branch (438:9): [True: 0, False: 2.81k]
  ------------------
  439|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  440|      0|        return 0;
  441|      0|    }
  442|  2.81k|#ifndef FIPS_MODULE
  443|  2.81k|    if (evp_pkey_is_legacy(pkey)) {
  ------------------
  |  |  650|  2.81k|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|  2.81k|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  5.63k|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (650:6): [True: 2.81k, False: 0]
  |  |  |  Branch (650:37): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  444|      0|        struct fake_import_data_st data;
  445|       |
  446|      0|        data.export_cb = export_cb;
  447|      0|        data.export_cbarg = export_cbarg;
  448|       |
  449|       |        /*
  450|       |         * We don't need to care about libctx or propq here, as we're only
  451|       |         * interested in the resulting OSSL_PARAM array.
  452|       |         */
  453|      0|        return pkey->ameth->export_to(pkey, &data, pkey_fake_import,
  454|      0|            NULL, NULL);
  455|      0|    }
  456|  2.81k|#endif
  457|  2.81k|    return evp_keymgmt_util_export(pkey, selection, export_cb, export_cbarg);
  458|  2.81k|}
pmeth_gn.c:gen_init:
   26|  6.38k|{
   27|  6.38k|    int ret = 0;
   28|       |
   29|  6.38k|    if (ctx == NULL)
  ------------------
  |  Branch (29:9): [True: 0, False: 6.38k]
  ------------------
   30|      0|        goto not_supported;
   31|       |
   32|  6.38k|    evp_pkey_ctx_free_old_ops(ctx);
   33|  6.38k|    ctx->operation = operation;
   34|       |
   35|  6.38k|    if (ctx->keymgmt == NULL || ctx->keymgmt->gen_init == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 6.38k]
  |  Branch (35:33): [True: 0, False: 6.38k]
  ------------------
   36|      0|        goto legacy;
   37|       |
   38|  6.38k|    switch (operation) {
  ------------------
  |  Branch (38:13): [True: 6.38k, False: 0]
  ------------------
   39|      0|    case EVP_PKEY_OP_PARAMGEN:
  ------------------
  |  | 1762|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (39:5): [True: 0, False: 6.38k]
  ------------------
   40|      0|        ctx->op.keymgmt.genctx = evp_keymgmt_gen_init(ctx->keymgmt,
   41|      0|            OSSL_KEYMGMT_SELECT_ALL_PARAMETERS, NULL);
  ------------------
  |  |  647|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  642|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  648|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  643|      0|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
   42|      0|        break;
   43|  6.38k|    case EVP_PKEY_OP_KEYGEN:
  ------------------
  |  | 1763|  6.38k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (43:5): [True: 6.38k, False: 0]
  ------------------
   44|  6.38k|        ctx->op.keymgmt.genctx = evp_keymgmt_gen_init(ctx->keymgmt, OSSL_KEYMGMT_SELECT_KEYPAIR,
  ------------------
  |  |  650|  6.38k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  6.38k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  6.38k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
   45|  6.38k|            NULL);
   46|  6.38k|        break;
   47|  6.38k|    }
   48|       |
   49|  6.38k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (49:9): [True: 0, False: 6.38k]
  ------------------
   50|  6.38k|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   51|  6.38k|    else
   52|  6.38k|        ret = 1;
   53|  6.38k|    goto end;
   54|       |
   55|      0|legacy:
   56|       |#ifdef FIPS_MODULE
   57|       |    goto not_supported;
   58|       |#else
   59|      0|    if (ctx->pmeth == NULL
  ------------------
  |  Branch (59:9): [True: 0, False: 0]
  ------------------
   60|      0|        || (operation == EVP_PKEY_OP_PARAMGEN
  ------------------
  |  | 1762|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (60:13): [True: 0, False: 0]
  ------------------
   61|      0|            && ctx->pmeth->paramgen == NULL)
  ------------------
  |  Branch (61:16): [True: 0, False: 0]
  ------------------
   62|      0|        || (operation == EVP_PKEY_OP_KEYGEN
  ------------------
  |  | 1763|      0|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (62:13): [True: 0, False: 0]
  ------------------
   63|      0|            && ctx->pmeth->keygen == NULL))
  ------------------
  |  Branch (63:16): [True: 0, False: 0]
  ------------------
   64|      0|        goto not_supported;
   65|       |
   66|      0|    ret = 1;
   67|      0|    switch (operation) {
  ------------------
  |  Branch (67:13): [True: 0, False: 0]
  ------------------
   68|      0|    case EVP_PKEY_OP_PARAMGEN:
  ------------------
  |  | 1762|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (68:5): [True: 0, False: 0]
  ------------------
   69|      0|        if (ctx->pmeth->paramgen_init != NULL)
  ------------------
  |  Branch (69:13): [True: 0, False: 0]
  ------------------
   70|      0|            ret = ctx->pmeth->paramgen_init(ctx);
   71|      0|        break;
   72|      0|    case EVP_PKEY_OP_KEYGEN:
  ------------------
  |  | 1763|      0|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (72:5): [True: 0, False: 0]
  ------------------
   73|      0|        if (ctx->pmeth->keygen_init != NULL)
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  ------------------
   74|      0|            ret = ctx->pmeth->keygen_init(ctx);
   75|      0|        break;
   76|      0|    }
   77|      0|#endif
   78|       |
   79|  6.38k|end:
   80|  6.38k|    if (ret <= 0 && ctx != NULL) {
  ------------------
  |  Branch (80:9): [True: 0, False: 6.38k]
  |  Branch (80:21): [True: 0, False: 0]
  ------------------
   81|      0|        evp_pkey_ctx_free_old_ops(ctx);
   82|      0|        ctx->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1761|      0|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
   83|      0|    }
   84|  6.38k|    return ret;
   85|       |
   86|      0|not_supported:
   87|       |    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   88|      0|    ret = -2;
   89|      0|    goto end;
   90|      0|}

evp_pkey_ctx_state:
  139|  6.38k|{
  140|  6.38k|    if (ctx->operation == EVP_PKEY_OP_UNDEFINED)
  ------------------
  |  | 1761|  6.38k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  |  Branch (140:9): [True: 0, False: 6.38k]
  ------------------
  141|      0|        return EVP_PKEY_STATE_UNKNOWN;
  ------------------
  |  |  950|      0|#define EVP_PKEY_STATE_UNKNOWN 0
  ------------------
  142|       |
  143|  6.38k|    if ((EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  747|  12.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1790|  6.38k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1772|  6.38k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (747:5): [True: 0, False: 6.38k]
  |  |  ------------------
  ------------------
  144|      0|            && ctx->op.kex.algctx != NULL)
  ------------------
  |  Branch (144:16): [True: 0, False: 0]
  ------------------
  145|  6.38k|        || (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  744|  12.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|  6.38k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|  6.38k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|  6.38k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|  6.38k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|  6.38k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|  6.38k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|  6.38k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|  6.38k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|  6.38k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|  6.38k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|  6.38k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 6.38k]
  |  |  ------------------
  ------------------
  146|      0|            && ctx->op.sig.algctx != NULL)
  ------------------
  |  Branch (146:16): [True: 0, False: 0]
  ------------------
  147|  6.38k|        || (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  750|  12.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1787|  6.38k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1770|  6.38k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1771|  6.38k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (750:5): [True: 0, False: 6.38k]
  |  |  ------------------
  ------------------
  148|      0|            && ctx->op.ciph.algctx != NULL)
  ------------------
  |  Branch (148:16): [True: 0, False: 0]
  ------------------
  149|  6.38k|        || (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  753|  12.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1799|  6.38k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1762|  6.38k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1763|  6.38k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (753:5): [True: 6.38k, False: 0]
  |  |  ------------------
  ------------------
  150|  6.38k|            && ctx->op.keymgmt.genctx != NULL)
  ------------------
  |  Branch (150:16): [True: 6.38k, False: 0]
  ------------------
  151|      0|        || (EVP_PKEY_CTX_IS_KEM_OP(ctx)
  ------------------
  |  |  759|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1796|      0|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1773|      0|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1774|      0|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  152|      0|            && ctx->op.encap.algctx != NULL))
  ------------------
  |  Branch (152:16): [True: 0, False: 0]
  ------------------
  153|  6.38k|        return EVP_PKEY_STATE_PROVIDER;
  ------------------
  |  |  952|  6.38k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
  154|       |
  155|      0|    return EVP_PKEY_STATE_LEGACY;
  ------------------
  |  |  951|      0|#define EVP_PKEY_STATE_LEGACY 1
  ------------------
  156|  6.38k|}
EVP_PKEY_CTX_new_from_name:
  348|  6.38k|{
  349|  6.38k|    return int_ctx_new(libctx, NULL, NULL, name, propquery, -1);
  350|  6.38k|}
EVP_PKEY_CTX_new_from_pkey:
  354|  70.4k|{
  355|  70.4k|    return int_ctx_new(libctx, pkey, NULL, NULL, propquery, -1);
  356|  70.4k|}
evp_pkey_ctx_free_old_ops:
  359|  83.0k|{
  360|  83.0k|    if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)) {
  ------------------
  |  |  744|  83.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|  83.0k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|  83.0k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|  83.0k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|  83.0k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|  83.0k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|  83.0k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|  83.0k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|  83.0k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|  83.0k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|  83.0k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|  83.0k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 83.0k]
  |  |  ------------------
  ------------------
  361|      0|        if (ctx->op.sig.algctx != NULL && ctx->op.sig.signature != NULL)
  ------------------
  |  Branch (361:13): [True: 0, False: 0]
  |  Branch (361:43): [True: 0, False: 0]
  ------------------
  362|      0|            ctx->op.sig.signature->freectx(ctx->op.sig.algctx);
  363|      0|        EVP_SIGNATURE_free(ctx->op.sig.signature);
  364|      0|        ctx->op.sig.algctx = NULL;
  365|      0|        ctx->op.sig.signature = NULL;
  366|  83.0k|    } else if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) {
  ------------------
  |  |  747|  83.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1790|  83.0k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1772|  83.0k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (747:5): [True: 0, False: 83.0k]
  |  |  ------------------
  ------------------
  367|      0|        if (ctx->op.kex.algctx != NULL && ctx->op.kex.exchange != NULL)
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  |  Branch (367:43): [True: 0, False: 0]
  ------------------
  368|      0|            ctx->op.kex.exchange->freectx(ctx->op.kex.algctx);
  369|      0|        EVP_KEYEXCH_free(ctx->op.kex.exchange);
  370|      0|        ctx->op.kex.algctx = NULL;
  371|      0|        ctx->op.kex.exchange = NULL;
  372|  83.0k|    } else if (EVP_PKEY_CTX_IS_KEM_OP(ctx)) {
  ------------------
  |  |  759|  83.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1796|  83.0k|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1773|  83.0k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1774|  83.0k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 0, False: 83.0k]
  |  |  ------------------
  ------------------
  373|      0|        if (ctx->op.encap.algctx != NULL && ctx->op.encap.kem != NULL)
  ------------------
  |  Branch (373:13): [True: 0, False: 0]
  |  Branch (373:45): [True: 0, False: 0]
  ------------------
  374|      0|            ctx->op.encap.kem->freectx(ctx->op.encap.algctx);
  375|      0|        EVP_KEM_free(ctx->op.encap.kem);
  376|      0|        ctx->op.encap.algctx = NULL;
  377|      0|        ctx->op.encap.kem = NULL;
  378|  83.0k|    } else if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)) {
  ------------------
  |  |  750|  83.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1787|  83.0k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1770|  83.0k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1771|  83.0k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (750:5): [True: 0, False: 83.0k]
  |  |  ------------------
  ------------------
  379|      0|        if (ctx->op.ciph.algctx != NULL && ctx->op.ciph.cipher != NULL)
  ------------------
  |  Branch (379:13): [True: 0, False: 0]
  |  Branch (379:44): [True: 0, False: 0]
  ------------------
  380|      0|            ctx->op.ciph.cipher->freectx(ctx->op.ciph.algctx);
  381|      0|        EVP_ASYM_CIPHER_free(ctx->op.ciph.cipher);
  382|      0|        ctx->op.ciph.algctx = NULL;
  383|      0|        ctx->op.ciph.cipher = NULL;
  384|  83.0k|    } else if (EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  753|  83.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1799|  83.0k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1762|  83.0k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1763|  83.0k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (753:5): [True: 6.38k, False: 76.7k]
  |  |  ------------------
  ------------------
  385|  6.38k|        if (ctx->op.keymgmt.genctx != NULL && ctx->keymgmt != NULL)
  ------------------
  |  Branch (385:13): [True: 6.38k, False: 0]
  |  Branch (385:47): [True: 6.38k, False: 0]
  ------------------
  386|  6.38k|            evp_keymgmt_gen_cleanup(ctx->keymgmt, ctx->op.keymgmt.genctx);
  387|  6.38k|    }
  388|  83.0k|}
EVP_PKEY_CTX_free:
  391|   463k|{
  392|   463k|    if (ctx == NULL)
  ------------------
  |  Branch (392:9): [True: 386k, False: 76.7k]
  ------------------
  393|   386k|        return;
  394|  76.7k|    if (ctx->pmeth && ctx->pmeth->cleanup)
  ------------------
  |  Branch (394:9): [True: 0, False: 76.7k]
  |  Branch (394:23): [True: 0, False: 0]
  ------------------
  395|      0|        ctx->pmeth->cleanup(ctx);
  396|       |
  397|  76.7k|    evp_pkey_ctx_free_old_ops(ctx);
  398|  76.7k|#ifndef FIPS_MODULE
  399|  76.7k|    evp_pkey_ctx_free_all_cached_data(ctx);
  400|  76.7k|#endif
  401|  76.7k|    EVP_KEYMGMT_free(ctx->keymgmt);
  402|       |
  403|  76.7k|    OPENSSL_free(ctx->propquery);
  ------------------
  |  |  131|  76.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  404|  76.7k|    EVP_PKEY_free(ctx->pkey);
  405|  76.7k|    EVP_PKEY_free(ctx->peerkey);
  406|  76.7k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  407|  76.7k|    ENGINE_finish(ctx->engine);
  408|  76.7k|#endif
  409|  76.7k|    BN_free(ctx->rsa_pubexp);
  410|  76.7k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  76.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  411|  76.7k|}
evp_app_cleanup_int:
  632|      1|{
  633|      1|    if (app_pkey_methods != NULL)
  ------------------
  |  Branch (633:9): [True: 0, False: 1]
  ------------------
  634|      0|        sk_EVP_PKEY_METHOD_pop_free(app_pkey_methods, EVP_PKEY_meth_free);
  635|      1|}
EVP_PKEY_CTX_set_params:
  678|  6.38k|{
  679|  6.38k|    switch (evp_pkey_ctx_state(ctx)) {
  ------------------
  |  Branch (679:13): [True: 6.38k, False: 0]
  ------------------
  680|  6.38k|    case EVP_PKEY_STATE_PROVIDER:
  ------------------
  |  |  952|  6.38k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
  |  Branch (680:5): [True: 6.38k, False: 0]
  ------------------
  681|  6.38k|        if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  747|  12.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1790|  6.38k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1772|  6.38k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (747:5): [True: 0, False: 6.38k]
  |  |  ------------------
  ------------------
  682|      0|            && ctx->op.kex.exchange != NULL
  ------------------
  |  Branch (682:16): [True: 0, False: 0]
  ------------------
  683|      0|            && ctx->op.kex.exchange->set_ctx_params != NULL)
  ------------------
  |  Branch (683:16): [True: 0, False: 0]
  ------------------
  684|      0|            return ctx->op.kex.exchange->set_ctx_params(ctx->op.kex.algctx,
  685|      0|                params);
  686|  6.38k|        if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  744|  12.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|  6.38k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|  6.38k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|  6.38k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|  6.38k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|  6.38k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|  6.38k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|  6.38k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|  6.38k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|  6.38k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|  6.38k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|  6.38k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 6.38k]
  |  |  ------------------
  ------------------
  687|      0|            && ctx->op.sig.signature != NULL
  ------------------
  |  Branch (687:16): [True: 0, False: 0]
  ------------------
  688|      0|            && ctx->op.sig.signature->set_ctx_params != NULL)
  ------------------
  |  Branch (688:16): [True: 0, False: 0]
  ------------------
  689|      0|            return ctx->op.sig.signature->set_ctx_params(ctx->op.sig.algctx,
  690|      0|                params);
  691|  6.38k|        if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  750|  12.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1787|  6.38k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1770|  6.38k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1771|  6.38k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (750:5): [True: 0, False: 6.38k]
  |  |  ------------------
  ------------------
  692|      0|            && ctx->op.ciph.cipher != NULL
  ------------------
  |  Branch (692:16): [True: 0, False: 0]
  ------------------
  693|      0|            && ctx->op.ciph.cipher->set_ctx_params != NULL)
  ------------------
  |  Branch (693:16): [True: 0, False: 0]
  ------------------
  694|      0|            return ctx->op.ciph.cipher->set_ctx_params(ctx->op.ciph.algctx,
  695|      0|                params);
  696|  6.38k|        if (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  753|  12.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1799|  6.38k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1762|  6.38k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1763|  6.38k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (753:5): [True: 6.38k, False: 0]
  |  |  ------------------
  ------------------
  697|  6.38k|            && ctx->keymgmt != NULL
  ------------------
  |  Branch (697:16): [True: 6.38k, False: 0]
  ------------------
  698|  6.38k|            && ctx->keymgmt->gen_set_params != NULL)
  ------------------
  |  Branch (698:16): [True: 6.38k, False: 0]
  ------------------
  699|  6.38k|            return evp_keymgmt_gen_set_params(ctx->keymgmt, ctx->op.keymgmt.genctx,
  700|  6.38k|                params);
  701|      0|        if (EVP_PKEY_CTX_IS_KEM_OP(ctx)
  ------------------
  |  |  759|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1796|      0|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1773|      0|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1774|      0|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  702|      0|            && ctx->op.encap.kem != NULL
  ------------------
  |  Branch (702:16): [True: 0, False: 0]
  ------------------
  703|      0|            && ctx->op.encap.kem->set_ctx_params != NULL)
  ------------------
  |  Branch (703:16): [True: 0, False: 0]
  ------------------
  704|      0|            return ctx->op.encap.kem->set_ctx_params(ctx->op.encap.algctx,
  705|      0|                params);
  706|      0|        break;
  707|      0|    case EVP_PKEY_STATE_UNKNOWN:
  ------------------
  |  |  950|      0|#define EVP_PKEY_STATE_UNKNOWN 0
  ------------------
  |  Branch (707:5): [True: 0, False: 6.38k]
  ------------------
  708|      0|        break;
  709|      0|#ifndef FIPS_MODULE
  710|      0|    case EVP_PKEY_STATE_LEGACY:
  ------------------
  |  |  951|      0|#define EVP_PKEY_STATE_LEGACY 1
  ------------------
  |  Branch (710:5): [True: 0, False: 6.38k]
  ------------------
  711|      0|        return evp_pkey_ctx_set_params_to_ctrl(ctx, params);
  712|  6.38k|#endif
  713|  6.38k|    }
  714|      0|    return 0;
  715|  6.38k|}
pmeth_lib.c:evp_pkey_meth_find_added_by_application:
   93|  73.9k|{
   94|  73.9k|    if (app_pkey_methods != NULL) {
  ------------------
  |  Branch (94:9): [True: 0, False: 73.9k]
  ------------------
   95|      0|        int idx;
   96|      0|        EVP_PKEY_METHOD tmp;
   97|       |
   98|      0|        tmp.pkey_id = type;
   99|      0|        idx = sk_EVP_PKEY_METHOD_find(app_pkey_methods, &tmp);
  100|      0|        if (idx >= 0)
  ------------------
  |  Branch (100:13): [True: 0, False: 0]
  ------------------
  101|      0|            return sk_EVP_PKEY_METHOD_value(app_pkey_methods, idx);
  102|      0|    }
  103|  73.9k|    return NULL;
  104|  73.9k|}
pmeth_lib.c:int_ctx_new:
  163|  76.8k|{
  164|  76.8k|    EVP_PKEY_CTX *ret = NULL;
  165|  76.8k|    const EVP_PKEY_METHOD *pmeth = NULL, *app_pmeth = NULL;
  166|  76.8k|    EVP_KEYMGMT *keymgmt = NULL;
  167|       |
  168|       |    /* Code below to be removed when legacy support is dropped. */
  169|       |    /* BEGIN legacy */
  170|  76.8k|    if (id == -1) {
  ------------------
  |  Branch (170:9): [True: 76.8k, False: 0]
  ------------------
  171|  76.8k|        if (pkey != NULL && !evp_pkey_is_provided(pkey)) {
  ------------------
  |  |  652|  70.4k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (171:13): [True: 70.4k, False: 6.38k]
  |  Branch (171:29): [True: 70.4k, False: 0]
  ------------------
  172|  70.4k|            id = pkey->type;
  173|  70.4k|        } else {
  174|  6.38k|            if (pkey != NULL) {
  ------------------
  |  Branch (174:17): [True: 0, False: 6.38k]
  ------------------
  175|       |                /* Must be provided if we get here */
  176|      0|                keytype = EVP_KEYMGMT_get0_name(pkey->keymgmt);
  177|      0|            }
  178|  6.38k|#ifndef FIPS_MODULE
  179|  6.38k|            if (keytype != NULL) {
  ------------------
  |  Branch (179:17): [True: 6.38k, False: 0]
  ------------------
  180|  6.38k|                id = evp_pkey_name2type(keytype);
  181|  6.38k|                if (id == NID_undef)
  ------------------
  |  |   18|  6.38k|#define NID_undef                       0
  ------------------
  |  Branch (181:21): [True: 2.88k, False: 3.49k]
  ------------------
  182|  2.88k|                    id = -1;
  183|  6.38k|            }
  184|  6.38k|#endif
  185|  6.38k|        }
  186|  76.8k|    }
  187|       |    /* If no ID was found here, we can only resort to find a keymgmt */
  188|  76.8k|    if (id == -1) {
  ------------------
  |  Branch (188:9): [True: 2.88k, False: 73.9k]
  ------------------
  189|  2.88k|#ifndef FIPS_MODULE
  190|       |        /* Using engine with a key without id will not work */
  191|  2.88k|        if (e != NULL) {
  ------------------
  |  Branch (191:13): [True: 0, False: 2.88k]
  ------------------
  192|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  193|      0|            return NULL;
  194|      0|        }
  195|  2.88k|#endif
  196|  2.88k|        goto common;
  197|  2.88k|    }
  198|       |
  199|  73.9k|#ifndef FIPS_MODULE
  200|       |    /*
  201|       |     * Here, we extract what information we can for the purpose of
  202|       |     * supporting usage with implementations from providers, to make
  203|       |     * for a smooth transition from legacy stuff to provider based stuff.
  204|       |     *
  205|       |     * If an engine is given, this is entirely legacy, and we should not
  206|       |     * pretend anything else, so we clear the name.
  207|       |     */
  208|  73.9k|    if (e != NULL)
  ------------------
  |  Branch (208:9): [True: 0, False: 73.9k]
  ------------------
  209|      0|        keytype = NULL;
  210|  73.9k|    if (e == NULL && (pkey == NULL || pkey->foreign == 0))
  ------------------
  |  Branch (210:9): [True: 73.9k, False: 0]
  |  Branch (210:23): [True: 3.49k, False: 70.4k]
  |  Branch (210:39): [True: 70.4k, False: 0]
  ------------------
  211|  73.9k|        keytype = OBJ_nid2sn(id);
  212|       |
  213|  73.9k|#ifndef OPENSSL_NO_ENGINE
  214|  73.9k|    if (e == NULL && pkey != NULL)
  ------------------
  |  Branch (214:9): [True: 73.9k, False: 0]
  |  Branch (214:22): [True: 70.4k, False: 3.49k]
  ------------------
  215|  70.4k|        e = pkey->pmeth_engine != NULL ? pkey->pmeth_engine : pkey->engine;
  ------------------
  |  Branch (215:13): [True: 0, False: 70.4k]
  ------------------
  216|       |    /* Try to find an ENGINE which implements this method */
  217|  73.9k|    if (e != NULL) {
  ------------------
  |  Branch (217:9): [True: 0, False: 73.9k]
  ------------------
  218|      0|        if (!ENGINE_init(e)) {
  ------------------
  |  Branch (218:13): [True: 0, False: 0]
  ------------------
  219|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  220|      0|            return NULL;
  221|      0|        }
  222|  73.9k|    } else {
  223|  73.9k|        e = ENGINE_get_pkey_meth_engine(id);
  224|  73.9k|    }
  225|       |
  226|       |    /*
  227|       |     * If an ENGINE handled this method look it up. Otherwise use internal
  228|       |     * tables.
  229|       |     */
  230|  73.9k|    if (e != NULL)
  ------------------
  |  Branch (230:9): [True: 0, False: 73.9k]
  ------------------
  231|      0|        pmeth = ENGINE_get_pkey_meth(e, id);
  232|  73.9k|    else
  233|  73.9k|#endif /* OPENSSL_NO_ENGINE */
  234|  73.9k|        if (pkey != NULL && pkey->foreign)
  ------------------
  |  Branch (234:13): [True: 70.4k, False: 3.49k]
  |  Branch (234:29): [True: 0, False: 70.4k]
  ------------------
  235|      0|            pmeth = EVP_PKEY_meth_find(id);
  236|  73.9k|        else
  237|  73.9k|            app_pmeth = pmeth = evp_pkey_meth_find_added_by_application(id);
  238|       |
  239|       |        /* END legacy */
  240|  73.9k|#endif /* FIPS_MODULE */
  241|  76.8k|common:
  242|       |    /*
  243|       |     * If there's no engine and no app supplied pmeth and there's a name, we try
  244|       |     * fetching a provider implementation.
  245|       |     */
  246|  76.8k|    if (e == NULL && app_pmeth == NULL && keytype != NULL) {
  ------------------
  |  Branch (246:9): [True: 76.8k, False: 0]
  |  Branch (246:22): [True: 76.8k, False: 0]
  |  Branch (246:43): [True: 76.8k, False: 0]
  ------------------
  247|       |        /*
  248|       |         * If |pkey| is given and is provided, we take a reference to its
  249|       |         * keymgmt.  Otherwise, we fetch one for the keytype we got. This
  250|       |         * is to ensure that operation init functions can access what they
  251|       |         * need through this single pointer.
  252|       |         */
  253|  76.8k|        if (pkey != NULL && pkey->keymgmt != NULL) {
  ------------------
  |  Branch (253:13): [True: 70.4k, False: 6.38k]
  |  Branch (253:29): [True: 0, False: 70.4k]
  ------------------
  254|      0|            if (!EVP_KEYMGMT_up_ref(pkey->keymgmt))
  ------------------
  |  Branch (254:17): [True: 0, False: 0]
  ------------------
  255|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  256|      0|            else
  257|      0|                keymgmt = pkey->keymgmt;
  258|  76.8k|        } else {
  259|  76.8k|            keymgmt = EVP_KEYMGMT_fetch(libctx, keytype, propquery);
  260|  76.8k|        }
  261|  76.8k|        if (keymgmt == NULL)
  ------------------
  |  Branch (261:13): [True: 158, False: 76.7k]
  ------------------
  262|    158|            return NULL; /* EVP_KEYMGMT_fetch() recorded an error */
  263|       |
  264|  76.7k|#ifndef FIPS_MODULE
  265|       |        /*
  266|       |         * Chase down the legacy NID, as that might be needed for diverse
  267|       |         * purposes, such as ensure that EVP_PKEY_type() can return sensible
  268|       |         * values. We go through all keymgmt names, because the keytype
  269|       |         * that's passed to this function doesn't necessarily translate
  270|       |         * directly.
  271|       |         */
  272|  76.7k|        if (keymgmt != NULL) {
  ------------------
  |  Branch (272:13): [True: 76.7k, False: 0]
  ------------------
  273|  76.7k|            int tmp_id = evp_keymgmt_get_legacy_alg(keymgmt);
  274|       |
  275|  76.7k|            if (tmp_id != NID_undef) {
  ------------------
  |  |   18|  76.7k|#define NID_undef                       0
  ------------------
  |  Branch (275:17): [True: 73.8k, False: 2.88k]
  ------------------
  276|  73.8k|                if (id == -1) {
  ------------------
  |  Branch (276:21): [True: 0, False: 73.8k]
  ------------------
  277|      0|                    id = tmp_id;
  278|  73.8k|                } else {
  279|       |                    /*
  280|       |                     * It really really shouldn't differ.  If it still does,
  281|       |                     * something is very wrong.
  282|       |                     */
  283|  73.8k|                    if (!ossl_assert(id == tmp_id)) {
  ------------------
  |  |   52|  73.8k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  73.8k|    __FILE__, __LINE__)
  ------------------
  |  Branch (283:25): [True: 0, False: 73.8k]
  ------------------
  284|      0|                        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|                        EVP_KEYMGMT_free(keymgmt);
  286|      0|                        return NULL;
  287|      0|                    }
  288|  73.8k|                }
  289|  73.8k|            }
  290|  76.7k|        }
  291|  76.7k|#endif
  292|  76.7k|    }
  293|       |
  294|  76.7k|    if (pmeth == NULL && keymgmt == NULL) {
  ------------------
  |  Branch (294:9): [True: 76.7k, False: 0]
  |  Branch (294:26): [True: 0, False: 76.7k]
  ------------------
  295|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  296|  76.7k|    } else {
  297|  76.7k|        ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  76.7k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  298|  76.7k|    }
  299|       |
  300|  76.7k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  301|  76.7k|    if ((ret == NULL || pmeth == NULL) && e != NULL)
  ------------------
  |  Branch (301:10): [True: 0, False: 76.7k]
  |  Branch (301:25): [True: 76.7k, False: 0]
  |  Branch (301:43): [True: 0, False: 76.7k]
  ------------------
  302|      0|        ENGINE_finish(e);
  303|  76.7k|#endif
  304|       |
  305|  76.7k|    if (ret == NULL) {
  ------------------
  |  Branch (305:9): [True: 0, False: 76.7k]
  ------------------
  306|      0|        EVP_KEYMGMT_free(keymgmt);
  307|      0|        return NULL;
  308|      0|    }
  309|  76.7k|    if (propquery != NULL) {
  ------------------
  |  Branch (309:9): [True: 14.9k, False: 61.7k]
  ------------------
  310|  14.9k|        ret->propquery = OPENSSL_strdup(propquery);
  ------------------
  |  |  135|  14.9k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  311|  14.9k|        if (ret->propquery == NULL) {
  ------------------
  |  Branch (311:13): [True: 0, False: 14.9k]
  ------------------
  312|      0|            OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  313|      0|            EVP_KEYMGMT_free(keymgmt);
  314|      0|            return NULL;
  315|      0|        }
  316|  14.9k|    }
  317|  76.7k|    ret->libctx = libctx;
  318|  76.7k|    ret->keytype = keytype;
  319|  76.7k|    ret->keymgmt = keymgmt;
  320|  76.7k|    ret->legacy_keytype = id;
  321|  76.7k|    ret->engine = e;
  322|  76.7k|    ret->pmeth = pmeth;
  323|  76.7k|    ret->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1761|  76.7k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  324|       |
  325|  76.7k|    if (pkey != NULL && !EVP_PKEY_up_ref(pkey)) {
  ------------------
  |  Branch (325:9): [True: 70.3k, False: 6.38k]
  |  Branch (325:25): [True: 0, False: 70.3k]
  ------------------
  326|      0|        EVP_PKEY_CTX_free(ret);
  327|      0|        return NULL;
  328|      0|    }
  329|       |
  330|  76.7k|    ret->pkey = pkey;
  331|       |
  332|  76.7k|    if (pmeth != NULL && pmeth->init != NULL) {
  ------------------
  |  Branch (332:9): [True: 0, False: 76.7k]
  |  Branch (332:26): [True: 0, False: 0]
  ------------------
  333|      0|        if (pmeth->init(ret) <= 0) {
  ------------------
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|            ret->pmeth = NULL;
  335|      0|            EVP_PKEY_CTX_free(ret);
  336|      0|            return NULL;
  337|      0|        }
  338|      0|    }
  339|       |
  340|  76.7k|    return ret;
  341|  76.7k|}
pmeth_lib.c:decode_cmd:
 1431|  76.7k|{
 1432|  76.7k|    if (cmd == -1) {
  ------------------
  |  Branch (1432:9): [True: 0, False: 76.7k]
  ------------------
 1433|       |        /*
 1434|       |         * The consequence of the assertion not being true is that this
 1435|       |         * function will return -1, which will cause the calling functions
 1436|       |         * to signal that the command is unsupported...  in non-debug mode.
 1437|       |         */
 1438|      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__)
  ------------------
 1439|      0|            if (strcmp(name, "distid") == 0 || strcmp(name, "hexdistid") == 0)
  ------------------
  |  Branch (1439:17): [True: 0, False: 0]
  |  Branch (1439:48): [True: 0, False: 0]
  ------------------
 1440|      0|                cmd = EVP_PKEY_CTRL_SET1_ID;
  ------------------
  |  | 1824|      0|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1441|      0|    }
 1442|       |
 1443|  76.7k|    return cmd;
 1444|  76.7k|}
pmeth_lib.c:evp_pkey_ctx_free_cached_data:
 1517|  76.7k|{
 1518|  76.7k|    cmd = decode_cmd(cmd, name);
 1519|  76.7k|    switch (cmd) {
  ------------------
  |  Branch (1519:13): [True: 76.7k, False: 0]
  ------------------
 1520|  76.7k|    case EVP_PKEY_CTRL_SET1_ID:
  ------------------
  |  | 1824|  76.7k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
  |  Branch (1520:5): [True: 76.7k, False: 0]
  ------------------
 1521|  76.7k|        OPENSSL_free(ctx->cached_parameters.dist_id);
  ------------------
  |  |  131|  76.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1522|  76.7k|        OPENSSL_free(ctx->cached_parameters.dist_id_name);
  ------------------
  |  |  131|  76.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1523|  76.7k|        ctx->cached_parameters.dist_id = NULL;
 1524|       |        ctx->cached_parameters.dist_id_name = NULL;
 1525|  76.7k|        break;
 1526|  76.7k|    }
 1527|  76.7k|}
pmeth_lib.c:evp_pkey_ctx_free_all_cached_data:
 1530|  76.7k|{
 1531|  76.7k|    evp_pkey_ctx_free_cached_data(ctx, EVP_PKEY_CTRL_SET1_ID, NULL);
  ------------------
  |  | 1824|  76.7k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1532|  76.7k|}

EVP_SIGNATURE_free:
  456|  80.8k|{
  457|  80.8k|    int i;
  458|       |
  459|  80.8k|    if (signature == NULL)
  ------------------
  |  Branch (459:9): [True: 0, False: 80.8k]
  ------------------
  460|      0|        return;
  461|  80.8k|    CRYPTO_DOWN_REF(&signature->refcnt, &i);
  462|  80.8k|    if (i > 0)
  ------------------
  |  Branch (462:9): [True: 43.6k, False: 37.1k]
  ------------------
  463|  43.6k|        return;
  464|  37.1k|    OPENSSL_free(signature->type_name);
  ------------------
  |  |  131|  37.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  465|  37.1k|    ossl_provider_free(signature->prov);
  466|  37.1k|    CRYPTO_FREE_REF(&signature->refcnt);
  467|  37.1k|    OPENSSL_free(signature);
  ------------------
  |  |  131|  37.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  468|  37.1k|}
EVP_SIGNATURE_up_ref:
  471|  43.6k|{
  472|  43.6k|    int ref = 0;
  473|       |
  474|  43.6k|    CRYPTO_UP_REF(&signature->refcnt, &ref);
  475|  43.6k|    return 1;
  476|  43.6k|}
EVP_SIGNATURE_fetch:
  485|  5.56k|{
  486|  5.56k|    return evp_generic_fetch(ctx, OSSL_OP_SIGNATURE, algorithm, properties,
  ------------------
  |  |  290|  5.56k|#define OSSL_OP_SIGNATURE 12
  ------------------
  487|  5.56k|        evp_signature_from_algorithm,
  488|  5.56k|        evp_signature_up_ref,
  489|  5.56k|        evp_signature_free);
  490|  5.56k|}
signature.c:evp_signature_from_algorithm:
   55|  37.1k|{
   56|  37.1k|    const OSSL_DISPATCH *fns = algodef->implementation;
   57|  37.1k|    EVP_SIGNATURE *signature = NULL;
   58|  37.1k|    const char *desc;
   59|       |    /* Counts newctx / freectx */
   60|  37.1k|    int ctxfncnt = 0;
   61|       |    /* Counts all init functions  */
   62|  37.1k|    int initfncnt = 0;
   63|       |    /* Counts all parameter functions */
   64|  37.1k|    int gparamfncnt = 0, sparamfncnt = 0, gmdparamfncnt = 0, smdparamfncnt = 0;
   65|  37.1k|    int valid = 0;
   66|       |
   67|  37.1k|    if ((signature = evp_signature_new(prov)) == NULL) {
  ------------------
  |  Branch (67:9): [True: 0, False: 37.1k]
  ------------------
   68|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   69|      0|        goto err;
   70|      0|    }
   71|       |
   72|  37.1k|    signature->name_id = name_id;
   73|  37.1k|    if ((signature->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 37.1k]
  ------------------
   74|      0|        goto err;
   75|  37.1k|    signature->description = algodef->algorithm_description;
   76|  37.1k|    desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (76:12): [True: 7.56k, False: 29.6k]
  ------------------
   77|       |
   78|   680k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (78:12): [True: 643k, False: 37.1k]
  ------------------
   79|   643k|        switch (fns->function_id) {
  ------------------
  |  Branch (79:17): [True: 643k, False: 0]
  ------------------
   80|  37.1k|        case OSSL_FUNC_SIGNATURE_NEWCTX:
  ------------------
  |  |  789|  37.1k|#define OSSL_FUNC_SIGNATURE_NEWCTX 1
  ------------------
  |  Branch (80:9): [True: 37.1k, False: 606k]
  ------------------
   81|  37.1k|            if (signature->newctx != NULL)
  ------------------
  |  Branch (81:17): [True: 0, False: 37.1k]
  ------------------
   82|      0|                break;
   83|  37.1k|            signature->newctx = OSSL_FUNC_signature_newctx(fns);
   84|  37.1k|            ctxfncnt++;
   85|  37.1k|            break;
   86|  26.4k|        case OSSL_FUNC_SIGNATURE_SIGN_INIT:
  ------------------
  |  |  790|  26.4k|#define OSSL_FUNC_SIGNATURE_SIGN_INIT 2
  ------------------
  |  Branch (86:9): [True: 26.4k, False: 616k]
  ------------------
   87|  26.4k|            if (signature->sign_init != NULL)
  ------------------
  |  Branch (87:17): [True: 1.26k, False: 25.2k]
  ------------------
   88|  1.26k|                break;
   89|  25.2k|            signature->sign_init = OSSL_FUNC_signature_sign_init(fns);
   90|  25.2k|            initfncnt++;
   91|  25.2k|            break;
   92|  34.6k|        case OSSL_FUNC_SIGNATURE_SIGN:
  ------------------
  |  |  791|  34.6k|#define OSSL_FUNC_SIGNATURE_SIGN 3
  ------------------
  |  Branch (92:9): [True: 34.6k, False: 608k]
  ------------------
   93|  34.6k|            if (signature->sign != NULL)
  ------------------
  |  Branch (93:17): [True: 0, False: 34.6k]
  ------------------
   94|      0|                break;
   95|  34.6k|            signature->sign = OSSL_FUNC_signature_sign(fns);
   96|  34.6k|            break;
   97|  32.1k|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT:
  ------------------
  |  |  815|  32.1k|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT 27
  ------------------
  |  Branch (97:9): [True: 32.1k, False: 611k]
  ------------------
   98|  32.1k|            if (signature->sign_message_init != NULL)
  ------------------
  |  Branch (98:17): [True: 0, False: 32.1k]
  ------------------
   99|      0|                break;
  100|  32.1k|            signature->sign_message_init
  101|  32.1k|                = OSSL_FUNC_signature_sign_message_init(fns);
  102|  32.1k|            initfncnt++;
  103|  32.1k|            break;
  104|  21.4k|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE:
  ------------------
  |  |  816|  21.4k|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE 28
  ------------------
  |  Branch (104:9): [True: 21.4k, False: 621k]
  ------------------
  105|  21.4k|            if (signature->sign_message_update != NULL)
  ------------------
  |  Branch (105:17): [True: 0, False: 21.4k]
  ------------------
  106|      0|                break;
  107|  21.4k|            signature->sign_message_update
  108|  21.4k|                = OSSL_FUNC_signature_sign_message_update(fns);
  109|  21.4k|            break;
  110|  21.4k|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL:
  ------------------
  |  |  817|  21.4k|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL 29
  ------------------
  |  Branch (110:9): [True: 21.4k, False: 621k]
  ------------------
  111|  21.4k|            if (signature->sign_message_final != NULL)
  ------------------
  |  Branch (111:17): [True: 0, False: 21.4k]
  ------------------
  112|      0|                break;
  113|  21.4k|            signature->sign_message_final
  114|  21.4k|                = OSSL_FUNC_signature_sign_message_final(fns);
  115|  21.4k|            break;
  116|  26.4k|        case OSSL_FUNC_SIGNATURE_VERIFY_INIT:
  ------------------
  |  |  792|  26.4k|#define OSSL_FUNC_SIGNATURE_VERIFY_INIT 4
  ------------------
  |  Branch (116:9): [True: 26.4k, False: 616k]
  ------------------
  117|  26.4k|            if (signature->verify_init != NULL)
  ------------------
  |  Branch (117:17): [True: 1.26k, False: 25.2k]
  ------------------
  118|  1.26k|                break;
  119|  25.2k|            signature->verify_init = OSSL_FUNC_signature_verify_init(fns);
  120|  25.2k|            initfncnt++;
  121|  25.2k|            break;
  122|  34.6k|        case OSSL_FUNC_SIGNATURE_VERIFY:
  ------------------
  |  |  793|  34.6k|#define OSSL_FUNC_SIGNATURE_VERIFY 5
  ------------------
  |  Branch (122:9): [True: 34.6k, False: 608k]
  ------------------
  123|  34.6k|            if (signature->verify != NULL)
  ------------------
  |  Branch (123:17): [True: 0, False: 34.6k]
  ------------------
  124|      0|                break;
  125|  34.6k|            signature->verify = OSSL_FUNC_signature_verify(fns);
  126|  34.6k|            break;
  127|  32.1k|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT:
  ------------------
  |  |  818|  32.1k|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT 30
  ------------------
  |  Branch (127:9): [True: 32.1k, False: 611k]
  ------------------
  128|  32.1k|            if (signature->verify_message_init != NULL)
  ------------------
  |  Branch (128:17): [True: 0, False: 32.1k]
  ------------------
  129|      0|                break;
  130|  32.1k|            signature->verify_message_init
  131|  32.1k|                = OSSL_FUNC_signature_verify_message_init(fns);
  132|  32.1k|            initfncnt++;
  133|  32.1k|            break;
  134|  21.4k|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE:
  ------------------
  |  |  819|  21.4k|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE 31
  ------------------
  |  Branch (134:9): [True: 21.4k, False: 621k]
  ------------------
  135|  21.4k|            if (signature->verify_message_update != NULL)
  ------------------
  |  Branch (135:17): [True: 0, False: 21.4k]
  ------------------
  136|      0|                break;
  137|  21.4k|            signature->verify_message_update
  138|  21.4k|                = OSSL_FUNC_signature_verify_message_update(fns);
  139|  21.4k|            break;
  140|  21.4k|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL:
  ------------------
  |  |  820|  21.4k|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL 32
  ------------------
  |  Branch (140:9): [True: 21.4k, False: 621k]
  ------------------
  141|  21.4k|            if (signature->verify_message_final != NULL)
  ------------------
  |  Branch (141:17): [True: 0, False: 21.4k]
  ------------------
  142|      0|                break;
  143|  21.4k|            signature->verify_message_final
  144|  21.4k|                = OSSL_FUNC_signature_verify_message_final(fns);
  145|  21.4k|            break;
  146|  8.82k|        case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT:
  ------------------
  |  |  794|  8.82k|#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT 6
  ------------------
  |  Branch (146:9): [True: 8.82k, False: 634k]
  ------------------
  147|  8.82k|            if (signature->verify_recover_init != NULL)
  ------------------
  |  Branch (147:17): [True: 0, False: 8.82k]
  ------------------
  148|      0|                break;
  149|  8.82k|            signature->verify_recover_init
  150|  8.82k|                = OSSL_FUNC_signature_verify_recover_init(fns);
  151|  8.82k|            initfncnt++;
  152|  8.82k|            break;
  153|  8.82k|        case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER:
  ------------------
  |  |  795|  8.82k|#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER 7
  ------------------
  |  Branch (153:9): [True: 8.82k, False: 634k]
  ------------------
  154|  8.82k|            if (signature->verify_recover != NULL)
  ------------------
  |  Branch (154:17): [True: 0, False: 8.82k]
  ------------------
  155|      0|                break;
  156|  8.82k|            signature->verify_recover
  157|  8.82k|                = OSSL_FUNC_signature_verify_recover(fns);
  158|  8.82k|            break;
  159|  15.7k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT:
  ------------------
  |  |  796|  15.7k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT 8
  ------------------
  |  Branch (159:9): [True: 15.7k, False: 627k]
  ------------------
  160|  15.7k|            if (signature->digest_sign_init != NULL)
  ------------------
  |  Branch (160:17): [True: 0, False: 15.7k]
  ------------------
  161|      0|                break;
  162|  15.7k|            signature->digest_sign_init
  163|  15.7k|                = OSSL_FUNC_signature_digest_sign_init(fns);
  164|  15.7k|            initfncnt++;
  165|  15.7k|            break;
  166|  5.04k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE:
  ------------------
  |  |  797|  5.04k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE 9
  ------------------
  |  Branch (166:9): [True: 5.04k, False: 638k]
  ------------------
  167|  5.04k|            if (signature->digest_sign_update != NULL)
  ------------------
  |  Branch (167:17): [True: 0, False: 5.04k]
  ------------------
  168|      0|                break;
  169|  5.04k|            signature->digest_sign_update
  170|  5.04k|                = OSSL_FUNC_signature_digest_sign_update(fns);
  171|  5.04k|            break;
  172|  5.04k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL:
  ------------------
  |  |  798|  5.04k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL 10
  ------------------
  |  Branch (172:9): [True: 5.04k, False: 638k]
  ------------------
  173|  5.04k|            if (signature->digest_sign_final != NULL)
  ------------------
  |  Branch (173:17): [True: 0, False: 5.04k]
  ------------------
  174|      0|                break;
  175|  5.04k|            signature->digest_sign_final
  176|  5.04k|                = OSSL_FUNC_signature_digest_sign_final(fns);
  177|  5.04k|            break;
  178|  10.7k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN:
  ------------------
  |  |  799|  10.7k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN 11
  ------------------
  |  Branch (178:9): [True: 10.7k, False: 632k]
  ------------------
  179|  10.7k|            if (signature->digest_sign != NULL)
  ------------------
  |  Branch (179:17): [True: 0, False: 10.7k]
  ------------------
  180|      0|                break;
  181|  10.7k|            signature->digest_sign
  182|  10.7k|                = OSSL_FUNC_signature_digest_sign(fns);
  183|  10.7k|            break;
  184|  13.2k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT:
  ------------------
  |  |  800|  13.2k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT 12
  ------------------
  |  Branch (184:9): [True: 13.2k, False: 630k]
  ------------------
  185|  13.2k|            if (signature->digest_verify_init != NULL)
  ------------------
  |  Branch (185:17): [True: 0, False: 13.2k]
  ------------------
  186|      0|                break;
  187|  13.2k|            signature->digest_verify_init
  188|  13.2k|                = OSSL_FUNC_signature_digest_verify_init(fns);
  189|  13.2k|            initfncnt++;
  190|  13.2k|            break;
  191|  2.52k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE:
  ------------------
  |  |  801|  2.52k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE 13
  ------------------
  |  Branch (191:9): [True: 2.52k, False: 640k]
  ------------------
  192|  2.52k|            if (signature->digest_verify_update != NULL)
  ------------------
  |  Branch (192:17): [True: 0, False: 2.52k]
  ------------------
  193|      0|                break;
  194|  2.52k|            signature->digest_verify_update
  195|  2.52k|                = OSSL_FUNC_signature_digest_verify_update(fns);
  196|  2.52k|            break;
  197|  2.52k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL:
  ------------------
  |  |  802|  2.52k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL 14
  ------------------
  |  Branch (197:9): [True: 2.52k, False: 640k]
  ------------------
  198|  2.52k|            if (signature->digest_verify_final != NULL)
  ------------------
  |  Branch (198:17): [True: 0, False: 2.52k]
  ------------------
  199|      0|                break;
  200|  2.52k|            signature->digest_verify_final
  201|  2.52k|                = OSSL_FUNC_signature_digest_verify_final(fns);
  202|  2.52k|            break;
  203|  10.7k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY:
  ------------------
  |  |  803|  10.7k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY 15
  ------------------
  |  Branch (203:9): [True: 10.7k, False: 632k]
  ------------------
  204|  10.7k|            if (signature->digest_verify != NULL)
  ------------------
  |  Branch (204:17): [True: 0, False: 10.7k]
  ------------------
  205|      0|                break;
  206|  10.7k|            signature->digest_verify
  207|  10.7k|                = OSSL_FUNC_signature_digest_verify(fns);
  208|  10.7k|            break;
  209|  37.1k|        case OSSL_FUNC_SIGNATURE_FREECTX:
  ------------------
  |  |  804|  37.1k|#define OSSL_FUNC_SIGNATURE_FREECTX 16
  ------------------
  |  Branch (209:9): [True: 37.1k, False: 606k]
  ------------------
  210|  37.1k|            if (signature->freectx != NULL)
  ------------------
  |  Branch (210:17): [True: 0, False: 37.1k]
  ------------------
  211|      0|                break;
  212|  37.1k|            signature->freectx = OSSL_FUNC_signature_freectx(fns);
  213|  37.1k|            ctxfncnt++;
  214|  37.1k|            break;
  215|  37.1k|        case OSSL_FUNC_SIGNATURE_DUPCTX:
  ------------------
  |  |  805|  37.1k|#define OSSL_FUNC_SIGNATURE_DUPCTX 17
  ------------------
  |  Branch (215:9): [True: 37.1k, False: 606k]
  ------------------
  216|  37.1k|            if (signature->dupctx != NULL)
  ------------------
  |  Branch (216:17): [True: 0, False: 37.1k]
  ------------------
  217|      0|                break;
  218|  37.1k|            signature->dupctx = OSSL_FUNC_signature_dupctx(fns);
  219|  37.1k|            break;
  220|  34.6k|        case OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS:
  ------------------
  |  |  806|  34.6k|#define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS 18
  ------------------
  |  Branch (220:9): [True: 34.6k, False: 608k]
  ------------------
  221|  34.6k|            if (signature->get_ctx_params != NULL)
  ------------------
  |  Branch (221:17): [True: 0, False: 34.6k]
  ------------------
  222|      0|                break;
  223|  34.6k|            signature->get_ctx_params
  224|  34.6k|                = OSSL_FUNC_signature_get_ctx_params(fns);
  225|  34.6k|            gparamfncnt++;
  226|  34.6k|            break;
  227|  34.6k|        case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  807|  34.6k|#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS 19
  ------------------
  |  Branch (227:9): [True: 34.6k, False: 608k]
  ------------------
  228|  34.6k|            if (signature->gettable_ctx_params != NULL)
  ------------------
  |  Branch (228:17): [True: 0, False: 34.6k]
  ------------------
  229|      0|                break;
  230|  34.6k|            signature->gettable_ctx_params
  231|  34.6k|                = OSSL_FUNC_signature_gettable_ctx_params(fns);
  232|  34.6k|            gparamfncnt++;
  233|  34.6k|            break;
  234|  37.1k|        case OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS:
  ------------------
  |  |  808|  37.1k|#define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS 20
  ------------------
  |  Branch (234:9): [True: 37.1k, False: 606k]
  ------------------
  235|  37.1k|            if (signature->set_ctx_params != NULL)
  ------------------
  |  Branch (235:17): [True: 0, False: 37.1k]
  ------------------
  236|      0|                break;
  237|  37.1k|            signature->set_ctx_params
  238|  37.1k|                = OSSL_FUNC_signature_set_ctx_params(fns);
  239|  37.1k|            sparamfncnt++;
  240|  37.1k|            break;
  241|  37.1k|        case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  809|  37.1k|#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS 21
  ------------------
  |  Branch (241:9): [True: 37.1k, False: 606k]
  ------------------
  242|  37.1k|            if (signature->settable_ctx_params != NULL)
  ------------------
  |  Branch (242:17): [True: 0, False: 37.1k]
  ------------------
  243|      0|                break;
  244|  37.1k|            signature->settable_ctx_params
  245|  37.1k|                = OSSL_FUNC_signature_settable_ctx_params(fns);
  246|  37.1k|            sparamfncnt++;
  247|  37.1k|            break;
  248|  2.52k|        case OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS:
  ------------------
  |  |  810|  2.52k|#define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS 22
  ------------------
  |  Branch (248:9): [True: 2.52k, False: 640k]
  ------------------
  249|  2.52k|            if (signature->get_ctx_md_params != NULL)
  ------------------
  |  Branch (249:17): [True: 0, False: 2.52k]
  ------------------
  250|      0|                break;
  251|  2.52k|            signature->get_ctx_md_params
  252|  2.52k|                = OSSL_FUNC_signature_get_ctx_md_params(fns);
  253|  2.52k|            gmdparamfncnt++;
  254|  2.52k|            break;
  255|  2.52k|        case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS:
  ------------------
  |  |  811|  2.52k|#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
  ------------------
  |  Branch (255:9): [True: 2.52k, False: 640k]
  ------------------
  256|  2.52k|            if (signature->gettable_ctx_md_params != NULL)
  ------------------
  |  Branch (256:17): [True: 0, False: 2.52k]
  ------------------
  257|      0|                break;
  258|  2.52k|            signature->gettable_ctx_md_params
  259|  2.52k|                = OSSL_FUNC_signature_gettable_ctx_md_params(fns);
  260|  2.52k|            gmdparamfncnt++;
  261|  2.52k|            break;
  262|  2.52k|        case OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS:
  ------------------
  |  |  812|  2.52k|#define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS 24
  ------------------
  |  Branch (262:9): [True: 2.52k, False: 640k]
  ------------------
  263|  2.52k|            if (signature->set_ctx_md_params != NULL)
  ------------------
  |  Branch (263:17): [True: 0, False: 2.52k]
  ------------------
  264|      0|                break;
  265|  2.52k|            signature->set_ctx_md_params
  266|  2.52k|                = OSSL_FUNC_signature_set_ctx_md_params(fns);
  267|  2.52k|            smdparamfncnt++;
  268|  2.52k|            break;
  269|  2.52k|        case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS:
  ------------------
  |  |  813|  2.52k|#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
  ------------------
  |  Branch (269:9): [True: 2.52k, False: 640k]
  ------------------
  270|  2.52k|            if (signature->settable_ctx_md_params != NULL)
  ------------------
  |  Branch (270:17): [True: 0, False: 2.52k]
  ------------------
  271|      0|                break;
  272|  2.52k|            signature->settable_ctx_md_params
  273|  2.52k|                = OSSL_FUNC_signature_settable_ctx_md_params(fns);
  274|  2.52k|            smdparamfncnt++;
  275|  2.52k|            break;
  276|  22.6k|        case OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES:
  ------------------
  |  |  814|  22.6k|#define OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES 26
  ------------------
  |  Branch (276:9): [True: 22.6k, False: 620k]
  ------------------
  277|  22.6k|            if (signature->query_key_types != NULL)
  ------------------
  |  Branch (277:17): [True: 0, False: 22.6k]
  ------------------
  278|      0|                break;
  279|  22.6k|            signature->query_key_types
  280|  22.6k|                = OSSL_FUNC_signature_query_key_types(fns);
  281|  22.6k|            break;
  282|   643k|        }
  283|   643k|    }
  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|  37.1k|    valid = 1;
  294|       |    /* Start with the ones where counters say enough */
  295|  37.1k|    if (ctxfncnt != 2) {
  ------------------
  |  Branch (295:9): [True: 0, False: 37.1k]
  ------------------
  296|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (valid
  ------------------
  |  Branch (300:9): [True: 37.1k, False: 0]
  ------------------
  301|  37.1k|        && ((gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (301:14): [True: 34.6k, False: 2.52k]
  |  Branch (301:34): [True: 0, False: 34.6k]
  ------------------
  302|  37.1k|            || (sparamfncnt != 0 && sparamfncnt != 2)
  ------------------
  |  Branch (302:17): [True: 37.1k, False: 0]
  |  Branch (302:37): [True: 0, False: 37.1k]
  ------------------
  303|  37.1k|            || (gmdparamfncnt != 0 && gmdparamfncnt != 2)
  ------------------
  |  Branch (303:17): [True: 2.52k, False: 34.6k]
  |  Branch (303:39): [True: 0, False: 2.52k]
  ------------------
  304|  37.1k|            || (smdparamfncnt != 0 && smdparamfncnt != 2))) {
  ------------------
  |  Branch (304:17): [True: 2.52k, False: 34.6k]
  |  Branch (304:39): [True: 0, False: 2.52k]
  ------------------
  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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (valid && initfncnt == 0) {
  ------------------
  |  Branch (314:9): [True: 37.1k, False: 0]
  |  Branch (314:18): [True: 0, False: 37.1k]
  ------------------
  315|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (valid
  ------------------
  |  Branch (321:9): [True: 37.1k, False: 0]
  ------------------
  322|  37.1k|        && ((signature->sign_init != NULL
  ------------------
  |  Branch (322:14): [True: 25.2k, False: 11.9k]
  ------------------
  323|  25.2k|                && signature->sign == NULL)
  ------------------
  |  Branch (323:20): [True: 0, False: 25.2k]
  ------------------
  324|  37.1k|            || (signature->sign_message_init != NULL
  ------------------
  |  Branch (324:17): [True: 32.1k, False: 5.04k]
  ------------------
  325|  32.1k|                && signature->sign == NULL
  ------------------
  |  Branch (325:20): [True: 0, False: 32.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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (valid
  ------------------
  |  Branch (333:9): [True: 37.1k, False: 0]
  ------------------
  334|  37.1k|        && (signature->sign != NULL
  ------------------
  |  Branch (334:13): [True: 34.6k, False: 2.52k]
  ------------------
  335|  2.52k|            || signature->sign_message_update != NULL
  ------------------
  |  Branch (335:16): [True: 0, False: 2.52k]
  ------------------
  336|  2.52k|            || signature->sign_message_final != NULL)
  ------------------
  |  Branch (336:16): [True: 0, False: 2.52k]
  ------------------
  337|  34.6k|        && signature->sign_init == NULL
  ------------------
  |  Branch (337:12): [True: 9.45k, False: 25.2k]
  ------------------
  338|  9.45k|        && signature->sign_message_init == NULL) {
  ------------------
  |  Branch (338:12): [True: 0, False: 9.45k]
  ------------------
  339|       |        /* signing function(s) with no sign_init? That's odd */
  340|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (valid
  ------------------
  |  Branch (345:9): [True: 37.1k, False: 0]
  ------------------
  346|  37.1k|        && ((signature->verify_init != NULL
  ------------------
  |  Branch (346:14): [True: 25.2k, False: 11.9k]
  ------------------
  347|  25.2k|                && signature->verify == NULL)
  ------------------
  |  Branch (347:20): [True: 0, False: 25.2k]
  ------------------
  348|  37.1k|            || (signature->verify_message_init != NULL
  ------------------
  |  Branch (348:17): [True: 32.1k, False: 5.04k]
  ------------------
  349|  32.1k|                && signature->verify == NULL
  ------------------
  |  Branch (349:20): [True: 0, False: 32.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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (valid
  ------------------
  |  Branch (357:9): [True: 37.1k, False: 0]
  ------------------
  358|  37.1k|        && (signature->verify != NULL
  ------------------
  |  Branch (358:13): [True: 34.6k, False: 2.52k]
  ------------------
  359|  2.52k|            || signature->verify_message_update != NULL
  ------------------
  |  Branch (359:16): [True: 0, False: 2.52k]
  ------------------
  360|  2.52k|            || signature->verify_message_final != NULL)
  ------------------
  |  Branch (360:16): [True: 0, False: 2.52k]
  ------------------
  361|  34.6k|        && signature->verify_init == NULL
  ------------------
  |  Branch (361:12): [True: 9.45k, False: 25.2k]
  ------------------
  362|  9.45k|        && signature->verify_message_init == NULL) {
  ------------------
  |  Branch (362:12): [True: 0, False: 9.45k]
  ------------------
  363|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (valid
  ------------------
  |  Branch (370:9): [True: 37.1k, False: 0]
  ------------------
  371|  37.1k|        && (signature->verify_recover_init != NULL)
  ------------------
  |  Branch (371:12): [True: 8.82k, False: 28.3k]
  ------------------
  372|  8.82k|        && (signature->verify_recover == NULL)) {
  ------------------
  |  Branch (372:12): [True: 0, False: 8.82k]
  ------------------
  373|       |        /* verify_recover_init function with no verify_recover?  How quaint */
  374|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (valid
  ------------------
  |  Branch (379:9): [True: 37.1k, False: 0]
  ------------------
  380|  37.1k|        && (signature->digest_sign_init != NULL
  ------------------
  |  Branch (380:13): [True: 15.7k, False: 21.4k]
  ------------------
  381|  15.7k|            && signature->digest_sign == NULL
  ------------------
  |  Branch (381:16): [True: 5.04k, False: 10.7k]
  ------------------
  382|  5.04k|            && (signature->digest_sign_update == NULL
  ------------------
  |  Branch (382:17): [True: 0, False: 5.04k]
  ------------------
  383|  5.04k|                || signature->digest_sign_final == NULL))) {
  ------------------
  |  Branch (383:20): [True: 0, False: 5.04k]
  ------------------
  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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (valid
  ------------------
  |  Branch (390:9): [True: 37.1k, False: 0]
  ------------------
  391|  37.1k|        && ((signature->digest_verify_init != NULL
  ------------------
  |  Branch (391:14): [True: 13.2k, False: 23.9k]
  ------------------
  392|  13.2k|            && signature->digest_verify == NULL
  ------------------
  |  Branch (392:16): [True: 2.52k, False: 10.7k]
  ------------------
  393|  2.52k|            && (signature->digest_verify_update == NULL
  ------------------
  |  Branch (393:17): [True: 0, False: 2.52k]
  ------------------
  394|  2.52k|                || signature->digest_verify_final == NULL)))) {
  ------------------
  |  Branch (394:20): [True: 0, False: 2.52k]
  ------------------
  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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if (!valid)
  ------------------
  |  Branch (401:9): [True: 0, False: 37.1k]
  ------------------
  402|      0|        goto err;
  403|       |
  404|  37.1k|    if ((signature->digest_sign != NULL
  ------------------
  |  Branch (404:10): [True: 10.7k, False: 26.4k]
  ------------------
  405|  26.4k|            || signature->digest_sign_update != NULL
  ------------------
  |  Branch (405:16): [True: 5.04k, False: 21.4k]
  ------------------
  406|  21.4k|            || signature->digest_sign_final != NULL)
  ------------------
  |  Branch (406:16): [True: 0, False: 21.4k]
  ------------------
  407|  15.7k|        && signature->digest_sign_init == NULL) {
  ------------------
  |  Branch (407:12): [True: 0, False: 15.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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if ((signature->digest_verify != NULL
  ------------------
  |  Branch (414:10): [True: 10.7k, False: 26.4k]
  ------------------
  415|  26.4k|            || signature->digest_verify_update != NULL
  ------------------
  |  Branch (415:16): [True: 2.52k, False: 23.9k]
  ------------------
  416|  23.9k|            || signature->digest_verify_final != NULL)
  ------------------
  |  Branch (416:16): [True: 0, False: 23.9k]
  ------------------
  417|  13.2k|        && signature->digest_verify_init == NULL) {
  ------------------
  |  Branch (417:12): [True: 0, False: 13.2k]
  ------------------
  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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if ((signature->sign_message_update == NULL) != (signature->sign_message_final == NULL)) {
  ------------------
  |  Branch (424:9): [True: 0, False: 37.1k]
  ------------------
  425|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if ((signature->verify_message_update == NULL) != (signature->verify_message_final == NULL)) {
  ------------------
  |  Branch (430:9): [True: 0, False: 37.1k]
  ------------------
  431|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if ((signature->digest_sign_update == NULL) != (signature->digest_sign_final == NULL)) {
  ------------------
  |  Branch (436:9): [True: 0, False: 37.1k]
  ------------------
  437|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    if ((signature->digest_verify_update == NULL) != (signature->digest_verify_final == NULL)) {
  ------------------
  |  Branch (442:9): [True: 0, False: 37.1k]
  ------------------
  443|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      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|  37.1k|    return signature;
  450|      0|err:
  451|      0|    EVP_SIGNATURE_free(signature);
  452|       |    return NULL;
  453|  37.1k|}
signature.c:evp_signature_new:
   34|  37.1k|{
   35|  37.1k|    EVP_SIGNATURE *signature = OPENSSL_zalloc(sizeof(EVP_SIGNATURE));
  ------------------
  |  |  108|  37.1k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|       |
   37|  37.1k|    if (signature == NULL)
  ------------------
  |  Branch (37:9): [True: 0, False: 37.1k]
  ------------------
   38|      0|        return NULL;
   39|       |
   40|  37.1k|    if (!CRYPTO_NEW_REF(&signature->refcnt, 1)
  ------------------
  |  Branch (40:9): [True: 0, False: 37.1k]
  ------------------
   41|  37.1k|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (41:12): [True: 0, False: 37.1k]
  ------------------
   42|      0|        CRYPTO_FREE_REF(&signature->refcnt);
   43|      0|        OPENSSL_free(signature);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|       |
   47|  37.1k|    signature->prov = prov;
   48|       |
   49|  37.1k|    return signature;
   50|  37.1k|}
signature.c:evp_signature_up_ref:
   29|  43.6k|{
   30|  43.6k|    return EVP_SIGNATURE_up_ref(data);
   31|  43.6k|}
signature.c:evp_signature_free:
   24|  75.4k|{
   25|  75.4k|    EVP_SIGNATURE_free(data);
   26|  75.4k|}

ossl_do_ex_data_init:
   15|    785|{
   16|    785|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
   17|       |
   18|    785|    if (global == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 785]
  ------------------
   19|      0|        return 0;
   20|       |
   21|    785|    global->ex_data_lock = CRYPTO_THREAD_lock_new();
   22|       |    return global->ex_data_lock != NULL;
   23|    785|}
ossl_crypto_cleanup_all_ex_data_int:
   73|    785|{
   74|    785|    int i;
   75|    785|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
   76|       |
   77|    785|    if (global == NULL)
  ------------------
  |  Branch (77:9): [True: 0, False: 785]
  ------------------
   78|      0|        return;
   79|       |
   80|  14.9k|    for (i = 0; i < CRYPTO_EX_INDEX__COUNT; ++i) {
  ------------------
  |  |  269|  14.9k|#define CRYPTO_EX_INDEX__COUNT 18
  ------------------
  |  Branch (80:17): [True: 14.1k, False: 785]
  ------------------
   81|  14.1k|        EX_CALLBACKS *ip = &global->ex_data[i];
   82|       |
   83|  14.1k|        sk_EX_CALLBACK_pop_free(ip->meth, cleanup_cb);
   84|  14.1k|        ip->meth = NULL;
   85|  14.1k|    }
   86|       |
   87|    785|    CRYPTO_THREAD_lock_free(global->ex_data_lock);
   88|       |    global->ex_data_lock = NULL;
   89|    785|}
ossl_crypto_get_ex_new_index_ex:
  154|      2|{
  155|      2|    int toret = -1;
  156|      2|    EX_CALLBACK *a;
  157|      2|    EX_CALLBACKS *ip;
  158|      2|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
  159|       |
  160|      2|    if (global == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 2]
  ------------------
  161|      0|        return -1;
  162|       |
  163|      2|    ip = get_and_lock(global, class_index, 0);
  164|      2|    if (ip == NULL)
  ------------------
  |  Branch (164:9): [True: 0, False: 2]
  ------------------
  165|      0|        return -1;
  166|       |
  167|      2|    if (ip->meth == NULL) {
  ------------------
  |  Branch (167:9): [True: 2, False: 0]
  ------------------
  168|      2|        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|      2|        if (ip->meth == NULL
  ------------------
  |  Branch (171:13): [True: 0, False: 2]
  ------------------
  172|      2|            || !sk_EX_CALLBACK_push(ip->meth, NULL)) {
  ------------------
  |  Branch (172:16): [True: 0, False: 2]
  ------------------
  173|      0|            sk_EX_CALLBACK_free(ip->meth);
  174|      0|            ip->meth = NULL;
  175|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  176|      0|            goto err;
  177|      0|        }
  178|      2|    }
  179|       |
  180|      2|    a = (EX_CALLBACK *)OPENSSL_malloc(sizeof(*a));
  ------------------
  |  |  106|      2|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  181|      2|    if (a == NULL)
  ------------------
  |  Branch (181:9): [True: 0, False: 2]
  ------------------
  182|      0|        goto err;
  183|      2|    a->argl = argl;
  184|      2|    a->argp = argp;
  185|      2|    a->new_func = new_func;
  186|      2|    a->dup_func = dup_func;
  187|      2|    a->free_func = free_func;
  188|      2|    a->priority = priority;
  189|       |
  190|      2|    if (!sk_EX_CALLBACK_push(ip->meth, NULL)) {
  ------------------
  |  Branch (190:9): [True: 0, False: 2]
  ------------------
  191|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  192|      0|        OPENSSL_free(a);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  193|      0|        goto err;
  194|      0|    }
  195|      2|    toret = sk_EX_CALLBACK_num(ip->meth) - 1;
  196|      2|    (void)sk_EX_CALLBACK_set(ip->meth, toret, a);
  197|       |
  198|      2|err:
  199|      2|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  200|      2|    return toret;
  201|      2|}
CRYPTO_get_ex_new_index:
  206|      2|{
  207|       |    return ossl_crypto_get_ex_new_index_ex(NULL, class_index, argl, argp,
  208|      2|        new_func, dup_func, free_func, 0);
  209|      2|}
ossl_crypto_new_ex_data_ex:
  220|  4.84M|{
  221|  4.84M|    int mx, i;
  222|  4.84M|    void *ptr;
  223|  4.84M|    EX_CALLBACK **storage = NULL;
  224|  4.84M|    EX_CALLBACK *stack[10];
  225|  4.84M|    EX_CALLBACKS *ip;
  226|  4.84M|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
  227|       |
  228|  4.84M|    if (global == NULL)
  ------------------
  |  Branch (228:9): [True: 0, False: 4.84M]
  ------------------
  229|      0|        return 0;
  230|       |
  231|  4.84M|    ip = get_and_lock(global, class_index, 1);
  232|  4.84M|    if (ip == NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 4.84M]
  ------------------
  233|      0|        return 0;
  234|       |
  235|  4.84M|    ad->ctx = ctx;
  236|  4.84M|    ad->sk = NULL;
  237|  4.84M|    mx = sk_EX_CALLBACK_num(ip->meth);
  238|  4.84M|    if (mx > 0) {
  ------------------
  |  Branch (238:9): [True: 831, False: 4.84M]
  ------------------
  239|    831|        if (mx < (int)OSSL_NELEM(stack))
  ------------------
  |  |   14|    831|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (239:13): [True: 831, False: 0]
  ------------------
  240|    831|            storage = stack;
  241|      0|        else
  242|      0|            storage = OPENSSL_malloc_array(mx, sizeof(*storage));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  243|    831|        if (storage != NULL)
  ------------------
  |  Branch (243:13): [True: 831, False: 0]
  ------------------
  244|  2.49k|            for (i = 0; i < mx; i++)
  ------------------
  |  Branch (244:25): [True: 1.66k, False: 831]
  ------------------
  245|  1.66k|                storage[i] = sk_EX_CALLBACK_value(ip->meth, i);
  246|    831|    }
  247|  4.84M|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  248|       |
  249|  4.84M|    if (mx > 0 && storage == NULL)
  ------------------
  |  Branch (249:9): [True: 831, False: 4.84M]
  |  Branch (249:19): [True: 0, False: 831]
  ------------------
  250|      0|        return 0;
  251|  4.84M|    for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (251:17): [True: 1.66k, False: 4.84M]
  ------------------
  252|  1.66k|        if (storage[i] != NULL && storage[i]->new_func != NULL) {
  ------------------
  |  Branch (252:13): [True: 831, False: 831]
  |  Branch (252:35): [True: 0, False: 831]
  ------------------
  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|  1.66k|    }
  258|  4.84M|    if (storage != stack)
  ------------------
  |  Branch (258:9): [True: 4.84M, False: 831]
  ------------------
  259|  4.84M|        OPENSSL_free(storage);
  ------------------
  |  |  131|  4.84M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  260|  4.84M|    return 1;
  261|  4.84M|}
CRYPTO_new_ex_data:
  264|  4.84M|{
  265|       |    return ossl_crypto_new_ex_data_ex(NULL, class_index, obj, ad);
  266|  4.84M|}
CRYPTO_free_ex_data:
  367|  4.84M|{
  368|  4.84M|    int mx, i;
  369|  4.84M|    EX_CALLBACKS *ip;
  370|  4.84M|    void *ptr;
  371|  4.84M|    const EX_CALLBACK *f;
  372|  4.84M|    struct ex_callback_entry stack[10];
  373|  4.84M|    struct ex_callback_entry *storage = NULL;
  374|  4.84M|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ad->ctx);
  375|       |
  376|  4.84M|    if (global == NULL)
  ------------------
  |  Branch (376:9): [True: 0, False: 4.84M]
  ------------------
  377|      0|        goto err;
  378|       |
  379|  4.84M|    ip = get_and_lock(global, class_index, 1);
  380|  4.84M|    if (ip == NULL)
  ------------------
  |  Branch (380:9): [True: 0, False: 4.84M]
  ------------------
  381|      0|        goto err;
  382|       |
  383|  4.84M|    mx = sk_EX_CALLBACK_num(ip->meth);
  384|  4.84M|    if (mx > 0) {
  ------------------
  |  Branch (384:9): [True: 835, False: 4.84M]
  ------------------
  385|    835|        if (mx < (int)OSSL_NELEM(stack))
  ------------------
  |  |   14|    835|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (385:13): [True: 835, False: 0]
  ------------------
  386|    835|            storage = stack;
  387|      0|        else
  388|      0|            storage = OPENSSL_malloc_array(mx, sizeof(*storage));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|    835|        if (storage != NULL)
  ------------------
  |  Branch (389:13): [True: 835, False: 0]
  ------------------
  390|  2.50k|            for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (390:25): [True: 1.67k, False: 835]
  ------------------
  391|  1.67k|                storage[i].excb = sk_EX_CALLBACK_value(ip->meth, i);
  392|  1.67k|                storage[i].index = i;
  393|  1.67k|            }
  394|    835|    }
  395|  4.84M|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  396|       |
  397|  4.84M|    if (storage != NULL) {
  ------------------
  |  Branch (397:9): [True: 835, False: 4.84M]
  ------------------
  398|       |        /* Sort according to priority. High priority first */
  399|    835|        qsort(storage, mx, sizeof(*storage), ex_callback_compare);
  400|  2.50k|        for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (400:21): [True: 1.67k, False: 835]
  ------------------
  401|  1.67k|            f = storage[i].excb;
  402|       |
  403|  1.67k|            if (f != NULL && f->free_func != NULL) {
  ------------------
  |  Branch (403:17): [True: 835, False: 835]
  |  Branch (403:30): [True: 835, False: 0]
  ------------------
  404|    835|                ptr = CRYPTO_get_ex_data(ad, storage[i].index);
  405|    835|                f->free_func(obj, ptr, ad, storage[i].index, f->argl, f->argp);
  406|    835|            }
  407|  1.67k|        }
  408|    835|    }
  409|       |
  410|  4.84M|    if (storage != stack)
  ------------------
  |  Branch (410:9): [True: 4.84M, False: 835]
  ------------------
  411|  4.84M|        OPENSSL_free(storage);
  ------------------
  |  |  131|  4.84M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  412|  4.84M|err:
  413|  4.84M|    sk_void_free(ad->sk);
  ------------------
  |  |  225|  4.84M|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
  414|  4.84M|    ad->sk = NULL;
  415|       |    ad->ctx = NULL;
  416|  4.84M|}
CRYPTO_set_ex_data:
  469|  2.78k|{
  470|  2.78k|    int i;
  471|       |
  472|  2.78k|    if (ad->sk == NULL) {
  ------------------
  |  Branch (472:9): [True: 2.78k, False: 0]
  ------------------
  473|  2.78k|        if ((ad->sk = sk_void_new_null()) == NULL) {
  ------------------
  |  |  222|  2.78k|#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (473:13): [True: 0, False: 2.78k]
  ------------------
  474|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  475|      0|            return 0;
  476|      0|        }
  477|  2.78k|    }
  478|       |
  479|  6.39k|    for (i = sk_void_num(ad->sk); i <= idx; ++i) {
  ------------------
  |  |  219|  2.78k|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (479:35): [True: 3.61k, False: 2.78k]
  ------------------
  480|  3.61k|        if (!sk_void_push(ad->sk, NULL)) {
  ------------------
  |  |  229|  3.61k|#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: 3.61k]
  ------------------
  481|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  482|      0|            return 0;
  483|      0|        }
  484|  3.61k|    }
  485|  2.78k|    if (sk_void_set(ad->sk, idx, val) != val) {
  ------------------
  |  |  235|  2.78k|#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.78k]
  ------------------
  486|       |        /* Probably the index is out of bounds */
  487|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  488|      0|        return 0;
  489|      0|    }
  490|  2.78k|    return 1;
  491|  2.78k|}
CRYPTO_get_ex_data:
  498|  5.80k|{
  499|  5.80k|    if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
  ------------------
  |  |  219|  4.14k|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (499:9): [True: 1.66k, False: 4.14k]
  |  Branch (499:27): [True: 0, False: 4.14k]
  ------------------
  500|  1.66k|        return NULL;
  501|  4.14k|    return sk_void_value(ad->sk, idx);
  ------------------
  |  |  220|  4.14k|#define sk_void_value(sk, idx) ((void *)OPENSSL_sk_value(ossl_check_const_void_sk_type(sk), (idx)))
  ------------------
  502|  5.80k|}
ex_data.c:cleanup_cb:
   62|      2|{
   63|      2|    OPENSSL_free(funcs);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   64|      2|}
ex_data.c:get_and_lock:
   33|  9.68M|{
   34|  9.68M|    EX_CALLBACKS *ip;
   35|       |
   36|  9.68M|    if (class_index < 0 || class_index >= CRYPTO_EX_INDEX__COUNT) {
  ------------------
  |  |  269|  9.68M|#define CRYPTO_EX_INDEX__COUNT 18
  ------------------
  |  Branch (36:9): [True: 0, False: 9.68M]
  |  Branch (36:28): [True: 0, False: 9.68M]
  ------------------
   37|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   38|      0|        return NULL;
   39|      0|    }
   40|       |
   41|  9.68M|    if (global->ex_data_lock == NULL) {
  ------------------
  |  Branch (41:9): [True: 0, False: 9.68M]
  ------------------
   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|  9.68M|    if (read) {
  ------------------
  |  Branch (49:9): [True: 9.68M, False: 2]
  ------------------
   50|  9.68M|        if (!CRYPTO_THREAD_read_lock(global->ex_data_lock))
  ------------------
  |  Branch (50:13): [True: 0, False: 9.68M]
  ------------------
   51|      0|            return NULL;
   52|  9.68M|    } else {
   53|      2|        if (!CRYPTO_THREAD_write_lock(global->ex_data_lock))
  ------------------
  |  Branch (53:13): [True: 0, False: 2]
  ------------------
   54|      0|            return NULL;
   55|      2|    }
   56|       |
   57|  9.68M|    ip = &global->ex_data[class_index];
   58|  9.68M|    return ip;
   59|  9.68M|}
ex_data.c:ex_callback_compare:
  346|    835|{
  347|    835|    const struct ex_callback_entry *ap = (const struct ex_callback_entry *)a;
  348|    835|    const struct ex_callback_entry *bp = (const struct ex_callback_entry *)b;
  349|       |
  350|    835|    if (ap->excb == bp->excb)
  ------------------
  |  Branch (350:9): [True: 0, False: 835]
  ------------------
  351|      0|        return 0;
  352|       |
  353|    835|    if (ap->excb == NULL)
  ------------------
  |  Branch (353:9): [True: 835, False: 0]
  ------------------
  354|    835|        return 1;
  355|      0|    if (bp->excb == NULL)
  ------------------
  |  Branch (355:9): [True: 0, False: 0]
  ------------------
  356|      0|        return -1;
  357|      0|    if (ap->excb->priority == bp->excb->priority)
  ------------------
  |  Branch (357:9): [True: 0, False: 0]
  ------------------
  358|      0|        return 0;
  359|      0|    return ap->excb->priority > bp->excb->priority ? -1 : 1;
  ------------------
  |  Branch (359:12): [True: 0, False: 0]
  ------------------
  360|      0|}

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

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

ossl_ffc_params_init:
   21|    172|{
   22|    172|    memset(params, 0, sizeof(*params));
   23|    172|    params->pcounter = -1;
   24|    172|    params->gindex = FFC_UNVERIFIABLE_GINDEX;
  ------------------
  |  |   23|    172|#define FFC_UNVERIFIABLE_GINDEX -1
  ------------------
   25|    172|    params->flags = FFC_PARAM_FLAG_VALIDATE_PQG;
  ------------------
  |  |   46|    172|    (FFC_PARAM_FLAG_VALIDATE_PQ | FFC_PARAM_FLAG_VALIDATE_G)
  |  |  ------------------
  |  |  |  |   43|    172|#define FFC_PARAM_FLAG_VALIDATE_PQ 0x01
  |  |  ------------------
  |  |                   (FFC_PARAM_FLAG_VALIDATE_PQ | FFC_PARAM_FLAG_VALIDATE_G)
  |  |  ------------------
  |  |  |  |   44|    172|#define FFC_PARAM_FLAG_VALIDATE_G 0x02
  |  |  ------------------
  ------------------
   26|    172|}
ossl_ffc_params_cleanup:
   29|     86|{
   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|     86|    BN_free(params->p);
   38|     86|    BN_free(params->q);
   39|     86|    BN_free(params->g);
   40|     86|    BN_free(params->j);
   41|     86|    OPENSSL_free(params->seed);
  ------------------
  |  |  131|     86|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   42|     86|#endif
   43|     86|    ossl_ffc_params_init(params);
   44|     86|}
ossl_ffc_params_set0_pqg:
   47|     86|{
   48|     86|    if (p != NULL && p != d->p) {
  ------------------
  |  Branch (48:9): [True: 86, False: 0]
  |  Branch (48:22): [True: 86, False: 0]
  ------------------
   49|     86|        BN_free(d->p);
   50|     86|        d->p = p;
   51|     86|    }
   52|     86|    if (q != NULL && q != d->q) {
  ------------------
  |  Branch (52:9): [True: 86, False: 0]
  |  Branch (52:22): [True: 86, False: 0]
  ------------------
   53|     86|        BN_free(d->q);
   54|     86|        d->q = q;
   55|     86|    }
   56|     86|    if (g != NULL && g != d->g) {
  ------------------
  |  Branch (56:9): [True: 86, False: 0]
  |  Branch (56:22): [True: 86, False: 0]
  ------------------
   57|     86|        BN_free(d->g);
   58|     86|        d->g = g;
   59|     86|    }
   60|     86|}
ossl_ffc_params_get0_pqg:
   64|    172|{
   65|    172|    if (p != NULL)
  ------------------
  |  Branch (65:9): [True: 172, False: 0]
  ------------------
   66|    172|        *p = d->p;
   67|    172|    if (q != NULL)
  ------------------
  |  Branch (67:9): [True: 0, False: 172]
  ------------------
   68|      0|        *q = d->q;
   69|    172|    if (g != NULL)
  ------------------
  |  Branch (69:9): [True: 0, False: 172]
  ------------------
   70|      0|        *g = d->g;
   71|    172|}
ossl_ffc_params_enable_flags:
  125|     86|{
  126|     86|    if (enable)
  ------------------
  |  Branch (126:9): [True: 0, False: 86]
  ------------------
  127|      0|        params->flags |= flags;
  128|     86|    else
  129|     86|        params->flags &= ~flags;
  130|     86|}
ossl_ffc_params_todata:
  217|    258|{
  218|    258|    int test_flags;
  219|       |
  220|    258|    if (ffc->p != NULL
  ------------------
  |  Branch (220:9): [True: 258, False: 0]
  ------------------
  221|    258|        && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_FFC_P, ffc->p))
  ------------------
  |  |  406|    258|# define OSSL_PKEY_PARAM_FFC_P "p"
  ------------------
  |  Branch (221:12): [True: 0, False: 258]
  ------------------
  222|      0|        return 0;
  223|    258|    if (ffc->q != NULL
  ------------------
  |  Branch (223:9): [True: 258, False: 0]
  ------------------
  224|    258|        && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_FFC_Q, ffc->q))
  ------------------
  |  |  409|    258|# define OSSL_PKEY_PARAM_FFC_Q "q"
  ------------------
  |  Branch (224:12): [True: 0, False: 258]
  ------------------
  225|      0|        return 0;
  226|    258|    if (ffc->g != NULL
  ------------------
  |  Branch (226:9): [True: 258, False: 0]
  ------------------
  227|    258|        && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_FFC_G, ffc->g))
  ------------------
  |  |  403|    258|# define OSSL_PKEY_PARAM_FFC_G "g"
  ------------------
  |  Branch (227:12): [True: 0, False: 258]
  ------------------
  228|      0|        return 0;
  229|    258|    if (ffc->j != NULL
  ------------------
  |  Branch (229:9): [True: 0, False: 258]
  ------------------
  230|      0|        && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_FFC_COFACTOR,
  ------------------
  |  |  400|      0|# define OSSL_PKEY_PARAM_FFC_COFACTOR "j"
  ------------------
  |  Branch (230:12): [True: 0, False: 0]
  ------------------
  231|      0|            ffc->j))
  232|      0|        return 0;
  233|    258|    if (!ossl_param_build_set_int(bld, params, OSSL_PKEY_PARAM_FFC_GINDEX,
  ------------------
  |  |  404|    258|# define OSSL_PKEY_PARAM_FFC_GINDEX "gindex"
  ------------------
  |  Branch (233:9): [True: 0, False: 258]
  ------------------
  234|    258|            ffc->gindex))
  235|      0|        return 0;
  236|    258|    if (!ossl_param_build_set_int(bld, params, OSSL_PKEY_PARAM_FFC_PCOUNTER,
  ------------------
  |  |  408|    258|# define OSSL_PKEY_PARAM_FFC_PCOUNTER "pcounter"
  ------------------
  |  Branch (236:9): [True: 0, False: 258]
  ------------------
  237|    258|            ffc->pcounter))
  238|      0|        return 0;
  239|    258|    if (!ossl_param_build_set_int(bld, params, OSSL_PKEY_PARAM_FFC_H, ffc->h))
  ------------------
  |  |  405|    258|# define OSSL_PKEY_PARAM_FFC_H "hindex"
  ------------------
  |  Branch (239:9): [True: 0, False: 258]
  ------------------
  240|      0|        return 0;
  241|    258|    if (ffc->seed != NULL
  ------------------
  |  Branch (241:9): [True: 0, False: 258]
  ------------------
  242|      0|        && !ossl_param_build_set_octet_string(bld, params,
  ------------------
  |  Branch (242:12): [True: 0, False: 0]
  ------------------
  243|      0|            OSSL_PKEY_PARAM_FFC_SEED,
  ------------------
  |  |  411|      0|# define OSSL_PKEY_PARAM_FFC_SEED "seed"
  ------------------
  244|      0|            ffc->seed, ffc->seedlen))
  245|      0|        return 0;
  246|    258|    if (ffc->nid != NID_undef) {
  ------------------
  |  |   18|    258|#define NID_undef                       0
  ------------------
  |  Branch (246:9): [True: 258, False: 0]
  ------------------
  247|    258|        const DH_NAMED_GROUP *group = ossl_ffc_uid_to_dh_named_group(ffc->nid);
  248|    258|        const char *name = ossl_ffc_named_group_get_name(group);
  249|       |
  250|    258|        if (name == NULL
  ------------------
  |  Branch (250:13): [True: 0, False: 258]
  ------------------
  251|    258|            || !ossl_param_build_set_utf8_string(bld, params,
  ------------------
  |  Branch (251:16): [True: 0, False: 258]
  ------------------
  252|    258|                OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  420|    258|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  253|    258|                name))
  254|      0|            return 0;
  255|    258|    }
  256|    258|    test_flags = ((ffc->flags & FFC_PARAM_FLAG_VALIDATE_PQ) != 0);
  ------------------
  |  |   43|    258|#define FFC_PARAM_FLAG_VALIDATE_PQ 0x01
  ------------------
  257|    258|    if (!ossl_param_build_set_int(bld, params,
  ------------------
  |  Branch (257:9): [True: 0, False: 258]
  ------------------
  258|    258|            OSSL_PKEY_PARAM_FFC_VALIDATE_PQ, test_flags))
  ------------------
  |  |  415|    258|# define OSSL_PKEY_PARAM_FFC_VALIDATE_PQ "validate-pq"
  ------------------
  259|      0|        return 0;
  260|    258|    test_flags = ((ffc->flags & FFC_PARAM_FLAG_VALIDATE_G) != 0);
  ------------------
  |  |   44|    258|#define FFC_PARAM_FLAG_VALIDATE_G 0x02
  ------------------
  261|    258|    if (!ossl_param_build_set_int(bld, params,
  ------------------
  |  Branch (261:9): [True: 0, False: 258]
  ------------------
  262|    258|            OSSL_PKEY_PARAM_FFC_VALIDATE_G, test_flags))
  ------------------
  |  |  413|    258|# define OSSL_PKEY_PARAM_FFC_VALIDATE_G "validate-g"
  ------------------
  263|      0|        return 0;
  264|    258|    test_flags = ((ffc->flags & FFC_PARAM_FLAG_VALIDATE_LEGACY) != 0);
  ------------------
  |  |   47|    258|#define FFC_PARAM_FLAG_VALIDATE_LEGACY 0x04
  ------------------
  265|    258|    if (!ossl_param_build_set_int(bld, params,
  ------------------
  |  Branch (265:9): [True: 0, False: 258]
  ------------------
  266|    258|            OSSL_PKEY_PARAM_FFC_VALIDATE_LEGACY,
  ------------------
  |  |  414|    258|# define OSSL_PKEY_PARAM_FFC_VALIDATE_LEGACY "validate-legacy"
  ------------------
  267|    258|            test_flags))
  268|      0|        return 0;
  269|       |
  270|    258|    if (ffc->mdname != NULL
  ------------------
  |  Branch (270:9): [True: 0, False: 258]
  ------------------
  271|      0|        && !ossl_param_build_set_utf8_string(bld, params,
  ------------------
  |  Branch (271:12): [True: 0, False: 0]
  ------------------
  272|      0|            OSSL_PKEY_PARAM_FFC_DIGEST,
  ------------------
  |  |  401|      0|# define OSSL_PKEY_PARAM_FFC_DIGEST OSSL_PKEY_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  374|      0|# define OSSL_PKEY_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  |  |  ------------------
  |  |  |  |  |  |  128|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  273|      0|            ffc->mdname))
  274|      0|        return 0;
  275|    258|    if (ffc->mdprops != NULL
  ------------------
  |  Branch (275:9): [True: 0, False: 258]
  ------------------
  276|      0|        && !ossl_param_build_set_utf8_string(bld, params,
  ------------------
  |  Branch (276:12): [True: 0, False: 0]
  ------------------
  277|      0|            OSSL_PKEY_PARAM_FFC_DIGEST_PROPS,
  ------------------
  |  |  402|      0|# define OSSL_PKEY_PARAM_FFC_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  440|      0|# define OSSL_PKEY_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  |  |  ------------------
  |  |  |  |  |  |  132|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|      0|            ffc->mdprops))
  279|      0|        return 0;
  280|    258|    return 1;
  281|    258|}

ossl_safe_getenv:
   19|  1.75k|{
   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|  1.75k|#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
   90|  1.75k|#if __GLIBC_PREREQ(2, 17)
   91|  1.75k|#define SECURE_GETENV
   92|  1.75k|    return secure_getenv(name);
   93|  1.75k|#endif
   94|  1.75k|#endif
   95|       |
   96|       |#ifndef SECURE_GETENV
   97|       |    if (OPENSSL_issetugid())
   98|       |        return NULL;
   99|       |    return getenv(name);
  100|       |#endif
  101|  1.75k|}

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

ossl_ht_new:
  178|    785|{
  179|    785|    HT *new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  180|       |
  181|    785|    if (new == NULL)
  ------------------
  |  Branch (181:9): [True: 0, False: 785]
  ------------------
  182|      0|        return NULL;
  183|       |
  184|    785|    new->atomic_lock = CRYPTO_THREAD_lock_new();
  185|    785|    if (new->atomic_lock == NULL)
  ------------------
  |  Branch (185:9): [True: 0, False: 785]
  ------------------
  186|      0|        goto err;
  187|       |
  188|    785|    memcpy(&new->config, conf, sizeof(*conf));
  189|       |
  190|    785|    if (new->config.init_neighborhoods != 0) {
  ------------------
  |  Branch (190:9): [True: 785, False: 0]
  ------------------
  191|    785|        new->wpd.neighborhood_len = new->config.init_neighborhoods;
  192|       |        /* round up to the next power of 2 */
  193|    785|        new->wpd.neighborhood_len--;
  194|    785|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 1;
  195|    785|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 2;
  196|    785|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 4;
  197|    785|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 8;
  198|    785|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 16;
  199|    785|        new->wpd.neighborhood_len++;
  200|    785|    } else {
  201|      0|        new->wpd.neighborhood_len = DEFAULT_NEIGH_LEN;
  ------------------
  |  |   97|      0|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   96|      0|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  202|      0|    }
  203|       |
  204|    785|    if (new->config.ht_free_fn == NULL)
  ------------------
  |  Branch (204:9): [True: 785, False: 0]
  ------------------
  205|    785|        new->config.ht_free_fn = internal_free_nop;
  206|       |
  207|    785|    new->md = OPENSSL_zalloc(sizeof(*new->md));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|    785|    if (new->md == NULL)
  ------------------
  |  Branch (208:9): [True: 0, False: 785]
  ------------------
  209|      0|        goto err;
  210|       |
  211|    785|    new->md->neighborhoods = alloc_new_neighborhood_list(new->wpd.neighborhood_len,
  212|    785|        &new->md->neighborhood_ptr_to_free);
  213|    785|    if (new->md->neighborhoods == NULL)
  ------------------
  |  Branch (213:9): [True: 0, False: 785]
  ------------------
  214|      0|        goto err;
  215|    785|    new->md->neighborhood_mask = new->wpd.neighborhood_len - 1;
  216|       |
  217|    785|    new->lock = ossl_rcu_lock_new(1, conf->ctx);
  218|    785|    if (new->lock == NULL)
  ------------------
  |  Branch (218:9): [True: 0, False: 785]
  ------------------
  219|      0|        goto err;
  220|       |
  221|    785|    if (new->config.ht_hash_fn == NULL)
  ------------------
  |  Branch (221:9): [True: 785, False: 0]
  ------------------
  222|    785|        new->config.ht_hash_fn = ossl_fnv1a_hash;
  223|       |
  224|    785|    return new;
  225|       |
  226|      0|err:
  227|      0|    CRYPTO_THREAD_lock_free(new->atomic_lock);
  228|      0|    ossl_rcu_lock_free(new->lock);
  229|      0|    if (new->md != NULL)
  ------------------
  |  Branch (229:9): [True: 0, False: 0]
  ------------------
  230|      0|        OPENSSL_free(new->md->neighborhood_ptr_to_free);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  231|      0|    OPENSSL_free(new->md);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  232|      0|    OPENSSL_free(new);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  233|       |    return NULL;
  234|    785|}
ossl_ht_write_lock:
  247|    785|{
  248|    785|    ossl_rcu_write_lock(htable->lock);
  249|    785|    htable->wpd.need_sync = 0;
  250|    785|}
ossl_ht_write_unlock:
  253|    785|{
  254|    785|    int need_sync = htable->wpd.need_sync;
  255|       |
  256|    785|    htable->wpd.need_sync = 0;
  257|    785|    ossl_rcu_write_unlock(htable->lock);
  258|    785|    if (need_sync)
  ------------------
  |  Branch (258:9): [True: 785, False: 0]
  ------------------
  259|    785|        ossl_synchronize_rcu(htable->lock);
  260|    785|}
ossl_ht_free:
  321|    785|{
  322|    785|    if (h == NULL)
  ------------------
  |  Branch (322:9): [True: 0, False: 785]
  ------------------
  323|      0|        return;
  324|       |
  325|    785|    ossl_ht_write_lock(h);
  326|    785|    ossl_ht_flush_internal(h);
  327|    785|    ossl_ht_write_unlock(h);
  328|       |    /* Freeing the lock does a final sync for us */
  329|    785|    CRYPTO_THREAD_lock_free(h->atomic_lock);
  330|    785|    ossl_rcu_lock_free(h->lock);
  331|    785|    OPENSSL_free(h->md->neighborhood_ptr_to_free);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  332|    785|    OPENSSL_free(h->md);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  333|    785|    OPENSSL_free(h);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  334|    785|    return;
  335|    785|}
ossl_ht_insert:
  628|   370k|{
  629|   370k|    struct ht_internal_value_st *newval = NULL;
  630|   370k|    uint64_t hash;
  631|   370k|    int rc = 0;
  632|   370k|    int i;
  633|       |
  634|   370k|    if (data->value == NULL)
  ------------------
  |  Branch (634:9): [True: 0, False: 370k]
  ------------------
  635|      0|        goto out;
  636|       |
  637|   370k|    rc = -1;
  638|   370k|    newval = alloc_new_value(h, key, data->value, data->type_id);
  639|   370k|    if (newval == NULL)
  ------------------
  |  Branch (639:9): [True: 0, False: 370k]
  ------------------
  640|      0|        goto out;
  641|       |
  642|       |    /*
  643|       |     * we have to take our lock here to prevent other changes
  644|       |     * to the bucket list
  645|       |     */
  646|   370k|    hash = h->config.ht_hash_fn(key->keybuf, key->keysize);
  647|       |
  648|   370k|    for (i = 0;
  649|   370k|        (rc = ossl_ht_insert_locked(h, hash, newval, olddata)) == -1
  ------------------
  |  Branch (649:9): [True: 0, False: 370k]
  ------------------
  650|      0|        && i < 4;
  ------------------
  |  Branch (650:12): [True: 0, False: 0]
  ------------------
  651|   370k|        ++i)
  652|      0|        if (!grow_hashtable(h, h->wpd.neighborhood_len)) {
  ------------------
  |  Branch (652:13): [True: 0, False: 0]
  ------------------
  653|      0|            rc = -1;
  654|      0|            break;
  655|      0|        }
  656|       |
  657|   370k|    if (rc <= 0)
  ------------------
  |  Branch (657:9): [True: 0, False: 370k]
  ------------------
  658|      0|        free_value(newval);
  659|       |
  660|   370k|out:
  661|   370k|    return rc;
  662|   370k|}
ossl_ht_get:
  665|  6.11M|{
  666|  6.11M|    struct ht_mutable_data_st *md;
  667|  6.11M|    uint64_t hash;
  668|  6.11M|    uint64_t neigh_idx_start;
  669|  6.11M|    uint64_t neigh_idx;
  670|  6.11M|    struct ht_internal_value_st *ival = NULL;
  671|  6.11M|    size_t j;
  672|  6.11M|    uint64_t ehash;
  673|  6.11M|    int lockless_reads = h->config.lockless_reads;
  674|       |
  675|  6.11M|    hash = h->config.ht_hash_fn(key->keybuf, key->keysize);
  676|       |
  677|  6.11M|    md = ossl_rcu_deref(&h->md);
  ------------------
  |  |   30|  6.11M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  678|  6.11M|    neigh_idx = neigh_idx_start = hash & md->neighborhood_mask;
  679|  6.12M|    do {
  680|  6.12M|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   83|  6.12M|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  681|  7.26M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  105|  7.26M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  102|  7.26M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (681:21): [True: 7.24M, False: 15.7k]
  ------------------
  682|  7.24M|            ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   30|  7.24M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  683|  7.24M|            if (ival == NULL) {
  ------------------
  |  Branch (683:17): [True: 640k, False: 6.60M]
  ------------------
  684|   640k|                if (lockless_reads)
  ------------------
  |  Branch (684:21): [True: 640k, False: 0]
  ------------------
  685|       |                    /* lockless_reads implies no deletion, we can break out */
  686|   640k|                    return NULL;
  687|      0|                continue;
  688|   640k|            }
  689|  6.60M|            if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (689:17): [True: 0, False: 6.60M]
  ------------------
  690|  6.60M|                    &ehash, h->atomic_lock))
  691|      0|                return NULL;
  692|  6.60M|            if (compare_hash(hash, ehash) && match_key(&ival->value.key, key))
  ------------------
  |  Branch (692:17): [True: 5.47M, False: 1.13M]
  |  Branch (692:46): [True: 5.47M, False: 0]
  ------------------
  693|  5.47M|                return (HT_VALUE *)ival;
  694|  6.60M|        }
  695|  15.7k|        if (!lockless_reads)
  ------------------
  |  Branch (695:13): [True: 0, False: 15.7k]
  ------------------
  696|      0|            break;
  697|       |        /* Continue search in subsequent neighborhoods */
  698|  15.7k|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  699|  15.7k|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (699:14): [True: 15.7k, False: 0]
  ------------------
  700|       |
  701|      0|    return NULL;
  702|  6.11M|}
hashtable.c:internal_free_nop:
  173|   370k|{
  174|   370k|    return;
  175|   370k|}
hashtable.c:alloc_new_neighborhood_list:
  156|  1.57k|{
  157|  1.57k|    struct ht_neighborhood_st *ret;
  158|       |
  159|  1.57k|    ret = OPENSSL_aligned_alloc_array(len, sizeof(struct ht_neighborhood_st),
  ------------------
  |  |  117|  1.57k|    CRYPTO_aligned_alloc_array(num, size, alignment, freeptr,      \
  |  |  118|  1.57k|        OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  160|  1.57k|        CACHE_LINE_BYTES, freeptr);
  161|       |
  162|       |    /* fall back to regular malloc */
  163|  1.57k|    if (ret == NULL) {
  ------------------
  |  Branch (163:9): [True: 0, False: 1.57k]
  ------------------
  164|      0|        ret = *freeptr = OPENSSL_malloc_array(len, sizeof(struct ht_neighborhood_st));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  165|      0|        if (ret == NULL)
  ------------------
  |  Branch (165:13): [True: 0, False: 0]
  ------------------
  166|      0|            return NULL;
  167|      0|    }
  168|  1.57k|    memset(ret, 0, sizeof(struct ht_neighborhood_st) * len);
  169|  1.57k|    return ret;
  170|  1.57k|}
hashtable.c:ossl_ht_flush_internal:
  285|    785|{
  286|    785|    struct ht_mutable_data_st *newmd = NULL;
  287|    785|    struct ht_mutable_data_st *oldmd = NULL;
  288|       |
  289|    785|    newmd = OPENSSL_zalloc(sizeof(*newmd));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  290|    785|    if (newmd == NULL)
  ------------------
  |  Branch (290:9): [True: 0, False: 785]
  ------------------
  291|      0|        return 0;
  292|       |
  293|    785|    newmd->neighborhoods = alloc_new_neighborhood_list(DEFAULT_NEIGH_LEN,
  ------------------
  |  |   97|    785|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   96|    785|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  294|    785|        &newmd->neighborhood_ptr_to_free);
  295|    785|    if (newmd->neighborhoods == NULL) {
  ------------------
  |  Branch (295:9): [True: 0, False: 785]
  ------------------
  296|      0|        OPENSSL_free(newmd);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|      0|        return 0;
  298|      0|    }
  299|       |
  300|    785|    newmd->neighborhood_mask = DEFAULT_NEIGH_LEN - 1;
  ------------------
  |  |   97|    785|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   96|    785|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  301|       |
  302|       |    /* Swap the old and new mutable data sets */
  303|    785|    oldmd = ossl_rcu_deref(&h->md);
  ------------------
  |  |   30|    785|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  304|    785|    ossl_rcu_assign_ptr(&h->md, &newmd);
  ------------------
  |  |   31|    785|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  305|       |
  306|       |    /* Set the number of entries to 0 */
  307|    785|    h->wpd.value_count = 0;
  308|    785|    h->wpd.neighborhood_len = DEFAULT_NEIGH_LEN;
  ------------------
  |  |   97|    785|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   96|    785|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  309|       |
  310|    785|    ossl_rcu_call(h->lock, free_oldmd, oldmd);
  311|    785|    h->wpd.need_sync = 1;
  312|    785|    return 1;
  313|    785|}
hashtable.c:free_oldmd:
  263|    785|{
  264|    785|    struct ht_mutable_data_st *oldmd = arg;
  265|    785|    size_t i, j;
  266|    785|    size_t neighborhood_len = (size_t)oldmd->neighborhood_mask + 1;
  267|    785|    struct ht_internal_value_st *v;
  268|       |
  269|   402k|    for (i = 0; i < neighborhood_len; i++) {
  ------------------
  |  Branch (269:17): [True: 401k, False: 785]
  ------------------
  270|   401k|        PREFETCH_NEIGHBORHOOD(oldmd->neighborhoods[i + 1]);
  ------------------
  |  |   83|   401k|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  271|  2.00M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  105|  2.00M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  102|  2.00M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (271:21): [True: 1.60M, False: 401k]
  ------------------
  272|  1.60M|            if (oldmd->neighborhoods[i].entries[j].value != NULL) {
  ------------------
  |  Branch (272:17): [True: 370k, False: 1.23M]
  ------------------
  273|   370k|                v = oldmd->neighborhoods[i].entries[j].value;
  274|   370k|                v->ht->config.ht_free_fn((HT_VALUE *)v);
  275|   370k|                free_value(v);
  276|   370k|            }
  277|  1.60M|        }
  278|   401k|    }
  279|       |
  280|    785|    OPENSSL_free(oldmd->neighborhood_ptr_to_free);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|    785|    OPENSSL_free(oldmd);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  282|    785|}
hashtable.c:alloc_new_value:
  597|   370k|{
  598|   370k|    struct ht_internal_value_st *tmp;
  599|   370k|    size_t nvsize = sizeof(*tmp);
  600|       |
  601|   370k|    if (h->config.collision_check == 1)
  ------------------
  |  Branch (601:9): [True: 370k, False: 0]
  ------------------
  602|   370k|        nvsize += key->keysize;
  603|       |
  604|   370k|    tmp = OPENSSL_malloc(nvsize);
  ------------------
  |  |  106|   370k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  605|       |
  606|   370k|    if (tmp == NULL)
  ------------------
  |  Branch (606:9): [True: 0, False: 370k]
  ------------------
  607|      0|        return NULL;
  608|       |
  609|   370k|    tmp->ht = h;
  610|   370k|    tmp->value.value = data;
  611|   370k|    tmp->value.type_id = type;
  612|   370k|    tmp->value.key.keybuf = NULL;
  613|   370k|    if (h->config.collision_check) {
  ------------------
  |  Branch (613:9): [True: 370k, False: 0]
  ------------------
  614|   370k|        tmp->value.key.keybuf = (uint8_t *)(tmp + 1);
  615|   370k|        tmp->value.key.keysize = key->keysize;
  616|   370k|        memcpy(tmp->value.key.keybuf, key->keybuf, key->keysize);
  617|   370k|    }
  618|       |
  619|   370k|    return tmp;
  620|   370k|}
hashtable.c:ossl_ht_insert_locked:
  533|   370k|{
  534|   370k|    struct ht_mutable_data_st *md = h->md;
  535|   370k|    uint64_t neigh_idx_start = hash & md->neighborhood_mask;
  536|   370k|    uint64_t neigh_idx = neigh_idx_start;
  537|   370k|    size_t j;
  538|   370k|    uint64_t ihash;
  539|   370k|    HT_VALUE *ival;
  540|   370k|    size_t empty_idx = SIZE_MAX;
  541|   370k|    int lockless_reads = h->config.lockless_reads;
  542|       |
  543|   375k|    do {
  544|   375k|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   83|   375k|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  545|       |
  546|   587k|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  105|   587k|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  102|   587k|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (546:21): [True: 583k, False: 4.41k]
  ------------------
  547|   583k|            ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   30|   583k|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  548|   583k|            if (ival == NULL) {
  ------------------
  |  Branch (548:17): [True: 370k, False: 212k]
  ------------------
  549|   370k|                empty_idx = j;
  550|       |                /* lockless_reads implies no deletion, we can break out */
  551|   370k|                if (lockless_reads)
  ------------------
  |  Branch (551:21): [True: 370k, False: 0]
  ------------------
  552|   370k|                    goto not_found;
  553|      0|                continue;
  554|   370k|            }
  555|   212k|            if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (555:17): [True: 0, False: 212k]
  ------------------
  556|   212k|                    &ihash, h->atomic_lock))
  557|      0|                return 0;
  558|   212k|            if (compare_hash(hash, ihash) && match_key(&newval->value.key, &ival->key)) {
  ------------------
  |  Branch (558:17): [True: 0, False: 212k]
  |  Branch (558:46): [True: 0, False: 0]
  ------------------
  559|      0|                if (olddata == NULL) {
  ------------------
  |  Branch (559:21): [True: 0, False: 0]
  ------------------
  560|       |                    /* This would insert a duplicate -> fail */
  561|      0|                    return 0;
  562|      0|                }
  563|       |                /* Do a replacement */
  564|      0|                if (!CRYPTO_atomic_store(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (564:21): [True: 0, False: 0]
  ------------------
  565|      0|                        hash, h->atomic_lock))
  566|      0|                    return 0;
  567|      0|                *olddata = (HT_VALUE *)md->neighborhoods[neigh_idx].entries[j].value;
  568|      0|                ossl_rcu_assign_ptr(&md->neighborhoods[neigh_idx].entries[j].value,
  ------------------
  |  |   31|      0|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  569|      0|                    &newval);
  570|      0|                ossl_rcu_call(h->lock, free_old_ht_value, *olddata);
  571|      0|                h->wpd.need_sync = 1;
  572|      0|                return 1;
  573|      0|            }
  574|   212k|        }
  575|  4.41k|        if (!lockless_reads)
  ------------------
  |  Branch (575:13): [True: 0, False: 4.41k]
  ------------------
  576|      0|            break;
  577|       |        /* Continue search in subsequent neighborhoods */
  578|  4.41k|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  579|  4.41k|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (579:14): [True: 4.41k, False: 0]
  ------------------
  580|       |
  581|   370k|not_found:
  582|       |    /* If we get to here, its just an insert */
  583|   370k|    if (empty_idx == SIZE_MAX)
  ------------------
  |  Branch (583:9): [True: 0, False: 370k]
  ------------------
  584|      0|        return -1; /* out of space */
  585|   370k|    if (!CRYPTO_atomic_store(&md->neighborhoods[neigh_idx].entries[empty_idx].hash,
  ------------------
  |  Branch (585:9): [True: 0, False: 370k]
  ------------------
  586|   370k|            hash, h->atomic_lock))
  587|      0|        return 0;
  588|   370k|    h->wpd.value_count++;
  589|   370k|    ossl_rcu_assign_ptr(&md->neighborhoods[neigh_idx].entries[empty_idx].value,
  ------------------
  |  |   31|   370k|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  590|   370k|        &newval);
  591|   370k|    return 1;
  592|   370k|}
hashtable.c:free_value:
  623|   370k|{
  624|   370k|    OPENSSL_free(v);
  ------------------
  |  |  131|   370k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  625|   370k|}
hashtable.c:compare_hash:
  406|  6.81M|{
  407|  6.81M|    return (hash1 == hash2);
  408|  6.81M|}
hashtable.c:match_key:
  517|  5.47M|{
  518|       |    /*
  519|       |     * keys match if they are both present, the same size
  520|       |     * and compare equal in memory
  521|       |     */
  522|  5.47M|    PREFETCH(a->keybuf);
  ------------------
  |  |   84|  5.47M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  523|  5.47M|    PREFETCH(b->keybuf);
  ------------------
  |  |   84|  5.47M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  524|  5.47M|    if (a->keybuf != NULL && b->keybuf != NULL && a->keysize == b->keysize)
  ------------------
  |  Branch (524:9): [True: 5.47M, False: 0]
  |  Branch (524:30): [True: 5.47M, False: 0]
  |  Branch (524:51): [True: 5.47M, False: 0]
  ------------------
  525|  5.47M|        return !memcmp(a->keybuf, b->keybuf, a->keysize);
  526|       |
  527|      0|    return 1;
  528|  5.47M|}

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|    785|{
   22|    785|    INDICATOR_CB *cb;
   23|       |
   24|    785|    cb = OPENSSL_zalloc(sizeof(*cb));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|    785|    return cb;
   26|    785|}
ossl_indicator_set_callback_free:
   29|    785|{
   30|    785|    OPENSSL_free(cb);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   31|    785|}

OPENSSL_cleanup:
  375|      1|{
  376|      1|    OPENSSL_INIT_STOP *currhandler, *lasthandler;
  377|       |
  378|       |    /*
  379|       |     * At some point we should consider looking at this function with a view to
  380|       |     * moving most/all of this into onfree handlers in OSSL_LIB_CTX.
  381|       |     */
  382|       |
  383|       |    /* If we've not been inited then no need to deinit */
  384|      1|    if (!base_inited)
  ------------------
  |  Branch (384:9): [True: 0, False: 1]
  ------------------
  385|      0|        return;
  386|       |
  387|       |    /* Might be explicitly called and also by atexit */
  388|      1|    if (stopped)
  ------------------
  |  Branch (388:9): [True: 0, False: 1]
  ------------------
  389|      0|        return;
  390|      1|    stopped = 1;
  391|       |
  392|       |    /*
  393|       |     * Thread stop may not get automatically called by the thread library for
  394|       |     * the very last thread in some situations, so call it directly.
  395|       |     */
  396|      1|    OPENSSL_thread_stop();
  397|       |
  398|      1|    currhandler = stop_handlers;
  399|      1|    while (currhandler != NULL) {
  ------------------
  |  Branch (399:12): [True: 0, False: 1]
  ------------------
  400|      0|        currhandler->handler();
  401|      0|        lasthandler = currhandler;
  402|      0|        currhandler = currhandler->next;
  403|      0|        OPENSSL_free(lasthandler);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  404|      0|    }
  405|      1|    stop_handlers = NULL;
  406|       |
  407|      1|    CRYPTO_THREAD_lock_free(optsdone_lock);
  408|      1|    optsdone_lock = NULL;
  409|      1|    CRYPTO_THREAD_lock_free(init_lock);
  410|      1|    init_lock = NULL;
  411|       |
  412|      1|    CRYPTO_THREAD_cleanup_local(&in_init_config_local);
  413|       |
  414|       |    /*
  415|       |     * We assume we are single-threaded for this function, i.e. no race
  416|       |     * conditions for the various "*_inited" vars below.
  417|       |     */
  418|       |
  419|      1|#ifndef OPENSSL_NO_COMP
  420|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_comp_zlib_cleanup()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  421|      1|    ossl_comp_zlib_cleanup();
  422|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_comp_brotli_cleanup()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  423|      1|    ossl_comp_brotli_cleanup();
  424|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_comp_zstd_cleanup()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  425|      1|    ossl_comp_zstd_cleanup();
  426|      1|#endif
  427|       |
  428|      1|    if (async_inited) {
  ------------------
  |  Branch (428:9): [True: 0, False: 1]
  ------------------
  429|      0|        OSSL_TRACE(INIT, "OPENSSL_cleanup: async_deinit()\n");
  ------------------
  |  |  290|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  430|      0|        async_deinit();
  431|      0|    }
  432|       |
  433|       |    /*
  434|       |     * Note that cleanup order is important:
  435|       |     * - ossl_rand_cleanup_int could call an ENGINE's RAND cleanup function so
  436|       |     * must be called before engine_cleanup_int()
  437|       |     * - ENGINEs use CRYPTO_EX_DATA and therefore, must be cleaned up
  438|       |     * before the ex data handlers are wiped during default ossl_lib_ctx deinit.
  439|       |     * - ossl_config_modules_free() can end up in ENGINE code so must be called
  440|       |     * before engine_cleanup_int()
  441|       |     * - ENGINEs and additional EVP algorithms might use added OIDs names so
  442|       |     * ossl_obj_cleanup_int() must be called last
  443|       |     */
  444|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_rand_cleanup_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  445|      1|    ossl_rand_cleanup_int();
  446|       |
  447|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_config_modules_free()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  448|      1|    ossl_config_modules_free();
  449|       |
  450|      1|#ifndef OPENSSL_NO_ENGINE
  451|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: engine_cleanup_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  452|      1|    engine_cleanup_int();
  453|      1|#endif
  454|       |
  455|      1|#ifndef OPENSSL_NO_DEPRECATED_3_0
  456|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_store_cleanup_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  457|      1|    ossl_store_cleanup_int();
  458|      1|#endif
  459|       |
  460|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_lib_ctx_default_deinit()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  461|      1|    ossl_lib_ctx_default_deinit();
  462|       |
  463|      1|    ossl_cleanup_thread();
  464|       |
  465|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: bio_cleanup()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  466|      1|    bio_cleanup();
  467|       |
  468|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: evp_cleanup_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  469|      1|    evp_cleanup_int();
  470|       |
  471|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_obj_cleanup_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  472|      1|    ossl_obj_cleanup_int();
  473|       |
  474|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: err_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  475|      1|    err_cleanup();
  476|       |
  477|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: CRYPTO_secure_malloc_done()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  478|      1|    CRYPTO_secure_malloc_done();
  479|       |
  480|      1|#ifndef OPENSSL_NO_CMP
  481|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: OSSL_CMP_log_close()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  482|      1|    OSSL_CMP_log_close();
  483|      1|#endif
  484|       |
  485|      1|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_trace_cleanup()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  486|      1|    ossl_trace_cleanup();
  487|       |
  488|      1|    base_inited = 0;
  489|      1|}
OPENSSL_init_crypto:
  497|  25.0M|{
  498|  25.0M|    uint64_t tmp;
  499|  25.0M|    int aloaddone = 0;
  500|       |
  501|       |    /* Applications depend on 0 being returned when cleanup was already done */
  502|  25.0M|    if (ossl_unlikely(stopped)) {
  ------------------
  |  |   23|  25.0M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 25.0M]
  |  |  ------------------
  ------------------
  503|      0|        if (!(opts & OPENSSL_INIT_BASE_ONLY))
  ------------------
  |  |   31|      0|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (503:13): [True: 0, False: 0]
  ------------------
  504|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  505|      0|        return 0;
  506|      0|    }
  507|       |
  508|       |    /*
  509|       |     * We ignore failures from this function. It is probably because we are
  510|       |     * on a platform that doesn't support lockless atomic loads (we may not
  511|       |     * have created optsdone_lock yet so we can't use it). This is just an
  512|       |     * optimisation to skip the full checks in this function if we don't need
  513|       |     * to, so we carry on regardless in the event of failure.
  514|       |     *
  515|       |     * There could be a race here with other threads, so that optsdone has not
  516|       |     * been updated yet, even though the options have in fact been initialised.
  517|       |     * This doesn't matter - it just means we will run the full function
  518|       |     * unnecessarily - but all the critical code is contained in RUN_ONCE
  519|       |     * functions anyway so we are safe.
  520|       |     */
  521|  25.0M|    if (ossl_likely(CRYPTO_atomic_load(&optsdone, &tmp, NULL))) {
  ------------------
  |  |   22|  25.0M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 25.0M, False: 0]
  |  |  ------------------
  ------------------
  522|  25.0M|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (522:13): [True: 3.86M, False: 21.2M]
  ------------------
  523|  3.86M|            return 1;
  524|  21.2M|        aloaddone = 1;
  525|  21.2M|    }
  526|       |
  527|       |    /*
  528|       |     * At some point we should look at this function with a view to moving
  529|       |     * most/all of this into OSSL_LIB_CTX.
  530|       |     *
  531|       |     * When the caller specifies OPENSSL_INIT_BASE_ONLY, that should be the
  532|       |     * *only* option specified.  With that option we return immediately after
  533|       |     * doing the requested limited initialization.  Note that
  534|       |     * err_shelve_state() called by us via ossl_init_load_crypto_nodelete()
  535|       |     * re-enters OPENSSL_init_crypto() with OPENSSL_INIT_BASE_ONLY, but with
  536|       |     * base already initialized this is a harmless NOOP.
  537|       |     *
  538|       |     * If we remain the only caller of err_shelve_state() the recursion should
  539|       |     * perhaps be removed, but if in doubt, it can be left in place.
  540|       |     */
  541|  21.2M|    if (ossl_unlikely(!RUN_ONCE(&base, ossl_init_base)))
  ------------------
  |  |   23|  42.4M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 21.2M]
  |  |  |  Branch (23:46): [True: 21.2M, False: 0]
  |  |  ------------------
  ------------------
  542|      0|        return 0;
  543|       |
  544|  21.2M|    if (opts & OPENSSL_INIT_BASE_ONLY)
  ------------------
  |  |   31|  21.2M|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (544:9): [True: 21.2M, False: 3]
  ------------------
  545|  21.2M|        return 1;
  546|       |
  547|       |    /*
  548|       |     * optsdone_lock should definitely be set up now, so we can now repeat the
  549|       |     * same check from above but be sure that it will work even on platforms
  550|       |     * without lockless CRYPTO_atomic_load
  551|       |     */
  552|      3|    if (!aloaddone) {
  ------------------
  |  Branch (552:9): [True: 0, False: 3]
  ------------------
  553|      0|        if (!CRYPTO_atomic_load(&optsdone, &tmp, optsdone_lock))
  ------------------
  |  Branch (553:13): [True: 0, False: 0]
  ------------------
  554|      0|            return 0;
  555|      0|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (555:13): [True: 0, False: 0]
  ------------------
  556|      0|            return 1;
  557|      0|    }
  558|       |
  559|       |    /*
  560|       |     * Now we don't always set up exit handlers, the INIT_BASE_ONLY calls
  561|       |     * should not have the side-effect of setting up exit handlers, and
  562|       |     * therefore, this code block is below the INIT_BASE_ONLY-conditioned early
  563|       |     * return above.
  564|       |     */
  565|      3|    if ((opts & OPENSSL_INIT_NO_ATEXIT) != 0) {
  ------------------
  |  |  523|      3|#define OPENSSL_INIT_NO_ATEXIT 0x00080000L
  ------------------
  |  Branch (565:9): [True: 0, False: 3]
  ------------------
  566|      0|        if (!RUN_ONCE_ALT(&register_atexit, ossl_init_no_register_atexit,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (566:13): [True: 0, False: 0]
  ------------------
  567|      0|                ossl_init_register_atexit))
  568|      0|            return 0;
  569|      3|    } else if (!RUN_ONCE(&register_atexit, ossl_init_register_atexit)) {
  ------------------
  |  |  130|      3|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (569:16): [True: 0, False: 3]
  ------------------
  570|      0|        return 0;
  571|      0|    }
  572|       |
  573|      3|    if (!RUN_ONCE(&load_crypto_nodelete, ossl_init_load_crypto_nodelete))
  ------------------
  |  |  130|      3|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (573:9): [True: 0, False: 3]
  ------------------
  574|      0|        return 0;
  575|       |
  576|      3|    if ((opts & OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  504|      3|#define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
  ------------------
  |  Branch (576:9): [True: 0, False: 3]
  ------------------
  577|      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 (577:12): [True: 0, False: 0]
  ------------------
  578|      3|            ossl_init_no_load_crypto_strings,
  579|      3|            ossl_init_load_crypto_strings))
  580|      0|        return 0;
  581|       |
  582|      3|    if ((opts & OPENSSL_INIT_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  505|      3|#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
  ------------------
  |  Branch (582:9): [True: 1, False: 2]
  ------------------
  583|      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 (583:12): [True: 0, False: 1]
  ------------------
  584|      0|        return 0;
  585|       |
  586|      3|    if ((opts & OPENSSL_INIT_NO_LOAD_SSL_STRINGS)
  ------------------
  |  | 2821|      3|#define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L
  ------------------
  |  Branch (586:9): [True: 0, False: 3]
  ------------------
  587|      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 (587:12): [True: 0, False: 0]
  ------------------
  588|      3|            ossl_init_load_ssl_strings))
  589|      0|        return 0;
  590|       |
  591|      3|    if ((opts & OPENSSL_INIT_LOAD_SSL_STRINGS)
  ------------------
  |  | 2822|      3|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (591:9): [True: 1, False: 2]
  ------------------
  592|      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 (592:12): [True: 0, False: 1]
  ------------------
  593|      0|        return 0;
  594|       |
  595|      3|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_CIPHERS)
  ------------------
  |  |  508|      3|#define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L
  ------------------
  |  Branch (595:9): [True: 0, False: 3]
  ------------------
  596|      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 (596:12): [True: 0, False: 0]
  ------------------
  597|      3|            ossl_init_add_all_ciphers))
  598|      0|        return 0;
  599|       |
  600|      3|    if ((opts & OPENSSL_INIT_ADD_ALL_CIPHERS)
  ------------------
  |  |  506|      3|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
  |  Branch (600:9): [True: 2, False: 1]
  ------------------
  601|      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 (601:12): [True: 0, False: 2]
  ------------------
  602|      0|        return 0;
  603|       |
  604|      3|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_DIGESTS)
  ------------------
  |  |  509|      3|#define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L
  ------------------
  |  Branch (604:9): [True: 0, False: 3]
  ------------------
  605|      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 (605:12): [True: 0, False: 0]
  ------------------
  606|      3|            ossl_init_add_all_digests))
  607|      0|        return 0;
  608|       |
  609|      3|    if ((opts & OPENSSL_INIT_ADD_ALL_DIGESTS)
  ------------------
  |  |  507|      3|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  |  Branch (609:9): [True: 2, False: 1]
  ------------------
  610|      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 (610:12): [True: 0, False: 2]
  ------------------
  611|      0|        return 0;
  612|       |
  613|      3|    if ((opts & OPENSSL_INIT_ATFORK)
  ------------------
  |  |  521|      3|#define OPENSSL_INIT_ATFORK 0x00020000L
  ------------------
  |  Branch (613:9): [True: 0, False: 3]
  ------------------
  614|      0|        && !openssl_init_fork_handlers())
  ------------------
  |  Branch (614:12): [True: 0, False: 0]
  ------------------
  615|      0|        return 0;
  616|       |
  617|      3|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG)
  ------------------
  |  |  511|      3|#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
  ------------------
  |  Branch (617:9): [True: 0, False: 3]
  ------------------
  618|      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 (618:12): [True: 0, False: 0]
  ------------------
  619|      0|        return 0;
  620|       |
  621|      3|    if (opts & OPENSSL_INIT_LOAD_CONFIG) {
  ------------------
  |  |  510|      3|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (621:9): [True: 2, False: 1]
  ------------------
  622|      2|        int loading = CRYPTO_THREAD_get_local(&in_init_config_local) != NULL;
  623|       |
  624|       |        /* If called recursively from OBJ_ calls, just skip it. */
  625|      2|        if (!loading) {
  ------------------
  |  Branch (625:13): [True: 1, False: 1]
  ------------------
  626|      1|            int ret;
  627|       |
  628|      1|            if (!CRYPTO_THREAD_set_local(&in_init_config_local, (void *)-1))
  ------------------
  |  Branch (628:17): [True: 0, False: 1]
  ------------------
  629|      0|                return 0;
  630|      1|            if (settings == NULL) {
  ------------------
  |  Branch (630:17): [True: 1, False: 0]
  ------------------
  631|      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]
  |  |  ------------------
  ------------------
  632|      1|            } else {
  633|      0|                if (!CRYPTO_THREAD_write_lock(init_lock))
  ------------------
  |  Branch (633:21): [True: 0, False: 0]
  ------------------
  634|      0|                    return 0;
  635|      0|                conf_settings = settings;
  636|      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]
  |  |  ------------------
  ------------------
  637|      0|                    ossl_init_config);
  638|      0|                conf_settings = NULL;
  639|      0|                CRYPTO_THREAD_unlock(init_lock);
  640|      0|            }
  641|       |
  642|      1|            if (ret <= 0)
  ------------------
  |  Branch (642:17): [True: 0, False: 1]
  ------------------
  643|      0|                return 0;
  644|      1|        }
  645|      2|    }
  646|       |
  647|      3|    if ((opts & OPENSSL_INIT_ASYNC)
  ------------------
  |  |  512|      3|#define OPENSSL_INIT_ASYNC 0x00000100L
  ------------------
  |  Branch (647:9): [True: 0, False: 3]
  ------------------
  648|      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 (648:12): [True: 0, False: 0]
  ------------------
  649|      0|        return 0;
  650|       |
  651|      3|#ifndef OPENSSL_NO_ENGINE
  652|      3|    if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
  ------------------
  |  |  515|      3|#define OPENSSL_INIT_ENGINE_OPENSSL 0x00000800L
  ------------------
  |  Branch (652:9): [True: 0, False: 3]
  ------------------
  653|      0|        && !RUN_ONCE(&engine_openssl, ossl_init_engine_openssl))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (653:12): [True: 0, False: 0]
  ------------------
  654|      0|        return 0;
  655|      3|#ifndef OPENSSL_NO_RDRAND
  656|      3|    if ((opts & OPENSSL_INIT_ENGINE_RDRAND)
  ------------------
  |  |  513|      3|#define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L
  ------------------
  |  Branch (656:9): [True: 1, False: 2]
  ------------------
  657|      1|        && !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (657:12): [True: 0, False: 1]
  ------------------
  658|      0|        return 0;
  659|      3|#endif
  660|      3|    if ((opts & OPENSSL_INIT_ENGINE_DYNAMIC)
  ------------------
  |  |  514|      3|#define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L
  ------------------
  |  Branch (660:9): [True: 1, False: 2]
  ------------------
  661|      1|        && !RUN_ONCE(&engine_dynamic, ossl_init_engine_dynamic))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (661:12): [True: 0, False: 1]
  ------------------
  662|      0|        return 0;
  663|      3|#ifndef OPENSSL_NO_STATIC_ENGINE
  664|       |#ifndef OPENSSL_NO_DEVCRYPTOENG
  665|       |    if ((opts & OPENSSL_INIT_ENGINE_CRYPTODEV)
  666|       |        && !RUN_ONCE(&engine_devcrypto, ossl_init_engine_devcrypto))
  667|       |        return 0;
  668|       |#endif
  669|      3|#if !defined(OPENSSL_NO_PADLOCKENG)
  670|      3|    if ((opts & OPENSSL_INIT_ENGINE_PADLOCK)
  ------------------
  |  |  518|      3|#define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L
  ------------------
  |  Branch (670:9): [True: 1, False: 2]
  ------------------
  671|      1|        && !RUN_ONCE(&engine_padlock, ossl_init_engine_padlock))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (671:12): [True: 0, False: 1]
  ------------------
  672|      0|        return 0;
  673|      3|#endif
  674|       |#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
  675|       |    if ((opts & OPENSSL_INIT_ENGINE_CAPI)
  676|       |        && !RUN_ONCE(&engine_capi, ossl_init_engine_capi))
  677|       |        return 0;
  678|       |#endif
  679|      3|#if !defined(OPENSSL_NO_AFALGENG)
  680|      3|    if ((opts & OPENSSL_INIT_ENGINE_AFALG)
  ------------------
  |  |  519|      3|#define OPENSSL_INIT_ENGINE_AFALG 0x00008000L
  ------------------
  |  Branch (680:9): [True: 0, False: 3]
  ------------------
  681|      0|        && !RUN_ONCE(&engine_afalg, ossl_init_engine_afalg))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (681:12): [True: 0, False: 0]
  ------------------
  682|      0|        return 0;
  683|      3|#endif
  684|      3|#endif
  685|      3|    if (opts & (OPENSSL_INIT_ENGINE_ALL_BUILTIN | OPENSSL_INIT_ENGINE_OPENSSL | OPENSSL_INIT_ENGINE_AFALG)) {
  ------------------
  |  |  535|      3|    (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  513|      3|#define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L
  |  |  ------------------
  |  |                   (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  514|      3|#define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L
  |  |  ------------------
  |  |  536|      3|        | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  516|      3|#define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L
  |  |  ------------------
  |  |                       | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  517|      3|#define OPENSSL_INIT_ENGINE_CAPI 0x00002000L
  |  |  ------------------
  |  |                       | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  518|      3|#define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L
  |  |  ------------------
  ------------------
                  if (opts & (OPENSSL_INIT_ENGINE_ALL_BUILTIN | OPENSSL_INIT_ENGINE_OPENSSL | OPENSSL_INIT_ENGINE_AFALG)) {
  ------------------
  |  |  515|      3|#define OPENSSL_INIT_ENGINE_OPENSSL 0x00000800L
  ------------------
                  if (opts & (OPENSSL_INIT_ENGINE_ALL_BUILTIN | OPENSSL_INIT_ENGINE_OPENSSL | OPENSSL_INIT_ENGINE_AFALG)) {
  ------------------
  |  |  519|      3|#define OPENSSL_INIT_ENGINE_AFALG 0x00008000L
  ------------------
  |  Branch (685:9): [True: 1, False: 2]
  ------------------
  686|      1|        ENGINE_register_all_complete();
  687|      1|    }
  688|      3|#endif
  689|       |
  690|      3|    if (!CRYPTO_atomic_or(&optsdone, opts, &tmp, optsdone_lock))
  ------------------
  |  Branch (690:9): [True: 0, False: 3]
  ------------------
  691|      0|        return 0;
  692|       |
  693|      3|    return 1;
  694|      3|}
init.c:ossl_init_base:
   58|      1|{
   59|       |    /* no need to init trace */
   60|       |
   61|      1|    OSSL_TRACE(INIT, "ossl_init_base: setting up stop handlers\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   62|       |#ifndef OPENSSL_NO_CRYPTO_MDEBUG
   63|       |    ossl_malloc_setup_failures();
   64|       |#endif
   65|       |
   66|      1|    if ((optsdone_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (66:9): [True: 0, False: 1]
  ------------------
   67|      1|        || (init_lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (67:12): [True: 0, False: 1]
  ------------------
   68|      0|        goto err;
   69|       |
   70|      1|    OPENSSL_cpuid_setup();
   71|       |
   72|      1|    if (!ossl_init_thread())
  ------------------
  |  Branch (72:9): [True: 0, False: 1]
  ------------------
   73|      0|        goto err;
   74|       |
   75|      1|    if (!CRYPTO_THREAD_init_local(&in_init_config_local, NULL))
  ------------------
  |  Branch (75:9): [True: 0, False: 1]
  ------------------
   76|      0|        goto err;
   77|       |
   78|      1|    base_inited = 1;
   79|      1|    return 1;
   80|       |
   81|      0|err:
   82|      0|    OSSL_TRACE(INIT, "ossl_init_base failed!\n");
  ------------------
  |  |  290|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   83|      0|    CRYPTO_THREAD_lock_free(optsdone_lock);
   84|      0|    optsdone_lock = NULL;
   85|      0|    CRYPTO_THREAD_lock_free(init_lock);
   86|      0|    init_lock = NULL;
   87|       |
   88|      0|    return 0;
   89|      1|}
init.c:ossl_init_register_atexit:
  101|      1|{
  102|      1|#ifndef OPENSSL_NO_ATEXIT
  103|       |#ifdef OPENSSL_INIT_DEBUG
  104|       |    fprintf(stderr, "OPENSSL_INIT: ossl_init_register_atexit()\n");
  105|       |#endif
  106|      1|#ifndef OPENSSL_SYS_UEFI
  107|       |#if defined(_WIN32) && !defined(__BORLANDC__)
  108|       |    /* We use _onexit() in preference because it gets called on DLL unload */
  109|       |    if (_onexit(win32atexit) == NULL)
  110|       |        return 0;
  111|       |#else
  112|      1|    if (atexit(OPENSSL_cleanup) != 0)
  ------------------
  |  Branch (112:9): [True: 0, False: 1]
  ------------------
  113|      0|        return 0;
  114|      1|#endif
  115|      1|#endif
  116|      1|#endif
  117|       |
  118|      1|    return 1;
  119|      1|}
init.c:ossl_init_load_crypto_nodelete:
  133|      1|{
  134|      1|    OSSL_TRACE(INIT, "ossl_init_load_crypto_nodelete()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  135|       |
  136|       |#if !defined(OPENSSL_USE_NODELETE) \
  137|       |    && !defined(OPENSSL_NO_PINSHARED)
  138|       |#if defined(DSO_WIN32) && !defined(_WIN32_WCE)
  139|       |    {
  140|       |        HMODULE handle = NULL;
  141|       |        BOOL ret;
  142|       |
  143|       |        /* We don't use the DSO route for WIN32 because there is a better way */
  144|       |        ret = GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
  145|       |                | GET_MODULE_HANDLE_EX_FLAG_PIN,
  146|       |            (void *)&base_inited, &handle);
  147|       |
  148|       |        OSSL_TRACE1(INIT,
  149|       |            "ossl_init_load_crypto_nodelete: "
  150|       |            "obtained DSO reference? %s\n",
  151|       |            (ret == TRUE ? "No!" : "Yes."));
  152|       |        return (ret == TRUE) ? 1 : 0;
  153|       |    }
  154|       |#elif !defined(DSO_NONE)
  155|       |    /*
  156|       |     * Deliberately leak a reference to ourselves. This will force the library
  157|       |     * to remain loaded until the atexit() handler is run at process exit.
  158|       |     */
  159|       |    {
  160|       |        DSO *dso;
  161|       |        void *err;
  162|       |
  163|       |        if (!err_shelve_state(&err))
  164|       |            return 0;
  165|       |
  166|       |        dso = DSO_dsobyaddr(&base_inited, DSO_FLAG_NO_UNLOAD_ON_FREE);
  167|       |        /*
  168|       |         * In case of No!, it is uncertain our exit()-handlers can still be
  169|       |         * called. After dlclose() the whole library might have been unloaded
  170|       |         * already.
  171|       |         */
  172|       |        OSSL_TRACE1(INIT, "obtained DSO reference? %s\n",
  173|       |            (dso == NULL ? "No!" : "Yes."));
  174|       |        DSO_free(dso);
  175|       |        err_unshelve_state(err);
  176|       |    }
  177|       |#endif
  178|       |#endif
  179|       |
  180|      1|    return 1;
  181|      1|}
init.c:ossl_init_load_crypto_strings:
  186|      1|{
  187|      1|    int ret = 1;
  188|       |    /*
  189|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
  190|       |     * pulling in all the error strings during static linking
  191|       |     */
  192|      1|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
  193|      1|    void *err;
  194|       |
  195|      1|    if (!err_shelve_state(&err))
  ------------------
  |  Branch (195:9): [True: 0, False: 1]
  ------------------
  196|      0|        return 0;
  197|       |
  198|      1|    OSSL_TRACE(INIT, "ossl_err_load_crypto_strings()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  199|      1|    ret = ossl_err_load_crypto_strings();
  200|       |
  201|      1|    err_unshelve_state(err);
  202|      1|#endif
  203|      1|    return ret;
  204|      1|}
init.c:ossl_init_load_ssl_strings:
  216|      1|{
  217|       |    /*
  218|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
  219|       |     * pulling in all the error strings during static linking
  220|       |     */
  221|      1|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
  222|      1|    OSSL_TRACE(INIT, "ossl_init_load_ssl_strings: ossl_err_load_SSL_strings()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  223|      1|    ossl_err_load_SSL_strings();
  224|      1|#endif
  225|      1|    return 1;
  226|      1|}
init.c:ossl_init_add_all_ciphers:
  237|      1|{
  238|       |    /*
  239|       |     * OPENSSL_NO_AUTOALGINIT is provided here to prevent at compile time
  240|       |     * pulling in all the ciphers during static linking
  241|       |     */
  242|      1|#ifndef OPENSSL_NO_AUTOALGINIT
  243|      1|    OSSL_TRACE(INIT, "openssl_add_all_ciphers_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  244|      1|    openssl_add_all_ciphers_int();
  245|      1|#endif
  246|      1|    return 1;
  247|      1|}
init.c:ossl_init_add_all_digests:
  258|      1|{
  259|       |    /*
  260|       |     * OPENSSL_NO_AUTOALGINIT is provided here to prevent at compile time
  261|       |     * pulling in all the ciphers during static linking
  262|       |     */
  263|      1|#ifndef OPENSSL_NO_AUTOALGINIT
  264|      1|    OSSL_TRACE(INIT, "openssl_add_all_digests()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  265|      1|    openssl_add_all_digests_int();
  266|      1|#endif
  267|      1|    return 1;
  268|      1|}
init.c:ossl_init_config:
  280|      1|{
  281|      1|    int ret = ossl_config_int(NULL);
  282|       |
  283|      1|    return ret;
  284|      1|}
init.c:ossl_init_engine_rdrand:
  321|      1|{
  322|      1|    OSSL_TRACE(INIT, "engine_load_rdrand_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  323|      1|    engine_load_rdrand_int();
  324|      1|    return 1;
  325|      1|}
init.c:ossl_init_engine_dynamic:
  329|      1|{
  330|      1|    OSSL_TRACE(INIT, "engine_load_dynamic_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  331|      1|    engine_load_dynamic_int();
  332|      1|    return 1;
  333|      1|}
init.c:ossl_init_engine_padlock:
  347|      1|{
  348|      1|    OSSL_TRACE(INIT, "engine_load_padlock_int()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  349|      1|    engine_load_padlock_int();
  350|      1|    return 1;
  351|      1|}

ossl_init_thread:
  266|      5|{
  267|      5|    if (CRYPTO_THREAD_compare_id(recursion_guard,
  ------------------
  |  Branch (267:9): [True: 1, False: 4]
  ------------------
  268|      5|            CRYPTO_THREAD_get_current_id()))
  269|      1|        return 1;
  270|      4|    if (!RUN_ONCE(&ossl_init_thread_runonce, ossl_init_thread_once))
  ------------------
  |  |  130|      4|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 4, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (270:9): [True: 0, False: 4]
  ------------------
  271|      0|        return 0;
  272|      4|    return 1;
  273|      4|}
ossl_cleanup_thread:
  276|      1|{
  277|       |    init_thread_deregister(NULL, 1);
  278|      1|    CRYPTO_THREAD_cleanup_local(&destructor_key.value);
  279|      1|    destructor_key.sane = -1;
  280|      1|}
OPENSSL_thread_stop:
  294|      1|{
  295|      1|    if (destructor_key.sane != -1) {
  ------------------
  |  Branch (295:9): [True: 1, False: 0]
  ------------------
  296|      1|        THREAD_EVENT_HANDLER **hands = clear_thread_local(NULL);
  297|       |
  298|      1|        init_thread_stop(NULL, hands);
  299|       |
  300|      1|        init_thread_remove_handlers(hands);
  301|      1|        OPENSSL_free(hands);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  302|       |
  303|      1|        CRYPTO_THREAD_clean_local();
  304|      1|    }
  305|      1|}
ossl_ctx_thread_stop:
  308|    785|{
  309|    785|    if (destructor_key.sane != -1) {
  ------------------
  |  Branch (309:9): [True: 785, False: 0]
  ------------------
  310|    785|        THREAD_EVENT_HANDLER **hands = fetch_thread_local(ctx);
  311|       |
  312|    785|        init_thread_stop(ctx, hands);
  313|    785|    }
  314|    785|}
ossl_init_thread_start:
  419|    552|{
  420|    552|    THREAD_EVENT_HANDLER **hands;
  421|    552|    THREAD_EVENT_HANDLER *hand;
  422|    552|    OSSL_LIB_CTX *ctx = NULL;
  423|       |#ifdef FIPS_MODULE
  424|       |    /*
  425|       |     * In FIPS mode the list of THREAD_EVENT_HANDLERs is unique per combination
  426|       |     * of OSSL_LIB_CTX and thread. This is because in FIPS mode each
  427|       |     * OSSL_LIB_CTX gets informed about thread stop events individually.
  428|       |     */
  429|       |
  430|       |    ctx = arg;
  431|       |#endif
  432|       |
  433|    552|    hands = alloc_thread_local(ctx);
  434|       |
  435|    552|    if (hands == NULL)
  ------------------
  |  Branch (435:9): [True: 0, False: 552]
  ------------------
  436|      0|        return 0;
  437|       |
  438|       |#ifdef FIPS_MODULE
  439|       |    if (*hands == NULL) {
  440|       |        /*
  441|       |         * We've not yet registered any handlers for this thread. We need to get
  442|       |         * libcrypto to tell us about later thread stop events. c_thread_start
  443|       |         * is a callback to libcrypto defined in fipsprov.c
  444|       |         */
  445|       |        if (!ossl_thread_register_fips(ctx))
  446|       |            return 0;
  447|       |    }
  448|       |#endif
  449|       |
  450|    552|    hand = OPENSSL_malloc(sizeof(*hand));
  ------------------
  |  |  106|    552|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  451|    552|    if (hand == NULL)
  ------------------
  |  Branch (451:9): [True: 0, False: 552]
  ------------------
  452|      0|        return 0;
  453|       |
  454|    552|    hand->handfn = handfn;
  455|    552|    hand->arg = arg;
  456|    552|#ifndef FIPS_MODULE
  457|    552|    hand->index = index;
  458|    552|#endif
  459|    552|    hand->next = *hands;
  460|    552|    *hands = hand;
  461|       |
  462|    552|    return 1;
  463|    552|}
ossl_init_thread_deregister:
  519|  1.84k|{
  520|  1.84k|    return init_thread_deregister(index, 0);
  521|  1.84k|}
initthread.c:ossl_init_thread_once:
  250|      1|{
  251|       |    /* CRYPTO_THREAD_init_local() can call ossl_init_threads() again */
  252|      1|    recursion_guard = CRYPTO_THREAD_get_current_id();
  253|      1|    if (!CRYPTO_THREAD_init_local(&destructor_key.value,
  ------------------
  |  Branch (253:9): [True: 0, False: 1]
  ------------------
  254|      1|            init_thread_destructor))
  255|      0|        return 0;
  256|       |
  257|       |#if defined(OPENSSL_SYS_TANDEM)
  258|       |    memset(&recursion_guard, 0, sizeof(recursion_guard));
  259|       |#else
  260|      1|    recursion_guard = (CRYPTO_THREAD_ID)0;
  261|      1|#endif
  262|      1|    return 1;
  263|      1|}
initthread.c:clear_thread_local:
  166|      1|{
  167|      1|    return manage_thread_local(ctx, 0, 0);
  168|      1|}
initthread.c:manage_thread_local:
  137|  1.33k|{
  138|  1.33k|    THREAD_EVENT_HANDLER **hands = get_thread_event_handler(ctx);
  139|       |
  140|  1.33k|    if (alloc) {
  ------------------
  |  Branch (140:9): [True: 552, False: 786]
  ------------------
  141|    552|        if (hands == NULL) {
  ------------------
  |  Branch (141:13): [True: 1, False: 551]
  ------------------
  142|       |
  143|      1|            if ((hands = OPENSSL_zalloc(sizeof(*hands))) == NULL)
  ------------------
  |  |  108|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|      0|                return NULL;
  155|      0|            }
  156|      1|#endif
  157|      1|        }
  158|    786|    } else if (!keep) {
  ------------------
  |  Branch (158:16): [True: 1, False: 785]
  ------------------
  159|      1|        set_thread_event_handler(ctx, NULL);
  160|      1|    }
  161|       |
  162|  1.33k|    return hands;
  163|  1.33k|}
initthread.c:get_thread_event_handler:
  114|  1.33k|{
  115|       |#ifdef FIPS_MODULE
  116|       |    return CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_TEVENT_KEY, ctx);
  117|       |#else
  118|  1.33k|    if (destructor_key.sane != -1)
  ------------------
  |  Branch (118:9): [True: 1.33k, False: 0]
  ------------------
  119|  1.33k|        return CRYPTO_THREAD_get_local(&destructor_key.value);
  120|      0|    return NULL;
  121|  1.33k|#endif
  122|  1.33k|}
initthread.c:set_thread_event_handler:
  125|      2|{
  126|       |#ifdef FIPS_MODULE
  127|       |    return CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_TEVENT_KEY, ctx, hands);
  128|       |#else
  129|      2|    if (destructor_key.sane != -1)
  ------------------
  |  Branch (129:9): [True: 2, False: 0]
  ------------------
  130|      2|        return CRYPTO_THREAD_set_local(&destructor_key.value, hands);
  131|      0|    return 0;
  132|      2|#endif
  133|      2|}
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.63k|{
   80|  2.63k|    if (!RUN_ONCE(&tevent_register_runonce, create_global_tevent_register))
  ------------------
  |  |  130|  2.63k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2.63k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (80:9): [True: 0, False: 2.63k]
  ------------------
   81|      0|        return NULL;
   82|  2.63k|    return glob_tevent_reg;
   83|  2.63k|}
initthread.c:create_global_tevent_register:
   60|      1|{
   61|      1|    glob_tevent_reg = OPENSSL_zalloc(sizeof(*glob_tevent_reg));
  ------------------
  |  |  108|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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:init_thread_remove_handlers:
  209|      1|{
  210|      1|    GLOBAL_TEVENT_REGISTER *gtr;
  211|      1|    int i;
  212|       |
  213|      1|    gtr = get_global_tevent_register();
  214|      1|    if (gtr == NULL)
  ------------------
  |  Branch (214:9): [True: 0, False: 1]
  ------------------
  215|      0|        return;
  216|      1|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (216:9): [True: 0, False: 1]
  ------------------
  217|      0|        return;
  218|      1|    for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
  ------------------
  |  Branch (218:17): [True: 1, False: 0]
  ------------------
  219|      1|        THREAD_EVENT_HANDLER **hands
  220|      1|            = sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
  221|       |
  222|      1|        if (hands == handsin) {
  ------------------
  |  Branch (222:13): [True: 1, False: 0]
  ------------------
  223|      1|            sk_THREAD_EVENT_HANDLER_PTR_delete(gtr->skhands, i);
  224|      1|            CRYPTO_THREAD_unlock(gtr->lock);
  225|      1|            return;
  226|      1|        }
  227|      1|    }
  228|      0|    CRYPTO_THREAD_unlock(gtr->lock);
  229|      0|    return;
  230|      1|}
initthread.c:fetch_thread_local:
  171|    785|{
  172|    785|    return manage_thread_local(ctx, 0, 1);
  173|    785|}
initthread.c:init_thread_stop:
  375|    786|{
  376|    786|    THREAD_EVENT_HANDLER *curr, *prev = NULL, *tmp;
  377|    786|#ifndef FIPS_MODULE
  378|    786|    GLOBAL_TEVENT_REGISTER *gtr;
  379|    786|#endif
  380|       |
  381|       |    /* Can't do much about this */
  382|    786|    if (hands == NULL)
  ------------------
  |  Branch (382:9): [True: 1, False: 785]
  ------------------
  383|      1|        return;
  384|       |
  385|    785|#ifndef FIPS_MODULE
  386|    785|    gtr = get_global_tevent_register();
  387|    785|    if (gtr == NULL)
  ------------------
  |  Branch (387:9): [True: 0, False: 785]
  ------------------
  388|      0|        return;
  389|       |
  390|    785|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (390:9): [True: 0, False: 785]
  ------------------
  391|      0|        return;
  392|    785|#endif
  393|       |
  394|    785|    curr = *hands;
  395|  2.90k|    while (curr != NULL) {
  ------------------
  |  Branch (395:12): [True: 2.12k, False: 785]
  ------------------
  396|  2.12k|        if (arg != NULL && curr->arg != arg) {
  ------------------
  |  Branch (396:13): [True: 2.11k, False: 2]
  |  Branch (396:28): [True: 1.56k, False: 550]
  ------------------
  397|  1.56k|            prev = curr;
  398|  1.56k|            curr = curr->next;
  399|  1.56k|            continue;
  400|  1.56k|        }
  401|    552|        curr->handfn(curr->arg);
  402|    552|        if (prev == NULL)
  ------------------
  |  Branch (402:13): [True: 552, False: 0]
  ------------------
  403|    552|            *hands = curr->next;
  404|      0|        else
  405|      0|            prev->next = curr->next;
  406|       |
  407|    552|        tmp = curr;
  408|    552|        curr = curr->next;
  409|       |
  410|    552|        OPENSSL_free(tmp);
  ------------------
  |  |  131|    552|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  411|    552|    }
  412|    785|#ifndef FIPS_MODULE
  413|    785|    CRYPTO_THREAD_unlock(gtr->lock);
  414|    785|#endif
  415|    785|}
initthread.c:alloc_thread_local:
  176|    552|{
  177|    552|    return manage_thread_local(ctx, 1, 0);
  178|    552|}
initthread.c:init_thread_deregister:
  467|  1.85k|{
  468|  1.85k|    GLOBAL_TEVENT_REGISTER *gtr;
  469|  1.85k|    int i;
  470|       |
  471|  1.85k|    gtr = get_global_tevent_register();
  472|  1.85k|    if (gtr == NULL)
  ------------------
  |  Branch (472:9): [True: 0, False: 1.85k]
  ------------------
  473|      0|        return 0;
  474|  1.85k|    if (!all) {
  ------------------
  |  Branch (474:9): [True: 1.84k, False: 1]
  ------------------
  475|  1.84k|        if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (475:13): [True: 0, False: 1.84k]
  ------------------
  476|      0|            return 0;
  477|  1.84k|    } else {
  478|      1|        glob_tevent_reg = NULL;
  479|      1|    }
  480|  3.69k|    for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
  ------------------
  |  Branch (480:17): [True: 1.84k, False: 1.85k]
  ------------------
  481|  1.84k|        THREAD_EVENT_HANDLER **hands
  482|  1.84k|            = sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
  483|  1.84k|        THREAD_EVENT_HANDLER *curr = NULL, *prev = NULL, *tmp;
  484|       |
  485|  1.84k|        if (hands == NULL) {
  ------------------
  |  Branch (485:13): [True: 0, False: 1.84k]
  ------------------
  486|      0|            if (!all)
  ------------------
  |  Branch (486:17): [True: 0, False: 0]
  ------------------
  487|      0|                CRYPTO_THREAD_unlock(gtr->lock);
  488|      0|            return 0;
  489|      0|        }
  490|  1.84k|        curr = *hands;
  491|  5.54k|        while (curr != NULL) {
  ------------------
  |  Branch (491:16): [True: 3.69k, False: 1.84k]
  ------------------
  492|  3.69k|            if (all || curr->index == index) {
  ------------------
  |  Branch (492:17): [True: 0, False: 3.69k]
  |  Branch (492:24): [True: 0, False: 3.69k]
  ------------------
  493|      0|                if (prev != NULL)
  ------------------
  |  Branch (493:21): [True: 0, False: 0]
  ------------------
  494|      0|                    prev->next = curr->next;
  495|      0|                else
  496|      0|                    *hands = curr->next;
  497|      0|                tmp = curr;
  498|      0|                curr = curr->next;
  499|      0|                OPENSSL_free(tmp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  500|      0|                continue;
  501|      0|            }
  502|  3.69k|            prev = curr;
  503|  3.69k|            curr = curr->next;
  504|  3.69k|        }
  505|  1.84k|        if (all)
  ------------------
  |  Branch (505:13): [True: 0, False: 1.84k]
  ------------------
  506|      0|            OPENSSL_free(hands);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  507|  1.84k|    }
  508|  1.85k|    if (all) {
  ------------------
  |  Branch (508:9): [True: 1, False: 1.84k]
  ------------------
  509|      1|        CRYPTO_THREAD_lock_free(gtr->lock);
  510|      1|        sk_THREAD_EVENT_HANDLER_PTR_free(gtr->skhands);
  511|      1|        OPENSSL_free(gtr);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  512|  1.84k|    } else {
  513|  1.84k|        CRYPTO_THREAD_unlock(gtr->lock);
  514|  1.84k|    }
  515|  1.85k|    return 1;
  516|  1.85k|}

OPENSSL_LH_set_thunks:
   52|   174k|{
   53|       |
   54|   174k|    if (lh == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 174k]
  ------------------
   55|      0|        return NULL;
   56|   174k|    lh->compw = cw;
   57|   174k|    lh->hashw = hw;
   58|   174k|    lh->daw = daw;
   59|   174k|    lh->daaw = daaw;
   60|   174k|    return lh;
   61|   174k|}
OPENSSL_LH_new:
   64|   174k|{
   65|   174k|    OPENSSL_LHASH *ret;
   66|       |
   67|   174k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  108|   174k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (67:9): [True: 0, False: 174k]
  ------------------
   68|      0|        return NULL;
   69|   174k|    if ((ret->b = OPENSSL_calloc(MIN_NODES, sizeof(*ret->b))) == NULL)
  ------------------
  |  |  112|   174k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (69:9): [True: 0, False: 174k]
  ------------------
   70|      0|        goto err;
   71|   174k|    ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
  ------------------
  |  Branch (71:18): [True: 0, False: 174k]
  ------------------
   72|   174k|    ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
  ------------------
  |  Branch (72:18): [True: 0, False: 174k]
  ------------------
   73|   174k|    ret->num_nodes = MIN_NODES / 2;
  ------------------
  |  |   39|   174k|#define MIN_NODES 16
  ------------------
   74|   174k|    ret->num_alloc_nodes = MIN_NODES;
  ------------------
  |  |   39|   174k|#define MIN_NODES 16
  ------------------
   75|   174k|    ret->pmax = MIN_NODES / 2;
  ------------------
  |  |   39|   174k|#define MIN_NODES 16
  ------------------
   76|   174k|    ret->up_load = UP_LOAD;
  ------------------
  |  |   40|   174k|#define UP_LOAD (2 * LH_LOAD_MULT) /* load times 256 (default 2) */
  |  |  ------------------
  |  |  |  |   92|   174k|#define LH_LOAD_MULT 256
  |  |  ------------------
  ------------------
   77|   174k|    ret->down_load = DOWN_LOAD;
  ------------------
  |  |   41|   174k|#define DOWN_LOAD (LH_LOAD_MULT) /* load times 256 (default 1) */
  |  |  ------------------
  |  |  |  |   92|   174k|#define LH_LOAD_MULT 256
  |  |  ------------------
  ------------------
   78|   174k|    return ret;
   79|       |
   80|      0|err:
   81|      0|    OPENSSL_free(ret->b);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|      0|    OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   83|       |    return NULL;
   84|   174k|}
OPENSSL_LH_free:
   87|   174k|{
   88|   174k|    if (lh == NULL)
  ------------------
  |  Branch (88:9): [True: 1, False: 174k]
  ------------------
   89|      1|        return;
   90|       |
   91|   174k|    OPENSSL_LH_flush(lh);
   92|   174k|    OPENSSL_free(lh->b);
  ------------------
  |  |  131|   174k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|   174k|    OPENSSL_free(lh);
  ------------------
  |  |  131|   174k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|   174k|}
OPENSSL_LH_flush:
   97|   177k|{
   98|   177k|    unsigned int i;
   99|   177k|    OPENSSL_LH_NODE *n, *nn;
  100|       |
  101|   177k|    if (lh == NULL)
  ------------------
  |  Branch (101:9): [True: 0, False: 177k]
  ------------------
  102|      0|        return;
  103|       |
  104|  1.59M|    for (i = 0; i < lh->num_nodes; i++) {
  ------------------
  |  Branch (104:17): [True: 1.42M, False: 177k]
  ------------------
  105|  1.42M|        n = lh->b[i];
  106|  1.45M|        while (n != NULL) {
  ------------------
  |  Branch (106:16): [True: 39.1k, False: 1.42M]
  ------------------
  107|  39.1k|            nn = n->next;
  108|  39.1k|            OPENSSL_free(n);
  ------------------
  |  |  131|  39.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  109|  39.1k|            n = nn;
  110|  39.1k|        }
  111|  1.42M|        lh->b[i] = NULL;
  112|  1.42M|    }
  113|       |
  114|   177k|    lh->num_items = 0;
  115|   177k|}
OPENSSL_LH_insert:
  118|  42.5k|{
  119|  42.5k|    unsigned long hash;
  120|  42.5k|    OPENSSL_LH_NODE *nn, **rn;
  121|  42.5k|    void *ret;
  122|       |
  123|  42.5k|    lh->error = 0;
  124|  42.5k|    if ((lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)) && !expand(lh))
  ------------------
  |  |   92|  42.5k|#define LH_LOAD_MULT 256
  ------------------
  |  Branch (124:9): [True: 1.16k, False: 41.3k]
  |  Branch (124:76): [True: 0, False: 1.16k]
  ------------------
  125|      0|        return NULL; /* 'lh->error++' already done in 'expand' */
  126|       |
  127|  42.5k|    rn = getrn(lh, data, &hash);
  128|       |
  129|  42.5k|    if (*rn == NULL) {
  ------------------
  |  Branch (129:9): [True: 39.4k, False: 3.13k]
  ------------------
  130|  39.4k|        if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
  ------------------
  |  |  106|  39.4k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (130:13): [True: 0, False: 39.4k]
  ------------------
  131|      0|            lh->error++;
  132|      0|            return NULL;
  133|      0|        }
  134|  39.4k|        nn->data = data;
  135|  39.4k|        nn->next = NULL;
  136|  39.4k|        nn->hash = hash;
  137|  39.4k|        *rn = nn;
  138|  39.4k|        ret = NULL;
  139|  39.4k|        lh->num_items++;
  140|  39.4k|    } else { /* replace same key */
  141|  3.13k|        ret = (*rn)->data;
  142|  3.13k|        (*rn)->data = data;
  143|  3.13k|    }
  144|  42.5k|    return ret;
  145|  42.5k|}
OPENSSL_LH_delete:
  148|    242|{
  149|    242|    unsigned long hash;
  150|    242|    OPENSSL_LH_NODE *nn, **rn;
  151|    242|    void *ret;
  152|       |
  153|    242|    lh->error = 0;
  154|    242|    rn = getrn(lh, data, &hash);
  155|       |
  156|    242|    if (*rn == NULL) {
  ------------------
  |  Branch (156:9): [True: 0, False: 242]
  ------------------
  157|      0|        return NULL;
  158|    242|    } else {
  159|    242|        nn = *rn;
  160|    242|        *rn = nn->next;
  161|    242|        ret = nn->data;
  162|    242|        OPENSSL_free(nn);
  ------------------
  |  |  131|    242|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  163|    242|    }
  164|       |
  165|    242|    lh->num_items--;
  166|    242|    if ((lh->num_nodes > MIN_NODES) && (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
  ------------------
  |  |   39|    242|#define MIN_NODES 16
  ------------------
                  if ((lh->num_nodes > MIN_NODES) && (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
  ------------------
  |  |   92|    242|#define LH_LOAD_MULT 256
  ------------------
  |  Branch (166:9): [True: 242, False: 0]
  |  Branch (166:40): [True: 1, False: 241]
  ------------------
  167|      1|        contract(lh);
  168|       |
  169|    242|    return ret;
  170|    242|}
OPENSSL_LH_retrieve:
  173|  2.82M|{
  174|  2.82M|    unsigned long hash;
  175|  2.82M|    OPENSSL_LH_NODE **rn;
  176|       |
  177|  2.82M|    if (lh->error != 0)
  ------------------
  |  Branch (177:9): [True: 0, False: 2.82M]
  ------------------
  178|      0|        lh->error = 0;
  179|       |
  180|  2.82M|    rn = getrn(lh, data, &hash);
  181|       |
  182|  2.82M|    return *rn == NULL ? NULL : (*rn)->data;
  ------------------
  |  Branch (182:12): [True: 872k, False: 1.95M]
  ------------------
  183|  2.82M|}
OPENSSL_LH_doall:
  216|   174k|{
  217|   174k|    if (lh == NULL)
  ------------------
  |  Branch (217:9): [True: 0, False: 174k]
  ------------------
  218|      0|        return;
  219|       |
  220|   174k|    doall_util_fn(lh, 0, lh->daw, func, (OPENSSL_LH_DOALL_FUNCARG)NULL,
  221|   174k|        (OPENSSL_LH_DOALL_FUNCARG_THUNK)NULL, NULL);
  222|   174k|}
OPENSSL_LH_doall_arg_thunk:
  237|  1.26k|{
  238|  1.26k|    doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC_THUNK)NULL,
  239|       |        (OPENSSL_LH_DOALL_FUNC)NULL, fn, daaw, arg);
  240|  1.26k|}
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: 657k, False: 648k]
  ------------------
  367|   657k|        return ret;
  368|       |
  369|   648k|    n = 0x100;
  370|  19.2M|    while (*c) {
  ------------------
  |  Branch (370:12): [True: 18.6M, False: 648k]
  ------------------
  371|  18.6M|        v = n | (*c);
  372|  18.6M|        n += 0x100;
  373|  18.6M|        r = (int)((v >> 2) ^ v) & 0x0f;
  374|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  375|  18.6M|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  376|  18.6M|        ret &= 0xFFFFFFFFL;
  377|  18.6M|        ret ^= v * v;
  378|  18.6M|        c++;
  379|  18.6M|    }
  380|   648k|    return (ret >> 16) ^ ret;
  381|  1.30M|}
ossl_lh_strcasehash:
  398|  2.02M|{
  399|  2.02M|    unsigned long ret = 0;
  400|  2.02M|    long n;
  401|  2.02M|    unsigned long v;
  402|  2.02M|    int r;
  403|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  404|       |    const long int case_adjust = ~0x40;
  405|       |#else
  406|  2.02M|    const long int case_adjust = ~0x20;
  407|  2.02M|#endif
  408|       |
  409|  2.02M|    if (c == NULL || *c == '\0')
  ------------------
  |  Branch (409:9): [True: 0, False: 2.02M]
  |  Branch (409:22): [True: 0, False: 2.02M]
  ------------------
  410|      0|        return ret;
  411|       |
  412|  24.8M|    for (n = 0x100; *c != '\0'; n += 0x100) {
  ------------------
  |  Branch (412:21): [True: 22.8M, False: 2.02M]
  ------------------
  413|  22.8M|        v = n | (case_adjust & *c);
  414|  22.8M|        r = (int)((v >> 2) ^ v) & 0x0f;
  415|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  416|  22.8M|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  417|  22.8M|        ret &= 0xFFFFFFFFL;
  418|  22.8M|        ret ^= v * v;
  419|  22.8M|        c++;
  420|  22.8M|    }
  421|  2.02M|    return (ret >> 16) ^ ret;
  422|  2.02M|}
OPENSSL_LH_num_items:
  425|  1.13k|{
  426|  1.13k|    return lh ? lh->num_items : 0;
  ------------------
  |  Branch (426:12): [True: 1.13k, False: 0]
  ------------------
  427|  1.13k|}
OPENSSL_LH_get_down_load:
  430|  2.78k|{
  431|  2.78k|    return lh->down_load;
  432|  2.78k|}
OPENSSL_LH_set_down_load:
  435|  5.57k|{
  436|  5.57k|    lh->down_load = down_load;
  437|  5.57k|}
OPENSSL_LH_error:
  440|  37.5k|{
  441|  37.5k|    return lh->error;
  442|  37.5k|}
lhash.c:doall_util_fn:
  191|   175k|{
  192|   175k|    int i;
  193|   175k|    OPENSSL_LH_NODE *a, *n;
  194|       |
  195|   175k|    if (lh == NULL)
  ------------------
  |  Branch (195:9): [True: 0, False: 175k]
  ------------------
  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.72M|    for (i = lh->num_nodes - 1; i >= 0; i--) {
  ------------------
  |  Branch (202:33): [True: 1.55M, False: 175k]
  ------------------
  203|  1.55M|        a = lh->b[i];
  204|  1.89M|        while (a != NULL) {
  ------------------
  |  Branch (204:16): [True: 342k, False: 1.55M]
  ------------------
  205|   342k|            n = a->next;
  206|   342k|            if (use_arg)
  ------------------
  |  Branch (206:17): [True: 304k, False: 37.8k]
  ------------------
  207|   304k|                wfunc_arg(a->data, arg, func_arg);
  208|  37.8k|            else
  209|  37.8k|                wfunc(a->data, func);
  210|   342k|            a = n;
  211|   342k|        }
  212|  1.55M|    }
  213|   175k|}
lhash.c:expand:
  243|  1.16k|{
  244|  1.16k|    OPENSSL_LH_NODE **n, **n1, **n2, *np;
  245|  1.16k|    unsigned int p, pmax, nni, j;
  246|  1.16k|    unsigned long hash;
  247|       |
  248|  1.16k|    nni = lh->num_alloc_nodes;
  249|  1.16k|    p = lh->p;
  250|  1.16k|    pmax = lh->pmax;
  251|  1.16k|    if (p + 1 >= pmax) {
  ------------------
  |  Branch (251:9): [True: 15, False: 1.14k]
  ------------------
  252|     15|        j = nni * 2;
  253|     15|        n = OPENSSL_realloc_array(lh->b, j, sizeof(OPENSSL_LH_NODE *));
  ------------------
  |  |  124|     15|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  254|     15|        if (n == NULL) {
  ------------------
  |  Branch (254:13): [True: 0, False: 15]
  ------------------
  255|      0|            lh->error++;
  256|      0|            return 0;
  257|      0|        }
  258|     15|        lh->b = n;
  259|     15|        memset(n + nni, 0, sizeof(*n) * (j - nni));
  260|     15|        lh->pmax = nni;
  261|     15|        lh->num_alloc_nodes = j;
  262|     15|        lh->p = 0;
  263|  1.14k|    } else {
  264|  1.14k|        lh->p++;
  265|  1.14k|    }
  266|       |
  267|  1.16k|    lh->num_nodes++;
  268|  1.16k|    n1 = &(lh->b[p]);
  269|  1.16k|    n2 = &(lh->b[p + pmax]);
  270|  1.16k|    *n2 = NULL;
  271|       |
  272|  4.60k|    for (np = *n1; np != NULL;) {
  ------------------
  |  Branch (272:20): [True: 3.43k, False: 1.16k]
  ------------------
  273|  3.43k|        hash = np->hash;
  274|  3.43k|        if ((hash % nni) != p) { /* move it */
  ------------------
  |  Branch (274:13): [True: 736, False: 2.70k]
  ------------------
  275|    736|            *n1 = (*n1)->next;
  276|    736|            np->next = *n2;
  277|    736|            *n2 = np;
  278|    736|        } else
  279|  2.70k|            n1 = &((*n1)->next);
  280|  3.43k|        np = *n1;
  281|  3.43k|    }
  282|       |
  283|  1.16k|    return 1;
  284|  1.16k|}
lhash.c:contract:
  287|      1|{
  288|      1|    OPENSSL_LH_NODE **n, *n1, *np;
  289|       |
  290|      1|    np = lh->b[lh->p + lh->pmax - 1];
  291|      1|    lh->b[lh->p + lh->pmax - 1] = NULL; /* 24/07-92 - eay - weird but :-( */
  292|      1|    if (lh->p == 0) {
  ------------------
  |  Branch (292:9): [True: 0, False: 1]
  ------------------
  293|      0|        n = OPENSSL_realloc_array(lh->b, lh->pmax, sizeof(OPENSSL_LH_NODE *));
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  294|      0|        if (n == NULL) {
  ------------------
  |  Branch (294:13): [True: 0, False: 0]
  ------------------
  295|       |            /* fputs("realloc error in lhash", stderr); */
  296|      0|            lh->error++;
  297|      0|        } else {
  298|      0|            lh->b = n;
  299|      0|        }
  300|      0|        lh->num_alloc_nodes /= 2;
  301|      0|        lh->pmax /= 2;
  302|      0|        lh->p = lh->pmax - 1;
  303|      0|    } else
  304|      1|        lh->p--;
  305|       |
  306|      1|    lh->num_nodes--;
  307|       |
  308|      1|    n1 = lh->b[(int)lh->p];
  309|      1|    if (n1 == NULL)
  ------------------
  |  Branch (309:9): [True: 1, False: 0]
  ------------------
  310|      1|        lh->b[(int)lh->p] = np;
  311|      0|    else {
  312|      0|        while (n1->next != NULL)
  ------------------
  |  Branch (312:16): [True: 0, False: 0]
  ------------------
  313|      0|            n1 = n1->next;
  314|      0|        n1->next = np;
  315|      0|    }
  316|      1|}
lhash.c:getrn:
  320|  2.86M|{
  321|  2.86M|    OPENSSL_LH_NODE **ret, *n1;
  322|  2.86M|    unsigned long hash, nn;
  323|       |
  324|  2.86M|    if (lh->hashw != NULL)
  ------------------
  |  Branch (324:9): [True: 2.86M, False: 0]
  ------------------
  325|  2.86M|        hash = lh->hashw(data, lh->hash);
  326|      0|    else
  327|      0|        hash = lh->hash(data);
  328|       |
  329|  2.86M|    *rhash = hash;
  330|       |
  331|  2.86M|    nn = hash % lh->pmax;
  332|  2.86M|    if (nn < lh->p)
  ------------------
  |  Branch (332:9): [True: 694k, False: 2.17M]
  ------------------
  333|   694k|        nn = hash % lh->num_alloc_nodes;
  334|       |
  335|  2.86M|    ret = &(lh->b[(int)nn]);
  336|  4.02M|    for (n1 = *ret; n1 != NULL; n1 = n1->next) {
  ------------------
  |  Branch (336:21): [True: 3.10M, False: 911k]
  ------------------
  337|  3.10M|        if (n1->hash != hash) {
  ------------------
  |  Branch (337:13): [True: 1.15M, False: 1.95M]
  ------------------
  338|  1.15M|            ret = &(n1->next);
  339|  1.15M|            continue;
  340|  1.15M|        }
  341|       |
  342|  1.95M|        if (lh->compw != NULL) {
  ------------------
  |  Branch (342:13): [True: 1.95M, False: 0]
  ------------------
  343|  1.95M|            if (lh->compw(n1->data, data, lh->comp) == 0)
  ------------------
  |  Branch (343:17): [True: 1.95M, False: 437]
  ------------------
  344|  1.95M|                break;
  345|  1.95M|        } else {
  346|      0|            if (lh->comp(n1->data, data) == 0)
  ------------------
  |  Branch (346:17): [True: 0, False: 0]
  ------------------
  347|      0|                break;
  348|      0|        }
  349|    437|        ret = &(n1->next);
  350|    437|    }
  351|  2.86M|    return ret;
  352|  2.86M|}

MD5_Init:
   30|    102|{
   31|    102|    memset(c, 0, sizeof(*c));
   32|    102|    c->A = INIT_DATA_A;
  ------------------
  |  |   24|    102|#define INIT_DATA_A (unsigned long)0x67452301L
  ------------------
   33|    102|    c->B = INIT_DATA_B;
  ------------------
  |  |   25|    102|#define INIT_DATA_B (unsigned long)0xefcdab89L
  ------------------
   34|    102|    c->C = INIT_DATA_C;
  ------------------
  |  |   26|    102|#define INIT_DATA_C (unsigned long)0x98badcfeL
  ------------------
   35|    102|    c->D = INIT_DATA_D;
  ------------------
  |  |   27|    102|#define INIT_DATA_D (unsigned long)0x10325476L
  ------------------
   36|    102|    return 1;
   37|    102|}

CRYPTO_malloc:
  190|   120M|{
  191|   120M|    void *ptr;
  192|       |
  193|   120M|    INCREMENT(malloc_count);
  194|   120M|    if (malloc_impl != CRYPTO_malloc) {
  ------------------
  |  Branch (194:9): [True: 0, False: 120M]
  ------------------
  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|   120M|    if (ossl_unlikely(num == 0))
  ------------------
  |  |   23|   120M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 120M]
  |  |  ------------------
  ------------------
  202|      0|        return NULL;
  203|       |
  204|   120M|    FAILTEST();
  205|   120M|    if (allow_customize) {
  ------------------
  |  Branch (205:9): [True: 1, False: 120M]
  ------------------
  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|   120M|    ptr = malloc(num);
  215|   120M|    if (ossl_likely(ptr != NULL))
  ------------------
  |  |   22|   120M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 120M, False: 0]
  |  |  ------------------
  ------------------
  216|   120M|        return ptr;
  217|      0|err:
  218|      0|    ossl_report_alloc_err(file, line);
  219|       |    return NULL;
  220|   120M|}
CRYPTO_zalloc:
  223|  84.7M|{
  224|  84.7M|    void *ret;
  225|       |
  226|  84.7M|    ret = CRYPTO_malloc(num, file, line);
  227|  84.7M|    if (ret != NULL)
  ------------------
  |  Branch (227:9): [True: 84.7M, False: 0]
  ------------------
  228|  84.7M|        memset(ret, 0, num);
  229|       |
  230|  84.7M|    return ret;
  231|  84.7M|}
CRYPTO_aligned_alloc:
  235|  1.57k|{
  236|  1.57k|    size_t alloc_bytes;
  237|  1.57k|    void *ret;
  238|       |
  239|  1.57k|    *freeptr = NULL;
  240|       |
  241|       |#if defined(OPENSSL_SMALL_FOOTPRINT)
  242|       |    return NULL;
  243|       |#endif
  244|       |
  245|       |    /* Ensure that alignment is a power of two */
  246|  1.57k|    if (alignment == 0 || (alignment & (alignment - 1)) != 0) {
  ------------------
  |  Branch (246:9): [True: 0, False: 1.57k]
  |  Branch (246:27): [True: 0, False: 1.57k]
  ------------------
  247|      0|        ossl_report_alloc_err_inv(file, line);
  248|      0|        return NULL;
  249|      0|    }
  250|       |
  251|       |    /* Allow non-malloc() allocations as long as no malloc_impl is provided. */
  252|  1.57k|    if (malloc_impl == CRYPTO_malloc) {
  ------------------
  |  Branch (252:9): [True: 1.57k, False: 0]
  ------------------
  253|  1.57k|#if defined(_BSD_SOURCE) || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L)
  254|  1.57k|        int memalign_ret;
  255|       |
  256|       |        /* posix_memalign() requires alignment to be at least sizeof(void *) */
  257|  1.57k|        if (alignment < sizeof(void *))
  ------------------
  |  Branch (257:13): [True: 0, False: 1.57k]
  ------------------
  258|      0|            alignment = sizeof(void *);
  259|       |
  260|  1.57k|        if ((memalign_ret = posix_memalign(&ret, alignment, num))) {
  ------------------
  |  Branch (260:13): [True: 0, False: 1.57k]
  ------------------
  261|      0|            ret = NULL;
  262|      0|            switch (memalign_ret) {
  ------------------
  |  Branch (262:21): [True: 0, False: 0]
  ------------------
  263|      0|            case EINVAL:
  ------------------
  |  Branch (263:13): [True: 0, False: 0]
  ------------------
  264|      0|                ossl_report_alloc_err_inv(file, line);
  265|      0|                break;
  266|      0|            case ENOMEM:
  ------------------
  |  Branch (266:13): [True: 0, False: 0]
  ------------------
  267|      0|                ossl_report_alloc_err(file, line);
  268|      0|                break;
  269|      0|            }
  270|      0|        }
  271|  1.57k|        *freeptr = ret;
  272|  1.57k|        return ret;
  273|  1.57k|#endif
  274|  1.57k|    }
  275|       |
  276|       |    /* we have to do this the hard way */
  277|       |
  278|       |    /*
  279|       |     * Note: Windows supports an _aligned_malloc call, but we choose
  280|       |     * not to use it here, because allocations from that function
  281|       |     * require that they be freed via _aligned_free.  Given that
  282|       |     * we can't differentiate plain malloc blocks from blocks obtained
  283|       |     * via _aligned_malloc, just avoid its use entirely
  284|       |     */
  285|       |
  286|      0|    if (ossl_unlikely(!ossl_size_add(num, alignment, &alloc_bytes, file, line)))
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  287|      0|        return NULL;
  288|       |
  289|       |    /*
  290|       |     * Step 1: Allocate an amount of memory that is <alignment>
  291|       |     * bytes bigger than requested
  292|       |     */
  293|      0|    *freeptr = CRYPTO_malloc(alloc_bytes, file, line);
  294|      0|    if (*freeptr == NULL)
  ------------------
  |  Branch (294:9): [True: 0, False: 0]
  ------------------
  295|      0|        return NULL;
  296|       |
  297|       |    /*
  298|       |     * Step 2: Add <alignment - 1> bytes to the pointer
  299|       |     * This will cross the alignment boundary that is
  300|       |     * requested
  301|       |     */
  302|      0|    ret = (void *)((char *)*freeptr + (alignment - 1));
  303|       |
  304|       |    /*
  305|       |     * Step 3: Use the alignment as a mask to translate the
  306|       |     * least significant bits of the allocation at the alignment
  307|       |     * boundary to 0.  ret now holds a pointer to the memory
  308|       |     * buffer at the requested alignment
  309|       |     * NOTE: It is a documented requirement that alignment be a
  310|       |     * power of 2, which is what allows this to work
  311|       |     */
  312|      0|    ret = (void *)((uintptr_t)ret & (uintptr_t)(~(alignment - 1)));
  313|      0|    return ret;
  314|      0|}
CRYPTO_realloc:
  317|  9.45M|{
  318|  9.45M|    void *ret;
  319|       |
  320|  9.45M|    INCREMENT(realloc_count);
  321|  9.45M|    if (realloc_impl != CRYPTO_realloc) {
  ------------------
  |  Branch (321:9): [True: 0, False: 9.45M]
  ------------------
  322|      0|        ret = realloc_impl(str, num, file, line);
  323|       |
  324|      0|        if (num == 0 || ret != NULL)
  ------------------
  |  Branch (324:13): [True: 0, False: 0]
  |  Branch (324:25): [True: 0, False: 0]
  ------------------
  325|      0|            return ret;
  326|       |
  327|      0|        goto err;
  328|      0|    }
  329|       |
  330|  9.45M|    if (str == NULL)
  ------------------
  |  Branch (330:9): [True: 8.62M, False: 827k]
  ------------------
  331|  8.62M|        return CRYPTO_malloc(num, file, line);
  332|       |
  333|   827k|    if (num == 0) {
  ------------------
  |  Branch (333:9): [True: 0, False: 827k]
  ------------------
  334|      0|        CRYPTO_free(str, file, line);
  335|      0|        return NULL;
  336|      0|    }
  337|       |
  338|   827k|    FAILTEST();
  339|   827k|    ret = realloc(str, num);
  340|       |
  341|   827k|err:
  342|   827k|    if (num != 0 && ret == NULL)
  ------------------
  |  Branch (342:9): [True: 827k, False: 0]
  |  Branch (342:21): [True: 0, False: 827k]
  ------------------
  343|      0|        ossl_report_alloc_err(file, line);
  344|       |
  345|   827k|    return ret;
  346|   827k|}
CRYPTO_clear_realloc:
  350|  5.17M|{
  351|  5.17M|    void *ret = NULL;
  352|       |
  353|  5.17M|    if (str == NULL)
  ------------------
  |  Branch (353:9): [True: 1.30M, False: 3.86M]
  ------------------
  354|  1.30M|        return CRYPTO_malloc(num, file, line);
  355|       |
  356|  3.86M|    if (num == 0) {
  ------------------
  |  Branch (356:9): [True: 0, False: 3.86M]
  ------------------
  357|      0|        CRYPTO_clear_free(str, old_len, file, line);
  358|      0|        return NULL;
  359|      0|    }
  360|       |
  361|       |    /* Can't shrink the buffer since memcpy below copies |old_len| bytes. */
  362|  3.86M|    if (num < old_len) {
  ------------------
  |  Branch (362:9): [True: 0, False: 3.86M]
  ------------------
  363|      0|        OPENSSL_cleanse((char *)str + num, old_len - num);
  364|      0|        return str;
  365|      0|    }
  366|       |
  367|  3.86M|    ret = CRYPTO_malloc(num, file, line);
  368|  3.86M|    if (ret != NULL) {
  ------------------
  |  Branch (368:9): [True: 3.86M, False: 0]
  ------------------
  369|  3.86M|        memcpy(ret, str, old_len);
  370|  3.86M|        CRYPTO_clear_free(str, old_len, file, line);
  371|  3.86M|    }
  372|  3.86M|    return ret;
  373|  3.86M|}
CRYPTO_free:
  376|   157M|{
  377|   157M|    INCREMENT(free_count);
  378|   157M|    if (free_impl != CRYPTO_free) {
  ------------------
  |  Branch (378:9): [True: 0, False: 157M]
  ------------------
  379|      0|        free_impl(str, file, line);
  380|      0|        return;
  381|      0|    }
  382|       |
  383|   157M|    free(str);
  384|   157M|}
CRYPTO_clear_free:
  387|  11.8M|{
  388|  11.8M|    if (str == NULL)
  ------------------
  |  Branch (388:9): [True: 894k, False: 10.9M]
  ------------------
  389|   894k|        return;
  390|  10.9M|    if (num)
  ------------------
  |  Branch (390:9): [True: 10.9M, False: 0]
  ------------------
  391|  10.9M|        OPENSSL_cleanse(str, num);
  392|  10.9M|    CRYPTO_free(str, file, line);
  393|  10.9M|}

CRYPTO_secure_malloc_done:
  131|      1|{
  132|      1|#ifndef OPENSSL_NO_SECURE_MEMORY
  133|      1|    if (secure_mem_used == 0) {
  ------------------
  |  Branch (133:9): [True: 1, False: 0]
  ------------------
  134|      1|        sh_done();
  135|      1|        secure_mem_initialized = 0;
  136|      1|        CRYPTO_THREAD_lock_free(sec_malloc_lock);
  137|      1|        sec_malloc_lock = NULL;
  138|      1|        return 1;
  139|      1|    }
  140|      0|#endif /* OPENSSL_NO_SECURE_MEMORY */
  141|      0|    return 0;
  142|      1|}
CRYPTO_secure_malloc:
  154|  3.67k|{
  155|  3.67k|#ifndef OPENSSL_NO_SECURE_MEMORY
  156|  3.67k|    void *ret = NULL;
  157|  3.67k|    size_t actual_size;
  158|  3.67k|    int reason = CRYPTO_R_SECURE_MALLOC_FAILURE;
  ------------------
  |  |   45|  3.67k|#define CRYPTO_R_SECURE_MALLOC_FAILURE 111
  ------------------
  159|       |
  160|  3.67k|    if (!secure_mem_initialized) {
  ------------------
  |  Branch (160:9): [True: 3.67k, False: 0]
  ------------------
  161|  3.67k|        return CRYPTO_malloc(num, file, line);
  162|  3.67k|    }
  163|      0|    if (!CRYPTO_THREAD_write_lock(sec_malloc_lock)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 0]
  ------------------
  164|      0|        reason = ERR_R_CRYPTO_LIB;
  ------------------
  |  |  328|      0|#define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  |  |  ------------------
  |  |               #define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      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);
  ------------------
  |  |   87|      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|  20.1k|{
  185|  20.1k|#ifndef OPENSSL_NO_SECURE_MEMORY
  186|  20.1k|    if (secure_mem_initialized)
  ------------------
  |  Branch (186:9): [True: 0, False: 20.1k]
  ------------------
  187|       |        /* CRYPTO_secure_malloc() zeroes allocations when it is implemented */
  188|      0|        return CRYPTO_secure_malloc(num, file, line);
  189|  20.1k|#endif
  190|  20.1k|    return CRYPTO_zalloc(num, file, line);
  191|  20.1k|}
CRYPTO_secure_free:
  194|  2.78k|{
  195|  2.78k|#ifndef OPENSSL_NO_SECURE_MEMORY
  196|  2.78k|    size_t actual_size;
  197|       |
  198|  2.78k|    if (ptr == NULL)
  ------------------
  |  Branch (198:9): [True: 79, False: 2.70k]
  ------------------
  199|     79|        return;
  200|  2.70k|    if (!CRYPTO_secure_allocated(ptr)) {
  ------------------
  |  Branch (200:9): [True: 2.70k, False: 0]
  ------------------
  201|  2.70k|        CRYPTO_free(ptr, file, line);
  202|  2.70k|        return;
  203|  2.70k|    }
  204|      0|    if (!CRYPTO_THREAD_write_lock(sec_malloc_lock))
  ------------------
  |  Branch (204:9): [True: 0, False: 0]
  ------------------
  205|      0|        return;
  206|      0|    actual_size = sh_actual_size(ptr);
  207|      0|    CLEAR(ptr, actual_size);
  ------------------
  |  |   81|      0|#define CLEAR(p, s) OPENSSL_cleanse(p, s)
  ------------------
  208|      0|    secure_mem_used -= actual_size;
  209|      0|    sh_free(ptr);
  210|      0|    CRYPTO_THREAD_unlock(sec_malloc_lock);
  211|       |#else
  212|       |    CRYPTO_free(ptr, file, line);
  213|       |#endif /* OPENSSL_NO_SECURE_MEMORY */
  214|      0|}
CRYPTO_secure_clear_free:
  218|  27.8k|{
  219|  27.8k|#ifndef OPENSSL_NO_SECURE_MEMORY
  220|  27.8k|    size_t actual_size;
  221|       |
  222|  27.8k|    if (ptr == NULL)
  ------------------
  |  Branch (222:9): [True: 6.78k, False: 21.0k]
  ------------------
  223|  6.78k|        return;
  224|  21.0k|    if (!CRYPTO_secure_allocated(ptr)) {
  ------------------
  |  Branch (224:9): [True: 21.0k, False: 0]
  ------------------
  225|  21.0k|        OPENSSL_cleanse(ptr, num);
  226|  21.0k|        CRYPTO_free(ptr, file, line);
  227|  21.0k|        return;
  228|  21.0k|    }
  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|  27.1k|{
  246|  27.1k|#ifndef OPENSSL_NO_SECURE_MEMORY
  247|  27.1k|    if (!secure_mem_initialized)
  ------------------
  |  Branch (247:9): [True: 27.1k, False: 0]
  ------------------
  248|  27.1k|        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|  27.1k|}
mem_sec.c:sh_done:
  594|      1|{
  595|      1|    OPENSSL_free(sh.freelist);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  596|      1|    OPENSSL_free(sh.bittable);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  597|      1|    OPENSSL_free(sh.bitmalloc);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  598|      1|#if !defined(_WIN32)
  599|      1|    if (sh.map_result != MAP_FAILED && sh.map_size)
  ------------------
  |  Branch (599:9): [True: 1, False: 0]
  |  Branch (599:40): [True: 0, False: 1]
  ------------------
  600|      0|        munmap(sh.map_result, sh.map_size);
  601|       |#else
  602|       |    if (sh.map_result != NULL && sh.map_size)
  603|       |        VirtualFree(sh.map_result, 0, MEM_RELEASE);
  604|       |#endif
  605|      1|    memset(&sh, 0, sizeof(sh));
  606|      1|}

ossl_ml_kem_key_reset:
 1903|  1.47k|{
 1904|       |    /*
 1905|       |     * seedbuf can be allocated and contain |z| and |d| if the key is
 1906|       |     * being created from a private key encoding.  Similarly a pending
 1907|       |     * serialised (encoded) private key may be queued up to load.
 1908|       |     * Clear and free that data now.
 1909|       |     */
 1910|  1.47k|    if (key->seedbuf != NULL)
  ------------------
  |  Branch (1910:9): [True: 0, False: 1.47k]
  ------------------
 1911|      0|        OPENSSL_secure_clear_free(key->seedbuf, ML_KEM_SEED_BYTES);
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1912|  1.47k|    if (ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  1.47k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 1.47k]
  |  |  ------------------
  ------------------
 1913|      0|        OPENSSL_secure_clear_free(key->encoded_dk, key->vinfo->prvkey_bytes);
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1914|       |
 1915|       |    /*-
 1916|       |     * Cleanse any sensitive data:
 1917|       |     * - The private vector |s| is immediately followed by the FO failure
 1918|       |     *   secret |z|, and seed |d|, we can cleanse all three in one call.
 1919|       |     */
 1920|  1.47k|    if (key->t != NULL) {
  ------------------
  |  Branch (1920:9): [True: 1.47k, False: 0]
  ------------------
 1921|  1.47k|        if (ossl_ml_kem_have_prvkey(key))
  ------------------
  |  |  208|  1.47k|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  |  |  ------------------
  |  |  |  Branch (208:38): [True: 1.47k, False: 0]
  |  |  ------------------
  ------------------
 1922|  1.47k|            OPENSSL_secure_clear_free(key->s, key->vinfo->prvalloc);
  ------------------
  |  |  149|  1.47k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1923|  1.47k|        OPENSSL_free(key->t);
  ------------------
  |  |  131|  1.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1924|  1.47k|    }
 1925|       |    key->d = key->z = key->seedbuf = key->encoded_dk = (uint8_t *)(key->s = key->m = key->t = NULL);
 1926|  1.47k|}
ossl_ml_kem_get_vinfo:
 1937|  2.88k|{
 1938|  2.88k|    switch (evp_type) {
  ------------------
  |  Branch (1938:13): [True: 2.88k, False: 0]
  ------------------
 1939|     25|    case EVP_PKEY_ML_KEM_512:
  ------------------
  |  |   93|     25|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  ------------------
  |  |  |  | 6636|     25|#define NID_ML_KEM_512          1454
  |  |  ------------------
  ------------------
  |  Branch (1939:5): [True: 25, False: 2.85k]
  ------------------
 1940|     25|        return &vinfo_map[ML_KEM_512_VINFO];
  ------------------
  |  |  177|     25|#define ML_KEM_512_VINFO 0
  ------------------
 1941|  2.82k|    case EVP_PKEY_ML_KEM_768:
  ------------------
  |  |  103|  2.82k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6641|  2.82k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  |  Branch (1941:5): [True: 2.82k, False: 55]
  ------------------
 1942|  2.82k|        return &vinfo_map[ML_KEM_768_VINFO];
  ------------------
  |  |  178|  2.82k|#define ML_KEM_768_VINFO 1
  ------------------
 1943|     30|    case EVP_PKEY_ML_KEM_1024:
  ------------------
  |  |  113|     30|#define EVP_PKEY_ML_KEM_1024 NID_ML_KEM_1024
  |  |  ------------------
  |  |  |  | 6646|     30|#define NID_ML_KEM_1024         1456
  |  |  ------------------
  ------------------
  |  Branch (1943:5): [True: 30, False: 2.85k]
  ------------------
 1944|     30|        return &vinfo_map[ML_KEM_1024_VINFO];
  ------------------
  |  |  179|     30|#define ML_KEM_1024_VINFO 2
  ------------------
 1945|  2.88k|    }
 1946|      0|    return NULL;
 1947|  2.88k|}
ossl_ml_kem_key_new:
 1951|  1.47k|{
 1952|  1.47k|    const ML_KEM_VINFO *vinfo = ossl_ml_kem_get_vinfo(evp_type);
 1953|  1.47k|    ML_KEM_KEY *key;
 1954|       |
 1955|  1.47k|    if (vinfo == NULL) {
  ------------------
  |  Branch (1955:9): [True: 0, False: 1.47k]
  ------------------
 1956|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  358|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1957|      0|            "unsupported ML-KEM key type: %d", evp_type);
 1958|      0|        return NULL;
 1959|      0|    }
 1960|       |
 1961|  1.47k|    if ((key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  106|  1.47k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1961:9): [True: 0, False: 1.47k]
  ------------------
 1962|      0|        return NULL;
 1963|       |
 1964|  1.47k|    key->vinfo = vinfo;
 1965|  1.47k|    key->libctx = libctx;
 1966|  1.47k|    key->prov_flags = ML_KEM_KEY_PROV_FLAGS_DEFAULT;
  ------------------
  |  |  132|  1.47k|    (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  123|  1.47k|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  125|  1.47k|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  126|  1.47k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  |  |  ------------------
  ------------------
 1967|  1.47k|    key->shake128_md = EVP_MD_fetch(libctx, "SHAKE128", properties);
 1968|  1.47k|    key->shake256_md = EVP_MD_fetch(libctx, "SHAKE256", properties);
 1969|  1.47k|    key->sha3_256_md = EVP_MD_fetch(libctx, "SHA3-256", properties);
 1970|  1.47k|    key->sha3_512_md = EVP_MD_fetch(libctx, "SHA3-512", properties);
 1971|  1.47k|    key->d = key->z = key->rho = key->pkhash = key->encoded_dk = key->seedbuf = NULL;
 1972|  1.47k|    key->s = key->m = key->t = NULL;
 1973|       |
 1974|  1.47k|    if (key->shake128_md != NULL
  ------------------
  |  Branch (1974:9): [True: 1.47k, False: 0]
  ------------------
 1975|  1.47k|        && key->shake256_md != NULL
  ------------------
  |  Branch (1975:12): [True: 1.47k, False: 0]
  ------------------
 1976|  1.47k|        && key->sha3_256_md != NULL
  ------------------
  |  Branch (1976:12): [True: 1.47k, False: 0]
  ------------------
 1977|  1.47k|        && key->sha3_512_md != NULL)
  ------------------
  |  Branch (1977:12): [True: 1.47k, False: 0]
  ------------------
 1978|  1.47k|        return key;
 1979|       |
 1980|      0|    ossl_ml_kem_key_free(key);
 1981|      0|    ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                  ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                  ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1982|      0|        "missing SHA3 digest algorithms while creating %s key",
 1983|      0|        vinfo->algorithm_name);
 1984|       |    return NULL;
 1985|  1.47k|}
ossl_ml_kem_key_free:
 2053|  1.47k|{
 2054|  1.47k|    if (key == NULL)
  ------------------
  |  Branch (2054:9): [True: 0, False: 1.47k]
  ------------------
 2055|      0|        return;
 2056|       |
 2057|  1.47k|    EVP_MD_free(key->shake128_md);
 2058|  1.47k|    EVP_MD_free(key->shake256_md);
 2059|  1.47k|    EVP_MD_free(key->sha3_256_md);
 2060|  1.47k|    EVP_MD_free(key->sha3_512_md);
 2061|       |
 2062|  1.47k|    ossl_ml_kem_key_reset(key);
 2063|  1.47k|    OPENSSL_free(key);
  ------------------
  |  |  131|  1.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2064|  1.47k|}
ossl_ml_kem_encode_public_key:
 2069|  1.47k|{
 2070|  1.47k|    if (!ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  2.95k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (2070:9): [True: 0, False: 1.47k]
  ------------------
 2071|  1.47k|        || len != key->vinfo->pubkey_bytes)
  ------------------
  |  Branch (2071:12): [True: 0, False: 1.47k]
  ------------------
 2072|      0|        return 0;
 2073|  1.47k|    encode_pubkey(out, key);
 2074|  1.47k|    return 1;
 2075|  1.47k|}
ossl_ml_kem_genkey:
 2191|  1.47k|{
 2192|  1.47k|    uint8_t seed[ML_KEM_SEED_BYTES];
 2193|  1.47k|    EVP_MD_CTX *mdctx = NULL;
 2194|  1.47k|    const ML_KEM_VINFO *vinfo;
 2195|  1.47k|    int ret = 0;
 2196|       |
 2197|  1.47k|    if (key == NULL
  ------------------
  |  Branch (2197:9): [True: 0, False: 1.47k]
  ------------------
 2198|  1.47k|        || ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  2.95k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 1.47k]
  |  |  ------------------
  ------------------
 2199|  1.47k|        || ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  1.47k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 1.47k]
  |  |  ------------------
  ------------------
 2200|      0|        return 0;
 2201|  1.47k|    vinfo = key->vinfo;
 2202|       |
 2203|  1.47k|    if (pubenc != NULL && publen != vinfo->pubkey_bytes)
  ------------------
  |  Branch (2203:9): [True: 0, False: 1.47k]
  |  Branch (2203:27): [True: 0, False: 0]
  ------------------
 2204|      0|        return 0;
 2205|       |
 2206|  1.47k|    if (key->seedbuf != NULL) {
  ------------------
  |  Branch (2206:9): [True: 0, False: 1.47k]
  ------------------
 2207|      0|        if (!ossl_ml_kem_encode_seed(seed, sizeof(seed), key))
  ------------------
  |  Branch (2207:13): [True: 0, False: 0]
  ------------------
 2208|      0|            return 0;
 2209|      0|        ossl_ml_kem_key_reset(key);
 2210|  1.47k|    } else if (RAND_priv_bytes_ex(key->libctx, seed, sizeof(seed),
  ------------------
  |  Branch (2210:16): [True: 0, False: 1.47k]
  ------------------
 2211|  1.47k|                   key->vinfo->secbits)
 2212|  1.47k|        <= 0) {
 2213|      0|        return 0;
 2214|      0|    }
 2215|       |
 2216|  1.47k|    if ((mdctx = EVP_MD_CTX_new()) == NULL)
  ------------------
  |  Branch (2216:9): [True: 0, False: 1.47k]
  ------------------
 2217|      0|        return 0;
 2218|       |
 2219|       |    /*
 2220|       |     * Data derived from (d, z) defaults secret, and to avoid side-channel
 2221|       |     * leaks should not influence control flow.
 2222|       |     */
 2223|  1.47k|    CONSTTIME_SECRET(seed, ML_KEM_SEED_BYTES);
 2224|       |
 2225|  1.47k|    if (add_storage(OPENSSL_malloc(vinfo->puballoc),
  ------------------
  |  |  106|  1.47k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (2225:9): [True: 1.47k, False: 0]
  ------------------
 2226|  1.47k|            OPENSSL_secure_malloc(vinfo->prvalloc), 1, key))
  ------------------
  |  |  139|  1.47k|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2227|  1.47k|        ret = genkey(seed, mdctx, pubenc, key);
 2228|  1.47k|    OPENSSL_cleanse(seed, sizeof(seed));
 2229|       |
 2230|       |    /* Declassify secret inputs and derived outputs before returning control */
 2231|  1.47k|    CONSTTIME_DECLASSIFY(seed, ML_KEM_SEED_BYTES);
 2232|       |
 2233|  1.47k|    EVP_MD_CTX_free(mdctx);
 2234|  1.47k|    if (!ret) {
  ------------------
  |  Branch (2234:9): [True: 0, False: 1.47k]
  ------------------
 2235|      0|        ossl_ml_kem_key_reset(key);
 2236|      0|        return 0;
 2237|      0|    }
 2238|       |
 2239|       |    /* The public components are already declassified */
 2240|  1.47k|    CONSTTIME_DECLASSIFY(key->s, vinfo->rank * sizeof(scalar));
 2241|  1.47k|    CONSTTIME_DECLASSIFY(key->z, 2 * ML_KEM_RANDOM_BYTES);
 2242|  1.47k|    return 1;
 2243|  1.47k|}
ml_kem.c:add_storage:
 1862|  1.47k|{
 1863|  1.47k|    int rank = key->vinfo->rank;
 1864|       |
 1865|  1.47k|    if (pub == NULL || (private && priv == NULL)) {
  ------------------
  |  Branch (1865:9): [True: 0, False: 1.47k]
  |  Branch (1865:25): [True: 1.47k, False: 0]
  |  Branch (1865:36): [True: 0, False: 1.47k]
  ------------------
 1866|       |        /*
 1867|       |         * One of these could be allocated correctly. It is legal to call free with a NULL
 1868|       |         * pointer, so always attempt to free both allocations here
 1869|       |         */
 1870|      0|        OPENSSL_free(pub);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1871|      0|        OPENSSL_secure_free(priv);
  ------------------
  |  |  147|      0|    CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1872|      0|        return 0;
 1873|      0|    }
 1874|       |
 1875|       |    /*
 1876|       |     * We're adding key material, set up rho and pkhash to point to the rho_pkhash buffer
 1877|       |     */
 1878|  1.47k|    memset(key->rho_pkhash, 0, sizeof(key->rho_pkhash));
 1879|  1.47k|    key->rho = key->rho_pkhash;
 1880|  1.47k|    key->pkhash = key->rho_pkhash + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1881|  1.47k|    key->d = key->z = NULL;
 1882|       |
 1883|       |    /* A public key needs space for |t| and |m| */
 1884|  1.47k|    key->m = (key->t = pub) + rank;
 1885|       |
 1886|       |    /*
 1887|       |     * A private key also needs space for |s| and |z|.
 1888|       |     * The |z| buffer always includes additional space for |d|, but a key's |d|
 1889|       |     * pointer is left NULL when parsed from the NIST format, which omits that
 1890|       |     * information.  Only keys generated from a (d, z) seed pair will have a
 1891|       |     * non-NULL |d| pointer.
 1892|       |     */
 1893|  1.47k|    if (private)
  ------------------
  |  Branch (1893:9): [True: 1.47k, False: 0]
  ------------------
 1894|  1.47k|        key->z = (uint8_t *)(rank + (key->s = priv));
 1895|  1.47k|    return 1;
 1896|  1.47k|}
ml_kem.c:encode_pubkey:
 1568|  1.47k|{
 1569|  1.47k|    const uint8_t *rho = key->rho;
 1570|  1.47k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1571|       |
 1572|  1.47k|    vector_encode(out, key->t, 12, vinfo->rank);
 1573|  1.47k|    memcpy(out + vinfo->vector_bytes, rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1574|  1.47k|}
ml_kem.c:vector_encode:
 1221|  1.47k|{
 1222|  1.47k|    int stride = bits * DEGREE / 8;
  ------------------
  |  |   41|  1.47k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  1.47k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
 1223|       |
 1224|  5.90k|    for (; rank-- > 0; out += stride)
  ------------------
  |  Branch (1224:12): [True: 4.43k, False: 1.47k]
  ------------------
 1225|  4.43k|        scalar_encode(out, a++, bits);
 1226|  1.47k|}
ml_kem.c:scalar_encode:
  973|  8.86k|{
  974|  8.86k|    const uint16_t *curr = s->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  8.86k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  8.86k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  975|  8.86k|    uint64_t accum = 0, element;
  976|  8.86k|    int used = 0;
  977|       |
  978|  2.26M|    do {
  979|  2.26M|        element = *curr++;
  980|  2.26M|        if (used + bits < 64) {
  ------------------
  |  Branch (980:13): [True: 1.84M, False: 425k]
  ------------------
  981|  1.84M|            accum |= element << used;
  982|  1.84M|            used += bits;
  983|  1.84M|        } else if (used + bits > 64) {
  ------------------
  |  Branch (983:20): [True: 283k, False: 141k]
  ------------------
  984|   283k|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  985|   283k|            accum = element >> (64 - used);
  986|   283k|            used = (used + bits) - 64;
  987|   283k|        } else {
  988|   141k|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  989|   141k|            accum = 0;
  990|   141k|            used = 0;
  991|   141k|        }
  992|  2.26M|    } while (curr < end);
  ------------------
  |  Branch (992:14): [True: 2.25M, False: 8.86k]
  ------------------
  993|  8.86k|}
ml_kem.c:single_keccak:
  672|  10.3k|{
  673|  10.3k|    unsigned int sz = (unsigned int)outlen;
  674|       |
  675|  10.3k|    if (!EVP_DigestUpdate(mdctx, in, inlen))
  ------------------
  |  Branch (675:9): [True: 0, False: 10.3k]
  ------------------
  676|      0|        return 0;
  677|  10.3k|    if (EVP_MD_xof(EVP_MD_CTX_get0_md(mdctx)))
  ------------------
  |  Branch (677:9): [True: 8.86k, False: 1.47k]
  ------------------
  678|  8.86k|        return EVP_DigestFinalXOF(mdctx, out, outlen);
  679|  1.47k|    return EVP_DigestFinal_ex(mdctx, out, &sz)
  ------------------
  |  Branch (679:12): [True: 1.47k, False: 0]
  ------------------
  680|  1.47k|        && ossl_assert((size_t)sz == outlen);
  ------------------
  |  |   52|  1.47k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 1.47k, False: 0]
  |  |  ------------------
  |  |   53|  1.47k|    __FILE__, __LINE__)
  ------------------
  681|  10.3k|}
ml_kem.c:matrix_expand:
 1317|  1.47k|{
 1318|  1.47k|    scalar *out = key->m;
 1319|  1.47k|    uint8_t input[ML_KEM_RANDOM_BYTES + 2];
 1320|  1.47k|    int rank = key->vinfo->rank;
 1321|  1.47k|    int i, j;
 1322|       |
 1323|  1.47k|    memcpy(input, key->rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1324|  5.90k|    for (i = 0; i < rank; i++) {
  ------------------
  |  Branch (1324:17): [True: 4.43k, False: 1.47k]
  ------------------
 1325|  17.7k|        for (j = 0; j < rank; j++) {
  ------------------
  |  Branch (1325:21): [True: 13.3k, False: 4.43k]
  ------------------
 1326|  13.3k|            input[ML_KEM_RANDOM_BYTES] = i;
  ------------------
  |  |   47|  13.3k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1327|  13.3k|            input[ML_KEM_RANDOM_BYTES + 1] = j;
  ------------------
  |  |   47|  13.3k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1328|  13.3k|            if (!EVP_DigestInit_ex(mdctx, key->shake128_md, NULL)
  ------------------
  |  Branch (1328:17): [True: 0, False: 13.3k]
  ------------------
 1329|  13.3k|                || !EVP_DigestUpdate(mdctx, input, sizeof(input))
  ------------------
  |  Branch (1329:20): [True: 0, False: 13.3k]
  ------------------
 1330|  13.3k|                || !sample_scalar(out++, mdctx))
  ------------------
  |  Branch (1330:20): [True: 0, False: 13.3k]
  ------------------
 1331|      0|                return 0;
 1332|  13.3k|        }
 1333|  4.43k|    }
 1334|  1.47k|    return 1;
 1335|  1.47k|}
ml_kem.c:sample_scalar:
  767|  13.3k|{
  768|  13.3k|    uint16_t *curr = out->c, *endout = curr + DEGREE;
  ------------------
  |  |   41|  13.3k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  13.3k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  769|  13.3k|    uint8_t buf[SCALAR_SAMPLING_BUFSIZE], *in;
  770|  13.3k|    uint8_t *endin = buf + sizeof(buf);
  771|  13.3k|    uint16_t d;
  772|  13.3k|    uint8_t b1, b2, b3;
  773|       |
  774|  40.1k|    do {
  775|  40.1k|        if (!EVP_DigestSqueeze(mdctx, in = buf, sizeof(buf)))
  ------------------
  |  Branch (775:13): [True: 0, False: 40.1k]
  ------------------
  776|      0|            return 0;
  777|  2.11M|        do {
  778|  2.11M|            b1 = *in++;
  779|  2.11M|            b2 = *in++;
  780|  2.11M|            b3 = *in++;
  781|       |
  782|  2.11M|            if (curr >= endout)
  ------------------
  |  Branch (782:17): [True: 6.66k, False: 2.10M]
  ------------------
  783|  6.66k|                break;
  784|  2.10M|            if ((d = ((b2 & 0x0f) << 8) + b1) < kPrime)
  ------------------
  |  Branch (784:17): [True: 1.71M, False: 395k]
  ------------------
  785|  1.71M|                *curr++ = d;
  786|  2.10M|            if (curr >= endout)
  ------------------
  |  Branch (786:17): [True: 6.66k, False: 2.10M]
  ------------------
  787|  6.66k|                break;
  788|  2.10M|            if ((d = (b3 << 4) + (b2 >> 4)) < kPrime)
  ------------------
  |  Branch (788:17): [True: 1.70M, False: 393k]
  ------------------
  789|  1.70M|                *curr++ = d;
  790|  2.10M|        } while (in < endin);
  ------------------
  |  Branch (790:18): [True: 2.07M, False: 26.8k]
  ------------------
  791|  40.1k|    } while (curr < endout);
  ------------------
  |  Branch (791:14): [True: 26.8k, False: 13.3k]
  ------------------
  792|  13.3k|    return 1;
  793|  13.3k|}
ml_kem.c:genkey:
 1693|  1.47k|{
 1694|  1.47k|    uint8_t hashed[2 * ML_KEM_RANDOM_BYTES];
 1695|  1.47k|    const uint8_t *const sigma = hashed + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1696|  1.47k|    uint8_t augmented_seed[ML_KEM_RANDOM_BYTES + 1];
 1697|  1.47k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1698|  1.47k|    CBD_FUNC cbd_1 = CBD1(vinfo->evp_type);
  ------------------
  |  | 1470|  1.47k|#define CBD1(evp_type) ((evp_type) == EVP_PKEY_ML_KEM_512 ? cbd_3 : cbd_2)
  |  |  ------------------
  |  |  |  |   93|  1.47k|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  |  |  ------------------
  |  |  |  |  |  | 6636|  1.47k|#define NID_ML_KEM_512          1454
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (1470:25): [True: 25, False: 1.45k]
  |  |  ------------------
  ------------------
 1699|  1.47k|    int rank = vinfo->rank;
 1700|  1.47k|    uint8_t counter = 0;
 1701|  1.47k|    int ret = 0;
 1702|       |
 1703|       |    /*
 1704|       |     * Use the "d" seed salted with the rank to derive the public and private
 1705|       |     * seeds rho and sigma.
 1706|       |     */
 1707|  1.47k|    memcpy(augmented_seed, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1708|  1.47k|    augmented_seed[ML_KEM_RANDOM_BYTES] = (uint8_t)rank;
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1709|  1.47k|    if (!hash_g(hashed, augmented_seed, sizeof(augmented_seed), mdctx, key))
  ------------------
  |  Branch (1709:9): [True: 0, False: 1.47k]
  ------------------
 1710|      0|        goto end;
 1711|  1.47k|    memcpy(key->rho, hashed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1712|       |    /* The |rho| matrix seed is public */
 1713|  1.47k|    CONSTTIME_DECLASSIFY(key->rho, ML_KEM_RANDOM_BYTES);
 1714|       |
 1715|       |    /* FIPS 203 |e| vector is initial value of key->t */
 1716|  1.47k|    if (!matrix_expand(mdctx, key)
  ------------------
  |  Branch (1716:9): [True: 0, False: 1.47k]
  ------------------
 1717|  1.47k|        || !gencbd_vector_ntt(key->s, cbd_1, &counter, sigma, rank, mdctx, key)
  ------------------
  |  Branch (1717:12): [True: 0, False: 1.47k]
  ------------------
 1718|  1.47k|        || !gencbd_vector_ntt(key->t, cbd_1, &counter, sigma, rank, mdctx, key))
  ------------------
  |  Branch (1718:12): [True: 0, False: 1.47k]
  ------------------
 1719|      0|        goto end;
 1720|       |
 1721|       |    /* To |e| we now add the product of transpose |m| and |s|, giving |t|. */
 1722|  1.47k|    matrix_mult_transpose_add(key->t, key->m, key->s, rank);
 1723|       |    /* The |t| vector is public */
 1724|  1.47k|    CONSTTIME_DECLASSIFY(key->t, vinfo->rank * sizeof(scalar));
 1725|       |
 1726|  1.47k|    if (pubenc == NULL) {
  ------------------
  |  Branch (1726:9): [True: 1.47k, False: 0]
  ------------------
 1727|       |        /* Incremental digest of public key without in-full serialisation. */
 1728|  1.47k|        if (!hash_h_pubkey(key->pkhash, mdctx, key))
  ------------------
  |  Branch (1728:13): [True: 0, False: 1.47k]
  ------------------
 1729|      0|            goto end;
 1730|  1.47k|    } else {
 1731|      0|        encode_pubkey(pubenc, key);
 1732|      0|        if (!hash_h(key->pkhash, pubenc, vinfo->pubkey_bytes, mdctx, key))
  ------------------
  |  Branch (1732:13): [True: 0, False: 0]
  ------------------
 1733|      0|            goto end;
 1734|      0|    }
 1735|       |
 1736|       |    /* Save |z| portion of seed for "implicit rejection" on failure. */
 1737|  1.47k|    memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
                  memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1738|       |
 1739|       |    /* Optionally save the |d| portion of the seed */
 1740|  1.47k|    key->d = key->z + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1741|  1.47k|    if (key->prov_flags & ML_KEM_KEY_RETAIN_SEED) {
  ------------------
  |  |  126|  1.47k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  |  Branch (1741:9): [True: 1.47k, False: 0]
  ------------------
 1742|  1.47k|        memcpy(key->d, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1743|  1.47k|    } else {
 1744|      0|        OPENSSL_cleanse(key->d, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1745|      0|        key->d = NULL;
 1746|      0|    }
 1747|       |
 1748|  1.47k|    ret = 1;
 1749|  1.47k|end:
 1750|  1.47k|    OPENSSL_cleanse((void *)augmented_seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1751|  1.47k|    OPENSSL_cleanse((void *)sigma, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1752|  1.47k|    if (ret == 0) {
  ------------------
  |  Branch (1752:9): [True: 0, False: 1.47k]
  ------------------
 1753|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1754|      0|            "internal error while generating %s private key",
 1755|      0|            vinfo->algorithm_name);
 1756|      0|    }
 1757|  1.47k|    return ret;
 1758|  1.47k|}
ml_kem.c:cbd_3:
 1387|    100|{
 1388|    100|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|    100|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|    100|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
 1389|    100|    uint8_t randbuf[6 * DEGREE / 8], *r = randbuf; /* 64 * eta slots */
 1390|    100|    uint8_t b1, b2, b3;
 1391|    100|    uint16_t value, mask;
 1392|       |
 1393|    100|    if (!prf(randbuf, sizeof(randbuf), in, mdctx, key))
  ------------------
  |  Branch (1393:9): [True: 0, False: 100]
  ------------------
 1394|      0|        return 0;
 1395|       |
 1396|  6.40k|    do {
 1397|  6.40k|        b1 = *r++;
 1398|  6.40k|        b2 = *r++;
 1399|  6.40k|        b3 = *r++;
 1400|       |
 1401|       |        /*
 1402|       |         * Add |kPrime| if |value| underflowed.  See |constish_time_non_zero|
 1403|       |         * for a discussion on why the value barrier is by default omitted.
 1404|       |         * While this could have been written reduce_once(value + kPrime), this
 1405|       |         * is one extra addition and small range of |value| tempts some
 1406|       |         * versions of Clang to emit a branch.
 1407|       |         */
 1408|  6.40k|        value = bit0(b1) + bitn(1, b1) + bitn(2, b1);
  ------------------
  |  |   34|  6.40k|#define bit0(b) ((b) & 1)
  ------------------
                      value = bit0(b1) + bitn(1, b1) + bitn(2, b1);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bit0(b1) + bitn(1, b1) + bitn(2, b1);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1409|  6.40k|        value -= bitn(3, b1) + bitn(4, b1) + bitn(5, b1);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(3, b1) + bitn(4, b1) + bitn(5, b1);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(3, b1) + bitn(4, b1) + bitn(5, b1);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1410|  6.40k|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  6.40k|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1411|  6.40k|        *curr++ = value + (kPrime & mask);
 1412|       |
 1413|  6.40k|        value = bitn(6, b1) + bitn(7, b1) + bit0(b2);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(6, b1) + bitn(7, b1) + bit0(b2);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(6, b1) + bitn(7, b1) + bit0(b2);
  ------------------
  |  |   34|  6.40k|#define bit0(b) ((b) & 1)
  ------------------
 1414|  6.40k|        value -= bitn(1, b2) + bitn(2, b2) + bitn(3, b2);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(1, b2) + bitn(2, b2) + bitn(3, b2);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(1, b2) + bitn(2, b2) + bitn(3, b2);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1415|  6.40k|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  6.40k|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1416|  6.40k|        *curr++ = value + (kPrime & mask);
 1417|       |
 1418|  6.40k|        value = bitn(4, b2) + bitn(5, b2) + bitn(6, b2);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(4, b2) + bitn(5, b2) + bitn(6, b2);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(4, b2) + bitn(5, b2) + bitn(6, b2);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1419|  6.40k|        value -= bitn(7, b2) + bit0(b3) + bitn(1, b3);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(7, b2) + bit0(b3) + bitn(1, b3);
  ------------------
  |  |   34|  6.40k|#define bit0(b) ((b) & 1)
  ------------------
                      value -= bitn(7, b2) + bit0(b3) + bitn(1, b3);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1420|  6.40k|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  6.40k|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1421|  6.40k|        *curr++ = value + (kPrime & mask);
 1422|       |
 1423|  6.40k|        value = bitn(2, b3) + bitn(3, b3) + bitn(4, b3);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(2, b3) + bitn(3, b3) + bitn(4, b3);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(2, b3) + bitn(3, b3) + bitn(4, b3);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1424|  6.40k|        value -= bitn(5, b3) + bitn(6, b3) + bitn(7, b3);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(5, b3) + bitn(6, b3) + bitn(7, b3);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(5, b3) + bitn(6, b3) + bitn(7, b3);
  ------------------
  |  |   35|  6.40k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1425|  6.40k|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  6.40k|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1426|  6.40k|        *curr++ = value + (kPrime & mask);
 1427|  6.40k|    } while (curr < end);
  ------------------
  |  Branch (1427:14): [True: 6.30k, False: 100]
  ------------------
 1428|    100|    return 1;
 1429|    100|}
ml_kem.c:prf:
  689|  8.86k|{
  690|  8.86k|    return EVP_DigestInit_ex(mdctx, key->shake256_md, NULL)
  ------------------
  |  Branch (690:12): [True: 8.86k, False: 0]
  ------------------
  691|  8.86k|        && single_keccak(out, len, in, ML_KEM_RANDOM_BYTES + 1, mdctx);
  ------------------
  |  |   47|  8.86k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (691:12): [True: 8.86k, False: 0]
  ------------------
  692|  8.86k|}
ml_kem.c:cbd_2:
 1347|  8.76k|{
 1348|  8.76k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  8.76k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  8.76k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
 1349|  8.76k|    uint8_t randbuf[4 * DEGREE / 8], *r = randbuf; /* 64 * eta slots */
 1350|  8.76k|    uint16_t value, mask;
 1351|  8.76k|    uint8_t b;
 1352|       |
 1353|  8.76k|    if (!prf(randbuf, sizeof(randbuf), in, mdctx, key))
  ------------------
  |  Branch (1353:9): [True: 0, False: 8.76k]
  ------------------
 1354|      0|        return 0;
 1355|       |
 1356|  1.12M|    do {
 1357|  1.12M|        b = *r++;
 1358|       |
 1359|       |        /*
 1360|       |         * Add |kPrime| if |value| underflowed.  See |constish_time_non_zero|
 1361|       |         * for a discussion on why the value barrier is by default omitted.
 1362|       |         * While this could have been written reduce_once(value + kPrime), this
 1363|       |         * is one extra addition and small range of |value| tempts some
 1364|       |         * versions of Clang to emit a branch.
 1365|       |         */
 1366|  1.12M|        value = bit0(b) + bitn(1, b);
  ------------------
  |  |   34|  1.12M|#define bit0(b) ((b) & 1)
  ------------------
                      value = bit0(b) + bitn(1, b);
  ------------------
  |  |   35|  1.12M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1367|  1.12M|        value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|  1.12M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|  1.12M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1368|  1.12M|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  1.12M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1369|  1.12M|        *curr++ = value + (kPrime & mask);
 1370|       |
 1371|  1.12M|        value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|  1.12M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|  1.12M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1372|  1.12M|        value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|  1.12M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|  1.12M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1373|  1.12M|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  1.12M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1374|  1.12M|        *curr++ = value + (kPrime & mask);
 1375|  1.12M|    } while (curr < end);
  ------------------
  |  Branch (1375:14): [True: 1.11M, False: 8.76k]
  ------------------
 1376|  8.76k|    return 1;
 1377|  8.76k|}
ml_kem.c:hash_g:
  738|  1.47k|{
  739|  1.47k|    return EVP_DigestInit_ex(mdctx, key->sha3_512_md, NULL)
  ------------------
  |  Branch (739:12): [True: 1.47k, False: 0]
  ------------------
  740|  1.47k|        && single_keccak(out, ML_KEM_SEED_BYTES, in, len, mdctx);
  ------------------
  |  |   48|  1.47k|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (740:12): [True: 1.47k, False: 0]
  ------------------
  741|  1.47k|}
ml_kem.c:gencbd_vector_ntt:
 1456|  2.95k|{
 1457|  2.95k|    uint8_t input[ML_KEM_RANDOM_BYTES + 1];
 1458|       |
 1459|  2.95k|    memcpy(input, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.95k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1460|  8.86k|    do {
 1461|  8.86k|        input[ML_KEM_RANDOM_BYTES] = (*counter)++;
  ------------------
  |  |   47|  8.86k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1462|  8.86k|        if (!cbd(out, input, mdctx, key))
  ------------------
  |  Branch (1462:13): [True: 0, False: 8.86k]
  ------------------
 1463|      0|            return 0;
 1464|  8.86k|        scalar_ntt(out++);
 1465|  8.86k|    } while (--rank > 0);
  ------------------
  |  Branch (1465:14): [True: 5.91k, False: 2.95k]
  ------------------
 1466|  2.95k|    return 1;
 1467|  2.95k|}
ml_kem.c:scalar_ntt:
  846|  8.86k|{
  847|  8.86k|    const uint16_t *roots = kNTTRoots;
  848|  8.86k|    uint16_t *end = s->c + DEGREE;
  ------------------
  |  |   41|  8.86k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  8.86k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  849|  8.86k|    int offset = DEGREE / 2;
  ------------------
  |  |   41|  8.86k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  8.86k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  850|       |
  851|  62.0k|    do {
  852|  62.0k|        uint16_t *curr = s->c, *peer;
  853|       |
  854|  1.12M|        do {
  855|  1.12M|            uint16_t *pause = curr + offset, even, odd;
  856|  1.12M|            uint32_t zeta = *++roots;
  857|       |
  858|  1.12M|            peer = pause;
  859|  7.93M|            do {
  860|  7.93M|                even = *curr;
  861|  7.93M|                odd = reduce(*peer * zeta);
  862|  7.93M|                *peer++ = reduce_once(even - odd + kPrime);
  863|  7.93M|                *curr++ = reduce_once(odd + even);
  864|  7.93M|            } while (curr < pause);
  ------------------
  |  Branch (864:22): [True: 6.81M, False: 1.12M]
  ------------------
  865|  1.12M|        } while ((curr = peer) < end);
  ------------------
  |  Branch (865:18): [True: 1.06M, False: 62.0k]
  ------------------
  866|  62.0k|    } while ((offset >>= 1) >= 2);
  ------------------
  |  Branch (866:14): [True: 53.1k, False: 8.86k]
  ------------------
  867|  8.86k|}
ml_kem.c:reduce:
  817|  13.0M|{
  818|  13.0M|    uint64_t product = (uint64_t)x * kBarrettMultiplier;
  819|  13.0M|    uint32_t quotient = (uint32_t)(product >> kBarrettShift);
  820|  13.0M|    uint32_t remainder = x - quotient * kPrime;
  821|       |
  822|  13.0M|    return reduce_once(remainder);
  823|  13.0M|}
ml_kem.c:reduce_once:
  803|  28.9M|{
  804|  28.9M|    const uint16_t subtracted = x - kPrime;
  805|  28.9M|    uint16_t mask = constish_time_non_zero(subtracted >> 15);
  ------------------
  |  |   70|  28.9M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
  806|       |
  807|  28.9M|    return (mask & x) | (~mask & subtracted);
  808|  28.9M|}
ml_kem.c:matrix_mult_transpose_add:
 1298|  1.47k|{
 1299|  1.47k|    const scalar *mc = m, *mr, *ar;
 1300|  1.47k|    int i, j;
 1301|       |
 1302|  5.90k|    for (i = rank; i-- > 0; ++out) {
  ------------------
  |  Branch (1302:20): [True: 4.43k, False: 1.47k]
  ------------------
 1303|  4.43k|        scalar_mult_add(out, mr = mc++, ar = a);
 1304|  13.3k|        for (j = rank; --j > 0;)
  ------------------
  |  Branch (1304:24): [True: 8.93k, False: 4.43k]
  ------------------
 1305|  8.93k|            scalar_mult_add(out, (mr += rank), ++ar);
 1306|  4.43k|    }
 1307|  1.47k|}
ml_kem.c:scalar_mult_add:
  951|  13.3k|{
  952|  13.3k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  13.3k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  13.3k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  953|  13.3k|    const uint16_t *lc = lhs->c, *rc = rhs->c;
  954|  13.3k|    const uint16_t *roots = kModRoots;
  955|       |
  956|  1.71M|    do {
  957|  1.71M|        uint32_t l0 = *lc++, r0 = *rc++;
  958|  1.71M|        uint32_t l1 = *lc++, r1 = *rc++;
  959|  1.71M|        uint16_t *c0 = curr++;
  960|  1.71M|        uint16_t *c1 = curr++;
  961|  1.71M|        uint32_t zetapow = *roots++;
  962|       |
  963|  1.71M|        *c0 = reduce(*c0 + l0 * r0 + reduce(l1 * r1) * zetapow);
  964|  1.71M|        *c1 = reduce(*c1 + l0 * r1 + l1 * r0);
  965|  1.71M|    } while (curr < end);
  ------------------
  |  Branch (965:14): [True: 1.69M, False: 13.3k]
  ------------------
  966|  13.3k|}
ml_kem.c:hash_h_pubkey:
  709|  1.47k|{
  710|  1.47k|    const ML_KEM_VINFO *vinfo = key->vinfo;
  711|  1.47k|    const scalar *t = key->t, *end = t + vinfo->rank;
  712|  1.47k|    unsigned int sz;
  713|       |
  714|  1.47k|    if (!EVP_DigestInit_ex(mdctx, key->sha3_256_md, NULL))
  ------------------
  |  Branch (714:9): [True: 0, False: 1.47k]
  ------------------
  715|      0|        return 0;
  716|       |
  717|  4.43k|    do {
  718|  4.43k|        uint8_t buf[3 * DEGREE / 2];
  719|       |
  720|  4.43k|        scalar_encode(buf, t++, 12);
  721|  4.43k|        if (!EVP_DigestUpdate(mdctx, buf, sizeof(buf)))
  ------------------
  |  Branch (721:13): [True: 0, False: 4.43k]
  ------------------
  722|      0|            return 0;
  723|  4.43k|    } while (t < end);
  ------------------
  |  Branch (723:14): [True: 2.95k, False: 1.47k]
  ------------------
  724|       |
  725|  1.47k|    if (!EVP_DigestUpdate(mdctx, key->rho, ML_KEM_RANDOM_BYTES))
  ------------------
  |  |   47|  1.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (725:9): [True: 0, False: 1.47k]
  ------------------
  726|      0|        return 0;
  727|  1.47k|    return EVP_DigestFinal_ex(mdctx, pkhash, &sz)
  ------------------
  |  Branch (727:12): [True: 1.47k, False: 0]
  ------------------
  728|  1.47k|        && ossl_assert(sz == ML_KEM_PKHASH_BYTES);
  ------------------
  |  |   52|  1.47k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 1.47k, False: 0]
  |  |  ------------------
  |  |   53|  1.47k|    __FILE__, __LINE__)
  ------------------
  729|  1.47k|}

CRYPTO_ctr128_encrypt_ctr32:
  155|  26.1k|{
  156|  26.1k|    unsigned int n, ctr32;
  157|       |
  158|  26.1k|    n = *num;
  159|       |
  160|  26.1k|    while (n && len) {
  ------------------
  |  Branch (160:12): [True: 0, False: 26.1k]
  |  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|  26.1k|    ctr32 = GETU32(ivec + 12);
  ------------------
  |  |   98|  26.1k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  167|  48.9k|    while (len >= 16) {
  ------------------
  |  Branch (167:12): [True: 22.8k, False: 26.1k]
  ------------------
  168|  22.8k|        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|  22.8k|        if (sizeof(size_t) > sizeof(unsigned int) && blocks > (1U << 28))
  ------------------
  |  Branch (174:13): [True: 22.8k, Folded]
  |  Branch (174:54): [True: 0, False: 22.8k]
  ------------------
  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|  22.8k|        ctr32 += (u32)blocks;
  183|  22.8k|        if (ctr32 < blocks) {
  ------------------
  |  Branch (183:13): [True: 0, False: 22.8k]
  ------------------
  184|      0|            blocks -= ctr32;
  185|      0|            ctr32 = 0;
  186|      0|        }
  187|  22.8k|        (*func)(in, out, blocks, key, ivec);
  188|       |        /* (*ctr) does not update ivec, caller does: */
  189|  22.8k|        PUTU32(ivec + 12, ctr32);
  ------------------
  |  |   99|  22.8k|#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|  22.8k|        if (ctr32 == 0)
  ------------------
  |  Branch (191:13): [True: 0, False: 22.8k]
  ------------------
  192|      0|            ctr96_inc(ivec);
  193|  22.8k|        blocks *= 16;
  194|  22.8k|        len -= blocks;
  195|  22.8k|        out += blocks;
  196|  22.8k|        in += blocks;
  197|  22.8k|    }
  198|  26.1k|    if (len) {
  ------------------
  |  Branch (198:9): [True: 3.70k, False: 22.4k]
  ------------------
  199|  3.70k|        memset(ecount_buf, 0, 16);
  200|  3.70k|        (*func)(ecount_buf, ecount_buf, 1, key, ivec);
  201|  3.70k|        ++ctr32;
  202|  3.70k|        PUTU32(ivec + 12, ctr32);
  ------------------
  |  |   99|  3.70k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  203|  3.70k|        if (ctr32 == 0)
  ------------------
  |  Branch (203:13): [True: 0, False: 3.70k]
  ------------------
  204|      0|            ctr96_inc(ivec);
  205|  17.9k|        while (len--) {
  ------------------
  |  Branch (205:16): [True: 14.2k, False: 3.70k]
  ------------------
  206|  14.2k|            out[n] = in[n] ^ ecount_buf[n];
  207|  14.2k|            ++n;
  208|  14.2k|        }
  209|  3.70k|    }
  210|       |
  211|  26.1k|    *num = n;
  212|  26.1k|}

openssl_fopen:
   39|  6.72k|{
   40|  6.72k|    FILE *file = NULL;
   41|       |#if defined(_WIN32) && defined(CP_UTF8)
   42|       |    int sz, len_0;
   43|       |    DWORD flags;
   44|       |#endif
   45|       |
   46|  6.72k|    if (filename == NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 6.72k]
  ------------------
   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|  6.72k|    file = fopen(filename, mode);
  115|  6.72k|#endif
  116|  6.72k|    return file;
  117|  6.72k|}

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

OBJ_NAME_init:
   64|   656k|{
   65|   656k|    return RUN_ONCE(&init, o_names_init);
  ------------------
  |  |  130|   656k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 656k, False: 0]
  |  |  ------------------
  ------------------
   66|   656k|}
OBJ_NAME_get:
  153|   656k|{
  154|   656k|    OBJ_NAME on, *ret;
  155|   656k|    int num = 0, alias;
  156|   656k|    const char *value = NULL;
  157|       |
  158|   656k|    if (name == NULL)
  ------------------
  |  Branch (158:9): [True: 0, False: 656k]
  ------------------
  159|      0|        return NULL;
  160|   656k|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (160:9): [True: 0, False: 656k]
  ------------------
  161|      0|        return NULL;
  162|   656k|    if (!CRYPTO_THREAD_read_lock(obj_lock))
  ------------------
  |  Branch (162:9): [True: 0, False: 656k]
  ------------------
  163|      0|        return NULL;
  164|       |
  165|   656k|    alias = type & OBJ_NAME_ALIAS;
  ------------------
  |  |   33|   656k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  166|   656k|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|   656k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  167|       |
  168|   656k|    on.name = name;
  169|   656k|    on.type = type;
  170|       |
  171|   715k|    for (;;) {
  172|   715k|        ret = lh_OBJ_NAME_retrieve(names_lh, &on);
  173|   715k|        if (ret == NULL)
  ------------------
  |  Branch (173:13): [True: 98.9k, False: 617k]
  ------------------
  174|  98.9k|            break;
  175|   617k|        if ((ret->alias) && !alias) {
  ------------------
  |  Branch (175:13): [True: 59.8k, False: 557k]
  |  Branch (175:29): [True: 59.8k, False: 0]
  ------------------
  176|  59.8k|            if (++num > 10)
  ------------------
  |  Branch (176:17): [True: 0, False: 59.8k]
  ------------------
  177|      0|                break;
  178|  59.8k|            on.name = ret->data;
  179|   557k|        } else {
  180|   557k|            value = ret->data;
  181|   557k|            break;
  182|   557k|        }
  183|   617k|    }
  184|       |
  185|   656k|    CRYPTO_THREAD_unlock(obj_lock);
  186|   656k|    return value;
  187|   656k|}
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));
  ------------------
  |  |  106|    424|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|    182|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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_remove:
  245|    242|{
  246|    242|    OBJ_NAME on, *ret;
  247|    242|    int ok = 0;
  248|       |
  249|    242|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (249:9): [True: 0, False: 242]
  ------------------
  250|      0|        return 0;
  251|       |
  252|    242|    if (!CRYPTO_THREAD_write_lock(obj_lock))
  ------------------
  |  Branch (252:9): [True: 0, False: 242]
  ------------------
  253|      0|        return 0;
  254|       |
  255|    242|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    242|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  256|    242|    on.name = name;
  257|    242|    on.type = type;
  258|    242|    ret = lh_OBJ_NAME_delete(names_lh, &on);
  259|    242|    if (ret != NULL) {
  ------------------
  |  Branch (259:9): [True: 242, False: 0]
  ------------------
  260|       |        /* free things */
  261|    242|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (261:13): [True: 0, False: 242]
  ------------------
  262|      0|            && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) {
  ------------------
  |  Branch (262:16): [True: 0, False: 0]
  ------------------
  263|       |            /*
  264|       |             * XXX: I'm not sure I understand why the free function should
  265|       |             * get three arguments... -- Richard Levitte
  266|       |             */
  267|      0|            sk_NAME_FUNCS_value(name_funcs_stack,
  268|      0|                ret->type)
  269|      0|                ->free_func(ret->name, ret->type,
  270|      0|                    ret->data);
  271|      0|        }
  272|    242|        OPENSSL_free(ret);
  ------------------
  |  |  131|    242|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  273|    242|        ok = 1;
  274|    242|    }
  275|       |
  276|    242|    CRYPTO_THREAD_unlock(obj_lock);
  277|    242|    return ok;
  278|    242|}
OBJ_NAME_do_all:
  296|  1.26k|{
  297|  1.26k|    OBJ_DOALL d;
  298|       |
  299|  1.26k|    d.type = type;
  300|  1.26k|    d.fn = fn;
  301|  1.26k|    d.arg = arg;
  302|       |
  303|  1.26k|    lh_OBJ_NAME_doall_OBJ_DOALL(names_lh, do_all_fn, &d);
  304|  1.26k|}
OBJ_NAME_cleanup:
  370|      4|{
  371|      4|    unsigned long down_load;
  372|       |
  373|      4|    if (names_lh == NULL)
  ------------------
  |  Branch (373:9): [True: 0, False: 4]
  ------------------
  374|      0|        return;
  375|       |
  376|      4|    free_type = type;
  377|      4|    down_load = lh_OBJ_NAME_get_down_load(names_lh);
  378|      4|    lh_OBJ_NAME_set_down_load(names_lh, 0);
  379|       |
  380|      4|    lh_OBJ_NAME_doall(names_lh, names_lh_free_doall);
  381|      4|    if (type < 0) {
  ------------------
  |  Branch (381:9): [True: 1, False: 3]
  ------------------
  382|      1|        lh_OBJ_NAME_free(names_lh);
  383|      1|        sk_NAME_FUNCS_pop_free(name_funcs_stack, name_funcs_free);
  384|      1|        CRYPTO_THREAD_lock_free(obj_lock);
  385|      1|        names_lh = NULL;
  386|      1|        name_funcs_stack = NULL;
  387|      1|        obj_lock = NULL;
  388|      1|    } else
  389|      3|        lh_OBJ_NAME_set_down_load(names_lh, down_load);
  390|      4|}
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|   716k|{
  138|   716k|    unsigned long ret;
  139|       |
  140|   716k|    if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 716k]
  ------------------
  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|   716k|    } else {
  146|   716k|        ret = ossl_lh_strcasehash(a->name);
  147|   716k|    }
  148|   716k|    ret ^= a->type;
  149|   716k|    return ret;
  150|   716k|}
o_names.c:obj_name_cmp:
  120|   617k|{
  121|   617k|    int ret;
  122|       |
  123|   617k|    ret = a->type - b->type;
  124|   617k|    if (ret == 0) {
  ------------------
  |  Branch (124:9): [True: 617k, False: 0]
  ------------------
  125|   617k|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (125:13): [True: 0, False: 617k]
  ------------------
  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|   617k|            ret = OPENSSL_strcasecmp(a->name, b->name);
  132|   617k|    }
  133|   617k|    return ret;
  134|   617k|}
o_names.c:do_all_fn:
  287|   304k|{
  288|   304k|    if (name->type == d->type)
  ------------------
  |  Branch (288:9): [True: 152k, False: 152k]
  ------------------
  289|   152k|        d->fn(name, d->arg);
  290|   304k|}
o_names.c:names_lh_free_doall:
  356|    543|{
  357|    543|    if (onp == NULL)
  ------------------
  |  Branch (357:9): [True: 0, False: 543]
  ------------------
  358|      0|        return;
  359|       |
  360|    543|    if (free_type < 0 || free_type == onp->type)
  ------------------
  |  Branch (360:9): [True: 0, False: 543]
  |  Branch (360:26): [True: 242, False: 301]
  ------------------
  361|    242|        OBJ_NAME_remove(onp->name, onp->type);
  362|    543|}

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

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:
   17|  3.16M|{
   18|  3.16M|    ASN1_OBJECT *r;
   19|       |
   20|  3.16M|    if (o == NULL)
  ------------------
  |  Branch (20:9): [True: 0, False: 3.16M]
  ------------------
   21|      0|        return NULL;
   22|       |    /* If object isn't dynamic it's an internal OID which is never freed */
   23|  3.16M|    if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC))
  ------------------
  |  |  110|  3.16M|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (23:9): [True: 3.16M, False: 0]
  ------------------
   24|  3.16M|        return (ASN1_OBJECT *)o;
   25|       |
   26|      0|    r = ASN1_OBJECT_new();
   27|      0|    if (r == NULL) {
  ------------------
  |  Branch (27:9): [True: 0, False: 0]
  ------------------
   28|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   29|      0|        return NULL;
   30|      0|    }
   31|       |
   32|       |    /* Set dynamic flags so everything gets freed up on error */
   33|       |
   34|      0|    r->flags = o->flags | (ASN1_OBJECT_FLAG_DYNAMIC | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS | ASN1_OBJECT_FLAG_DYNAMIC_DATA);
  ------------------
  |  |  110|      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);
  ------------------
  |  |  112|      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);
  ------------------
  |  |  113|      0|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
   35|       |
   36|      0|    if (o->length > 0 && (r->data = OPENSSL_memdup(o->data, o->length)) == NULL)
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (36:9): [True: 0, False: 0]
  |  Branch (36:26): [True: 0, False: 0]
  ------------------
   37|      0|        goto err;
   38|       |
   39|      0|    r->length = o->length;
   40|      0|    r->nid = o->nid;
   41|       |
   42|      0|    if (o->ln != NULL && (r->ln = OPENSSL_strdup(o->ln)) == NULL)
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (42:9): [True: 0, False: 0]
  |  Branch (42:26): [True: 0, False: 0]
  ------------------
   43|      0|        goto err;
   44|       |
   45|      0|    if (o->sn != NULL && (r->sn = OPENSSL_strdup(o->sn)) == NULL)
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (45:9): [True: 0, False: 0]
  |  Branch (45:26): [True: 0, False: 0]
  ------------------
   46|      0|        goto err;
   47|       |
   48|      0|    return r;
   49|      0|err:
   50|      0|    ASN1_OBJECT_free(r);
   51|       |    return NULL;
   52|      0|}

OBJ_find_sigid_algs:
  104|   756k|{
  105|   756k|    return ossl_obj_find_sigid_algs(signid, pdig_nid, ppkey_nid, 1);
  106|   756k|}
OBJ_add_sigid:
  148|  8.11k|{
  149|  8.11k|    nid_triple *ntr;
  150|  8.11k|    int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  8.11k|#define NID_undef                       0
  ------------------
                  int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  8.11k|#define NID_undef                       0
  ------------------
  151|       |
  152|  8.11k|    if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  16.2k|#define NID_undef                       0
  ------------------
                  if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  8.11k|#define NID_undef                       0
  ------------------
  |  Branch (152:9): [True: 0, False: 8.11k]
  |  Branch (152:32): [True: 0, False: 8.11k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|  8.11k|    if (!obj_sig_init())
  ------------------
  |  Branch (155:9): [True: 0, False: 8.11k]
  ------------------
  156|      0|        return 0;
  157|       |
  158|  8.11k|    if ((ntr = OPENSSL_malloc(sizeof(*ntr))) == NULL)
  ------------------
  |  |  106|  8.11k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (158:9): [True: 0, False: 8.11k]
  ------------------
  159|      0|        return 0;
  160|  8.11k|    ntr->sign_id = signid;
  161|  8.11k|    ntr->hash_id = dig_id;
  162|  8.11k|    ntr->pkey_id = pkey_id;
  163|       |
  164|  8.11k|    if (!CRYPTO_THREAD_write_lock(sig_lock)) {
  ------------------
  |  Branch (164:9): [True: 0, False: 8.11k]
  ------------------
  165|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_WRITE_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|        OPENSSL_free(ntr);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|      0|        return 0;
  168|      0|    }
  169|       |
  170|       |    /* Check that the entry doesn't exist or exists as desired */
  171|  8.11k|    if (ossl_obj_find_sigid_algs(signid, &dnid, &pnid, 0)) {
  ------------------
  |  Branch (171:9): [True: 8.11k, False: 0]
  ------------------
  172|  8.11k|        ret = dnid == dig_id && pnid == pkey_id;
  ------------------
  |  Branch (172:15): [True: 8.11k, False: 0]
  |  Branch (172:33): [True: 8.11k, False: 0]
  ------------------
  173|  8.11k|        goto err;
  174|  8.11k|    }
  175|       |
  176|      0|    if (sig_app == NULL) {
  ------------------
  |  Branch (176:9): [True: 0, False: 0]
  ------------------
  177|      0|        sig_app = sk_nid_triple_new(sig_sk_cmp);
  178|      0|        if (sig_app == NULL)
  ------------------
  |  Branch (178:13): [True: 0, False: 0]
  ------------------
  179|      0|            goto err;
  180|      0|    }
  181|      0|    if (sigx_app == NULL) {
  ------------------
  |  Branch (181:9): [True: 0, False: 0]
  ------------------
  182|      0|        sigx_app = sk_nid_triple_new(sigx_cmp);
  183|      0|        if (sigx_app == NULL)
  ------------------
  |  Branch (183:13): [True: 0, False: 0]
  ------------------
  184|      0|            goto err;
  185|      0|    }
  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|      0|    if (!sk_nid_triple_push(sig_app, ntr))
  ------------------
  |  Branch (191:9): [True: 0, False: 0]
  ------------------
  192|      0|        goto err;
  193|      0|    if (!sk_nid_triple_push(sigx_app, ntr)) {
  ------------------
  |  Branch (193:9): [True: 0, False: 0]
  ------------------
  194|      0|        ntr = NULL; /* This is referenced by sig_app still */
  195|      0|        goto err;
  196|      0|    }
  197|       |
  198|      0|    sk_nid_triple_sort(sig_app);
  199|      0|    sk_nid_triple_sort(sigx_app);
  200|       |
  201|      0|    ntr = NULL;
  202|      0|    ret = 1;
  203|  8.11k|err:
  204|  8.11k|    OPENSSL_free(ntr);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|  8.11k|    CRYPTO_THREAD_unlock(sig_lock);
  206|  8.11k|    return ret;
  207|      0|}
OBJ_sigid_free:
  215|      1|{
  216|      1|    sk_nid_triple_pop_free(sig_app, sid_free);
  217|      1|    sk_nid_triple_free(sigx_app);
  218|      1|    CRYPTO_THREAD_lock_free(sig_lock);
  219|      1|    sig_app = NULL;
  220|      1|    sigx_app = NULL;
  221|       |    sig_lock = NULL;
  222|      1|}
obj_xref.c:ossl_obj_find_sigid_algs:
   68|   764k|{
   69|   764k|    nid_triple tmp;
   70|   764k|    const nid_triple *rv;
   71|   764k|    int idx;
   72|       |
   73|   764k|    if (signid == NID_undef)
  ------------------
  |  |   18|   764k|#define NID_undef                       0
  ------------------
  |  Branch (73:9): [True: 0, False: 764k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|   764k|    tmp.sign_id = signid;
   77|   764k|    rv = OBJ_bsearch_sig(&tmp, sigoid_srt, OSSL_NELEM(sigoid_srt));
  ------------------
  |  |   14|   764k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   78|   764k|    if (rv == NULL) {
  ------------------
  |  Branch (78:9): [True: 0, False: 764k]
  ------------------
   79|      0|        if (!obj_sig_init())
  ------------------
  |  Branch (79:13): [True: 0, False: 0]
  ------------------
   80|      0|            return 0;
   81|      0|        if (lock && !CRYPTO_THREAD_read_lock(sig_lock)) {
  ------------------
  |  Branch (81:13): [True: 0, False: 0]
  |  Branch (81:21): [True: 0, False: 0]
  ------------------
   82|      0|            ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   83|      0|            return 0;
   84|      0|        }
   85|      0|        if (sig_app != NULL) {
  ------------------
  |  Branch (85:13): [True: 0, False: 0]
  ------------------
   86|      0|            idx = sk_nid_triple_find(sig_app, &tmp);
   87|      0|            if (idx >= 0)
  ------------------
  |  Branch (87:17): [True: 0, False: 0]
  ------------------
   88|      0|                rv = sk_nid_triple_value(sig_app, idx);
   89|      0|        }
   90|      0|        if (lock)
  ------------------
  |  Branch (90:13): [True: 0, False: 0]
  ------------------
   91|      0|            CRYPTO_THREAD_unlock(sig_lock);
   92|      0|        if (rv == NULL)
  ------------------
  |  Branch (92:13): [True: 0, False: 0]
  ------------------
   93|      0|            return 0;
   94|      0|    }
   95|       |
   96|   764k|    if (pdig_nid != NULL)
  ------------------
  |  Branch (96:9): [True: 386k, False: 378k]
  ------------------
   97|   386k|        *pdig_nid = rv->hash_id;
   98|   764k|    if (ppkey_nid != NULL)
  ------------------
  |  Branch (98:9): [True: 764k, False: 0]
  ------------------
   99|   764k|        *ppkey_nid = rv->pkey_id;
  100|   764k|    return 1;
  101|   764k|}
obj_xref.c:sig_cmp:
   20|  3.91M|{
   21|  3.91M|    return a->sign_id - b->sign_id;
   22|  3.91M|}
obj_xref.c:obj_sig_init:
   62|  8.11k|{
   63|  8.11k|    return RUN_ONCE(&sig_init, o_sig_init);
  ------------------
  |  |  130|  8.11k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 8.11k, False: 0]
  |  |  ------------------
  ------------------
   64|  8.11k|}
obj_xref.c:o_sig_init:
   56|      1|{
   57|      1|    sig_lock = CRYPTO_THREAD_lock_new();
   58|       |    return sig_lock != NULL;
   59|      1|}

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.18M|{
   21|  1.18M|    if (!WPACKET_reserve_bytes(pkt, len, allocbytes))
  ------------------
  |  Branch (21:9): [True: 0, False: 1.18M]
  ------------------
   22|      0|        return 0;
   23|       |
   24|  1.18M|    pkt->written += len;
   25|  1.18M|    pkt->curr += len;
   26|  1.18M|    return 1;
   27|  1.18M|}
WPACKET_sub_allocate_bytes__:
   31|    246|{
   32|    246|    if (!WPACKET_start_sub_packet_len__(pkt, lenbytes)
  ------------------
  |  Branch (32:9): [True: 0, False: 246]
  ------------------
   33|    246|        || !WPACKET_allocate_bytes(pkt, len, allocbytes)
  ------------------
  |  Branch (33:12): [True: 0, False: 246]
  ------------------
   34|    246|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (34:12): [True: 0, False: 246]
  ------------------
   35|      0|        return 0;
   36|       |
   37|    246|    return 1;
   38|    246|}
WPACKET_reserve_bytes:
   47|  1.19M|{
   48|       |    /* Internal API, so should not fail */
   49|  1.19M|    if (!ossl_assert(pkt->subs != NULL && len != 0))
  ------------------
  |  |   52|  2.38M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 1.19M, False: 0]
  |  |  |  Branch (52:41): [True: 1.19M, False: 0]
  |  |  ------------------
  |  |   53|  1.19M|    __FILE__, __LINE__)
  ------------------
  |  Branch (49:9): [True: 0, False: 1.19M]
  ------------------
   50|      0|        return 0;
   51|       |
   52|  1.19M|    if (pkt->maxsize - pkt->written < len)
  ------------------
  |  Branch (52:9): [True: 0, False: 1.19M]
  ------------------
   53|      0|        return 0;
   54|       |
   55|  1.19M|    if (pkt->buf != NULL && (pkt->buf->length - pkt->written < len)) {
  ------------------
  |  Branch (55:9): [True: 209k, False: 982k]
  |  Branch (55:29): [True: 0, False: 209k]
  ------------------
   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.19M|    if (allocbytes != NULL) {
  ------------------
  |  Branch (71:9): [True: 1.18M, False: 3.63k]
  ------------------
   72|  1.18M|        *allocbytes = WPACKET_get_curr(pkt);
   73|  1.18M|        if (pkt->endfirst && *allocbytes != NULL)
  ------------------
  |  Branch (73:13): [True: 0, False: 1.18M]
  |  Branch (73:30): [True: 0, False: 0]
  ------------------
   74|      0|            *allocbytes -= len;
   75|  1.18M|    }
   76|       |
   77|  1.19M|    return 1;
   78|  1.19M|}
WPACKET_init_static_len:
  131|  3.63k|{
  132|  3.63k|    size_t max = maxmaxsize(lenbytes);
  133|       |
  134|       |    /* Internal API, so should not fail */
  135|  3.63k|    if (!ossl_assert(buf != NULL && len > 0))
  ------------------
  |  |   52|  7.27k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 3.63k, False: 0]
  |  |  |  Branch (52:41): [True: 3.63k, False: 0]
  |  |  ------------------
  |  |   53|  3.63k|    __FILE__, __LINE__)
  ------------------
  |  Branch (135:9): [True: 0, False: 3.63k]
  ------------------
  136|      0|        return 0;
  137|       |
  138|  3.63k|    pkt->staticbuf = buf;
  139|  3.63k|    pkt->buf = NULL;
  140|  3.63k|    pkt->maxsize = (max < len) ? max : len;
  ------------------
  |  Branch (140:20): [True: 0, False: 3.63k]
  ------------------
  141|  3.63k|    pkt->endfirst = 0;
  142|       |
  143|  3.63k|    return wpacket_intern_init_len(pkt, lenbytes);
  144|  3.63k|}
WPACKET_init_len:
  161|  1.95k|{
  162|       |    /* Internal API, so should not fail */
  163|  1.95k|    if (!ossl_assert(buf != NULL))
  ------------------
  |  |   52|  1.95k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.95k|    __FILE__, __LINE__)
  ------------------
  |  Branch (163:9): [True: 0, False: 1.95k]
  ------------------
  164|      0|        return 0;
  165|       |
  166|  1.95k|    pkt->staticbuf = NULL;
  167|  1.95k|    pkt->buf = buf;
  168|  1.95k|    pkt->maxsize = maxmaxsize(lenbytes);
  169|  1.95k|    pkt->endfirst = 0;
  170|       |
  171|  1.95k|    return wpacket_intern_init_len(pkt, lenbytes);
  172|  1.95k|}
WPACKET_init:
  175|  1.95k|{
  176|  1.95k|    return WPACKET_init_len(pkt, buf, 0);
  177|  1.95k|}
WPACKET_init_null:
  180|   120k|{
  181|   120k|    pkt->staticbuf = NULL;
  182|   120k|    pkt->buf = NULL;
  183|   120k|    pkt->maxsize = maxmaxsize(lenbytes);
  184|   120k|    pkt->endfirst = 0;
  185|       |
  186|   120k|    return wpacket_intern_init_len(pkt, 0);
  187|   120k|}
WPACKET_set_flags:
  200|  3.76k|{
  201|       |    /* Internal API, so should not fail */
  202|  3.76k|    if (!ossl_assert(pkt->subs != NULL))
  ------------------
  |  |   52|  3.76k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.76k|    __FILE__, __LINE__)
  ------------------
  |  Branch (202:9): [True: 0, False: 3.76k]
  ------------------
  203|      0|        return 0;
  204|       |
  205|  3.76k|    pkt->subs->flags = flags;
  206|       |
  207|  3.76k|    return 1;
  208|  3.76k|}
WPACKET_close:
  336|   406k|{
  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|   406k|    if (pkt->subs == NULL || pkt->subs->parent == NULL)
  ------------------
  |  Branch (341:9): [True: 0, False: 406k]
  |  Branch (341:30): [True: 0, False: 406k]
  ------------------
  342|      0|        return 0;
  343|       |
  344|   406k|    return wpacket_intern_close(pkt, pkt->subs, 1);
  345|   406k|}
WPACKET_finish:
  348|   125k|{
  349|   125k|    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|   125k|    if (pkt->subs == NULL || pkt->subs->parent != NULL)
  ------------------
  |  Branch (355:9): [True: 0, False: 125k]
  |  Branch (355:30): [True: 0, False: 125k]
  ------------------
  356|      0|        return 0;
  357|       |
  358|   125k|    ret = wpacket_intern_close(pkt, pkt->subs, 1);
  359|   125k|    if (ret) {
  ------------------
  |  Branch (359:9): [True: 125k, False: 0]
  ------------------
  360|   125k|        OPENSSL_free(pkt->subs);
  ------------------
  |  |  131|   125k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  361|   125k|        pkt->subs = NULL;
  362|   125k|    }
  363|       |
  364|   125k|    return ret;
  365|   125k|}
WPACKET_start_sub_packet_len__:
  368|   406k|{
  369|   406k|    WPACKET_SUB *sub;
  370|   406k|    unsigned char *lenchars;
  371|       |
  372|       |    /* Internal API, so should not fail */
  373|   406k|    if (!ossl_assert(pkt->subs != NULL))
  ------------------
  |  |   52|   406k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   406k|    __FILE__, __LINE__)
  ------------------
  |  Branch (373:9): [True: 0, False: 406k]
  ------------------
  374|      0|        return 0;
  375|       |
  376|       |    /* We don't support lenbytes greater than 0 when doing endfirst writing */
  377|   406k|    if (lenbytes > 0 && pkt->endfirst)
  ------------------
  |  Branch (377:9): [True: 46.3k, False: 360k]
  |  Branch (377:25): [True: 0, False: 46.3k]
  ------------------
  378|      0|        return 0;
  379|       |
  380|   406k|    if ((sub = OPENSSL_zalloc(sizeof(*sub))) == NULL)
  ------------------
  |  |  108|   406k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (380:9): [True: 0, False: 406k]
  ------------------
  381|      0|        return 0;
  382|       |
  383|   406k|    sub->parent = pkt->subs;
  384|   406k|    pkt->subs = sub;
  385|   406k|    sub->pwritten = pkt->written + lenbytes;
  386|   406k|    sub->lenbytes = lenbytes;
  387|       |
  388|   406k|    if (lenbytes == 0) {
  ------------------
  |  Branch (388:9): [True: 360k, False: 46.3k]
  ------------------
  389|   360k|        sub->packet_len = 0;
  390|   360k|        return 1;
  391|   360k|    }
  392|       |
  393|  46.3k|    sub->packet_len = pkt->written;
  394|       |
  395|  46.3k|    if (!WPACKET_allocate_bytes(pkt, lenbytes, &lenchars))
  ------------------
  |  Branch (395:9): [True: 0, False: 46.3k]
  ------------------
  396|      0|        return 0;
  397|       |
  398|  46.3k|    return 1;
  399|  46.3k|}
WPACKET_start_sub_packet:
  402|   360k|{
  403|   360k|    return WPACKET_start_sub_packet_len__(pkt, 0);
  404|   360k|}
WPACKET_put_bytes__:
  407|   883k|{
  408|   883k|    unsigned char *data;
  409|       |
  410|       |    /* Internal API, so should not fail */
  411|   883k|    if (!ossl_assert(size <= sizeof(uint64_t))
  ------------------
  |  |   52|  1.76M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.76M|    __FILE__, __LINE__)
  ------------------
  |  Branch (411:9): [True: 0, False: 883k]
  ------------------
  412|   883k|        || !WPACKET_allocate_bytes(pkt, size, &data)
  ------------------
  |  Branch (412:12): [True: 0, False: 883k]
  ------------------
  413|   883k|        || !put_value(data, val, size))
  ------------------
  |  Branch (413:12): [True: 0, False: 883k]
  ------------------
  414|      0|        return 0;
  415|       |
  416|   883k|    return 1;
  417|   883k|}
WPACKET_memcpy:
  461|  14.1k|{
  462|  14.1k|    unsigned char *dest;
  463|       |
  464|  14.1k|    if (len == 0)
  ------------------
  |  Branch (464:9): [True: 0, False: 14.1k]
  ------------------
  465|      0|        return 1;
  466|       |
  467|  14.1k|    if (!WPACKET_allocate_bytes(pkt, len, &dest))
  ------------------
  |  Branch (467:9): [True: 0, False: 14.1k]
  ------------------
  468|      0|        return 0;
  469|       |
  470|  14.1k|    if (dest != NULL)
  ------------------
  |  Branch (470:9): [True: 14.1k, False: 0]
  ------------------
  471|  14.1k|        memcpy(dest, src, len);
  472|       |
  473|  14.1k|    return 1;
  474|  14.1k|}
WPACKET_sub_memcpy__:
  478|  6.63k|{
  479|  6.63k|    if (!WPACKET_start_sub_packet_len__(pkt, lenbytes)
  ------------------
  |  Branch (479:9): [True: 0, False: 6.63k]
  ------------------
  480|  6.63k|        || !WPACKET_memcpy(pkt, src, len)
  ------------------
  |  Branch (480:12): [True: 0, False: 6.63k]
  ------------------
  481|  6.63k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (481:12): [True: 0, False: 6.63k]
  ------------------
  482|      0|        return 0;
  483|       |
  484|  6.63k|    return 1;
  485|  6.63k|}
WPACKET_get_total_written:
  488|   121k|{
  489|       |    /* Internal API, so should not fail */
  490|   121k|    if (!ossl_assert(written != NULL))
  ------------------
  |  |   52|   121k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   121k|    __FILE__, __LINE__)
  ------------------
  |  Branch (490:9): [True: 0, False: 121k]
  ------------------
  491|      0|        return 0;
  492|       |
  493|   121k|    *written = pkt->written;
  494|       |
  495|   121k|    return 1;
  496|   121k|}
WPACKET_get_length:
  499|   129k|{
  500|       |    /* Internal API, so should not fail */
  501|   129k|    if (!ossl_assert(pkt->subs != NULL && len != NULL))
  ------------------
  |  |   52|   258k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 129k, False: 0]
  |  |  |  Branch (52:41): [True: 129k, False: 0]
  |  |  ------------------
  |  |   53|   129k|    __FILE__, __LINE__)
  ------------------
  |  Branch (501:9): [True: 0, False: 129k]
  ------------------
  502|      0|        return 0;
  503|       |
  504|   129k|    *len = pkt->written - pkt->subs->pwritten;
  505|       |
  506|   129k|    return 1;
  507|   129k|}
WPACKET_get_curr:
  510|  1.18M|{
  511|  1.18M|    unsigned char *buf = GETBUF(pkt);
  ------------------
  |  |   40|  1.18M|#define GETBUF(p) (((p)->staticbuf != NULL)         \
  |  |  ------------------
  |  |  |  Branch (40:20): [True: 18.1k, False: 1.16M]
  |  |  ------------------
  |  |   41|  1.18M|        ? (p)->staticbuf                            \
  |  |   42|  1.18M|        : ((p)->buf != NULL                         \
  |  |  ------------------
  |  |  |  Branch (42:12): [True: 209k, False: 960k]
  |  |  ------------------
  |  |   43|  1.16M|                  ? (unsigned char *)(p)->buf->data \
  |  |   44|  1.16M|                  : NULL))
  ------------------
  512|       |
  513|  1.18M|    if (buf == NULL)
  ------------------
  |  Branch (513:9): [True: 960k, False: 227k]
  ------------------
  514|   960k|        return NULL;
  515|       |
  516|   227k|    if (pkt->endfirst)
  ------------------
  |  Branch (516:9): [True: 0, False: 227k]
  ------------------
  517|      0|        return buf + pkt->maxsize - pkt->curr;
  518|       |
  519|   227k|    return buf + pkt->curr;
  520|   227k|}
WPACKET_is_null_buf:
  523|   120k|{
  524|   120k|    return pkt->buf == NULL && pkt->staticbuf == NULL;
  ------------------
  |  Branch (524:12): [True: 120k, False: 0]
  |  Branch (524:32): [True: 120k, False: 0]
  ------------------
  525|   120k|}
WPACKET_cleanup:
  528|  3.75k|{
  529|  3.75k|    WPACKET_SUB *sub, *parent;
  530|       |
  531|  4.20k|    for (sub = pkt->subs; sub != NULL; sub = parent) {
  ------------------
  |  Branch (531:27): [True: 448, False: 3.75k]
  ------------------
  532|    448|        parent = sub->parent;
  533|    448|        OPENSSL_free(sub);
  ------------------
  |  |  131|    448|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  534|    448|    }
  535|       |    pkt->subs = NULL;
  536|  3.75k|}
packet.c:maxmaxsize:
   96|   125k|{
   97|   125k|    if (lenbytes >= sizeof(size_t) || lenbytes == 0)
  ------------------
  |  Branch (97:9): [True: 0, False: 125k]
  |  Branch (97:39): [True: 125k, False: 0]
  ------------------
   98|   125k|        return SIZE_MAX;
   99|       |
  100|      0|    return ((size_t)1 << (lenbytes * 8)) - 1 + lenbytes;
  101|   125k|}
packet.c:wpacket_intern_init_len:
  104|   125k|{
  105|   125k|    unsigned char *lenchars;
  106|       |
  107|   125k|    pkt->curr = 0;
  108|   125k|    pkt->written = 0;
  109|       |
  110|   125k|    if ((pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs))) == NULL)
  ------------------
  |  |  108|   125k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (110:9): [True: 0, False: 125k]
  ------------------
  111|      0|        return 0;
  112|       |
  113|   125k|    if (lenbytes == 0)
  ------------------
  |  Branch (113:9): [True: 125k, False: 0]
  ------------------
  114|   125k|        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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|   531k|{
  252|   531k|    size_t packlen = pkt->written - sub->pwritten;
  253|       |
  254|   531k|    if (packlen == 0
  ------------------
  |  Branch (254:9): [True: 1.88k, False: 529k]
  ------------------
  255|  1.88k|        && (sub->flags & WPACKET_FLAGS_NON_ZERO_LENGTH) != 0)
  ------------------
  |  |  697|  1.88k|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (255:12): [True: 41, False: 1.84k]
  ------------------
  256|     41|        return 0;
  257|       |
  258|   531k|    if (packlen == 0
  ------------------
  |  Branch (258:9): [True: 1.84k, False: 529k]
  ------------------
  259|  1.84k|        && sub->flags & WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH) {
  ------------------
  |  |  703|  1.84k|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  |  Branch (259:12): [True: 0, False: 1.84k]
  ------------------
  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|   531k|    if (sub->lenbytes > 0) {
  ------------------
  |  Branch (276:9): [True: 45.9k, False: 485k]
  ------------------
  277|  45.9k|        unsigned char *buf = GETBUF(pkt);
  ------------------
  |  |   40|  45.9k|#define GETBUF(p) (((p)->staticbuf != NULL)         \
  |  |  ------------------
  |  |  |  Branch (40:20): [True: 3.63k, False: 42.3k]
  |  |  ------------------
  |  |   41|  45.9k|        ? (p)->staticbuf                            \
  |  |   42|  45.9k|        : ((p)->buf != NULL                         \
  |  |  ------------------
  |  |  |  Branch (42:12): [True: 42.3k, False: 0]
  |  |  ------------------
  |  |   43|  42.3k|                  ? (unsigned char *)(p)->buf->data \
  |  |   44|  42.3k|                  : NULL))
  ------------------
  278|       |
  279|  45.9k|        if (buf != NULL) {
  ------------------
  |  Branch (279:13): [True: 45.9k, False: 0]
  ------------------
  280|  45.9k|#if !defined OPENSSL_NO_QUIC && !defined FIPS_MODULE
  281|  45.9k|            if ((sub->flags & WPACKET_FLAGS_QUIC_VLINT) == 0) {
  ------------------
  |  |  706|  45.9k|#define WPACKET_FLAGS_QUIC_VLINT 4
  ------------------
  |  Branch (281:17): [True: 45.9k, False: 0]
  ------------------
  282|  45.9k|                if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes))
  ------------------
  |  Branch (282:21): [True: 0, False: 45.9k]
  ------------------
  283|      0|                    return 0;
  284|  45.9k|            } 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|  45.9k|        }
  293|   485k|    } else if (pkt->endfirst && sub->parent != NULL
  ------------------
  |  Branch (293:16): [True: 0, False: 485k]
  |  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)
  ------------------
  |  |  703|      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))
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (307:17): [True: 0, False: 0]
  ------------------
  308|      0|                return 0;
  309|      0|        }
  310|      0|    }
  311|       |
  312|   531k|    if (doclose) {
  ------------------
  |  Branch (312:9): [True: 531k, False: 0]
  ------------------
  313|   531k|        pkt->subs = sub->parent;
  314|   531k|        OPENSSL_free(sub);
  ------------------
  |  |  131|   531k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  315|   531k|    }
  316|       |
  317|   531k|    return 1;
  318|   531k|}
packet.c:put_value:
  212|   929k|{
  213|   929k|    if (data == NULL)
  ------------------
  |  Branch (213:9): [True: 720k, False: 209k]
  ------------------
  214|   720k|        return 1;
  215|       |
  216|   607k|    for (data += len - 1; len > 0; len--) {
  ------------------
  |  Branch (216:27): [True: 398k, False: 209k]
  ------------------
  217|   398k|        *data = (unsigned char)(value & 0xff);
  218|   398k|        data--;
  219|   398k|        value >>= 8;
  220|   398k|    }
  221|       |
  222|       |    /* Check whether we could fit the value in the assigned number of bytes */
  223|   209k|    if (value > 0)
  ------------------
  |  Branch (223:9): [True: 0, False: 209k]
  ------------------
  224|      0|        return 0;
  225|       |
  226|   209k|    return 1;
  227|   209k|}

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

ossl_param_build_set_int:
   24|   243k|{
   25|   243k|    if (bld != NULL)
  ------------------
  |  Branch (25:9): [True: 0, False: 243k]
  ------------------
   26|      0|        return OSSL_PARAM_BLD_push_int(bld, key, num);
   27|   243k|    p = OSSL_PARAM_locate(p, key);
   28|   243k|    if (p != NULL)
  ------------------
  |  Branch (28:9): [True: 0, False: 243k]
  ------------------
   29|      0|        return OSSL_PARAM_set_int(p, num);
   30|   243k|    return 1;
   31|   243k|}
ossl_param_build_set_utf8_string:
   46|   606k|{
   47|   606k|    if (bld != NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 606k]
  ------------------
   48|      0|        return OSSL_PARAM_BLD_push_utf8_string(bld, key, buf, 0);
   49|   606k|    p = OSSL_PARAM_locate(p, key);
   50|   606k|    if (p != NULL)
  ------------------
  |  Branch (50:9): [True: 0, False: 606k]
  ------------------
   51|      0|        return OSSL_PARAM_set_utf8_string(p, buf);
   52|   606k|    return 1;
   53|   606k|}
ossl_param_build_set_octet_string:
   59|  14.0k|{
   60|  14.0k|    if (bld != NULL)
  ------------------
  |  Branch (60:9): [True: 2.81k, False: 11.2k]
  ------------------
   61|  2.81k|        return OSSL_PARAM_BLD_push_octet_string(bld, key, data, data_len);
   62|       |
   63|  11.2k|    p = OSSL_PARAM_locate(p, key);
   64|  11.2k|    if (p != NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 11.2k]
  ------------------
   65|      0|        return OSSL_PARAM_set_octet_string(p, data, data_len);
   66|  11.2k|    return 1;
   67|  11.2k|}
ossl_param_build_set_bn_pad:
   71|  1.78k|{
   72|  1.78k|    if (bld != NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 1.78k]
  ------------------
   73|      0|        return OSSL_PARAM_BLD_push_BN_pad(bld, key, bn, sz);
   74|  1.78k|    p = OSSL_PARAM_locate(p, key);
   75|  1.78k|    if (p != NULL) {
  ------------------
  |  Branch (75:9): [True: 0, False: 1.78k]
  ------------------
   76|      0|        if (sz > p->data_size) {
  ------------------
  |  Branch (76:13): [True: 0, False: 0]
  ------------------
   77|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   78|      0|            return 0;
   79|      0|        }
   80|      0|        p->data_size = sz;
   81|      0|        return OSSL_PARAM_set_BN(p, bn);
   82|      0|    }
   83|  1.78k|    return 1;
   84|  1.78k|}
ossl_param_build_set_bn:
   88|   634k|{
   89|   634k|    if (bld != NULL)
  ------------------
  |  Branch (89:9): [True: 0, False: 634k]
  ------------------
   90|      0|        return OSSL_PARAM_BLD_push_BN(bld, key, bn);
   91|       |
   92|   634k|    p = OSSL_PARAM_locate(p, key);
   93|   634k|    if (p != NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 634k]
  ------------------
   94|      0|        return OSSL_PARAM_set_BN(p, bn) > 0;
   95|   634k|    return 1;
   96|   634k|}

OSSL_PARAM_locate:
   55|  11.1M|{
   56|  11.1M|    if (ossl_likely(p != NULL && key != NULL))
  ------------------
  |  |   22|  22.2M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 11.1M, False: 20.2k]
  |  |  |  Branch (22:44): [True: 11.1M, False: 20.2k]
  |  |  |  Branch (22:44): [True: 11.1M, False: 0]
  |  |  ------------------
  ------------------
   57|  44.3M|        for (; p->key != NULL; p++)
  ------------------
  |  Branch (57:16): [True: 39.8M, False: 4.54M]
  ------------------
   58|  39.8M|            if (strcmp(key, p->key) == 0)
  ------------------
  |  Branch (58:17): [True: 6.56M, False: 33.2M]
  ------------------
   59|  6.56M|                return p;
   60|  4.56M|    return NULL;
   61|  11.1M|}
OSSL_PARAM_locate_const:
   64|  6.37M|{
   65|  6.37M|    return OSSL_PARAM_locate((OSSL_PARAM *)p, key);
   66|  6.37M|}
OSSL_PARAM_modified:
   82|  13.2k|{
   83|  13.2k|    return p != NULL && p->return_size != OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  13.2k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (83:12): [True: 13.2k, False: 0]
  |  Branch (83:25): [True: 8.77k, False: 4.42k]
  ------------------
   84|  13.2k|}
OSSL_PARAM_get_int:
  268|   698k|{
  269|   698k|#ifndef OPENSSL_SMALL_FOOTPRINT
  270|   698k|    switch (sizeof(int)) {
  ------------------
  |  Branch (270:13): [True: 698k, Folded]
  ------------------
  271|   698k|    case sizeof(int32_t):
  ------------------
  |  Branch (271:5): [True: 698k, False: 0]
  ------------------
  272|   698k|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
  273|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (273:5): [True: 0, False: 698k]
  ------------------
  274|      0|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
  275|   698k|    }
  276|      0|#endif
  277|      0|    return general_get_int(p, val, sizeof(*val));
  278|   698k|}
OSSL_PARAM_set_int:
  281|  2.30M|{
  282|  2.30M|#ifndef OPENSSL_SMALL_FOOTPRINT
  283|  2.30M|    switch (sizeof(int)) {
  ------------------
  |  Branch (283:13): [True: 2.30M, Folded]
  ------------------
  284|  2.30M|    case sizeof(int32_t):
  ------------------
  |  Branch (284:5): [True: 2.30M, False: 0]
  ------------------
  285|  2.30M|        return OSSL_PARAM_set_int32(p, (int32_t)val);
  286|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (286:5): [True: 0, False: 2.30M]
  ------------------
  287|      0|        return OSSL_PARAM_set_int64(p, (int64_t)val);
  288|  2.30M|    }
  289|      0|#endif
  290|      0|    return general_set_int(p, &val, sizeof(val));
  291|  2.30M|}
OSSL_PARAM_construct_int:
  294|  3.21M|{
  295|  3.21M|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(int));
  ------------------
  |  |  106|  3.21M|#define OSSL_PARAM_INTEGER 1
  ------------------
  296|  3.21M|}
OSSL_PARAM_get_uint:
  299|   511k|{
  300|   511k|#ifndef OPENSSL_SMALL_FOOTPRINT
  301|   511k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (301:13): [True: 511k, Folded]
  ------------------
  302|   511k|    case sizeof(uint32_t):
  ------------------
  |  Branch (302:5): [True: 511k, False: 0]
  ------------------
  303|   511k|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
  304|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (304:5): [True: 0, False: 511k]
  ------------------
  305|      0|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
  306|   511k|    }
  307|      0|#endif
  308|      0|    return general_get_uint(p, val, sizeof(*val));
  309|   511k|}
OSSL_PARAM_set_uint:
  312|   108k|{
  313|   108k|#ifndef OPENSSL_SMALL_FOOTPRINT
  314|   108k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (314:13): [True: 108k, Folded]
  ------------------
  315|   108k|    case sizeof(uint32_t):
  ------------------
  |  Branch (315:5): [True: 108k, False: 0]
  ------------------
  316|   108k|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
  317|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (317:5): [True: 0, False: 108k]
  ------------------
  318|      0|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
  319|   108k|    }
  320|      0|#endif
  321|      0|    return general_set_uint(p, &val, sizeof(val));
  322|   108k|}
OSSL_PARAM_construct_uint:
  325|   115k|{
  326|   115k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|   115k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  327|   115k|        sizeof(unsigned int));
  328|   115k|}
OSSL_PARAM_get_int32:
  394|   698k|{
  395|   698k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (395:9): [True: 0, False: 698k]
  |  Branch (395:24): [True: 0, False: 698k]
  ------------------
  396|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  397|      0|        return 0;
  398|      0|    }
  399|       |
  400|   698k|    if (p->data == NULL) {
  ------------------
  |  Branch (400:9): [True: 0, False: 698k]
  ------------------
  401|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  402|      0|        return 0;
  403|      0|    }
  404|       |
  405|   698k|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|   698k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (405:9): [True: 692k, False: 6.61k]
  ------------------
  406|   692k|#ifndef OPENSSL_SMALL_FOOTPRINT
  407|   692k|        int64_t i64;
  408|       |
  409|   692k|        switch (p->data_size) {
  ------------------
  |  Branch (409:17): [True: 692k, False: 0]
  ------------------
  410|   692k|        case sizeof(int32_t):
  ------------------
  |  Branch (410:9): [True: 692k, False: 0]
  ------------------
  411|   692k|            *val = *(const int32_t *)p->data;
  412|   692k|            return 1;
  413|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (413:9): [True: 0, False: 692k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  420|      0|            return 0;
  421|   692k|        }
  422|      0|#endif
  423|      0|        return general_get_int(p, val, sizeof(*val));
  424|       |
  425|   692k|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|  6.61k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (425:16): [True: 6.61k, False: 0]
  ------------------
  426|  6.61k|#ifndef OPENSSL_SMALL_FOOTPRINT
  427|  6.61k|        uint32_t u32;
  428|  6.61k|        uint64_t u64;
  429|       |
  430|  6.61k|        switch (p->data_size) {
  ------------------
  |  Branch (430:17): [True: 6.61k, False: 0]
  ------------------
  431|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (431:9): [True: 0, False: 6.61k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  438|      0|            return 0;
  439|  6.61k|        case sizeof(uint64_t):
  ------------------
  |  Branch (439:9): [True: 6.61k, False: 0]
  ------------------
  440|  6.61k|            u64 = *(const uint64_t *)p->data;
  441|  6.61k|            if (u64 <= INT32_MAX) {
  ------------------
  |  Branch (441:17): [True: 6.61k, False: 0]
  ------------------
  442|  6.61k|                *val = (int32_t)u64;
  443|  6.61k|                return 1;
  444|  6.61k|            }
  445|      0|            err_out_of_range;
  ------------------
  |  |   26|  6.61k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  446|      0|            return 0;
  447|  6.61k|        }
  448|      0|#endif
  449|      0|        return general_get_int(p, val, sizeof(*val));
  450|       |
  451|  6.61k|    } 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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|      0|        return 0;
  467|      0|#endif
  468|      0|    }
  469|      0|    err_bad_type;
  ------------------
  |  |   36|   698k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  470|      0|    return 0;
  471|   698k|}
OSSL_PARAM_set_int32:
  474|  2.30M|{
  475|  2.30M|    if (p == NULL) {
  ------------------
  |  Branch (475:9): [True: 0, False: 2.30M]
  ------------------
  476|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|      0|        return 0;
  478|      0|    }
  479|  2.30M|    p->return_size = 0;
  480|  2.30M|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  2.30M|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (480:9): [True: 2.29M, False: 3.30k]
  ------------------
  481|  2.29M|#ifndef OPENSSL_SMALL_FOOTPRINT
  482|  2.29M|        p->return_size = sizeof(int32_t); /* Minimum expected size */
  483|  2.29M|        if (p->data == NULL)
  ------------------
  |  Branch (483:13): [True: 0, False: 2.29M]
  ------------------
  484|      0|            return 1;
  485|  2.29M|        switch (p->data_size) {
  ------------------
  |  Branch (485:17): [True: 2.29M, False: 0]
  ------------------
  486|  2.29M|        case sizeof(int32_t):
  ------------------
  |  Branch (486:9): [True: 2.29M, False: 0]
  ------------------
  487|  2.29M|            *(int32_t *)p->data = val;
  488|  2.29M|            return 1;
  489|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (489:9): [True: 0, False: 2.29M]
  ------------------
  490|      0|            p->return_size = sizeof(int64_t);
  491|      0|            *(int64_t *)p->data = (int64_t)val;
  492|      0|            return 1;
  493|  2.29M|        }
  494|      0|#endif
  495|      0|        return general_set_int(p, &val, sizeof(val));
  496|  2.29M|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER && val >= 0) {
  ------------------
  |  |  107|  6.61k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (496:16): [True: 3.30k, False: 0]
  |  Branch (496:63): [True: 3.30k, False: 0]
  ------------------
  497|  3.30k|#ifndef OPENSSL_SMALL_FOOTPRINT
  498|  3.30k|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  499|  3.30k|        if (p->data == NULL)
  ------------------
  |  Branch (499:13): [True: 0, False: 3.30k]
  ------------------
  500|      0|            return 1;
  501|  3.30k|        switch (p->data_size) {
  ------------------
  |  Branch (501:17): [True: 3.30k, False: 0]
  ------------------
  502|  3.30k|        case sizeof(uint32_t):
  ------------------
  |  Branch (502:9): [True: 3.30k, False: 0]
  ------------------
  503|  3.30k|            *(uint32_t *)p->data = (uint32_t)val;
  504|  3.30k|            return 1;
  505|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (505:9): [True: 0, False: 3.30k]
  ------------------
  506|      0|            p->return_size = sizeof(uint64_t);
  507|      0|            *(uint64_t *)p->data = (uint64_t)val;
  508|      0|            return 1;
  509|  3.30k|        }
  510|      0|#endif
  511|      0|        return general_set_int(p, &val, sizeof(val));
  512|  3.30k|    } 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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  534|      0|        return 0;
  535|      0|#endif
  536|      0|    }
  537|      0|    err_bad_type;
  ------------------
  |  |   36|  2.30M|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|      0|    return 0;
  539|  2.30M|}
OSSL_PARAM_get_uint32:
  548|   522k|{
  549|   522k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (549:9): [True: 0, False: 522k]
  |  Branch (549:24): [True: 0, False: 522k]
  ------------------
  550|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  551|      0|        return 0;
  552|      0|    }
  553|       |
  554|   522k|    if (p->data == NULL) {
  ------------------
  |  Branch (554:9): [True: 0, False: 522k]
  ------------------
  555|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  556|      0|        return 0;
  557|      0|    }
  558|       |
  559|   522k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   522k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (559:9): [True: 358k, False: 164k]
  ------------------
  560|   358k|#ifndef OPENSSL_SMALL_FOOTPRINT
  561|   358k|        uint64_t u64;
  562|       |
  563|   358k|        switch (p->data_size) {
  ------------------
  |  Branch (563:17): [True: 358k, False: 0]
  ------------------
  564|   358k|        case sizeof(uint32_t):
  ------------------
  |  Branch (564:9): [True: 358k, False: 0]
  ------------------
  565|   358k|            *val = *(const uint32_t *)p->data;
  566|   358k|            return 1;
  567|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (567:9): [True: 0, False: 358k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  574|      0|            return 0;
  575|   358k|        }
  576|      0|#endif
  577|      0|        return general_get_uint(p, val, sizeof(*val));
  578|   358k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|   164k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (578:16): [True: 164k, False: 0]
  ------------------
  579|   164k|#ifndef OPENSSL_SMALL_FOOTPRINT
  580|   164k|        int32_t i32;
  581|   164k|        int64_t i64;
  582|       |
  583|   164k|        switch (p->data_size) {
  ------------------
  |  Branch (583:17): [True: 164k, False: 0]
  ------------------
  584|   164k|        case sizeof(int32_t):
  ------------------
  |  Branch (584:9): [True: 164k, False: 0]
  ------------------
  585|   164k|            i32 = *(const int32_t *)p->data;
  586|   164k|            if (i32 >= 0) {
  ------------------
  |  Branch (586:17): [True: 164k, False: 0]
  ------------------
  587|   164k|                *val = i32;
  588|   164k|                return 1;
  589|   164k|            }
  590|      0|            err_unsigned_negative;
  ------------------
  |  |   23|   164k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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: 164k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  602|      0|            return 0;
  603|   164k|        }
  604|      0|#endif
  605|      0|        return general_get_uint(p, val, sizeof(*val));
  606|   164k|    } 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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  621|      0|        return 0;
  622|      0|#endif
  623|      0|    }
  624|      0|    err_bad_type;
  ------------------
  |  |   36|   522k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  625|      0|    return 0;
  626|   522k|}
OSSL_PARAM_set_uint32:
  629|   108k|{
  630|   108k|    if (p == NULL) {
  ------------------
  |  Branch (630:9): [True: 0, False: 108k]
  ------------------
  631|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  632|      0|        return 0;
  633|      0|    }
  634|   108k|    p->return_size = 0;
  635|       |
  636|   108k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   108k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (636:9): [True: 108k, False: 0]
  ------------------
  637|   108k|#ifndef OPENSSL_SMALL_FOOTPRINT
  638|   108k|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  639|   108k|        if (p->data == NULL)
  ------------------
  |  Branch (639:13): [True: 0, False: 108k]
  ------------------
  640|      0|            return 1;
  641|   108k|        switch (p->data_size) {
  ------------------
  |  Branch (641:17): [True: 108k, False: 0]
  ------------------
  642|   108k|        case sizeof(uint32_t):
  ------------------
  |  Branch (642:9): [True: 108k, False: 0]
  ------------------
  643|   108k|            *(uint32_t *)p->data = val;
  644|   108k|            return 1;
  645|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (645:9): [True: 0, False: 108k]
  ------------------
  646|      0|            p->return_size = sizeof(uint64_t);
  647|      0|            *(uint64_t *)p->data = val;
  648|      0|            return 1;
  649|   108k|        }
  650|      0|#endif
  651|      0|        return general_set_uint(p, &val, sizeof(val));
  652|   108k|    } 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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  692|      0|        return 0;
  693|      0|#endif
  694|      0|    }
  695|      0|    err_bad_type;
  ------------------
  |  |   36|   108k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|      0|    return 0;
  697|   108k|}
OSSL_PARAM_construct_uint32:
  700|  11.7k|{
  701|  11.7k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  11.7k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  702|  11.7k|        sizeof(uint32_t));
  703|  11.7k|}
OSSL_PARAM_get_int64:
  706|  1.65k|{
  707|  1.65k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (707:9): [True: 0, False: 1.65k]
  |  Branch (707:24): [True: 0, False: 1.65k]
  ------------------
  708|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  709|      0|        return 0;
  710|      0|    }
  711|       |
  712|  1.65k|    if (p->data == NULL) {
  ------------------
  |  Branch (712:9): [True: 0, False: 1.65k]
  ------------------
  713|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  714|      0|        return 0;
  715|      0|    }
  716|       |
  717|  1.65k|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  1.65k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (717:9): [True: 1.65k, False: 0]
  ------------------
  718|  1.65k|#ifndef OPENSSL_SMALL_FOOTPRINT
  719|  1.65k|        switch (p->data_size) {
  ------------------
  |  Branch (719:17): [True: 1.65k, False: 0]
  ------------------
  720|      0|        case sizeof(int32_t):
  ------------------
  |  Branch (720:9): [True: 0, False: 1.65k]
  ------------------
  721|      0|            *val = *(const int32_t *)p->data;
  722|      0|            return 1;
  723|  1.65k|        case sizeof(int64_t):
  ------------------
  |  Branch (723:9): [True: 1.65k, False: 0]
  ------------------
  724|  1.65k|            *val = *(const int64_t *)p->data;
  725|  1.65k|            return 1;
  726|  1.65k|        }
  727|      0|#endif
  728|      0|        return general_get_int(p, val, sizeof(*val));
  729|  1.65k|    } 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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|      0|        return 0;
  771|      0|#endif
  772|      0|    }
  773|      0|    err_bad_type;
  ------------------
  |  |   36|  1.65k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  774|      0|    return 0;
  775|  1.65k|}
OSSL_PARAM_get_uint64:
  861|  38.2k|{
  862|  38.2k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (862:9): [True: 0, False: 38.2k]
  |  Branch (862:24): [True: 0, False: 38.2k]
  ------------------
  863|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  864|      0|        return 0;
  865|      0|    }
  866|       |
  867|  38.2k|    if (p->data == NULL) {
  ------------------
  |  Branch (867:9): [True: 0, False: 38.2k]
  ------------------
  868|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  869|      0|        return 0;
  870|      0|    }
  871|       |
  872|  38.2k|    if (ossl_likely(p->data_type == OSSL_PARAM_UNSIGNED_INTEGER)) {
  ------------------
  |  |   22|  38.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 38.2k, False: 0]
  |  |  ------------------
  ------------------
  873|  38.2k|#ifndef OPENSSL_SMALL_FOOTPRINT
  874|  38.2k|        switch (p->data_size) {
  ------------------
  |  Branch (874:17): [True: 38.2k, False: 0]
  ------------------
  875|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (875:9): [True: 0, False: 38.2k]
  ------------------
  876|      0|            *val = *(const uint32_t *)p->data;
  877|      0|            return 1;
  878|  38.2k|        case sizeof(uint64_t):
  ------------------
  |  Branch (878:9): [True: 38.2k, False: 0]
  ------------------
  879|  38.2k|            *val = *(const uint64_t *)p->data;
  880|  38.2k|            return 1;
  881|  38.2k|        }
  882|      0|#endif
  883|      0|        return general_get_uint(p, val, sizeof(*val));
  884|  38.2k|    } 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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  931|      0|        return 0;
  932|      0|#endif
  933|      0|    }
  934|      0|    err_bad_type;
  ------------------
  |  |   36|  38.2k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  935|      0|    return 0;
  936|  38.2k|}
OSSL_PARAM_set_uint64:
  939|   316k|{
  940|   316k|    if (p == NULL) {
  ------------------
  |  Branch (940:9): [True: 0, False: 316k]
  ------------------
  941|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  942|      0|        return 0;
  943|      0|    }
  944|   316k|    p->return_size = 0;
  945|       |
  946|   316k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   316k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (946:9): [True: 310k, False: 5.83k]
  ------------------
  947|   310k|#ifndef OPENSSL_SMALL_FOOTPRINT
  948|   310k|        if (p->data == NULL) {
  ------------------
  |  Branch (948:13): [True: 0, False: 310k]
  ------------------
  949|      0|            p->return_size = sizeof(uint64_t); /* Expected size */
  950|      0|            return 1;
  951|      0|        }
  952|   310k|        switch (p->data_size) {
  ------------------
  |  Branch (952:17): [True: 310k, False: 0]
  ------------------
  953|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (953:9): [True: 0, False: 310k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  960|      0|            return 0;
  961|   310k|        case sizeof(uint64_t):
  ------------------
  |  Branch (961:9): [True: 310k, False: 0]
  ------------------
  962|   310k|            p->return_size = sizeof(uint64_t);
  963|   310k|            *(uint64_t *)p->data = val;
  964|   310k|            return 1;
  965|   310k|        }
  966|      0|#endif
  967|      0|        return general_set_uint(p, &val, sizeof(val));
  968|   310k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  5.83k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (968:16): [True: 5.83k, False: 0]
  ------------------
  969|  5.83k|#ifndef OPENSSL_SMALL_FOOTPRINT
  970|  5.83k|        if (p->data == NULL) {
  ------------------
  |  Branch (970:13): [True: 0, False: 5.83k]
  ------------------
  971|      0|            p->return_size = sizeof(int64_t); /* Expected size */
  972|      0|            return 1;
  973|      0|        }
  974|  5.83k|        switch (p->data_size) {
  ------------------
  |  Branch (974:17): [True: 5.83k, False: 0]
  ------------------
  975|  5.83k|        case sizeof(int32_t):
  ------------------
  |  Branch (975:9): [True: 5.83k, False: 0]
  ------------------
  976|  5.83k|            if (val <= INT32_MAX) {
  ------------------
  |  Branch (976:17): [True: 5.83k, False: 0]
  ------------------
  977|  5.83k|                p->return_size = sizeof(int32_t);
  978|  5.83k|                *(int32_t *)p->data = (int32_t)val;
  979|  5.83k|                return 1;
  980|  5.83k|            }
  981|      0|            err_out_of_range;
  ------------------
  |  |   26|  5.83k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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: 5.83k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  990|      0|            return 0;
  991|  5.83k|        }
  992|      0|#endif
  993|      0|        return general_set_uint(p, &val, sizeof(val));
  994|  5.83k|    } 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, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      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)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1007|      0|        return 0;
 1008|      0|#endif
 1009|      0|    }
 1010|      0|    err_bad_type;
  ------------------
  |  |   36|   316k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1011|      0|    return 0;
 1012|   316k|}
OSSL_PARAM_construct_uint64:
 1015|  11.7k|{
 1016|  11.7k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  11.7k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1017|  11.7k|        sizeof(uint64_t));
 1018|  11.7k|}
OSSL_PARAM_get_size_t:
 1021|  26.4k|{
 1022|  26.4k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1023|  26.4k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1023:13): [True: 26.4k, Folded]
  ------------------
 1024|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1024:5): [True: 0, False: 26.4k]
  ------------------
 1025|      0|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
 1026|  26.4k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1026:5): [True: 26.4k, False: 0]
  ------------------
 1027|  26.4k|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
 1028|  26.4k|    }
 1029|      0|#endif
 1030|      0|    return general_get_uint(p, val, sizeof(*val));
 1031|  26.4k|}
OSSL_PARAM_set_size_t:
 1034|   316k|{
 1035|   316k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1036|   316k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1036:13): [True: 316k, Folded]
  ------------------
 1037|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1037:5): [True: 0, False: 316k]
  ------------------
 1038|      0|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
 1039|   316k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1039:5): [True: 316k, False: 0]
  ------------------
 1040|   316k|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
 1041|   316k|    }
 1042|      0|#endif
 1043|      0|    return general_set_uint(p, &val, sizeof(val));
 1044|   316k|}
OSSL_PARAM_construct_size_t:
 1047|   336k|{
 1048|   336k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|   336k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1049|   336k|        sizeof(size_t));
 1050|   336k|}
OSSL_PARAM_get_time_t:
 1053|  1.65k|{
 1054|  1.65k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1055|  1.65k|    switch (sizeof(time_t)) {
  ------------------
  |  Branch (1055:13): [True: 1.65k, Folded]
  ------------------
 1056|      0|    case sizeof(int32_t):
  ------------------
  |  Branch (1056:5): [True: 0, False: 1.65k]
  ------------------
 1057|      0|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
 1058|  1.65k|    case sizeof(int64_t):
  ------------------
  |  Branch (1058:5): [True: 1.65k, False: 0]
  ------------------
 1059|  1.65k|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
 1060|  1.65k|    }
 1061|      0|#endif
 1062|      0|    return general_get_int(p, val, sizeof(*val));
 1063|  1.65k|}
OSSL_PARAM_construct_time_t:
 1079|  1.65k|{
 1080|  1.65k|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(time_t));
  ------------------
  |  |  106|  1.65k|#define OSSL_PARAM_INTEGER 1
  ------------------
 1081|  1.65k|}
OSSL_PARAM_get_utf8_string:
 1381|   871k|{
 1382|   871k|    int ret = get_string_internal(p, (void **)val, &max_len, NULL,
 1383|   871k|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|   871k|#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|   871k|    size_t data_length = p->data_size;
 1397|       |
 1398|   871k|    if (ret == 0)
  ------------------
  |  Branch (1398:9): [True: 0, False: 871k]
  ------------------
 1399|      0|        return 0;
 1400|   871k|    if (data_length >= max_len)
  ------------------
  |  Branch (1400:9): [True: 0, False: 871k]
  ------------------
 1401|      0|        data_length = OPENSSL_strnlen(p->data, data_length);
 1402|   871k|    if (data_length >= max_len) {
  ------------------
  |  Branch (1402:9): [True: 0, False: 871k]
  ------------------
 1403|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_NO_SPACE_FOR_TERMINATING_NULL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1404|      0|        return 0; /* No space for a terminating NUL byte */
 1405|      0|    }
 1406|   871k|    (*val)[data_length] = '\0';
 1407|       |
 1408|   871k|    return ret;
 1409|   871k|}
OSSL_PARAM_get_octet_string:
 1413|  2.81k|{
 1414|  2.81k|    return get_string_internal(p, val, &max_len, used_len,
 1415|  2.81k|        OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  2.81k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1416|  2.81k|}
OSSL_PARAM_set_octet_string:
 1452|  2.81k|{
 1453|  2.81k|    if (p == NULL || val == NULL) {
  ------------------
  |  Branch (1453:9): [True: 0, False: 2.81k]
  |  Branch (1453:22): [True: 0, False: 2.81k]
  ------------------
 1454|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|      0|        return 0;
 1456|      0|    }
 1457|  2.81k|    p->return_size = 0;
 1458|  2.81k|    return set_string_internal(p, val, len, OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  2.81k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1459|  2.81k|}
OSSL_PARAM_construct_utf8_string:
 1463|  2.18M|{
 1464|  2.18M|    if (buf != NULL && bsize == 0)
  ------------------
  |  Branch (1464:9): [True: 2.18M, False: 0]
  |  Branch (1464:24): [True: 2.18M, False: 0]
  ------------------
 1465|  2.18M|        bsize = strlen(buf);
 1466|  2.18M|    return ossl_param_construct(key, OSSL_PARAM_UTF8_STRING, buf, bsize);
  ------------------
  |  |  117|  2.18M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1467|  2.18M|}
OSSL_PARAM_construct_octet_string:
 1471|   879k|{
 1472|   879k|    return ossl_param_construct(key, OSSL_PARAM_OCTET_STRING, buf, bsize);
  ------------------
  |  |  123|   879k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1473|   879k|}
OSSL_PARAM_construct_end:
 1665|  1.49M|{
 1666|  1.49M|    OSSL_PARAM end = OSSL_PARAM_END;
  ------------------
  |  |   25|  1.49M|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1667|       |
 1668|  1.49M|    return end;
 1669|  1.49M|}
OSSL_PARAM_get_utf8_string_ptr:
 1694|  1.30M|{
 1695|  1.30M|    return get_string_ptr_internal(p, (const void **)val, NULL,
 1696|  1.30M|        OSSL_PARAM_UTF8_PTR,
  ------------------
  |  |  141|  1.30M|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
 1697|  1.30M|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|  1.30M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1698|  1.30M|}
params.c:ossl_param_construct:
   70|  6.76M|{
   71|  6.76M|    OSSL_PARAM res;
   72|       |
   73|  6.76M|    res.key = key;
   74|  6.76M|    res.data_type = data_type;
   75|  6.76M|    res.data = data;
   76|  6.76M|    res.data_size = data_size;
   77|  6.76M|    res.return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  6.76M|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
   78|  6.76M|    return res;
   79|  6.76M|}
params.c:get_string_internal:
 1333|   874k|{
 1334|   874k|    size_t sz, alloc_sz;
 1335|       |
 1336|   874k|    if ((val == NULL && used_len == NULL) || p == NULL) {
  ------------------
  |  Branch (1336:10): [True: 0, False: 874k]
  |  Branch (1336:25): [True: 0, False: 0]
  |  Branch (1336:46): [True: 0, False: 874k]
  ------------------
 1337|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1338|      0|        return 0;
 1339|      0|    }
 1340|   874k|    if (p->data_type != type) {
  ------------------
  |  Branch (1340:9): [True: 0, False: 874k]
  ------------------
 1341|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1342|      0|        return 0;
 1343|      0|    }
 1344|       |
 1345|   874k|    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|   874k|    alloc_sz = sz + (type == OSSL_PARAM_UTF8_STRING || sz == 0);
  ------------------
  |  |  117|  1.74M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1350:22): [True: 871k, False: 2.81k]
  |  Branch (1350:56): [True: 0, False: 2.81k]
  ------------------
 1351|       |
 1352|   874k|    if (used_len != NULL)
  ------------------
  |  Branch (1352:9): [True: 2.81k, False: 871k]
  ------------------
 1353|  2.81k|        *used_len = sz;
 1354|       |
 1355|   874k|    if (p->data == NULL) {
  ------------------
  |  Branch (1355:9): [True: 0, False: 874k]
  ------------------
 1356|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1357|      0|        return 0;
 1358|      0|    }
 1359|       |
 1360|   874k|    if (val == NULL)
  ------------------
  |  Branch (1360:9): [True: 0, False: 874k]
  ------------------
 1361|      0|        return 1;
 1362|       |
 1363|   874k|    if (*val == NULL) {
  ------------------
  |  Branch (1363:9): [True: 871k, False: 2.82k]
  ------------------
 1364|   871k|        char *const q = OPENSSL_malloc(alloc_sz);
  ------------------
  |  |  106|   871k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1365|       |
 1366|   871k|        if (q == NULL)
  ------------------
  |  Branch (1366:13): [True: 0, False: 871k]
  ------------------
 1367|      0|            return 0;
 1368|   871k|        *val = q;
 1369|   871k|        *max_len = alloc_sz;
 1370|   871k|    }
 1371|       |
 1372|   874k|    if (*max_len < sz) {
  ------------------
  |  Branch (1372:9): [True: 0, False: 874k]
  ------------------
 1373|      0|        err_too_small;
  ------------------
  |  |   34|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1374|      0|        return 0;
 1375|      0|    }
 1376|   874k|    memcpy(*val, p->data, sz);
 1377|   874k|    return 1;
 1378|   874k|}
params.c:set_string_internal:
 1420|  2.81k|{
 1421|  2.81k|    if (p->data_type != type) {
  ------------------
  |  Branch (1421:9): [True: 0, False: 2.81k]
  ------------------
 1422|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1423|      0|        return 0;
 1424|      0|    }
 1425|  2.81k|    p->return_size = len;
 1426|  2.81k|    if (p->data == NULL)
  ------------------
  |  Branch (1426:9): [True: 1.40k, False: 1.40k]
  ------------------
 1427|  1.40k|        return 1;
 1428|  1.40k|    if (p->data_size < len) {
  ------------------
  |  Branch (1428:9): [True: 0, False: 1.40k]
  ------------------
 1429|      0|        err_too_small;
  ------------------
  |  |   34|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1430|      0|        return 0;
 1431|      0|    }
 1432|       |
 1433|  1.40k|    memcpy(p->data, val, len);
 1434|       |    /* If possible within the size of p->data, add a NUL terminator byte */
 1435|  1.40k|    if (type == OSSL_PARAM_UTF8_STRING && p->data_size > len)
  ------------------
  |  |  117|  2.81k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1435:9): [True: 0, False: 1.40k]
  |  Branch (1435:43): [True: 0, False: 0]
  ------------------
 1436|      0|        ((char *)p->data)[len] = '\0';
 1437|  1.40k|    return 1;
 1438|  1.40k|}
params.c:get_string_ptr_internal:
 1674|  1.30M|{
 1675|  1.30M|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (1675:9): [True: 0, False: 1.30M]
  |  Branch (1675:24): [True: 0, False: 1.30M]
  ------------------
 1676|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1677|      0|        return 0;
 1678|      0|    }
 1679|       |
 1680|  1.30M|    if (p->data_type == ref_type)
  ------------------
  |  Branch (1680:9): [True: 0, False: 1.30M]
  ------------------
 1681|      0|        return get_ptr_internal_skip_checks(p, (const void **)val, used_len);
 1682|       |
 1683|  1.30M|    if (p->data_type != type) {
  ------------------
  |  Branch (1683:9): [True: 0, False: 1.30M]
  ------------------
 1684|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1685|      0|        return 0;
 1686|      0|    }
 1687|  1.30M|    if (used_len != NULL)
  ------------------
  |  Branch (1687:9): [True: 0, False: 1.30M]
  ------------------
 1688|      0|        *used_len = p->data_size;
 1689|  1.30M|    *val = p->data;
 1690|  1.30M|    return 1;
 1691|  1.30M|}

ossl_param_bytes_to_blocks:
   31|  6.82k|{
   32|  6.82k|    return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  6.82k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
                  return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  6.82k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
   33|  6.82k|}
ossl_param_set_secure_block:
   56|  3.41k|{
   57|  3.41k|    last->key = NULL;
   58|  3.41k|    last->data_size = secure_buffer_sz;
   59|  3.41k|    last->data = secure_buffer;
   60|  3.41k|    last->data_type = OSSL_PARAM_ALLOCATED_END;
  ------------------
  |  |   16|  3.41k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
   61|  3.41k|}
OSSL_PARAM_free:
  233|  3.41k|{
  234|  3.41k|    if (params != NULL) {
  ------------------
  |  Branch (234:9): [True: 3.41k, False: 0]
  ------------------
  235|  3.41k|        OSSL_PARAM *p;
  236|       |
  237|  6.82k|        for (p = params; p->key != NULL; p++)
  ------------------
  |  Branch (237:26): [True: 3.41k, False: 3.41k]
  ------------------
  238|  3.41k|            ;
  239|  3.41k|        if (p->data_type == OSSL_PARAM_ALLOCATED_END)
  ------------------
  |  |   16|  3.41k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
  |  Branch (239:13): [True: 3.41k, False: 0]
  ------------------
  240|  3.41k|            OPENSSL_secure_clear_free(p->data, p->data_size);
  ------------------
  |  |  149|  3.41k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  241|  3.41k|        OPENSSL_free(params);
  ------------------
  |  |  131|  3.41k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|  3.41k|    }
  243|  3.41k|}

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

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|  3.00k|{
   57|  3.00k|    X509_INFO *xi = NULL;
   58|  3.00k|    char *name = NULL, *header = NULL, *str;
   59|  3.00k|    void *pp;
   60|  3.00k|    unsigned char *data = NULL;
   61|  3.00k|    const unsigned char *p;
   62|  3.00k|    long len, error = 0;
   63|  3.00k|    int ok = 0;
   64|  3.00k|    STACK_OF(X509_INFO) *ret = NULL;
  ------------------
  |  |   33|  3.00k|#define STACK_OF(type) struct stack_st_##type
  ------------------
   65|  3.00k|    unsigned int i, raw, ptype;
   66|  3.00k|    d2i_of_void *d2i = 0;
   67|       |
   68|  3.00k|    if (sk == NULL) {
  ------------------
  |  Branch (68:9): [True: 3.00k, False: 0]
  ------------------
   69|  3.00k|        if ((ret = sk_X509_INFO_new_null()) == NULL) {
  ------------------
  |  |  400|  3.00k|#define sk_X509_INFO_new_null() ((STACK_OF(X509_INFO) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (69:13): [True: 0, False: 3.00k]
  ------------------
   70|      0|            ERR_raise(ERR_LIB_PEM, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|            goto err;
   72|      0|        }
   73|  3.00k|    } else
   74|      0|        ret = sk;
   75|       |
   76|  3.00k|    if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 3.00k]
  ------------------
   77|      0|        goto err;
   78|   438k|    for (;;) {
   79|   438k|        raw = 0;
   80|   438k|        ptype = 0;
   81|   438k|        ERR_set_mark();
   82|   438k|        i = PEM_read_bio(bp, &name, &header, &data, &len);
   83|   438k|        if (i == 0) {
  ------------------
  |  Branch (83:13): [True: 3.00k, False: 435k]
  ------------------
   84|  3.00k|            error = ERR_GET_REASON(ERR_peek_last_error());
   85|  3.00k|            if (error == PEM_R_NO_START_LINE) {
  ------------------
  |  |   44|  3.00k|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (85:17): [True: 3.00k, False: 0]
  ------------------
   86|  3.00k|                ERR_pop_to_mark();
   87|  3.00k|                break;
   88|  3.00k|            }
   89|      0|            ERR_clear_last_mark();
   90|      0|            goto err;
   91|  3.00k|        }
   92|   435k|        ERR_clear_last_mark();
   93|   868k|    start:
   94|   868k|        if (strcmp(name, PEM_STRING_X509) == 0
  ------------------
  |  |   36|   868k|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
  |  Branch (94:13): [True: 868k, 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|   868k|            || strcmp(name, PEM_STRING_X509_TRUSTED) == 0) {
  ------------------
  |  |   37|      0|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (96:16): [True: 0, False: 0]
  ------------------
   97|   868k|            if (xi->x509 != NULL) {
  ------------------
  |  Branch (97:17): [True: 432k, False: 435k]
  ------------------
   98|   432k|                if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|   432k|#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: 432k]
  ------------------
   99|      0|                    goto err;
  100|   432k|                if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (100:21): [True: 0, False: 432k]
  ------------------
  101|      0|                    goto err;
  102|   432k|                goto start;
  103|   432k|            }
  104|   435k|            if ((strcmp(name, PEM_STRING_X509_TRUSTED) == 0))
  ------------------
  |  |   37|   435k|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (104:17): [True: 0, False: 435k]
  ------------------
  105|      0|                d2i = (D2I_OF(void))d2i_X509_AUX;
  106|   435k|            else
  107|   435k|                d2i = (D2I_OF(void))d2i_X509;
  108|   435k|            xi->x509 = X509_new_ex(libctx, propq);
  109|   435k|            if (xi->x509 == NULL)
  ------------------
  |  Branch (109:17): [True: 0, False: 435k]
  ------------------
  110|      0|                goto err;
  111|   435k|            pp = &(xi->x509);
  112|   435k|        } 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|   435k|        if (d2i != NULL) {
  ------------------
  |  Branch (153:13): [True: 435k, False: 0]
  ------------------
  154|   435k|            if (!raw) {
  ------------------
  |  Branch (154:17): [True: 435k, False: 0]
  ------------------
  155|   435k|                EVP_CIPHER_INFO cipher;
  156|       |
  157|   435k|                if (!PEM_get_EVP_CIPHER_INFO(header, &cipher))
  ------------------
  |  Branch (157:21): [True: 0, False: 435k]
  ------------------
  158|      0|                    goto err;
  159|   435k|                if (!PEM_do_header(&cipher, data, &len, cb, u))
  ------------------
  |  Branch (159:21): [True: 0, False: 435k]
  ------------------
  160|      0|                    goto err;
  161|   435k|                p = data;
  162|   435k|                if (ptype) {
  ------------------
  |  Branch (162:21): [True: 0, False: 435k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  167|      0|                        goto err;
  168|      0|                    }
  169|   435k|                } else if (d2i(pp, &p, len) == NULL) {
  ------------------
  |  Branch (169:28): [True: 0, False: 435k]
  ------------------
  170|      0|                    ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  171|      0|                    goto err;
  172|      0|                }
  173|   435k|            } 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|   435k|        }
  181|   435k|        OPENSSL_free(name);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  182|   435k|        name = NULL;
  183|   435k|        OPENSSL_free(header);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|   435k|        header = NULL;
  185|   435k|        OPENSSL_free(data);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  186|   435k|        data = NULL;
  187|   435k|    }
  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|  3.00k|    if ((xi->x509 != NULL) || (xi->crl != NULL) || (xi->x_pkey != NULL) || (xi->enc_data != NULL)) {
  ------------------
  |  Branch (193:9): [True: 2.98k, False: 22]
  |  Branch (193:31): [True: 0, False: 22]
  |  Branch (193:52): [True: 0, False: 22]
  |  Branch (193:76): [True: 0, False: 22]
  ------------------
  194|  2.98k|        if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|  2.98k|#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: 2.98k]
  ------------------
  195|      0|            goto err;
  196|  2.98k|        xi = NULL;
  197|  2.98k|    }
  198|  3.00k|    ok = 1;
  199|  3.00k|err:
  200|  3.00k|    X509_INFO_free(xi);
  201|  3.00k|    if (!ok) {
  ------------------
  |  Branch (201:9): [True: 0, False: 3.00k]
  ------------------
  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|  3.00k|    OPENSSL_free(name);
  ------------------
  |  |  131|  3.00k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|  3.00k|    OPENSSL_free(header);
  ------------------
  |  |  131|  3.00k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  213|  3.00k|    OPENSSL_free(data);
  ------------------
  |  |  131|  3.00k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  214|  3.00k|    return ret;
  215|  3.00k|}

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

PEM_ASN1_read_bio:
   22|  2.70k|{
   23|  2.70k|    const unsigned char *p = NULL;
   24|  2.70k|    unsigned char *data = NULL;
   25|  2.70k|    long len;
   26|  2.70k|    char *ret = NULL;
   27|       |
   28|  2.70k|    if (!PEM_bytes_read_bio(&data, &len, NULL, name, bp, cb, u))
  ------------------
  |  Branch (28:9): [True: 2.70k, False: 0]
  ------------------
   29|  2.70k|        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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   34|      0|    OPENSSL_free(data);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   35|      0|    return ret;
   36|  2.70k|}

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

ossl_ctx_global_properties_free:
  115|    785|{
  116|    785|    OSSL_GLOBAL_PROPERTIES *globp = vglobp;
  117|       |
  118|    785|    if (globp != NULL) {
  ------------------
  |  Branch (118:9): [True: 785, False: 0]
  ------------------
  119|    785|        ossl_property_free(globp->list);
  120|    785|        OPENSSL_free(globp);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|    785|    }
  122|    785|}
ossl_ctx_global_properties_new:
  125|    785|{
  126|    785|    return OPENSSL_zalloc(sizeof(OSSL_GLOBAL_PROPERTIES));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  127|    785|}
ossl_ctx_global_properties:
  131|  34.9k|{
  132|  34.9k|    OSSL_GLOBAL_PROPERTIES *globp;
  133|       |
  134|  34.9k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  135|  34.9k|    if (loadconfig && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  510|      0|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (135:9): [True: 0, False: 34.9k]
  |  Branch (135:23): [True: 0, False: 0]
  ------------------
  136|      0|        return NULL;
  137|  34.9k|#endif
  138|  34.9k|    globp = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_GLOBAL_PROPERTIES);
  ------------------
  |  |  112|  34.9k|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  139|       |
  140|  34.9k|    return globp != NULL ? &globp->list : NULL;
  ------------------
  |  Branch (140:12): [True: 34.9k, False: 0]
  ------------------
  141|  34.9k|}
ossl_method_store_new:
  244|  3.14k|{
  245|  3.14k|    OSSL_METHOD_STORE *res;
  246|       |
  247|  3.14k|    res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  108|  3.14k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  248|  3.14k|    if (res != NULL) {
  ------------------
  |  Branch (248:9): [True: 3.14k, False: 0]
  ------------------
  249|  3.14k|        res->ctx = ctx;
  250|  3.14k|        if ((res->algs = ossl_sa_ALGORITHM_new()) == NULL
  ------------------
  |  Branch (250:13): [True: 0, False: 3.14k]
  ------------------
  251|  3.14k|            || (res->lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (251:16): [True: 0, False: 3.14k]
  ------------------
  252|  3.14k|            || (res->biglock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (252:16): [True: 0, False: 3.14k]
  ------------------
  253|      0|            ossl_method_store_free(res);
  254|      0|            return NULL;
  255|      0|        }
  256|  3.14k|    }
  257|  3.14k|    return res;
  258|  3.14k|}
ossl_method_store_free:
  261|  3.14k|{
  262|  3.14k|    if (store != NULL) {
  ------------------
  |  Branch (262:9): [True: 3.14k, False: 0]
  ------------------
  263|  3.14k|        if (store->algs != NULL)
  ------------------
  |  Branch (263:13): [True: 3.14k, False: 0]
  ------------------
  264|  3.14k|            ossl_sa_ALGORITHM_doall_arg(store->algs, &alg_cleanup, store);
  265|  3.14k|        ossl_sa_ALGORITHM_free(store->algs);
  266|  3.14k|        CRYPTO_THREAD_lock_free(store->lock);
  267|  3.14k|        CRYPTO_THREAD_lock_free(store->biglock);
  268|  3.14k|        OPENSSL_free(store);
  ------------------
  |  |  131|  3.14k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  269|  3.14k|    }
  270|  3.14k|}
ossl_method_lock_store:
  273|   142k|{
  274|   142k|    return store != NULL ? CRYPTO_THREAD_write_lock(store->biglock) : 0;
  ------------------
  |  Branch (274:12): [True: 142k, False: 0]
  ------------------
  275|   142k|}
ossl_method_unlock_store:
  278|   142k|{
  279|   142k|    return store != NULL ? CRYPTO_THREAD_unlock(store->biglock) : 0;
  ------------------
  |  Branch (279:12): [True: 142k, False: 0]
  ------------------
  280|   142k|}
ossl_method_store_add:
  321|   169k|{
  322|   169k|    ALGORITHM *alg = NULL;
  323|   169k|    IMPLEMENTATION *impl;
  324|   169k|    int ret = 0;
  325|   169k|    int i;
  326|       |
  327|   169k|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (327:9): [True: 0, False: 169k]
  |  Branch (327:21): [True: 0, False: 169k]
  |  Branch (327:39): [True: 0, False: 169k]
  ------------------
  328|      0|        return 0;
  329|       |
  330|   169k|    if (properties == NULL)
  ------------------
  |  Branch (330:9): [True: 0, False: 169k]
  ------------------
  331|      0|        properties = "";
  332|       |
  333|   169k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|   169k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   169k|    __FILE__, __LINE__)
  ------------------
  |  Branch (333:9): [True: 0, False: 169k]
  ------------------
  334|      0|        return 0;
  335|       |
  336|       |    /* Create new entry */
  337|   169k|    impl = OPENSSL_malloc(sizeof(*impl));
  ------------------
  |  |  106|   169k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  338|   169k|    if (impl == NULL)
  ------------------
  |  Branch (338:9): [True: 0, False: 169k]
  ------------------
  339|      0|        return 0;
  340|   169k|    impl->method.method = method;
  341|   169k|    impl->method.up_ref = method_up_ref;
  342|   169k|    impl->method.free = method_destruct;
  343|   169k|    if (!ossl_method_up_ref(&impl->method)) {
  ------------------
  |  Branch (343:9): [True: 0, False: 169k]
  ------------------
  344|      0|        OPENSSL_free(impl);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  345|      0|        return 0;
  346|      0|    }
  347|   169k|    impl->provider = prov;
  348|       |
  349|       |    /* Insert into the hash table if required */
  350|   169k|    if (!ossl_property_write_lock(store)) {
  ------------------
  |  Branch (350:9): [True: 0, False: 169k]
  ------------------
  351|      0|        impl_free(impl);
  352|      0|        return 0;
  353|      0|    }
  354|       |
  355|       |    /*
  356|       |     * Flush the alg cache of any implementation that already exists
  357|       |     * for this id.
  358|       |     * This is done to ensure that on the next lookup we go through the
  359|       |     * provider comparison in ossl_method_store_fetch.  If we don't do this
  360|       |     * then this new method won't be given a chance to get selected.
  361|       |     * NOTE: This doesn't actually remove the method from the backing store
  362|       |     * It just ensures that we query the backing store when (re)-adding a
  363|       |     * method to the algorithm cache, in case the one selected by the next
  364|       |     * query selects a different implementation
  365|       |     */
  366|   169k|    ossl_method_cache_flush(store, nid);
  367|       |
  368|       |    /*
  369|       |     * Parse the properties associated with this method, and convert it to a
  370|       |     * property list stored against the implementation for later comparison
  371|       |     * during fetch operations
  372|       |     */
  373|   169k|    if ((impl->properties = ossl_prop_defn_get(store->ctx, properties)) == NULL) {
  ------------------
  |  Branch (373:9): [True: 1.18k, False: 167k]
  ------------------
  374|  1.18k|        impl->properties = ossl_parse_property(store->ctx, properties);
  375|  1.18k|        if (impl->properties == NULL)
  ------------------
  |  Branch (375:13): [True: 0, False: 1.18k]
  ------------------
  376|      0|            goto err;
  377|  1.18k|        if (!ossl_prop_defn_set(store->ctx, properties, &impl->properties)) {
  ------------------
  |  Branch (377:13): [True: 0, False: 1.18k]
  ------------------
  378|      0|            ossl_property_free(impl->properties);
  379|      0|            impl->properties = NULL;
  380|      0|            goto err;
  381|      0|        }
  382|  1.18k|    }
  383|       |
  384|       |    /*
  385|       |     * Check if we have an algorithm cache already for this nid.  If so use
  386|       |     * it, otherwise, create it, and insert it into the store
  387|       |     */
  388|   169k|    alg = ossl_method_store_retrieve(store, nid);
  389|   169k|    if (alg == NULL) {
  ------------------
  |  Branch (389:9): [True: 168k, False: 589]
  ------------------
  390|   168k|        if ((alg = OPENSSL_zalloc(sizeof(*alg))) == NULL
  ------------------
  |  |  108|   168k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (390:13): [True: 0, False: 168k]
  ------------------
  391|   168k|            || (alg->impls = sk_IMPLEMENTATION_new_null()) == NULL
  ------------------
  |  Branch (391:16): [True: 0, False: 168k]
  ------------------
  392|   168k|            || (alg->cache = lh_QUERY_new(&query_hash, &query_cmp)) == NULL)
  ------------------
  |  Branch (392:16): [True: 0, False: 168k]
  ------------------
  393|      0|            goto err;
  394|   168k|        alg->nid = nid;
  395|   168k|        if (!ossl_method_store_insert(store, alg))
  ------------------
  |  Branch (395:13): [True: 0, False: 168k]
  ------------------
  396|      0|            goto err;
  397|   168k|        OSSL_TRACE2(QUERY, "Inserted an alg with nid %d into the store %p\n", nid, (void *)store);
  ------------------
  |  |  295|   168k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|   168k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  398|   168k|    }
  399|       |
  400|       |    /* Push onto stack if there isn't one there already */
  401|   169k|    for (i = 0; i < sk_IMPLEMENTATION_num(alg->impls); i++) {
  ------------------
  |  Branch (401:17): [True: 620, False: 169k]
  ------------------
  402|    620|        const IMPLEMENTATION *tmpimpl = sk_IMPLEMENTATION_value(alg->impls, i);
  403|       |
  404|    620|        if (tmpimpl->provider == impl->provider
  ------------------
  |  Branch (404:13): [True: 77, False: 543]
  ------------------
  405|     77|            && tmpimpl->properties == impl->properties)
  ------------------
  |  Branch (405:16): [True: 0, False: 77]
  ------------------
  406|      0|            break;
  407|    620|    }
  408|       |
  409|   169k|    if (i == sk_IMPLEMENTATION_num(alg->impls)
  ------------------
  |  Branch (409:9): [True: 169k, False: 0]
  ------------------
  410|   169k|        && sk_IMPLEMENTATION_push(alg->impls, impl)) {
  ------------------
  |  Branch (410:12): [True: 169k, False: 0]
  ------------------
  411|   169k|        ret = 1;
  412|   169k|#ifndef FIPS_MODULE
  413|   169k|        OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  221|   169k|    do {                           \
  |  |  222|   169k|        BIO *trc_out = NULL;       \
  |  |  223|   169k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 169k]
  |  |  ------------------
  ------------------
  414|      0|        {
  415|      0|            BIO_printf(trc_out, "Adding to method store "
  416|      0|                                "nid: %d\nproperties: %s\nprovider: %s\n",
  417|      0|                nid, properties,
  418|      0|                ossl_provider_name(prov) == NULL ? "none" : ossl_provider_name(prov));
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|        }
  420|   169k|        OSSL_TRACE_END(QUERY);
  ------------------
  |  |  226|   169k|    }                            \
  |  |  227|   169k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 169k]
  |  |  ------------------
  ------------------
  421|   169k|#endif
  422|   169k|    }
  423|   169k|    ossl_property_unlock(store);
  424|   169k|    if (ret == 0)
  ------------------
  |  Branch (424:9): [True: 0, False: 169k]
  ------------------
  425|      0|        impl_free(impl);
  426|   169k|    return ret;
  427|       |
  428|      0|err:
  429|      0|    ossl_property_unlock(store);
  430|       |    alg_cleanup(0, alg, NULL);
  431|      0|    impl_free(impl);
  432|      0|    return 0;
  433|   169k|}
ossl_method_store_remove_all_provided:
  540|  3.68k|{
  541|  3.68k|    struct alg_cleanup_by_provider_data_st data;
  542|       |
  543|  3.68k|    if (!ossl_property_write_lock(store))
  ------------------
  |  Branch (543:9): [True: 0, False: 3.68k]
  ------------------
  544|      0|        return 0;
  545|  3.68k|    data.prov = prov;
  546|  3.68k|    data.store = store;
  547|  3.68k|    ossl_sa_ALGORITHM_doall_arg(store->algs, &alg_cleanup_by_provider, &data);
  548|  3.68k|    ossl_property_unlock(store);
  549|  3.68k|    return 1;
  550|  3.68k|}
ossl_method_store_do_all:
  581|      6|{
  582|      6|    int i, j;
  583|      6|    int numalgs, numimps;
  584|      6|    STACK_OF(ALGORITHM) *tmpalgs;
  ------------------
  |  |   33|      6|#define STACK_OF(type) struct stack_st_##type
  ------------------
  585|      6|    ALGORITHM *alg;
  586|       |
  587|      6|    if (store != NULL) {
  ------------------
  |  Branch (587:9): [True: 6, False: 0]
  ------------------
  588|       |
  589|      6|        if (!ossl_property_read_lock(store))
  ------------------
  |  Branch (589:13): [True: 0, False: 6]
  ------------------
  590|      0|            return;
  591|       |
  592|      6|        tmpalgs = sk_ALGORITHM_new_reserve(NULL,
  593|      6|            (int)ossl_sa_ALGORITHM_num(store->algs));
  594|      6|        if (tmpalgs == NULL) {
  ------------------
  |  Branch (594:13): [True: 0, False: 6]
  ------------------
  595|      0|            ossl_property_unlock(store);
  596|      0|            return;
  597|      0|        }
  598|       |
  599|      6|        ossl_sa_ALGORITHM_doall_arg(store->algs, alg_copy, tmpalgs);
  600|      6|        ossl_property_unlock(store);
  601|      6|        numalgs = sk_ALGORITHM_num(tmpalgs);
  602|    662|        for (i = 0; i < numalgs; i++) {
  ------------------
  |  Branch (602:21): [True: 656, False: 6]
  ------------------
  603|    656|            alg = sk_ALGORITHM_value(tmpalgs, i);
  604|    656|            numimps = sk_IMPLEMENTATION_num(alg->impls);
  605|  1.49k|            for (j = 0; j < numimps; j++)
  ------------------
  |  Branch (605:25): [True: 840, False: 656]
  ------------------
  606|    840|                alg_do_one(alg, sk_IMPLEMENTATION_value(alg->impls, j), fn, fnarg);
  607|    656|        }
  608|      6|        sk_ALGORITHM_pop_free(tmpalgs, del_tmpalg);
  609|      6|    }
  610|      6|}
ossl_method_store_fetch:
  638|  48.8k|{
  639|  48.8k|    OSSL_PROPERTY_LIST **plp;
  640|  48.8k|    ALGORITHM *alg;
  641|  48.8k|    IMPLEMENTATION *impl, *best_impl = NULL;
  642|  48.8k|    OSSL_PROPERTY_LIST *pq = NULL, *p2 = NULL;
  643|  48.8k|    const OSSL_PROVIDER *prov = prov_rw != NULL ? *prov_rw : NULL;
  ------------------
  |  Branch (643:33): [True: 48.8k, False: 0]
  ------------------
  644|  48.8k|    int ret = 0;
  645|  48.8k|    int j, best = -1, score, optional;
  646|       |
  647|  48.8k|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (647:9): [True: 0, False: 48.8k]
  |  Branch (647:21): [True: 0, False: 48.8k]
  |  Branch (647:39): [True: 0, False: 48.8k]
  ------------------
  648|      0|        return 0;
  649|       |
  650|  48.8k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  651|  48.8k|    if (ossl_lib_ctx_is_default(store->ctx)
  ------------------
  |  Branch (651:9): [True: 10.8k, False: 37.9k]
  ------------------
  652|  10.8k|        && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  510|  10.8k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (652:12): [True: 0, False: 10.8k]
  ------------------
  653|      0|        return 0;
  654|  48.8k|#endif
  655|       |
  656|       |    /* This only needs to be a read lock, because the query won't create anything */
  657|  48.8k|    if (!ossl_property_read_lock(store))
  ------------------
  |  Branch (657:9): [True: 0, False: 48.8k]
  ------------------
  658|      0|        return 0;
  659|       |
  660|  48.8k|    OSSL_TRACE2(QUERY, "Retrieving by nid %d from store %p\n", nid, (void *)store);
  ------------------
  |  |  295|  48.8k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|  48.8k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  661|  48.8k|    alg = ossl_method_store_retrieve(store, nid);
  662|  48.8k|    if (alg == NULL) {
  ------------------
  |  Branch (662:9): [True: 13.9k, False: 34.8k]
  ------------------
  663|  13.9k|        ossl_property_unlock(store);
  664|  13.9k|        OSSL_TRACE2(QUERY, "Failed to retrieve by nid %d from store %p\n", nid, (void *)store);
  ------------------
  |  |  295|  13.9k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|  13.9k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  665|  13.9k|        return 0;
  666|  13.9k|    }
  667|  34.8k|    OSSL_TRACE2(QUERY, "Retrieved by nid %d from store %p\n", nid, (void *)store);
  ------------------
  |  |  295|  34.8k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|  34.8k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  668|       |
  669|       |    /*
  670|       |     * If a property query string is provided, convert it to an
  671|       |     * OSSL_PROPERTY_LIST structure
  672|       |     */
  673|  34.8k|    if (prop_query != NULL)
  ------------------
  |  Branch (673:9): [True: 34.8k, False: 0]
  ------------------
  674|  34.8k|        p2 = pq = ossl_parse_query(store->ctx, prop_query, 0);
  675|       |
  676|       |    /*
  677|       |     * If the library context has default properties specified
  678|       |     * then merge those with the properties passed to this function
  679|       |     */
  680|  34.8k|    plp = ossl_ctx_global_properties(store->ctx, 0);
  681|  34.8k|    if (plp != NULL && *plp != NULL) {
  ------------------
  |  Branch (681:9): [True: 34.8k, False: 0]
  |  Branch (681:24): [True: 0, False: 34.8k]
  ------------------
  682|      0|        if (pq == NULL) {
  ------------------
  |  Branch (682:13): [True: 0, False: 0]
  ------------------
  683|      0|            pq = *plp;
  684|      0|        } else {
  685|      0|            p2 = ossl_property_merge(pq, *plp);
  686|      0|            ossl_property_free(pq);
  687|      0|            if (p2 == NULL)
  ------------------
  |  Branch (687:17): [True: 0, False: 0]
  ------------------
  688|      0|                goto fin;
  689|      0|            pq = p2;
  690|      0|        }
  691|      0|    }
  692|       |
  693|       |    /*
  694|       |     * Search for a provider that provides this implementation.
  695|       |     * If the requested provider is NULL, then any provider will do,
  696|       |     * otherwise we should try to find the one that matches the requested
  697|       |     * provider.  Note that providers are given implicit preference via the
  698|       |     * ordering of the implementation stack
  699|       |     */
  700|  34.8k|    if (pq == NULL) {
  ------------------
  |  Branch (700:9): [True: 21.3k, False: 13.5k]
  ------------------
  701|  21.3k|        for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (701:21): [True: 21.3k, False: 0]
  ------------------
  702|  21.3k|            if ((impl = sk_IMPLEMENTATION_value(alg->impls, j)) != NULL
  ------------------
  |  Branch (702:17): [True: 21.3k, False: 0]
  ------------------
  703|  21.3k|                && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (703:21): [True: 21.3k, False: 0]
  |  Branch (703:37): [True: 0, False: 0]
  ------------------
  704|  21.3k|                best_impl = impl;
  705|  21.3k|                ret = 1;
  706|  21.3k|                break;
  707|  21.3k|            }
  708|  21.3k|        }
  709|  21.3k|        goto fin;
  710|  21.3k|    }
  711|       |
  712|       |    /*
  713|       |     * If there are optional properties specified
  714|       |     * then run the search again, and select the provider that matches the
  715|       |     * most options
  716|       |     */
  717|  13.5k|    optional = ossl_property_has_optional(pq);
  718|  20.6k|    for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (718:17): [True: 13.5k, False: 7.11k]
  ------------------
  719|  13.5k|        if ((impl = sk_IMPLEMENTATION_value(alg->impls, j)) != NULL
  ------------------
  |  Branch (719:13): [True: 13.5k, False: 0]
  ------------------
  720|  13.5k|            && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (720:17): [True: 12.4k, False: 1.10k]
  |  Branch (720:33): [True: 1.10k, False: 0]
  ------------------
  721|  13.5k|            score = ossl_property_match_count(pq, impl->properties);
  722|  13.5k|            if (score > best) {
  ------------------
  |  Branch (722:17): [True: 6.50k, False: 7.03k]
  ------------------
  723|  6.50k|                best_impl = impl;
  724|  6.50k|                best = score;
  725|  6.50k|                ret = 1;
  726|  6.50k|                if (!optional)
  ------------------
  |  Branch (726:21): [True: 6.42k, False: 82]
  ------------------
  727|  6.42k|                    goto fin;
  728|  6.50k|            }
  729|  13.5k|        }
  730|  13.5k|    }
  731|  34.8k|fin:
  732|  34.8k|    if (ret && ossl_method_up_ref(&best_impl->method)) {
  ------------------
  |  Branch (732:9): [True: 27.8k, False: 7.03k]
  |  Branch (732:16): [True: 27.8k, False: 0]
  ------------------
  733|  27.8k|        *method = best_impl->method.method;
  734|  27.8k|        if (prov_rw != NULL)
  ------------------
  |  Branch (734:13): [True: 27.8k, False: 0]
  ------------------
  735|  27.8k|            *prov_rw = best_impl->provider;
  736|  27.8k|    } else {
  737|  7.03k|        ret = 0;
  738|  7.03k|    }
  739|       |
  740|  34.8k|#ifndef FIPS_MODULE
  741|  34.8k|    OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  221|  34.8k|    do {                           \
  |  |  222|  34.8k|        BIO *trc_out = NULL;       \
  |  |  223|  34.8k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 34.8k]
  |  |  ------------------
  ------------------
  742|      0|    {
  743|      0|        char buf[512];
  744|      0|        size_t size;
  745|       |
  746|      0|        size = ossl_property_list_to_string(NULL, pq, buf, 512);
  747|      0|        BIO_printf(trc_out, "method store query with properties %s "
  748|      0|                            "resolves to provider %s\n",
  749|      0|            size == 0 ? "none" : buf,
  ------------------
  |  Branch (749:13): [True: 0, False: 0]
  ------------------
  750|      0|            best_impl == NULL ? "none" : ossl_provider_name(best_impl->provider));
  ------------------
  |  Branch (750:13): [True: 0, False: 0]
  ------------------
  751|      0|    }
  752|  34.8k|    OSSL_TRACE_END(QUERY);
  ------------------
  |  |  226|  34.8k|    }                            \
  |  |  227|  34.8k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 34.8k]
  |  |  ------------------
  ------------------
  753|  34.8k|#endif
  754|       |
  755|  34.8k|    ossl_property_unlock(store);
  756|  34.8k|    ossl_property_free(p2);
  757|  34.8k|    return ret;
  758|  13.5k|}
ossl_method_store_cache_flush_all:
  776|  3.68k|{
  777|  3.68k|    if (!ossl_property_write_lock(store))
  ------------------
  |  Branch (777:9): [True: 0, False: 3.68k]
  ------------------
  778|      0|        return 0;
  779|  3.68k|    ossl_sa_ALGORITHM_doall(store->algs, &impl_cache_flush_alg);
  780|  3.68k|    store->cache_nelem = 0;
  781|  3.68k|    ossl_property_unlock(store);
  782|  3.68k|    return 1;
  783|  3.68k|}
ossl_method_store_cache_get:
  861|   733k|{
  862|   733k|    ALGORITHM *alg;
  863|   733k|    QUERY elem, *r;
  864|   733k|    int res = 0;
  865|       |
  866|   733k|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (866:9): [True: 0, False: 733k]
  |  Branch (866:21): [True: 0, False: 733k]
  |  Branch (866:38): [True: 0, False: 733k]
  ------------------
  867|      0|        return 0;
  868|       |
  869|   733k|    if (!ossl_property_read_lock(store))
  ------------------
  |  Branch (869:9): [True: 0, False: 733k]
  ------------------
  870|      0|        return 0;
  871|   733k|    alg = ossl_method_store_retrieve(store, nid);
  872|   733k|    if (alg == NULL)
  ------------------
  |  Branch (872:9): [True: 15.8k, False: 718k]
  ------------------
  873|  15.8k|        goto err;
  874|       |
  875|   718k|    elem.query = prop_query;
  876|   718k|    elem.provider = prov;
  877|   718k|    r = lh_QUERY_retrieve(alg->cache, &elem);
  878|   718k|    if (r == NULL)
  ------------------
  |  Branch (878:9): [True: 31.8k, False: 686k]
  ------------------
  879|  31.8k|        goto err;
  880|   686k|    if (ossl_method_up_ref(&r->method)) {
  ------------------
  |  Branch (880:9): [True: 686k, False: 0]
  ------------------
  881|   686k|        *method = r->method.method;
  882|   686k|        res = 1;
  883|   686k|    }
  884|   733k|err:
  885|   733k|    ossl_property_unlock(store);
  886|   733k|    return res;
  887|   686k|}
ossl_method_store_cache_set:
  893|  27.8k|{
  894|  27.8k|    QUERY elem, *old, *p = NULL;
  895|  27.8k|    ALGORITHM *alg;
  896|  27.8k|    size_t len;
  897|  27.8k|    int res = 1;
  898|       |
  899|  27.8k|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (899:9): [True: 0, False: 27.8k]
  |  Branch (899:21): [True: 0, False: 27.8k]
  |  Branch (899:38): [True: 0, False: 27.8k]
  ------------------
  900|      0|        return 0;
  901|       |
  902|  27.8k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|  27.8k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  27.8k|    __FILE__, __LINE__)
  ------------------
  |  Branch (902:9): [True: 0, False: 27.8k]
  ------------------
  903|      0|        return 0;
  904|       |
  905|  27.8k|    if (!ossl_property_write_lock(store))
  ------------------
  |  Branch (905:9): [True: 0, False: 27.8k]
  ------------------
  906|      0|        return 0;
  907|  27.8k|    if (store->cache_need_flush)
  ------------------
  |  Branch (907:9): [True: 0, False: 27.8k]
  ------------------
  908|      0|        ossl_method_cache_flush_some(store);
  909|  27.8k|    alg = ossl_method_store_retrieve(store, nid);
  910|  27.8k|    if (alg == NULL)
  ------------------
  |  Branch (910:9): [True: 0, False: 27.8k]
  ------------------
  911|      0|        goto err;
  912|       |
  913|  27.8k|    if (method == NULL) {
  ------------------
  |  Branch (913:9): [True: 0, False: 27.8k]
  ------------------
  914|      0|        elem.query = prop_query;
  915|      0|        elem.provider = prov;
  916|      0|        if ((old = lh_QUERY_delete(alg->cache, &elem)) != NULL) {
  ------------------
  |  Branch (916:13): [True: 0, False: 0]
  ------------------
  917|      0|            impl_cache_free(old);
  918|      0|            store->cache_nelem--;
  919|      0|        }
  920|      0|        goto end;
  921|      0|    }
  922|  27.8k|    p = OPENSSL_malloc(sizeof(*p) + (len = strlen(prop_query)));
  ------------------
  |  |  106|  27.8k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  923|  27.8k|    if (p != NULL) {
  ------------------
  |  Branch (923:9): [True: 27.8k, False: 0]
  ------------------
  924|  27.8k|        p->query = p->body;
  925|  27.8k|        p->provider = prov;
  926|  27.8k|        p->method.method = method;
  927|  27.8k|        p->method.up_ref = method_up_ref;
  928|  27.8k|        p->method.free = method_destruct;
  929|  27.8k|        if (!ossl_method_up_ref(&p->method))
  ------------------
  |  Branch (929:13): [True: 0, False: 27.8k]
  ------------------
  930|      0|            goto err;
  931|  27.8k|        memcpy((char *)p->query, prop_query, len + 1);
  932|  27.8k|        if ((old = lh_QUERY_insert(alg->cache, p)) != NULL) {
  ------------------
  |  Branch (932:13): [True: 0, False: 27.8k]
  ------------------
  933|      0|            impl_cache_free(old);
  934|      0|            goto end;
  935|      0|        }
  936|  27.8k|        if (!lh_QUERY_error(alg->cache)) {
  ------------------
  |  Branch (936:13): [True: 27.8k, False: 0]
  ------------------
  937|  27.8k|            if (++store->cache_nelem >= IMPL_CACHE_FLUSH_THRESHOLD)
  ------------------
  |  |   34|  27.8k|#define IMPL_CACHE_FLUSH_THRESHOLD 500
  ------------------
  |  Branch (937:17): [True: 0, False: 27.8k]
  ------------------
  938|      0|                store->cache_need_flush = 1;
  939|  27.8k|            goto end;
  940|  27.8k|        }
  941|      0|        ossl_method_free(&p->method);
  942|      0|    }
  943|      0|err:
  944|      0|    res = 0;
  945|      0|    OPENSSL_free(p);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  946|  27.8k|end:
  947|  27.8k|    ossl_property_unlock(store);
  948|  27.8k|    return res;
  949|      0|}
property.c:alg_cleanup:
  226|   168k|{
  227|   168k|    OSSL_METHOD_STORE *store = arg;
  228|       |
  229|   168k|    if (a != NULL) {
  ------------------
  |  Branch (229:9): [True: 168k, False: 0]
  ------------------
  230|   168k|        sk_IMPLEMENTATION_pop_free(a->impls, &impl_free);
  231|   168k|        lh_QUERY_doall(a->cache, &impl_cache_free);
  232|   168k|        lh_QUERY_free(a->cache);
  233|   168k|        OPENSSL_free(a);
  ------------------
  |  |  131|   168k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  234|   168k|    }
  235|   168k|    if (store != NULL)
  ------------------
  |  Branch (235:9): [True: 168k, False: 0]
  ------------------
  236|   168k|        ossl_sa_ALGORITHM_set(store->algs, idx, NULL);
  237|   168k|}
property.c:ossl_method_up_ref:
  163|   911k|{
  164|   911k|    return (*method->up_ref)(method->method);
  165|   911k|}
property.c:ossl_property_write_lock:
  178|   204k|{
  179|   204k|    return p != NULL ? CRYPTO_THREAD_write_lock(p->lock) : 0;
  ------------------
  |  Branch (179:12): [True: 204k, False: 0]
  ------------------
  180|   204k|}
property.c:impl_free:
  204|   169k|{
  205|   169k|    if (impl != NULL) {
  ------------------
  |  Branch (205:9): [True: 169k, False: 0]
  ------------------
  206|   169k|        ossl_method_free(&impl->method);
  207|   169k|        OPENSSL_free(impl);
  ------------------
  |  |  131|   169k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|   169k|    }
  209|   169k|}
property.c:ossl_method_store_retrieve:
  283|  1.14M|{
  284|  1.14M|    return ossl_sa_ALGORITHM_get(store->algs, nid);
  285|  1.14M|}
property.c:query_hash:
  188|   745k|{
  189|   745k|    return OPENSSL_LH_strhash(a->query);
  190|   745k|}
property.c:query_cmp:
  193|   686k|{
  194|   686k|    int res = strcmp(a->query, b->query);
  195|       |
  196|   686k|    if (res == 0 && a->provider != NULL && b->provider != NULL)
  ------------------
  |  Branch (196:9): [True: 686k, False: 4]
  |  Branch (196:21): [True: 686k, False: 0]
  |  Branch (196:44): [True: 2.20k, False: 684k]
  ------------------
  197|  2.20k|        res = b->provider > a->provider ? 1
  ------------------
  |  Branch (197:15): [True: 0, False: 2.20k]
  ------------------
  198|  2.20k|            : b->provider < a->provider ? -1
  ------------------
  |  Branch (198:15): [True: 0, False: 2.20k]
  ------------------
  199|  2.20k|                                        : 0;
  200|   686k|    return res;
  201|   686k|}
property.c:ossl_method_store_insert:
  288|   168k|{
  289|   168k|    return ossl_sa_ALGORITHM_set(store->algs, alg->nid, alg);
  290|   168k|}
property.c:ossl_property_unlock:
  183|   987k|{
  184|   987k|    return p != 0 ? CRYPTO_THREAD_unlock(p->lock) : 0;
  ------------------
  |  Branch (184:12): [True: 987k, False: 0]
  ------------------
  185|   987k|}
property.c:alg_cleanup_by_provider:
  494|   242k|{
  495|   242k|    struct alg_cleanup_by_provider_data_st *data = arg;
  496|   242k|    int i, count;
  497|       |
  498|       |    /*
  499|       |     * We walk the stack backwards, to avoid having to deal with stack shifts
  500|       |     * caused by deletion
  501|       |     */
  502|   485k|    for (count = 0, i = sk_IMPLEMENTATION_num(alg->impls); i-- > 0;) {
  ------------------
  |  Branch (502:60): [True: 243k, False: 242k]
  ------------------
  503|   243k|        IMPLEMENTATION *impl = sk_IMPLEMENTATION_value(alg->impls, i);
  504|       |
  505|   243k|        if (impl->provider == data->prov) {
  ------------------
  |  Branch (505:13): [True: 543, False: 242k]
  ------------------
  506|    543|#ifndef FIPS_MODULE
  507|    543|            OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  221|    543|    do {                           \
  |  |  222|    543|        BIO *trc_out = NULL;       \
  |  |  223|    543|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 543]
  |  |  ------------------
  ------------------
  508|      0|            {
  509|      0|                char buf[512];
  510|      0|                size_t size;
  511|       |
  512|      0|                size = ossl_property_list_to_string(NULL, impl->properties, buf,
  513|      0|                    sizeof(buf));
  514|      0|                BIO_printf(trc_out, "Removing implementation from "
  515|      0|                                    "query cache\nproperties %s\nprovider %s\n",
  516|      0|                    size == 0 ? "none" : buf,
  ------------------
  |  Branch (516:21): [True: 0, False: 0]
  ------------------
  517|      0|                    ossl_provider_name(impl->provider) == NULL ? "none" : ossl_provider_name(impl->provider));
  ------------------
  |  Branch (517:21): [True: 0, False: 0]
  ------------------
  518|      0|            }
  519|    543|            OSSL_TRACE_END(QUERY);
  ------------------
  |  |  226|    543|    }                            \
  |  |  227|    543|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 543]
  |  |  ------------------
  ------------------
  520|    543|#endif
  521|       |
  522|    543|            (void)sk_IMPLEMENTATION_delete(alg->impls, i);
  523|    543|            count++;
  524|    543|            impl_free(impl);
  525|    543|        }
  526|   243k|    }
  527|       |
  528|       |    /*
  529|       |     * If we removed any implementation, we also clear the whole associated
  530|       |     * cache, 'cause that's the sensible thing to do.
  531|       |     * There's no point flushing the cache entries where we didn't remove
  532|       |     * any implementation, though.
  533|       |     */
  534|   242k|    if (count > 0)
  ------------------
  |  Branch (534:9): [True: 543, False: 241k]
  ------------------
  535|    543|        ossl_method_cache_flush_alg(data->store, alg);
  536|   242k|}
property.c:ossl_method_cache_flush_alg:
  762|  1.13k|{
  763|  1.13k|    store->cache_nelem -= lh_QUERY_num_items(alg->cache);
  764|  1.13k|    impl_cache_flush_alg(0, alg);
  765|  1.13k|}
property.c:ossl_property_read_lock:
  173|   782k|{
  174|   782k|    return p != NULL ? CRYPTO_THREAD_read_lock(p->lock) : 0;
  ------------------
  |  Branch (174:12): [True: 782k, False: 0]
  ------------------
  175|   782k|}
property.c:alg_copy:
  560|    656|{
  561|    656|    STACK_OF(ALGORITHM) *newalg = arg;
  ------------------
  |  |   33|    656|#define STACK_OF(type) struct stack_st_##type
  ------------------
  562|       |
  563|    656|    alg = OPENSSL_memdup(alg, sizeof(ALGORITHM));
  ------------------
  |  |  133|    656|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  564|    656|    if (alg == NULL)
  ------------------
  |  Branch (564:9): [True: 0, False: 656]
  ------------------
  565|      0|        return;
  566|       |
  567|    656|    alg->impls = sk_IMPLEMENTATION_dup(alg->impls);
  568|       |
  569|    656|    (void)sk_ALGORITHM_push(newalg, alg);
  570|    656|}
property.c:alg_do_one:
  555|    840|{
  556|    840|    fn(alg->nid, impl->method.method, fnarg);
  557|    840|}
property.c:del_tmpalg:
  573|    656|{
  574|    656|    sk_IMPLEMENTATION_free(alg->impls);
  575|    656|    OPENSSL_free(alg);
  ------------------
  |  |  131|    656|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  576|    656|}
property.c:ossl_method_cache_flush:
  768|   169k|{
  769|   169k|    ALGORITHM *alg = ossl_method_store_retrieve(store, nid);
  770|       |
  771|   169k|    if (alg != NULL)
  ------------------
  |  Branch (771:9): [True: 589, False: 168k]
  ------------------
  772|    589|        ossl_method_cache_flush_alg(store, alg);
  773|   169k|}
property.c:impl_cache_flush_alg:
  220|  1.13k|{
  221|  1.13k|    lh_QUERY_doall(alg->cache, &impl_cache_free);
  222|  1.13k|    lh_QUERY_flush(alg->cache);
  223|  1.13k|}
property.c:impl_cache_free:
  212|  27.8k|{
  213|  27.8k|    if (elem != NULL) {
  ------------------
  |  Branch (213:9): [True: 27.8k, False: 0]
  ------------------
  214|  27.8k|        ossl_method_free(&elem->method);
  215|  27.8k|        OPENSSL_free(elem);
  ------------------
  |  |  131|  27.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  216|  27.8k|    }
  217|  27.8k|}
property.c:ossl_method_free:
  168|   196k|{
  169|   196k|    (*method->free)(method->method);
  170|   196k|}

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.26k|{
  347|  1.26k|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  348|  1.26k|    OSSL_PROPERTY_LIST *res = NULL;
  349|  1.26k|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|  1.26k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  350|  1.26k|    const char *s = defn;
  351|  1.26k|    int done;
  352|       |
  353|  1.26k|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (353:9): [True: 0, False: 1.26k]
  |  Branch (353:22): [True: 0, False: 1.26k]
  ------------------
  354|      0|        return NULL;
  355|       |
  356|  1.26k|    s = skip_space(s);
  357|  1.26k|    done = *s == '\0';
  358|  2.79k|    while (!done) {
  ------------------
  |  Branch (358:12): [True: 1.52k, False: 1.26k]
  ------------------
  359|  1.52k|        const char *start = s;
  360|       |
  361|  1.52k|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  106|  1.52k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|  1.52k|        if (prop == NULL)
  ------------------
  |  Branch (362:13): [True: 0, False: 1.52k]
  ------------------
  363|      0|            goto err;
  364|  1.52k|        memset(&prop->v, 0, sizeof(prop->v));
  365|  1.52k|        prop->optional = 0;
  366|  1.52k|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (366:13): [True: 0, False: 1.52k]
  ------------------
  367|      0|            goto err;
  368|  1.52k|        prop->oper = OSSL_PROPERTY_OPER_EQ;
  369|  1.52k|        if (prop->name_idx == 0) {
  ------------------
  |  Branch (369:13): [True: 0, False: 1.52k]
  ------------------
  370|      0|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|      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.52k|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (374:13): [True: 1.52k, False: 0]
  ------------------
  375|  1.52k|            if (!parse_value(ctx, &s, prop, 1)) {
  ------------------
  |  Branch (375:17): [True: 0, False: 1.52k]
  ------------------
  376|      0|                ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |  118|      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.52k|        } 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.52k|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (386:13): [True: 0, False: 1.52k]
  ------------------
  387|      0|            goto err;
  388|  1.52k|        prop = NULL;
  389|  1.52k|        done = !match_ch(&s, ',');
  390|  1.52k|    }
  391|  1.26k|    if (*s != '\0') {
  ------------------
  |  Branch (391:9): [True: 0, False: 1.26k]
  ------------------
  392|      0|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  118|      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.26k|    res = stack_to_property_list(ctx, sk);
  397|       |
  398|  1.26k|err:
  399|  1.26k|    OPENSSL_free(prop);
  ------------------
  |  |  131|  1.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  400|  1.26k|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  401|  1.26k|    return res;
  402|  1.26k|}
ossl_parse_query:
  406|  34.8k|{
  407|  34.8k|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|  34.8k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  408|  34.8k|    OSSL_PROPERTY_LIST *res = NULL;
  409|  34.8k|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  410|  34.8k|    int done;
  411|       |
  412|  34.8k|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (412:9): [True: 0, False: 34.8k]
  |  Branch (412:22): [True: 0, False: 34.8k]
  ------------------
  413|      0|        return NULL;
  414|       |
  415|  34.8k|    s = skip_space(s);
  416|  34.8k|    done = *s == '\0';
  417|   239k|    while (!done) {
  ------------------
  |  Branch (417:12): [True: 208k, False: 31.2k]
  ------------------
  418|   208k|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  106|   208k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  419|   208k|        if (prop == NULL)
  ------------------
  |  Branch (419:13): [True: 0, False: 208k]
  ------------------
  420|      0|            goto err;
  421|   208k|        memset(&prop->v, 0, sizeof(prop->v));
  422|       |
  423|   208k|        if (match_ch(&s, '-')) {
  ------------------
  |  Branch (423:13): [True: 1.29k, False: 206k]
  ------------------
  424|  1.29k|            prop->oper = OSSL_PROPERTY_OVERRIDE;
  425|  1.29k|            prop->optional = 0;
  426|  1.29k|            if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (426:17): [True: 697, False: 595]
  ------------------
  427|    697|                goto err;
  428|    595|            goto skip_value;
  429|  1.29k|        }
  430|   206k|        prop->optional = match_ch(&s, '?');
  431|   206k|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (431:13): [True: 2.99k, False: 203k]
  ------------------
  432|  2.99k|            goto err;
  433|       |
  434|   203k|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (434:13): [True: 101k, False: 102k]
  ------------------
  435|   101k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  436|   102k|        } else if (MATCH(&s, "!=")) {
  ------------------
  |  |   43|   102k|#define MATCH(s, m) match(s, m, sizeof(m) - 1)
  |  |  ------------------
  |  |  |  Branch (43:21): [True: 5.19k, False: 97.3k]
  |  |  ------------------
  ------------------
  437|  5.19k|            prop->oper = OSSL_PROPERTY_OPER_NE;
  438|  97.3k|        } else {
  439|       |            /* A name alone is a Boolean comparison for true */
  440|  97.3k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  441|  97.3k|            prop->type = OSSL_PROPERTY_TYPE_STRING;
  442|  97.3k|            prop->v.str_val = OSSL_PROPERTY_TRUE;
  ------------------
  |  |   39|  97.3k|#define OSSL_PROPERTY_TRUE 1
  ------------------
  443|  97.3k|            goto skip_value;
  444|  97.3k|        }
  445|   106k|        if (!parse_value(ctx, &s, prop, create_values))
  ------------------
  |  Branch (445:13): [True: 43.7k, False: 62.7k]
  ------------------
  446|  43.7k|            prop->type = OSSL_PROPERTY_TYPE_VALUE_UNDEFINED;
  447|       |
  448|   204k|    skip_value:
  449|   204k|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (449:13): [True: 0, False: 204k]
  ------------------
  450|      0|            goto err;
  451|   204k|        prop = NULL;
  452|   204k|        done = !match_ch(&s, ',');
  453|   204k|    }
  454|  31.2k|    if (*s != '\0') {
  ------------------
  |  Branch (454:9): [True: 15.2k, False: 15.9k]
  ------------------
  455|  15.2k|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  406|  15.2k|    (ERR_new(),                                                  \
  |  |  407|  15.2k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  15.2k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  15.2k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  118|  15.2k|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   37|  15.2k|#define PROP_R_TRAILING_CHARACTERS 110
  ------------------
  456|  15.2k|            "HERE-->%s", s);
  457|  15.2k|        goto err;
  458|  15.2k|    }
  459|  15.9k|    res = stack_to_property_list(ctx, sk);
  460|       |
  461|  34.8k|err:
  462|  34.8k|    OPENSSL_free(prop);
  ------------------
  |  |  131|  34.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  463|  34.8k|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  464|  34.8k|    return res;
  465|  15.9k|}
ossl_property_match_count:
  473|  13.5k|{
  474|  13.5k|    const OSSL_PROPERTY_DEFINITION *const q = query->properties;
  475|  13.5k|    const OSSL_PROPERTY_DEFINITION *const d = defn->properties;
  476|  13.5k|    int i = 0, j = 0, matches = 0;
  477|  13.5k|    OSSL_PROPERTY_OPER oper;
  478|       |
  479|  19.1k|    while (i < query->num_properties) {
  ------------------
  |  Branch (479:12): [True: 12.6k, False: 6.50k]
  ------------------
  480|  12.6k|        if ((oper = q[i].oper) == OSSL_PROPERTY_OVERRIDE) {
  ------------------
  |  Branch (480:13): [True: 349, False: 12.3k]
  ------------------
  481|    349|            i++;
  482|    349|            continue;
  483|    349|        }
  484|  12.3k|        if (j < defn->num_properties) {
  ------------------
  |  Branch (484:13): [True: 8.47k, False: 3.86k]
  ------------------
  485|  8.47k|            if (q[i].name_idx > d[j].name_idx) { /* skip defn, not in query */
  ------------------
  |  Branch (485:17): [True: 2.25k, False: 6.21k]
  ------------------
  486|  2.25k|                j++;
  487|  2.25k|                continue;
  488|  2.25k|            }
  489|  6.21k|            if (q[i].name_idx == d[j].name_idx) { /* both in defn and query */
  ------------------
  |  Branch (489:17): [True: 0, False: 6.21k]
  ------------------
  490|      0|                const int eq = q[i].type == d[j].type
  ------------------
  |  Branch (490:32): [True: 0, False: 0]
  ------------------
  491|      0|                    && memcmp(&q[i].v, &d[j].v, sizeof(q[i].v)) == 0;
  ------------------
  |  Branch (491:24): [True: 0, False: 0]
  ------------------
  492|       |
  493|      0|                if ((eq && oper == OSSL_PROPERTY_OPER_EQ)
  ------------------
  |  Branch (493:22): [True: 0, False: 0]
  |  Branch (493:28): [True: 0, False: 0]
  ------------------
  494|      0|                    || (!eq && oper == OSSL_PROPERTY_OPER_NE))
  ------------------
  |  Branch (494:25): [True: 0, False: 0]
  |  Branch (494:32): [True: 0, False: 0]
  ------------------
  495|      0|                    matches++;
  496|      0|                else if (!q[i].optional)
  ------------------
  |  Branch (496:26): [True: 0, False: 0]
  ------------------
  497|      0|                    return -1;
  498|      0|                i++;
  499|      0|                j++;
  500|      0|                continue;
  501|      0|            }
  502|  6.21k|        }
  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|  10.0k|        if (q[i].type == OSSL_PROPERTY_TYPE_VALUE_UNDEFINED) {
  ------------------
  |  Branch (509:13): [True: 2.61k, False: 7.46k]
  ------------------
  510|  2.61k|            if (oper == OSSL_PROPERTY_OPER_NE)
  ------------------
  |  Branch (510:17): [True: 390, False: 2.22k]
  ------------------
  511|    390|                matches++;
  512|  2.22k|            else if (!q[i].optional)
  ------------------
  |  Branch (512:22): [True: 1.69k, False: 534]
  ------------------
  513|  1.69k|                return -1;
  514|  7.46k|        } else if (q[i].type != OSSL_PROPERTY_TYPE_STRING
  ------------------
  |  Branch (514:20): [True: 2.53k, False: 4.92k]
  ------------------
  515|  4.92k|            || (oper == OSSL_PROPERTY_OPER_EQ
  ------------------
  |  Branch (515:17): [True: 4.88k, False: 41]
  ------------------
  516|  4.88k|                && q[i].v.str_val != OSSL_PROPERTY_FALSE)
  ------------------
  |  |   40|  4.88k|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (516:20): [True: 4.84k, False: 41]
  ------------------
  517|     82|            || (oper == OSSL_PROPERTY_OPER_NE
  ------------------
  |  Branch (517:17): [True: 41, False: 41]
  ------------------
  518|  7.38k|                && q[i].v.str_val == OSSL_PROPERTY_FALSE)) {
  ------------------
  |  |   40|     41|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (518:20): [True: 0, False: 41]
  ------------------
  519|  7.38k|            if (!q[i].optional)
  ------------------
  |  Branch (519:17): [True: 5.34k, False: 2.04k]
  ------------------
  520|  5.34k|                return -1;
  521|  7.38k|        } else {
  522|     82|            matches++;
  523|     82|        }
  524|  3.04k|        i++;
  525|  3.04k|    }
  526|  6.50k|    return matches;
  527|  13.5k|}
ossl_property_free:
  530|  36.9k|{
  531|  36.9k|    OPENSSL_free(p);
  ------------------
  |  |  131|  36.9k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  532|  36.9k|}
ossl_property_parse_init:
  575|    785|{
  576|    785|    static const char *const predefined_names[] = {
  577|    785|        "provider", /* Name of provider (default, legacy, fips) */
  578|    785|        "version", /* Version number of this provider */
  579|    785|        "fips", /* FIPS validated or FIPS supporting algorithm */
  580|    785|        "output", /* Output type for encoders */
  581|    785|        "input", /* Input type for decoders */
  582|    785|        "structure", /* Structure name for encoders and decoders */
  583|    785|    };
  584|    785|    size_t i;
  585|       |
  586|  5.49k|    for (i = 0; i < OSSL_NELEM(predefined_names); i++)
  ------------------
  |  |   14|  5.49k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (586:17): [True: 4.71k, False: 785]
  ------------------
  587|  4.71k|        if (ossl_property_name(ctx, predefined_names[i], 1) == 0)
  ------------------
  |  Branch (587:13): [True: 0, False: 4.71k]
  ------------------
  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|    785|    if ((ossl_property_value(ctx, "yes", 1) != OSSL_PROPERTY_TRUE)
  ------------------
  |  |   39|    785|#define OSSL_PROPERTY_TRUE 1
  ------------------
  |  Branch (595:9): [True: 0, False: 785]
  ------------------
  596|    785|        || (ossl_property_value(ctx, "no", 1) != OSSL_PROPERTY_FALSE))
  ------------------
  |  |   40|    785|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (596:12): [True: 0, False: 785]
  ------------------
  597|      0|        goto err;
  598|       |
  599|    785|    return 1;
  600|      0|err:
  601|      0|    return 0;
  602|    785|}
property_parse.c:pd_compare:
  289|   190k|{
  290|   190k|    const OSSL_PROPERTY_DEFINITION *pd1 = *p1;
  291|   190k|    const OSSL_PROPERTY_DEFINITION *pd2 = *p2;
  292|       |
  293|   190k|    if (pd1->name_idx < pd2->name_idx)
  ------------------
  |  Branch (293:9): [True: 39.4k, False: 150k]
  ------------------
  294|  39.4k|        return -1;
  295|   150k|    if (pd1->name_idx > pd2->name_idx)
  ------------------
  |  Branch (295:9): [True: 27.0k, False: 123k]
  ------------------
  296|  27.0k|        return 1;
  297|   123k|    return 0;
  298|   150k|}
property_parse.c:skip_space:
   26|   633k|{
   27|   831k|    while (ossl_isspace(*s))
  ------------------
  |  |   82|   831k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|   831k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 198k, False: 633k]
  |  |  ------------------
  ------------------
   28|   198k|        s++;
   29|   633k|    return s;
   30|   633k|}
property_parse.c:parse_name:
   58|   209k|{
   59|   209k|    char name[100];
   60|   209k|    int err = 0;
   61|   209k|    size_t i = 0;
   62|   209k|    const char *s = *t;
   63|   209k|    int user_name = 0;
   64|       |
   65|   268k|    for (;;) {
   66|   268k|        if (!ossl_isalpha(*s)) {
  ------------------
  |  |   71|   268k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|   268k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   268k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|   268k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:13): [True: 3.11k, False: 265k]
  ------------------
   67|  3.11k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |  406|  3.11k|    (ERR_new(),                                                  \
  |  |  407|  3.11k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  3.11k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  3.11k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |  118|  3.11k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   30|  3.11k|#define PROP_R_NOT_AN_IDENTIFIER 103
  ------------------
   68|  3.11k|                "HERE-->%s", *t);
   69|  3.11k|            return 0;
   70|  3.11k|        }
   71|   838k|        do {
   72|   838k|            if (i < sizeof(name) - 1)
  ------------------
  |  Branch (72:17): [True: 801k, False: 36.9k]
  ------------------
   73|   801k|                name[i++] = ossl_tolower(*s);
   74|  36.9k|            else
   75|  36.9k|                err = 1;
   76|   838k|        } while (*++s == '_' || ossl_isalnum(*s));
  ------------------
  |  |   70|   804k|#define ossl_isalnum(c) (ossl_ctype_check((c), CTYPE_MASK_alnum))
  |  |  ------------------
  |  |  |  |   41|   804k|#define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|   804k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   27|   804k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|   804k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   29|   804k|#define CTYPE_MASK_digit 0x4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (70:25): [True: 539k, False: 265k]
  |  |  ------------------
  ------------------
  |  Branch (76:18): [True: 34.2k, False: 804k]
  ------------------
   77|   265k|        if (*s != '.')
  ------------------
  |  Branch (77:13): [True: 206k, False: 58.5k]
  ------------------
   78|   206k|            break;
   79|  58.5k|        user_name = 1;
   80|  58.5k|        if (i < sizeof(name) - 1)
  ------------------
  |  Branch (80:13): [True: 55.7k, False: 2.82k]
  ------------------
   81|  55.7k|            name[i++] = *s;
   82|  2.82k|        else
   83|  2.82k|            err = 1;
   84|  58.5k|        s++;
   85|  58.5k|    }
   86|   206k|    name[i] = '\0';
   87|   206k|    if (err) {
  ------------------
  |  Branch (87:9): [True: 574, False: 205k]
  ------------------
   88|    574|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  406|    574|    (ERR_new(),                                                  \
  |  |  407|    574|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    574|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    574|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  118|    574|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   27|    574|#define PROP_R_NAME_TOO_LONG 100
  ------------------
   89|    574|        return 0;
   90|    574|    }
   91|   205k|    *t = skip_space(s);
   92|   205k|    *idx = ossl_property_name(ctx, name, user_name && create);
  ------------------
  |  Branch (92:42): [True: 43.8k, False: 162k]
  |  Branch (92:55): [True: 43.8k, False: 0]
  ------------------
   93|   205k|    return 1;
   94|   206k|}
property_parse.c:match_ch:
   33|   826k|{
   34|   826k|    const char *s = *t;
   35|       |
   36|   826k|    if (*s == m) {
  ------------------
  |  Branch (36:9): [True: 299k, False: 526k]
  ------------------
   37|   299k|        *t = skip_space(s + 1);
   38|   299k|        return 1;
   39|   299k|    }
   40|   526k|    return 0;
   41|   826k|}
property_parse.c:parse_value:
  258|   107k|{
  259|   107k|    const char *s = *t;
  260|   107k|    int r = 0;
  261|       |
  262|   107k|    if (*s == '"' || *s == '\'') {
  ------------------
  |  Branch (262:9): [True: 260, False: 107k]
  |  Branch (262:22): [True: 2.06k, False: 105k]
  ------------------
  263|  2.32k|        s++;
  264|  2.32k|        r = parse_string(ctx, &s, s[-1], res, create);
  265|   105k|    } else if (*s == '+') {
  ------------------
  |  Branch (265:16): [True: 472, False: 105k]
  ------------------
  266|    472|        s++;
  267|    472|        r = parse_number(&s, res);
  268|   105k|    } else if (*s == '-') {
  ------------------
  |  Branch (268:16): [True: 861, False: 104k]
  ------------------
  269|    861|        s++;
  270|    861|        r = parse_number(&s, res);
  271|    861|        res->v.int_val = -res->v.int_val;
  272|   104k|    } else if (*s == '0' && s[1] == 'x') {
  ------------------
  |  Branch (272:16): [True: 55.5k, False: 48.8k]
  |  Branch (272:29): [True: 10.2k, False: 45.2k]
  ------------------
  273|  10.2k|        s += 2;
  274|  10.2k|        r = parse_hex(&s, res);
  275|  94.0k|    } else if (*s == '0' && ossl_isdigit(s[1])) {
  ------------------
  |  Branch (275:16): [True: 45.2k, False: 48.8k]
  |  Branch (275:29): [True: 17.6k, False: 27.5k]
  ------------------
  276|  17.6k|        s++;
  277|  17.6k|        r = parse_oct(&s, res);
  278|  76.3k|    } else if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (278:16): [True: 39.9k, False: 36.4k]
  ------------------
  279|  39.9k|        return parse_number(t, res);
  280|  39.9k|    } else if (ossl_isalpha(*s))
  ------------------
  |  |   71|  36.4k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|  36.4k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  36.4k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  36.4k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:25): [True: 24.3k, False: 12.0k]
  |  |  ------------------
  ------------------
  281|  24.3k|        return parse_unquoted(ctx, t, res, create);
  282|  43.6k|    if (r)
  ------------------
  |  Branch (282:9): [True: 24.5k, False: 19.1k]
  ------------------
  283|  24.5k|        *t = s;
  284|  43.6k|    return r;
  285|   107k|}
property_parse.c:parse_string:
  195|  2.32k|{
  196|  2.32k|    char v[1000];
  197|  2.32k|    const char *s = *t;
  198|  2.32k|    size_t i = 0;
  199|  2.32k|    int err = 0;
  200|       |
  201|   592k|    while (*s != '\0' && *s != delim) {
  ------------------
  |  Branch (201:12): [True: 591k, False: 861]
  |  Branch (201:26): [True: 590k, False: 1.46k]
  ------------------
  202|   590k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (202:13): [True: 561k, False: 28.2k]
  ------------------
  203|   561k|            v[i++] = *s;
  204|  28.2k|        else
  205|  28.2k|            err = 1;
  206|   590k|        s++;
  207|   590k|    }
  208|  2.32k|    if (*s == '\0') {
  ------------------
  |  Branch (208:9): [True: 861, False: 1.46k]
  ------------------
  209|    861|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |  406|    861|    (ERR_new(),                                                  \
  |  |  407|    861|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    861|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    861|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |  118|    861|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |   33|    861|#define PROP_R_NO_MATCHING_STRING_DELIMITER 106
  ------------------
  210|    861|            "HERE-->%c%s", delim, *t);
  211|    861|        return 0;
  212|    861|    }
  213|  1.46k|    v[i] = '\0';
  214|  1.46k|    if (err) {
  ------------------
  |  Branch (214:9): [True: 123, False: 1.34k]
  ------------------
  215|    123|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  406|    123|    (ERR_new(),                                                  \
  |  |  407|    123|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    123|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    123|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  118|    123|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|    123|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  216|  1.34k|    } else {
  217|  1.34k|        res->v.str_val = ossl_property_value(ctx, v, create);
  218|  1.34k|    }
  219|  1.46k|    *t = skip_space(s + 1);
  220|  1.46k|    res->type = OSSL_PROPERTY_TYPE_STRING;
  221|  1.46k|    return !err;
  222|  2.32k|}
property_parse.c:parse_number:
   97|  41.2k|{
   98|  41.2k|    const char *s = *t;
   99|  41.2k|    int64_t v = 0;
  100|       |
  101|  83.3k|    do {
  102|  83.3k|        if (!ossl_isdigit(*s)) {
  ------------------
  |  Branch (102:13): [True: 82, False: 83.3k]
  ------------------
  103|     82|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  406|     82|    (ERR_new(),                                                  \
  |  |  407|     82|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|     82|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|     82|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  118|     82|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   32|     82|#define PROP_R_NOT_A_DECIMAL_DIGIT 105
  ------------------
  104|     82|                "HERE-->%s", *t);
  105|     82|            return 0;
  106|     82|        }
  107|       |        /* overflow check */
  108|  83.3k|        if (v > ((INT64_MAX - (*s - '0')) / 10)) {
  ------------------
  |  Branch (108:13): [True: 1.39k, False: 81.9k]
  ------------------
  109|  1.39k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|  1.39k|    (ERR_new(),                                                  \
  |  |  407|  1.39k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  1.39k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  1.39k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|  1.39k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  1.39k|#define PROP_R_PARSE_FAILED 108
  ------------------
  110|  1.39k|                "Property %s overflows", *t);
  111|  1.39k|            return 0;
  112|  1.39k|        }
  113|  81.9k|        v = v * 10 + (*s++ - '0');
  114|  81.9k|    } while (ossl_isdigit(*s));
  ------------------
  |  Branch (114:14): [True: 42.1k, False: 39.8k]
  ------------------
  115|  39.8k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  79.6k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  39.8k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 37.8k, False: 1.90k]
  |  Branch (115:30): [True: 37.4k, False: 486]
  |  Branch (115:44): [True: 656, False: 36.7k]
  ------------------
  116|    656|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  406|    656|    (ERR_new(),                                                  \
  |  |  407|    656|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    656|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    656|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  118|    656|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   32|    656|#define PROP_R_NOT_A_DECIMAL_DIGIT 105
  ------------------
  117|    656|            "HERE-->%s", *t);
  118|    656|        return 0;
  119|    656|    }
  120|  39.1k|    *t = skip_space(s);
  121|  39.1k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  122|  39.1k|    res->v.int_val = v;
  123|  39.1k|    return 1;
  124|  39.8k|}
property_parse.c:parse_hex:
  127|  10.2k|{
  128|  10.2k|    const char *s = *t;
  129|  10.2k|    int64_t v = 0;
  130|  10.2k|    int sval;
  131|       |
  132|   120k|    do {
  133|   120k|        if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (133:13): [True: 69.0k, False: 51.5k]
  ------------------
  134|  69.0k|            sval = *s - '0';
  135|  69.0k|        } else if (ossl_isxdigit(*s)) {
  ------------------
  |  |   83|  51.5k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|  51.5k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 51.4k, False: 123]
  |  |  ------------------
  ------------------
  136|  51.4k|            sval = ossl_tolower(*s) - 'a' + 10;
  137|  51.4k|        } else {
  138|    123|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  406|    123|    (ERR_new(),                                                  \
  |  |  407|    123|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    123|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    123|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  118|    123|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|    123|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  139|    123|                "%s", *t);
  140|    123|            return 0;
  141|    123|        }
  142|       |
  143|   120k|        if (v > ((INT64_MAX - sval) / 16)) {
  ------------------
  |  Branch (143:13): [True: 2.41k, False: 118k]
  ------------------
  144|  2.41k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|  2.41k|    (ERR_new(),                                                  \
  |  |  407|  2.41k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  2.41k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  2.41k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|  2.41k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.41k|#define PROP_R_PARSE_FAILED 108
  ------------------
  145|  2.41k|                "Property %s overflows", *t);
  146|  2.41k|            return 0;
  147|  2.41k|        }
  148|       |
  149|   118k|        v <<= 4;
  150|   118k|        v += sval;
  151|   118k|    } while (ossl_isxdigit(*++s));
  ------------------
  |  |   83|   118k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|   118k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 110k, False: 7.75k]
  |  |  ------------------
  ------------------
  152|  7.75k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  15.5k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  7.75k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (152:9): [True: 7.29k, False: 465]
  |  Branch (152:30): [True: 6.80k, False: 486]
  |  Branch (152:44): [True: 369, False: 6.43k]
  ------------------
  153|    369|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  406|    369|    (ERR_new(),                                                  \
  |  |  407|    369|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    369|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    369|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  118|    369|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|    369|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  154|    369|            "HERE-->%s", *t);
  155|    369|        return 0;
  156|    369|    }
  157|  7.38k|    *t = skip_space(s);
  158|  7.38k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  159|  7.38k|    res->v.int_val = v;
  160|  7.38k|    return 1;
  161|  7.75k|}
property_parse.c:parse_oct:
  164|  17.6k|{
  165|  17.6k|    const char *s = *t;
  166|  17.6k|    int64_t v = 0;
  167|       |
  168|  98.5k|    do {
  169|  98.5k|        if (*s == '9' || *s == '8' || !ossl_isdigit(*s)) {
  ------------------
  |  Branch (169:13): [True: 123, False: 98.4k]
  |  Branch (169:26): [True: 41, False: 98.3k]
  |  Branch (169:39): [True: 0, False: 98.3k]
  ------------------
  170|    164|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  406|    164|    (ERR_new(),                                                  \
  |  |  407|    164|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    164|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    164|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  118|    164|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|    164|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  171|    164|                "HERE-->%s", *t);
  172|    164|            return 0;
  173|    164|        }
  174|  98.3k|        if (v > ((INT64_MAX - (*s - '0')) / 8)) {
  ------------------
  |  Branch (174:13): [True: 2.13k, False: 96.2k]
  ------------------
  175|  2.13k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|  2.13k|    (ERR_new(),                                                  \
  |  |  407|  2.13k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  2.13k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  2.13k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|  2.13k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.13k|#define PROP_R_PARSE_FAILED 108
  ------------------
  176|  2.13k|                "Property %s overflows", *t);
  177|  2.13k|            return 0;
  178|  2.13k|        }
  179|       |
  180|  96.2k|        v = (v << 3) + (*s - '0');
  181|  96.2k|    } while (ossl_isdigit(*++s) && *s != '9' && *s != '8');
  ------------------
  |  Branch (181:14): [True: 81.0k, False: 15.2k]
  |  Branch (181:36): [True: 80.9k, False: 41]
  |  Branch (181:49): [True: 80.8k, False: 82]
  ------------------
  182|  15.3k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  30.7k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  15.3k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (182:9): [True: 14.8k, False: 547]
  |  Branch (182:30): [True: 14.2k, False: 616]
  |  Branch (182:44): [True: 533, False: 13.6k]
  ------------------
  183|    533|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  406|    533|    (ERR_new(),                                                  \
  |  |  407|    533|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    533|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    533|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  118|    533|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|    533|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  184|    533|            "HERE-->%s", *t);
  185|    533|        return 0;
  186|    533|    }
  187|  14.8k|    *t = skip_space(s);
  188|  14.8k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  189|  14.8k|    res->v.int_val = v;
  190|  14.8k|    return 1;
  191|  15.3k|}
property_parse.c:parse_unquoted:
  226|  24.3k|{
  227|  24.3k|    char v[1000];
  228|  24.3k|    const char *s = *t;
  229|  24.3k|    size_t i = 0;
  230|  24.3k|    int err = 0;
  231|       |
  232|  24.3k|    if (*s == '\0' || *s == ',')
  ------------------
  |  Branch (232:9): [True: 0, False: 24.3k]
  |  Branch (232:23): [True: 0, False: 24.3k]
  ------------------
  233|      0|        return 0;
  234|   615k|    while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   80|  1.23M|#define ossl_isprint(c) (ossl_ctype_check((c), CTYPE_MASK_print))
  |  |  ------------------
  |  |  |  |   35|   615k|#define CTYPE_MASK_print 0x100
  |  |  ------------------
  |  |  |  Branch (80:25): [True: 610k, False: 4.37k]
  |  |  ------------------
  ------------------
                  while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   82|  1.22M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|   610k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (234:32): [True: 609k, False: 1.56k]
  |  Branch (234:53): [True: 590k, False: 18.4k]
  ------------------
  235|   590k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (235:13): [True: 520k, False: 70.3k]
  ------------------
  236|   520k|            v[i++] = ossl_tolower(*s);
  237|  70.3k|        else
  238|  70.3k|            err = 1;
  239|   590k|        s++;
  240|   590k|    }
  241|  24.3k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  48.7k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  24.3k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (241:9): [True: 21.2k, False: 3.11k]
  |  Branch (241:30): [True: 19.0k, False: 2.21k]
  |  Branch (241:44): [True: 615, False: 18.4k]
  ------------------
  242|    615|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |  406|    615|    (ERR_new(),                                                  \
  |  |  407|    615|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    615|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    615|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |  118|    615|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   28|    615|#define PROP_R_NOT_AN_ASCII_CHARACTER 101
  ------------------
  243|    615|            "HERE-->%s", s);
  244|    615|        return 0;
  245|    615|    }
  246|  23.7k|    v[i] = 0;
  247|  23.7k|    if (err)
  ------------------
  |  Branch (247:9): [True: 171, False: 23.6k]
  ------------------
  248|    171|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  406|    171|    (ERR_new(),                                                  \
  |  |  407|    171|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    171|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    171|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  118|    171|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|    171|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  249|  23.6k|    else if ((res->v.str_val = ossl_property_value(ctx, v, create)) == 0)
  ------------------
  |  Branch (249:14): [True: 22.0k, False: 1.57k]
  ------------------
  250|  22.0k|        err = 1;
  251|  23.7k|    *t = skip_space(s);
  252|  23.7k|    res->type = OSSL_PROPERTY_TYPE_STRING;
  253|  23.7k|    return !err;
  254|  24.3k|}
property_parse.c:stack_to_property_list:
  314|  17.1k|{
  315|  17.1k|    const int n = sk_OSSL_PROPERTY_DEFINITION_num(sk);
  316|  17.1k|    OSSL_PROPERTY_LIST *r;
  317|  17.1k|    OSSL_PROPERTY_IDX prev_name_idx = 0;
  318|  17.1k|    int i;
  319|       |
  320|  17.1k|    r = OPENSSL_malloc(sizeof(*r)
  ------------------
  |  |  106|  34.3k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (106:19): [True: 6.17k, False: 11.0k]
  |  |  ------------------
  ------------------
  321|  17.1k|        + (n <= 0 ? 0 : n - 1) * sizeof(r->properties[0]));
  322|  17.1k|    if (r != NULL) {
  ------------------
  |  Branch (322:9): [True: 17.1k, False: 0]
  ------------------
  323|  17.1k|        sk_OSSL_PROPERTY_DEFINITION_sort(sk);
  324|       |
  325|  17.1k|        r->has_optional = 0;
  326|  43.0k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (326:21): [True: 28.2k, False: 14.7k]
  ------------------
  327|  28.2k|            r->properties[i] = *sk_OSSL_PROPERTY_DEFINITION_value(sk, i);
  328|  28.2k|            r->has_optional |= r->properties[i].optional;
  329|       |
  330|       |            /* Check for duplicated names */
  331|  28.2k|            if (i > 0 && r->properties[i].name_idx == prev_name_idx) {
  ------------------
  |  Branch (331:17): [True: 17.2k, False: 11.0k]
  |  Branch (331:26): [True: 2.37k, False: 14.8k]
  ------------------
  332|  2.37k|                OPENSSL_free(r);
  ------------------
  |  |  131|  2.37k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  333|  2.37k|                ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|  2.37k|    (ERR_new(),                                                  \
  |  |  407|  2.37k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  2.37k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  2.37k|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|  2.37k|#define ERR_LIB_PROP 55
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.37k|#define PROP_R_PARSE_FAILED 108
  ------------------
  334|  2.37k|                    "Duplicated name `%s'",
  335|  2.37k|                    ossl_property_name_str(ctx, prev_name_idx));
  336|  2.37k|                return NULL;
  337|  2.37k|            }
  338|  25.8k|            prev_name_idx = r->properties[i].name_idx;
  339|  25.8k|        }
  340|  14.7k|        r->num_properties = n;
  341|  14.7k|    }
  342|  14.7k|    return r;
  343|  17.1k|}
property_parse.c:pd_free:
  301|   205k|{
  302|   205k|    OPENSSL_free(pd);
  ------------------
  |  |  131|   205k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  303|   205k|}
property_parse.c:match:
   46|   102k|{
   47|   102k|    const char *s = *t;
   48|       |
   49|   102k|    if (OPENSSL_strncasecmp(s, m, m_len) == 0) {
  ------------------
  |  Branch (49:9): [True: 5.19k, False: 97.3k]
  ------------------
   50|  5.19k|        *t = skip_space(s + m_len);
   51|  5.19k|        return 1;
   52|  5.19k|    }
   53|  97.3k|    return 0;
   54|   102k|}

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|     34|        sizeof(*list->properties), &property_idx_cmp, 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|  13.5k|{
   63|  13.5k|    return query->has_optional ? 1 : 0;
  ------------------
  |  Branch (63:12): [True: 1.50k, False: 12.0k]
  ------------------
   64|  13.5k|}
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|    785|{
   78|    785|    PROPERTY_STRING_DATA *propdata = vpropdata;
   79|       |
   80|    785|    if (propdata == NULL)
  ------------------
  |  Branch (80:9): [True: 0, False: 785]
  ------------------
   81|      0|        return;
   82|       |
   83|    785|    CRYPTO_THREAD_lock_free(propdata->lock);
   84|    785|    property_table_free(&propdata->prop_names);
   85|    785|    property_table_free(&propdata->prop_values);
   86|    785|#ifndef OPENSSL_SMALL_FOOTPRINT
   87|    785|    sk_OPENSSL_CSTRING_free(propdata->prop_namelist);
  ------------------
  |  |  264|    785|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   88|    785|    sk_OPENSSL_CSTRING_free(propdata->prop_valuelist);
  ------------------
  |  |  264|    785|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   89|    785|    propdata->prop_namelist = propdata->prop_valuelist = NULL;
   90|    785|#endif
   91|    785|    propdata->prop_name_idx = propdata->prop_value_idx = 0;
   92|       |
   93|    785|    OPENSSL_free(propdata);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|    785|}
ossl_property_string_data_new:
   97|    785|{
   98|    785|    PROPERTY_STRING_DATA *propdata = OPENSSL_zalloc(sizeof(*propdata));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|       |
  100|    785|    if (propdata == NULL)
  ------------------
  |  Branch (100:9): [True: 0, False: 785]
  ------------------
  101|      0|        return NULL;
  102|       |
  103|    785|    propdata->lock = CRYPTO_THREAD_lock_new();
  104|    785|    propdata->prop_names = lh_PROPERTY_STRING_new(&property_hash,
  105|    785|        &property_cmp);
  106|    785|    propdata->prop_values = lh_PROPERTY_STRING_new(&property_hash,
  107|    785|        &property_cmp);
  108|    785|#ifndef OPENSSL_SMALL_FOOTPRINT
  109|    785|    propdata->prop_namelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  261|    785|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_null())
  ------------------
  110|    785|    propdata->prop_valuelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  261|    785|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_null())
  ------------------
  111|    785|#endif
  112|    785|    if (propdata->lock == NULL
  ------------------
  |  Branch (112:9): [True: 0, False: 785]
  ------------------
  113|    785|#ifndef OPENSSL_SMALL_FOOTPRINT
  114|    785|        || propdata->prop_namelist == NULL
  ------------------
  |  Branch (114:12): [True: 0, False: 785]
  ------------------
  115|    785|        || propdata->prop_valuelist == NULL
  ------------------
  |  Branch (115:12): [True: 0, False: 785]
  ------------------
  116|    785|#endif
  117|    785|        || propdata->prop_names == NULL
  ------------------
  |  Branch (117:12): [True: 0, False: 785]
  ------------------
  118|    785|        || propdata->prop_values == NULL) {
  ------------------
  |  Branch (118:12): [True: 0, False: 785]
  ------------------
  119|      0|        ossl_property_string_data_free(propdata);
  120|      0|        return NULL;
  121|      0|    }
  122|    785|    return propdata;
  123|    785|}
ossl_property_name:
  255|   210k|{
  256|   210k|    return ossl_property_string(ctx, 1, create, s);
  257|   210k|}
ossl_property_name_str:
  260|  2.37k|{
  261|  2.37k|    return ossl_property_str(1, ctx, idx);
  262|  2.37k|}
ossl_property_value:
  266|  26.5k|{
  267|  26.5k|    return ossl_property_string(ctx, 0, create, s);
  268|  26.5k|}
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.57k|{
   67|  1.57k|    PROP_TABLE *t = *pt;
   68|       |
   69|  1.57k|    if (t != NULL) {
  ------------------
  |  Branch (69:9): [True: 1.57k, False: 0]
  ------------------
   70|  1.57k|        lh_PROPERTY_STRING_doall(t, &property_free);
   71|  1.57k|        lh_PROPERTY_STRING_free(t);
   72|       |        *pt = NULL;
   73|  1.57k|    }
   74|  1.57k|}
property_string.c:property_free:
   61|  8.22k|{
   62|  8.22k|    OPENSSL_free(ps);
  ------------------
  |  |  131|  8.22k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   63|  8.22k|}
property_string.c:property_hash:
   51|   253k|{
   52|   253k|    return OPENSSL_LH_strhash(a->s);
   53|   253k|}
property_string.c:property_cmp:
   56|  45.0k|{
   57|  45.0k|    return strcmp(a->s, b->s);
   58|  45.0k|}
property_string.c:ossl_property_string:
  145|   237k|{
  146|   237k|    PROPERTY_STRING p, *ps, *ps_new;
  147|   237k|    PROP_TABLE *t;
  148|   237k|    OSSL_PROPERTY_IDX *pidx;
  149|   237k|    PROPERTY_STRING_DATA *propdata
  150|   237k|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   99|   237k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  151|       |
  152|   237k|    if (propdata == NULL)
  ------------------
  |  Branch (152:9): [True: 0, False: 237k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|   237k|    t = name ? propdata->prop_names : propdata->prop_values;
  ------------------
  |  Branch (155:9): [True: 210k, False: 26.5k]
  ------------------
  156|   237k|    p.s = s;
  157|   237k|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (157:9): [True: 0, False: 237k]
  ------------------
  158|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  159|      0|        return 0;
  160|      0|    }
  161|   237k|    ps = lh_PROPERTY_STRING_retrieve(t, &p);
  162|   237k|    if (ps == NULL && create) {
  ------------------
  |  Branch (162:9): [True: 192k, False: 45.0k]
  |  Branch (162:23): [True: 8.22k, False: 183k]
  ------------------
  163|  8.22k|        CRYPTO_THREAD_unlock(propdata->lock);
  164|  8.22k|        if (!CRYPTO_THREAD_write_lock(propdata->lock)) {
  ------------------
  |  Branch (164:13): [True: 0, False: 8.22k]
  ------------------
  165|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_WRITE_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|            return 0;
  167|      0|        }
  168|  8.22k|        pidx = name ? &propdata->prop_name_idx : &propdata->prop_value_idx;
  ------------------
  |  Branch (168:16): [True: 5.46k, False: 2.75k]
  ------------------
  169|  8.22k|        ps = lh_PROPERTY_STRING_retrieve(t, &p);
  170|  8.22k|        if (ps == NULL && (ps_new = new_property_string(s, pidx)) != NULL) {
  ------------------
  |  Branch (170:13): [True: 8.22k, False: 0]
  |  Branch (170:27): [True: 8.22k, False: 0]
  ------------------
  171|  8.22k|#ifndef OPENSSL_SMALL_FOOTPRINT
  172|  8.22k|            STACK_OF(OPENSSL_CSTRING) *slist;
  ------------------
  |  |   33|  8.22k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  173|       |
  174|  8.22k|            slist = name ? propdata->prop_namelist : propdata->prop_valuelist;
  ------------------
  |  Branch (174:21): [True: 5.46k, False: 2.75k]
  ------------------
  175|  8.22k|            if (sk_OPENSSL_CSTRING_push(slist, ps_new->s) <= 0) {
  ------------------
  |  |  268|  8.22k|#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.22k]
  ------------------
  176|      0|                property_free(ps_new);
  177|      0|                CRYPTO_THREAD_unlock(propdata->lock);
  178|      0|                return 0;
  179|      0|            }
  180|  8.22k|#endif
  181|  8.22k|            lh_PROPERTY_STRING_insert(t, ps_new);
  182|  8.22k|            if (lh_PROPERTY_STRING_error(t)) {
  ------------------
  |  Branch (182:17): [True: 0, False: 8.22k]
  ------------------
  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);
  ------------------
  |  |  270|      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.22k|            ps = ps_new;
  196|  8.22k|        }
  197|  8.22k|    }
  198|   237k|    CRYPTO_THREAD_unlock(propdata->lock);
  199|   237k|    return ps != NULL ? ps->idx : 0;
  ------------------
  |  Branch (199:12): [True: 53.2k, False: 183k]
  ------------------
  200|   237k|}
property_string.c:new_property_string:
  127|  8.22k|{
  128|  8.22k|    const size_t l = strlen(s);
  129|  8.22k|    PROPERTY_STRING *ps = OPENSSL_malloc(sizeof(*ps) + l);
  ------------------
  |  |  106|  8.22k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  130|       |
  131|  8.22k|    if (ps != NULL) {
  ------------------
  |  Branch (131:9): [True: 8.22k, False: 0]
  ------------------
  132|  8.22k|        memcpy(ps->body, s, l + 1);
  133|  8.22k|        ps->s = ps->body;
  134|  8.22k|        ps->idx = ++*pidx;
  135|  8.22k|        if (ps->idx == 0) {
  ------------------
  |  Branch (135:13): [True: 0, False: 8.22k]
  ------------------
  136|      0|            OPENSSL_free(ps);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|      0|            return NULL;
  138|      0|        }
  139|  8.22k|    }
  140|  8.22k|    return ps;
  141|  8.22k|}
property_string.c:ossl_property_str:
  219|  2.40k|{
  220|  2.40k|    const char *r;
  221|  2.40k|    PROPERTY_STRING_DATA *propdata
  222|  2.40k|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   99|  2.40k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  223|       |
  224|  2.40k|    if (propdata == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 2.40k]
  ------------------
  225|      0|        return NULL;
  226|       |
  227|  2.40k|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 2.40k]
  ------------------
  228|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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.40k|    r = sk_OPENSSL_CSTRING_value(name ? propdata->prop_namelist
  ------------------
  |  |  259|  4.80k|#define sk_OPENSSL_CSTRING_value(sk, idx) ((const char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_CSTRING_sk_type(sk), (idx)))
  |  |  ------------------
  |  |  |  Branch (259:116): [True: 2.37k, False: 26]
  |  |  ------------------
  ------------------
  245|  2.40k|                                      : propdata->prop_valuelist,
  246|  2.40k|        idx - 1);
  247|  2.40k|#endif
  248|  2.40k|    CRYPTO_THREAD_unlock(propdata->lock);
  249|       |
  250|  2.40k|    return r;
  251|  2.40k|}

OSSL_PROVIDER_try_load_ex:
   20|  1.40k|{
   21|  1.40k|    OSSL_PROVIDER *prov = NULL, *actual;
   22|  1.40k|    int isnew = 0;
   23|       |
   24|       |    /* Find it or create it */
   25|  1.40k|    if ((prov = ossl_provider_find(libctx, name, 0)) == NULL) {
  ------------------
  |  Branch (25:9): [True: 1.06k, False: 342]
  ------------------
   26|  1.06k|        if ((prov = ossl_provider_new(libctx, name, NULL, params, 0)) == NULL)
  ------------------
  |  Branch (26:13): [True: 0, False: 1.06k]
  ------------------
   27|      0|            return NULL;
   28|  1.06k|        isnew = 1;
   29|  1.06k|    }
   30|       |
   31|  1.40k|    if (!ossl_provider_activate(prov, 1, 0)) {
  ------------------
  |  Branch (31:9): [True: 144, False: 1.26k]
  ------------------
   32|    144|        ossl_provider_free(prov);
   33|    144|        return NULL;
   34|    144|    }
   35|       |
   36|  1.26k|    actual = prov;
   37|  1.26k|    if (isnew && !ossl_provider_add_to_store(prov, &actual, retain_fallbacks)) {
  ------------------
  |  Branch (37:9): [True: 920, False: 342]
  |  Branch (37:18): [True: 0, False: 920]
  ------------------
   38|      0|        ossl_provider_deactivate(prov, 1);
   39|      0|        ossl_provider_free(prov);
   40|      0|        return NULL;
   41|      0|    }
   42|  1.26k|    if (actual != prov) {
  ------------------
  |  Branch (42:9): [True: 0, False: 1.26k]
  ------------------
   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.26k|    return actual;
   50|  1.26k|}
OSSL_PROVIDER_try_load:
   54|  1.40k|{
   55|       |    return OSSL_PROVIDER_try_load_ex(libctx, name, NULL, retain_fallbacks);
   56|  1.40k|}
OSSL_PROVIDER_unload:
   72|  1.26k|{
   73|  1.26k|    if (!ossl_provider_deactivate(prov, 1))
  ------------------
  |  Branch (73:9): [True: 0, False: 1.26k]
  ------------------
   74|      0|        return 0;
   75|  1.26k|    ossl_provider_free(prov);
   76|  1.26k|    return 1;
   77|  1.26k|}
OSSL_PROVIDER_get0_provider_ctx:
  104|  2.49M|{
  105|  2.49M|    return ossl_provider_ctx(prov);
  106|  2.49M|}
OSSL_PROVIDER_get_capabilities:
  122|  7.38k|{
  123|  7.38k|    return ossl_provider_get_capabilities(prov, capability, cb, arg);
  124|  7.38k|}
OSSL_PROVIDER_do_all:
  156|  5.56k|{
  157|  5.56k|    return ossl_provider_doall_activated(ctx, cb, cbdata);
  158|  5.56k|}

ossl_child_prov_ctx_new:
   38|    785|{
   39|    785|    return OPENSSL_zalloc(sizeof(struct child_prov_globals));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|    785|}
ossl_child_prov_ctx_free:
   43|    785|{
   44|    785|    struct child_prov_globals *gbl = vgbl;
   45|       |
   46|    785|    CRYPTO_THREAD_lock_free(gbl->lock);
   47|    785|    OPENSSL_free(gbl);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|    785|}

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

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

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|}

ossl_rand_cleanup_int:
  163|      1|{
  164|      1|#ifndef OPENSSL_NO_DEPRECATED_3_0
  165|      1|    const RAND_METHOD *meth = default_RAND_meth;
  166|       |
  167|      1|    if (!rand_inited)
  ------------------
  |  Branch (167:9): [True: 0, False: 1]
  ------------------
  168|      0|        return;
  169|       |
  170|      1|    if (meth != NULL && meth->cleanup != NULL)
  ------------------
  |  Branch (170:9): [True: 1, False: 0]
  |  Branch (170:25): [True: 0, False: 1]
  ------------------
  171|      0|        meth->cleanup();
  172|      1|    RAND_set_rand_method(NULL);
  173|      1|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  174|      1|    ossl_rand_pool_cleanup();
  175|      1|#ifndef OPENSSL_NO_ENGINE
  176|      1|    CRYPTO_THREAD_lock_free(rand_engine_lock);
  177|      1|    rand_engine_lock = NULL;
  178|      1|#endif /* !OPENSSL_NO_ENGINE */
  179|      1|#ifndef OPENSSL_NO_DEPRECATED_3_0
  180|      1|    CRYPTO_THREAD_lock_free(rand_meth_lock);
  181|       |    rand_meth_lock = NULL;
  182|      1|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  183|      1|    ossl_release_default_drbg_ctx();
  184|      1|    rand_inited = 0;
  185|      1|}
RAND_set_rand_method:
  265|      1|{
  266|       |    return rand_set_rand_method_internal(meth, NULL);
  267|      1|}
RAND_get_rand_method:
  270|  29.8k|{
  271|  29.8k|    const RAND_METHOD *tmp_meth = NULL;
  272|       |
  273|  29.8k|    if (!RUN_ONCE(&rand_init, do_rand_init))
  ------------------
  |  |  130|  29.8k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 29.8k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (273:9): [True: 0, False: 29.8k]
  ------------------
  274|      0|        return NULL;
  275|       |
  276|  29.8k|    if (rand_meth_lock == NULL)
  ------------------
  |  Branch (276:9): [True: 0, False: 29.8k]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  29.8k|    if (!CRYPTO_THREAD_read_lock(rand_meth_lock))
  ------------------
  |  Branch (279:9): [True: 0, False: 29.8k]
  ------------------
  280|      0|        return NULL;
  281|  29.8k|    tmp_meth = default_RAND_meth;
  282|  29.8k|    CRYPTO_THREAD_unlock(rand_meth_lock);
  283|  29.8k|    if (tmp_meth != NULL)
  ------------------
  |  Branch (283:9): [True: 29.8k, False: 1]
  ------------------
  284|  29.8k|        return tmp_meth;
  285|       |
  286|      1|    if (!CRYPTO_THREAD_write_lock(rand_meth_lock))
  ------------------
  |  Branch (286:9): [True: 0, False: 1]
  ------------------
  287|      0|        return NULL;
  288|      1|    if (default_RAND_meth == NULL) {
  ------------------
  |  Branch (288:9): [True: 1, False: 0]
  ------------------
  289|      1|#ifndef OPENSSL_NO_ENGINE
  290|      1|        ENGINE *e;
  291|       |
  292|       |        /* If we have an engine that can do RAND, use it. */
  293|      1|        if ((e = ENGINE_get_default_RAND()) != NULL
  ------------------
  |  Branch (293:13): [True: 0, False: 1]
  ------------------
  294|      0|            && (tmp_meth = ENGINE_get_RAND(e)) != NULL) {
  ------------------
  |  Branch (294:16): [True: 0, False: 0]
  ------------------
  295|      0|            funct_ref = e;
  296|      0|            default_RAND_meth = tmp_meth;
  297|      1|        } else {
  298|      1|            ENGINE_finish(e);
  299|      1|            default_RAND_meth = &ossl_rand_meth;
  300|      1|        }
  301|       |#else
  302|       |        default_RAND_meth = &ossl_rand_meth;
  303|       |#endif
  304|      1|    }
  305|      1|    tmp_meth = default_RAND_meth;
  306|      1|    CRYPTO_THREAD_unlock(rand_meth_lock);
  307|      1|    return tmp_meth;
  308|      1|}
RAND_status:
  392|  5.97k|{
  393|  5.97k|    EVP_RAND_CTX *rand;
  394|  5.97k|#ifndef OPENSSL_NO_DEPRECATED_3_0
  395|  5.97k|    const RAND_METHOD *meth = RAND_get_rand_method();
  396|       |
  397|  5.97k|    if (meth != NULL && meth != RAND_OpenSSL())
  ------------------
  |  Branch (397:9): [True: 5.97k, False: 0]
  |  Branch (397:25): [True: 0, False: 5.97k]
  ------------------
  398|      0|        return meth->status != NULL ? meth->status() : 0;
  ------------------
  |  Branch (398:16): [True: 0, False: 0]
  ------------------
  399|  5.97k|#endif
  400|       |
  401|  5.97k|    if ((rand = RAND_get0_primary(NULL)) == NULL)
  ------------------
  |  Branch (401:9): [True: 0, False: 5.97k]
  ------------------
  402|      0|        return 0;
  403|  5.97k|    return EVP_RAND_get_state(rand) == EVP_RAND_STATE_READY;
  ------------------
  |  | 1346|  5.97k|#define EVP_RAND_STATE_READY 1
  ------------------
  404|  5.97k|}
RAND_priv_bytes_ex:
  422|  14.0k|{
  423|  14.0k|    RAND_GLOBAL *dgbl;
  424|  14.0k|    EVP_RAND_CTX *rand;
  425|  14.0k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  426|  14.0k|    const RAND_METHOD *meth = RAND_get_rand_method();
  427|       |
  428|  14.0k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (428:9): [True: 14.0k, False: 0]
  |  Branch (428:25): [True: 0, False: 14.0k]
  ------------------
  429|      0|        if (num > INT_MAX) {
  ------------------
  |  Branch (429:13): [True: 0, False: 0]
  ------------------
  430|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  431|      0|            return -1;
  432|      0|        }
  433|      0|        if (meth->bytes != NULL)
  ------------------
  |  Branch (433:13): [True: 0, False: 0]
  ------------------
  434|      0|            return meth->bytes(buf, (int)num);
  435|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_FUNC_NOT_IMPLEMENTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  436|      0|        return -1;
  437|      0|    }
  438|  14.0k|#endif
  439|       |
  440|  14.0k|    dgbl = rand_get_global(ctx);
  441|  14.0k|    if (dgbl == NULL)
  ------------------
  |  Branch (441:9): [True: 0, False: 14.0k]
  ------------------
  442|      0|        return 0;
  443|  14.0k|#ifndef FIPS_MODULE
  444|  14.0k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (444:9): [True: 0, False: 14.0k]
  ------------------
  445|      0|        return ossl_provider_random_bytes(dgbl->random_provider,
  446|      0|            OSSL_PROV_RANDOM_PRIVATE,
  ------------------
  |  |  127|      0|#define OSSL_PROV_RANDOM_PRIVATE 1
  ------------------
  447|      0|            buf, num, strength);
  448|  14.0k|#endif /* !FIPS_MODULE */
  449|  14.0k|    rand = rand_get0_private(ctx, dgbl);
  450|  14.0k|    if (rand != NULL)
  ------------------
  |  Branch (450:9): [True: 14.0k, False: 0]
  ------------------
  451|  14.0k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  452|       |
  453|      0|    return 0;
  454|  14.0k|}
RAND_bytes_ex:
  465|  9.85k|{
  466|  9.85k|    RAND_GLOBAL *dgbl;
  467|  9.85k|    EVP_RAND_CTX *rand;
  468|  9.85k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  469|  9.85k|    const RAND_METHOD *meth = RAND_get_rand_method();
  470|       |
  471|  9.85k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (471:9): [True: 9.85k, False: 0]
  |  Branch (471:25): [True: 0, False: 9.85k]
  ------------------
  472|      0|        if (num > INT_MAX) {
  ------------------
  |  Branch (472:13): [True: 0, False: 0]
  ------------------
  473|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  474|      0|            return -1;
  475|      0|        }
  476|      0|        if (meth->bytes != NULL)
  ------------------
  |  Branch (476:13): [True: 0, False: 0]
  ------------------
  477|      0|            return meth->bytes(buf, (int)num);
  478|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_FUNC_NOT_IMPLEMENTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  479|      0|        return -1;
  480|      0|    }
  481|  9.85k|#endif
  482|       |
  483|  9.85k|    dgbl = rand_get_global(ctx);
  484|  9.85k|    if (dgbl == NULL)
  ------------------
  |  Branch (484:9): [True: 0, False: 9.85k]
  ------------------
  485|      0|        return 0;
  486|  9.85k|#ifndef FIPS_MODULE
  487|  9.85k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (487:9): [True: 0, False: 9.85k]
  ------------------
  488|      0|        return ossl_provider_random_bytes(dgbl->random_provider,
  489|      0|            OSSL_PROV_RANDOM_PUBLIC,
  ------------------
  |  |  126|      0|#define OSSL_PROV_RANDOM_PUBLIC 0
  ------------------
  490|      0|            buf, num, strength);
  491|  9.85k|#endif /* !FIPS_MODULE */
  492|       |
  493|  9.85k|    rand = rand_get0_public(ctx, dgbl);
  494|  9.85k|    if (rand != NULL)
  ------------------
  |  Branch (494:9): [True: 9.85k, False: 0]
  ------------------
  495|  9.85k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  496|       |
  497|      0|    return 0;
  498|  9.85k|}
RAND_bytes:
  501|  3.26k|{
  502|  3.26k|    if (num < 0)
  ------------------
  |  Branch (502:9): [True: 0, False: 3.26k]
  ------------------
  503|      0|        return 0;
  504|  3.26k|    return RAND_bytes_ex(NULL, buf, (size_t)num, 0);
  505|  3.26k|}
ossl_rand_ctx_new:
  512|    785|{
  513|    785|    RAND_GLOBAL *dgbl = OPENSSL_zalloc(sizeof(*dgbl));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  514|       |
  515|    785|    if (dgbl == NULL)
  ------------------
  |  Branch (515:9): [True: 0, False: 785]
  ------------------
  516|      0|        return NULL;
  517|       |
  518|    785|#ifndef FIPS_MODULE
  519|       |    /*
  520|       |     * We need to ensure that base libcrypto thread handling has been
  521|       |     * initialised.
  522|       |     */
  523|    785|    OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL);
  ------------------
  |  |   31|    785|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  524|       |
  525|       |    /* Prepopulate the random provider name */
  526|    785|    dgbl->random_provider_name = OPENSSL_strdup(random_provider_fips_name);
  ------------------
  |  |  135|    785|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  527|    785|    if (dgbl->random_provider_name == NULL)
  ------------------
  |  Branch (527:9): [True: 0, False: 785]
  ------------------
  528|      0|        goto err0;
  529|    785|#endif
  530|       |
  531|    785|    dgbl->lock = CRYPTO_THREAD_lock_new();
  532|    785|    if (dgbl->lock == NULL)
  ------------------
  |  Branch (532:9): [True: 0, False: 785]
  ------------------
  533|      0|        goto err1;
  534|       |
  535|    785|    return dgbl;
  536|       |
  537|      0|err1:
  538|      0|    CRYPTO_THREAD_lock_free(dgbl->lock);
  539|      0|#ifndef FIPS_MODULE
  540|      0|err0:
  541|      0|    OPENSSL_free(dgbl->random_provider_name);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  542|      0|#endif
  543|      0|    OPENSSL_free(dgbl);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  544|       |    return NULL;
  545|      0|}
ossl_rand_ctx_free:
  548|    785|{
  549|    785|    RAND_GLOBAL *dgbl = vdgbl;
  550|       |
  551|    785|    if (dgbl == NULL)
  ------------------
  |  Branch (551:9): [True: 0, False: 785]
  ------------------
  552|      0|        return;
  553|       |
  554|    785|    CRYPTO_THREAD_lock_free(dgbl->lock);
  555|    785|    EVP_RAND_CTX_free(dgbl->primary);
  556|    785|    EVP_RAND_CTX_free(dgbl->seed);
  557|    785|#ifndef FIPS_MODULE
  558|    785|    OPENSSL_free(dgbl->random_provider_name);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  559|    785|#endif /* !FIPS_MODULE */
  560|    785|    OPENSSL_free(dgbl->rng_name);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  561|    785|    OPENSSL_free(dgbl->rng_cipher);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  562|    785|    OPENSSL_free(dgbl->rng_digest);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  563|    785|    OPENSSL_free(dgbl->rng_propq);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  564|    785|    OPENSSL_free(dgbl->seed_name);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  565|    785|    OPENSSL_free(dgbl->seed_propq);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  566|       |
  567|    785|    OPENSSL_free(dgbl);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  568|    785|}
RAND_get0_primary:
  814|  5.97k|{
  815|  5.97k|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  816|       |
  817|  5.97k|    return dgbl == NULL ? NULL : rand_get0_primary(ctx, dgbl);
  ------------------
  |  Branch (817:12): [True: 0, False: 5.97k]
  ------------------
  818|  5.97k|}
rand_lib.c:do_rand_init:
  131|      1|{
  132|      1|#ifndef OPENSSL_NO_ENGINE
  133|      1|    rand_engine_lock = CRYPTO_THREAD_lock_new();
  134|      1|    if (rand_engine_lock == NULL)
  ------------------
  |  Branch (134:9): [True: 0, False: 1]
  ------------------
  135|      0|        return 0;
  136|      1|#endif /* !OPENSSL_NO_ENGINE */
  137|       |
  138|      1|#ifndef OPENSSL_NO_DEPRECATED_3_0
  139|      1|    rand_meth_lock = CRYPTO_THREAD_lock_new();
  140|      1|    if (rand_meth_lock == NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 1]
  ------------------
  141|      0|        goto err;
  142|      1|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  143|       |
  144|      1|    if (!ossl_rand_pool_init())
  ------------------
  |  Branch (144:9): [True: 0, False: 1]
  ------------------
  145|      0|        goto err;
  146|       |
  147|      1|    rand_inited = 1;
  148|      1|    return 1;
  149|       |
  150|      0|err:
  151|      0|#ifndef OPENSSL_NO_DEPRECATED_3_0
  152|      0|    CRYPTO_THREAD_lock_free(rand_meth_lock);
  153|      0|    rand_meth_lock = NULL;
  154|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  155|      0|#ifndef OPENSSL_NO_ENGINE
  156|      0|    CRYPTO_THREAD_lock_free(rand_engine_lock);
  157|       |    rand_engine_lock = NULL;
  158|      0|#endif /* !OPENSSL_NO_ENGINE */
  159|      0|    return 0;
  160|      1|}
rand_lib.c:rand_set_rand_method_internal:
  249|      1|{
  250|      1|    if (!RUN_ONCE(&rand_init, do_rand_init))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (250:9): [True: 0, False: 1]
  ------------------
  251|      0|        return 0;
  252|       |
  253|      1|    if (!CRYPTO_THREAD_write_lock(rand_meth_lock))
  ------------------
  |  Branch (253:9): [True: 0, False: 1]
  ------------------
  254|      0|        return 0;
  255|      1|#ifndef OPENSSL_NO_ENGINE
  256|      1|    ENGINE_finish(funct_ref);
  257|      1|    funct_ref = e;
  258|      1|#endif
  259|      1|    default_RAND_meth = meth;
  260|      1|    CRYPTO_THREAD_unlock(rand_meth_lock);
  261|      1|    return 1;
  262|      1|}
rand_lib.c:rand_get_global:
   83|  32.6k|{
   84|  32.6k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DRBG_INDEX);
  ------------------
  |  |  101|  32.6k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
   85|  32.6k|}
rand_lib.c:rand_get0_primary:
  742|  7.07k|{
  743|  7.07k|    EVP_RAND_CTX *ret, *seed, *newseed = NULL, *primary;
  744|       |
  745|  7.07k|    if (dgbl == NULL)
  ------------------
  |  Branch (745:9): [True: 0, False: 7.07k]
  ------------------
  746|      0|        return NULL;
  747|       |
  748|  7.07k|    if (!CRYPTO_THREAD_read_lock(dgbl->lock))
  ------------------
  |  Branch (748:9): [True: 0, False: 7.07k]
  ------------------
  749|      0|        return NULL;
  750|       |
  751|  7.07k|    ret = dgbl->primary;
  752|  7.07k|    seed = dgbl->seed;
  753|  7.07k|    CRYPTO_THREAD_unlock(dgbl->lock);
  754|       |
  755|  7.07k|    if (ret != NULL)
  ------------------
  |  Branch (755:9): [True: 6.52k, False: 551]
  ------------------
  756|  6.52k|        return ret;
  757|       |
  758|    551|#if !defined(FIPS_MODULE) || !defined(OPENSSL_NO_FIPS_JITTER)
  759|       |    /* Create a seed source for libcrypto or jitter enabled FIPS provider */
  760|    551|    if (seed == NULL) {
  ------------------
  |  Branch (760:9): [True: 551, False: 0]
  ------------------
  761|    551|        ERR_set_mark();
  762|    551|        seed = newseed = rand_new_seed(ctx);
  763|    551|        ERR_pop_to_mark();
  764|    551|    }
  765|    551|#endif /* !FIPS_MODULE || !OPENSSL_NO_FIPS_JITTER */
  766|       |
  767|       |#if defined(FIPS_MODULE)
  768|       |    /* The FIPS provider has entropy health tests instead of the primary */
  769|       |    ret = rand_new_crngt(ctx, seed);
  770|       |#else /* FIPS_MODULE */
  771|    551|    ret = rand_new_drbg(ctx, seed, PRIMARY_RESEED_INTERVAL,
  ------------------
  |  |   23|    551|#define PRIMARY_RESEED_INTERVAL (1 << 8)
  ------------------
  772|    551|        PRIMARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   25|    551|#define PRIMARY_RESEED_TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  773|    551|#endif /* FIPS_MODULE */
  774|       |
  775|       |    /*
  776|       |     * The primary DRBG may be shared between multiple threads so we must
  777|       |     * enable locking.
  778|       |     */
  779|    551|    if (ret == NULL || !EVP_RAND_enable_locking(ret)) {
  ------------------
  |  Branch (779:9): [True: 0, False: 551]
  |  Branch (779:24): [True: 0, False: 551]
  ------------------
  780|      0|        if (ret != NULL) {
  ------------------
  |  Branch (780:13): [True: 0, False: 0]
  ------------------
  781|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UNABLE_TO_ENABLE_LOCKING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  782|      0|            EVP_RAND_CTX_free(ret);
  783|      0|        }
  784|      0|        if (newseed == NULL)
  ------------------
  |  Branch (784:13): [True: 0, False: 0]
  ------------------
  785|      0|            return NULL;
  786|       |        /* else carry on and store seed */
  787|      0|        ret = NULL;
  788|      0|    }
  789|       |
  790|    551|    if (!CRYPTO_THREAD_write_lock(dgbl->lock))
  ------------------
  |  Branch (790:9): [True: 0, False: 551]
  ------------------
  791|      0|        return NULL;
  792|       |
  793|    551|    primary = dgbl->primary;
  794|    551|    if (primary != NULL) {
  ------------------
  |  Branch (794:9): [True: 0, False: 551]
  ------------------
  795|      0|        CRYPTO_THREAD_unlock(dgbl->lock);
  796|      0|        EVP_RAND_CTX_free(ret);
  797|      0|        EVP_RAND_CTX_free(newseed);
  798|      0|        return primary;
  799|      0|    }
  800|    551|    if (newseed != NULL)
  ------------------
  |  Branch (800:9): [True: 551, False: 0]
  ------------------
  801|    551|        dgbl->seed = newseed;
  802|    551|    dgbl->primary = ret;
  803|    551|    CRYPTO_THREAD_unlock(dgbl->lock);
  804|       |
  805|    551|    return ret;
  806|    551|}
rand_lib.c:rand_new_seed:
  590|    551|{
  591|    551|    EVP_RAND *rand;
  592|    551|    const char *propq;
  593|    551|    char *name;
  594|    551|    EVP_RAND_CTX *ctx = NULL;
  595|    551|#ifdef OPENSSL_NO_FIPS_JITTER
  596|    551|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  597|       |
  598|    551|    if (dgbl == NULL)
  ------------------
  |  Branch (598:9): [True: 0, False: 551]
  ------------------
  599|      0|        return NULL;
  600|    551|    propq = dgbl->seed_propq;
  601|    551|    name = dgbl->seed_name != NULL ? dgbl->seed_name
  ------------------
  |  Branch (601:12): [True: 0, False: 551]
  ------------------
  602|    551|                                   : OPENSSL_MSTR(OPENSSL_DEFAULT_SEED_SRC);
  ------------------
  |  |   19|    551|#define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
  |  |  ------------------
  |  |  |  |   18|  1.10k|#define OPENSSL_MSTR_HELPER(x) #x
  |  |  ------------------
  ------------------
  603|       |#else /* !OPENSSL_NO_FIPS_JITTER */
  604|       |    name = "JITTER";
  605|       |    propq = "";
  606|       |#endif /* OPENSSL_NO_FIPS_JITTER */
  607|       |
  608|    551|    rand = EVP_RAND_fetch(libctx, name, propq);
  609|    551|    if (rand == NULL) {
  ------------------
  |  Branch (609:9): [True: 0, False: 551]
  ------------------
  610|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_FETCH_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  611|      0|        goto err;
  612|      0|    }
  613|    551|    ctx = EVP_RAND_CTX_new(rand, NULL);
  614|    551|    EVP_RAND_free(rand);
  615|    551|    if (ctx == NULL) {
  ------------------
  |  Branch (615:9): [True: 0, False: 551]
  ------------------
  616|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_CREATE_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  617|      0|        goto err;
  618|      0|    }
  619|    551|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) {
  ------------------
  |  Branch (619:9): [True: 0, False: 551]
  ------------------
  620|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  621|      0|        goto err;
  622|      0|    }
  623|    551|    return ctx;
  624|      0|err:
  625|      0|    EVP_RAND_CTX_free(ctx);
  626|       |    return NULL;
  627|    551|}
rand_lib.c:rand_new_drbg:
  650|  1.65k|{
  651|  1.65k|    EVP_RAND *rand;
  652|  1.65k|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  653|  1.65k|    EVP_RAND_CTX *ctx;
  654|  1.65k|    OSSL_PARAM params[9], *p = params;
  655|  1.65k|    const OSSL_PARAM *settables;
  656|  1.65k|    const char *prov_name;
  657|  1.65k|    char *name, *cipher;
  658|  1.65k|    int use_df = 1;
  659|       |
  660|  1.65k|    if (dgbl == NULL)
  ------------------
  |  Branch (660:9): [True: 0, False: 1.65k]
  ------------------
  661|      0|        return NULL;
  662|  1.65k|    name = dgbl->rng_name != NULL ? dgbl->rng_name : "CTR-DRBG";
  ------------------
  |  Branch (662:12): [True: 0, False: 1.65k]
  ------------------
  663|  1.65k|    rand = EVP_RAND_fetch(libctx, name, dgbl->rng_propq);
  664|  1.65k|    if (rand == NULL) {
  ------------------
  |  Branch (664:9): [True: 0, False: 1.65k]
  ------------------
  665|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_FETCH_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  666|      0|        return NULL;
  667|      0|    }
  668|  1.65k|    prov_name = ossl_provider_name(EVP_RAND_get0_provider(rand));
  669|  1.65k|    ctx = EVP_RAND_CTX_new(rand, parent);
  670|  1.65k|    EVP_RAND_free(rand);
  671|  1.65k|    if (ctx == NULL) {
  ------------------
  |  Branch (671:9): [True: 0, False: 1.65k]
  ------------------
  672|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_CREATE_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  673|      0|        return NULL;
  674|      0|    }
  675|       |
  676|  1.65k|    settables = EVP_RAND_CTX_settable_params(ctx);
  677|  1.65k|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_CIPHER)) {
  ------------------
  |  |  233|  1.65k|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  127|  1.65k|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  |  Branch (677:9): [True: 1.65k, False: 0]
  ------------------
  678|  1.65k|        cipher = dgbl->rng_cipher != NULL ? dgbl->rng_cipher : "AES-256-CTR";
  ------------------
  |  Branch (678:18): [True: 0, False: 1.65k]
  ------------------
  679|  1.65k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_CIPHER,
  ------------------
  |  |  233|  1.65k|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  127|  1.65k|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  680|  1.65k|            cipher, 0);
  681|  1.65k|    }
  682|  1.65k|    if (dgbl->rng_digest != NULL
  ------------------
  |  Branch (682:9): [True: 0, False: 1.65k]
  ------------------
  683|      0|        && OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_DIGEST))
  ------------------
  |  |  234|      0|# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  128|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  |  Branch (683:12): [True: 0, False: 0]
  ------------------
  684|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_DIGEST,
  ------------------
  |  |  234|      0|# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  128|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  685|      0|            dgbl->rng_digest, 0);
  686|  1.65k|    if (prov_name != NULL)
  ------------------
  |  Branch (686:9): [True: 1.65k, False: 0]
  ------------------
  687|  1.65k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_PROV_PARAM_CORE_PROV_NAME,
  ------------------
  |  |  502|  1.65k|# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
  ------------------
  688|  1.65k|            (char *)prov_name, 0);
  689|  1.65k|    if (dgbl->rng_propq != NULL)
  ------------------
  |  Branch (689:9): [True: 0, False: 1.65k]
  ------------------
  690|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_PROPERTIES,
  ------------------
  |  |  248|      0|# define OSSL_DRBG_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  132|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  ------------------
  ------------------
  691|      0|            dgbl->rng_propq, 0);
  692|  1.65k|    if (OSSL_PARAM_locate_const(settables, OSSL_ALG_PARAM_MAC))
  ------------------
  |  |  131|  1.65k|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  |  Branch (692:9): [True: 0, False: 1.65k]
  ------------------
  693|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_ALG_PARAM_MAC, "HMAC", 0);
  ------------------
  |  |  131|      0|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  694|  1.65k|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_USE_DF))
  ------------------
  |  |  255|  1.65k|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  |  Branch (694:9): [True: 1.65k, False: 0]
  ------------------
  695|  1.65k|        *p++ = OSSL_PARAM_construct_int(OSSL_DRBG_PARAM_USE_DF, &use_df);
  ------------------
  |  |  255|  1.65k|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  696|  1.65k|    *p++ = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_REQUESTS,
  ------------------
  |  |  251|  1.65k|# define OSSL_DRBG_PARAM_RESEED_REQUESTS "reseed_requests"
  ------------------
  697|  1.65k|        &reseed_interval);
  698|  1.65k|    *p++ = OSSL_PARAM_construct_time_t(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL,
  ------------------
  |  |  253|  1.65k|# define OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL "reseed_time_interval"
  ------------------
  699|  1.65k|        &reseed_time_interval);
  700|  1.65k|    *p = OSSL_PARAM_construct_end();
  701|  1.65k|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, params)) {
  ------------------
  |  Branch (701:9): [True: 0, False: 1.65k]
  ------------------
  702|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  703|      0|        EVP_RAND_CTX_free(ctx);
  704|      0|        return NULL;
  705|      0|    }
  706|  1.65k|    return ctx;
  707|  1.65k|}
rand_lib.c:rand_get0_public:
  821|  9.85k|{
  822|  9.85k|    EVP_RAND_CTX *rand, *primary;
  823|  9.85k|    OSSL_LIB_CTX *origctx = ctx;
  824|       |
  825|  9.85k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  826|       |
  827|  9.85k|    if (ctx == NULL)
  ------------------
  |  Branch (827:9): [True: 0, False: 9.85k]
  ------------------
  828|      0|        return NULL;
  829|       |
  830|  9.85k|    if (dgbl == NULL)
  ------------------
  |  Branch (830:9): [True: 0, False: 9.85k]
  ------------------
  831|      0|        return NULL;
  832|       |
  833|  9.85k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx);
  834|  9.85k|    if (rand == NULL) {
  ------------------
  |  Branch (834:9): [True: 551, False: 9.30k]
  ------------------
  835|    551|        primary = rand_get0_primary(origctx, dgbl);
  836|    551|        if (primary == NULL)
  ------------------
  |  Branch (836:13): [True: 0, False: 551]
  ------------------
  837|      0|            return NULL;
  838|       |
  839|       |        /*
  840|       |         * If the private is also NULL then this is the first time we've
  841|       |         * used this thread.
  842|       |         */
  843|    551|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx) == NULL
  ------------------
  |  Branch (843:13): [True: 551, False: 0]
  ------------------
  844|    551|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (844:16): [True: 0, False: 551]
  ------------------
  845|      0|            return NULL;
  846|    551|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|    551|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  847|    551|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|    551|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  848|    551|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx, rand)) {
  ------------------
  |  Branch (848:13): [True: 0, False: 551]
  ------------------
  849|      0|            EVP_RAND_CTX_free(rand);
  850|      0|            rand = NULL;
  851|      0|        }
  852|    551|    }
  853|  9.85k|    return rand;
  854|  9.85k|}
rand_lib.c:rand_delete_thread_state:
  571|    551|{
  572|    551|    OSSL_LIB_CTX *ctx = arg;
  573|    551|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  574|    551|    EVP_RAND_CTX *rand;
  575|       |
  576|    551|    if (dgbl == NULL)
  ------------------
  |  Branch (576:9): [True: 0, False: 551]
  ------------------
  577|      0|        return;
  578|       |
  579|    551|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx);
  580|    551|    CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx, NULL);
  581|    551|    EVP_RAND_CTX_free(rand);
  582|       |
  583|    551|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx);
  584|       |    CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx, NULL);
  585|    551|    EVP_RAND_CTX_free(rand);
  586|    551|}
rand_lib.c:rand_get0_private:
  868|  14.0k|{
  869|  14.0k|    EVP_RAND_CTX *rand, *primary;
  870|  14.0k|    OSSL_LIB_CTX *origctx = ctx;
  871|       |
  872|  14.0k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  873|  14.0k|    if (ctx == NULL)
  ------------------
  |  Branch (873:9): [True: 0, False: 14.0k]
  ------------------
  874|      0|        return NULL;
  875|       |
  876|  14.0k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx);
  877|  14.0k|    if (rand == NULL) {
  ------------------
  |  Branch (877:9): [True: 551, False: 13.5k]
  ------------------
  878|    551|        primary = rand_get0_primary(origctx, dgbl);
  879|    551|        if (primary == NULL)
  ------------------
  |  Branch (879:13): [True: 0, False: 551]
  ------------------
  880|      0|            return NULL;
  881|       |
  882|       |        /*
  883|       |         * If the public is also NULL then this is the first time we've
  884|       |         * used this thread.
  885|       |         */
  886|    551|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx) == NULL
  ------------------
  |  Branch (886:13): [True: 0, False: 551]
  ------------------
  887|      0|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (887:16): [True: 0, False: 0]
  ------------------
  888|      0|            return NULL;
  889|    551|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|    551|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  890|    551|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|    551|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  891|    551|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx, rand)) {
  ------------------
  |  Branch (891:13): [True: 0, False: 551]
  ------------------
  892|      0|            EVP_RAND_CTX_free(rand);
  893|      0|            rand = NULL;
  894|      0|        }
  895|    551|    }
  896|  14.0k|    return rand;
  897|  14.0k|}

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

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

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

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

ossl_rsa_todata:
  262|   316k|{
  263|   316k|    int ret = 0;
  264|   316k|    const BIGNUM *rsa_d = NULL, *rsa_n = NULL, *rsa_e = NULL;
  265|   316k|    STACK_OF(BIGNUM_const) *factors = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   316k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  266|   316k|    STACK_OF(BIGNUM_const) *exps = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   316k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  267|   316k|    STACK_OF(BIGNUM_const) *coeffs = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   316k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  268|       |
  269|   316k|    if (rsa == NULL || factors == NULL || exps == NULL || coeffs == NULL)
  ------------------
  |  Branch (269:9): [True: 0, False: 316k]
  |  Branch (269:24): [True: 0, False: 316k]
  |  Branch (269:43): [True: 0, False: 316k]
  |  Branch (269:59): [True: 0, False: 316k]
  ------------------
  270|      0|        goto err;
  271|       |
  272|   316k|    RSA_get0_key(rsa, &rsa_n, &rsa_e, &rsa_d);
  273|   316k|    ossl_rsa_get0_all_params(rsa, factors, exps, coeffs);
  274|       |
  275|   316k|    if (!ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_RSA_N, rsa_n)
  ------------------
  |  |  482|   316k|# define OSSL_PKEY_PARAM_RSA_N "n"
  ------------------
  |  Branch (275:9): [True: 0, False: 316k]
  ------------------
  276|   316k|        || !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_RSA_E, rsa_e))
  ------------------
  |  |  457|   316k|# define OSSL_PKEY_PARAM_RSA_E "e"
  ------------------
  |  Branch (276:12): [True: 0, False: 316k]
  ------------------
  277|      0|        goto err;
  278|       |
  279|       |    /* Check private key data integrity */
  280|   316k|    if (include_private && rsa_d != NULL) {
  ------------------
  |  Branch (280:9): [True: 316k, False: 0]
  |  Branch (280:28): [True: 0, False: 316k]
  ------------------
  281|       |
  282|      0|        if (!ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_RSA_D,
  ------------------
  |  |  453|      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|   316k|    ret = 1;
  301|   316k|err:
  302|   316k|    sk_BIGNUM_const_free(factors);
  303|   316k|    sk_BIGNUM_const_free(exps);
  304|   316k|    sk_BIGNUM_const_free(coeffs);
  305|   316k|    return ret;
  306|   316k|}
ossl_rsa_is_foreign:
  452|   316k|{
  453|   316k|#ifndef FIPS_MODULE
  454|   316k|    if (rsa->engine != NULL || RSA_get_method(rsa) != RSA_PKCS1_OpenSSL())
  ------------------
  |  Branch (454:9): [True: 0, False: 316k]
  |  Branch (454:32): [True: 0, False: 316k]
  ------------------
  455|      0|        return 1;
  456|   316k|#endif
  457|   316k|    return 0;
  458|   316k|}
ossl_rsa_param_decode:
  653|   316k|{
  654|   316k|    RSA_PSS_PARAMS *pss;
  655|   316k|    const ASN1_OBJECT *algoid;
  656|   316k|    const void *algp;
  657|   316k|    int algptype;
  658|       |
  659|   316k|    X509_ALGOR_get0(&algoid, &algptype, &algp, alg);
  660|   316k|    if (OBJ_obj2nid(algoid) != EVP_PKEY_RSA_PSS)
  ------------------
  |  |   65|   316k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|   316k|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (660:9): [True: 316k, False: 0]
  ------------------
  661|   316k|        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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|   316k|{
   25|   316k|    return BN_num_bits(r->n);
   26|   316k|}
RSA_size:
   29|   316k|{
   30|   316k|    return BN_num_bytes(r->n);
  ------------------
  |  |  188|   316k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
   31|   316k|}

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

RSA_new:
   36|   316k|{
   37|   316k|    return rsa_new_intern(NULL, NULL);
   38|   316k|}
RSA_get_method:
   41|   316k|{
   42|   316k|    return rsa->meth;
   43|   316k|}
RSA_free:
  142|   949k|{
  143|   949k|    int i;
  144|       |
  145|   949k|    if (r == NULL)
  ------------------
  |  Branch (145:9): [True: 316k, False: 633k]
  ------------------
  146|   316k|        return;
  147|       |
  148|   633k|    CRYPTO_DOWN_REF(&r->references, &i);
  149|   633k|    REF_PRINT_COUNT("RSA", i, r);
  ------------------
  |  |  301|   633k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   633k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   633k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   633k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  150|   633k|    if (i > 0)
  ------------------
  |  Branch (150:9): [True: 316k, False: 316k]
  ------------------
  151|   316k|        return;
  152|   316k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   316k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 316k]
  |  |  ------------------
  ------------------
  153|       |
  154|   316k|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (154:9): [True: 316k, False: 0]
  |  Branch (154:28): [True: 316k, False: 0]
  ------------------
  155|   316k|        r->meth->finish(r);
  156|   316k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  157|   316k|    ENGINE_finish(r->engine);
  158|   316k|#endif
  159|       |
  160|   316k|#ifndef FIPS_MODULE
  161|   316k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, r, &r->ex_data);
  ------------------
  |  |  259|   316k|#define CRYPTO_EX_INDEX_RSA 9
  ------------------
  162|   316k|#endif
  163|       |
  164|   316k|    CRYPTO_THREAD_lock_free(r->lock);
  165|   316k|    CRYPTO_FREE_REF(&r->references);
  166|       |
  167|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
  168|       |    BN_clear_free(r->n);
  169|       |    BN_clear_free(r->e);
  170|       |#else
  171|   316k|    BN_free(r->n);
  172|   316k|    BN_free(r->e);
  173|   316k|#endif
  174|   316k|    BN_clear_free(r->d);
  175|   316k|    BN_clear_free(r->p);
  176|   316k|    BN_clear_free(r->q);
  177|   316k|    BN_clear_free(r->dmp1);
  178|   316k|    BN_clear_free(r->dmq1);
  179|   316k|    BN_clear_free(r->iqmp);
  180|       |
  181|       |#if defined(FIPS_MODULE) && !defined(OPENSSL_NO_ACVP_TESTS)
  182|       |    ossl_rsa_acvp_test_free(r->acvp_test);
  183|       |#endif
  184|       |
  185|   316k|#ifndef FIPS_MODULE
  186|   316k|    RSA_PSS_PARAMS_free(r->pss);
  187|   316k|    sk_RSA_PRIME_INFO_pop_free(r->prime_infos, ossl_rsa_multip_info_free);
  188|   316k|#endif
  189|   316k|    ossl_rsa_free_blinding(r);
  190|   316k|    OPENSSL_free(r);
  ------------------
  |  |  131|   316k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  191|   316k|}
RSA_up_ref:
  194|   316k|{
  195|   316k|    int i;
  196|       |
  197|   316k|    if (CRYPTO_UP_REF(&r->references, &i) <= 0)
  ------------------
  |  Branch (197:9): [True: 0, False: 316k]
  ------------------
  198|      0|        return 0;
  199|       |
  200|   316k|    REF_PRINT_COUNT("RSA", i, r);
  ------------------
  |  |  301|   316k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   316k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   316k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   316k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|   316k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   316k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 316k]
  |  |  ------------------
  ------------------
  202|   316k|    return i > 1 ? 1 : 0;
  ------------------
  |  Branch (202:12): [True: 316k, False: 0]
  ------------------
  203|   316k|}
ossl_rsa_set0_libctx:
  211|   316k|{
  212|   316k|    r->libctx = libctx;
  213|   316k|}
ossl_ifc_ffc_compute_security_bits:
  327|   316k|{
  328|   316k|    uint64_t x;
  329|   316k|    uint32_t lx;
  330|   316k|    uint16_t y, cap;
  331|       |
  332|       |    /*
  333|       |     * Look for common values as listed in standards.
  334|       |     * These values are not exactly equal to the results from the formulae in
  335|       |     * the standards but are defined to be canonical.
  336|       |     */
  337|   316k|    switch (n) {
  ------------------
  |  Branch (337:13): [True: 316k, False: 0]
  ------------------
  338|   128k|    case 2048: /* SP 800-56B rev 2 Appendix D and FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (338:5): [True: 128k, False: 188k]
  ------------------
  339|   128k|        return 112;
  340|      8|    case 3072: /* SP 800-56B rev 2 Appendix D and FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (340:5): [True: 8, False: 316k]
  ------------------
  341|      8|        return 128;
  342|   188k|    case 4096: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (342:5): [True: 188k, False: 128k]
  ------------------
  343|   188k|        return 152;
  344|     10|    case 6144: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (344:5): [True: 10, False: 316k]
  ------------------
  345|     10|        return 176;
  346|      0|    case 7680: /* FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (346:5): [True: 0, False: 316k]
  ------------------
  347|      0|        return 192;
  348|     22|    case 8192: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (348:5): [True: 22, False: 316k]
  ------------------
  349|     22|        return 200;
  350|      0|    case 15360: /* FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (350:5): [True: 0, False: 316k]
  ------------------
  351|      0|        return 256;
  352|   316k|    }
  353|       |
  354|       |    /*
  355|       |     * The first incorrect result (i.e. not accurate or off by one low) occurs
  356|       |     * for n = 699668.  The true value here is 1200.  Instead of using this n
  357|       |     * as the check threshold, the smallest n such that the correct result is
  358|       |     * 1200 is used instead.
  359|       |     */
  360|      0|    if (n >= 687737)
  ------------------
  |  Branch (360:9): [True: 0, False: 0]
  ------------------
  361|      0|        return 1200;
  362|      0|    if (n < 8)
  ------------------
  |  Branch (362:9): [True: 0, False: 0]
  ------------------
  363|      0|        return 0;
  364|       |
  365|       |    /*
  366|       |     * To ensure that the output is non-decreasing with respect to n,
  367|       |     * a cap needs to be applied to the two values where the function over
  368|       |     * estimates the strength (according to the above fast path).
  369|       |     */
  370|      0|    if (n <= 7680)
  ------------------
  |  Branch (370:9): [True: 0, False: 0]
  ------------------
  371|      0|        cap = 192;
  372|      0|    else if (n <= 15360)
  ------------------
  |  Branch (372:14): [True: 0, False: 0]
  ------------------
  373|      0|        cap = 256;
  374|      0|    else
  375|      0|        cap = 1200;
  376|       |
  377|      0|    x = n * (uint64_t)log_2;
  378|      0|    lx = ilog_e(x);
  379|      0|    y = (uint16_t)((mul2(c1_923, icbrt64(mul2(mul2(x, lx), lx))) - c4_690)
  380|      0|        / log_2);
  381|      0|    y = (y + 4) & ~7;
  382|      0|    if (y > cap)
  ------------------
  |  Branch (382:9): [True: 0, False: 0]
  ------------------
  383|      0|        y = cap;
  384|      0|    return y;
  385|      0|}
RSA_security_bits:
  388|   316k|{
  389|   316k|    int bits = BN_num_bits(rsa->n);
  390|       |
  391|   316k|#ifndef FIPS_MODULE
  392|   316k|    if (rsa->version == RSA_ASN1_VERSION_MULTI) {
  ------------------
  |  |   60|   316k|#define RSA_ASN1_VERSION_MULTI 1
  ------------------
  |  Branch (392:9): [True: 0, False: 316k]
  ------------------
  393|       |        /* This ought to mean that we have private key at hand. */
  394|      0|        int ex_primes = sk_RSA_PRIME_INFO_num(rsa->prime_infos);
  395|       |
  396|      0|        if (ex_primes <= 0 || (ex_primes + 2) > ossl_rsa_multip_cap(bits))
  ------------------
  |  Branch (396:13): [True: 0, False: 0]
  |  Branch (396:31): [True: 0, False: 0]
  ------------------
  397|      0|            return 0;
  398|      0|    }
  399|   316k|#endif
  400|   316k|    return ossl_ifc_ffc_compute_security_bits(bits);
  401|   316k|}
RSA_get0_key:
  558|   316k|{
  559|   316k|    if (n != NULL)
  ------------------
  |  Branch (559:9): [True: 316k, False: 0]
  ------------------
  560|   316k|        *n = r->n;
  561|   316k|    if (e != NULL)
  ------------------
  |  Branch (561:9): [True: 316k, False: 0]
  ------------------
  562|   316k|        *e = r->e;
  563|   316k|    if (d != NULL)
  ------------------
  |  Branch (563:9): [True: 316k, False: 0]
  ------------------
  564|   316k|        *d = r->d;
  565|   316k|}
RSA_get0_n:
  648|   949k|{
  649|   949k|    return r->n;
  650|   949k|}
RSA_get0_d:
  658|   316k|{
  659|   316k|    return r->d;
  660|   316k|}
RSA_get0_p:
  663|   633k|{
  664|   633k|    return r->p;
  665|   633k|}
ossl_rsa_get0_pss_params_30:
  710|   316k|{
  711|   316k|    return &r->pss_params;
  712|   316k|}
RSA_clear_flags:
  715|   316k|{
  716|   316k|    r->flags &= ~flags;
  717|   316k|}
RSA_test_flags:
  720|   949k|{
  721|   949k|    return r->flags & flags;
  722|   949k|}
RSA_set_flags:
  725|   316k|{
  726|   316k|    r->flags |= flags;
  727|   316k|}
ossl_rsa_get0_all_params:
  879|   633k|{
  880|   633k|#ifndef FIPS_MODULE
  881|   633k|    RSA_PRIME_INFO *pinfo;
  882|   633k|    int i, pnum;
  883|   633k|#endif
  884|       |
  885|   633k|    if (r == NULL)
  ------------------
  |  Branch (885:9): [True: 0, False: 633k]
  ------------------
  886|      0|        return 0;
  887|       |
  888|       |    /* If |p| is NULL, there are no CRT parameters */
  889|   633k|    if (RSA_get0_p(r) == NULL)
  ------------------
  |  Branch (889:9): [True: 633k, False: 0]
  ------------------
  890|   633k|        return 1;
  891|       |
  892|      0|    sk_BIGNUM_const_push(primes, RSA_get0_p(r));
  893|      0|    sk_BIGNUM_const_push(primes, RSA_get0_q(r));
  894|      0|    sk_BIGNUM_const_push(exps, RSA_get0_dmp1(r));
  895|      0|    sk_BIGNUM_const_push(exps, RSA_get0_dmq1(r));
  896|      0|    sk_BIGNUM_const_push(coeffs, RSA_get0_iqmp(r));
  897|       |
  898|      0|#ifndef FIPS_MODULE
  899|      0|    pnum = RSA_get_multi_prime_extra_count(r);
  900|      0|    for (i = 0; i < pnum; i++) {
  ------------------
  |  Branch (900:17): [True: 0, False: 0]
  ------------------
  901|      0|        pinfo = sk_RSA_PRIME_INFO_value(r->prime_infos, i);
  902|      0|        sk_BIGNUM_const_push(primes, pinfo->r);
  903|      0|        sk_BIGNUM_const_push(exps, pinfo->d);
  904|      0|        sk_BIGNUM_const_push(coeffs, pinfo->t);
  905|      0|    }
  906|      0|#endif
  907|       |
  908|      0|    return 1;
  909|   633k|}
ossl_rsa_check_factors:
  913|   316k|{
  914|   316k|    int valid = 0;
  915|   316k|    int n, i, bits;
  916|   316k|    STACK_OF(BIGNUM_const) *factors = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   316k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  917|   316k|    STACK_OF(BIGNUM_const) *exps = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   316k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  918|   316k|    STACK_OF(BIGNUM_const) *coeffs = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   316k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  919|       |
  920|   316k|    if (factors == NULL || exps == NULL || coeffs == NULL)
  ------------------
  |  Branch (920:9): [True: 0, False: 316k]
  |  Branch (920:28): [True: 0, False: 316k]
  |  Branch (920:44): [True: 0, False: 316k]
  ------------------
  921|      0|        goto done;
  922|       |
  923|       |    /*
  924|       |     * Simple sanity check for RSA key. All RSA key parameters
  925|       |     * must be less-than/equal-to RSA parameter n.
  926|       |     */
  927|   316k|    ossl_rsa_get0_all_params(r, factors, exps, coeffs);
  928|   316k|    n = safe_BN_num_bits(RSA_get0_n(r));
  ------------------
  |  |  911|   316k|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 0, False: 316k]
  |  |  ------------------
  ------------------
  929|       |
  930|   316k|    if (safe_BN_num_bits(RSA_get0_d(r)) > n)
  ------------------
  |  |  911|   316k|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 316k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (930:9): [True: 0, False: 316k]
  ------------------
  931|      0|        goto done;
  932|       |
  933|   316k|    for (i = 0; i < sk_BIGNUM_const_num(exps); i++) {
  ------------------
  |  Branch (933:17): [True: 0, False: 316k]
  ------------------
  934|      0|        bits = safe_BN_num_bits(sk_BIGNUM_const_value(exps, i));
  ------------------
  |  |  911|      0|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  935|      0|        if (bits > n)
  ------------------
  |  Branch (935:13): [True: 0, False: 0]
  ------------------
  936|      0|            goto done;
  937|      0|    }
  938|       |
  939|   316k|    for (i = 0; i < sk_BIGNUM_const_num(factors); i++) {
  ------------------
  |  Branch (939:17): [True: 0, False: 316k]
  ------------------
  940|      0|        bits = safe_BN_num_bits(sk_BIGNUM_const_value(factors, i));
  ------------------
  |  |  911|      0|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  941|      0|        if (bits > n)
  ------------------
  |  Branch (941:13): [True: 0, False: 0]
  ------------------
  942|      0|            goto done;
  943|      0|    }
  944|       |
  945|   316k|    for (i = 0; i < sk_BIGNUM_const_num(coeffs); i++) {
  ------------------
  |  Branch (945:17): [True: 0, False: 316k]
  ------------------
  946|      0|        bits = safe_BN_num_bits(sk_BIGNUM_const_value(coeffs, i));
  ------------------
  |  |  911|      0|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  947|      0|        if (bits > n)
  ------------------
  |  Branch (947:13): [True: 0, False: 0]
  ------------------
  948|      0|            goto done;
  949|      0|    }
  950|       |
  951|   316k|    valid = 1;
  952|       |
  953|   316k|done:
  954|   316k|    sk_BIGNUM_const_free(factors);
  955|   316k|    sk_BIGNUM_const_free(exps);
  956|   316k|    sk_BIGNUM_const_free(coeffs);
  957|       |
  958|   316k|    return valid;
  959|   316k|}
rsa_lib.c:rsa_new_intern:
   77|   316k|{
   78|   316k|    RSA *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   316k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|       |
   80|   316k|    if (ret == NULL)
  ------------------
  |  Branch (80:9): [True: 0, False: 316k]
  ------------------
   81|      0|        return NULL;
   82|       |
   83|   316k|    ret->lock = CRYPTO_THREAD_lock_new();
   84|   316k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (84:9): [True: 0, False: 316k]
  ------------------
   85|      0|        ERR_raise(ERR_LIB_RSA, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   86|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   87|      0|        return NULL;
   88|      0|    }
   89|       |
   90|   316k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (90:9): [True: 0, False: 316k]
  ------------------
   91|      0|        CRYPTO_THREAD_lock_free(ret->lock);
   92|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|      0|        return NULL;
   94|      0|    }
   95|       |
   96|   316k|    ret->blindings_sa = ossl_rsa_alloc_blinding();
   97|   316k|    if (ret->blindings_sa == NULL)
  ------------------
  |  Branch (97:9): [True: 0, False: 316k]
  ------------------
   98|      0|        goto err;
   99|       |
  100|   316k|    ret->libctx = libctx;
  101|   316k|    ret->meth = RSA_get_default_method();
  102|   316k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  103|   316k|    ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
  ------------------
  |  |  476|   316k|#define RSA_FLAG_NON_FIPS_ALLOW 0x0400
  ------------------
  104|   316k|    if (engine) {
  ------------------
  |  Branch (104:9): [True: 0, False: 316k]
  ------------------
  105|      0|        if (!ENGINE_init(engine)) {
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|      0|            ERR_raise(ERR_LIB_RSA, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  107|      0|            goto err;
  108|      0|        }
  109|      0|        ret->engine = engine;
  110|   316k|    } else {
  111|   316k|        ret->engine = ENGINE_get_default_RSA();
  112|   316k|    }
  113|   316k|    if (ret->engine) {
  ------------------
  |  Branch (113:9): [True: 0, False: 316k]
  ------------------
  114|      0|        ret->meth = ENGINE_get_RSA(ret->engine);
  115|      0|        if (ret->meth == NULL) {
  ------------------
  |  Branch (115:13): [True: 0, False: 0]
  ------------------
  116|      0|            ERR_raise(ERR_LIB_RSA, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|            goto err;
  118|      0|        }
  119|      0|    }
  120|   316k|#endif
  121|       |
  122|   316k|    ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
  ------------------
  |  |  476|   316k|#define RSA_FLAG_NON_FIPS_ALLOW 0x0400
  ------------------
  123|   316k|#ifndef FIPS_MODULE
  124|   316k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data)) {
  ------------------
  |  |  259|   316k|#define CRYPTO_EX_INDEX_RSA 9
  ------------------
  |  Branch (124:9): [True: 0, False: 316k]
  ------------------
  125|      0|        goto err;
  126|      0|    }
  127|   316k|#endif
  128|       |
  129|   316k|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (129:9): [True: 316k, False: 0]
  |  Branch (129:38): [True: 0, False: 316k]
  ------------------
  130|      0|        ERR_raise(ERR_LIB_RSA, ERR_R_INIT_FAIL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  131|      0|        goto err;
  132|      0|    }
  133|       |
  134|   316k|    return ret;
  135|       |
  136|      0|err:
  137|      0|    RSA_free(ret);
  138|       |    return NULL;
  139|   316k|}

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

ossl_self_test_set_callback_new:
   35|    785|{
   36|    785|    SELF_TEST_CB *stcb;
   37|       |
   38|    785|    stcb = OPENSSL_zalloc(sizeof(*stcb));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|    785|    return stcb;
   40|    785|}
ossl_self_test_set_callback_free:
   43|    785|{
   44|    785|    OPENSSL_free(stcb);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|    785|}

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

ossl_sha3_reset:
   19|  31.0k|{
   20|       |#if defined(__s390x__) && defined(OPENSSL_CPUID_OBJ)
   21|       |    if (!(OPENSSL_s390xcap_P.stfle[1] & S390X_CAPBIT(S390X_MSA12)))
   22|       |#endif
   23|  31.0k|        memset(ctx->A, 0, sizeof(ctx->A));
   24|  31.0k|    ctx->bufsz = 0;
   25|  31.0k|    ctx->xof_state = XOF_STATE_INIT;
  ------------------
  |  |   35|  31.0k|#define XOF_STATE_INIT 0
  ------------------
   26|  31.0k|}
ossl_sha3_init:
   29|  5.90k|{
   30|  5.90k|    size_t bsz = SHA3_BLOCKSIZE(bitlen);
  ------------------
  |  |   21|  5.90k|#define SHA3_BLOCKSIZE(bitlen) (KECCAK1600_WIDTH - bitlen * 2) / 8
  |  |  ------------------
  |  |  |  |   18|  5.90k|#define KECCAK1600_WIDTH 1600
  |  |  ------------------
  ------------------
   31|       |
   32|  5.90k|    if (bsz <= sizeof(ctx->buf)) {
  ------------------
  |  Branch (32:9): [True: 5.90k, False: 0]
  ------------------
   33|  5.90k|        ossl_sha3_reset(ctx);
   34|  5.90k|        ctx->block_size = bsz;
   35|  5.90k|        ctx->md_size = bitlen / 8;
   36|  5.90k|        ctx->pad = pad;
   37|  5.90k|        return 1;
   38|  5.90k|    }
   39|       |
   40|      0|    return 0;
   41|  5.90k|}
ossl_keccak_init:
   44|  2.95k|{
   45|  2.95k|    int ret = ossl_sha3_init(ctx, pad, bitlen);
   46|       |
   47|  2.95k|    if (ret)
  ------------------
  |  Branch (47:9): [True: 2.95k, False: 0]
  ------------------
   48|  2.95k|        ctx->md_size = mdlen / 8;
   49|  2.95k|    return ret;
   50|  2.95k|}
ossl_sha3_final:
  104|  11.8k|{
  105|  11.8k|    size_t bsz = ctx->block_size;
  106|  11.8k|    size_t num = ctx->bufsz;
  107|       |
  108|  11.8k|    if (outlen == 0)
  ------------------
  |  Branch (108:9): [True: 0, False: 11.8k]
  ------------------
  109|      0|        return 1;
  110|  11.8k|    if (ctx->xof_state == XOF_STATE_SQUEEZE
  ------------------
  |  |   38|  23.6k|#define XOF_STATE_SQUEEZE 3
  ------------------
  |  Branch (110:9): [True: 0, False: 11.8k]
  ------------------
  111|  11.8k|        || ctx->xof_state == XOF_STATE_FINAL)
  ------------------
  |  |   37|  11.8k|#define XOF_STATE_FINAL 2
  ------------------
  |  Branch (111:12): [True: 0, False: 11.8k]
  ------------------
  112|      0|        return 0;
  113|       |
  114|       |    /*
  115|       |     * Pad the data with 10*1. Note that |num| can be |bsz - 1|
  116|       |     * in which case both byte operations below are performed on
  117|       |     * same byte...
  118|       |     */
  119|  11.8k|    memset(ctx->buf + num, 0, bsz - num);
  120|  11.8k|    ctx->buf[num] = ctx->pad;
  121|  11.8k|    ctx->buf[bsz - 1] |= 0x80;
  122|       |
  123|  11.8k|    (void)SHA3_absorb(ctx->A, ctx->buf, bsz, bsz);
  124|       |
  125|  11.8k|    ctx->xof_state = XOF_STATE_FINAL;
  ------------------
  |  |   37|  11.8k|#define XOF_STATE_FINAL 2
  ------------------
  126|  11.8k|    SHA3_squeeze(ctx->A, out, outlen, bsz, 0);
  127|  11.8k|    return 1;
  128|  11.8k|}
ossl_sha3_squeeze:
  141|  40.1k|{
  142|  40.1k|    size_t bsz = ctx->block_size;
  143|  40.1k|    size_t num = ctx->bufsz;
  144|  40.1k|    size_t len;
  145|  40.1k|    int next = 1;
  146|       |
  147|  40.1k|    if (outlen == 0)
  ------------------
  |  Branch (147:9): [True: 0, False: 40.1k]
  ------------------
  148|      0|        return 1;
  149|       |
  150|  40.1k|    if (ctx->xof_state == XOF_STATE_FINAL)
  ------------------
  |  |   37|  40.1k|#define XOF_STATE_FINAL 2
  ------------------
  |  Branch (150:9): [True: 0, False: 40.1k]
  ------------------
  151|      0|        return 0;
  152|       |
  153|       |    /*
  154|       |     * On the first squeeze call, finish the absorb process,
  155|       |     * by adding the trailing padding and then doing
  156|       |     * a final absorb.
  157|       |     */
  158|  40.1k|    if (ctx->xof_state != XOF_STATE_SQUEEZE) {
  ------------------
  |  |   38|  40.1k|#define XOF_STATE_SQUEEZE 3
  ------------------
  |  Branch (158:9): [True: 13.3k, False: 26.8k]
  ------------------
  159|       |        /*
  160|       |         * Pad the data with 10*1. Note that |num| can be |bsz - 1|
  161|       |         * in which case both byte operations below are performed on
  162|       |         * same byte...
  163|       |         */
  164|  13.3k|        memset(ctx->buf + num, 0, bsz - num);
  165|  13.3k|        ctx->buf[num] = ctx->pad;
  166|  13.3k|        ctx->buf[bsz - 1] |= 0x80;
  167|  13.3k|        (void)SHA3_absorb(ctx->A, ctx->buf, bsz, bsz);
  168|  13.3k|        ctx->xof_state = XOF_STATE_SQUEEZE;
  ------------------
  |  |   38|  13.3k|#define XOF_STATE_SQUEEZE 3
  ------------------
  169|  13.3k|        num = ctx->bufsz = 0;
  170|  13.3k|        next = 0;
  171|  13.3k|    }
  172|       |
  173|       |    /*
  174|       |     * Step 1. Consume any bytes left over from a previous squeeze
  175|       |     * (See Step 4 below).
  176|       |     */
  177|  40.1k|    if (num != 0) {
  ------------------
  |  Branch (177:9): [True: 0, False: 40.1k]
  ------------------
  178|      0|        if (outlen > ctx->bufsz)
  ------------------
  |  Branch (178:13): [True: 0, False: 0]
  ------------------
  179|      0|            len = ctx->bufsz;
  180|      0|        else
  181|      0|            len = outlen;
  182|      0|        memcpy(out, ctx->buf + bsz - ctx->bufsz, len);
  183|      0|        out += len;
  184|      0|        outlen -= len;
  185|      0|        ctx->bufsz -= len;
  186|      0|    }
  187|  40.1k|    if (outlen == 0)
  ------------------
  |  Branch (187:9): [True: 0, False: 40.1k]
  ------------------
  188|      0|        return 1;
  189|       |
  190|       |    /* Step 2. Copy full sized squeezed blocks to the output buffer directly */
  191|  40.1k|    if (outlen >= bsz) {
  ------------------
  |  Branch (191:9): [True: 40.1k, False: 0]
  ------------------
  192|  40.1k|        len = bsz * (outlen / bsz);
  193|  40.1k|        SHA3_squeeze(ctx->A, out, len, bsz, next);
  194|  40.1k|        next = 1;
  195|  40.1k|        out += len;
  196|  40.1k|        outlen -= len;
  197|  40.1k|    }
  198|  40.1k|    if (outlen > 0) {
  ------------------
  |  Branch (198:9): [True: 0, False: 40.1k]
  ------------------
  199|       |        /* Step 3. Squeeze one more block into a buffer */
  200|      0|        SHA3_squeeze(ctx->A, ctx->buf, bsz, bsz, next);
  201|      0|        memcpy(out, ctx->buf, outlen);
  202|       |        /* Step 4. Remember the leftover part of the squeezed block */
  203|      0|        ctx->bufsz = bsz - outlen;
  204|      0|    }
  205|       |
  206|  40.1k|    return 1;
  207|  40.1k|}

SHA1_Init:
   60|   378k|{
   61|   378k|    memset(c, 0, sizeof(*c));
   62|   378k|    c->h0 = INIT_DATA_h0;
  ------------------
  |  |   53|   378k|#define INIT_DATA_h0 0x67452301UL
  ------------------
   63|   378k|    c->h1 = INIT_DATA_h1;
  ------------------
  |  |   54|   378k|#define INIT_DATA_h1 0xefcdab89UL
  ------------------
   64|   378k|    c->h2 = INIT_DATA_h2;
  ------------------
  |  |   55|   378k|#define INIT_DATA_h2 0x98badcfeUL
  ------------------
   65|   378k|    c->h3 = INIT_DATA_h3;
  ------------------
  |  |   56|   378k|#define INIT_DATA_h3 0x10325476UL
  ------------------
   66|   378k|    c->h4 = INIT_DATA_h4;
  ------------------
  |  |   57|   378k|#define INIT_DATA_h4 0xc3d2e1f0UL
  ------------------
   67|   378k|    return 1;
   68|   378k|}

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:
   28|      1|{
   29|      1|    return &sm3_md;
   30|      1|}

ossl_sa_new:
   59|   319k|{
   60|   319k|    OPENSSL_SA *res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  108|   319k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|       |
   62|   319k|    return res;
   63|   319k|}
ossl_sa_free:
  111|   319k|{
  112|   319k|    if (sa != NULL) {
  ------------------
  |  Branch (112:9): [True: 319k, False: 0]
  ------------------
  113|   319k|        sa_doall(sa, &sa_free_node, NULL, NULL);
  114|   319k|        OPENSSL_free(sa);
  ------------------
  |  |  131|   319k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  115|   319k|    }
  116|   319k|}
ossl_sa_doall:
  135|  3.68k|{
  136|  3.68k|    struct trampoline_st tramp;
  137|       |
  138|  3.68k|    tramp.func = leaf;
  139|  3.68k|    if (sa != NULL)
  ------------------
  |  Branch (139:9): [True: 3.68k, False: 0]
  ------------------
  140|  3.68k|        sa_doall(sa, NULL, &trampoline, &tramp);
  141|  3.68k|}
ossl_sa_doall_arg:
  146|   323k|{
  147|   323k|    if (sa != NULL)
  ------------------
  |  Branch (147:9): [True: 323k, False: 0]
  ------------------
  148|   323k|        sa_doall(sa, NULL, leaf, arg);
  149|   323k|}
ossl_sa_num:
  152|      6|{
  153|      6|    return sa == NULL ? 0 : sa->nelem;
  ------------------
  |  Branch (153:12): [True: 0, False: 6]
  ------------------
  154|      6|}
ossl_sa_get:
  157|  22.4M|{
  158|  22.4M|    int level;
  159|  22.4M|    void **p, *r = NULL;
  160|       |
  161|  22.4M|    if (sa == NULL || sa->nelem == 0)
  ------------------
  |  Branch (161:9): [True: 0, False: 22.4M]
  |  Branch (161:23): [True: 1.89k, False: 22.4M]
  ------------------
  162|  1.89k|        return NULL;
  163|       |
  164|  22.4M|    if (n <= sa->top) {
  ------------------
  |  Branch (164:9): [True: 22.2M, False: 169k]
  ------------------
  165|  22.2M|        p = sa->nodes;
  166|  25.2M|        for (level = sa->levels - 1; p != NULL && level > 0; level--)
  ------------------
  |  Branch (166:38): [True: 25.1M, False: 156k]
  |  Branch (166:51): [True: 3.05M, False: 22.0M]
  ------------------
  167|  3.05M|            p = (void **)p[(n >> (OPENSSL_SA_BLOCK_BITS * level))
  ------------------
  |  |   34|  3.05M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  168|  3.05M|                & SA_BLOCK_MASK];
  ------------------
  |  |   46|  3.05M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  3.05M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.05M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  22.2M|        r = p == NULL ? NULL : p[n & SA_BLOCK_MASK];
  ------------------
  |  |   46|  22.0M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  22.0M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  22.0M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (169:13): [True: 156k, False: 22.0M]
  ------------------
  170|  22.2M|    }
  171|  22.4M|    return r;
  172|  22.4M|}
ossl_sa_set:
  180|   339k|{
  181|   339k|    int i, level = 1;
  182|   339k|    ossl_uintmax_t n = posn;
  183|   339k|    void **p;
  184|       |
  185|   339k|    if (sa == NULL)
  ------------------
  |  Branch (185:9): [True: 0, False: 339k]
  ------------------
  186|      0|        return 0;
  187|       |
  188|  1.35M|    for (level = 1; level < SA_BLOCK_MAX_LEVELS; level++)
  ------------------
  |  |   47|  1.35M|#define SA_BLOCK_MAX_LEVELS (((int)sizeof(ossl_uintmax_t) * 8 \
  |  |   48|  1.35M|                                 + OPENSSL_SA_BLOCK_BITS - 1) \
  |  |  ------------------
  |  |  |  |   34|  1.35M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  |  |   49|  1.35M|    / OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  1.35M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (188:21): [True: 1.35M, False: 0]
  ------------------
  189|  1.35M|        if ((n >>= OPENSSL_SA_BLOCK_BITS) == 0)
  ------------------
  |  |   34|  1.35M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  |  Branch (189:13): [True: 339k, False: 1.01M]
  ------------------
  190|   339k|            break;
  191|       |
  192|   341k|    for (; sa->levels < level; sa->levels++) {
  ------------------
  |  Branch (192:12): [True: 2.54k, False: 339k]
  ------------------
  193|  2.54k|        p = alloc_node();
  194|  2.54k|        if (p == NULL)
  ------------------
  |  Branch (194:13): [True: 0, False: 2.54k]
  ------------------
  195|      0|            return 0;
  196|  2.54k|        p[0] = sa->nodes;
  197|  2.54k|        sa->nodes = p;
  198|  2.54k|    }
  199|   339k|    if (sa->top < posn)
  ------------------
  |  Branch (199:9): [True: 85.3k, False: 253k]
  ------------------
  200|  85.3k|        sa->top = posn;
  201|       |
  202|   339k|    p = sa->nodes;
  203|  1.37M|    for (level = sa->levels - 1; level > 0; level--) {
  ------------------
  |  Branch (203:34): [True: 1.03M, False: 339k]
  ------------------
  204|  1.03M|        i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   34|  1.03M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
                      i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   46|  1.03M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.03M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.03M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|  1.03M|        if (p[i] == NULL && (p[i] = alloc_node()) == NULL)
  ------------------
  |  Branch (205:13): [True: 307k, False: 727k]
  |  Branch (205:29): [True: 0, False: 307k]
  ------------------
  206|      0|            return 0;
  207|  1.03M|        p = p[i];
  208|  1.03M|    }
  209|   339k|    p += posn & SA_BLOCK_MASK;
  ------------------
  |  |   46|   339k|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|   339k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   339k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|   339k|    if (val == NULL && *p != NULL)
  ------------------
  |  Branch (210:9): [True: 169k, False: 169k]
  |  Branch (210:24): [True: 169k, False: 0]
  ------------------
  211|   169k|        sa->nelem--;
  212|   169k|    else if (val != NULL && *p == NULL)
  ------------------
  |  Branch (212:14): [True: 169k, False: 0]
  |  Branch (212:29): [True: 169k, False: 3]
  ------------------
  213|   169k|        sa->nelem++;
  214|   339k|    *p = val;
  215|   339k|    return 1;
  216|   339k|}
sparse_array.c:sa_doall:
   67|   646k|{
   68|   646k|    int i[SA_BLOCK_MAX_LEVELS];
   69|   646k|    void *nodes[SA_BLOCK_MAX_LEVELS];
   70|   646k|    ossl_uintmax_t idx = 0;
   71|   646k|    int l = 0;
   72|       |
   73|   646k|    i[0] = 0;
   74|   646k|    nodes[0] = sa->nodes;
   75|  29.7M|    while (l >= 0) {
  ------------------
  |  Branch (75:12): [True: 29.1M, False: 646k]
  ------------------
   76|  29.1M|        const int n = i[l];
   77|  29.1M|        void **const p = nodes[l];
   78|       |
   79|  29.1M|        if (n >= SA_BLOCK_MAX) {
  ------------------
  |  |   45|  29.1M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  29.1M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (79:13): [True: 1.71M, False: 27.3M]
  ------------------
   80|  1.71M|            if (p != NULL && node != NULL)
  ------------------
  |  Branch (80:17): [True: 1.06M, False: 644k]
  |  Branch (80:30): [True: 310k, False: 756k]
  ------------------
   81|   310k|                (*node)(p);
   82|  1.71M|            l--;
   83|  1.71M|            idx >>= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  1.71M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   84|  27.3M|        } else {
   85|  27.3M|            i[l] = n + 1;
   86|  27.3M|            if (p != NULL && p[n] != NULL) {
  ------------------
  |  Branch (86:17): [True: 17.0M, False: 10.3M]
  |  Branch (86:30): [True: 1.47M, False: 15.6M]
  ------------------
   87|  1.47M|                idx = (idx & ~SA_BLOCK_MASK) | n;
  ------------------
  |  |   46|  1.47M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.47M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.47M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|  1.47M|                if (l < sa->levels - 1) {
  ------------------
  |  Branch (88:21): [True: 1.06M, False: 411k]
  ------------------
   89|  1.06M|                    i[++l] = 0;
   90|  1.06M|                    nodes[l] = p[n];
   91|  1.06M|                    idx <<= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  1.06M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   92|  1.06M|                } else if (leaf != NULL) {
  ------------------
  |  Branch (92:28): [True: 411k, False: 0]
  ------------------
   93|   411k|                    (*leaf)(idx, p[n], arg);
   94|   411k|                }
   95|  1.47M|            }
   96|  27.3M|        }
   97|  29.1M|    }
   98|   646k|}
sparse_array.c:sa_free_node:
  101|   310k|{
  102|   310k|    OPENSSL_free(p);
  ------------------
  |  |  131|   310k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|   310k|}
sparse_array.c:alloc_node:
  175|   310k|{
  176|   310k|    return OPENSSL_calloc(SA_BLOCK_MAX, sizeof(void *));
  ------------------
  |  |  112|   310k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  177|   310k|}

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:
   39|  3.40k|{
   40|  3.40k|    OPENSSL_sk_compfunc old = sk->comp;
   41|       |
   42|  3.40k|    if (sk->comp != c)
  ------------------
  |  Branch (42:9): [True: 3.40k, False: 0]
  ------------------
   43|  3.40k|        sk->sorted = 0;
   44|  3.40k|    sk->comp = c;
   45|       |
   46|  3.40k|    return old;
   47|  3.40k|}
OPENSSL_sk_dup:
   50|   656k|{
   51|   656k|    OPENSSL_STACK *ret;
   52|       |
   53|   656k|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  106|   656k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (53:9): [True: 0, False: 656k]
  ------------------
   54|      0|        goto err;
   55|       |
   56|   656k|    if (sk == NULL) {
  ------------------
  |  Branch (56:9): [True: 1, False: 656k]
  ------------------
   57|      1|        ret->num = 0;
   58|      1|        ret->sorted = 0;
   59|      1|        ret->comp = NULL;
   60|   656k|    } else {
   61|       |        /* direct structure assignment */
   62|   656k|        *ret = *sk;
   63|   656k|    }
   64|       |
   65|   656k|    if (sk == NULL || sk->num == 0) {
  ------------------
  |  Branch (65:9): [True: 1, False: 656k]
  |  Branch (65:23): [True: 122, False: 656k]
  ------------------
   66|       |        /* postpone |ret->data| allocation */
   67|    123|        ret->data = NULL;
   68|    123|        ret->num_alloc = 0;
   69|    123|        return ret;
   70|    123|    }
   71|       |
   72|       |    /* duplicate |sk->data| content */
   73|   656k|    ret->data = OPENSSL_malloc_array(sk->num_alloc, sizeof(*ret->data));
  ------------------
  |  |  110|   656k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|   656k|    if (ret->data == NULL)
  ------------------
  |  Branch (74:9): [True: 0, False: 656k]
  ------------------
   75|      0|        goto err;
   76|   656k|    memcpy(ret->data, sk->data, sizeof(void *) * sk->num);
   77|   656k|    return ret;
   78|       |
   79|      0|err:
   80|      0|    OPENSSL_sk_free(ret);
   81|       |    return NULL;
   82|   656k|}
OPENSSL_sk_deep_copy:
   87|   873k|{
   88|   873k|    OPENSSL_STACK *ret;
   89|   873k|    int i;
   90|       |
   91|   873k|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  106|   873k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (91:9): [True: 0, False: 873k]
  ------------------
   92|      0|        goto err;
   93|       |
   94|   873k|    if (sk == NULL) {
  ------------------
  |  Branch (94:9): [True: 1.84k, False: 871k]
  ------------------
   95|  1.84k|        ret->num = 0;
   96|  1.84k|        ret->sorted = 0;
   97|  1.84k|        ret->comp = NULL;
   98|   871k|    } else {
   99|       |        /* direct structure assignment */
  100|   871k|        *ret = *sk;
  101|   871k|    }
  102|       |
  103|   873k|    if (sk == NULL || sk->num == 0) {
  ------------------
  |  Branch (103:9): [True: 1.84k, False: 871k]
  |  Branch (103:23): [True: 0, False: 871k]
  ------------------
  104|       |        /* postpone |ret| data allocation */
  105|  1.84k|        ret->data = NULL;
  106|  1.84k|        ret->num_alloc = 0;
  107|  1.84k|        return ret;
  108|  1.84k|    }
  109|       |
  110|   871k|    ret->num_alloc = sk->num > min_nodes ? sk->num : min_nodes;
  ------------------
  |  Branch (110:22): [True: 435k, False: 435k]
  ------------------
  111|   871k|    ret->data = OPENSSL_calloc(ret->num_alloc, sizeof(*ret->data));
  ------------------
  |  |  112|   871k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|   871k|    if (ret->data == NULL)
  ------------------
  |  Branch (112:9): [True: 0, False: 871k]
  ------------------
  113|      0|        goto err;
  114|       |
  115|  3.92M|    for (i = 0; i < ret->num; ++i) {
  ------------------
  |  Branch (115:17): [True: 3.05M, False: 871k]
  ------------------
  116|  3.05M|        if (sk->data[i] == NULL)
  ------------------
  |  Branch (116:13): [True: 0, False: 3.05M]
  ------------------
  117|      0|            continue;
  118|  3.05M|        if ((ret->data[i] = copy_func(sk->data[i])) == NULL) {
  ------------------
  |  Branch (118:13): [True: 0, False: 3.05M]
  ------------------
  119|      0|            while (--i >= 0)
  ------------------
  |  Branch (119:20): [True: 0, False: 0]
  ------------------
  120|      0|                if (ret->data[i] != NULL)
  ------------------
  |  Branch (120:21): [True: 0, False: 0]
  ------------------
  121|      0|                    free_func((void *)ret->data[i]);
  122|      0|            goto err;
  123|      0|        }
  124|  3.05M|    }
  125|   871k|    return ret;
  126|       |
  127|      0|err:
  128|      0|    OPENSSL_sk_free(ret);
  129|       |    return NULL;
  130|   871k|}
OPENSSL_sk_new_null:
  133|  12.6M|{
  134|       |    return OPENSSL_sk_new_reserve(NULL, 0);
  135|  12.6M|}
OPENSSL_sk_new:
  138|  44.9k|{
  139|  44.9k|    return OPENSSL_sk_new_reserve(c, 0);
  140|  44.9k|}
OPENSSL_sk_new_reserve:
  229|  12.6M|{
  230|  12.6M|    OPENSSL_STACK *st = OPENSSL_zalloc(sizeof(OPENSSL_STACK));
  ------------------
  |  |  108|  12.6M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  231|       |
  232|  12.6M|    if (st == NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 12.6M]
  ------------------
  233|      0|        return NULL;
  234|       |
  235|  12.6M|    st->comp = c;
  236|       |
  237|  12.6M|    if (n <= 0)
  ------------------
  |  Branch (237:9): [True: 12.6M, False: 6]
  ------------------
  238|  12.6M|        return st;
  239|       |
  240|      6|    if (!sk_reserve(st, n, 1)) {
  ------------------
  |  Branch (240:9): [True: 0, False: 6]
  ------------------
  241|      0|        OPENSSL_sk_free(st);
  242|      0|        return NULL;
  243|      0|    }
  244|       |
  245|      6|    return st;
  246|      6|}
OPENSSL_sk_set_thunks:
  261|  4.12M|{
  262|  4.12M|    if (st != NULL)
  ------------------
  |  Branch (262:9): [True: 2.90M, False: 1.21M]
  ------------------
  263|  2.90M|        st->free_thunk = f_thunk;
  264|       |
  265|  4.12M|    return st;
  266|  4.12M|}
OPENSSL_sk_insert:
  269|  19.3M|{
  270|  19.3M|    if (st == NULL) {
  ------------------
  |  Branch (270:9): [True: 0, False: 19.3M]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        return 0;
  273|      0|    }
  274|  19.3M|    if (st->num == max_nodes) {
  ------------------
  |  Branch (274:9): [True: 0, False: 19.3M]
  ------------------
  275|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|      0|        return 0;
  277|      0|    }
  278|       |
  279|  19.3M|    if (!sk_reserve(st, 1, 0))
  ------------------
  |  Branch (279:9): [True: 0, False: 19.3M]
  ------------------
  280|      0|        return 0;
  281|       |
  282|  19.3M|    if ((loc >= st->num) || (loc < 0)) {
  ------------------
  |  Branch (282:9): [True: 19.3M, False: 83]
  |  Branch (282:29): [True: 0, False: 83]
  ------------------
  283|  19.3M|        st->data[st->num] = data;
  284|  19.3M|    } else {
  285|     83|        memmove(&st->data[loc + 1], &st->data[loc],
  286|     83|            sizeof(st->data[0]) * (st->num - loc));
  287|     83|        st->data[loc] = data;
  288|     83|    }
  289|  19.3M|    st->num++;
  290|  19.3M|    st->sorted = 0;
  291|  19.3M|    return st->num;
  292|  19.3M|}
OPENSSL_sk_delete_ptr:
  307|      2|{
  308|      2|    int i;
  309|       |
  310|      2|    if (st == NULL)
  ------------------
  |  Branch (310:9): [True: 0, False: 2]
  ------------------
  311|      0|        return NULL;
  312|       |
  313|      2|    for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (313:17): [True: 1, False: 1]
  ------------------
  314|      1|        if (st->data[i] == p)
  ------------------
  |  Branch (314:13): [True: 1, False: 0]
  ------------------
  315|      1|            return internal_delete(st, i);
  316|      1|    return NULL;
  317|      2|}
OPENSSL_sk_delete:
  320|    982|{
  321|    982|    if (st == NULL || loc < 0 || loc >= st->num)
  ------------------
  |  Branch (321:9): [True: 0, False: 982]
  |  Branch (321:23): [True: 0, False: 982]
  |  Branch (321:34): [True: 0, False: 982]
  ------------------
  322|      0|        return NULL;
  323|       |
  324|    982|    return internal_delete(st, loc);
  325|    982|}
OPENSSL_sk_find:
  393|   440k|{
  394|   440k|    return internal_find(st, data, OSSL_BSEARCH_FIRST_VALUE_ON_MATCH, NULL);
  ------------------
  |  |  150|   440k|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  395|   440k|}
OPENSSL_sk_push:
  408|  19.3M|{
  409|  19.3M|    if (st == NULL)
  ------------------
  |  Branch (409:9): [True: 0, False: 19.3M]
  ------------------
  410|      0|        return 0;
  411|  19.3M|    return OPENSSL_sk_insert(st, data, st->num);
  412|  19.3M|}
OPENSSL_sk_unshift:
  415|     82|{
  416|     82|    return OPENSSL_sk_insert(st, data, 0);
  417|     82|}
OPENSSL_sk_pop:
  427|  3.41k|{
  428|  3.41k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (428:9): [True: 0, False: 3.41k]
  |  Branch (428:23): [True: 0, False: 3.41k]
  ------------------
  429|      0|        return NULL;
  430|  3.41k|    return internal_delete(st, st->num - 1);
  431|  3.41k|}
OPENSSL_sk_pop_free:
  442|  11.0M|{
  443|  11.0M|    int i;
  444|       |
  445|  11.0M|    if (st == NULL)
  ------------------
  |  Branch (445:9): [True: 3.06M, False: 7.96M]
  ------------------
  446|  3.06M|        return;
  447|       |
  448|  25.2M|    for (i = 0; i < st->num; i++) {
  ------------------
  |  Branch (448:17): [True: 17.2M, False: 7.96M]
  ------------------
  449|  17.2M|        if (st->data[i] != NULL) {
  ------------------
  |  Branch (449:13): [True: 17.2M, False: 2]
  ------------------
  450|  17.2M|            if (st->free_thunk != NULL)
  ------------------
  |  Branch (450:17): [True: 9.91M, False: 7.37M]
  ------------------
  451|  9.91M|                st->free_thunk(func, (void *)st->data[i]);
  452|  7.37M|            else
  453|  7.37M|                func((void *)st->data[i]);
  454|  17.2M|        }
  455|  17.2M|    }
  456|  7.96M|    OPENSSL_sk_free(st);
  457|  7.96M|}
OPENSSL_sk_free:
  460|  21.0M|{
  461|  21.0M|    if (st == NULL)
  ------------------
  |  Branch (461:9): [True: 6.79M, False: 14.2M]
  ------------------
  462|  6.79M|        return;
  463|  14.2M|    OPENSSL_free(st->data);
  ------------------
  |  |  131|  14.2M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  464|  14.2M|    OPENSSL_free(st);
  ------------------
  |  |  131|  14.2M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  465|  14.2M|}
OPENSSL_sk_num:
  468|  90.1M|{
  469|  90.1M|    return st == NULL ? -1 : st->num;
  ------------------
  |  Branch (469:12): [True: 12.2M, False: 77.8M]
  ------------------
  470|  90.1M|}
OPENSSL_sk_value:
  473|  52.4M|{
  474|  52.4M|    if (st == NULL || i < 0 || i >= st->num)
  ------------------
  |  Branch (474:9): [True: 0, False: 52.4M]
  |  Branch (474:23): [True: 2.29k, False: 52.4M]
  |  Branch (474:32): [True: 0, False: 52.4M]
  ------------------
  475|  2.29k|        return NULL;
  476|  52.4M|    return (void *)st->data[i];
  477|  52.4M|}
OPENSSL_sk_set:
  480|  3.16M|{
  481|  3.16M|    if (st == NULL) {
  ------------------
  |  Branch (481:9): [True: 0, False: 3.16M]
  ------------------
  482|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  483|      0|        return NULL;
  484|      0|    }
  485|  3.16M|    if (i < 0 || i >= st->num) {
  ------------------
  |  Branch (485:9): [True: 0, False: 3.16M]
  |  Branch (485:18): [True: 0, False: 3.16M]
  ------------------
  486|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  358|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  487|      0|            "i=%d", i);
  488|      0|        return NULL;
  489|      0|    }
  490|  3.16M|    st->data[i] = data;
  491|  3.16M|    st->sorted = 0;
  492|  3.16M|    return (void *)st->data[i];
  493|  3.16M|}
OPENSSL_sk_sort:
  496|  24.4k|{
  497|  24.4k|    if (st != NULL && !st->sorted && st->comp != NULL) {
  ------------------
  |  Branch (497:9): [True: 24.4k, False: 0]
  |  Branch (497:23): [True: 22.2k, False: 2.17k]
  |  Branch (497:38): [True: 22.2k, False: 0]
  ------------------
  498|  22.2k|        if (st->num > 1)
  ------------------
  |  Branch (498:13): [True: 9.56k, False: 12.6k]
  ------------------
  499|  9.56k|            qsort(st->data, st->num, sizeof(void *), st->comp);
  500|  22.2k|        st->sorted = 1; /* empty or single-element stack is considered sorted */
  501|  22.2k|    }
  502|  24.4k|}
stack.c:sk_reserve:
  180|  19.3M|{
  181|  19.3M|    const void **tmpdata;
  182|  19.3M|    int num_alloc;
  183|       |
  184|       |    /* Check to see the reservation isn't exceeding the hard limit */
  185|  19.3M|    if (n > max_nodes - st->num) {
  ------------------
  |  Branch (185:9): [True: 0, False: 19.3M]
  ------------------
  186|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  187|      0|        return 0;
  188|      0|    }
  189|       |
  190|       |    /* Figure out the new size */
  191|  19.3M|    num_alloc = st->num + n;
  192|  19.3M|    if (num_alloc < min_nodes)
  ------------------
  |  Branch (192:9): [True: 16.2M, False: 3.03M]
  ------------------
  193|  16.2M|        num_alloc = min_nodes;
  194|       |
  195|       |    /* If |st->data| allocation was postponed */
  196|  19.3M|    if (st->data == NULL) {
  ------------------
  |  Branch (196:9): [True: 9.89M, False: 9.42M]
  ------------------
  197|       |        /*
  198|       |         * At this point, |st->num_alloc| and |st->num| are 0;
  199|       |         * so |num_alloc| value is |n| or |min_nodes| if greater than |n|.
  200|       |         */
  201|  9.89M|        if ((st->data = OPENSSL_calloc(num_alloc, sizeof(void *))) == NULL)
  ------------------
  |  |  112|  9.89M|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (201:13): [True: 0, False: 9.89M]
  ------------------
  202|      0|            return 0;
  203|  9.89M|        st->num_alloc = num_alloc;
  204|  9.89M|        return 1;
  205|  9.89M|    }
  206|       |
  207|  9.42M|    if (!exact) {
  ------------------
  |  Branch (207:9): [True: 9.42M, False: 0]
  ------------------
  208|  9.42M|        if (num_alloc <= st->num_alloc)
  ------------------
  |  Branch (208:13): [True: 8.78M, False: 640k]
  ------------------
  209|  8.78M|            return 1;
  210|   640k|        num_alloc = compute_growth(num_alloc, st->num_alloc);
  211|   640k|        if (num_alloc == 0) {
  ------------------
  |  Branch (211:13): [True: 0, False: 640k]
  ------------------
  212|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|            return 0;
  214|      0|        }
  215|   640k|    } else if (num_alloc == st->num_alloc) {
  ------------------
  |  Branch (215:16): [True: 0, False: 0]
  ------------------
  216|      0|        return 1;
  217|      0|    }
  218|       |
  219|   640k|    tmpdata = OPENSSL_realloc_array((void *)st->data, num_alloc, sizeof(void *));
  ------------------
  |  |  124|   640k|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  220|   640k|    if (tmpdata == NULL)
  ------------------
  |  Branch (220:9): [True: 0, False: 640k]
  ------------------
  221|      0|        return 0;
  222|       |
  223|   640k|    st->data = tmpdata;
  224|   640k|    st->num_alloc = num_alloc;
  225|   640k|    return 1;
  226|   640k|}
stack.c:compute_growth:
  162|   640k|{
  163|   640k|    int err = 0;
  164|       |
  165|  1.28M|    while (current < target) {
  ------------------
  |  Branch (165:12): [True: 640k, False: 640k]
  ------------------
  166|   640k|        if (current >= max_nodes)
  ------------------
  |  Branch (166:13): [True: 0, False: 640k]
  ------------------
  167|      0|            return 0;
  168|       |
  169|   640k|        current = safe_muldiv_int(current, 8, 5, &err);
  170|   640k|        if (err != 0)
  ------------------
  |  Branch (170:13): [True: 0, False: 640k]
  ------------------
  171|      0|            return 0;
  172|   640k|        if (current >= max_nodes)
  ------------------
  |  Branch (172:13): [True: 0, False: 640k]
  ------------------
  173|      0|            current = max_nodes;
  174|   640k|    }
  175|   640k|    return current;
  176|   640k|}
stack.c:internal_delete:
  295|  4.39k|{
  296|  4.39k|    const void *ret = st->data[loc];
  297|       |
  298|  4.39k|    if (loc != st->num - 1)
  ------------------
  |  Branch (298:9): [True: 650, False: 3.74k]
  ------------------
  299|    650|        memmove(&st->data[loc], &st->data[loc + 1],
  300|    650|            sizeof(st->data[0]) * (st->num - loc - 1));
  301|  4.39k|    st->num--;
  302|       |
  303|  4.39k|    return (void *)ret;
  304|  4.39k|}
stack.c:internal_find:
  329|   440k|{
  330|   440k|    const void *r;
  331|   440k|    int i, count = 0;
  332|   440k|    int *pnum = pnum_matched;
  333|       |
  334|   440k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (334:9): [True: 0, False: 440k]
  |  Branch (334:23): [True: 1.69k, False: 439k]
  ------------------
  335|  1.69k|        return -1;
  336|       |
  337|   439k|    if (pnum == NULL)
  ------------------
  |  Branch (337:9): [True: 439k, False: 0]
  ------------------
  338|   439k|        pnum = &count;
  339|       |
  340|   439k|    if (st->comp == NULL) {
  ------------------
  |  Branch (340:9): [True: 0, False: 439k]
  ------------------
  341|      0|        for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (341:21): [True: 0, False: 0]
  ------------------
  342|      0|            if (st->data[i] == data) {
  ------------------
  |  Branch (342:17): [True: 0, False: 0]
  ------------------
  343|      0|                *pnum = 1;
  344|      0|                return i;
  345|      0|            }
  346|      0|        *pnum = 0;
  347|      0|        return -1;
  348|      0|    }
  349|       |
  350|   439k|    if (data == NULL)
  ------------------
  |  Branch (350:9): [True: 0, False: 439k]
  ------------------
  351|      0|        return -1;
  352|       |
  353|   439k|    if (!st->sorted) {
  ------------------
  |  Branch (353:9): [True: 434k, False: 4.78k]
  ------------------
  354|   434k|        int res = -1;
  355|       |
  356|  32.0M|        for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (356:21): [True: 31.7M, False: 245k]
  ------------------
  357|  31.7M|            if (st->comp(&data, st->data + i) == 0) {
  ------------------
  |  Branch (357:17): [True: 189k, False: 31.6M]
  ------------------
  358|   189k|                if (res == -1)
  ------------------
  |  Branch (358:21): [True: 189k, False: 0]
  ------------------
  359|   189k|                    res = i;
  360|   189k|                ++*pnum;
  361|       |                /* Check if only one result is wanted and exit if so */
  362|   189k|                if (pnum_matched == NULL)
  ------------------
  |  Branch (362:21): [True: 189k, False: 0]
  ------------------
  363|   189k|                    return i;
  364|   189k|            }
  365|   245k|        if (res == -1)
  ------------------
  |  Branch (365:13): [True: 245k, False: 0]
  ------------------
  366|   245k|            *pnum = 0;
  367|   245k|        return res;
  368|   434k|    }
  369|       |
  370|  4.78k|    if (pnum_matched != NULL)
  ------------------
  |  Branch (370:9): [True: 0, False: 4.78k]
  ------------------
  371|      0|        ret_val_options |= OSSL_BSEARCH_FIRST_VALUE_ON_MATCH;
  ------------------
  |  |  150|      0|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  372|  4.78k|    r = ossl_bsearch(&data, st->data, st->num, sizeof(void *), st->comp,
  373|  4.78k|        ret_val_options);
  374|       |
  375|  4.78k|    if (pnum_matched != NULL) {
  ------------------
  |  Branch (375:9): [True: 0, False: 4.78k]
  ------------------
  376|      0|        *pnum = 0;
  377|      0|        if (r != NULL) {
  ------------------
  |  Branch (377:13): [True: 0, False: 0]
  ------------------
  378|      0|            const void **p = (const void **)r;
  379|       |
  380|      0|            while (p < st->data + st->num) {
  ------------------
  |  Branch (380:20): [True: 0, False: 0]
  ------------------
  381|      0|                if (st->comp(&data, p) != 0)
  ------------------
  |  Branch (381:21): [True: 0, False: 0]
  ------------------
  382|      0|                    break;
  383|      0|                ++*pnum;
  384|      0|                ++p;
  385|      0|            }
  386|      0|        }
  387|      0|    }
  388|       |
  389|  4.78k|    return r == NULL ? -1 : (int)((const void **)r - st->data);
  ------------------
  |  Branch (389:12): [True: 2.76k, False: 2.02k]
  ------------------
  390|   439k|}

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

ossl_store_cleanup_int:
   14|      1|{
   15|      1|    ossl_store_destroy_loaders_int();
   16|      1|}

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

ossl_store_destroy_loaders_int:
  282|      1|{
  283|      1|    lh_OSSL_STORE_LOADER_free(loader_register);
  284|      1|    loader_register = NULL;
  285|      1|    CRYPTO_THREAD_lock_free(registry_lock);
  286|       |    registry_lock = NULL;
  287|      1|}

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

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

CRYPTO_THREAD_get_local_ex:
  259|  21.2M|{
  260|  21.2M|    MASTER_KEY_ENTRY *mkey;
  261|  21.2M|    CTX_TABLE_ENTRY ctxd;
  262|       |
  263|  21.2M|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   25|  21.2M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (263:11): [True: 21.2M, False: 26.1k]
  ------------------
  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|  21.2M|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (276:9): [True: 0, False: 21.2M]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  21.2M|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  21.2M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  21.2M|    __FILE__, __LINE__)
  ------------------
  |  Branch (279:9): [True: 0, False: 21.2M]
  ------------------
  280|      0|        return NULL;
  281|       |
  282|       |    /*
  283|       |     * Get our master table sparse array, indexed by key id
  284|       |     */
  285|  21.2M|    mkey = CRYPTO_THREAD_get_local(&master_key);
  286|  21.2M|    if (mkey == NULL)
  ------------------
  |  Branch (286:9): [True: 1, False: 21.2M]
  ------------------
  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|  21.2M|    if (mkey[id].ctx_table == NULL)
  ------------------
  |  Branch (293:9): [True: 3, False: 21.2M]
  ------------------
  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|  21.2M|    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|  21.2M|    return ctxd;
  310|  21.2M|}
CRYPTO_THREAD_set_local_ex:
  338|  2.20k|{
  339|  2.20k|    MASTER_KEY_ENTRY *mkey;
  340|       |
  341|  2.20k|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   25|  2.20k|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (341:11): [True: 5, False: 2.20k]
  ------------------
  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.20k|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (346:9): [True: 0, False: 2.20k]
  ------------------
  347|      0|        return 0;
  348|       |
  349|  2.20k|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  2.20k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.20k|    __FILE__, __LINE__)
  ------------------
  |  Branch (349:9): [True: 0, False: 2.20k]
  ------------------
  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.20k|    mkey = CRYPTO_THREAD_get_local(&master_key);
  357|  2.20k|    if (mkey == NULL) {
  ------------------
  |  Branch (357:9): [True: 1, False: 2.20k]
  ------------------
  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,
  ------------------
  |  |  112|      1|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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.20k|    if (mkey[id].ctx_table == NULL) {
  ------------------
  |  Branch (377:9): [True: 3, False: 2.20k]
  ------------------
  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.20k|    return ossl_sa_CTX_TABLE_ENTRY_set(mkey[id].ctx_table,
  395|  2.20k|        (uintptr_t)ctx, data);
  396|  2.20k|}
CRYPTO_THREAD_clean_local:
  399|      1|{
  400|      1|    MASTER_KEY_ENTRY *mkey;
  401|       |
  402|       |    /*
  403|       |     * If we never initialized the master key, there
  404|       |     * is no data to clean, so we are done here
  405|       |     */
  406|      1|    if (master_key_init == 0)
  ------------------
  |  Branch (406:9): [True: 0, False: 1]
  ------------------
  407|      0|        return;
  408|       |
  409|      1|    mkey = CRYPTO_THREAD_get_local(&master_key);
  410|      1|    if (mkey != NULL) {
  ------------------
  |  Branch (410:9): [True: 1, False: 0]
  ------------------
  411|      1|        clean_master_key(mkey);
  412|       |        CRYPTO_THREAD_set_local(&master_key, NULL);
  413|      1|    }
  414|      1|}
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|}
threads_common.c:clean_master_key:
  191|      1|{
  192|      1|    MASTER_KEY_ENTRY *mkey = data;
  193|      1|    int i;
  194|       |
  195|      1|    if (data == NULL)
  ------------------
  |  Branch (195:9): [True: 0, False: 1]
  ------------------
  196|      0|        return;
  197|       |
  198|      9|    for (i = 0; i < CRYPTO_THREAD_LOCAL_KEY_MAX; i++) {
  ------------------
  |  Branch (198:17): [True: 8, False: 1]
  ------------------
  199|      8|        if (mkey[i].ctx_table != NULL)
  ------------------
  |  Branch (199:13): [True: 3, False: 5]
  ------------------
  200|      3|            clean_master_key_id(&mkey[i]);
  201|      8|    }
  202|      1|    OPENSSL_free(mkey);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  203|      1|}
threads_common.c:clean_master_key_id:
  173|      3|{
  174|      3|    ossl_sa_CTX_TABLE_ENTRY_free(entry->ctx_table);
  175|      3|}

ossl_rcu_write_lock:
  482|    787|{
  483|    787|    pthread_mutex_lock(&lock->write_lock);
  484|    787|    TSAN_FAKE_UNLOCK(&lock->write_lock);
  485|    787|}
ossl_rcu_write_unlock:
  488|    787|{
  489|    787|    TSAN_FAKE_LOCK(&lock->write_lock);
  490|    787|    pthread_mutex_unlock(&lock->write_lock);
  491|    787|}
ossl_synchronize_rcu:
  494|  1.57k|{
  495|  1.57k|    struct rcu_qp *qp;
  496|  1.57k|    uint64_t count;
  497|  1.57k|    uint32_t curr_id;
  498|  1.57k|    struct rcu_cb_item *cb_items, *tmpcb;
  499|       |
  500|  1.57k|    pthread_mutex_lock(&lock->write_lock);
  501|  1.57k|    cb_items = lock->cb_items;
  502|  1.57k|    lock->cb_items = NULL;
  503|  1.57k|    pthread_mutex_unlock(&lock->write_lock);
  504|       |
  505|  1.57k|    qp = update_qp(lock, &curr_id);
  506|       |
  507|       |    /* retire in order */
  508|  1.57k|    pthread_mutex_lock(&lock->prior_lock);
  509|  1.57k|    while (lock->next_to_retire != curr_id)
  ------------------
  |  Branch (509:12): [True: 0, False: 1.57k]
  ------------------
  510|      0|        pthread_cond_wait(&lock->prior_signal, &lock->prior_lock);
  511|       |
  512|       |    /*
  513|       |     * wait for the reader count to reach zero
  514|       |     * Note the use of __ATOMIC_ACQUIRE here to ensure that any
  515|       |     * prior __ATOMIC_RELEASE write operation in ossl_rcu_read_unlock
  516|       |     * is visible prior to our read
  517|       |     * however this is likely just necessary to silence a tsan warning
  518|       |     * because the read side should not do any write operation
  519|       |     * outside the atomic itself
  520|       |     */
  521|  1.57k|    do {
  522|  1.57k|        count = ATOMIC_LOAD_N(uint64_t, &qp->users, __ATOMIC_ACQUIRE);
  ------------------
  |  |  129|  1.57k|#define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  523|  1.57k|    } while (count != (uint64_t)0);
  ------------------
  |  Branch (523:14): [True: 0, False: 1.57k]
  ------------------
  524|       |
  525|  1.57k|    lock->next_to_retire++;
  526|  1.57k|    pthread_cond_broadcast(&lock->prior_signal);
  527|  1.57k|    pthread_mutex_unlock(&lock->prior_lock);
  528|       |
  529|  1.57k|    retire_qp(lock, qp);
  530|       |
  531|       |    /* handle any callbacks that we have */
  532|  2.35k|    while (cb_items != NULL) {
  ------------------
  |  Branch (532:12): [True: 785, False: 1.57k]
  ------------------
  533|    785|        tmpcb = cb_items;
  534|    785|        cb_items = cb_items->next;
  535|    785|        tmpcb->fn(tmpcb->data);
  536|    785|        OPENSSL_free(tmpcb);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  537|    785|    }
  538|  1.57k|}
ossl_rcu_call:
  545|    785|{
  546|    785|    struct rcu_cb_item *new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  547|       |
  548|    785|    if (new == NULL)
  ------------------
  |  Branch (548:9): [True: 0, False: 785]
  ------------------
  549|      0|        return 0;
  550|       |
  551|    785|    new->data = data;
  552|    785|    new->fn = cb;
  553|       |
  554|    785|    new->next = lock->cb_items;
  555|    785|    lock->cb_items = new;
  556|       |
  557|    785|    return 1;
  558|    785|}
ossl_rcu_uptr_deref:
  561|  13.9M|{
  562|  13.9M|    return ATOMIC_LOAD_N(pvoid, p, __ATOMIC_ACQUIRE);
  ------------------
  |  |  129|  13.9M|#define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  563|  13.9M|}
ossl_rcu_assign_uptr:
  566|   371k|{
  567|   371k|    ATOMIC_STORE(pvoid, p, v, __ATOMIC_RELEASE);
  ------------------
  |  |  131|   371k|#define ATOMIC_STORE(t, p, v, o) __atomic_store(p, v, o)
  ------------------
  568|   371k|}
ossl_rcu_lock_new:
  571|    786|{
  572|    786|    struct rcu_lock_st *new;
  573|    786|    pthread_mutex_t *mutexes[3] = { NULL };
  574|    786|    pthread_cond_t *conds[2] = { NULL };
  575|    786|    int i;
  576|       |
  577|       |    /*
  578|       |     * We need a minimum of 2 qp's
  579|       |     */
  580|    786|    if (num_writers < 2)
  ------------------
  |  Branch (580:9): [True: 786, False: 0]
  ------------------
  581|    786|        num_writers = 2;
  582|       |
  583|    786|    ctx = ossl_lib_ctx_get_concrete(ctx);
  584|    786|    if (ctx == NULL)
  ------------------
  |  Branch (584:9): [True: 0, False: 786]
  ------------------
  585|      0|        return 0;
  586|       |
  587|    786|    new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  108|    786|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  588|    786|    if (new == NULL)
  ------------------
  |  Branch (588:9): [True: 0, False: 786]
  ------------------
  589|      0|        return NULL;
  590|       |
  591|    786|    new->ctx = ctx;
  592|    786|    i = 0;
  593|    786|    mutexes[i] = pthread_mutex_init(&new->write_lock, NULL) == 0 ? &new->write_lock : NULL;
  ------------------
  |  Branch (593:18): [True: 786, False: 0]
  ------------------
  594|    786|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (594:9): [True: 0, False: 786]
  ------------------
  595|      0|        goto err;
  596|    786|    mutexes[i] = pthread_mutex_init(&new->prior_lock, NULL) == 0 ? &new->prior_lock : NULL;
  ------------------
  |  Branch (596:18): [True: 786, False: 0]
  ------------------
  597|    786|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (597:9): [True: 0, False: 786]
  ------------------
  598|      0|        goto err;
  599|    786|    mutexes[i] = pthread_mutex_init(&new->alloc_lock, NULL) == 0 ? &new->alloc_lock : NULL;
  ------------------
  |  Branch (599:18): [True: 786, False: 0]
  ------------------
  600|    786|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (600:9): [True: 0, False: 786]
  ------------------
  601|      0|        goto err;
  602|    786|    conds[i - 3] = pthread_cond_init(&new->prior_signal, NULL) == 0 ? &new->prior_signal : NULL;
  ------------------
  |  Branch (602:20): [True: 786, False: 0]
  ------------------
  603|    786|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (603:9): [True: 0, False: 786]
  ------------------
  604|      0|        goto err;
  605|    786|    i++;
  606|    786|    conds[i - 3] = pthread_cond_init(&new->alloc_signal, NULL) == 0 ? &new->alloc_signal : NULL;
  ------------------
  |  Branch (606:20): [True: 786, False: 0]
  ------------------
  607|    786|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (607:9): [True: 0, False: 786]
  ------------------
  608|      0|        goto err;
  609|    786|    i++;
  610|    786|    new->qp_group = allocate_new_qp_group(new, num_writers);
  611|    786|    if (new->qp_group == NULL)
  ------------------
  |  Branch (611:9): [True: 0, False: 786]
  ------------------
  612|      0|        goto err;
  613|       |
  614|    786|    return new;
  615|       |
  616|      0|err:
  617|      0|    for (i = 0; i < 3; i++)
  ------------------
  |  Branch (617:17): [True: 0, False: 0]
  ------------------
  618|      0|        if (mutexes[i] != NULL)
  ------------------
  |  Branch (618:13): [True: 0, False: 0]
  ------------------
  619|      0|            pthread_mutex_destroy(mutexes[i]);
  620|      0|    for (i = 0; i < 2; i++)
  ------------------
  |  Branch (620:17): [True: 0, False: 0]
  ------------------
  621|      0|        if (conds[i] != NULL)
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  ------------------
  622|      0|            pthread_cond_destroy(conds[i]);
  623|      0|    OPENSSL_free(new->qp_group);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  624|      0|    OPENSSL_free(new);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  625|       |    return NULL;
  626|    786|}
ossl_rcu_lock_free:
  629|    786|{
  630|    786|    struct rcu_lock_st *rlock = (struct rcu_lock_st *)lock;
  631|       |
  632|    786|    if (lock == NULL)
  ------------------
  |  Branch (632:9): [True: 0, False: 786]
  ------------------
  633|      0|        return;
  634|       |
  635|       |    /* make sure we're synchronized */
  636|    786|    ossl_synchronize_rcu(rlock);
  637|       |
  638|    786|    OPENSSL_free(rlock->qp_group);
  ------------------
  |  |  131|    786|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  639|       |    /*
  640|       |     * Some targets (BSD) allocate heap when initializing
  641|       |     * a mutex or condition, to prevent leaks, those need
  642|       |     * to be destroyed here
  643|       |     */
  644|    786|    pthread_mutex_destroy(&rlock->write_lock);
  645|    786|    pthread_mutex_destroy(&rlock->prior_lock);
  646|    786|    pthread_mutex_destroy(&rlock->alloc_lock);
  647|    786|    pthread_cond_destroy(&rlock->prior_signal);
  648|    786|    pthread_cond_destroy(&rlock->alloc_signal);
  649|       |
  650|       |    /* There should only be a single qp left now */
  651|    786|    OPENSSL_free(rlock);
  ------------------
  |  |  131|    786|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  652|    786|}
CRYPTO_THREAD_lock_new:
  901|  1.66M|{
  902|  1.66M|#ifdef USE_RWLOCK
  903|  1.66M|    CRYPTO_RWLOCK *lock;
  904|       |
  905|  1.66M|    ossl_init_rwlock_contention_data();
  906|       |
  907|  1.66M|    if ((lock = OPENSSL_zalloc(sizeof(pthread_rwlock_t))) == NULL)
  ------------------
  |  |  108|  1.66M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (907:9): [True: 0, False: 1.66M]
  ------------------
  908|       |        /* Don't set error, to avoid recursion blowup. */
  909|      0|        return NULL;
  910|       |
  911|  1.66M|    if (pthread_rwlock_init(lock, NULL) != 0) {
  ------------------
  |  Branch (911:9): [True: 0, False: 1.66M]
  ------------------
  912|      0|        OPENSSL_free(lock);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  913|      0|        return NULL;
  914|      0|    }
  915|       |#else
  916|       |    pthread_mutexattr_t attr;
  917|       |    CRYPTO_RWLOCK *lock;
  918|       |
  919|       |    if ((lock = OPENSSL_zalloc(sizeof(pthread_mutex_t))) == NULL)
  920|       |        /* Don't set error, to avoid recursion blowup. */
  921|       |        return NULL;
  922|       |
  923|       |    /*
  924|       |     * We don't use recursive mutexes, but try to catch errors if we do.
  925|       |     */
  926|       |    pthread_mutexattr_init(&attr);
  927|       |#if !defined(__TANDEM) && !defined(_SPT_MODEL_)
  928|       |#if !defined(NDEBUG) && !defined(OPENSSL_NO_MUTEX_ERRORCHECK)
  929|       |    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
  930|       |#endif
  931|       |#else
  932|       |    /* The SPT Thread Library does not define MUTEX attributes. */
  933|       |#endif
  934|       |
  935|       |    if (pthread_mutex_init(lock, &attr) != 0) {
  936|       |        pthread_mutexattr_destroy(&attr);
  937|       |        OPENSSL_free(lock);
  938|       |        return NULL;
  939|       |    }
  940|       |
  941|       |    pthread_mutexattr_destroy(&attr);
  942|       |#endif
  943|       |
  944|  1.66M|    return lock;
  945|  1.66M|}
CRYPTO_THREAD_read_lock:
  948|  15.6M|{
  949|  15.6M|#ifdef USE_RWLOCK
  950|  15.6M|    if (!ossl_assert(ossl_rwlock_rdlock(lock) == 0))
  ------------------
  |  |   52|  15.6M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  15.6M|    __FILE__, __LINE__)
  ------------------
  |  Branch (950:9): [True: 0, False: 15.6M]
  ------------------
  951|      0|        return 0;
  952|       |#else
  953|       |    if (pthread_mutex_lock(lock) != 0) {
  954|       |        assert(errno != EDEADLK && errno != EBUSY);
  955|       |        return 0;
  956|       |    }
  957|       |#endif
  958|       |
  959|  15.6M|    return 1;
  960|  15.6M|}
CRYPTO_THREAD_write_lock:
  963|  1.79M|{
  964|  1.79M|#ifdef USE_RWLOCK
  965|  1.79M|    if (!ossl_assert(ossl_rwlock_wrlock(lock) == 0))
  ------------------
  |  |   52|  1.79M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.79M|    __FILE__, __LINE__)
  ------------------
  |  Branch (965:9): [True: 0, False: 1.79M]
  ------------------
  966|      0|        return 0;
  967|       |#else
  968|       |    if (pthread_mutex_lock(lock) != 0) {
  969|       |        assert(errno != EDEADLK && errno != EBUSY);
  970|       |        return 0;
  971|       |    }
  972|       |#endif
  973|       |
  974|  1.79M|    return 1;
  975|  1.79M|}
CRYPTO_THREAD_unlock:
  978|  17.4M|{
  979|  17.4M|#ifdef USE_RWLOCK
  980|  17.4M|    if (ossl_rwlock_unlock(lock) != 0)
  ------------------
  |  Branch (980:9): [True: 0, False: 17.4M]
  ------------------
  981|      0|        return 0;
  982|       |#else
  983|       |    if (pthread_mutex_unlock(lock) != 0) {
  984|       |        assert(errno != EPERM);
  985|       |        return 0;
  986|       |    }
  987|       |#endif
  988|       |
  989|  17.4M|    return 1;
  990|  17.4M|}
CRYPTO_THREAD_lock_free:
  993|  1.66M|{
  994|  1.66M|    if (lock == NULL)
  ------------------
  |  Branch (994:9): [True: 1.89k, False: 1.66M]
  ------------------
  995|  1.89k|        return;
  996|       |
  997|  1.66M|#ifdef USE_RWLOCK
  998|  1.66M|    pthread_rwlock_destroy(lock);
  999|       |#else
 1000|       |    pthread_mutex_destroy(lock);
 1001|       |#endif
 1002|  1.66M|    OPENSSL_free(lock);
  ------------------
  |  |  131|  1.66M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1003|       |
 1004|  1.66M|    return;
 1005|  1.66M|}
CRYPTO_THREAD_run_once:
 1008|  58.0M|{
 1009|  58.0M|    if (ossl_unlikely(pthread_once(once, init) != 0))
  ------------------
  |  |   23|  58.0M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 58.0M]
  |  |  ------------------
  ------------------
 1010|      0|        return 0;
 1011|       |
 1012|  58.0M|    return 1;
 1013|  58.0M|}
CRYPTO_THREAD_init_local:
 1016|      4|{
 1017|       |
 1018|      4|#ifndef FIPS_MODULE
 1019|      4|    if (!ossl_init_thread())
  ------------------
  |  Branch (1019:9): [True: 0, False: 4]
  ------------------
 1020|      0|        return 0;
 1021|      4|#endif
 1022|       |
 1023|      4|    if (pthread_key_create(key, cleanup) != 0)
  ------------------
  |  Branch (1023:9): [True: 0, False: 4]
  ------------------
 1024|      0|        return 0;
 1025|       |
 1026|      4|    return 1;
 1027|      4|}
CRYPTO_THREAD_get_local:
 1030|  33.4M|{
 1031|  33.4M|    return pthread_getspecific(*key);
 1032|  33.4M|}
CRYPTO_THREAD_set_local:
 1035|      5|{
 1036|      5|    if (pthread_setspecific(*key, val) != 0)
  ------------------
  |  Branch (1036:9): [True: 0, False: 5]
  ------------------
 1037|      0|        return 0;
 1038|       |
 1039|      5|    return 1;
 1040|      5|}
CRYPTO_THREAD_cleanup_local:
 1043|      3|{
 1044|      3|    if (pthread_key_delete(*key) != 0)
  ------------------
  |  Branch (1044:9): [True: 0, False: 3]
  ------------------
 1045|      0|        return 0;
 1046|       |
 1047|      3|    return 1;
 1048|      3|}
CRYPTO_THREAD_get_current_id:
 1051|      6|{
 1052|      6|    return pthread_self();
 1053|      6|}
CRYPTO_THREAD_compare_id:
 1056|      5|{
 1057|      5|    return pthread_equal(a, b);
 1058|      5|}
CRYPTO_atomic_add:
 1061|   301k|{
 1062|   301k|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1063|   301k|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1063:9): [True: 301k, Folded]
  ------------------
 1064|   301k|        *ret = __atomic_add_fetch(val, amount, __ATOMIC_ACQ_REL);
 1065|   301k|        return 1;
 1066|   301k|    }
 1067|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1068|       |    /* This will work for all future Solaris versions. */
 1069|       |    if (ret != NULL) {
 1070|       |        *ret = atomic_add_int_nv((volatile unsigned int *)val, amount);
 1071|       |        return 1;
 1072|       |    }
 1073|       |#endif
 1074|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1074:9): [True: 0, False: 0]
  |  Branch (1074:25): [True: 0, False: 0]
  ------------------
 1075|      0|        return 0;
 1076|       |
 1077|      0|    *val += amount;
 1078|      0|    *ret = *val;
 1079|       |
 1080|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1080:9): [True: 0, False: 0]
  ------------------
 1081|      0|        return 0;
 1082|       |
 1083|      0|    return 1;
 1084|      0|}
CRYPTO_atomic_or:
 1140|      3|{
 1141|      3|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1142|      3|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1142:9): [True: 3, Folded]
  ------------------
 1143|      3|        *ret = __atomic_or_fetch(val, op, __ATOMIC_ACQ_REL);
 1144|      3|        return 1;
 1145|      3|    }
 1146|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1147|       |    /* This will work for all future Solaris versions. */
 1148|       |    if (ret != NULL) {
 1149|       |        *ret = atomic_or_64_nv(val, op);
 1150|       |        return 1;
 1151|       |    }
 1152|       |#endif
 1153|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1153:9): [True: 0, False: 0]
  |  Branch (1153:25): [True: 0, False: 0]
  ------------------
 1154|      0|        return 0;
 1155|      0|    *val |= op;
 1156|      0|    *ret = *val;
 1157|       |
 1158|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1158:9): [True: 0, False: 0]
  ------------------
 1159|      0|        return 0;
 1160|       |
 1161|      0|    return 1;
 1162|      0|}
CRYPTO_atomic_load:
 1165|  31.9M|{
 1166|  31.9M|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1167|  31.9M|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1167:9): [True: 31.9M, Folded]
  ------------------
 1168|  31.9M|        __atomic_load(val, ret, __ATOMIC_ACQUIRE);
 1169|  31.9M|        return 1;
 1170|  31.9M|    }
 1171|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1172|       |    /* This will work for all future Solaris versions. */
 1173|       |    if (ret != NULL) {
 1174|       |        *ret = atomic_or_64_nv(val, 0);
 1175|       |        return 1;
 1176|       |    }
 1177|       |#endif
 1178|      0|    if (lock == NULL || !CRYPTO_THREAD_read_lock(lock))
  ------------------
  |  Branch (1178:9): [True: 0, False: 0]
  |  Branch (1178:25): [True: 0, False: 0]
  ------------------
 1179|      0|        return 0;
 1180|      0|    *ret = *val;
 1181|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1181:9): [True: 0, False: 0]
  ------------------
 1182|      0|        return 0;
 1183|       |
 1184|      0|    return 1;
 1185|      0|}
CRYPTO_atomic_store:
 1188|   370k|{
 1189|   370k|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1190|   370k|    if (__atomic_is_lock_free(sizeof(*dst), dst)) {
  ------------------
  |  Branch (1190:9): [True: 370k, Folded]
  ------------------
 1191|   370k|        __atomic_store(dst, &val, __ATOMIC_RELEASE);
 1192|   370k|        return 1;
 1193|   370k|    }
 1194|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1195|       |    /* This will work for all future Solaris versions. */
 1196|       |    if (dst != NULL) {
 1197|       |        atomic_swap_64(dst, val);
 1198|       |        return 1;
 1199|       |    }
 1200|       |#endif
 1201|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1201:9): [True: 0, False: 0]
  |  Branch (1201:25): [True: 0, False: 0]
  ------------------
 1202|      0|        return 0;
 1203|      0|    *dst = val;
 1204|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1204:9): [True: 0, False: 0]
  ------------------
 1205|      0|        return 0;
 1206|       |
 1207|      0|    return 1;
 1208|      0|}
openssl_get_fork_id:
 1241|  27.7k|{
 1242|  27.7k|    return getpid();
 1243|  27.7k|}
threads_pthread.c:update_qp:
  419|  1.57k|{
  420|  1.57k|    uint32_t current_idx;
  421|       |
  422|  1.57k|    pthread_mutex_lock(&lock->alloc_lock);
  423|       |
  424|       |    /*
  425|       |     * we need at least one qp to be available with one
  426|       |     * left over, so that readers can start working on
  427|       |     * one that isn't yet being waited on
  428|       |     */
  429|  1.57k|    while (lock->group_count - lock->writers_alloced < 2)
  ------------------
  |  Branch (429:12): [True: 0, False: 1.57k]
  ------------------
  430|       |        /* we have to wait for one to be free */
  431|      0|        pthread_cond_wait(&lock->alloc_signal, &lock->alloc_lock);
  432|       |
  433|  1.57k|    current_idx = lock->current_alloc_idx;
  434|       |
  435|       |    /* Allocate the qp */
  436|  1.57k|    lock->writers_alloced++;
  437|       |
  438|       |    /* increment the allocation index */
  439|  1.57k|    lock->current_alloc_idx = (lock->current_alloc_idx + 1) % lock->group_count;
  440|       |
  441|  1.57k|    *curr_id = lock->id_ctr;
  442|  1.57k|    lock->id_ctr++;
  443|       |
  444|       |    /*
  445|       |     * make the current state of everything visible by this release
  446|       |     * when get_hold_current_qp acquires the next qp
  447|       |     */
  448|  1.57k|    ATOMIC_STORE_N(uint32_t, &lock->reader_idx, lock->current_alloc_idx,
  ------------------
  |  |  130|  1.57k|#define ATOMIC_STORE_N(t, p, v, o) __atomic_store_n(p, v, o)
  ------------------
  449|  1.57k|        __ATOMIC_RELEASE);
  450|       |
  451|       |    /*
  452|       |     * this should make sure that the new value of reader_idx is visible in
  453|       |     * get_hold_current_qp, directly after incrementing the users count
  454|       |     */
  455|  1.57k|    ATOMIC_ADD_FETCH(&lock->qp_group[current_idx].users, (uint64_t)0,
  ------------------
  |  |  132|  1.57k|#define ATOMIC_ADD_FETCH(p, v, o) __atomic_add_fetch(p, v, o)
  ------------------
  456|  1.57k|        __ATOMIC_RELEASE);
  457|       |
  458|       |    /* wake up any waiters */
  459|  1.57k|    pthread_cond_signal(&lock->alloc_signal);
  460|  1.57k|    pthread_mutex_unlock(&lock->alloc_lock);
  461|  1.57k|    return &lock->qp_group[current_idx];
  462|  1.57k|}
threads_pthread.c:retire_qp:
  465|  1.57k|{
  466|  1.57k|    pthread_mutex_lock(&lock->alloc_lock);
  467|  1.57k|    lock->writers_alloced--;
  468|  1.57k|    pthread_cond_signal(&lock->alloc_signal);
  469|  1.57k|    pthread_mutex_unlock(&lock->alloc_lock);
  470|  1.57k|}
threads_pthread.c:allocate_new_qp_group:
  474|    786|{
  475|    786|    struct rcu_qp *new = OPENSSL_calloc(count, sizeof(*new));
  ------------------
  |  |  112|    786|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  476|       |
  477|    786|    lock->group_count = count;
  478|    786|    return new;
  479|    786|}
threads_pthread.c:ossl_init_rwlock_contention_data:
  880|  1.66M|{
  881|  1.66M|}
threads_pthread.c:ossl_rwlock_rdlock:
  884|  15.6M|{
  885|  15.6M|    return pthread_rwlock_rdlock(rwlock);
  886|  15.6M|}
threads_pthread.c:ossl_rwlock_wrlock:
  889|  1.79M|{
  890|  1.79M|    return pthread_rwlock_wrlock(rwlock);
  891|  1.79M|}
threads_pthread.c:ossl_rwlock_unlock:
  894|  17.4M|{
  895|  17.4M|    return pthread_rwlock_unlock(rwlock);
  896|  17.4M|}

ossl_time_now:
   16|  3.78k|{
   17|  3.78k|    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|  3.78k|    struct timeval t;
   37|       |
   38|  3.78k|    if (gettimeofday(&t, NULL) < 0) {
  ------------------
  |  Branch (38:9): [True: 0, False: 3.78k]
  ------------------
   39|      0|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|      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|  3.78k|    if (t.tv_sec <= 0)
  ------------------
  |  Branch (43:9): [True: 0, False: 3.78k]
  ------------------
   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|  3.78k|    else
   46|  3.78k|        r.t = ((uint64_t)t.tv_sec * 1000000 + t.tv_usec) * OSSL_TIME_US;
  ------------------
  |  |   37|  3.78k|#define OSSL_TIME_US (OSSL_TIME_MS / 1000)
  |  |  ------------------
  |  |  |  |   34|  3.78k|#define OSSL_TIME_MS (OSSL_TIME_SECOND / 1000)
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.78k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   47|  3.78k|#endif /* defined(_WIN32) */
   48|  3.78k|    return r;
   49|  3.78k|}

ossl_trace_cleanup:
  342|      1|{
  343|       |#ifndef OPENSSL_NO_TRACE
  344|       |    int category;
  345|       |    BIO *channel = NULL;
  346|       |    const char *prefix = NULL;
  347|       |    const char *suffix = NULL;
  348|       |
  349|       |    for (category = 0; category < OSSL_TRACE_CATEGORY_NUM; category++) {
  350|       |        /* We force the TRACE category to be treated last */
  351|       |        if (category == OSSL_TRACE_CATEGORY_TRACE)
  352|       |            continue;
  353|       |        set_trace_data(category, 0, &channel, &prefix, &suffix,
  354|       |            trace_attach_cb, trace_detach_cb);
  355|       |    }
  356|       |    set_trace_data(OSSL_TRACE_CATEGORY_TRACE, 0, &channel,
  357|       |        &prefix, &suffix,
  358|       |        trace_attach_cb, trace_detach_cb);
  359|       |    CRYPTO_THREAD_lock_free(trace_lock);
  360|       |#endif
  361|      1|}
OSSL_trace_set_channel:
  364|      1|{
  365|       |#ifndef OPENSSL_NO_TRACE
  366|       |    if (category >= 0 && category < OSSL_TRACE_CATEGORY_NUM)
  367|       |        return set_trace_data(category, SIMPLE_CHANNEL, &channel, NULL, NULL,
  368|       |            trace_attach_cb, trace_detach_cb);
  369|       |#endif
  370|      1|    return 0;
  371|      1|}

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|  2.98k|{
   79|  2.98k|    return &x509_dir_lookup;
   80|  2.98k|}
by_dir.c:new_dir:
  109|  1.69k|{
  110|  1.69k|    BY_DIR *a = OPENSSL_malloc(sizeof(*a));
  ------------------
  |  |  106|  1.69k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|       |
  112|  1.69k|    if (a == NULL)
  ------------------
  |  Branch (112:9): [True: 0, False: 1.69k]
  ------------------
  113|      0|        return 0;
  114|       |
  115|  1.69k|    if ((a->buffer = BUF_MEM_new()) == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 1.69k]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_X509, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|  1.69k|    a->dirs = NULL;
  120|  1.69k|    a->lock = CRYPTO_THREAD_lock_new();
  121|  1.69k|    if (a->lock == NULL) {
  ------------------
  |  Branch (121:9): [True: 0, False: 1.69k]
  ------------------
  122|      0|        BUF_MEM_free(a->buffer);
  123|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|        goto err;
  125|      0|    }
  126|  1.69k|    lu->method_data = a;
  127|  1.69k|    return 1;
  128|       |
  129|      0|err:
  130|      0|    OPENSSL_free(a);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  131|      0|    return 0;
  132|  1.69k|}
by_dir.c:free_dir:
  157|  1.69k|{
  158|  1.69k|    BY_DIR *a = (BY_DIR *)lu->method_data;
  159|       |
  160|  1.69k|    sk_BY_DIR_ENTRY_pop_free(a->dirs, by_dir_entry_free);
  161|  1.69k|    BUF_MEM_free(a->buffer);
  162|  1.69k|    CRYPTO_THREAD_lock_free(a->lock);
  163|  1.69k|    OPENSSL_free(a);
  ------------------
  |  |  131|  1.69k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  164|  1.69k|}
by_dir.c:by_dir_entry_free:
  150|  4.41k|{
  151|  4.41k|    OPENSSL_free(ent->dir);
  ------------------
  |  |  131|  4.41k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|  4.41k|    sk_BY_DIR_HASH_pop_free(ent->hashes, by_dir_hash_free);
  153|  4.41k|    OPENSSL_free(ent);
  ------------------
  |  |  131|  4.41k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|  4.41k|}
by_dir.c:dir_ctrl:
   84|  2.98k|{
   85|  2.98k|    int ret = 0;
   86|  2.98k|    BY_DIR *ld = (BY_DIR *)ctx->method_data;
   87|       |
   88|  2.98k|    switch (cmd) {
  ------------------
  |  Branch (88:13): [True: 2.98k, False: 0]
  ------------------
   89|  2.98k|    case X509_L_ADD_DIR:
  ------------------
  |  |  284|  2.98k|#define X509_L_ADD_DIR 2
  ------------------
  |  Branch (89:5): [True: 2.98k, False: 0]
  ------------------
   90|  2.98k|        if (argl == X509_FILETYPE_DEFAULT) {
  ------------------
  |  |  170|  2.98k|#define X509_FILETYPE_DEFAULT 3
  ------------------
  |  Branch (90:13): [True: 0, False: 2.98k]
  ------------------
   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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|            }
  101|      0|        } else
  102|  2.98k|            ret = add_cert_dir(ld, argp, (int)argl);
  103|  2.98k|        break;
  104|  2.98k|    }
  105|  2.98k|    return ret;
  106|  2.98k|}
by_dir.c:add_cert_dir:
  167|  2.98k|{
  168|  2.98k|    int j;
  169|  2.98k|    size_t len;
  170|  2.98k|    const char *s, *ss, *p;
  171|       |
  172|  2.98k|    if (dir == NULL || *dir == '\0') {
  ------------------
  |  Branch (172:9): [True: 0, False: 2.98k]
  |  Branch (172:24): [True: 6, False: 2.98k]
  ------------------
  173|      6|        ERR_raise(ERR_LIB_X509, X509_R_INVALID_DIRECTORY);
  ------------------
  |  |  404|      6|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      6|    (ERR_new(),                                                  \
  |  |  |  |  407|      6|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      6|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      6|        ERR_set_error)
  |  |  ------------------
  ------------------
  174|      6|        return 0;
  175|      6|    }
  176|       |
  177|  2.98k|    s = dir;
  178|  2.98k|    p = s;
  179|   196k|    do {
  180|   196k|        if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0')) {
  ------------------
  |  |  213|   196k|#define LIST_SEPARATOR_CHAR ':'
  ------------------
  |  Branch (180:13): [True: 8.03k, False: 188k]
  |  Branch (180:44): [True: 2.98k, False: 185k]
  ------------------
  181|  11.0k|            BY_DIR_ENTRY *ent;
  182|       |
  183|  11.0k|            ss = s;
  184|  11.0k|            s = p + 1;
  185|  11.0k|            len = p - ss;
  186|  11.0k|            if (len == 0)
  ------------------
  |  Branch (186:17): [True: 1.43k, False: 9.58k]
  ------------------
  187|  1.43k|                continue;
  188|   244k|            for (j = 0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++) {
  ------------------
  |  Branch (188:25): [True: 240k, False: 4.41k]
  ------------------
  189|   240k|                ent = sk_BY_DIR_ENTRY_value(ctx->dirs, j);
  190|   240k|                if (strlen(ent->dir) == len && strncmp(ent->dir, ss, len) == 0)
  ------------------
  |  Branch (190:21): [True: 12.6k, False: 227k]
  |  Branch (190:48): [True: 5.16k, False: 7.44k]
  ------------------
  191|  5.16k|                    break;
  192|   240k|            }
  193|  9.58k|            if (j < sk_BY_DIR_ENTRY_num(ctx->dirs))
  ------------------
  |  Branch (193:17): [True: 5.16k, False: 4.41k]
  ------------------
  194|  5.16k|                continue;
  195|  4.41k|            if (ctx->dirs == NULL) {
  ------------------
  |  Branch (195:17): [True: 1.68k, False: 2.73k]
  ------------------
  196|  1.68k|                ctx->dirs = sk_BY_DIR_ENTRY_new_null();
  197|  1.68k|                if (!ctx->dirs) {
  ------------------
  |  Branch (197:21): [True: 0, False: 1.68k]
  ------------------
  198|      0|                    ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  199|      0|                    return 0;
  200|      0|                }
  201|  1.68k|            }
  202|  4.41k|            ent = OPENSSL_malloc(sizeof(*ent));
  ------------------
  |  |  106|  4.41k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  203|  4.41k|            if (ent == NULL)
  ------------------
  |  Branch (203:17): [True: 0, False: 4.41k]
  ------------------
  204|      0|                return 0;
  205|  4.41k|            ent->dir_type = type;
  206|  4.41k|            ent->hashes = sk_BY_DIR_HASH_new(by_dir_hash_cmp);
  207|  4.41k|            ent->dir = OPENSSL_strndup(ss, len);
  ------------------
  |  |  137|  4.41k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|  4.41k|            if (ent->dir == NULL || ent->hashes == NULL) {
  ------------------
  |  Branch (208:17): [True: 0, False: 4.41k]
  |  Branch (208:37): [True: 0, False: 4.41k]
  ------------------
  209|      0|                by_dir_entry_free(ent);
  210|      0|                return 0;
  211|      0|            }
  212|  4.41k|            if (!sk_BY_DIR_ENTRY_push(ctx->dirs, ent)) {
  ------------------
  |  Branch (212:17): [True: 0, False: 4.41k]
  ------------------
  213|      0|                by_dir_entry_free(ent);
  214|      0|                ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  215|      0|                return 0;
  216|      0|            }
  217|  4.41k|        }
  218|   196k|    } while (*p++ != '\0');
  ------------------
  |  Branch (218:14): [True: 193k, False: 2.98k]
  ------------------
  219|  2.98k|    return 1;
  220|  2.98k|}

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

ossl_policy_cache_free:
  178|   871k|{
  179|   871k|    if (!cache)
  ------------------
  |  Branch (179:9): [True: 871k, False: 0]
  ------------------
  180|   871k|        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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|      0|}

OSSL_STACK_OF_X509_free:
   26|  65.2k|{
   27|  65.2k|    sk_X509_pop_free(certs, X509_free);
  ------------------
  |  |   96|  65.2k|#define sk_X509_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_sk_type(sk), ossl_check_X509_freefunc_type(freefunc))
  ------------------
   28|  65.2k|}

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

X509V3_EXT_get_nid:
   53|  1.24M|{
   54|  1.24M|    X509V3_EXT_METHOD tmp;
   55|  1.24M|    const X509V3_EXT_METHOD *t = &tmp, *const * ret;
   56|  1.24M|    int idx;
   57|       |
   58|  1.24M|    if (nid < 0)
  ------------------
  |  Branch (58:9): [True: 0, False: 1.24M]
  ------------------
   59|      0|        return NULL;
   60|  1.24M|    tmp.ext_nid = nid;
   61|  1.24M|    ret = OBJ_bsearch_ext(&t, standard_exts, STANDARD_EXTENSION_COUNT);
  ------------------
  |  |   99|  1.24M|#define STANDARD_EXTENSION_COUNT OSSL_NELEM(standard_exts)
  |  |  ------------------
  |  |  |  |   14|  1.24M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
   62|  1.24M|    if (ret)
  ------------------
  |  Branch (62:9): [True: 1.24M, False: 0]
  ------------------
   63|  1.24M|        return *ret;
   64|      0|    if (!ext_list)
  ------------------
  |  Branch (64:9): [True: 0, False: 0]
  ------------------
   65|      0|        return NULL;
   66|       |    /* Ideally, this would be done under a lock */
   67|      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))
  ------------------
   68|      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))
  ------------------
   69|       |    /* A failure to locate the item is handled by the value method */
   70|      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)))
  ------------------
   71|      0|}
X509V3_EXT_get:
   74|  1.24M|{
   75|  1.24M|    int nid;
   76|  1.24M|    if ((nid = OBJ_obj2nid(X509_EXTENSION_get_object(ext))) == NID_undef)
  ------------------
  |  |   18|  1.24M|#define NID_undef                       0
  ------------------
  |  Branch (76:9): [True: 0, False: 1.24M]
  ------------------
   77|      0|        return NULL;
   78|  1.24M|    return X509V3_EXT_get_nid(nid);
   79|  1.24M|}
X509V3_EXT_d2i:
  135|  1.24M|{
  136|  1.24M|    const X509V3_EXT_METHOD *method;
  137|  1.24M|    const unsigned char *p;
  138|  1.24M|    ASN1_STRING *extvalue;
  139|  1.24M|    int extlen;
  140|       |
  141|  1.24M|    if ((method = X509V3_EXT_get(ext)) == NULL)
  ------------------
  |  Branch (141:9): [True: 0, False: 1.24M]
  ------------------
  142|      0|        return NULL;
  143|  1.24M|    extvalue = X509_EXTENSION_get_data(ext);
  144|  1.24M|    p = ASN1_STRING_get0_data(extvalue);
  145|  1.24M|    extlen = ASN1_STRING_length(extvalue);
  146|  1.24M|    if (method->it)
  ------------------
  |  Branch (146:9): [True: 1.24M, False: 0]
  ------------------
  147|  1.24M|        return ASN1_item_d2i(NULL, &p, extlen, ASN1_ITEM_ptr(method->it));
  ------------------
  |  |  428|  1.24M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  148|      0|    return method->d2i(NULL, &p, extlen);
  149|  1.24M|}
X509V3_get_d2i:
  169|  4.54M|{
  170|  4.54M|    int lastpos, i;
  171|  4.54M|    X509_EXTENSION *ex, *found_ex = NULL;
  172|       |
  173|  4.54M|    if (!x) {
  ------------------
  |  Branch (173:9): [True: 0, False: 4.54M]
  ------------------
  174|      0|        if (idx)
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|            *idx = -1;
  176|      0|        if (crit)
  ------------------
  |  Branch (176:13): [True: 0, False: 0]
  ------------------
  177|      0|            *crit = -1;
  178|      0|        return NULL;
  179|      0|    }
  180|  4.54M|    if (idx)
  ------------------
  |  Branch (180:9): [True: 0, False: 4.54M]
  ------------------
  181|      0|        lastpos = *idx + 1;
  182|  4.54M|    else
  183|  4.54M|        lastpos = 0;
  184|  4.54M|    if (lastpos < 0)
  ------------------
  |  Branch (184:9): [True: 0, False: 4.54M]
  ------------------
  185|      0|        lastpos = 0;
  186|  20.1M|    for (i = lastpos; i < sk_X509_EXTENSION_num(x); i++) {
  ------------------
  |  |  242|  20.1M|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
  |  Branch (186:23): [True: 15.6M, False: 4.54M]
  ------------------
  187|  15.6M|        ex = sk_X509_EXTENSION_value(x, i);
  ------------------
  |  |  243|  15.6M|#define sk_X509_EXTENSION_value(sk, idx) ((X509_EXTENSION *)OPENSSL_sk_value(ossl_check_const_X509_EXTENSION_sk_type(sk), (idx)))
  ------------------
  188|  15.6M|        if (OBJ_obj2nid(X509_EXTENSION_get_object(ex)) == nid) {
  ------------------
  |  Branch (188:13): [True: 1.24M, False: 14.3M]
  ------------------
  189|  1.24M|            if (idx) {
  ------------------
  |  Branch (189:17): [True: 0, False: 1.24M]
  ------------------
  190|      0|                *idx = i;
  191|      0|                found_ex = ex;
  192|      0|                break;
  193|  1.24M|            } else if (found_ex) {
  ------------------
  |  Branch (193:24): [True: 0, False: 1.24M]
  ------------------
  194|       |                /* Found more than one */
  195|      0|                if (crit)
  ------------------
  |  Branch (195:21): [True: 0, False: 0]
  ------------------
  196|      0|                    *crit = -2;
  197|      0|                return NULL;
  198|      0|            }
  199|  1.24M|            found_ex = ex;
  200|  1.24M|        }
  201|  15.6M|    }
  202|  4.54M|    if (found_ex) {
  ------------------
  |  Branch (202:9): [True: 1.24M, False: 3.29M]
  ------------------
  203|       |        /* Found it */
  204|  1.24M|        if (crit)
  ------------------
  |  Branch (204:13): [True: 1.24M, False: 0]
  ------------------
  205|  1.24M|            *crit = X509_EXTENSION_get_critical(found_ex);
  206|  1.24M|        return X509V3_EXT_d2i(found_ex);
  207|  1.24M|    }
  208|       |
  209|       |    /* Extension not found */
  210|  3.29M|    if (idx)
  ------------------
  |  Branch (210:9): [True: 0, False: 3.29M]
  ------------------
  211|      0|        *idx = -1;
  212|  3.29M|    if (crit)
  ------------------
  |  Branch (212:9): [True: 3.29M, False: 0]
  ------------------
  213|  3.29M|        *crit = -1;
  214|       |    return NULL;
  215|  4.54M|}
v3_lib.c:ext_cmp:
   41|  6.28M|{
   42|  6.28M|    return ((*a)->ext_nid - (*b)->ext_nid);
   43|  6.28M|}

X509_check_purpose:
   89|   378k|{
   90|   378k|    int idx;
   91|   378k|    const X509_PURPOSE *pt;
   92|       |
   93|   378k|    if (!ossl_x509v3_cache_extensions(x))
  ------------------
  |  Branch (93:9): [True: 0, False: 378k]
  ------------------
   94|      0|        return -1;
   95|   378k|    if (id == -1)
  ------------------
  |  Branch (95:9): [True: 378k, False: 0]
  ------------------
   96|   378k|        return 1;
   97|       |
   98|      0|    idx = X509_PURPOSE_get_by_id(id);
   99|      0|    if (idx == -1)
  ------------------
  |  Branch (99:9): [True: 0, False: 0]
  ------------------
  100|      0|        return -1;
  101|      0|    pt = X509_PURPOSE_get0(idx);
  102|      0|    return pt->check_purpose(pt, x, non_leaf);
  103|      0|}
X509_supported_extension:
  310|   720k|{
  311|       |    /*
  312|       |     * This table is a list of the NIDs of supported extensions: that is
  313|       |     * those which are used by the verify process. If an extension is
  314|       |     * critical and doesn't appear in this list then the verify process will
  315|       |     * normally reject the certificate. The list must be kept in numerical
  316|       |     * order because it will be searched using bsearch.
  317|       |     */
  318|   720k|    static const int supported_nids[] = {
  319|   720k|        NID_netscape_cert_type, /* 71 */
  ------------------
  |  | 2945|   720k|#define NID_netscape_cert_type          71
  ------------------
  320|   720k|        NID_key_usage, /* 83 */
  ------------------
  |  | 2685|   720k|#define NID_key_usage           83
  ------------------
  321|   720k|        NID_subject_alt_name, /* 85 */
  ------------------
  |  | 2695|   720k|#define NID_subject_alt_name            85
  ------------------
  322|   720k|        NID_basic_constraints, /* 87 */
  ------------------
  |  | 2705|   720k|#define NID_basic_constraints           87
  ------------------
  323|   720k|        NID_certificate_policies, /* 89 */
  ------------------
  |  | 2750|   720k|#define NID_certificate_policies                89
  ------------------
  324|   720k|        NID_crl_distribution_points, /* 103 */
  ------------------
  |  | 2745|   720k|#define NID_crl_distribution_points             103
  ------------------
  325|   720k|        NID_ext_key_usage, /* 126 */
  ------------------
  |  | 2775|   720k|#define NID_ext_key_usage               126
  ------------------
  326|   720k|#ifndef OPENSSL_NO_RFC3779
  327|   720k|        NID_sbgp_ipAddrBlock, /* 290 */
  ------------------
  |  | 1626|   720k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  328|   720k|        NID_sbgp_autonomousSysNum, /* 291 */
  ------------------
  |  | 1630|   720k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  329|   720k|#endif
  330|   720k|        NID_id_pkix_OCSP_noCheck, /* 369 */
  ------------------
  |  | 2224|   720k|#define NID_id_pkix_OCSP_noCheck                369
  ------------------
  331|   720k|        NID_policy_constraints, /* 401 */
  ------------------
  |  | 2770|   720k|#define NID_policy_constraints          401
  ------------------
  332|   720k|        NID_proxyCertInfo, /* 663 */
  ------------------
  |  | 1648|   720k|#define NID_proxyCertInfo               663
  ------------------
  333|   720k|        NID_name_constraints, /* 666 */
  ------------------
  |  | 2740|   720k|#define NID_name_constraints            666
  ------------------
  334|   720k|        NID_policy_mappings, /* 747 */
  ------------------
  |  | 2760|   720k|#define NID_policy_mappings             747
  ------------------
  335|   720k|        NID_inhibit_any_policy /* 748 */
  ------------------
  |  | 2830|   720k|#define NID_inhibit_any_policy          748
  ------------------
  336|   720k|    };
  337|       |
  338|   720k|    int ex_nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  339|       |
  340|   720k|    if (ex_nid == NID_undef)
  ------------------
  |  |   18|   720k|#define NID_undef                       0
  ------------------
  |  Branch (340:9): [True: 0, False: 720k]
  ------------------
  341|      0|        return 0;
  342|       |
  343|   720k|    if (OBJ_bsearch_nid(&ex_nid, supported_nids, OSSL_NELEM(supported_nids)))
  ------------------
  |  |   14|   720k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (343:9): [True: 720k, False: 0]
  ------------------
  344|   720k|        return 1;
  345|      0|    return 0;
  346|   720k|}
ossl_x509v3_cache_extensions:
  441|   378k|{
  442|   378k|    BASIC_CONSTRAINTS *bs;
  443|   378k|    PROXY_CERT_INFO_EXTENSION *pci;
  444|   378k|    ASN1_BIT_STRING *usage;
  445|   378k|    ASN1_BIT_STRING *ns;
  446|   378k|    EXTENDED_KEY_USAGE *extusage;
  447|   378k|    int i;
  448|   378k|    int res;
  449|       |
  450|   378k|#ifdef tsan_ld_acq
  451|       |    /* Fast lock-free check, see end of the function for details. */
  452|   378k|    if (tsan_ld_acq((TSAN_QUALIFIER int *)&x->ex_cached))
  ------------------
  |  |   64|   378k|#define tsan_ld_acq(ptr) atomic_load_explicit((ptr), memory_order_acquire)
  |  |  ------------------
  |  |  |  Branch (64:26): [True: 0, False: 378k]
  |  |  ------------------
  ------------------
  453|      0|        return (x->ex_flags & EXFLAG_INVALID) == 0;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  454|   378k|#endif
  455|       |
  456|   378k|    if (!CRYPTO_THREAD_write_lock(x->lock))
  ------------------
  |  Branch (456:9): [True: 0, False: 378k]
  ------------------
  457|      0|        return 0;
  458|   378k|    if ((x->ex_flags & EXFLAG_SET) != 0) { /* Cert has already been processed */
  ------------------
  |  |  678|   378k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (458:9): [True: 0, False: 378k]
  ------------------
  459|      0|        CRYPTO_THREAD_unlock(x->lock);
  460|      0|        return (x->ex_flags & EXFLAG_INVALID) == 0;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  461|      0|    }
  462|       |
  463|   378k|    ERR_set_mark();
  464|       |
  465|       |    /* Cache the SHA1 digest of the cert */
  466|   378k|    if (!X509_digest(x, EVP_sha1(), x->sha1_hash, NULL))
  ------------------
  |  Branch (466:9): [True: 0, False: 378k]
  ------------------
  467|      0|        x->ex_flags |= EXFLAG_NO_FINGERPRINT;
  ------------------
  |  |  690|      0|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  468|       |
  469|       |    /* V1 should mean no extensions ... */
  470|   378k|    if (X509_get_version(x) == X509_VERSION_1)
  ------------------
  |  |  845|   378k|#define X509_VERSION_1 0
  ------------------
  |  Branch (470:9): [True: 0, False: 378k]
  ------------------
  471|      0|        x->ex_flags |= EXFLAG_V1;
  ------------------
  |  |  675|      0|#define EXFLAG_V1 0x40
  ------------------
  472|       |
  473|       |    /* Handle basic constraints */
  474|   378k|    x->ex_pathlen = -1;
  475|   378k|    if ((bs = X509_get_ext_d2i(x, NID_basic_constraints, &i, NULL)) != NULL) {
  ------------------
  |  | 2705|   378k|#define NID_basic_constraints           87
  ------------------
  |  Branch (475:9): [True: 378k, False: 0]
  ------------------
  476|   378k|        if (bs->ca)
  ------------------
  |  Branch (476:13): [True: 378k, False: 0]
  ------------------
  477|   378k|            x->ex_flags |= EXFLAG_CA;
  ------------------
  |  |  673|   378k|#define EXFLAG_CA 0x10
  ------------------
  478|   378k|        if (bs->pathlen != NULL) {
  ------------------
  |  Branch (478:13): [True: 7.77k, False: 370k]
  ------------------
  479|       |            /*
  480|       |             * The error case !bs->ca is checked by check_chain()
  481|       |             * in case ctx->param->flags & X509_V_FLAG_X509_STRICT
  482|       |             */
  483|  7.77k|            if (bs->pathlen->type == V_ASN1_NEG_INTEGER) {
  ------------------
  |  |  100|  7.77k|#define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
  |  |  ------------------
  |  |  |  |   99|  7.77k|#define V_ASN1_NEG 0x100
  |  |  ------------------
  ------------------
  |  Branch (483:17): [True: 0, False: 7.77k]
  ------------------
  484|      0|                ERR_raise(ERR_LIB_X509V3, X509V3_R_NEGATIVE_PATHLEN);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  485|      0|                x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  486|  7.77k|            } else {
  487|  7.77k|                x->ex_pathlen = ASN1_INTEGER_get(bs->pathlen);
  488|  7.77k|            }
  489|  7.77k|        }
  490|   378k|        BASIC_CONSTRAINTS_free(bs);
  491|   378k|        x->ex_flags |= EXFLAG_BCONS;
  ------------------
  |  |  668|   378k|#define EXFLAG_BCONS 0x1
  ------------------
  492|   378k|    } else if (i != -1) {
  ------------------
  |  Branch (492:16): [True: 0, False: 0]
  ------------------
  493|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  494|      0|    }
  495|       |
  496|       |    /* Handle proxy certificates */
  497|   378k|    if ((pci = X509_get_ext_d2i(x, NID_proxyCertInfo, &i, NULL)) != NULL) {
  ------------------
  |  | 1648|   378k|#define NID_proxyCertInfo               663
  ------------------
  |  Branch (497:9): [True: 0, False: 378k]
  ------------------
  498|      0|        if ((x->ex_flags & EXFLAG_CA) != 0
  ------------------
  |  |  673|      0|#define EXFLAG_CA 0x10
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  ------------------
  499|      0|            || X509_get_ext_by_NID(x, NID_subject_alt_name, -1) >= 0
  ------------------
  |  | 2695|      0|#define NID_subject_alt_name            85
  ------------------
  |  Branch (499:16): [True: 0, False: 0]
  ------------------
  500|      0|            || X509_get_ext_by_NID(x, NID_issuer_alt_name, -1) >= 0) {
  ------------------
  |  | 2700|      0|#define NID_issuer_alt_name             86
  ------------------
  |  Branch (500:16): [True: 0, False: 0]
  ------------------
  501|      0|            x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  502|      0|        }
  503|      0|        if (pci->pcPathLengthConstraint != NULL)
  ------------------
  |  Branch (503:13): [True: 0, False: 0]
  ------------------
  504|      0|            x->ex_pcpathlen = ASN1_INTEGER_get(pci->pcPathLengthConstraint);
  505|      0|        else
  506|      0|            x->ex_pcpathlen = -1;
  507|      0|        PROXY_CERT_INFO_EXTENSION_free(pci);
  508|      0|        x->ex_flags |= EXFLAG_PROXY;
  ------------------
  |  |  680|      0|#define EXFLAG_PROXY 0x400
  ------------------
  509|   378k|    } else if (i != -1) {
  ------------------
  |  Branch (509:16): [True: 0, False: 378k]
  ------------------
  510|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  511|      0|    }
  512|       |
  513|       |    /* Handle (basic) key usage */
  514|   378k|    if ((usage = X509_get_ext_d2i(x, NID_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2685|   378k|#define NID_key_usage           83
  ------------------
  |  Branch (514:9): [True: 370k, False: 7.77k]
  ------------------
  515|   370k|        x->ex_kusage = 0;
  516|   370k|        if (usage->length > 0) {
  ------------------
  |  Branch (516:13): [True: 370k, False: 0]
  ------------------
  517|   370k|            x->ex_kusage = usage->data[0];
  518|   370k|            if (usage->length > 1)
  ------------------
  |  Branch (518:17): [True: 5.18k, False: 365k]
  ------------------
  519|  5.18k|                x->ex_kusage |= usage->data[1] << 8;
  520|   370k|        }
  521|   370k|        x->ex_flags |= EXFLAG_KUSAGE;
  ------------------
  |  |  669|   370k|#define EXFLAG_KUSAGE 0x2
  ------------------
  522|   370k|        ASN1_BIT_STRING_free(usage);
  523|       |        /* Check for empty key usage according to RFC 5280 section 4.2.1.3 */
  524|   370k|        if (x->ex_kusage == 0) {
  ------------------
  |  Branch (524:13): [True: 0, False: 370k]
  ------------------
  525|      0|            ERR_raise(ERR_LIB_X509V3, X509V3_R_EMPTY_KEY_USAGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  526|      0|            x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  527|      0|        }
  528|   370k|    } else if (i != -1) {
  ------------------
  |  Branch (528:16): [True: 0, False: 7.77k]
  ------------------
  529|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  530|      0|    }
  531|       |
  532|       |    /* Handle extended key usage */
  533|   378k|    x->ex_xkusage = 0;
  534|   378k|    if ((extusage = X509_get_ext_d2i(x, NID_ext_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2775|   378k|#define NID_ext_key_usage               126
  ------------------
  |  Branch (534:9): [True: 0, False: 378k]
  ------------------
  535|      0|        x->ex_flags |= EXFLAG_XKUSAGE;
  ------------------
  |  |  670|      0|#define EXFLAG_XKUSAGE 0x4
  ------------------
  536|      0|        for (i = 0; i < sk_ASN1_OBJECT_num(extusage); i++) {
  ------------------
  |  |  622|      0|#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
  ------------------
  |  Branch (536:21): [True: 0, False: 0]
  ------------------
  537|      0|            switch (OBJ_obj2nid(sk_ASN1_OBJECT_value(extusage, i))) {
  ------------------
  |  |  623|      0|#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
  ------------------
  538|      0|            case NID_server_auth:
  ------------------
  |  | 1680|      0|#define NID_server_auth         129
  ------------------
  |  Branch (538:13): [True: 0, False: 0]
  ------------------
  539|      0|                x->ex_xkusage |= XKU_SSL_SERVER;
  ------------------
  |  |  712|      0|#define XKU_SSL_SERVER 0x1
  ------------------
  540|      0|                break;
  541|      0|            case NID_client_auth:
  ------------------
  |  | 1685|      0|#define NID_client_auth         130
  ------------------
  |  Branch (541:13): [True: 0, False: 0]
  ------------------
  542|      0|                x->ex_xkusage |= XKU_SSL_CLIENT;
  ------------------
  |  |  713|      0|#define XKU_SSL_CLIENT 0x2
  ------------------
  543|      0|                break;
  544|      0|            case NID_email_protect:
  ------------------
  |  | 1695|      0|#define NID_email_protect               132
  ------------------
  |  Branch (544:13): [True: 0, False: 0]
  ------------------
  545|      0|                x->ex_xkusage |= XKU_SMIME;
  ------------------
  |  |  714|      0|#define XKU_SMIME 0x4
  ------------------
  546|      0|                break;
  547|      0|            case NID_code_sign:
  ------------------
  |  | 1690|      0|#define NID_code_sign           131
  ------------------
  |  Branch (547:13): [True: 0, False: 0]
  ------------------
  548|      0|                x->ex_xkusage |= XKU_CODE_SIGN;
  ------------------
  |  |  715|      0|#define XKU_CODE_SIGN 0x8
  ------------------
  549|      0|                break;
  550|      0|            case NID_ms_sgc:
  ------------------
  |  | 1379|      0|#define NID_ms_sgc              137
  ------------------
  |  Branch (550:13): [True: 0, False: 0]
  ------------------
  551|      0|            case NID_ns_sgc:
  ------------------
  |  | 2990|      0|#define NID_ns_sgc              139
  ------------------
  |  Branch (551:13): [True: 0, False: 0]
  ------------------
  552|      0|                x->ex_xkusage |= XKU_SGC;
  ------------------
  |  |  716|      0|#define XKU_SGC 0x10 /* Netscape or MS Server-Gated Crypto */
  ------------------
  553|      0|                break;
  554|      0|            case NID_OCSP_sign:
  ------------------
  |  | 1720|      0|#define NID_OCSP_sign           180
  ------------------
  |  Branch (554:13): [True: 0, False: 0]
  ------------------
  555|      0|                x->ex_xkusage |= XKU_OCSP_SIGN;
  ------------------
  |  |  717|      0|#define XKU_OCSP_SIGN 0x20
  ------------------
  556|      0|                break;
  557|      0|            case NID_time_stamp:
  ------------------
  |  | 1715|      0|#define NID_time_stamp          133
  ------------------
  |  Branch (557:13): [True: 0, False: 0]
  ------------------
  558|      0|                x->ex_xkusage |= XKU_TIMESTAMP;
  ------------------
  |  |  718|      0|#define XKU_TIMESTAMP 0x40
  ------------------
  559|      0|                break;
  560|      0|            case NID_dvcs:
  ------------------
  |  | 1725|      0|#define NID_dvcs                297
  ------------------
  |  Branch (560:13): [True: 0, False: 0]
  ------------------
  561|      0|                x->ex_xkusage |= XKU_DVCS;
  ------------------
  |  |  719|      0|#define XKU_DVCS 0x80
  ------------------
  562|      0|                break;
  563|      0|            case NID_anyExtendedKeyUsage:
  ------------------
  |  | 2925|      0|#define NID_anyExtendedKeyUsage         910
  ------------------
  |  Branch (563:13): [True: 0, False: 0]
  ------------------
  564|      0|                x->ex_xkusage |= XKU_ANYEKU;
  ------------------
  |  |  720|      0|#define XKU_ANYEKU 0x100
  ------------------
  565|      0|                break;
  566|      0|            default:
  ------------------
  |  Branch (566:13): [True: 0, False: 0]
  ------------------
  567|       |                /* Ignore unknown extended key usage */
  568|      0|                break;
  569|      0|            }
  570|      0|        }
  571|      0|        sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free);
  ------------------
  |  |  636|      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))
  ------------------
  572|   378k|    } else if (i != -1) {
  ------------------
  |  Branch (572:16): [True: 0, False: 378k]
  ------------------
  573|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  574|      0|    }
  575|       |
  576|       |    /* Handle legacy Netscape extension */
  577|   378k|    if ((ns = X509_get_ext_d2i(x, NID_netscape_cert_type, &i, NULL)) != NULL) {
  ------------------
  |  | 2945|   378k|#define NID_netscape_cert_type          71
  ------------------
  |  Branch (577:9): [True: 2.59k, False: 375k]
  ------------------
  578|  2.59k|        if (ns->length > 0)
  ------------------
  |  Branch (578:13): [True: 2.59k, False: 0]
  ------------------
  579|  2.59k|            x->ex_nscert = ns->data[0];
  580|      0|        else
  581|      0|            x->ex_nscert = 0;
  582|  2.59k|        x->ex_flags |= EXFLAG_NSCERT;
  ------------------
  |  |  671|  2.59k|#define EXFLAG_NSCERT 0x8
  ------------------
  583|  2.59k|        ASN1_BIT_STRING_free(ns);
  584|   375k|    } else if (i != -1) {
  ------------------
  |  Branch (584:16): [True: 0, False: 375k]
  ------------------
  585|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  586|      0|    }
  587|       |
  588|       |    /* Handle subject key identifier and issuer/authority key identifier */
  589|   378k|    x->skid = X509_get_ext_d2i(x, NID_subject_key_identifier, &i, NULL);
  ------------------
  |  | 2680|   378k|#define NID_subject_key_identifier              82
  ------------------
  590|   378k|    if (x->skid == NULL && i != -1)
  ------------------
  |  Branch (590:9): [True: 2.59k, False: 375k]
  |  Branch (590:28): [True: 0, False: 2.59k]
  ------------------
  591|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  592|       |
  593|   378k|    x->akid = X509_get_ext_d2i(x, NID_authority_key_identifier, &i, NULL);
  ------------------
  |  | 2765|   378k|#define NID_authority_key_identifier            90
  ------------------
  594|   378k|    if (x->akid == NULL && i != -1)
  ------------------
  |  Branch (594:9): [True: 295k, False: 82.9k]
  |  Branch (594:28): [True: 0, False: 295k]
  ------------------
  595|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  596|       |
  597|       |    /* Check if subject name matches issuer */
  598|   378k|    if (X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x)) == 0) {
  ------------------
  |  Branch (598:9): [True: 378k, False: 0]
  ------------------
  599|   378k|        x->ex_flags |= EXFLAG_SI; /* Cert is self-issued */
  ------------------
  |  |  674|   378k|#define EXFLAG_SI 0x20 /* self-issued, maybe not self-signed */
  ------------------
  600|   378k|        if (X509_check_akid(x, x->akid) == X509_V_OK /* SKID matches AKID */
  ------------------
  |  |  312|   756k|#define X509_V_OK 0
  ------------------
  |  Branch (600:13): [True: 378k, False: 0]
  ------------------
  601|   378k|            /* .. and the signature alg matches the PUBKEY alg: */
  602|   378k|            && check_sig_alg_match(X509_get0_pubkey(x), x) == X509_V_OK)
  ------------------
  |  |  312|   378k|#define X509_V_OK 0
  ------------------
  |  Branch (602:16): [True: 378k, False: 0]
  ------------------
  603|   378k|            x->ex_flags |= EXFLAG_SS; /* indicate self-signed */
  ------------------
  |  |  684|   378k|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  604|       |        /* This is very related to ossl_x509_likely_issued(x, x) == X509_V_OK */
  605|   378k|    }
  606|       |
  607|       |    /* Handle subject alternative names and various other extensions */
  608|   378k|    x->altname = X509_get_ext_d2i(x, NID_subject_alt_name, &i, NULL);
  ------------------
  |  | 2695|   378k|#define NID_subject_alt_name            85
  ------------------
  609|   378k|    if (x->altname == NULL && i != -1)
  ------------------
  |  Branch (609:9): [True: 370k, False: 7.77k]
  |  Branch (609:31): [True: 0, False: 370k]
  ------------------
  610|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  611|   378k|    x->nc = X509_get_ext_d2i(x, NID_name_constraints, &i, NULL);
  ------------------
  |  | 2740|   378k|#define NID_name_constraints            666
  ------------------
  612|   378k|    if (x->nc == NULL && i != -1)
  ------------------
  |  Branch (612:9): [True: 378k, False: 0]
  |  Branch (612:26): [True: 0, False: 378k]
  ------------------
  613|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  614|       |
  615|       |    /* Handle CRL distribution point entries */
  616|   378k|    res = setup_crldp(x);
  617|   378k|    if (res == 0)
  ------------------
  |  Branch (617:9): [True: 0, False: 378k]
  ------------------
  618|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  619|       |
  620|   378k|#ifndef OPENSSL_NO_RFC3779
  621|   378k|    x->rfc3779_addr = X509_get_ext_d2i(x, NID_sbgp_ipAddrBlock, &i, NULL);
  ------------------
  |  | 1626|   378k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  622|   378k|    if (x->rfc3779_addr == NULL && i != -1)
  ------------------
  |  Branch (622:9): [True: 378k, False: 0]
  |  Branch (622:36): [True: 0, False: 378k]
  ------------------
  623|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  624|   378k|    x->rfc3779_asid = X509_get_ext_d2i(x, NID_sbgp_autonomousSysNum, &i, NULL);
  ------------------
  |  | 1630|   378k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  625|   378k|    if (x->rfc3779_asid == NULL && i != -1)
  ------------------
  |  Branch (625:9): [True: 378k, False: 0]
  |  Branch (625:36): [True: 0, False: 378k]
  ------------------
  626|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  627|   378k|#endif
  628|  1.68M|    for (i = 0; i < X509_get_ext_count(x); i++) {
  ------------------
  |  Branch (628:17): [True: 1.30M, False: 378k]
  ------------------
  629|  1.30M|        X509_EXTENSION *ex = X509_get_ext(x, i);
  630|  1.30M|        int nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  631|       |
  632|  1.30M|        if (nid == NID_freshest_crl)
  ------------------
  |  | 2805|  1.30M|#define NID_freshest_crl                857
  ------------------
  |  Branch (632:13): [True: 0, False: 1.30M]
  ------------------
  633|      0|            x->ex_flags |= EXFLAG_FRESHEST;
  ------------------
  |  |  683|      0|#define EXFLAG_FRESHEST 0x1000
  ------------------
  634|  1.30M|        if (!X509_EXTENSION_get_critical(ex))
  ------------------
  |  Branch (634:13): [True: 583k, False: 720k]
  ------------------
  635|   583k|            continue;
  636|   720k|        if (!X509_supported_extension(ex)) {
  ------------------
  |  Branch (636:13): [True: 0, False: 720k]
  ------------------
  637|      0|            x->ex_flags |= EXFLAG_CRITICAL;
  ------------------
  |  |  679|      0|#define EXFLAG_CRITICAL 0x200
  ------------------
  638|      0|            break;
  639|      0|        }
  640|   720k|        switch (nid) {
  641|   370k|        case NID_basic_constraints:
  ------------------
  |  | 2705|   370k|#define NID_basic_constraints           87
  ------------------
  |  Branch (641:9): [True: 370k, False: 349k]
  ------------------
  642|   370k|            x->ex_flags |= EXFLAG_BCONS_CRITICAL;
  ------------------
  |  |  686|   370k|#define EXFLAG_BCONS_CRITICAL 0x10000
  ------------------
  643|   370k|            break;
  644|      0|        case NID_authority_key_identifier:
  ------------------
  |  | 2765|      0|#define NID_authority_key_identifier            90
  ------------------
  |  Branch (644:9): [True: 0, False: 720k]
  ------------------
  645|      0|            x->ex_flags |= EXFLAG_AKID_CRITICAL;
  ------------------
  |  |  687|      0|#define EXFLAG_AKID_CRITICAL 0x20000
  ------------------
  646|      0|            break;
  647|      0|        case NID_subject_key_identifier:
  ------------------
  |  | 2680|      0|#define NID_subject_key_identifier              82
  ------------------
  |  Branch (647:9): [True: 0, False: 720k]
  ------------------
  648|      0|            x->ex_flags |= EXFLAG_SKID_CRITICAL;
  ------------------
  |  |  688|      0|#define EXFLAG_SKID_CRITICAL 0x40000
  ------------------
  649|      0|            break;
  650|      0|        case NID_subject_alt_name:
  ------------------
  |  | 2695|      0|#define NID_subject_alt_name            85
  ------------------
  |  Branch (650:9): [True: 0, False: 720k]
  ------------------
  651|      0|            x->ex_flags |= EXFLAG_SAN_CRITICAL;
  ------------------
  |  |  689|      0|#define EXFLAG_SAN_CRITICAL 0x80000
  ------------------
  652|      0|            break;
  653|   349k|        default:
  ------------------
  |  Branch (653:9): [True: 349k, False: 370k]
  ------------------
  654|   349k|            break;
  655|   720k|        }
  656|   720k|    }
  657|       |
  658|       |    /* Set x->siginf, ignoring errors due to unsupported algos */
  659|   378k|    (void)ossl_x509_init_sig_info(x);
  660|       |
  661|   378k|    x->ex_flags |= EXFLAG_SET; /* Indicate that cert has been processed */
  ------------------
  |  |  678|   378k|#define EXFLAG_SET 0x100
  ------------------
  662|   378k|#ifdef tsan_st_rel
  663|   378k|    tsan_st_rel((TSAN_QUALIFIER int *)&x->ex_cached, 1);
  ------------------
  |  |   65|   378k|#define tsan_st_rel(ptr, val) atomic_store_explicit((ptr), (val), memory_order_release)
  ------------------
  664|       |    /*
  665|       |     * Above store triggers fast lock-free check in the beginning of the
  666|       |     * function. But one has to ensure that the structure is "stable", i.e.
  667|       |     * all stores are visible on all processors. Hence the release fence.
  668|       |     */
  669|   378k|#endif
  670|   378k|    ERR_pop_to_mark();
  671|       |
  672|   378k|    if ((x->ex_flags & EXFLAG_INVALID) == 0) {
  ------------------
  |  |  676|   378k|#define EXFLAG_INVALID 0x80
  ------------------
  |  Branch (672:9): [True: 378k, False: 0]
  ------------------
  673|   378k|        CRYPTO_THREAD_unlock(x->lock);
  674|   378k|        return 1;
  675|   378k|    }
  676|      0|    CRYPTO_THREAD_unlock(x->lock);
  677|       |    ERR_raise(ERR_LIB_X509V3, X509V3_R_INVALID_CERTIFICATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  678|      0|    return 0;
  679|   378k|}
X509_check_akid:
 1041|   378k|{
 1042|   378k|    if (akid == NULL)
  ------------------
  |  Branch (1042:9): [True: 295k, False: 82.9k]
  ------------------
 1043|   295k|        return X509_V_OK;
  ------------------
  |  |  312|   295k|#define X509_V_OK 0
  ------------------
 1044|       |
 1045|       |    /* Check key ids (if present) */
 1046|  82.9k|    if (akid->keyid && issuer->skid && ASN1_OCTET_STRING_cmp(akid->keyid, issuer->skid))
  ------------------
  |  Branch (1046:9): [True: 82.9k, False: 0]
  |  Branch (1046:24): [True: 82.9k, False: 0]
  |  Branch (1046:40): [True: 0, False: 82.9k]
  ------------------
 1047|      0|        return X509_V_ERR_AKID_SKID_MISMATCH;
  ------------------
  |  |  344|      0|#define X509_V_ERR_AKID_SKID_MISMATCH 30
  ------------------
 1048|       |    /* Check serial number */
 1049|  82.9k|    if (akid->serial && ASN1_INTEGER_cmp(X509_get0_serialNumber(issuer), akid->serial))
  ------------------
  |  Branch (1049:9): [True: 12.9k, False: 69.9k]
  |  Branch (1049:25): [True: 0, False: 12.9k]
  ------------------
 1050|      0|        return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
  ------------------
  |  |  345|      0|#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31
  ------------------
 1051|       |    /* Check issuer name */
 1052|  82.9k|    if (akid->issuer) {
  ------------------
  |  Branch (1052:9): [True: 12.9k, False: 69.9k]
  ------------------
 1053|       |        /*
 1054|       |         * Ugh, for some peculiar reason AKID includes SEQUENCE OF
 1055|       |         * GeneralName. So look for a DirName. There may be more than one but
 1056|       |         * we only take any notice of the first.
 1057|       |         */
 1058|  12.9k|        GENERAL_NAMES *gens = akid->issuer;
 1059|  12.9k|        GENERAL_NAME *gen;
 1060|  12.9k|        X509_NAME *nm = NULL;
 1061|  12.9k|        int i;
 1062|       |
 1063|  12.9k|        for (i = 0; i < sk_GENERAL_NAME_num(gens); i++) {
  ------------------
  |  |  242|  12.9k|#define sk_GENERAL_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAME_sk_type(sk))
  ------------------
  |  Branch (1063:21): [True: 12.9k, False: 0]
  ------------------
 1064|  12.9k|            gen = sk_GENERAL_NAME_value(gens, i);
  ------------------
  |  |  243|  12.9k|#define sk_GENERAL_NAME_value(sk, idx) ((GENERAL_NAME *)OPENSSL_sk_value(ossl_check_const_GENERAL_NAME_sk_type(sk), (idx)))
  ------------------
 1065|  12.9k|            if (gen->type == GEN_DIRNAME) {
  ------------------
  |  |  180|  12.9k|#define GEN_DIRNAME 4
  ------------------
  |  Branch (1065:17): [True: 12.9k, False: 0]
  ------------------
 1066|  12.9k|                nm = gen->d.dirn;
 1067|  12.9k|                break;
 1068|  12.9k|            }
 1069|  12.9k|        }
 1070|  12.9k|        if (nm != NULL && X509_NAME_cmp(nm, X509_get_issuer_name(issuer)) != 0)
  ------------------
  |  Branch (1070:13): [True: 12.9k, False: 0]
  |  Branch (1070:27): [True: 0, False: 12.9k]
  ------------------
 1071|      0|            return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
  ------------------
  |  |  345|      0|#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31
  ------------------
 1072|  12.9k|    }
 1073|  82.9k|    return X509_V_OK;
  ------------------
  |  |  312|  82.9k|#define X509_V_OK 0
  ------------------
 1074|  82.9k|}
v3_purp.c:nid_cmp:
  302|  1.79M|{
  303|  1.79M|    return *a - *b;
  304|  1.79M|}
v3_purp.c:check_sig_alg_match:
  410|   378k|{
  411|   378k|    int subj_sig_nid;
  412|       |
  413|   378k|    if (issuer_key == NULL)
  ------------------
  |  Branch (413:9): [True: 0, False: 378k]
  ------------------
  414|      0|        return X509_V_ERR_NO_ISSUER_PUBLIC_KEY;
  ------------------
  |  |  336|      0|#define X509_V_ERR_NO_ISSUER_PUBLIC_KEY 24
  ------------------
  415|   378k|    if (OBJ_find_sigid_algs(OBJ_obj2nid(subject->cert_info.signature.algorithm),
  ------------------
  |  Branch (415:9): [True: 0, False: 378k]
  ------------------
  416|   378k|            NULL, &subj_sig_nid)
  417|   378k|        == 0)
  418|      0|        return X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM;
  ------------------
  |  |  402|      0|#define X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM 76
  ------------------
  419|   378k|    if (EVP_PKEY_is_a(issuer_key, OBJ_nid2sn(subj_sig_nid))
  ------------------
  |  Branch (419:9): [True: 378k, False: 0]
  ------------------
  420|      0|        || (EVP_PKEY_is_a(issuer_key, "RSA") && subj_sig_nid == NID_rsassaPss))
  ------------------
  |  |  583|      0|#define NID_rsassaPss           912
  ------------------
  |  Branch (420:13): [True: 0, False: 0]
  |  Branch (420:49): [True: 0, False: 0]
  ------------------
  421|   378k|        return X509_V_OK;
  ------------------
  |  |  312|   378k|#define X509_V_OK 0
  ------------------
  422|      0|    return X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH;
  ------------------
  |  |  403|      0|#define X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH 77
  ------------------
  423|   378k|}
v3_purp.c:setup_crldp:
  392|   378k|{
  393|   378k|    int i;
  394|       |
  395|   378k|    x->crldp = X509_get_ext_d2i(x, NID_crl_distribution_points, &i, NULL);
  ------------------
  |  | 2745|   378k|#define NID_crl_distribution_points             103
  ------------------
  396|   378k|    if (x->crldp == NULL && i != -1)
  ------------------
  |  Branch (396:9): [True: 349k, False: 28.5k]
  |  Branch (396:29): [True: 0, False: 349k]
  ------------------
  397|      0|        return 0;
  398|       |
  399|   422k|    for (i = 0; i < sk_DIST_POINT_num(x->crldp); i++) {
  ------------------
  |  |  339|   422k|#define sk_DIST_POINT_num(sk) OPENSSL_sk_num(ossl_check_const_DIST_POINT_sk_type(sk))
  ------------------
  |  Branch (399:17): [True: 44.0k, False: 378k]
  ------------------
  400|  44.0k|        int res = setup_dp(x, sk_DIST_POINT_value(x->crldp, i));
  ------------------
  |  |  340|  44.0k|#define sk_DIST_POINT_value(sk, idx) ((DIST_POINT *)OPENSSL_sk_value(ossl_check_const_DIST_POINT_sk_type(sk), (idx)))
  ------------------
  401|       |
  402|  44.0k|        if (res < 1)
  ------------------
  |  Branch (402:13): [True: 0, False: 44.0k]
  ------------------
  403|      0|            return res;
  404|  44.0k|    }
  405|   378k|    return 1;
  406|   378k|}
v3_purp.c:setup_dp:
  350|  44.0k|{
  351|  44.0k|    const X509_NAME *iname = NULL;
  352|  44.0k|    int i;
  353|       |
  354|  44.0k|    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 (354:9): [True: 0, False: 44.0k]
  |  Branch (354:34): [True: 0, False: 0]
  ------------------
  355|      0|        ERR_raise(ERR_LIB_X509, X509_R_INVALID_DISTPOINT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  356|      0|        return 0;
  357|      0|    }
  358|  44.0k|    if (dp->reasons != NULL) {
  ------------------
  |  Branch (358:9): [True: 0, False: 44.0k]
  ------------------
  359|      0|        if (dp->reasons->length > 0)
  ------------------
  |  Branch (359:13): [True: 0, False: 0]
  ------------------
  360|      0|            dp->dp_reasons = dp->reasons->data[0];
  361|      0|        if (dp->reasons->length > 1)
  ------------------
  |  Branch (361:13): [True: 0, False: 0]
  ------------------
  362|      0|            dp->dp_reasons |= (dp->reasons->data[1] << 8);
  363|      0|        dp->dp_reasons &= CRLDP_ALL_REASONS;
  ------------------
  |  |  316|      0|#define CRLDP_ALL_REASONS 0x807f
  ------------------
  364|  44.0k|    } else {
  365|  44.0k|        dp->dp_reasons = CRLDP_ALL_REASONS;
  ------------------
  |  |  316|  44.0k|#define CRLDP_ALL_REASONS 0x807f
  ------------------
  366|  44.0k|    }
  367|  44.0k|    if (dp->distpoint == NULL || dp->distpoint->type != 1)
  ------------------
  |  Branch (367:9): [True: 0, False: 44.0k]
  |  Branch (367:34): [True: 44.0k, False: 0]
  ------------------
  368|  44.0k|        return 1;
  369|       |
  370|       |    /* Handle name fragment given by nameRelativeToCRLIssuer */
  371|       |    /*
  372|       |     * Note that the below way of determining iname is not really compliant
  373|       |     * with https://tools.ietf.org/html/rfc5280#section-4.2.1.13
  374|       |     * According to it, sk_GENERAL_NAME_num(dp->CRLissuer) MUST be <= 1
  375|       |     * and any CRLissuer could be of type different to GEN_DIRNAME.
  376|       |     */
  377|      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 (377:17): [True: 0, False: 0]
  ------------------
  378|      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)))
  ------------------
  379|       |
  380|      0|        if (gen->type == GEN_DIRNAME) {
  ------------------
  |  |  180|      0|#define GEN_DIRNAME 4
  ------------------
  |  Branch (380:13): [True: 0, False: 0]
  ------------------
  381|      0|            iname = gen->d.directoryName;
  382|      0|            break;
  383|      0|        }
  384|      0|    }
  385|      0|    if (iname == NULL)
  ------------------
  |  Branch (385:9): [True: 0, False: 0]
  ------------------
  386|      0|        iname = X509_get_issuer_name(x);
  387|      0|    return DIST_POINT_set_dpname(dp->distpoint, iname) ? 1 : -1;
  ------------------
  |  Branch (387:12): [True: 0, False: 0]
  ------------------
  388|  44.0k|}

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

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

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

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

X509_get_ext_count:
   79|  1.68M|{
   80|  1.68M|    return X509v3_get_ext_count(x->cert_info.extensions);
   81|  1.68M|}
X509_get_ext:
   99|  1.30M|{
  100|  1.30M|    return X509v3_get_ext(x->cert_info.extensions, loc);
  101|  1.30M|}
X509_get_ext_d2i:
  114|  4.54M|{
  115|  4.54M|    return X509V3_get_d2i(x->cert_info.extensions, nid, crit, idx);
  116|  4.54M|}

X509_LOOKUP_new:
   19|  3.50k|{
   20|  3.50k|    X509_LOOKUP *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  3.50k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   21|       |
   22|  3.50k|    if (ret == NULL)
  ------------------
  |  Branch (22:9): [True: 0, False: 3.50k]
  ------------------
   23|      0|        return NULL;
   24|       |
   25|  3.50k|    ret->method = method;
   26|  3.50k|    if (method->new_item != NULL && method->new_item(ret) == 0) {
  ------------------
  |  Branch (26:9): [True: 1.69k, False: 1.81k]
  |  Branch (26:37): [True: 0, False: 1.69k]
  ------------------
   27|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   28|      0|        return NULL;
   29|      0|    }
   30|  3.50k|    return ret;
   31|  3.50k|}
X509_LOOKUP_free:
   34|  3.50k|{
   35|  3.50k|    if (ctx == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 3.50k]
  ------------------
   36|      0|        return;
   37|  3.50k|    if ((ctx->method != NULL) && (ctx->method->free != NULL))
  ------------------
  |  Branch (37:9): [True: 3.50k, False: 0]
  |  Branch (37:34): [True: 1.69k, False: 1.81k]
  ------------------
   38|  1.69k|        (*ctx->method->free)(ctx);
   39|  3.50k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  3.50k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|  3.50k|}
X509_STORE_lock:
   43|   435k|{
   44|   435k|    return CRYPTO_THREAD_write_lock(xs->lock);
   45|   435k|}
X509_STORE_unlock:
   53|   435k|{
   54|   435k|    return CRYPTO_THREAD_unlock(xs->lock);
   55|   435k|}
X509_LOOKUP_shutdown:
   68|  3.50k|{
   69|  3.50k|    if (ctx->method == NULL)
  ------------------
  |  Branch (69:9): [True: 0, False: 3.50k]
  ------------------
   70|      0|        return 0;
   71|  3.50k|    if (ctx->method->shutdown != NULL)
  ------------------
  |  Branch (71:9): [True: 0, False: 3.50k]
  ------------------
   72|      0|        return ctx->method->shutdown(ctx);
   73|  3.50k|    else
   74|  3.50k|        return 1;
   75|  3.50k|}
X509_LOOKUP_ctrl_ex:
   79|  6.21k|{
   80|  6.21k|    if (ctx->method == NULL)
  ------------------
  |  Branch (80:9): [True: 0, False: 6.21k]
  ------------------
   81|      0|        return -1;
   82|  6.21k|    if (ctx->method->ctrl_ex != NULL)
  ------------------
  |  Branch (82:9): [True: 3.23k, False: 2.98k]
  ------------------
   83|  3.23k|        return ctx->method->ctrl_ex(ctx, cmd, argc, argl, ret, libctx, propq);
   84|  2.98k|    if (ctx->method->ctrl != NULL)
  ------------------
  |  Branch (84:9): [True: 2.98k, False: 0]
  ------------------
   85|  2.98k|        return ctx->method->ctrl(ctx, cmd, argc, argl, ret);
   86|      0|    return 1;
   87|  2.98k|}
X509_LOOKUP_ctrl:
   91|  2.98k|{
   92|  2.98k|    return X509_LOOKUP_ctrl_ex(ctx, cmd, argc, argl, ret, NULL, NULL);
   93|  2.98k|}
X509_STORE_new:
  183|  2.78k|{
  184|  2.78k|    X509_STORE *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.78k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  185|       |
  186|  2.78k|    if (ret == NULL)
  ------------------
  |  Branch (186:9): [True: 0, False: 2.78k]
  ------------------
  187|      0|        return NULL;
  188|  2.78k|    if ((ret->objs = sk_X509_OBJECT_new(x509_object_cmp)) == NULL) {
  ------------------
  |  |  103|  2.78k|#define sk_X509_OBJECT_new(cmp) ((STACK_OF(X509_OBJECT) *)OPENSSL_sk_new(ossl_check_X509_OBJECT_compfunc_type(cmp)))
  ------------------
  |  Branch (188:9): [True: 0, False: 2.78k]
  ------------------
  189|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  190|      0|        goto err;
  191|      0|    }
  192|  2.78k|    ret->cache = 1;
  193|  2.78k|    if ((ret->get_cert_methods = sk_X509_LOOKUP_new_null()) == NULL) {
  ------------------
  |  |   78|  2.78k|#define sk_X509_LOOKUP_new_null() ((STACK_OF(X509_LOOKUP) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (193:9): [True: 0, False: 2.78k]
  ------------------
  194|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  195|      0|        goto err;
  196|      0|    }
  197|       |
  198|  2.78k|    if ((ret->param = X509_VERIFY_PARAM_new()) == NULL) {
  ------------------
  |  Branch (198:9): [True: 0, False: 2.78k]
  ------------------
  199|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  200|      0|        goto err;
  201|      0|    }
  202|  2.78k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE, ret, &ret->ex_data)) {
  ------------------
  |  |  254|  2.78k|#define CRYPTO_EX_INDEX_X509_STORE 4
  ------------------
  |  Branch (202:9): [True: 0, False: 2.78k]
  ------------------
  203|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  204|      0|        goto err;
  205|      0|    }
  206|       |
  207|  2.78k|    ret->lock = CRYPTO_THREAD_lock_new();
  208|  2.78k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (208:9): [True: 0, False: 2.78k]
  ------------------
  209|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  210|      0|        goto err;
  211|      0|    }
  212|       |
  213|  2.78k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (213:9): [True: 0, False: 2.78k]
  ------------------
  214|      0|        goto err;
  215|  2.78k|    return ret;
  216|       |
  217|      0|err:
  218|      0|    X509_VERIFY_PARAM_free(ret->param);
  219|      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))
  ------------------
  220|      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))
  ------------------
  221|      0|    CRYPTO_THREAD_lock_free(ret->lock);
  222|      0|    OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  223|       |    return NULL;
  224|  2.78k|}
X509_STORE_free:
  227|  12.2k|{
  228|  12.2k|    int i;
  229|  12.2k|    STACK_OF(X509_LOOKUP) *sk;
  ------------------
  |  |   33|  12.2k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  230|  12.2k|    X509_LOOKUP *lu;
  231|       |
  232|  12.2k|    if (xs == NULL)
  ------------------
  |  Branch (232:9): [True: 9.48k, False: 2.78k]
  ------------------
  233|  9.48k|        return;
  234|  2.78k|    CRYPTO_DOWN_REF(&xs->references, &i);
  235|  2.78k|    REF_PRINT_COUNT("X509_STORE", i, xs);
  ------------------
  |  |  301|  2.78k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  2.78k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  2.78k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  2.78k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|  2.78k|    if (i > 0)
  ------------------
  |  Branch (236:9): [True: 0, False: 2.78k]
  ------------------
  237|      0|        return;
  238|  2.78k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  2.78k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.78k]
  |  |  ------------------
  ------------------
  239|       |
  240|  2.78k|    sk = xs->get_cert_methods;
  241|  6.29k|    for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
  ------------------
  |  |   75|  6.29k|#define sk_X509_LOOKUP_num(sk) OPENSSL_sk_num(ossl_check_const_X509_LOOKUP_sk_type(sk))
  ------------------
  |  Branch (241:17): [True: 3.50k, False: 2.78k]
  ------------------
  242|  3.50k|        lu = sk_X509_LOOKUP_value(sk, i);
  ------------------
  |  |   76|  3.50k|#define sk_X509_LOOKUP_value(sk, idx) ((X509_LOOKUP *)OPENSSL_sk_value(ossl_check_const_X509_LOOKUP_sk_type(sk), (idx)))
  ------------------
  243|  3.50k|        X509_LOOKUP_shutdown(lu);
  244|  3.50k|        X509_LOOKUP_free(lu);
  245|  3.50k|    }
  246|  2.78k|    sk_X509_LOOKUP_free(sk);
  ------------------
  |  |   81|  2.78k|#define sk_X509_LOOKUP_free(sk) OPENSSL_sk_free(ossl_check_X509_LOOKUP_sk_type(sk))
  ------------------
  247|  2.78k|    sk_X509_OBJECT_pop_free(xs->objs, X509_OBJECT_free);
  ------------------
  |  |  115|  2.78k|#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))
  ------------------
  248|       |
  249|  2.78k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, xs, &xs->ex_data);
  ------------------
  |  |  254|  2.78k|#define CRYPTO_EX_INDEX_X509_STORE 4
  ------------------
  250|  2.78k|    X509_VERIFY_PARAM_free(xs->param);
  251|  2.78k|    CRYPTO_THREAD_lock_free(xs->lock);
  252|  2.78k|    CRYPTO_FREE_REF(&xs->references);
  253|  2.78k|    OPENSSL_free(xs);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  254|  2.78k|}
X509_STORE_add_lookup:
  269|  8.91k|{
  270|  8.91k|    int i;
  271|  8.91k|    STACK_OF(X509_LOOKUP) *sk;
  ------------------
  |  |   33|  8.91k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  272|  8.91k|    X509_LOOKUP *lu;
  273|       |
  274|  8.91k|    sk = xs->get_cert_methods;
  275|  11.9k|    for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
  ------------------
  |  |   75|  11.9k|#define sk_X509_LOOKUP_num(sk) OPENSSL_sk_num(ossl_check_const_X509_LOOKUP_sk_type(sk))
  ------------------
  |  Branch (275:17): [True: 8.39k, False: 3.50k]
  ------------------
  276|  8.39k|        lu = sk_X509_LOOKUP_value(sk, i);
  ------------------
  |  |   76|  8.39k|#define sk_X509_LOOKUP_value(sk, idx) ((X509_LOOKUP *)OPENSSL_sk_value(ossl_check_const_X509_LOOKUP_sk_type(sk), (idx)))
  ------------------
  277|  8.39k|        if (m == lu->method) {
  ------------------
  |  Branch (277:13): [True: 5.41k, False: 2.98k]
  ------------------
  278|  5.41k|            return lu;
  279|  5.41k|        }
  280|  8.39k|    }
  281|       |    /* a new one */
  282|  3.50k|    lu = X509_LOOKUP_new(m);
  283|  3.50k|    if (lu == NULL) {
  ------------------
  |  Branch (283:9): [True: 0, False: 3.50k]
  ------------------
  284|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|        return NULL;
  286|      0|    }
  287|       |
  288|  3.50k|    lu->store_ctx = xs;
  289|  3.50k|    if (sk_X509_LOOKUP_push(xs->get_cert_methods, lu))
  ------------------
  |  |   85|  3.50k|#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: 3.50k, False: 0]
  |  |  ------------------
  ------------------
  290|  3.50k|        return lu;
  291|       |    /* sk_X509_LOOKUP_push() failed */
  292|  3.50k|    ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  293|      0|    X509_LOOKUP_free(lu);
  294|       |    return NULL;
  295|  3.50k|}
X509_STORE_add_cert:
  430|   435k|{
  431|   435k|    if (!x509_store_add(xs, x, 0)) {
  ------------------
  |  Branch (431:9): [True: 0, False: 435k]
  ------------------
  432|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  433|      0|        return 0;
  434|      0|    }
  435|   435k|    return 1;
  436|   435k|}
X509_OBJECT_up_ref_count:
  448|   435k|{
  449|   435k|    switch (a->type) {
  ------------------
  |  Branch (449:13): [True: 435k, False: 0]
  ------------------
  450|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (450:5): [True: 0, False: 435k]
  ------------------
  451|      0|        break;
  452|   435k|    case X509_LU_X509:
  ------------------
  |  Branch (452:5): [True: 435k, False: 0]
  ------------------
  453|   435k|        return X509_up_ref(a->data.x509);
  454|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (454:5): [True: 0, False: 435k]
  ------------------
  455|      0|        return X509_CRL_up_ref(a->data.crl);
  456|   435k|    }
  457|      0|    return 1;
  458|   435k|}
X509_OBJECT_new:
  480|   435k|{
  481|   435k|    X509_OBJECT *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  482|       |
  483|   435k|    if (ret == NULL)
  ------------------
  |  Branch (483:9): [True: 0, False: 435k]
  ------------------
  484|      0|        return NULL;
  485|   435k|    ret->type = X509_LU_NONE;
  486|   435k|    return ret;
  487|   435k|}
X509_OBJECT_free:
  528|   435k|{
  529|   435k|    x509_object_free_internal(a);
  530|   435k|    OPENSSL_free(a);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  531|   435k|}
X509_OBJECT_retrieve_match:
  751|   435k|{
  752|   435k|    int idx, i, num;
  753|   435k|    X509_OBJECT *obj;
  754|       |
  755|   435k|    idx = sk_X509_OBJECT_find(h, x);
  ------------------
  |  |  118|   435k|#define sk_X509_OBJECT_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  756|   435k|    if (idx < 0)
  ------------------
  |  Branch (756:9): [True: 246k, False: 189k]
  ------------------
  757|   246k|        return NULL;
  758|   189k|    if ((x->type != X509_LU_X509) && (x->type != X509_LU_CRL))
  ------------------
  |  Branch (758:9): [True: 0, False: 189k]
  |  Branch (758:38): [True: 0, False: 0]
  ------------------
  759|      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)))
  ------------------
  760|   189k|    for (i = idx, num = sk_X509_OBJECT_num(h); i < num; i++) {
  ------------------
  |  |  101|   189k|#define sk_X509_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_X509_OBJECT_sk_type(sk))
  ------------------
  |  Branch (760:48): [True: 189k, False: 0]
  ------------------
  761|   189k|        obj = sk_X509_OBJECT_value(h, i);
  ------------------
  |  |  102|   189k|#define sk_X509_OBJECT_value(sk, idx) ((X509_OBJECT *)OPENSSL_sk_value(ossl_check_const_X509_OBJECT_sk_type(sk), (idx)))
  ------------------
  762|   189k|        if (x509_object_cmp((const X509_OBJECT **)&obj,
  ------------------
  |  Branch (762:13): [True: 0, False: 189k]
  ------------------
  763|   189k|                (const X509_OBJECT **)&x))
  764|      0|            return NULL;
  765|   189k|        if (x->type == X509_LU_X509) {
  ------------------
  |  Branch (765:13): [True: 189k, False: 0]
  ------------------
  766|   189k|            if (!X509_cmp(obj->data.x509, x->data.x509))
  ------------------
  |  Branch (766:17): [True: 189k, False: 0]
  ------------------
  767|   189k|                return obj;
  768|   189k|        } else if (x->type == X509_LU_CRL) {
  ------------------
  |  Branch (768:20): [True: 0, False: 0]
  ------------------
  769|      0|            if (X509_CRL_match(obj->data.crl, x->data.crl) == 0)
  ------------------
  |  Branch (769:17): [True: 0, False: 0]
  ------------------
  770|      0|                return obj;
  771|      0|        } else {
  772|      0|            return obj;
  773|      0|        }
  774|   189k|    }
  775|      0|    return NULL;
  776|   189k|}
X509_STORE_set_flags:
  779|    284|{
  780|    284|    return X509_VERIFY_PARAM_set_flags(xs->param, flags);
  781|    284|}
x509_lu.c:x509_object_cmp:
  162|  31.9M|{
  163|  31.9M|    int ret;
  164|       |
  165|  31.9M|    ret = ((*a)->type - (*b)->type);
  166|  31.9M|    if (ret)
  ------------------
  |  Branch (166:9): [True: 0, False: 31.9M]
  ------------------
  167|      0|        return ret;
  168|  31.9M|    switch ((*a)->type) {
  ------------------
  |  Branch (168:13): [True: 31.9M, False: 0]
  ------------------
  169|  31.9M|    case X509_LU_X509:
  ------------------
  |  Branch (169:5): [True: 31.9M, False: 0]
  ------------------
  170|  31.9M|        ret = X509_subject_name_cmp((*a)->data.x509, (*b)->data.x509);
  171|  31.9M|        break;
  172|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (172:5): [True: 0, False: 31.9M]
  ------------------
  173|      0|        ret = X509_CRL_cmp((*a)->data.crl, (*b)->data.crl);
  174|      0|        break;
  175|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (175:5): [True: 0, False: 31.9M]
  ------------------
  176|       |        /* abort(); */
  177|      0|        return 0;
  178|  31.9M|    }
  179|  31.9M|    return ret;
  180|  31.9M|}
x509_lu.c:x509_store_add:
  387|   435k|{
  388|   435k|    X509_OBJECT *obj;
  389|   435k|    int ret = 0, added = 0;
  390|       |
  391|   435k|    if (x == NULL)
  ------------------
  |  Branch (391:9): [True: 0, False: 435k]
  ------------------
  392|      0|        return 0;
  393|   435k|    obj = X509_OBJECT_new();
  394|   435k|    if (obj == NULL)
  ------------------
  |  Branch (394:9): [True: 0, False: 435k]
  ------------------
  395|      0|        return 0;
  396|       |
  397|   435k|    if (crl) {
  ------------------
  |  Branch (397:9): [True: 0, False: 435k]
  ------------------
  398|      0|        obj->type = X509_LU_CRL;
  399|      0|        obj->data.crl = (X509_CRL *)x;
  400|   435k|    } else {
  401|   435k|        obj->type = X509_LU_X509;
  402|   435k|        obj->data.x509 = (X509 *)x;
  403|   435k|    }
  404|   435k|    if (!X509_OBJECT_up_ref_count(obj)) {
  ------------------
  |  Branch (404:9): [True: 0, False: 435k]
  ------------------
  405|      0|        obj->type = X509_LU_NONE;
  406|      0|        X509_OBJECT_free(obj);
  407|      0|        return 0;
  408|      0|    }
  409|       |
  410|   435k|    if (!X509_STORE_lock(store)) {
  ------------------
  |  Branch (410:9): [True: 0, False: 435k]
  ------------------
  411|      0|        X509_OBJECT_free(obj);
  412|      0|        return 0;
  413|      0|    }
  414|       |
  415|   435k|    if (X509_OBJECT_retrieve_match(store->objs, obj)) {
  ------------------
  |  Branch (415:9): [True: 189k, False: 246k]
  ------------------
  416|   189k|        ret = 1;
  417|   246k|    } else {
  418|   246k|        added = sk_X509_OBJECT_push(store->objs, obj);
  ------------------
  |  |  111|   246k|#define sk_X509_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  419|   246k|        ret = added != 0;
  420|   246k|    }
  421|   435k|    X509_STORE_unlock(store);
  422|       |
  423|   435k|    if (added == 0) /* obj not pushed */
  ------------------
  |  Branch (423:9): [True: 189k, False: 246k]
  ------------------
  424|   189k|        X509_OBJECT_free(obj);
  425|       |
  426|   435k|    return ret;
  427|   435k|}
x509_lu.c:x509_object_free_internal:
  490|   435k|{
  491|   435k|    if (a == NULL)
  ------------------
  |  Branch (491:9): [True: 0, False: 435k]
  ------------------
  492|      0|        return;
  493|   435k|    switch (a->type) {
  ------------------
  |  Branch (493:13): [True: 435k, False: 0]
  ------------------
  494|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (494:5): [True: 0, False: 435k]
  ------------------
  495|      0|        break;
  496|   435k|    case X509_LU_X509:
  ------------------
  |  Branch (496:5): [True: 435k, False: 0]
  ------------------
  497|   435k|        X509_free(a->data.x509);
  498|   435k|        break;
  499|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (499:5): [True: 0, False: 435k]
  ------------------
  500|      0|        X509_CRL_free(a->data.crl);
  501|      0|        break;
  502|   435k|    }
  503|   435k|}

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

X509v3_get_ext_count:
   21|  1.68M|{
   22|  1.68M|    int ret;
   23|       |
   24|  1.68M|    if (x == NULL)
  ------------------
  |  Branch (24:9): [True: 0, False: 1.68M]
  ------------------
   25|      0|        return 0;
   26|  1.68M|    ret = sk_X509_EXTENSION_num(x);
  ------------------
  |  |  242|  1.68M|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
   27|  1.68M|    return ret > 0 ? ret : 0;
  ------------------
  |  Branch (27:12): [True: 1.68M, False: 0]
  ------------------
   28|  1.68M|}
X509v3_get_ext:
   84|  1.30M|{
   85|  1.30M|    if (x == NULL || sk_X509_EXTENSION_num(x) <= loc || loc < 0)
  ------------------
  |  |  242|  1.30M|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
  |  Branch (85:9): [True: 0, False: 1.30M]
  |  Branch (85:22): [True: 0, False: 1.30M]
  |  Branch (85:57): [True: 0, False: 1.30M]
  ------------------
   86|      0|        return NULL;
   87|  1.30M|    else
   88|  1.30M|        return sk_X509_EXTENSION_value(x, loc);
  ------------------
  |  |  243|  1.30M|#define sk_X509_EXTENSION_value(sk, idx) ((X509_EXTENSION *)OPENSSL_sk_value(ossl_check_const_X509_EXTENSION_sk_type(sk), (idx)))
  ------------------
   89|  1.30M|}
X509_EXTENSION_get_object:
  253|  18.9M|{
  254|  18.9M|    if (ex == NULL)
  ------------------
  |  Branch (254:9): [True: 0, False: 18.9M]
  ------------------
  255|      0|        return NULL;
  256|  18.9M|    return ex->object;
  257|  18.9M|}
X509_EXTENSION_get_data:
  260|  1.24M|{
  261|  1.24M|    if (ex == NULL)
  ------------------
  |  Branch (261:9): [True: 0, False: 1.24M]
  ------------------
  262|      0|        return NULL;
  263|  1.24M|    return &ex->value;
  264|  1.24M|}
X509_EXTENSION_get_critical:
  267|  2.55M|{
  268|  2.55M|    if (ex == NULL)
  ------------------
  |  Branch (268:9): [True: 0, False: 2.55M]
  ------------------
  269|      0|        return 0;
  270|  2.55M|    if (ex->critical > 0)
  ------------------
  |  Branch (270:9): [True: 1.44M, False: 1.10M]
  ------------------
  271|  1.44M|        return 1;
  272|  1.10M|    return 0;
  273|  2.55M|}

X509_VERIFY_PARAM_new:
   82|  7.44k|{
   83|  7.44k|    X509_VERIFY_PARAM *param;
   84|       |
   85|  7.44k|    param = OPENSSL_zalloc(sizeof(*param));
  ------------------
  |  |  108|  7.44k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   86|  7.44k|    if (param == NULL)
  ------------------
  |  Branch (86:9): [True: 0, False: 7.44k]
  ------------------
   87|      0|        return NULL;
   88|  7.44k|    param->trust = X509_TRUST_DEFAULT;
  ------------------
  |  |  195|  7.44k|#define X509_TRUST_DEFAULT 0 /* Only valid in purpose settings */
  ------------------
   89|       |    /* param->inh_flags = X509_VP_FLAG_DEFAULT; */
   90|  7.44k|    param->depth = -1;
   91|  7.44k|    param->auth_level = -1; /* -1 means unset, 0 is explicit */
   92|  7.44k|    return param;
   93|  7.44k|}
X509_VERIFY_PARAM_free:
   96|  7.52k|{
   97|  7.52k|    if (param == NULL)
  ------------------
  |  Branch (97:9): [True: 79, False: 7.44k]
  ------------------
   98|     79|        return;
   99|  7.44k|    sk_ASN1_OBJECT_pop_free(param->policies, ASN1_OBJECT_free);
  ------------------
  |  |  636|  7.44k|#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))
  ------------------
  100|  7.44k|    sk_OPENSSL_STRING_pop_free(param->hosts, str_free);
  ------------------
  |  |  246|  7.44k|#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))
  ------------------
  101|  7.44k|    OPENSSL_free(param->peername);
  ------------------
  |  |  131|  7.44k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  102|  7.44k|    OPENSSL_free(param->email);
  ------------------
  |  |  131|  7.44k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|  7.44k|    OPENSSL_free(param->ip);
  ------------------
  |  |  131|  7.44k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  104|  7.44k|    OPENSSL_free(param);
  ------------------
  |  |  131|  7.44k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  105|  7.44k|}
X509_VERIFY_PARAM_inherit:
  152|  1.95k|{
  153|  1.95k|    unsigned long inh_flags;
  154|  1.95k|    int to_default, to_overwrite;
  155|       |
  156|  1.95k|    if (src == NULL)
  ------------------
  |  Branch (156:9): [True: 0, False: 1.95k]
  ------------------
  157|      0|        return 1;
  158|  1.95k|    inh_flags = dest->inh_flags | src->inh_flags;
  159|       |
  160|  1.95k|    if ((inh_flags & X509_VP_FLAG_ONCE) != 0)
  ------------------
  |  |  493|  1.95k|#define X509_VP_FLAG_ONCE 0x10
  ------------------
  |  Branch (160:9): [True: 0, False: 1.95k]
  ------------------
  161|      0|        dest->inh_flags = 0;
  162|       |
  163|  1.95k|    if ((inh_flags & X509_VP_FLAG_LOCKED) != 0)
  ------------------
  |  |  492|  1.95k|#define X509_VP_FLAG_LOCKED 0x8
  ------------------
  |  Branch (163:9): [True: 0, False: 1.95k]
  ------------------
  164|      0|        return 1;
  165|       |
  166|  1.95k|    to_default = (inh_flags & X509_VP_FLAG_DEFAULT) != 0;
  ------------------
  |  |  489|  1.95k|#define X509_VP_FLAG_DEFAULT 0x1
  ------------------
  167|  1.95k|    to_overwrite = (inh_flags & X509_VP_FLAG_OVERWRITE) != 0;
  ------------------
  |  |  490|  1.95k|#define X509_VP_FLAG_OVERWRITE 0x2
  ------------------
  168|       |
  169|  1.95k|    x509_verify_param_copy(purpose, 0);
  ------------------
  |  |  147|  1.95k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.95k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.95k|        dest->field = src->field;
  ------------------
  170|  1.95k|    x509_verify_param_copy(trust, X509_TRUST_DEFAULT);
  ------------------
  |  |  147|  1.95k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.95k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.95k|        dest->field = src->field;
  ------------------
  171|  1.95k|    x509_verify_param_copy(depth, -1);
  ------------------
  |  |  147|  1.95k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.95k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.95k|        dest->field = src->field;
  ------------------
  172|  1.95k|    x509_verify_param_copy(auth_level, -1);
  ------------------
  |  |  147|  1.95k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.95k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.95k|        dest->field = src->field;
  ------------------
  173|       |
  174|       |    /* If overwrite or check time not set, copy across */
  175|       |
  176|  1.95k|    if (to_overwrite || (dest->flags & X509_V_FLAG_USE_CHECK_TIME) == 0) {
  ------------------
  |  |  438|  1.95k|#define X509_V_FLAG_USE_CHECK_TIME 0x2
  ------------------
  |  Branch (176:9): [True: 0, False: 1.95k]
  |  Branch (176:25): [True: 1.95k, False: 0]
  ------------------
  177|  1.95k|        dest->check_time = src->check_time;
  178|  1.95k|        dest->flags &= ~X509_V_FLAG_USE_CHECK_TIME;
  ------------------
  |  |  438|  1.95k|#define X509_V_FLAG_USE_CHECK_TIME 0x2
  ------------------
  179|       |        /* Don't need to copy flag: that is done below */
  180|  1.95k|    }
  181|       |
  182|  1.95k|    if ((inh_flags & X509_VP_FLAG_RESET_FLAGS) != 0)
  ------------------
  |  |  491|  1.95k|#define X509_VP_FLAG_RESET_FLAGS 0x4
  ------------------
  |  Branch (182:9): [True: 0, False: 1.95k]
  ------------------
  183|      0|        dest->flags = 0;
  184|       |
  185|  1.95k|    dest->flags |= src->flags;
  186|       |
  187|  1.95k|    if (test_x509_verify_param_copy(policies, NULL)) {
  ------------------
  |  |  142|  1.95k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (142:6): [True: 0, False: 1.95k]
  |  |  |  Branch (142:23): [True: 0, False: 1.95k]
  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  188|      0|        if (!X509_VERIFY_PARAM_set1_policies(dest, src->policies))
  ------------------
  |  Branch (188:13): [True: 0, False: 0]
  ------------------
  189|      0|            return 0;
  190|      0|    }
  191|       |
  192|  1.95k|    x509_verify_param_copy(hostflags, 0);
  ------------------
  |  |  147|  1.95k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.95k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.95k|        dest->field = src->field;
  ------------------
  193|       |
  194|  1.95k|    if (test_x509_verify_param_copy(hosts, NULL)) {
  ------------------
  |  |  142|  1.95k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (142:6): [True: 0, False: 1.95k]
  |  |  |  Branch (142:23): [True: 0, False: 1.95k]
  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  195|      0|        sk_OPENSSL_STRING_pop_free(dest->hosts, str_free);
  ------------------
  |  |  246|      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))
  ------------------
  196|      0|        dest->hosts = NULL;
  197|      0|        if (src->hosts != NULL) {
  ------------------
  |  Branch (197:13): [True: 0, False: 0]
  ------------------
  198|      0|            dest->hosts = sk_OPENSSL_STRING_deep_copy(src->hosts, str_copy, str_free);
  ------------------
  |  |  255|      0|#define sk_OPENSSL_STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_copyfunc_type(copyfunc), ossl_check_OPENSSL_STRING_freefunc_type(freefunc)))
  ------------------
  199|      0|            if (dest->hosts == NULL)
  ------------------
  |  Branch (199:17): [True: 0, False: 0]
  ------------------
  200|      0|                return 0;
  201|      0|        }
  202|      0|    }
  203|       |
  204|  1.95k|    if (test_x509_verify_param_copy(email, NULL)) {
  ------------------
  |  |  142|  1.95k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (142:6): [True: 0, False: 1.95k]
  |  |  |  Branch (142:23): [True: 0, False: 1.95k]
  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  205|      0|        if (!X509_VERIFY_PARAM_set1_email(dest, src->email, src->emaillen))
  ------------------
  |  Branch (205:13): [True: 0, False: 0]
  ------------------
  206|      0|            return 0;
  207|      0|    }
  208|       |
  209|  1.95k|    if (test_x509_verify_param_copy(ip, NULL)) {
  ------------------
  |  |  142|  1.95k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (142:6): [True: 0, False: 1.95k]
  |  |  |  Branch (142:23): [True: 0, False: 1.95k]
  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  210|      0|        if (!X509_VERIFY_PARAM_set1_ip(dest, src->ip, src->iplen))
  ------------------
  |  Branch (210:13): [True: 0, False: 0]
  ------------------
  211|      0|            return 0;
  212|      0|    }
  213|       |
  214|  1.95k|    return 1;
  215|  1.95k|}
X509_VERIFY_PARAM_set_flags:
  267|    284|{
  268|    284|    param->flags |= flags;
  269|    284|    if ((flags & X509_V_FLAG_POLICY_MASK) != 0)
  ------------------
  |  |  496|    284|#define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \
  |  |  ------------------
  |  |  |  |  450|    284|#define X509_V_FLAG_POLICY_CHECK 0x80
  |  |  ------------------
  |  |  497|    284|    | X509_V_FLAG_EXPLICIT_POLICY                         \
  |  |  ------------------
  |  |  |  |  452|    284|#define X509_V_FLAG_EXPLICIT_POLICY 0x100
  |  |  ------------------
  |  |  498|    284|    | X509_V_FLAG_INHIBIT_ANY                             \
  |  |  ------------------
  |  |  |  |  454|    284|#define X509_V_FLAG_INHIBIT_ANY 0x200
  |  |  ------------------
  |  |  499|    284|    | X509_V_FLAG_INHIBIT_MAP)
  |  |  ------------------
  |  |  |  |  456|    284|#define X509_V_FLAG_INHIBIT_MAP 0x400
  |  |  ------------------
  ------------------
  |  Branch (269:9): [True: 0, False: 284]
  ------------------
  270|      0|        param->flags |= X509_V_FLAG_POLICY_CHECK;
  ------------------
  |  |  450|      0|#define X509_V_FLAG_POLICY_CHECK 0x80
  ------------------
  271|    284|    return 1;
  272|    284|}
X509_VERIFY_PARAM_move_peername:
  423|  3.91k|{
  424|  3.91k|    char *peername = (from != NULL) ? from->peername : NULL;
  ------------------
  |  Branch (424:22): [True: 0, False: 3.91k]
  ------------------
  425|       |
  426|  3.91k|    if (to->peername != peername) {
  ------------------
  |  Branch (426:9): [True: 0, False: 3.91k]
  ------------------
  427|      0|        OPENSSL_free(to->peername);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  428|      0|        to->peername = peername;
  429|      0|    }
  430|  3.91k|    if (from != NULL)
  ------------------
  |  Branch (430:9): [True: 0, False: 3.91k]
  ------------------
  431|      0|        from->peername = NULL;
  432|  3.91k|}

X509_digest:
  500|   378k|{
  501|   378k|    if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  | 2342|   378k|#define SN_sha1         "SHA1"
  ------------------
                  if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  |  678|   378k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (501:9): [True: 378k, False: 0]
  |  Branch (501:37): [True: 0, False: 378k]
  ------------------
  502|      0|        && (cert->ex_flags & EXFLAG_NO_FINGERPRINT) == 0) {
  ------------------
  |  |  690|      0|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (502:12): [True: 0, False: 0]
  ------------------
  503|       |        /* Asking for SHA1 and we already computed it. */
  504|      0|        if (len != NULL)
  ------------------
  |  Branch (504:13): [True: 0, False: 0]
  ------------------
  505|      0|            *len = sizeof(cert->sha1_hash);
  506|      0|        memcpy(data, cert->sha1_hash, sizeof(cert->sha1_hash));
  507|      0|        return 1;
  508|      0|    }
  509|   378k|    return ossl_asn1_item_digest_ex(ASN1_ITEM_rptr(X509), md, (char *)cert,
  ------------------
  |  |  433|   378k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  510|   378k|        data, len, cert->libctx, cert->propq);
  511|   378k|}

x_name.c:x509_name_ex_new:
   91|  1.75M|{
   92|  1.75M|    X509_NAME *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  1.75M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|       |
   94|  1.75M|    if (ret == NULL)
  ------------------
  |  Branch (94:9): [True: 0, False: 1.75M]
  ------------------
   95|      0|        return 0;
   96|  1.75M|    if ((ret->entries = sk_X509_NAME_ENTRY_new_null()) == NULL) {
  ------------------
  |  |  212|  1.75M|#define sk_X509_NAME_ENTRY_new_null() ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (96:9): [True: 0, False: 1.75M]
  ------------------
   97|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|        goto err;
   99|      0|    }
  100|  1.75M|    if ((ret->bytes = BUF_MEM_new()) == NULL) {
  ------------------
  |  Branch (100:9): [True: 0, False: 1.75M]
  ------------------
  101|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  102|      0|        goto err;
  103|      0|    }
  104|  1.75M|    ret->modified = 1;
  105|  1.75M|    *val = (ASN1_VALUE *)ret;
  106|  1.75M|    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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|      0|    }
  113|      0|    return 0;
  114|  1.75M|}
x_name.c:x509_name_ex_free:
  117|  1.75M|{
  118|  1.75M|    X509_NAME *a;
  119|       |
  120|  1.75M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 1.75M]
  |  Branch (120:25): [True: 0, False: 1.75M]
  ------------------
  121|      0|        return;
  122|  1.75M|    a = (X509_NAME *)*pval;
  123|       |
  124|  1.75M|    BUF_MEM_free(a->bytes);
  125|  1.75M|    sk_X509_NAME_ENTRY_pop_free(a->entries, X509_NAME_ENTRY_free);
  ------------------
  |  |  223|  1.75M|#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|  1.75M|    OPENSSL_free(a->canon_enc);
  ------------------
  |  |  131|  1.75M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  127|  1.75M|    OPENSSL_free(a);
  ------------------
  |  |  131|  1.75M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  128|       |    *pval = NULL;
  129|  1.75M|}
x_name.c:x509_name_ex_d2i:
  145|   887k|{
  146|   887k|    const unsigned char *p = *in, *q;
  147|   887k|    union {
  148|   887k|        STACK_OF(STACK_OF_X509_NAME_ENTRY) *s;
  149|   887k|        ASN1_VALUE *a;
  150|   887k|    } intname = {
  151|   887k|        NULL
  152|   887k|    };
  153|   887k|    union {
  154|   887k|        X509_NAME *x;
  155|   887k|        ASN1_VALUE *a;
  156|   887k|    } nm = {
  157|   887k|        NULL
  158|   887k|    };
  159|   887k|    int i, j, ret;
  160|   887k|    STACK_OF(X509_NAME_ENTRY) *entries;
  ------------------
  |  |   33|   887k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  161|   887k|    X509_NAME_ENTRY *entry;
  162|       |
  163|   887k|    if (len > X509_NAME_MAX)
  ------------------
  |  |   24|   887k|#define X509_NAME_MAX (1024 * 1024)
  ------------------
  |  Branch (163:9): [True: 0, False: 887k]
  ------------------
  164|      0|        len = X509_NAME_MAX;
  ------------------
  |  |   24|      0|#define X509_NAME_MAX (1024 * 1024)
  ------------------
  165|   887k|    q = p;
  166|       |
  167|       |    /* Get internal representation of Name */
  168|   887k|    ret = ASN1_item_ex_d2i(&intname.a,
  169|   887k|        &p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL),
  ------------------
  |  |  433|   887k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  170|   887k|        tag, aclass, opt, ctx);
  171|       |
  172|   887k|    if (ret <= 0)
  ------------------
  |  Branch (172:9): [True: 0, False: 887k]
  ------------------
  173|      0|        return ret;
  174|       |
  175|   887k|    if (*val)
  ------------------
  |  Branch (175:9): [True: 871k, False: 15.5k]
  ------------------
  176|   871k|        x509_name_ex_free(val, NULL);
  177|   887k|    if (!x509_name_ex_new(&nm.a, NULL))
  ------------------
  |  Branch (177:9): [True: 0, False: 887k]
  ------------------
  178|      0|        goto err;
  179|       |    /* We've decoded it: now cache encoding */
  180|   887k|    if (!BUF_MEM_grow(nm.x->bytes, p - q))
  ------------------
  |  Branch (180:9): [True: 0, False: 887k]
  ------------------
  181|      0|        goto err;
  182|   887k|    memcpy(nm.x->bytes->data, q, p - q);
  183|       |
  184|       |    /* Convert internal representation to X509_NAME structure */
  185|  4.04M|    for (i = 0; i < sk_STACK_OF_X509_NAME_ENTRY_num(intname.s); i++) {
  ------------------
  |  Branch (185:17): [True: 3.16M, False: 887k]
  ------------------
  186|  3.16M|        entries = sk_STACK_OF_X509_NAME_ENTRY_value(intname.s, i);
  187|  6.32M|        for (j = 0; j < sk_X509_NAME_ENTRY_num(entries); j++) {
  ------------------
  |  |  209|  6.32M|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  |  Branch (187:21): [True: 3.16M, False: 3.16M]
  ------------------
  188|  3.16M|            entry = sk_X509_NAME_ENTRY_value(entries, j);
  ------------------
  |  |  210|  3.16M|#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.16M|            entry->set = i;
  190|  3.16M|            if (!sk_X509_NAME_ENTRY_push(nm.x->entries, entry))
  ------------------
  |  |  219|  3.16M|#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.16M]
  ------------------
  191|      0|                goto err;
  192|  3.16M|            (void)sk_X509_NAME_ENTRY_set(entries, j, NULL);
  ------------------
  |  |  225|  3.16M|#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.16M|        }
  194|  3.16M|    }
  195|   887k|    ret = x509_name_canon(nm.x);
  196|   887k|    if (!ret)
  ------------------
  |  Branch (196:9): [True: 0, False: 887k]
  ------------------
  197|      0|        goto err;
  198|   887k|    sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,
  199|   887k|        local_sk_X509_NAME_ENTRY_free);
  200|   887k|    nm.x->modified = 0;
  201|   887k|    *val = nm.a;
  202|   887k|    *in = p;
  203|   887k|    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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  211|      0|    return 0;
  212|   887k|}
x_name.c:x509_name_canon:
  312|   887k|{
  313|   887k|    unsigned char *p;
  314|   887k|    STACK_OF(STACK_OF_X509_NAME_ENTRY) *intname;
  ------------------
  |  |   33|   887k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  315|   887k|    STACK_OF(X509_NAME_ENTRY) *entries = NULL;
  ------------------
  |  |   33|   887k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  316|   887k|    X509_NAME_ENTRY *entry, *tmpentry = NULL;
  317|   887k|    int i, set = -1, ret = 0, len;
  318|       |
  319|   887k|    OPENSSL_free(a->canon_enc);
  ------------------
  |  |  131|   887k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  320|   887k|    a->canon_enc = NULL;
  321|       |    /* Special case: empty X509_NAME => null encoding */
  322|   887k|    if (sk_X509_NAME_ENTRY_num(a->entries) == 0) {
  ------------------
  |  |  209|   887k|#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: 887k]
  ------------------
  323|      0|        a->canon_enclen = 0;
  324|      0|        return 1;
  325|      0|    }
  326|   887k|    intname = sk_STACK_OF_X509_NAME_ENTRY_new_null();
  327|   887k|    if (intname == NULL) {
  ------------------
  |  Branch (327:9): [True: 0, False: 887k]
  ------------------
  328|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  329|      0|        goto err;
  330|      0|    }
  331|  4.04M|    for (i = 0; i < sk_X509_NAME_ENTRY_num(a->entries); i++) {
  ------------------
  |  |  209|  4.04M|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  |  Branch (331:17): [True: 3.16M, False: 887k]
  ------------------
  332|  3.16M|        entry = sk_X509_NAME_ENTRY_value(a->entries, i);
  ------------------
  |  |  210|  3.16M|#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.16M|        if (entry->set != set) {
  ------------------
  |  Branch (333:13): [True: 3.16M, False: 0]
  ------------------
  334|  3.16M|            entries = sk_X509_NAME_ENTRY_new_null();
  ------------------
  |  |  212|  3.16M|#define sk_X509_NAME_ENTRY_new_null() ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_new_null())
  ------------------
  335|  3.16M|            if (entries == NULL)
  ------------------
  |  Branch (335:17): [True: 0, False: 3.16M]
  ------------------
  336|      0|                goto err;
  337|  3.16M|            if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)) {
  ------------------
  |  Branch (337:17): [True: 0, False: 3.16M]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  340|      0|                goto err;
  341|      0|            }
  342|  3.16M|            set = entry->set;
  343|  3.16M|        }
  344|  3.16M|        tmpentry = X509_NAME_ENTRY_new();
  345|  3.16M|        if (tmpentry == NULL) {
  ------------------
  |  Branch (345:13): [True: 0, False: 3.16M]
  ------------------
  346|      0|            ERR_raise(ERR_LIB_X509, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  347|      0|            goto err;
  348|      0|        }
  349|  3.16M|        tmpentry->object = OBJ_dup(entry->object);
  350|  3.16M|        if (tmpentry->object == NULL) {
  ------------------
  |  Branch (350:13): [True: 0, False: 3.16M]
  ------------------
  351|      0|            ERR_raise(ERR_LIB_X509, ERR_R_OBJ_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  352|      0|            goto err;
  353|      0|        }
  354|  3.16M|        if (!asn1_string_canon(tmpentry->value, entry->value))
  ------------------
  |  Branch (354:13): [True: 0, False: 3.16M]
  ------------------
  355|      0|            goto err;
  356|  3.16M|        if (!sk_X509_NAME_ENTRY_push(entries, tmpentry)) {
  ------------------
  |  |  219|  3.16M|#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.16M]
  ------------------
  357|      0|            ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  358|      0|            goto err;
  359|      0|        }
  360|  3.16M|        tmpentry = NULL;
  361|  3.16M|    }
  362|       |
  363|       |    /* Finally generate encoding */
  364|   887k|    len = i2d_name_canon(intname, NULL);
  365|   887k|    if (len < 0)
  ------------------
  |  Branch (365:9): [True: 0, False: 887k]
  ------------------
  366|      0|        goto err;
  367|   887k|    a->canon_enclen = len;
  368|       |
  369|   887k|    p = OPENSSL_malloc(a->canon_enclen);
  ------------------
  |  |  106|   887k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|   887k|    if (p == NULL)
  ------------------
  |  Branch (370:9): [True: 0, False: 887k]
  ------------------
  371|      0|        goto err;
  372|       |
  373|   887k|    a->canon_enc = p;
  374|       |
  375|   887k|    i2d_name_canon(intname, &p);
  376|       |
  377|   887k|    ret = 1;
  378|       |
  379|   887k|err:
  380|   887k|    X509_NAME_ENTRY_free(tmpentry);
  381|   887k|    sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname,
  382|   887k|        local_sk_X509_NAME_ENTRY_pop_free);
  383|   887k|    return ret;
  384|   887k|}
x_name.c:asn1_string_canon:
  394|  3.16M|{
  395|  3.16M|    unsigned char *to, *from;
  396|  3.16M|    int len, i;
  397|       |
  398|       |    /* If type not in bitmask just copy string across */
  399|  3.16M|    if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON)) {
  ------------------
  |  |  389|  3.16M|    (B_ASN1_UTF8STRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING     \
  |  |  ------------------
  |  |  |  |  119|  3.16M|#define B_ASN1_UTF8STRING 0x2000
  |  |  ------------------
  |  |                   (B_ASN1_UTF8STRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING     \
  |  |  ------------------
  |  |  |  |  117|  3.16M|#define B_ASN1_BMPSTRING 0x0800
  |  |  ------------------
  |  |                   (B_ASN1_UTF8STRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING     \
  |  |  ------------------
  |  |  |  |  114|  3.16M|#define B_ASN1_UNIVERSALSTRING 0x0100
  |  |  ------------------
  |  |  390|  3.16M|        | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING \
  |  |  ------------------
  |  |  |  |  105|  3.16M|#define B_ASN1_PRINTABLESTRING 0x0002
  |  |  ------------------
  |  |                       | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING \
  |  |  ------------------
  |  |  |  |  106|  3.16M|#define B_ASN1_T61STRING 0x0004
  |  |  ------------------
  |  |                       | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING \
  |  |  ------------------
  |  |  |  |  109|  3.16M|#define B_ASN1_IA5STRING 0x0010
  |  |  ------------------
  |  |  391|  3.16M|        | B_ASN1_VISIBLESTRING)
  |  |  ------------------
  |  |  |  |  112|  3.16M|#define B_ASN1_VISIBLESTRING 0x0040
  |  |  ------------------
  ------------------
  |  Branch (399:9): [True: 0, False: 3.16M]
  ------------------
  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.16M|    out->type = V_ASN1_UTF8STRING;
  ------------------
  |  |   75|  3.16M|#define V_ASN1_UTF8STRING 12
  ------------------
  406|  3.16M|    out->length = ASN1_STRING_to_UTF8(&out->data, in);
  407|  3.16M|    if (out->length == -1)
  ------------------
  |  Branch (407:9): [True: 0, False: 3.16M]
  ------------------
  408|      0|        return 0;
  409|       |
  410|  3.16M|    to = out->data;
  411|  3.16M|    from = to;
  412|       |
  413|  3.16M|    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.16M|    while (len > 0 && ossl_isspace(*from)) {
  ------------------
  |  |   82|  3.16M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  3.16M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 3.16M]
  |  |  ------------------
  ------------------
  |  Branch (423:12): [True: 3.16M, False: 0]
  ------------------
  424|      0|        from++;
  425|      0|        len--;
  426|      0|    }
  427|       |
  428|  3.16M|    to = from + len;
  429|       |
  430|       |    /* Ignore trailing spaces */
  431|  3.16M|    while (len > 0 && ossl_isspace(to[-1])) {
  ------------------
  |  |   82|  3.16M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  3.16M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 3.16M]
  |  |  ------------------
  ------------------
  |  Branch (431:12): [True: 3.16M, False: 0]
  ------------------
  432|      0|        to--;
  433|      0|        len--;
  434|      0|    }
  435|       |
  436|  3.16M|    to = out->data;
  437|       |
  438|  3.16M|    i = 0;
  439|  53.7M|    while (i < len) {
  ------------------
  |  Branch (439:12): [True: 50.5M, False: 3.16M]
  ------------------
  440|       |        /* If not ASCII set just copy across */
  441|  50.5M|        if (!ossl_isascii(*from)) {
  ------------------
  |  |   75|  50.5M|#define ossl_isascii(c) (((c) & ~127) == 0)
  ------------------
  |  Branch (441:13): [True: 95.5k, False: 50.4M]
  ------------------
  442|  95.5k|            *to++ = *from++;
  443|  95.5k|            i++;
  444|  95.5k|        }
  445|       |        /* Collapse multiple spaces */
  446|  50.4M|        else if (ossl_isspace(*from)) {
  ------------------
  |  |   82|  50.4M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  50.4M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 4.89M, False: 45.5M]
  |  |  ------------------
  ------------------
  447|       |            /* Copy one space across */
  448|  4.89M|            *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|  4.89M|            do {
  455|  4.89M|                from++;
  456|  4.89M|                i++;
  457|  4.89M|            } while (ossl_isspace(*from));
  ------------------
  |  |   82|  4.89M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  4.89M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 4.89M]
  |  |  ------------------
  ------------------
  458|  45.5M|        } else {
  459|  45.5M|            *to++ = ossl_tolower(*from);
  460|  45.5M|            from++;
  461|  45.5M|            i++;
  462|  45.5M|        }
  463|  50.5M|    }
  464|       |
  465|  3.16M|    out->length = (int)(to - out->data);
  466|       |
  467|  3.16M|    return 1;
  468|  3.16M|}
x_name.c:i2d_name_canon:
  472|  1.77M|{
  473|  1.77M|    int i, len, ltmp;
  474|  1.77M|    const ASN1_VALUE *v;
  475|  1.77M|    STACK_OF(ASN1_VALUE) *intname = (STACK_OF(ASN1_VALUE) *)_intname;
  ------------------
  |  |   33|  1.77M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  476|       |
  477|  1.77M|    len = 0;
  478|  8.09M|    for (i = 0; i < sk_ASN1_VALUE_num(intname); i++) {
  ------------------
  |  |  887|  8.09M|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (478:17): [True: 6.32M, False: 1.77M]
  ------------------
  479|  6.32M|        v = sk_ASN1_VALUE_value(intname, i);
  ------------------
  |  |  888|  6.32M|#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
  ------------------
  480|  6.32M|        ltmp = ASN1_item_ex_i2d(&v, in,
  481|  6.32M|            ASN1_ITEM_rptr(X509_NAME_ENTRIES), -1, -1);
  ------------------
  |  |  433|  6.32M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  482|  6.32M|        if (ltmp < 0 || len > INT_MAX - ltmp)
  ------------------
  |  Branch (482:13): [True: 0, False: 6.32M]
  |  Branch (482:25): [True: 0, False: 6.32M]
  ------------------
  483|      0|            return -1;
  484|  6.32M|        len += ltmp;
  485|  6.32M|    }
  486|  1.77M|    return len;
  487|  1.77M|}
x_name.c:local_sk_X509_NAME_ENTRY_free:
  132|  3.16M|{
  133|  3.16M|    sk_X509_NAME_ENTRY_free(ne);
  ------------------
  |  |  215|  3.16M|#define sk_X509_NAME_ENTRY_free(sk) OPENSSL_sk_free(ossl_check_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  134|  3.16M|}
x_name.c:local_sk_X509_NAME_ENTRY_pop_free:
  137|  3.16M|{
  138|  3.16M|    sk_X509_NAME_ENTRY_pop_free(ne, X509_NAME_ENTRY_free);
  ------------------
  |  |  223|  3.16M|#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.16M|}

ossl_d2i_X509_PUBKEY_INTERNAL:
   70|   435k|{
   71|   435k|    X509_PUBKEY *xpub = OPENSSL_zalloc(sizeof(*xpub));
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|       |
   73|   435k|    if (xpub == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 435k]
  ------------------
   74|      0|        return NULL;
   75|   435k|    return (X509_PUBKEY *)ASN1_item_d2i_ex((ASN1_VALUE **)&xpub, pp, len,
   76|   435k|        ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  433|   435k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   77|   435k|        libctx, propq);
   78|   435k|}
ossl_X509_PUBKEY_INTERNAL_free:
   81|   871k|{
   82|   871k|    ASN1_item_free((ASN1_VALUE *)xpub, ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL));
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   83|   871k|}
X509_PUBKEY_get0:
  458|  1.19M|{
  459|  1.19M|    if (key == NULL) {
  ------------------
  |  Branch (459:9): [True: 0, False: 1.19M]
  ------------------
  460|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  461|      0|        return NULL;
  462|      0|    }
  463|       |
  464|  1.19M|    if (key->pkey == NULL) {
  ------------------
  |  Branch (464:9): [True: 0, False: 1.19M]
  ------------------
  465|       |        /* We failed to decode the key when we loaded it, or it was never set */
  466|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_DECODE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|      0|        return NULL;
  468|      0|    }
  469|       |
  470|  1.19M|    return key->pkey;
  471|  1.19M|}
X509_PUBKEY_get:
  474|   435k|{
  475|   435k|    EVP_PKEY *ret = X509_PUBKEY_get0(key);
  476|       |
  477|   435k|    if (ret != NULL && !EVP_PKEY_up_ref(ret)) {
  ------------------
  |  Branch (477:9): [True: 435k, False: 0]
  |  Branch (477:24): [True: 0, False: 435k]
  ------------------
  478|      0|        ERR_raise(ERR_LIB_X509, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  479|       |        ret = NULL;
  480|      0|    }
  481|   435k|    return ret;
  482|   435k|}
ossl_d2i_PUBKEY_legacy:
  537|   435k|{
  538|   435k|    return d2i_PUBKEY_int(a, pp, length, NULL, NULL, 1, d2i_X509_PUBKEY);
  539|   435k|}
d2i_RSA_PUBKEY:
  606|   316k|{
  607|   316k|    EVP_PKEY *pkey;
  608|   316k|    RSA *key = NULL;
  609|   316k|    const unsigned char *q;
  610|       |
  611|   316k|    q = *pp;
  612|   316k|    pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length);
  613|   316k|    if (pkey == NULL)
  ------------------
  |  Branch (613:9): [True: 0, False: 316k]
  ------------------
  614|      0|        return NULL;
  615|   316k|    key = EVP_PKEY_get1_RSA(pkey);
  616|   316k|    EVP_PKEY_free(pkey);
  617|   316k|    if (key == NULL)
  ------------------
  |  Branch (617:9): [True: 0, False: 316k]
  ------------------
  618|      0|        return NULL;
  619|   316k|    *pp = q;
  620|   316k|    if (a != NULL) {
  ------------------
  |  Branch (620:9): [True: 0, False: 316k]
  ------------------
  621|      0|        RSA_free(*a);
  622|      0|        *a = key;
  623|      0|    }
  624|   316k|    return key;
  625|   316k|}
d2i_EC_PUBKEY:
  797|   119k|{
  798|   119k|    EVP_PKEY *pkey;
  799|   119k|    EC_KEY *key = NULL;
  800|   119k|    const unsigned char *q;
  801|   119k|    int type;
  802|       |
  803|   119k|    q = *pp;
  804|   119k|    pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length);
  805|   119k|    if (pkey == NULL)
  ------------------
  |  Branch (805:9): [True: 0, False: 119k]
  ------------------
  806|      0|        return NULL;
  807|   119k|    type = EVP_PKEY_get_id(pkey);
  808|   119k|    if (type == EVP_PKEY_EC || type == EVP_PKEY_SM2)
  ------------------
  |  |   73|   119k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   238k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
                  if (type == EVP_PKEY_EC || type == EVP_PKEY_SM2)
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (808:9): [True: 119k, False: 0]
  |  Branch (808:32): [True: 0, False: 0]
  ------------------
  809|   119k|        key = EVP_PKEY_get1_EC_KEY(pkey);
  810|   119k|    EVP_PKEY_free(pkey);
  811|   119k|    if (key == NULL)
  ------------------
  |  Branch (811:9): [True: 0, False: 119k]
  ------------------
  812|      0|        return NULL;
  813|   119k|    *pp = q;
  814|   119k|    if (a != NULL) {
  ------------------
  |  Branch (814:9): [True: 0, False: 119k]
  ------------------
  815|      0|        EC_KEY_free(*a);
  816|      0|        *a = key;
  817|      0|    }
  818|   119k|    return key;
  819|   119k|}
X509_PUBKEY_get0_param:
 1031|   871k|{
 1032|   871k|    if (ppkalg)
  ------------------
  |  Branch (1032:9): [True: 0, False: 871k]
  ------------------
 1033|      0|        *ppkalg = pub->algor->algorithm;
 1034|   871k|    if (pk) {
  ------------------
  |  Branch (1034:9): [True: 435k, False: 435k]
  ------------------
 1035|   435k|        *pk = pub->public_key->data;
 1036|   435k|        *ppklen = pub->public_key->length;
 1037|   435k|    }
 1038|   871k|    if (pa)
  ------------------
  |  Branch (1038:9): [True: 871k, False: 0]
  ------------------
 1039|   871k|        *pa = pub->algor;
 1040|   871k|    return 1;
 1041|   871k|}
ossl_x509_PUBKEY_get0_libctx:
 1073|   119k|{
 1074|   119k|    if (plibctx)
  ------------------
  |  Branch (1074:9): [True: 119k, False: 0]
  ------------------
 1075|   119k|        *plibctx = key->libctx;
 1076|   119k|    if (ppropq)
  ------------------
  |  Branch (1076:9): [True: 119k, False: 0]
  ------------------
 1077|   119k|        *ppropq = key->propq;
 1078|   119k|    return 1;
 1079|   119k|}
x_pubkey.c:x509_pubkey_ex_new_ex:
  111|   435k|{
  112|   435k|    X509_PUBKEY *ret;
  113|       |
  114|   435k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (114:9): [True: 0, False: 435k]
  ------------------
  115|      0|        return 0;
  116|   435k|    if (!x509_pubkey_ex_populate((ASN1_VALUE **)&ret, NULL)
  ------------------
  |  Branch (116:9): [True: 0, False: 435k]
  ------------------
  117|   435k|        || !x509_pubkey_set0_libctx(ret, libctx, propq)) {
  ------------------
  |  Branch (117:12): [True: 0, False: 435k]
  ------------------
  118|      0|        x509_pubkey_ex_free((ASN1_VALUE **)&ret, NULL);
  119|      0|        ret = NULL;
  120|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  121|   435k|    } else {
  122|   435k|        *pval = (ASN1_VALUE *)ret;
  123|   435k|    }
  124|       |
  125|       |    return ret != NULL;
  126|   435k|}
x_pubkey.c:x509_pubkey_ex_populate:
  100|  1.30M|{
  101|  1.30M|    X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval;
  102|       |
  103|  1.30M|    return (pubkey->algor != NULL
  ------------------
  |  Branch (103:13): [True: 435k, False: 871k]
  ------------------
  104|   871k|               || (pubkey->algor = X509_ALGOR_new()) != NULL)
  ------------------
  |  Branch (104:19): [True: 871k, False: 0]
  ------------------
  105|  1.30M|        && (pubkey->public_key != NULL
  ------------------
  |  Branch (105:13): [True: 435k, False: 871k]
  ------------------
  106|   871k|            || (pubkey->public_key = ASN1_BIT_STRING_new()) != NULL);
  ------------------
  |  Branch (106:16): [True: 871k, False: 0]
  ------------------
  107|  1.30M|}
x_pubkey.c:x509_pubkey_ex_d2i_ex:
  133|   871k|{
  134|   871k|    const unsigned char *in_saved = *in;
  135|   871k|    size_t publen;
  136|   871k|    X509_PUBKEY *pubkey;
  137|   871k|    int ret;
  138|   871k|    OSSL_DECODER_CTX *dctx = NULL;
  139|   871k|    unsigned char *tmpbuf = NULL;
  140|       |
  141|   871k|    if (*pval == NULL && !x509_pubkey_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (141:9): [True: 0, False: 871k]
  |  Branch (141:26): [True: 0, False: 0]
  ------------------
  142|      0|        return 0;
  143|   871k|    if (!x509_pubkey_ex_populate(pval, NULL)) {
  ------------------
  |  Branch (143:9): [True: 0, False: 871k]
  ------------------
  144|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  145|      0|        return 0;
  146|      0|    }
  147|       |
  148|       |    /* This ensures that |*in| advances properly no matter what */
  149|   871k|    if ((ret = asn1_item_embed_d2i(pval, in, len,
  ------------------
  |  Branch (149:9): [True: 0, False: 871k]
  ------------------
  150|   871k|             ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  151|   871k|             tag, aclass, opt, ctx, 0,
  152|   871k|             NULL, NULL))
  153|   871k|        <= 0) {
  154|      0|        x509_pubkey_ex_free(pval, it);
  155|      0|        return ret;
  156|      0|    }
  157|       |
  158|   871k|    publen = *in - in_saved;
  159|   871k|    if (!ossl_assert(publen > 0)) {
  ------------------
  |  |   52|   871k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   871k|    __FILE__, __LINE__)
  ------------------
  |  Branch (159:9): [True: 0, False: 871k]
  ------------------
  160|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|        return 0;
  162|      0|    }
  163|       |
  164|   871k|    pubkey = (X509_PUBKEY *)*pval;
  165|   871k|    EVP_PKEY_free(pubkey->pkey);
  166|   871k|    pubkey->pkey = NULL;
  167|       |
  168|       |    /*
  169|       |     * Opportunistically decode the key but remove any non fatal errors
  170|       |     * from the queue. Subsequent explicit attempts to decode/use the key
  171|       |     * will return an appropriate error.
  172|       |     */
  173|   871k|    ERR_set_mark();
  174|       |
  175|       |    /*
  176|       |     * Try to decode with legacy method first.  This ensures that engines
  177|       |     * aren't overridden by providers.
  178|       |     */
  179|   871k|    if ((ret = x509_pubkey_decode(&pubkey->pkey, pubkey)) == -1) {
  ------------------
  |  Branch (179:9): [True: 0, False: 871k]
  ------------------
  180|       |        /* -1 indicates a fatal error, like malloc failure */
  181|      0|        ERR_clear_last_mark();
  182|      0|        goto end;
  183|      0|    }
  184|       |
  185|       |    /* Try to decode it into an EVP_PKEY with OSSL_DECODER */
  186|   871k|    if (ret <= 0 && !pubkey->flag_force_legacy) {
  ------------------
  |  Branch (186:9): [True: 435k, False: 435k]
  |  Branch (186:21): [True: 435k, False: 0]
  ------------------
  187|   435k|        const unsigned char *p;
  188|   435k|        char txtoidname[OSSL_MAX_NAME_SIZE];
  189|   435k|        size_t slen = publen;
  190|       |
  191|       |        /*
  192|       |         * The decoders don't know how to handle anything other than Universal
  193|       |         * class so we modify the data accordingly.
  194|       |         */
  195|   435k|        if (aclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|   435k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (195:13): [True: 0, False: 435k]
  ------------------
  196|      0|            tmpbuf = OPENSSL_memdup(in_saved, publen);
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  197|      0|            if (tmpbuf == NULL)
  ------------------
  |  Branch (197:17): [True: 0, False: 0]
  ------------------
  198|      0|                return 0;
  199|      0|            in_saved = tmpbuf;
  200|      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
  ------------------
  201|      0|        }
  202|   435k|        p = in_saved;
  203|       |
  204|   435k|        if (OBJ_obj2txt(txtoidname, sizeof(txtoidname),
  ------------------
  |  Branch (204:13): [True: 0, False: 435k]
  ------------------
  205|   435k|                pubkey->algor->algorithm, 0)
  206|   435k|            <= 0) {
  207|      0|            ERR_clear_last_mark();
  208|      0|            goto end;
  209|      0|        }
  210|   435k|        if ((dctx = OSSL_DECODER_CTX_new_for_pkey(&pubkey->pkey,
  ------------------
  |  Branch (210:13): [True: 435k, False: 0]
  ------------------
  211|   435k|                 "DER", "SubjectPublicKeyInfo",
  212|   435k|                 txtoidname, EVP_PKEY_PUBLIC_KEY,
  ------------------
  |  |  111|   435k|    (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  107|   435k|    (OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|   435k|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  642|   435k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  648|   435k|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  643|   435k|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|   435k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  213|   435k|                 pubkey->libctx,
  214|   435k|                 pubkey->propq))
  215|   435k|            != NULL)
  216|       |            /*
  217|       |             * As said higher up, we're being opportunistic.  In other words,
  218|       |             * we don't care if we fail.
  219|       |             */
  220|   435k|            if (OSSL_DECODER_from_data(dctx, &p, &slen)) {
  ------------------
  |  Branch (220:17): [True: 435k, False: 0]
  ------------------
  221|   435k|                if (slen != 0) {
  ------------------
  |  Branch (221:21): [True: 0, False: 435k]
  ------------------
  222|       |                    /*
  223|       |                     * If we successfully decoded then we *must* consume all the
  224|       |                     * bytes.
  225|       |                     */
  226|      0|                    ERR_clear_last_mark();
  227|      0|                    ERR_raise(ERR_LIB_ASN1, EVP_R_DECODE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|                    goto end;
  229|      0|                }
  230|   435k|            }
  231|   435k|    }
  232|       |
  233|   871k|    ERR_pop_to_mark();
  234|   871k|    ret = 1;
  235|   871k|end:
  236|   871k|    OSSL_DECODER_CTX_free(dctx);
  237|   871k|    OPENSSL_free(tmpbuf);
  ------------------
  |  |  131|   871k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  238|   871k|    return ret;
  239|   871k|}
x_pubkey.c:x509_pubkey_set0_libctx:
   49|   871k|{
   50|   871k|    if (x != NULL) {
  ------------------
  |  Branch (50:9): [True: 871k, False: 0]
  ------------------
   51|   871k|        x->libctx = libctx;
   52|   871k|        OPENSSL_free(x->propq);
  ------------------
  |  |  131|   871k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   53|   871k|        x->propq = NULL;
   54|   871k|        if (propq != NULL) {
  ------------------
  |  Branch (54:13): [True: 1, False: 871k]
  ------------------
   55|      1|            x->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|      1|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   56|      1|            if (x->propq == NULL)
  ------------------
  |  Branch (56:17): [True: 0, False: 1]
  ------------------
   57|      0|                return 0;
   58|      1|        }
   59|   871k|    }
   60|   871k|    return 1;
   61|   871k|}
x_pubkey.c:x509_pubkey_ex_free:
   86|   871k|{
   87|   871k|    X509_PUBKEY *pubkey;
   88|       |
   89|   871k|    if (pval != NULL && (pubkey = (X509_PUBKEY *)*pval) != NULL) {
  ------------------
  |  Branch (89:9): [True: 871k, False: 0]
  |  Branch (89:25): [True: 871k, False: 0]
  ------------------
   90|   871k|        X509_ALGOR_free(pubkey->algor);
   91|   871k|        ASN1_BIT_STRING_free(pubkey->public_key);
   92|   871k|        EVP_PKEY_free(pubkey->pkey);
   93|   871k|        OPENSSL_free(pubkey->propq);
  ------------------
  |  |  131|   871k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|   871k|        OPENSSL_free(pubkey);
  ------------------
  |  |  131|   871k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   95|       |        *pval = NULL;
   96|   871k|    }
   97|   871k|}
x_pubkey.c:x509_pubkey_decode:
  407|   871k|{
  408|   871k|    EVP_PKEY *pkey;
  409|   871k|    int nid;
  410|       |
  411|   871k|    nid = OBJ_obj2nid(key->algor->algorithm);
  412|   871k|    if (!key->flag_force_legacy) {
  ------------------
  |  Branch (412:9): [True: 435k, False: 435k]
  ------------------
  413|   435k|#ifndef OPENSSL_NO_ENGINE
  414|   435k|        ENGINE *e = NULL;
  415|       |
  416|   435k|        e = ENGINE_get_pkey_meth_engine(nid);
  417|   435k|        if (e == NULL)
  ------------------
  |  Branch (417:13): [True: 435k, False: 0]
  ------------------
  418|   435k|            return 0;
  419|      0|        ENGINE_finish(e);
  420|       |#else
  421|       |        return 0;
  422|       |#endif
  423|      0|    }
  424|       |
  425|   435k|    pkey = EVP_PKEY_new();
  426|   435k|    if (pkey == NULL) {
  ------------------
  |  Branch (426:9): [True: 0, False: 435k]
  ------------------
  427|      0|        ERR_raise(ERR_LIB_X509, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  428|      0|        return -1;
  429|      0|    }
  430|       |
  431|   435k|    if (!EVP_PKEY_set_type(pkey, nid)) {
  ------------------
  |  Branch (431:9): [True: 0, False: 435k]
  ------------------
  432|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  433|      0|        goto error;
  434|      0|    }
  435|       |
  436|   435k|    if (pkey->ameth->pub_decode) {
  ------------------
  |  Branch (436:9): [True: 435k, False: 0]
  ------------------
  437|       |        /*
  438|       |         * Treat any failure of pub_decode as a decode error. In
  439|       |         * future we could have different return codes for decode
  440|       |         * errors and fatal errors such as malloc failure.
  441|       |         */
  442|   435k|        if (!pkey->ameth->pub_decode(pkey, key))
  ------------------
  |  Branch (442:13): [True: 0, False: 435k]
  ------------------
  443|      0|            goto error;
  444|   435k|    } else {
  445|      0|        ERR_raise(ERR_LIB_X509, X509_R_METHOD_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  446|      0|        goto error;
  447|      0|    }
  448|       |
  449|   435k|    *ppkey = pkey;
  450|   435k|    return 1;
  451|       |
  452|      0|error:
  453|      0|    EVP_PKEY_free(pkey);
  454|      0|    return 0;
  455|   435k|}
x_pubkey.c:d2i_PUBKEY_int:
  495|   435k|{
  496|   435k|    X509_PUBKEY *xpk, *xpk2 = NULL, **pxpk = NULL;
  497|   435k|    EVP_PKEY *pktmp = NULL;
  498|   435k|    const unsigned char *q;
  499|       |
  500|   435k|    q = *pp;
  501|       |
  502|       |    /*
  503|       |     * If libctx or propq are non-NULL, we take advantage of the reuse
  504|       |     * feature.  It's not generally recommended, but is safe enough for
  505|       |     * newly created structures.
  506|       |     */
  507|   435k|    if (libctx != NULL || propq != NULL || force_legacy) {
  ------------------
  |  Branch (507:9): [True: 0, False: 435k]
  |  Branch (507:27): [True: 0, False: 435k]
  |  Branch (507:44): [True: 435k, False: 0]
  ------------------
  508|   435k|        xpk2 = OPENSSL_zalloc(sizeof(*xpk2));
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  509|   435k|        if (xpk2 == NULL)
  ------------------
  |  Branch (509:13): [True: 0, False: 435k]
  ------------------
  510|      0|            return NULL;
  511|   435k|        if (!x509_pubkey_set0_libctx(xpk2, libctx, propq))
  ------------------
  |  Branch (511:13): [True: 0, False: 435k]
  ------------------
  512|      0|            goto end;
  513|   435k|        xpk2->flag_force_legacy = !!force_legacy;
  514|   435k|        pxpk = &xpk2;
  515|   435k|    }
  516|   435k|    xpk = d2i_x509_pubkey(pxpk, &q, length);
  517|   435k|    if (xpk == NULL)
  ------------------
  |  Branch (517:9): [True: 0, False: 435k]
  ------------------
  518|      0|        goto end;
  519|   435k|    pktmp = X509_PUBKEY_get(xpk);
  520|   435k|    X509_PUBKEY_free(xpk);
  521|   435k|    xpk2 = NULL; /* We know that xpk == xpk2 */
  522|   435k|    if (pktmp == NULL)
  ------------------
  |  Branch (522:9): [True: 0, False: 435k]
  ------------------
  523|      0|        goto end;
  524|   435k|    *pp = q;
  525|   435k|    if (a != NULL) {
  ------------------
  |  Branch (525:9): [True: 0, False: 435k]
  ------------------
  526|      0|        EVP_PKEY_free(*a);
  527|      0|        *a = pktmp;
  528|      0|    }
  529|   435k|end:
  530|   435k|    X509_PUBKEY_free(xpk2);
  531|   435k|    return pktmp;
  532|   435k|}

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

engine_load_padlock_int:
   46|      1|{
   47|       |/* On non-x86 CPUs it just returns. */
   48|      1|#ifdef COMPILE_PADLOCKENG
   49|      1|    ENGINE *toadd = ENGINE_padlock();
   50|      1|    if (!toadd)
  ------------------
  |  Branch (50:9): [True: 0, False: 1]
  ------------------
   51|      0|        return;
   52|      1|    ERR_set_mark();
   53|      1|    ENGINE_add(toadd);
   54|       |    /*
   55|       |     * If the "add" worked, it gets a structural reference. So either way, we
   56|       |     * release our just-created reference.
   57|       |     */
   58|      1|    ENGINE_free(toadd);
   59|       |    /*
   60|       |     * If the "add" didn't work, it was probably a conflict because it was
   61|       |     * already added (eg. someone calling ENGINE_load_blah then calling
   62|       |     * ENGINE_load_builtin_engines() perhaps).
   63|       |     */
   64|      1|    ERR_pop_to_mark();
   65|      1|#endif
   66|      1|}
e_padlock.c:ENGINE_padlock:
  123|      1|{
  124|      1|    ENGINE *eng = ENGINE_new();
  125|       |
  126|      1|    if (eng == NULL) {
  ------------------
  |  Branch (126:9): [True: 0, False: 1]
  ------------------
  127|      0|        return NULL;
  128|      0|    }
  129|       |
  130|      1|    if (!padlock_bind_helper(eng)) {
  ------------------
  |  Branch (130:9): [True: 0, False: 1]
  ------------------
  131|      0|        ENGINE_free(eng);
  132|      0|        return NULL;
  133|      0|    }
  134|       |
  135|      1|    return eng;
  136|      1|}
e_padlock.c:padlock_bind_helper:
   95|      1|{
   96|       |    /* Check available features */
   97|      1|    padlock_available();
   98|       |
   99|       |    /*
  100|       |     * RNG is currently disabled for reasons discussed in commentary just
  101|       |     * before padlock_rand_bytes function.
  102|       |     */
  103|      1|    padlock_use_rng = 0;
  104|       |
  105|       |    /* Generate a nice engine name with available features */
  106|      1|    BIO_snprintf(padlock_name, sizeof(padlock_name),
  107|      1|        "VIA PadLock (%s, %s)",
  108|      1|        padlock_use_rng ? "RNG" : "no-RNG",
  ------------------
  |  Branch (108:9): [True: 0, False: 1]
  ------------------
  109|      1|        padlock_use_ace ? "ACE" : "no-ACE");
  ------------------
  |  Branch (109:9): [True: 0, False: 1]
  ------------------
  110|       |
  111|       |    /* Register everything or return with an error */
  112|      1|    if (!ENGINE_set_id(e, padlock_id) || !ENGINE_set_name(e, padlock_name) || !ENGINE_set_init_function(e, padlock_init) || (padlock_use_ace && !ENGINE_set_ciphers(e, padlock_ciphers)) || (padlock_use_rng && !ENGINE_set_RAND(e, &padlock_rand))) {
  ------------------
  |  Branch (112:9): [True: 0, False: 1]
  |  Branch (112:42): [True: 0, False: 1]
  |  Branch (112:79): [True: 0, False: 1]
  |  Branch (112:126): [True: 0, False: 1]
  |  Branch (112:145): [True: 0, False: 0]
  |  Branch (112:190): [True: 0, False: 1]
  |  Branch (112:209): [True: 0, False: 0]
  ------------------
  113|      0|        return 0;
  114|      0|    }
  115|       |
  116|       |    /* Everything looks good */
  117|      1|    return 1;
  118|      1|}
e_padlock.c:padlock_available:
  241|      1|{
  242|      1|    unsigned int edx = padlock_capability();
  243|       |
  244|       |    /* Fill up some flags */
  245|      1|    padlock_use_ace = ((edx & (0x3 << 6)) == (0x3 << 6));
  246|      1|    padlock_use_rng = ((edx & (0x3 << 2)) == (0x3 << 2));
  247|       |
  248|      1|    return padlock_use_ace + padlock_use_rng;
  249|      1|}
e_padlock.c:padlock_init:
  141|      1|{
  142|      1|    return (padlock_use_rng || padlock_use_ace);
  ------------------
  |  Branch (142:13): [True: 0, False: 1]
  |  Branch (142:32): [True: 0, False: 1]
  ------------------
  143|      1|}

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

MD5_Update:
  158|  4.56k|{
  159|  4.56k|    const unsigned char *data = data_;
  160|  4.56k|    unsigned char *p;
  161|  4.56k|    HASH_LONG l;
  ------------------
  |  |   29|  4.56k|#define HASH_LONG MD5_LONG
  |  |  ------------------
  |  |  |  |   36|  4.56k|#define MD5_LONG unsigned int
  |  |  ------------------
  ------------------
  162|  4.56k|    size_t n;
  163|       |
  164|  4.56k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|  4.56k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 7, False: 4.56k]
  |  |  ------------------
  ------------------
  165|      7|        return 1;
  166|       |
  167|  4.56k|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  168|  4.56k|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|  4.56k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.56k]
  |  |  ------------------
  ------------------
  169|      0|        c->Nh++;
  170|  4.56k|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  171|       |                                      * 16-bit */
  172|  4.56k|    c->Nl = l;
  173|       |
  174|  4.56k|    n = c->num;
  175|  4.56k|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|  4.56k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.41k, False: 143]
  |  |  ------------------
  ------------------
  176|  4.41k|        p = (unsigned char *)c->data;
  177|       |
  178|  4.41k|        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   31|  4.41k|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|  8.83k|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
                      if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   31|  4.41k|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|  4.41k|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  |  Branch (178:13): [True: 1, False: 4.41k]
  |  Branch (178:35): [True: 71, False: 4.34k]
  ------------------
  179|     72|            memcpy(p + n, data, HASH_CBLOCK - n);
  ------------------
  |  |   31|     72|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|     72|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  180|     72|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   47|     72|#define HASH_BLOCK_DATA_ORDER md5_block_data_order
  |  |  ------------------
  |  |  |  |   17|     72|#define md5_block_data_order ossl_md5_block_asm_data_order
  |  |  ------------------
  ------------------
  181|     72|            n = HASH_CBLOCK - n;
  ------------------
  |  |   31|     72|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|     72|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  182|     72|            data += n;
  183|     72|            len -= n;
  184|     72|            c->num = 0;
  185|       |            /*
  186|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  187|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  188|       |             * will get properly cleansed on finalisation so this isn't a
  189|       |             * security problem.
  190|       |             */
  191|     72|            memset(p, 0, HASH_CBLOCK); /* keep it zeroed */
  ------------------
  |  |   31|     72|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|     72|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  192|  4.34k|        } else {
  193|  4.34k|            memcpy(p + n, data, len);
  194|  4.34k|            c->num += (unsigned int)len;
  195|  4.34k|            return 1;
  196|  4.34k|        }
  197|  4.41k|    }
  198|       |
  199|    215|    n = len / HASH_CBLOCK;
  ------------------
  |  |   31|    215|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|    215|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  200|    215|    if (n > 0) {
  ------------------
  |  Branch (200:9): [True: 26, False: 189]
  ------------------
  201|     26|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |   47|     26|#define HASH_BLOCK_DATA_ORDER md5_block_data_order
  |  |  ------------------
  |  |  |  |   17|     26|#define md5_block_data_order ossl_md5_block_asm_data_order
  |  |  ------------------
  ------------------
  202|     26|        n *= HASH_CBLOCK;
  ------------------
  |  |   31|     26|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|     26|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  203|     26|        data += n;
  204|     26|        len -= n;
  205|     26|    }
  206|       |
  207|    215|    if (len != 0) {
  ------------------
  |  Branch (207:9): [True: 141, False: 74]
  ------------------
  208|    141|        p = (unsigned char *)c->data;
  209|    141|        c->num = (unsigned int)len;
  210|    141|        memcpy(p, data, len);
  211|    141|    }
  212|    215|    return 1;
  213|  4.56k|}
MD5_Final:
  221|    102|{
  222|    102|    unsigned char *p = (unsigned char *)c->data;
  223|    102|    size_t n = c->num;
  224|       |
  225|    102|    p[n] = 0x80; /* there is always room for one */
  226|    102|    n++;
  227|       |
  228|    102|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   31|    102|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|    102|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  |  Branch (228:9): [True: 8, False: 94]
  ------------------
  229|      8|        memset(p + n, 0, HASH_CBLOCK - n);
  ------------------
  |  |   31|      8|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|      8|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  230|      8|        n = 0;
  231|      8|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   47|      8|#define HASH_BLOCK_DATA_ORDER md5_block_data_order
  |  |  ------------------
  |  |  |  |   17|      8|#define md5_block_data_order ossl_md5_block_asm_data_order
  |  |  ------------------
  ------------------
  232|      8|    }
  233|    102|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   31|    102|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|    102|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  234|       |
  235|    102|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   31|    102|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|    102|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  236|       |#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  237|       |    (void)HOST_l2c(c->Nh, p);
  238|       |    (void)HOST_l2c(c->Nl, p);
  239|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  240|    102|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  145|    102|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  146|    102|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  147|    102|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  148|    102|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  149|    102|    l)
  ------------------
  241|    102|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  145|    102|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  146|    102|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  147|    102|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  148|    102|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  149|    102|    l)
  ------------------
  242|    102|#endif
  243|    102|    p -= HASH_CBLOCK;
  ------------------
  |  |   31|    102|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|    102|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  244|    102|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   47|    102|#define HASH_BLOCK_DATA_ORDER md5_block_data_order
  |  |  ------------------
  |  |  |  |   17|    102|#define md5_block_data_order ossl_md5_block_asm_data_order
  |  |  ------------------
  ------------------
  245|    102|    c->num = 0;
  246|    102|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   31|    102|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|    102|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  247|       |
  248|       |#ifndef HASH_MAKE_STRING
  249|       |#error "HASH_MAKE_STRING must be defined!"
  250|       |#else
  251|    102|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   36|    102|    do {                         \
  |  |   37|    102|        unsigned long ll;        \
  |  |   38|    102|        ll = (c)->A;             \
  |  |   39|    102|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  145|    102|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  |  |  146|    102|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  |  |  147|    102|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  |  |  148|    102|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  |  |  149|    102|    l)
  |  |  ------------------
  |  |   40|    102|        ll = (c)->B;             \
  |  |   41|    102|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  145|    102|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  |  |  146|    102|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  |  |  147|    102|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  |  |  148|    102|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  |  |  149|    102|    l)
  |  |  ------------------
  |  |   42|    102|        ll = (c)->C;             \
  |  |   43|    102|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  145|    102|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  |  |  146|    102|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  |  |  147|    102|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  |  |  148|    102|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  |  |  149|    102|    l)
  |  |  ------------------
  |  |   44|    102|        ll = (c)->D;             \
  |  |   45|    102|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  145|    102|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  |  |  146|    102|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  |  |  147|    102|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  |  |  148|    102|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  |  |  149|    102|    l)
  |  |  ------------------
  |  |   46|    102|    } while (0)
  |  |  ------------------
  |  |  |  Branch (46:14): [Folded, False: 102]
  |  |  ------------------
  ------------------
  252|    102|#endif
  253|       |
  254|    102|    return 1;
  255|    102|}
SHA1_Update:
  158|   378k|{
  159|   378k|    const unsigned char *data = data_;
  160|   378k|    unsigned char *p;
  161|   378k|    HASH_LONG l;
  ------------------
  |  |   19|   378k|#define HASH_LONG SHA_LONG
  |  |  ------------------
  |  |  |  |   34|   378k|#define SHA_LONG unsigned int
  |  |  ------------------
  ------------------
  162|   378k|    size_t n;
  163|       |
  164|   378k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|   378k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 378k]
  |  |  ------------------
  ------------------
  165|      0|        return 1;
  166|       |
  167|   378k|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  168|   378k|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|   378k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 378k]
  |  |  ------------------
  ------------------
  169|      0|        c->Nh++;
  170|   378k|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  171|       |                                      * 16-bit */
  172|   378k|    c->Nl = l;
  173|       |
  174|   378k|    n = c->num;
  175|   378k|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|   378k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 378k]
  |  |  ------------------
  ------------------
  176|      0|        p = (unsigned char *)c->data;
  177|       |
  178|      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 (178:13): [True: 0, False: 0]
  |  Branch (178:35): [True: 0, False: 0]
  ------------------
  179|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  180|      0|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   41|      0|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  181|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|      0|            data += n;
  183|      0|            len -= n;
  184|      0|            c->num = 0;
  185|       |            /*
  186|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  187|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  188|       |             * will get properly cleansed on finalisation so this isn't a
  189|       |             * security problem.
  190|       |             */
  191|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  192|      0|        } else {
  193|      0|            memcpy(p + n, data, len);
  194|      0|            c->num += (unsigned int)len;
  195|      0|            return 1;
  196|      0|        }
  197|      0|    }
  198|       |
  199|   378k|    n = len / HASH_CBLOCK;
  ------------------
  |  |   21|   378k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   378k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   378k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|   378k|    if (n > 0) {
  ------------------
  |  Branch (200:9): [True: 378k, False: 0]
  ------------------
  201|   378k|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |   41|   378k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  202|   378k|        n *= HASH_CBLOCK;
  ------------------
  |  |   21|   378k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   378k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   378k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|   378k|        data += n;
  204|   378k|        len -= n;
  205|   378k|    }
  206|       |
  207|   378k|    if (len != 0) {
  ------------------
  |  Branch (207:9): [True: 375k, False: 2.59k]
  ------------------
  208|   375k|        p = (unsigned char *)c->data;
  209|   375k|        c->num = (unsigned int)len;
  210|   375k|        memcpy(p, data, len);
  211|   375k|    }
  212|   378k|    return 1;
  213|   378k|}
SHA1_Final:
  221|   378k|{
  222|   378k|    unsigned char *p = (unsigned char *)c->data;
  223|   378k|    size_t n = c->num;
  224|       |
  225|   378k|    p[n] = 0x80; /* there is always room for one */
  226|   378k|    n++;
  227|       |
  228|   378k|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   21|   378k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   378k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   378k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (228:9): [True: 57.0k, False: 321k]
  ------------------
  229|  57.0k|        memset(p + n, 0, HASH_CBLOCK - n);
  ------------------
  |  |   21|  57.0k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  57.0k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  57.0k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  230|  57.0k|        n = 0;
  231|  57.0k|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   41|  57.0k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  232|  57.0k|    }
  233|   378k|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   21|   378k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   378k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   378k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  234|       |
  235|   378k|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   21|   378k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   378k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   378k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|   378k|#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  237|   378k|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  133|   378k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|   378k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|   378k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|   378k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|   378k|    l)
  ------------------
  238|   378k|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  133|   378k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|   378k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|   378k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|   378k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|   378k|    l)
  ------------------
  239|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  240|       |    (void)HOST_l2c(c->Nl, p);
  241|       |    (void)HOST_l2c(c->Nh, p);
  242|       |#endif
  243|   378k|    p -= HASH_CBLOCK;
  ------------------
  |  |   21|   378k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   378k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   378k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  244|   378k|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   41|   378k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  245|   378k|    c->num = 0;
  246|   378k|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   21|   378k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   378k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   378k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|       |
  248|       |#ifndef HASH_MAKE_STRING
  249|       |#error "HASH_MAKE_STRING must be defined!"
  250|       |#else
  251|   378k|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   23|   378k|    do {                         \
  |  |   24|   378k|        unsigned long ll;        \
  |  |   25|   378k|        ll = (c)->h0;            \
  |  |   26|   378k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   378k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   378k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   378k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   378k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   378k|    l)
  |  |  ------------------
  |  |   27|   378k|        ll = (c)->h1;            \
  |  |   28|   378k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   378k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   378k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   378k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   378k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   378k|    l)
  |  |  ------------------
  |  |   29|   378k|        ll = (c)->h2;            \
  |  |   30|   378k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   378k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   378k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   378k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   378k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   378k|    l)
  |  |  ------------------
  |  |   31|   378k|        ll = (c)->h3;            \
  |  |   32|   378k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   378k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   378k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   378k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   378k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   378k|    l)
  |  |  ------------------
  |  |   33|   378k|        ll = (c)->h4;            \
  |  |   34|   378k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   378k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   378k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   378k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   378k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   378k|    l)
  |  |  ------------------
  |  |   35|   378k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (35:14): [Folded, False: 378k]
  |  |  ------------------
  ------------------
  252|   378k|#endif
  253|       |
  254|   378k|    return 1;
  255|   378k|}
SHA256_Update:
  158|   369k|{
  159|   369k|    const unsigned char *data = data_;
  160|   369k|    unsigned char *p;
  161|   369k|    HASH_LONG l;
  ------------------
  |  |   76|   369k|#define HASH_LONG SHA_LONG
  |  |  ------------------
  |  |  |  |   34|   369k|#define SHA_LONG unsigned int
  |  |  ------------------
  ------------------
  162|   369k|    size_t n;
  163|       |
  164|   369k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|   369k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 369k]
  |  |  ------------------
  ------------------
  165|      0|        return 1;
  166|       |
  167|   369k|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  168|   369k|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|   369k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 369k]
  |  |  ------------------
  ------------------
  169|      0|        c->Nh++;
  170|   369k|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  171|       |                                      * 16-bit */
  172|   369k|    c->Nl = l;
  173|       |
  174|   369k|    n = c->num;
  175|   369k|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|   369k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 357k, False: 11.9k]
  |  |  ------------------
  ------------------
  176|   357k|        p = (unsigned char *)c->data;
  177|       |
  178|   357k|        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   78|   357k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   714k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   357k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   78|   357k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   357k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   357k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (178:13): [True: 0, False: 357k]
  |  Branch (178:35): [True: 5.67k, False: 351k]
  ------------------
  179|  5.67k|            memcpy(p + n, data, HASH_CBLOCK - n);
  ------------------
  |  |   78|  5.67k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  5.67k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  5.67k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  180|  5.67k|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  125|  5.67k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  181|  5.67k|            n = HASH_CBLOCK - n;
  ------------------
  |  |   78|  5.67k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  5.67k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  5.67k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|  5.67k|            data += n;
  183|  5.67k|            len -= n;
  184|  5.67k|            c->num = 0;
  185|       |            /*
  186|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  187|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  188|       |             * will get properly cleansed on finalisation so this isn't a
  189|       |             * security problem.
  190|       |             */
  191|  5.67k|            memset(p, 0, HASH_CBLOCK); /* keep it zeroed */
  ------------------
  |  |   78|  5.67k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  5.67k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  5.67k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  192|   351k|        } else {
  193|   351k|            memcpy(p + n, data, len);
  194|   351k|            c->num += (unsigned int)len;
  195|   351k|            return 1;
  196|   351k|        }
  197|   357k|    }
  198|       |
  199|  17.6k|    n = len / HASH_CBLOCK;
  ------------------
  |  |   78|  17.6k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  17.6k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  17.6k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|  17.6k|    if (n > 0) {
  ------------------
  |  Branch (200:9): [True: 1.15k, False: 16.4k]
  ------------------
  201|  1.15k|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |  125|  1.15k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  202|  1.15k|        n *= HASH_CBLOCK;
  ------------------
  |  |   78|  1.15k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  1.15k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.15k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|  1.15k|        data += n;
  204|  1.15k|        len -= n;
  205|  1.15k|    }
  206|       |
  207|  17.6k|    if (len != 0) {
  ------------------
  |  Branch (207:9): [True: 11.8k, False: 5.74k]
  ------------------
  208|  11.8k|        p = (unsigned char *)c->data;
  209|  11.8k|        c->num = (unsigned int)len;
  210|  11.8k|        memcpy(p, data, len);
  211|  11.8k|    }
  212|  17.6k|    return 1;
  213|   369k|}
SHA256_Final:
  221|  6.84k|{
  222|  6.84k|    unsigned char *p = (unsigned char *)c->data;
  223|  6.84k|    size_t n = c->num;
  224|       |
  225|  6.84k|    p[n] = 0x80; /* there is always room for one */
  226|  6.84k|    n++;
  227|       |
  228|  6.84k|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   78|  6.84k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  6.84k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  6.84k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (228:9): [True: 505, False: 6.34k]
  ------------------
  229|    505|        memset(p + n, 0, HASH_CBLOCK - n);
  ------------------
  |  |   78|    505|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|    505|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|    505|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  230|    505|        n = 0;
  231|    505|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  125|    505|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  232|    505|    }
  233|  6.84k|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   78|  6.84k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  6.84k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  6.84k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  234|       |
  235|  6.84k|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   78|  6.84k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  6.84k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  6.84k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|  6.84k|#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  237|  6.84k|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  133|  6.84k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  6.84k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  6.84k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  6.84k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  6.84k|    l)
  ------------------
  238|  6.84k|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  133|  6.84k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  6.84k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  6.84k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  6.84k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  6.84k|    l)
  ------------------
  239|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  240|       |    (void)HOST_l2c(c->Nl, p);
  241|       |    (void)HOST_l2c(c->Nh, p);
  242|       |#endif
  243|  6.84k|    p -= HASH_CBLOCK;
  ------------------
  |  |   78|  6.84k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  6.84k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  6.84k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  244|  6.84k|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  125|  6.84k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  245|  6.84k|    c->num = 0;
  246|  6.84k|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   78|  6.84k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  6.84k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  6.84k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|       |
  248|       |#ifndef HASH_MAKE_STRING
  249|       |#error "HASH_MAKE_STRING must be defined!"
  250|       |#else
  251|  6.84k|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   89|  6.84k|    do {                                                            \
  |  |   90|  6.84k|        unsigned long ll;                                           \
  |  |   91|  6.84k|        unsigned int nn;                                            \
  |  |   92|  6.84k|        switch ((c)->md_len) {                                      \
  |  |   93|      0|        case SHA256_192_DIGEST_LENGTH:                              \
  |  |  ------------------
  |  |  |  |   84|      0|#define SHA256_192_DIGEST_LENGTH 24
  |  |  ------------------
  |  |  |  Branch (93:9): [True: 0, False: 6.84k]
  |  |  ------------------
  |  |   94|      0|            for (nn = 0; nn < SHA256_192_DIGEST_LENGTH / 4; nn++) { \
  |  |  ------------------
  |  |  |  |   84|      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:                                  \
  |  |  ------------------
  |  |  |  |   85|      0|#define SHA224_DIGEST_LENGTH 28
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 0, False: 6.84k]
  |  |  ------------------
  |  |  100|      0|            for (nn = 0; nn < SHA224_DIGEST_LENGTH / 4; nn++) {     \
  |  |  ------------------
  |  |  |  |   85|      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|  6.84k|        case SHA256_DIGEST_LENGTH:                                  \
  |  |  ------------------
  |  |  |  |   86|  6.84k|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (105:9): [True: 6.84k, False: 0]
  |  |  ------------------
  |  |  106|  61.6k|            for (nn = 0; nn < SHA256_DIGEST_LENGTH / 4; nn++) {     \
  |  |  ------------------
  |  |  |  |   86|  61.6k|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (106:26): [True: 54.7k, False: 6.84k]
  |  |  ------------------
  |  |  107|  54.7k|                ll = (c)->h[nn];                                    \
  |  |  108|  54.7k|                (void)HOST_l2c(ll, (s));                            \
  |  |  ------------------
  |  |  |  |  133|  54.7k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  54.7k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  54.7k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  54.7k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  54.7k|    l)
  |  |  ------------------
  |  |  109|  54.7k|            }                                                       \
  |  |  110|  6.84k|            break;                                                  \
  |  |  111|      0|        default:                                                    \
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 6.84k]
  |  |  ------------------
  |  |  112|      0|            if ((c)->md_len > SHA256_DIGEST_LENGTH)                 \
  |  |  ------------------
  |  |  |  |   86|      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|  6.84k|        }                                                           \
  |  |  120|  6.84k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (120:14): [Folded, False: 6.84k]
  |  |  ------------------
  ------------------
  252|  6.84k|#endif
  253|       |
  254|  6.84k|    return 1;
  255|  6.84k|}

threads_common.c:ossl_sa_CTX_TABLE_ENTRY_get:
   60|  21.2M|    {                                                                                                              \
   61|  21.2M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  21.2M|    }                                                                                                              \
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.20k|    {                                                                                                              \
   67|  2.20k|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|  2.20k|    }                                                                                                              \
threads_common.c:ossl_sa_CTX_TABLE_ENTRY_free:
   31|      3|    {                                                                                                              \
   32|      3|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|      3|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_new:
   26|  3.14k|    {                                                                                                              \
   27|  3.14k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|  3.14k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_doall_arg:
   55|  6.82k|    {                                                                                                              \
   56|  6.82k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|  6.82k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|  6.82k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_set:
   66|   336k|    {                                                                                                              \
   67|   336k|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|   336k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_free:
   31|  3.14k|    {                                                                                                              \
   32|  3.14k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|  3.14k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_get:
   60|  1.14M|    {                                                                                                              \
   61|  1.14M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  1.14M|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_num:
   41|      6|    {                                                                                                              \
   42|      6|        return ossl_sa_num((OPENSSL_SA *)sa);                                                                      \
   43|      6|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_doall:
   47|  3.68k|    {                                                                                                              \
   48|  3.68k|        ossl_sa_doall((OPENSSL_SA *)sa,                                                                            \
   49|  3.68k|            (void (*)(ossl_uintmax_t, void *))leaf);                                                               \
   50|  3.68k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_doall_arg:
   55|   316k|    {                                                                                                              \
   56|   316k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|   316k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|   316k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_free:
   31|   316k|    {                                                                                                              \
   32|   316k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|   316k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_new:
   26|   316k|    {                                                                                                              \
   27|   316k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|   316k|    }                                                                                                              \

s3_lib.c:ossl_assert_int:
   45|  3.90k|{
   46|  3.90k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.90k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.90k|    return expr;
   50|  3.90k|}
ssl_cert.c:ossl_assert_int:
   45|  2.78k|{
   46|  2.78k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.78k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.78k|    return expr;
   50|  2.78k|}
ssl_ciph.c:ossl_assert_int:
   45|  18.9k|{
   46|  18.9k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 18.9k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  18.9k|    return expr;
   50|  18.9k|}
ssl_lib.c:ossl_assert_int:
   45|  1.95k|{
   46|  1.95k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.95k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.95k|    return expr;
   50|  1.95k|}
rec_layer_s3.c:ossl_assert_int:
   45|  11.8k|{
   46|  11.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 11.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  11.8k|    return expr;
   50|  11.8k|}
tls_common.c:ossl_assert_int:
   45|  11.3k|{
   46|  11.3k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 11.3k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  11.3k|    return expr;
   50|  11.3k|}
extensions_clnt.c:ossl_assert_int:
   45|      2|{
   46|      2|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|      2|    return expr;
   50|      2|}
statem.c:ossl_assert_int:
   45|    269|{
   46|    269|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 269]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    269|    return expr;
   50|    269|}
bio_print.c:ossl_assert_int:
   45|  50.2M|{
   46|  50.2M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 50.2M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  50.2M|    return expr;
   50|  50.2M|}
decoder_lib.c:ossl_assert_int:
   45|  2.17M|{
   46|  2.17M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.17M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.17M|    return expr;
   50|  2.17M|}
decoder_meth.c:ossl_assert_int:
   45|  4.55M|{
   46|  4.55M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 4.55M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  4.55M|    return expr;
   50|  4.55M|}
digest.c:ossl_assert_int:
   45|  23.6k|{
   46|  23.6k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 23.6k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  23.6k|    return expr;
   50|  23.6k|}
evp_enc.c:ossl_assert_int:
   45|  99.8k|{
   46|  99.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 99.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  99.8k|    return expr;
   50|  99.8k|}
evp_fetch.c:ossl_assert_int:
   45|  2.72M|{
   46|  2.72M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.72M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.72M|    return expr;
   50|  2.72M|}
p_lib.c:ossl_assert_int:
   45|  6.48M|{
   46|  6.48M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 6.48M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  6.48M|    return expr;
   50|  6.48M|}
pmeth_lib.c:ossl_assert_int:
   45|  73.8k|{
   46|  73.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 73.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  73.8k|    return expr;
   50|  73.8k|}
core_algorithm.c:ossl_assert_int:
   45|  1.10k|{
   46|  1.10k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.10k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.10k|    return expr;
   50|  1.10k|}
core_fetch.c:ossl_assert_int:
   45|   151k|{
   46|   151k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 151k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   151k|    return expr;
   50|   151k|}
core_namemap.c:ossl_assert_int:
   45|   380k|{
   46|   380k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 380k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   380k|    return expr;
   50|   380k|}
packet.c:ossl_assert_int:
   45|  2.74M|{
   46|  2.74M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.74M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.74M|    return expr;
   50|  2.74M|}
provider_core.c:ossl_assert_int:
   45|   146k|{
   46|   146k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 146k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   146k|    return expr;
   50|   146k|}
threads_common.c:ossl_assert_int:
   45|  21.2M|{
   46|  21.2M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 21.2M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  21.2M|    return expr;
   50|  21.2M|}
threads_pthread.c:ossl_assert_int:
   45|  17.4M|{
   46|  17.4M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 17.4M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  17.4M|    return expr;
   50|  17.4M|}
defn_cache.c:ossl_assert_int:
   45|   338k|{
   46|   338k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 338k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   338k|    return expr;
   50|   338k|}
property.c:ossl_assert_int:
   45|   196k|{
   46|   196k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 196k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   196k|    return expr;
   50|   196k|}
x_pubkey.c:ossl_assert_int:
   45|   871k|{
   46|   871k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 871k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   871k|    return expr;
   50|   871k|}
dh_kmgmt.c:ossl_assert_int:
   45|     86|{
   46|     86|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 86]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|     86|    return expr;
   50|     86|}
drbg_ctr.c:ossl_assert_int:
   45|  7.16k|{
   46|  7.16k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.16k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.16k|    return expr;
   50|  7.16k|}
ml_kem.c:ossl_assert_int:
   45|  2.95k|{
   46|  2.95k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.95k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.95k|    return expr;
   50|  2.95k|}

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

core_namemap.c:ossl_ht_strcase:
  264|  6.48M|{
  265|  6.48M|    int i;
  266|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  267|       |    const long int case_adjust = ~0x40;
  268|       |#else
  269|  6.48M|    const long int case_adjust = ~0x20;
  270|  6.48M|#endif
  271|       |
  272|  6.48M|    if (src == NULL)
  ------------------
  |  Branch (272:9): [True: 0, False: 6.48M]
  ------------------
  273|      0|        return;
  274|       |
  275|  64.1M|    for (i = 0; src[i] != '\0' && i < len; i++)
  ------------------
  |  Branch (275:17): [True: 57.7M, False: 6.36M]
  |  Branch (275:35): [True: 57.6M, False: 117k]
  ------------------
  276|  57.6M|        tgt[i] = case_adjust & src[i];
  277|  6.48M|}

array_alloc.c:ossl_size_mul:
   79|  22.3M|{
   80|  22.3M|    int err = 0;
   81|  22.3M|    *bytes = safe_mul_size_t(num, size, &err);
   82|       |
   83|  22.3M|    if (ossl_unlikely(err != 0)) {
  ------------------
  |  |   23|  22.3M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 22.3M]
  |  |  ------------------
  ------------------
   84|      0|        ossl_report_alloc_err_of(file, line);
   85|       |
   86|      0|        return false;
   87|      0|    }
   88|       |
   89|  22.3M|    return true;
   90|  22.3M|}

rec_layer_s3.c:PACKET_buf_init:
   72|     24|{
   73|       |    /* Sanity check for negative values. */
   74|     24|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (74:9): [True: 0, False: 24]
  ------------------
   75|      0|        return 0;
   76|       |
   77|     24|    pkt->curr = buf;
   78|     24|    pkt->remaining = len;
   79|     24|    return 1;
   80|     24|}
rec_layer_s3.c:PACKET_get_1:
  320|     47|{
  321|     47|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (321:9): [True: 2, False: 45]
  ------------------
  322|      2|        return 0;
  323|       |
  324|     45|    packet_forward(pkt, 1);
  325|       |
  326|     45|    return 1;
  327|     47|}
rec_layer_s3.c:PACKET_peek_1:
  309|     47|{
  310|     47|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (310:9): [True: 2, False: 45]
  ------------------
  311|      2|        return 0;
  312|       |
  313|     45|    *data = *pkt->curr;
  314|       |
  315|     45|    return 1;
  316|     47|}
rec_layer_s3.c:packet_forward:
   31|     45|{
   32|     45|    pkt->curr += len;
   33|     45|    pkt->remaining -= len;
   34|     45|}
rec_layer_s3.c:PACKET_remaining:
   40|     69|{
   41|     69|    return pkt->remaining;
   42|     69|}
tls_common.c:PACKET_buf_init:
   72|    465|{
   73|       |    /* Sanity check for negative values. */
   74|    465|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (74:9): [True: 0, False: 465]
  ------------------
   75|      0|        return 0;
   76|       |
   77|    465|    pkt->curr = buf;
   78|    465|    pkt->remaining = len;
   79|    465|    return 1;
   80|    465|}
tls_common.c:PACKET_get_net_2_len:
  162|    930|{
  163|    930|    unsigned int i;
  164|    930|    int ret = PACKET_get_net_2(pkt, &i);
  165|       |
  166|    930|    if (ret)
  ------------------
  |  Branch (166:9): [True: 930, False: 0]
  ------------------
  167|    930|        *data = (size_t)i;
  168|       |
  169|    930|    return ret;
  170|    930|}
tls_common.c:PACKET_get_1:
  320|    930|{
  321|    930|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (321:9): [True: 0, False: 930]
  ------------------
  322|      0|        return 0;
  323|       |
  324|    930|    packet_forward(pkt, 1);
  325|       |
  326|    930|    return 1;
  327|    930|}
tls_common.c:PACKET_peek_1:
  309|    930|{
  310|    930|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (310:9): [True: 0, False: 930]
  ------------------
  311|      0|        return 0;
  312|       |
  313|    930|    *data = *pkt->curr;
  314|       |
  315|    930|    return 1;
  316|    930|}
tls_common.c:PACKET_remaining:
   40|  2.32k|{
   41|  2.32k|    return pkt->remaining;
   42|  2.32k|}
tls_common.c:packet_forward:
   31|  2.32k|{
   32|  2.32k|    pkt->curr += len;
   33|  2.32k|    pkt->remaining -= len;
   34|  2.32k|}
tls_common.c:PACKET_get_net_2:
  151|  1.39k|{
  152|  1.39k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (152:9): [True: 0, False: 1.39k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|  1.39k|    packet_forward(pkt, 2);
  156|       |
  157|  1.39k|    return 1;
  158|  1.39k|}
tls_common.c:PACKET_peek_net_2:
  138|  1.39k|{
  139|  1.39k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (139:9): [True: 0, False: 1.39k]
  ------------------
  140|      0|        return 0;
  141|       |
  142|  1.39k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  143|  1.39k|    *data |= *(pkt->curr + 1);
  144|       |
  145|  1.39k|    return 1;
  146|  1.39k|}
extensions.c:PACKET_remaining:
   40|    965|{
   41|    965|    return pkt->remaining;
   42|    965|}
extensions.c:PACKET_get_net_2:
  151|    441|{
  152|    441|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (152:9): [True: 2, False: 439]
  ------------------
  153|      2|        return 0;
  154|       |
  155|    439|    packet_forward(pkt, 2);
  156|       |
  157|    439|    return 1;
  158|    441|}
extensions.c:PACKET_peek_net_2:
  138|    441|{
  139|    441|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (139:9): [True: 2, False: 439]
  ------------------
  140|      2|        return 0;
  141|       |
  142|    439|    *data = ((unsigned int)(*pkt->curr)) << 8;
  143|    439|    *data |= *(pkt->curr + 1);
  144|       |
  145|    439|    return 1;
  146|    441|}
extensions.c:packet_forward:
   31|    657|{
   32|    657|    pkt->curr += len;
   33|    657|    pkt->remaining -= len;
   34|    657|}
extensions.c:PACKET_get_length_prefixed_2:
  579|    220|{
  580|    220|    unsigned int length;
  581|    220|    const unsigned char *data;
  582|    220|    PACKET tmp = *pkt;
  583|       |
  584|    220|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (584:9): [True: 1, False: 219]
  |  Branch (584:45): [True: 1, False: 218]
  ------------------
  585|      2|        return 0;
  586|      2|    }
  587|       |
  588|    218|    *pkt = tmp;
  589|    218|    subpkt->curr = data;
  590|    218|    subpkt->remaining = length;
  591|       |
  592|    218|    return 1;
  593|    220|}
extensions.c:PACKET_get_bytes:
  401|    219|{
  402|    219|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (402:9): [True: 1, False: 218]
  ------------------
  403|      1|        return 0;
  404|       |
  405|    218|    packet_forward(pkt, len);
  406|       |
  407|    218|    return 1;
  408|    219|}
extensions.c:PACKET_peek_bytes:
  383|    219|{
  384|    219|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (384:9): [True: 1, False: 218]
  ------------------
  385|      1|        return 0;
  386|       |
  387|    218|    *data = pkt->curr;
  388|       |
  389|    218|    return 1;
  390|    219|}
extensions.c:PACKET_data:
   60|      3|{
   61|      3|    return pkt->curr;
   62|      3|}
extensions_clnt.c:PACKET_buf_init:
   72|      2|{
   73|       |    /* Sanity check for negative values. */
   74|      2|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (74:9): [True: 0, False: 2]
  ------------------
   75|      0|        return 0;
   76|       |
   77|      2|    pkt->curr = buf;
   78|      2|    pkt->remaining = len;
   79|      2|    return 1;
   80|      2|}
extensions_clnt.c:PACKET_get_length_prefixed_1:
  534|      5|{
  535|      5|    unsigned int length;
  536|      5|    const unsigned char *data;
  537|      5|    PACKET tmp = *pkt;
  538|      5|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (538:9): [True: 2, False: 3]
  |  Branch (538:41): [True: 0, False: 3]
  ------------------
  539|      2|        return 0;
  540|      2|    }
  541|       |
  542|      3|    *pkt = tmp;
  543|      3|    subpkt->curr = data;
  544|      3|    subpkt->remaining = length;
  545|       |
  546|      3|    return 1;
  547|      5|}
extensions_clnt.c:PACKET_get_1_len:
  331|      5|{
  332|      5|    unsigned int i;
  333|      5|    int ret = PACKET_get_1(pkt, &i);
  334|       |
  335|      5|    if (ret)
  ------------------
  |  Branch (335:9): [True: 3, False: 2]
  ------------------
  336|      3|        *data = (size_t)i;
  337|       |
  338|      5|    return ret;
  339|      5|}
extensions_clnt.c:PACKET_remaining:
   40|     68|{
   41|     68|    return pkt->remaining;
   42|     68|}
extensions_clnt.c:PACKET_get_bytes:
  401|      6|{
  402|      6|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (402:9): [True: 1, False: 5]
  ------------------
  403|      1|        return 0;
  404|       |
  405|      5|    packet_forward(pkt, len);
  406|       |
  407|      5|    return 1;
  408|      6|}
extensions_clnt.c:PACKET_peek_bytes:
  383|      6|{
  384|      6|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (384:9): [True: 1, False: 5]
  ------------------
  385|      1|        return 0;
  386|       |
  387|      5|    *data = pkt->curr;
  388|       |
  389|      5|    return 1;
  390|      6|}
extensions_clnt.c:packet_forward:
   31|     30|{
   32|     30|    pkt->curr += len;
   33|     30|    pkt->remaining -= len;
   34|     30|}
extensions_clnt.c:PACKET_get_1:
  320|     14|{
  321|     14|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (321:9): [True: 5, False: 9]
  ------------------
  322|      5|        return 0;
  323|       |
  324|      9|    packet_forward(pkt, 1);
  325|       |
  326|      9|    return 1;
  327|     14|}
extensions_clnt.c:PACKET_peek_1:
  309|     14|{
  310|     14|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (310:9): [True: 5, False: 9]
  ------------------
  311|      5|        return 0;
  312|       |
  313|      9|    *data = *pkt->curr;
  314|       |
  315|      9|    return 1;
  316|     14|}
extensions_clnt.c:PACKET_as_length_prefixed_1:
  555|      4|{
  556|      4|    unsigned int length;
  557|      4|    const unsigned char *data;
  558|      4|    PACKET tmp = *pkt;
  559|      4|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (559:9): [True: 1, False: 3]
  |  Branch (559:41): [True: 1, False: 2]
  |  Branch (559:91): [True: 1, False: 1]
  ------------------
  560|      3|        return 0;
  561|      3|    }
  562|       |
  563|      1|    *pkt = tmp;
  564|      1|    subpkt->curr = data;
  565|      1|    subpkt->remaining = length;
  566|       |
  567|      1|    return 1;
  568|      4|}
extensions_clnt.c:PACKET_copy_bytes:
  429|      1|{
  430|      1|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (430:9): [True: 0, False: 1]
  ------------------
  431|      0|        return 0;
  432|       |
  433|      1|    packet_forward(pkt, len);
  434|       |
  435|      1|    return 1;
  436|      1|}
extensions_clnt.c:PACKET_peek_copy_bytes:
  414|      1|{
  415|      1|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (415:9): [True: 0, False: 1]
  ------------------
  416|      0|        return 0;
  417|       |
  418|      1|    memcpy(data, pkt->curr, len);
  419|       |
  420|      1|    return 1;
  421|      1|}
extensions_clnt.c:PACKET_get_net_2_len:
  162|      7|{
  163|      7|    unsigned int i;
  164|      7|    int ret = PACKET_get_net_2(pkt, &i);
  165|       |
  166|      7|    if (ret)
  ------------------
  |  Branch (166:9): [True: 6, False: 1]
  ------------------
  167|      6|        *data = (size_t)i;
  168|       |
  169|      7|    return ret;
  170|      7|}
extensions_clnt.c:PACKET_get_net_2:
  151|     17|{
  152|     17|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (152:9): [True: 2, False: 15]
  ------------------
  153|      2|        return 0;
  154|       |
  155|     15|    packet_forward(pkt, 2);
  156|       |
  157|     15|    return 1;
  158|     17|}
extensions_clnt.c:PACKET_peek_net_2:
  138|     17|{
  139|     17|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (139:9): [True: 2, False: 15]
  ------------------
  140|      2|        return 0;
  141|       |
  142|     15|    *data = ((unsigned int)(*pkt->curr)) << 8;
  143|     15|    *data |= *(pkt->curr + 1);
  144|       |
  145|     15|    return 1;
  146|     17|}
statem.c:PACKET_buf_init:
   72|    151|{
   73|       |    /* Sanity check for negative values. */
   74|    151|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (74:9): [True: 0, False: 151]
  ------------------
   75|      0|        return 0;
   76|       |
   77|    151|    pkt->curr = buf;
   78|    151|    pkt->remaining = len;
   79|    151|    return 1;
   80|    151|}
statem_clnt.c:PACKET_forward:
  516|      2|{
  517|      2|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (517:9): [True: 0, False: 2]
  ------------------
  518|      0|        return 0;
  519|       |
  520|      2|    packet_forward(pkt, len);
  521|       |
  522|      2|    return 1;
  523|      2|}
statem_clnt.c:packet_forward:
   31|  1.04k|{
   32|  1.04k|    pkt->curr += len;
   33|  1.04k|    pkt->remaining -= len;
   34|  1.04k|}
statem_clnt.c:PACKET_get_length_prefixed_1:
  534|    144|{
  535|    144|    unsigned int length;
  536|    144|    const unsigned char *data;
  537|    144|    PACKET tmp = *pkt;
  538|    144|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (538:9): [True: 1, False: 143]
  |  Branch (538:41): [True: 15, False: 128]
  ------------------
  539|     16|        return 0;
  540|     16|    }
  541|       |
  542|    128|    *pkt = tmp;
  543|    128|    subpkt->curr = data;
  544|    128|    subpkt->remaining = length;
  545|       |
  546|    128|    return 1;
  547|    144|}
statem_clnt.c:PACKET_remaining:
   40|  1.60k|{
   41|  1.60k|    return pkt->remaining;
   42|  1.60k|}
statem_clnt.c:PACKET_copy_bytes:
  429|    146|{
  430|    146|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (430:9): [True: 4, False: 142]
  ------------------
  431|      4|        return 0;
  432|       |
  433|    142|    packet_forward(pkt, len);
  434|       |
  435|    142|    return 1;
  436|    146|}
statem_clnt.c:PACKET_peek_copy_bytes:
  414|    146|{
  415|    146|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (415:9): [True: 4, False: 142]
  ------------------
  416|      4|        return 0;
  417|       |
  418|    142|    memcpy(data, pkt->curr, len);
  419|       |
  420|    142|    return 1;
  421|    146|}
statem_clnt.c:PACKET_get_net_2:
  151|    274|{
  152|    274|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (152:9): [True: 4, False: 270]
  ------------------
  153|      4|        return 0;
  154|       |
  155|    270|    packet_forward(pkt, 2);
  156|       |
  157|    270|    return 1;
  158|    274|}
statem_clnt.c:PACKET_peek_net_2:
  138|    274|{
  139|    274|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (139:9): [True: 4, False: 270]
  ------------------
  140|      4|        return 0;
  141|       |
  142|    270|    *data = ((unsigned int)(*pkt->curr)) << 8;
  143|    270|    *data |= *(pkt->curr + 1);
  144|       |
  145|    270|    return 1;
  146|    274|}
statem_clnt.c:PACKET_data:
   60|     64|{
   61|     64|    return pkt->curr;
   62|     64|}
statem_clnt.c:PACKET_get_bytes:
  401|    393|{
  402|    393|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (402:9): [True: 30, False: 363]
  ------------------
  403|     30|        return 0;
  404|       |
  405|    363|    packet_forward(pkt, len);
  406|       |
  407|    363|    return 1;
  408|    393|}
statem_clnt.c:PACKET_peek_bytes:
  383|    393|{
  384|    393|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (384:9): [True: 30, False: 363]
  ------------------
  385|     30|        return 0;
  386|       |
  387|    363|    *data = pkt->curr;
  388|       |
  389|    363|    return 1;
  390|    393|}
statem_clnt.c:PACKET_get_1:
  320|    271|{
  321|    271|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (321:9): [True: 2, False: 269]
  ------------------
  322|      2|        return 0;
  323|       |
  324|    269|    packet_forward(pkt, 1);
  325|       |
  326|    269|    return 1;
  327|    271|}
statem_clnt.c:PACKET_peek_1:
  309|    271|{
  310|    271|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (310:9): [True: 2, False: 269]
  ------------------
  311|      2|        return 0;
  312|       |
  313|    269|    *data = *pkt->curr;
  314|       |
  315|    269|    return 1;
  316|    271|}
statem_clnt.c:PACKET_null_init:
   84|      3|{
   85|       |    pkt->curr = NULL;
   86|      3|    pkt->remaining = 0;
   87|      3|}
statem_clnt.c:PACKET_as_length_prefixed_2:
  601|    123|{
  602|    123|    unsigned int length;
  603|    123|    const unsigned char *data;
  604|    123|    PACKET tmp = *pkt;
  605|       |
  606|    123|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (606:9): [True: 1, False: 122]
  |  Branch (606:45): [True: 14, False: 108]
  |  Branch (606:95): [True: 9, False: 99]
  ------------------
  607|     24|        return 0;
  608|     24|    }
  609|       |
  610|     99|    *pkt = tmp;
  611|     99|    subpkt->curr = data;
  612|     99|    subpkt->remaining = length;
  613|       |
  614|     99|    return 1;
  615|    123|}

ssl_cert.c:CRYPTO_NEW_REF:
  280|  4.74k|{
  281|  4.74k|    refcnt->val = n;
  282|  4.74k|    return 1;
  283|  4.74k|}
ssl_cert.c:CRYPTO_DOWN_REF:
   56|  4.74k|{
   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.74k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  4.74k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.74k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  4.74k|#endif
   68|  4.74k|    return 1;
   69|  4.74k|}
ssl_cert.c:CRYPTO_FREE_REF:
  286|  4.74k|{
  287|  4.74k|}
ssl_lib.c:CRYPTO_NEW_REF:
  280|  4.74k|{
  281|  4.74k|    refcnt->val = n;
  282|  4.74k|    return 1;
  283|  4.74k|}
ssl_lib.c:CRYPTO_FREE_REF:
  286|  4.74k|{
  287|  4.74k|}
ssl_lib.c:CRYPTO_UP_REF:
   40|  3.91k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  3.91k|    return 1;
   43|  3.91k|}
ssl_lib.c:CRYPTO_DOWN_REF:
   56|  8.65k|{
   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|  8.65k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  8.65k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.74k, False: 3.91k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  8.65k|#endif
   68|  8.65k|    return 1;
   69|  8.65k|}
ssl_sess.c:CRYPTO_NEW_REF:
  280|  1.95k|{
  281|  1.95k|    refcnt->val = n;
  282|  1.95k|    return 1;
  283|  1.95k|}
ssl_sess.c:CRYPTO_FREE_REF:
  286|  1.95k|{
  287|  1.95k|}
ssl_sess.c:CRYPTO_DOWN_REF:
   56|  1.95k|{
   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.95k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.95k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.95k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.95k|#endif
   68|  1.95k|    return 1;
   69|  1.95k|}
tasn_utl.c:CRYPTO_NEW_REF:
  280|   435k|{
  281|   435k|    refcnt->val = n;
  282|   435k|    return 1;
  283|   435k|}
tasn_utl.c:CRYPTO_FREE_REF:
  286|   435k|{
  287|   435k|}
tasn_utl.c:CRYPTO_DOWN_REF:
   56|   871k|{
   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|   871k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   871k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 435k, False: 435k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   871k|#endif
   68|   871k|    return 1;
   69|   871k|}
bio_lib.c:CRYPTO_NEW_REF:
  280|  2.64M|{
  281|  2.64M|    refcnt->val = n;
  282|  2.64M|    return 1;
  283|  2.64M|}
bio_lib.c:CRYPTO_FREE_REF:
  286|  2.64M|{
  287|  2.64M|}
bio_lib.c:CRYPTO_DOWN_REF:
   56|  3.53M|{
   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.53M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  3.53M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.64M, False: 891k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  3.53M|#endif
   68|  3.53M|    return 1;
   69|  3.53M|}
bio_lib.c:CRYPTO_UP_REF:
   40|   891k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   891k|    return 1;
   43|   891k|}
bio_lib.c:CRYPTO_GET_REF:
   72|  3.91k|{
   73|       |    *ret = atomic_load_explicit(&refcnt->val, memory_order_acquire);
   74|  3.91k|    return 1;
   75|  3.91k|}
dh_lib.c:CRYPTO_NEW_REF:
  280|     86|{
  281|     86|    refcnt->val = n;
  282|     86|    return 1;
  283|     86|}
dh_lib.c:CRYPTO_DOWN_REF:
   56|     86|{
   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|     86|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|     86|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 86, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|     86|#endif
   68|     86|    return 1;
   69|     86|}
dh_lib.c:CRYPTO_FREE_REF:
  286|     86|{
  287|     86|}
dso_lib.c:CRYPTO_NEW_REF:
  280|    973|{
  281|    973|    refcnt->val = n;
  282|    973|    return 1;
  283|    973|}
dso_lib.c:CRYPTO_DOWN_REF:
   56|    973|{
   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|    973|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|    973|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 973, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|    973|#endif
   68|    973|    return 1;
   69|    973|}
dso_lib.c:CRYPTO_FREE_REF:
  286|    973|{
  287|    973|}
ec_key.c:CRYPTO_DOWN_REF:
   56|   239k|{
   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|   239k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   239k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 120k, False: 119k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   239k|#endif
   68|   239k|    return 1;
   69|   239k|}
ec_key.c:CRYPTO_FREE_REF:
  286|   120k|{
  287|   120k|}
ec_key.c:CRYPTO_UP_REF:
   40|   119k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   119k|    return 1;
   43|   119k|}
ec_kmeth.c:CRYPTO_NEW_REF:
  280|   120k|{
  281|   120k|    refcnt->val = n;
  282|   120k|    return 1;
  283|   120k|}
decoder_meth.c:CRYPTO_UP_REF:
   40|  2.49M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  2.49M|    return 1;
   43|  2.49M|}
decoder_meth.c:CRYPTO_DOWN_REF:
   56|  2.49M|{
   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.49M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.49M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 76, False: 2.49M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.49M|#endif
   68|  2.49M|    return 1;
   69|  2.49M|}
decoder_meth.c:CRYPTO_FREE_REF:
  286|     76|{
  287|     76|}
decoder_meth.c:CRYPTO_NEW_REF:
  280|     76|{
  281|     76|    refcnt->val = n;
  282|     76|    return 1;
  283|     76|}
eng_init.c:CRYPTO_UP_REF:
   40|      5|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|      5|    return 1;
   43|      5|}
eng_lib.c:CRYPTO_NEW_REF:
  280|    835|{
  281|    835|    refcnt->val = n;
  282|    835|    return 1;
  283|    835|}
eng_lib.c:CRYPTO_FREE_REF:
  286|    835|{
  287|    835|}
eng_lib.c:CRYPTO_DOWN_REF:
   56|    850|{
   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|    850|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|    850|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 835, False: 15]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|    850|#endif
   68|    850|    return 1;
   69|    850|}
eng_list.c:CRYPTO_UP_REF:
   40|     10|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|     10|    return 1;
   43|     10|}
digest.c:CRYPTO_NEW_REF:
  280|  17.0k|{
  281|  17.0k|    refcnt->val = n;
  282|  17.0k|    return 1;
  283|  17.0k|}
digest.c:CRYPTO_UP_REF:
   40|   822k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   822k|    return 1;
   43|   822k|}
digest.c:CRYPTO_DOWN_REF:
   56|   839k|{
   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|   839k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   839k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 17.0k, False: 822k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   839k|#endif
   68|   839k|    return 1;
   69|   839k|}
evp_enc.c:CRYPTO_NEW_REF:
  280|  81.9k|{
  281|  81.9k|    refcnt->val = n;
  282|  81.9k|    return 1;
  283|  81.9k|}
evp_enc.c:CRYPTO_UP_REF:
   40|   135k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   135k|    return 1;
   43|   135k|}
evp_enc.c:CRYPTO_FREE_REF:
  286|  81.9k|{
  287|  81.9k|}
evp_enc.c:CRYPTO_DOWN_REF:
   56|   217k|{
   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|   217k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   217k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 81.9k, False: 135k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   217k|#endif
   68|   217k|    return 1;
   69|   217k|}
evp_lib.c:CRYPTO_FREE_REF:
  286|  17.0k|{
  287|  17.0k|}
exchange.c:CRYPTO_DOWN_REF:
   56|  15.3k|{
   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|  15.3k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  15.3k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.41k, False: 10.9k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  15.3k|#endif
   68|  15.3k|    return 1;
   69|  15.3k|}
exchange.c:CRYPTO_FREE_REF:
  286|  4.41k|{
  287|  4.41k|}
exchange.c:CRYPTO_UP_REF:
   40|  10.9k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  10.9k|    return 1;
   43|  10.9k|}
exchange.c:CRYPTO_NEW_REF:
  280|  4.41k|{
  281|  4.41k|    refcnt->val = n;
  282|  4.41k|    return 1;
  283|  4.41k|}
keymgmt_meth.c:CRYPTO_NEW_REF:
  280|  25.2k|{
  281|  25.2k|    refcnt->val = n;
  282|  25.2k|    return 1;
  283|  25.2k|}
keymgmt_meth.c:CRYPTO_UP_REF:
   40|  1.71M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  1.71M|    return 1;
   43|  1.71M|}
keymgmt_meth.c:CRYPTO_DOWN_REF:
   56|  1.73M|{
   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.73M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.73M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 25.2k, False: 1.71M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.73M|#endif
   68|  1.73M|    return 1;
   69|  1.73M|}
keymgmt_meth.c:CRYPTO_FREE_REF:
  286|  25.2k|{
  287|  25.2k|}
p_lib.c:CRYPTO_NEW_REF:
  280|   881k|{
  281|   881k|    refcnt->val = n;
  282|   881k|    return 1;
  283|   881k|}
p_lib.c:CRYPTO_FREE_REF:
  286|   881k|{
  287|   881k|}
p_lib.c:CRYPTO_UP_REF:
   40|   506k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   506k|    return 1;
   43|   506k|}
p_lib.c:CRYPTO_DOWN_REF:
   56|  1.38M|{
   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.38M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.38M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 881k, False: 506k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.38M|#endif
   68|  1.38M|    return 1;
   69|  1.38M|}
signature.c:CRYPTO_DOWN_REF:
   56|  80.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|  80.8k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  80.8k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 37.1k, False: 43.6k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  80.8k|#endif
   68|  80.8k|    return 1;
   69|  80.8k|}
signature.c:CRYPTO_FREE_REF:
  286|  37.1k|{
  287|  37.1k|}
signature.c:CRYPTO_UP_REF:
   40|  43.6k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  43.6k|    return 1;
   43|  43.6k|}
signature.c:CRYPTO_NEW_REF:
  280|  37.1k|{
  281|  37.1k|    refcnt->val = n;
  282|  37.1k|    return 1;
  283|  37.1k|}
provider_core.c:CRYPTO_UP_REF:
   40|   320k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   320k|    return 1;
   43|   320k|}
provider_core.c:CRYPTO_NEW_REF:
  280|  1.84k|{
  281|  1.84k|    refcnt->val = n;
  282|  1.84k|    return 1;
  283|  1.84k|}
provider_core.c:CRYPTO_DOWN_REF:
   56|   322k|{
   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|   322k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   322k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.84k, False: 320k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   322k|#endif
   68|   322k|    return 1;
   69|   322k|}
provider_core.c:CRYPTO_FREE_REF:
  286|  1.84k|{
  287|  1.84k|}
rsa_lib.c:CRYPTO_NEW_REF:
  280|   316k|{
  281|   316k|    refcnt->val = n;
  282|   316k|    return 1;
  283|   316k|}
rsa_lib.c:CRYPTO_DOWN_REF:
   56|   633k|{
   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|   633k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   633k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 316k, False: 316k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   633k|#endif
   68|   633k|    return 1;
   69|   633k|}
rsa_lib.c:CRYPTO_FREE_REF:
  286|   316k|{
  287|   316k|}
rsa_lib.c:CRYPTO_UP_REF:
   40|   316k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   316k|    return 1;
   43|   316k|}
x509_lu.c:CRYPTO_NEW_REF:
  280|  2.78k|{
  281|  2.78k|    refcnt->val = n;
  282|  2.78k|    return 1;
  283|  2.78k|}
x509_lu.c:CRYPTO_DOWN_REF:
   56|  2.78k|{
   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.78k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.78k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.78k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.78k|#endif
   68|  2.78k|    return 1;
   69|  2.78k|}
x509_lu.c:CRYPTO_FREE_REF:
  286|  2.78k|{
  287|  2.78k|}
x509_set.c:CRYPTO_UP_REF:
   40|   435k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   435k|    return 1;
   43|   435k|}
ossl_core_bio.c:CRYPTO_UP_REF:
   40|   871k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   871k|    return 1;
   43|   871k|}
ossl_core_bio.c:CRYPTO_DOWN_REF:
   56|  1.74M|{
   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.74M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.74M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 871k, False: 871k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.74M|#endif
   68|  1.74M|    return 1;
   69|  1.74M|}
ossl_core_bio.c:CRYPTO_FREE_REF:
  286|   871k|{
  287|   871k|}
ossl_core_bio.c:CRYPTO_NEW_REF:
  280|   871k|{
  281|   871k|    refcnt->val = n;
  282|   871k|    return 1;
  283|   871k|}
ecx_key.c:CRYPTO_NEW_REF:
  280|  2.81k|{
  281|  2.81k|    refcnt->val = n;
  282|  2.81k|    return 1;
  283|  2.81k|}
ecx_key.c:CRYPTO_FREE_REF:
  286|  2.81k|{
  287|  2.81k|}
ecx_key.c:CRYPTO_DOWN_REF:
   56|  2.81k|{
   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.81k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.81k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.81k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.81k|#endif
   68|  2.81k|    return 1;
   69|  2.81k|}
evp_rand.c:CRYPTO_UP_REF:
   40|  10.4k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  10.4k|    return 1;
   43|  10.4k|}
evp_rand.c:CRYPTO_NEW_REF:
  280|  5.50k|{
  281|  5.50k|    refcnt->val = n;
  282|  5.50k|    return 1;
  283|  5.50k|}
evp_rand.c:CRYPTO_FREE_REF:
  286|  5.50k|{
  287|  5.50k|}
evp_rand.c:CRYPTO_DOWN_REF:
   56|  15.9k|{
   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|  15.9k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  15.9k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 5.50k, False: 10.4k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  15.9k|#endif
   68|  15.9k|    return 1;
   69|  15.9k|}

ssl_sess.c:safe_add_time:
   51|  3.90k|    {                                                                \
   52|  3.90k|        type r;                                                      \
   53|  3.90k|                                                                     \
   54|  3.90k|        if (!__builtin_add_overflow(a, b, &r))                       \
  ------------------
  |  Branch (54:13): [True: 3.90k, False: 0]
  ------------------
   55|  3.90k|            return r;                                                \
   56|  3.90k|        *err |= 1;                                                   \
   57|      0|        return a + b;                                                \
   58|  3.90k|    }
array_alloc.c:safe_mul_size_t:
  151|  22.3M|    {                                                                \
  152|  22.3M|        type r;                                                      \
  153|  22.3M|                                                                     \
  154|  22.3M|        if (!__builtin_mul_overflow(a, b, &r))                       \
  ------------------
  |  Branch (154:13): [True: 22.3M, False: 0]
  ------------------
  155|  22.3M|            return r;                                                \
  156|  22.3M|        *err |= 1;                                                   \
  157|      0|        return a * b;                                                \
  158|  22.3M|    }
stack.c:safe_muldiv_int:
  324|   640k|    {                                                                   \
  325|   640k|        int e2 = 0;                                                     \
  326|   640k|        type q, r, x, y;                                                \
  327|   640k|                                                                        \
  328|   640k|        if (c == 0) {                                                   \
  ------------------
  |  Branch (328:13): [True: 0, False: 640k]
  ------------------
  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|   640k|        x = safe_mul_##type_name(a, b, &e2);                            \
  333|   640k|        if (!e2)                                                        \
  ------------------
  |  Branch (333:13): [True: 640k, False: 0]
  ------------------
  334|   640k|            return safe_div_##type_name(x, c, err);                     \
  335|   640k|        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|   640k|    }
stack.c:safe_mul_int:
  138|   640k|    {                                                                \
  139|   640k|        type r;                                                      \
  140|   640k|                                                                     \
  141|   640k|        if (!__builtin_mul_overflow(a, b, &r))                       \
  ------------------
  |  Branch (141:13): [True: 640k, False: 0]
  ------------------
  142|   640k|            return r;                                                \
  143|   640k|        *err |= 1;                                                   \
  144|      0|        return (a < 0) ^ (b < 0) ? min : max;                        \
  ------------------
  |  Branch (144:16): [True: 0, False: 0]
  ------------------
  145|   640k|    }
stack.c:safe_div_int:
  201|   640k|    {                                                                \
  202|   640k|        if (b == 0) {                                                \
  ------------------
  |  Branch (202:13): [True: 0, False: 640k]
  ------------------
  203|      0|            *err |= 1;                                               \
  204|      0|            return a < 0 ? min : max;                                \
  ------------------
  |  Branch (204:20): [True: 0, False: 0]
  ------------------
  205|      0|        }                                                            \
  206|   640k|        if (b == -1 && a == min) {                                   \
  ------------------
  |  Branch (206:13): [True: 0, False: 640k]
  |  Branch (206:24): [True: 0, False: 0]
  ------------------
  207|      0|            *err |= 1;                                               \
  208|      0|            return max;                                              \
  209|      0|        }                                                            \
  210|   640k|        return a / b;                                                \
  211|   640k|    }

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|    }                                \
conf_mod.c:do_init_module_list_lock_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
do_engine_lock_init_ossl_:
   41|      1|    {                              \
   42|      1|        init##_ossl_ret_ = init(); \
   43|      1|    }                              \
err.c:do_err_strings_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_register_atexit_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_load_crypto_nodelete_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|    }                                \
init.c:ossl_init_engine_rdrand_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_engine_dynamic_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_engine_padlock_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
initthread.c:ossl_init_thread_once_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:
  169|  3.90k|{
  170|  3.90k|    OSSL_TIME r;
  171|  3.90k|    int err = 0;
  172|       |
  173|  3.90k|    r.t = safe_add_time(a.t, b.t, &err);
  174|  3.90k|    return err ? ossl_time_infinite() : r;
  ------------------
  |  Branch (174:12): [True: 0, False: 3.90k]
  ------------------
  175|  3.90k|}
ssl_sess.c:ossl_ticks2time:
   59|  3.90k|{
   60|  3.90k|    OSSL_TIME r;
   61|       |
   62|  3.90k|    r.t = ticks;
   63|  3.90k|    return r;
   64|  3.90k|}
ssl_sess.c:ossl_time_is_zero:
  157|  1.95k|{
  158|  1.95k|    return ossl_time_compare(t, ossl_time_zero()) == 0;
  159|  1.95k|}
ssl_sess.c:ossl_time_compare:
  147|  1.95k|{
  148|  1.95k|    if (a.t > b.t)
  ------------------
  |  Branch (148:9): [True: 1.95k, False: 0]
  ------------------
  149|  1.95k|        return 1;
  150|      0|    if (a.t < b.t)
  ------------------
  |  Branch (150:9): [True: 0, False: 0]
  ------------------
  151|      0|        return -1;
  152|      0|    return 0;
  153|      0|}
ssl_sess.c:ossl_time_zero:
   79|  1.95k|{
   80|  1.95k|    return ossl_ticks2time(0);
   81|  1.95k|}
ssl_sess.c:ossl_time_from_time_t:
  137|  2.78k|{
  138|  2.78k|    OSSL_TIME ot;
  139|       |
  140|  2.78k|    ot.t = t;
  141|  2.78k|    ot.t *= OSSL_TIME_SECOND;
  ------------------
  |  |   31|  2.78k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  ------------------
  142|  2.78k|    return ot;
  143|  2.78k|}
t1_lib.c:ossl_ticks2time:
   59|  2.78k|{
   60|  2.78k|    OSSL_TIME r;
   61|       |
   62|  2.78k|    r.t = ticks;
   63|  2.78k|    return r;
   64|  2.78k|}

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

ASN1_TYPE_new:
  800|  1.94M|    {                                                               \
  801|  1.94M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  433|  1.94M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  1.94M|    }                                                               \
X509_ALGOR_new:
  800|   871k|    {                                                               \
  801|   871k|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|   871k|    }                                                               \
X509_ALGOR_free:
  804|   871k|    {                                                               \
  805|   871k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   871k|    }
RSAPublicKey_it:
  241|   316k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   316k|    {                                  \
  |  |   98|   316k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   316k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   316k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   316k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   316k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   316k|        tname##_seq_tt,                                 \
  245|   316k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   316k|        &tname##_aux,                                   \
  247|   316k|        sizeof(stname),                                 \
  248|   316k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   316k|    }                         \
  |  |  105|   316k|    ;                         \
  |  |  106|   316k|    return &local_it;         \
  |  |  107|   316k|    }
  ------------------
RSA_PSS_PARAMS_it:
  241|   316k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   316k|    {                                  \
  |  |   98|   316k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   316k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   316k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   316k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   316k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   316k|        tname##_seq_tt,                                 \
  245|   316k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   316k|        &tname##_aux,                                   \
  247|   316k|        sizeof(stname),                                 \
  248|   316k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   316k|    }                         \
  |  |  105|   316k|    ;                         \
  |  |  106|   316k|    return &local_it;         \
  |  |  107|   316k|    }
  ------------------
RSA_PSS_PARAMS_free:
  804|   316k|    {                                                               \
  805|   316k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   316k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   316k|    }
d2i_RSAPublicKey:
  814|   316k|    {                                                                                      \
  815|   316k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  433|   316k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   316k|    }                                                                                      \
GENERAL_NAMES_free:
  804|   871k|    {                                                               \
  805|   871k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   871k|    }
NAME_CONSTRAINTS_free:
  804|   871k|    {                                                               \
  805|   871k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   871k|    }
X509_CRL_it:
  241|   438k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   438k|    {                                  \
  |  |   98|   438k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   438k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   438k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   438k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   438k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   438k|        tname##_seq_tt,                                 \
  245|   438k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   438k|        &tname##_aux,                                   \
  247|   438k|        sizeof(stname),                                 \
  248|   438k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   438k|    }                         \
  |  |  105|   438k|    ;                         \
  |  |  106|   438k|    return &local_it;         \
  |  |  107|   438k|    }
  ------------------
X509_CRL_free:
  804|   438k|    {                                                               \
  805|   438k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   438k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   438k|    }
X509_NAME_ENTRY_new:
  800|  3.16M|    {                                                               \
  801|  3.16M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  433|  3.16M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  3.16M|    }                                                               \
X509_NAME_ENTRY_free:
  804|  7.21M|    {                                                               \
  805|  7.21M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|  7.21M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  7.21M|    }
X509_NAME_free:
  804|  44.0k|    {                                                               \
  805|  44.0k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|  44.0k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  44.0k|    }
d2i_X509_PUBKEY:
  814|   435k|    {                                                                                      \
  815|   435k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  433|   435k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   435k|    }                                                                                      \
X509_PUBKEY_free:
  804|   871k|    {                                                               \
  805|   871k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   871k|    }
X509_CINF_it:
  241|  2.44M|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  2.44M|    {                                  \
  |  |   98|  2.44M|        static const ASN1_ITEM local_it = {
  ------------------
  242|  2.44M|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  2.44M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  2.44M|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  2.44M|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  2.44M|        tname##_seq_tt,                                 \
  245|  2.44M|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  2.44M|        &tname##_aux,                                   \
  247|  2.44M|        sizeof(stname),                                 \
  248|  2.44M|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  2.44M|    }                         \
  |  |  105|  2.44M|    ;                         \
  |  |  106|  2.44M|    return &local_it;         \
  |  |  107|  2.44M|    }
  ------------------
X509_it:
  241|  2.18M|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  2.18M|    {                                  \
  |  |   98|  2.18M|        static const ASN1_ITEM local_it = {
  ------------------
  242|  2.18M|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  2.18M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  2.18M|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  2.18M|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  2.18M|        tname##_seq_tt,                                 \
  245|  2.18M|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  2.18M|        &tname##_aux,                                   \
  247|  2.18M|        sizeof(stname),                                 \
  248|  2.18M|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  2.18M|    }                         \
  |  |  105|  2.18M|    ;                         \
  |  |  106|  2.18M|    return &local_it;         \
  |  |  107|  2.18M|    }
  ------------------
d2i_X509:
  814|   435k|    {                                                                                      \
  815|   435k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  433|   435k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   435k|    }                                                                                      \
X509_free:
  804|   936k|    {                                                               \
  805|   936k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   936k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   936k|    }
X509_CERT_AUX_free:
  804|   871k|    {                                                               \
  805|   871k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   871k|    }
AUTHORITY_KEYID_free:
  804|   871k|    {                                                               \
  805|   871k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   871k|    }
ASIdentifiers_free:
  804|   871k|    {                                                               \
  805|   871k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   871k|    }
BASIC_CONSTRAINTS_free:
  804|   378k|    {                                                               \
  805|   378k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   378k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   378k|    }
CRL_DIST_POINTS_free:
  804|   871k|    {                                                               \
  805|   871k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   871k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   871k|    }

ml_kem.c:OPENSSL_store_u64_le:
  160|   425k|{
  161|   425k|#ifdef OSSL_HTOLE64
  162|   425k|    uint64_t t = OSSL_HTOLE64(val);
  ------------------
  |  |   52|   425k|#define OSSL_HTOLE64(x) htole64(x)
  ------------------
  163|       |
  164|   425k|    memcpy(out, (unsigned char *)&t, 8);
  165|   425k|    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|   425k|}

tls_common.c:OSSL_FUNC_rlayer_skip_early_data:
   60|  11.7k|    {                                                  \
   61|  11.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  11.7k|    }
tls_common.c:OSSL_FUNC_rlayer_security:
   60|  11.7k|    {                                                  \
   61|  11.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  11.7k|    }
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|  17.0k|    {                                                  \
   61|  17.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.0k|    }
digest.c:OSSL_FUNC_digest_init:
   60|  17.0k|    {                                                  \
   61|  17.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.0k|    }
digest.c:OSSL_FUNC_digest_update:
   60|  17.0k|    {                                                  \
   61|  17.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.0k|    }
digest.c:OSSL_FUNC_digest_final:
   60|  17.0k|    {                                                  \
   61|  17.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.0k|    }
digest.c:OSSL_FUNC_digest_squeeze:
   60|  2.52k|    {                                                  \
   61|  2.52k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.52k|    }
digest.c:OSSL_FUNC_digest_freectx:
   60|  17.0k|    {                                                  \
   61|  17.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.0k|    }
digest.c:OSSL_FUNC_digest_dupctx:
   60|  17.0k|    {                                                  \
   61|  17.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.0k|    }
digest.c:OSSL_FUNC_digest_get_params:
   60|  17.0k|    {                                                  \
   61|  17.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.0k|    }
digest.c:OSSL_FUNC_digest_set_ctx_params:
   60|  5.04k|    {                                                  \
   61|  5.04k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.04k|    }
digest.c:OSSL_FUNC_digest_get_ctx_params:
   60|  3.78k|    {                                                  \
   61|  3.78k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.78k|    }
digest.c:OSSL_FUNC_digest_gettable_params:
   60|  17.0k|    {                                                  \
   61|  17.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.0k|    }
digest.c:OSSL_FUNC_digest_settable_ctx_params:
   60|  5.04k|    {                                                  \
   61|  5.04k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.04k|    }
digest.c:OSSL_FUNC_digest_gettable_ctx_params:
   60|  3.78k|    {                                                  \
   61|  3.78k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.78k|    }
digest.c:OSSL_FUNC_digest_copyctx:
   60|  17.0k|    {                                                  \
   61|  17.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.0k|    }
evp_enc.c:OSSL_FUNC_cipher_newctx:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_init:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_init:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_skey_init:
   60|  42.8k|    {                                                  \
   61|  42.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  42.8k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_skey_init:
   60|  42.8k|    {                                                  \
   61|  42.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  42.8k|    }
evp_enc.c:OSSL_FUNC_cipher_update:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_final:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_cipher:
   60|  74.3k|    {                                                  \
   61|  74.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  74.3k|    }
evp_enc.c:OSSL_FUNC_cipher_freectx:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_dupctx:
   60|  81.2k|    {                                                  \
   61|  81.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.2k|    }
evp_enc.c:OSSL_FUNC_cipher_get_params:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_get_ctx_params:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_set_ctx_params:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_params:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_ctx_params:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
evp_enc.c:OSSL_FUNC_cipher_settable_ctx_params:
   60|  81.9k|    {                                                  \
   61|  81.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  81.9k|    }
exchange.c:OSSL_FUNC_keyexch_newctx:
   60|  4.41k|    {                                                  \
   61|  4.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.41k|    }
exchange.c:OSSL_FUNC_keyexch_init:
   60|  4.41k|    {                                                  \
   61|  4.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.41k|    }
exchange.c:OSSL_FUNC_keyexch_set_peer:
   60|  2.52k|    {                                                  \
   61|  2.52k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.52k|    }
exchange.c:OSSL_FUNC_keyexch_derive:
   60|  4.41k|    {                                                  \
   61|  4.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.41k|    }
exchange.c:OSSL_FUNC_keyexch_freectx:
   60|  4.41k|    {                                                  \
   61|  4.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.41k|    }
exchange.c:OSSL_FUNC_keyexch_dupctx:
   60|  4.41k|    {                                                  \
   61|  4.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.41k|    }
exchange.c:OSSL_FUNC_keyexch_get_ctx_params:
   60|  4.41k|    {                                                  \
   61|  4.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.41k|    }
exchange.c:OSSL_FUNC_keyexch_gettable_ctx_params:
   60|  4.41k|    {                                                  \
   61|  4.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.41k|    }
exchange.c:OSSL_FUNC_keyexch_set_ctx_params:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
exchange.c:OSSL_FUNC_keyexch_settable_ctx_params:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
exchange.c:OSSL_FUNC_keyexch_derive_skey:
   60|    630|    {                                                  \
   61|    630|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    630|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new:
   60|  25.2k|    {                                                  \
   61|  25.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  25.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_init:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_template:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_params:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_settable_params:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_get_params:
   60|  1.26k|    {                                                  \
   61|  1.26k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.26k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_gettable_params:
   60|  1.26k|    {                                                  \
   61|  1.26k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.26k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_cleanup:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_free:
   60|  25.2k|    {                                                  \
   61|  25.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  25.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_load:
   60|  18.2k|    {                                                  \
   61|  18.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_get_params:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gettable_params:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_set_params:
   60|  11.9k|    {                                                  \
   61|  11.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  11.9k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_settable_params:
   60|  11.9k|    {                                                  \
   61|  11.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  11.9k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_query_operation_name:
   60|  2.52k|    {                                                  \
   61|  2.52k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.52k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_has:
   60|  25.2k|    {                                                  \
   61|  25.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  25.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_dup:
   60|  20.7k|    {                                                  \
   61|  20.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.7k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_validate:
   60|  18.2k|    {                                                  \
   61|  18.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_match:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import_types:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export_types:
   60|  23.3k|    {                                                  \
   61|  23.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.3k|    }
signature.c:OSSL_FUNC_signature_newctx:
   60|  37.1k|    {                                                  \
   61|  37.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  37.1k|    }
signature.c:OSSL_FUNC_signature_sign_init:
   60|  25.2k|    {                                                  \
   61|  25.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  25.2k|    }
signature.c:OSSL_FUNC_signature_sign:
   60|  34.6k|    {                                                  \
   61|  34.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  34.6k|    }
signature.c:OSSL_FUNC_signature_sign_message_init:
   60|  32.1k|    {                                                  \
   61|  32.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  32.1k|    }
signature.c:OSSL_FUNC_signature_sign_message_update:
   60|  21.4k|    {                                                  \
   61|  21.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.4k|    }
signature.c:OSSL_FUNC_signature_sign_message_final:
   60|  21.4k|    {                                                  \
   61|  21.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.4k|    }
signature.c:OSSL_FUNC_signature_verify_init:
   60|  25.2k|    {                                                  \
   61|  25.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  25.2k|    }
signature.c:OSSL_FUNC_signature_verify:
   60|  34.6k|    {                                                  \
   61|  34.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  34.6k|    }
signature.c:OSSL_FUNC_signature_verify_message_init:
   60|  32.1k|    {                                                  \
   61|  32.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  32.1k|    }
signature.c:OSSL_FUNC_signature_verify_message_update:
   60|  21.4k|    {                                                  \
   61|  21.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.4k|    }
signature.c:OSSL_FUNC_signature_verify_message_final:
   60|  21.4k|    {                                                  \
   61|  21.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.4k|    }
signature.c:OSSL_FUNC_signature_verify_recover_init:
   60|  8.82k|    {                                                  \
   61|  8.82k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  8.82k|    }
signature.c:OSSL_FUNC_signature_verify_recover:
   60|  8.82k|    {                                                  \
   61|  8.82k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  8.82k|    }
signature.c:OSSL_FUNC_signature_digest_sign_init:
   60|  15.7k|    {                                                  \
   61|  15.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  15.7k|    }
signature.c:OSSL_FUNC_signature_digest_sign_update:
   60|  5.04k|    {                                                  \
   61|  5.04k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.04k|    }
signature.c:OSSL_FUNC_signature_digest_sign_final:
   60|  5.04k|    {                                                  \
   61|  5.04k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.04k|    }
signature.c:OSSL_FUNC_signature_digest_sign:
   60|  10.7k|    {                                                  \
   61|  10.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  10.7k|    }
signature.c:OSSL_FUNC_signature_digest_verify_init:
   60|  13.2k|    {                                                  \
   61|  13.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  13.2k|    }
signature.c:OSSL_FUNC_signature_digest_verify_update:
   60|  2.52k|    {                                                  \
   61|  2.52k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.52k|    }
signature.c:OSSL_FUNC_signature_digest_verify_final:
   60|  2.52k|    {                                                  \
   61|  2.52k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.52k|    }
signature.c:OSSL_FUNC_signature_digest_verify:
   60|  10.7k|    {                                                  \
   61|  10.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  10.7k|    }
signature.c:OSSL_FUNC_signature_freectx:
   60|  37.1k|    {                                                  \
   61|  37.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  37.1k|    }
signature.c:OSSL_FUNC_signature_dupctx:
   60|  37.1k|    {                                                  \
   61|  37.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  37.1k|    }
signature.c:OSSL_FUNC_signature_get_ctx_params:
   60|  34.6k|    {                                                  \
   61|  34.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  34.6k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_params:
   60|  34.6k|    {                                                  \
   61|  34.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  34.6k|    }
signature.c:OSSL_FUNC_signature_set_ctx_params:
   60|  37.1k|    {                                                  \
   61|  37.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  37.1k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_params:
   60|  37.1k|    {                                                  \
   61|  37.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  37.1k|    }
signature.c:OSSL_FUNC_signature_get_ctx_md_params:
   60|  2.52k|    {                                                  \
   61|  2.52k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.52k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_md_params:
   60|  2.52k|    {                                                  \
   61|  2.52k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.52k|    }
signature.c:OSSL_FUNC_signature_set_ctx_md_params:
   60|  2.52k|    {                                                  \
   61|  2.52k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.52k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_md_params:
   60|  2.52k|    {                                                  \
   61|  2.52k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.52k|    }
signature.c:OSSL_FUNC_signature_query_key_types:
   60|  22.6k|    {                                                  \
   61|  22.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  22.6k|    }
provider_core.c:OSSL_FUNC_provider_teardown:
   60|  1.41k|    {                                                  \
   61|  1.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.41k|    }
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|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
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|    631|    {                                                  \
   61|    631|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    631|    }
baseprov.c:OSSL_FUNC_core_get_params:
   60|    631|    {                                                  \
   61|    631|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    631|    }
baseprov.c:OSSL_FUNC_core_get_libctx:
   60|    631|    {                                                  \
   61|    631|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    631|    }
defltprov.c:OSSL_FUNC_core_gettable_params:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
defltprov.c:OSSL_FUNC_core_get_params:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
defltprov.c:OSSL_FUNC_core_get_libctx:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
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|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
provider_seeding.c:OSSL_FUNC_get_user_entropy:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
provider_seeding.c:OSSL_FUNC_cleanup_entropy:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_entropy:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
provider_seeding.c:OSSL_FUNC_get_nonce:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
provider_seeding.c:OSSL_FUNC_get_user_nonce:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
provider_seeding.c:OSSL_FUNC_cleanup_nonce:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_nonce:
   60|    785|    {                                                  \
   61|    785|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    785|    }
drbg.c:OSSL_FUNC_rand_enable_locking:
   60|  1.65k|    {                                                  \
   61|  1.65k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.65k|    }
drbg.c:OSSL_FUNC_rand_lock:
   60|  1.65k|    {                                                  \
   61|  1.65k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.65k|    }
drbg.c:OSSL_FUNC_rand_unlock:
   60|  1.65k|    {                                                  \
   61|  1.65k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.65k|    }
drbg.c:OSSL_FUNC_rand_get_ctx_params:
   60|  1.65k|    {                                                  \
   61|  1.65k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.65k|    }
drbg.c:OSSL_FUNC_rand_get_seed:
   60|  1.65k|    {                                                  \
   61|  1.65k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.65k|    }
drbg.c:OSSL_FUNC_rand_clear_seed:
   60|  1.65k|    {                                                  \
   61|  1.65k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.65k|    }
evp_rand.c:OSSL_FUNC_rand_newctx:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_freectx:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_instantiate:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_uninstantiate:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_generate:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_reseed:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_nonce:
   60|    551|    {                                                  \
   61|    551|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    551|    }
evp_rand.c:OSSL_FUNC_rand_enable_locking:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_lock:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_unlock:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_gettable_ctx_params:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_settable_ctx_params:
   60|  2.20k|    {                                                  \
   61|  2.20k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.20k|    }
evp_rand.c:OSSL_FUNC_rand_get_ctx_params:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_set_ctx_params:
   60|  2.20k|    {                                                  \
   61|  2.20k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.20k|    }
evp_rand.c:OSSL_FUNC_rand_verify_zeroization:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_get_seed:
   60|  3.29k|    {                                                  \
   61|  3.29k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.29k|    }
evp_rand.c:OSSL_FUNC_rand_clear_seed:
   60|  2.74k|    {                                                  \
   61|  2.74k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.74k|    }

ssl_lib.c:ERR_GET_LIB:
  244|    414|{
  245|    414|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|    414|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|    414|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 414]
  |  |  ------------------
  ------------------
  246|      0|        return ERR_LIB_SYS;
  ------------------
  |  |   74|      0|#define ERR_LIB_SYS 2
  ------------------
  247|    414|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  228|    414|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  229|    414|#define ERR_LIB_MASK 0xFF
  ------------------
  248|    414|}
conf_mod.c:ERR_GET_REASON:
  258|      1|{
  259|      1|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|      1|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|      1|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|      1|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|      1|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|      1|}
err.c:ERR_GET_LIB:
  244|  8.19k|{
  245|  8.19k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|  8.19k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  8.19k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 28, False: 8.16k]
  |  |  ------------------
  ------------------
  246|     28|        return ERR_LIB_SYS;
  ------------------
  |  |   74|     28|#define ERR_LIB_SYS 2
  ------------------
  247|  8.16k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  228|  8.16k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  229|  8.16k|#define ERR_LIB_MASK 0xFF
  ------------------
  248|  8.19k|}
err.c:ERR_GET_REASON:
  258|  1.32k|{
  259|  1.32k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|  1.32k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  1.32k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 14, False: 1.30k]
  |  |  ------------------
  ------------------
  260|     14|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|     14|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|  1.30k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|  1.30k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|  1.32k|}
pem_info.c:ERR_GET_REASON:
  258|  3.00k|{
  259|  3.00k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|  3.00k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  3.00k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 3.00k]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|  3.00k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|  3.00k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|  3.00k|}
pem_lib.c:ERR_GET_REASON:
  258|  2.70k|{
  259|  2.70k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|  2.70k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  2.70k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 2.70k]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|  2.70k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|  2.70k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|  2.70k|}
by_file.c:ERR_GET_REASON:
  258|  2.69k|{
  259|  2.69k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|  2.69k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  2.69k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 2.69k]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|  2.69k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|  2.69k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|  2.69k|}
a_d2i_fp.c:ERR_GET_REASON:
  258|   871k|{
  259|   871k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|   871k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|   871k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 871k]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|   871k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|   871k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|   871k|}
conf_def.c:ERR_GET_REASON:
  258|    785|{
  259|    785|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|    785|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|    785|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 785]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|    785|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|    785|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|    785|}

ssl_lib.c:lh_SSL_SESSION_new:
  334|  2.78k|    {                                                                                                                      \
  335|  2.78k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  2.78k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  2.78k|            lh_##type##_doall_thunk,                                                                                       \
  338|  2.78k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  2.78k|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_hfn_thunk:
  260|      9|    {                                                                                                                      \
  261|      9|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|      9|        return hfn_conv((const type *)data);                                                                               \
  263|      9|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_free:
  271|  2.78k|    {                                                                                                                      \
  272|  2.78k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  2.78k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_retrieve:
  291|      9|    {                                                                                                                      \
  292|      9|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|      9|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_get_down_load:
  306|  2.78k|    {                                                                                                                      \
  307|  2.78k|        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh);                                                              \
  308|  2.78k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_set_down_load:
  311|  5.56k|    {                                                                                                                      \
  312|  5.56k|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|  5.56k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_new:
  334|    785|    {                                                                                                                      \
  335|    785|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    785|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    785|            lh_##type##_doall_thunk,                                                                                       \
  338|    785|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    785|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_hfn_thunk:
  260|   435k|    {                                                                                                                      \
  261|   435k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   435k|        return hfn_conv((const type *)data);                                                                               \
  263|   435k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_cfn_thunk:
  265|   435k|    {                                                                                                                      \
  266|   435k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   435k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   435k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_doall_thunk:
  316|      2|    {                                                                                                                      \
  317|      2|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|      2|        doall_conv((type *)node);                                                                                          \
  319|      2|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_doall:
  328|  2.62k|    {                                                                                                                      \
  329|  2.62k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|  2.62k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_free:
  271|    785|    {                                                                                                                      \
  272|    785|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    785|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_flush:
  276|  1.84k|    {                                                                                                                      \
  277|  1.84k|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|  1.84k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_retrieve:
  291|   435k|    {                                                                                                                      \
  292|   435k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   435k|    }                                                                                                                      \
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.22k|    {                                                                                                          \
  209|  6.22k|        return (OPENSSL_LHASH *)lh;                                                                            \
  210|  6.22k|    }                                                                                                          \
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.22k|    {                                                                                                          \
  173|  6.22k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                        \
  174|  6.22k|        return hfn_conv((const type *)data);                                                                   \
  175|  6.22k|    }                                                                                                          \
err.c:lh_ERR_STRING_DATA_comp_thunk:
  177|  4.61k|    {                                                                                                          \
  178|  4.61k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                \
  179|  4.61k|        return cfn_conv((const type *)da, (const type *)db);                                                   \
  180|  4.61k|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_plain_type:
  193|  4.85k|    {                                                                                                          \
  194|  4.85k|        return ptr;                                                                                            \
  195|  4.85k|    }                                                                                                          \
err.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type:
  198|  1.37k|    {                                                                                                          \
  199|  1.37k|        return ptr;                                                                                            \
  200|  1.37k|    }                                                                                                          \
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|   716k|    {                                                                                                                      \
  261|   716k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   716k|        return hfn_conv((const type *)data);                                                                               \
  263|   716k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_cfn_thunk:
  265|   617k|    {                                                                                                                      \
  266|   617k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   617k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   617k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_doall_thunk:
  316|    543|    {                                                                                                                      \
  317|    543|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|    543|        doall_conv((type *)node);                                                                                          \
  319|    543|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_retrieve:
  291|   715k|    {                                                                                                                      \
  292|   715k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   715k|    }                                                                                                                      \
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_delete:
  286|    242|    {                                                                                                                      \
  287|    242|        return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d);                                                          \
  288|    242|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL:
  371|  1.26k|    {                                                                                       \
  372|  1.26k|        OPENSSL_LH_doall_arg_thunk((OPENSSL_LHASH *)lh,                                     \
  373|  1.26k|            lh_##type##_doall_##argtype##_thunk,                                            \
  374|  1.26k|            (OPENSSL_LH_DOALL_FUNCARG)fn,                                                   \
  375|  1.26k|            (void *)arg);                                                                   \
  376|  1.26k|    }                                                                                       \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL_thunk:
  363|   304k|    {                                                                                       \
  364|   304k|        void (*fn_conv)(cbargtype *, argtype *) = (void (*)(cbargtype *, argtype *))fn;     \
  365|   304k|        fn_conv((cbargtype *)node, (argtype *)arg);                                         \
  366|   304k|    }                                                                                       \
o_names.c:lh_OBJ_NAME_get_down_load:
  306|      4|    {                                                                                                                      \
  307|      4|        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh);                                                              \
  308|      4|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_set_down_load:
  311|      7|    {                                                                                                                      \
  312|      7|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|      7|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_doall:
  328|      4|    {                                                                                                                      \
  329|      4|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|      4|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_free:
  271|      1|    {                                                                                                                      \
  272|      1|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|      1|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_set_down_load:
  311|      1|    {                                                                                                                      \
  312|      1|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|      1|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_doall:
  328|      3|    {                                                                                                                      \
  329|      3|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|      3|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_free:
  271|      1|    {                                                                                                                      \
  272|      1|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|      1|    }                                                                                                                      \
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|   538k|    {                                                                                                                      \
  261|   538k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   538k|        return hfn_conv((const type *)data);                                                                               \
  263|   538k|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_retrieve:
  291|   538k|    {                                                                                                                      \
  292|   538k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   538k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall:
  328|    785|    {                                                                                                                      \
  329|    785|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|    785|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_free:
  271|    785|    {                                                                                                                      \
  272|    785|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    785|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_new:
  334|    785|    {                                                                                                                      \
  335|    785|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    785|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    785|            lh_##type##_doall_thunk,                                                                                       \
  338|    785|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    785|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_hfn_thunk:
  260|   171k|    {                                                                                                                      \
  261|   171k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   171k|        return hfn_conv((const type *)data);                                                                               \
  263|   171k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_cfn_thunk:
  265|   167k|    {                                                                                                                      \
  266|   167k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   167k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   167k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall_thunk:
  316|  1.18k|    {                                                                                                                      \
  317|  1.18k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  1.18k|        doall_conv((type *)node);                                                                                          \
  319|  1.18k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_retrieve:
  291|   170k|    {                                                                                                                      \
  292|   170k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   170k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_insert:
  281|  1.18k|    {                                                                                                                      \
  282|  1.18k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  1.18k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_error:
  296|  1.18k|    {                                                                                                                      \
  297|  1.18k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  1.18k|    }                                                                                                                      \
property.c:lh_QUERY_doall:
  328|   169k|    {                                                                                                                      \
  329|   169k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|   169k|    }                                                                                                                      \
property.c:lh_QUERY_free:
  271|   168k|    {                                                                                                                      \
  272|   168k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|   168k|    }                                                                                                                      \
property.c:lh_QUERY_new:
  334|   168k|    {                                                                                                                      \
  335|   168k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|   168k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|   168k|            lh_##type##_doall_thunk,                                                                                       \
  338|   168k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|   168k|    }                                                                                                                      \
property.c:lh_QUERY_hfn_thunk:
  260|   745k|    {                                                                                                                      \
  261|   745k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   745k|        return hfn_conv((const type *)data);                                                                               \
  263|   745k|    }                                                                                                                      \
property.c:lh_QUERY_cfn_thunk:
  265|   686k|    {                                                                                                                      \
  266|   686k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   686k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   686k|    }                                                                                                                      \
property.c:lh_QUERY_doall_thunk:
  316|  27.8k|    {                                                                                                                      \
  317|  27.8k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  27.8k|        doall_conv((type *)node);                                                                                          \
  319|  27.8k|    }                                                                                                                      \
property.c:lh_QUERY_num_items:
  301|  1.13k|    {                                                                                                                      \
  302|  1.13k|        return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh);                                                                  \
  303|  1.13k|    }                                                                                                                      \
property.c:lh_QUERY_flush:
  276|  1.13k|    {                                                                                                                      \
  277|  1.13k|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|  1.13k|    }                                                                                                                      \
property.c:lh_QUERY_retrieve:
  291|   718k|    {                                                                                                                      \
  292|   718k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   718k|    }                                                                                                                      \
property.c:lh_QUERY_insert:
  281|  27.8k|    {                                                                                                                      \
  282|  27.8k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  27.8k|    }                                                                                                                      \
property.c:lh_QUERY_error:
  296|  27.8k|    {                                                                                                                      \
  297|  27.8k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  27.8k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall:
  328|  1.57k|    {                                                                                                                      \
  329|  1.57k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|  1.57k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_free:
  271|  1.57k|    {                                                                                                                      \
  272|  1.57k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  1.57k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_new:
  334|  1.57k|    {                                                                                                                      \
  335|  1.57k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  1.57k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  1.57k|            lh_##type##_doall_thunk,                                                                                       \
  338|  1.57k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  1.57k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_hfn_thunk:
  260|   253k|    {                                                                                                                      \
  261|   253k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   253k|        return hfn_conv((const type *)data);                                                                               \
  263|   253k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_cfn_thunk:
  265|  45.0k|    {                                                                                                                      \
  266|  45.0k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|  45.0k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|  45.0k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall_thunk:
  316|  8.22k|    {                                                                                                                      \
  317|  8.22k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  8.22k|        doall_conv((type *)node);                                                                                          \
  319|  8.22k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_retrieve:
  291|   245k|    {                                                                                                                      \
  292|   245k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   245k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_insert:
  281|  8.22k|    {                                                                                                                      \
  282|  8.22k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  8.22k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_error:
  296|  8.22k|    {                                                                                                                      \
  297|  8.22k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  8.22k|    }                                                                                                                      \
store_register.c:lh_OSSL_STORE_LOADER_free:
  271|      1|    {                                                                                                                      \
  272|      1|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|      1|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_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|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_hfn_thunk:
  260|      4|    {                                                                                                                      \
  261|      4|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|      4|        return hfn_conv((const type *)data);                                                                               \
  263|      4|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_cfn_thunk:
  265|      2|    {                                                                                                                      \
  266|      2|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|      2|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|      2|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_doall_thunk:
  316|      1|    {                                                                                                                      \
  317|      1|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|      1|        doall_conv((type *)node);                                                                                          \
  319|      1|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_free:
  271|      1|    {                                                                                                                      \
  272|      1|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|      1|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_retrieve:
  291|      3|    {                                                                                                                      \
  292|      3|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|      3|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_insert:
  281|      1|    {                                                                                                                      \
  282|      1|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|      1|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_doall:
  328|      1|    {                                                                                                                      \
  329|      1|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|      1|    }                                                                                                                      \

OBJ_bsearch_ssl_cipher_id:
  142|     90|    {                                                                  \
  143|     90|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),    \
  144|     90|            nm##_cmp_BSEARCH_CMP_FN);                                  \
  145|     90|    }                                                                  \
ssl_lib.c:ssl_cipher_id_cmp_BSEARCH_CMP_FN:
  136|    405|    {                                                                  \
  137|    405|        type1 const *a = a_;                                           \
  138|    405|        type2 const *b = b_;                                           \
  139|    405|        return nm##_cmp(a, b);                                         \
  140|    405|    }                                                                  \
ameth_lib.c:OBJ_bsearch_ameth:
  128|  1.11M|    {                                                                      \
  129|  1.11M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  1.11M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  1.11M|    }                                                                      \
ameth_lib.c:ameth_cmp_BSEARCH_CMP_FN:
  122|  3.34M|    {                                                                      \
  123|  3.34M|        type1 const *a = a_;                                               \
  124|  3.34M|        type2 const *b = b_;                                               \
  125|  3.34M|        return nm##_cmp(a, b);                                             \
  126|  3.34M|    }                                                                      \
obj_dat.c:OBJ_bsearch_ln:
  128|   105k|    {                                                                      \
  129|   105k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   105k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   105k|    }                                                                      \
obj_dat.c:ln_cmp_BSEARCH_CMP_FN:
  122|  1.05M|    {                                                                      \
  123|  1.05M|        type1 const *a = a_;                                               \
  124|  1.05M|        type2 const *b = b_;                                               \
  125|  1.05M|        return nm##_cmp(a, b);                                             \
  126|  1.05M|    }                                                                      \
obj_dat.c:OBJ_bsearch_sn:
  128|   116k|    {                                                                      \
  129|   116k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   116k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   116k|    }                                                                      \
obj_dat.c:sn_cmp_BSEARCH_CMP_FN:
  122|  1.24M|    {                                                                      \
  123|  1.24M|        type1 const *a = a_;                                               \
  124|  1.24M|        type2 const *b = b_;                                               \
  125|  1.24M|        return nm##_cmp(a, b);                                             \
  126|  1.24M|    }                                                                      \
obj_dat.c:OBJ_bsearch_obj:
  128|  7.58M|    {                                                                      \
  129|  7.58M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  7.58M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  7.58M|    }                                                                      \
obj_dat.c:obj_cmp_BSEARCH_CMP_FN:
  122|  75.1M|    {                                                                      \
  123|  75.1M|        type1 const *a = a_;                                               \
  124|  75.1M|        type2 const *b = b_;                                               \
  125|  75.1M|        return nm##_cmp(a, b);                                             \
  126|  75.1M|    }                                                                      \
obj_xref.c:OBJ_bsearch_sig:
  128|   764k|    {                                                                      \
  129|   764k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   764k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   764k|    }                                                                      \
obj_xref.c:sig_cmp_BSEARCH_CMP_FN:
  122|  3.91M|    {                                                                      \
  123|  3.91M|        type1 const *a = a_;                                               \
  124|  3.91M|        type2 const *b = b_;                                               \
  125|  3.91M|        return nm##_cmp(a, b);                                             \
  126|  3.91M|    }                                                                      \
v3_lib.c:OBJ_bsearch_ext:
  128|  1.24M|    {                                                                      \
  129|  1.24M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  1.24M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  1.24M|    }                                                                      \
v3_lib.c:ext_cmp_BSEARCH_CMP_FN:
  122|  6.28M|    {                                                                      \
  123|  6.28M|        type1 const *a = a_;                                               \
  124|  6.28M|        type2 const *b = b_;                                               \
  125|  6.28M|        return nm##_cmp(a, b);                                             \
  126|  6.28M|    }                                                                      \
v3_purp.c:OBJ_bsearch_nid:
  128|   720k|    {                                                                      \
  129|   720k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   720k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   720k|    }                                                                      \
v3_purp.c:nid_cmp_BSEARCH_CMP_FN:
  122|  1.79M|    {                                                                      \
  123|  1.79M|        type1 const *a = a_;                                               \
  124|  1.79M|        type2 const *b = b_;                                               \
  125|  1.79M|        return nm##_cmp(a, b);                                             \
  126|  1.79M|    }                                                                      \

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

s3_lib.c:ossl_check_X509_NAME_sk_type:
   55|  9.78k|    {                                                                                                           \
   56|  9.78k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  9.78k|    }                                                                                                           \
s3_lib.c:ossl_check_X509_NAME_freefunc_type:
   67|  9.78k|    {                                                                                                           \
   68|  9.78k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  9.78k|    }
ssl_ciph.c:ossl_check_const_SSL_CIPHER_sk_type:
   51|  30.4k|    {                                                                                                           \
   52|  30.4k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  30.4k|    }                                                                                                           \
ssl_ciph.c:ossl_check_SSL_CIPHER_sk_type:
   55|   200k|    {                                                                                                           \
   56|   200k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   200k|    }                                                                                                           \
ssl_ciph.c:ossl_check_SSL_CIPHER_type:
   47|   183k|    {                                                                                                           \
   48|   183k|        return ptr;                                                                                             \
   49|   183k|    }                                                                                                           \
ssl_ciph.c:ossl_check_SSL_CIPHER_compfunc_type:
   59|  3.40k|    {                                                                                                           \
   60|  3.40k|        return (OPENSSL_sk_compfunc)cmp;                                                                        \
   61|  3.40k|    }                                                                                                           \
ssl_lib.c:ossl_check_const_SSL_CIPHER_sk_type:
   51|   477k|    {                                                                                                           \
   52|   477k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|   477k|    }                                                                                                           \
ssl_lib.c:sk_danetls_record_pop_free:
  147|  1.95k|    {                                                                                                                      \
  148|  1.95k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  1.95k|                                                                                                                           \
  150|  1.95k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  1.95k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  1.95k|                                                                                                                           \
  153|  1.95k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  1.95k|    }                                                                                                                      \
ssl_lib.c:ossl_check_SSL_CIPHER_sk_type:
   55|   125k|    {                                                                                                           \
   56|   125k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   125k|    }                                                                                                           \
ssl_lib.c:ossl_check_X509_EXTENSION_sk_type:
   55|  1.95k|    {                                                                                                           \
   56|  1.95k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.95k|    }                                                                                                           \
ssl_lib.c:ossl_check_X509_EXTENSION_freefunc_type:
   67|  1.95k|    {                                                                                                           \
   68|  1.95k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  1.95k|    }
ssl_lib.c:ossl_check_OCSP_RESPID_sk_type:
   55|  1.95k|    {                                                                                                           \
   56|  1.95k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.95k|    }                                                                                                           \
ssl_lib.c:ossl_check_OCSP_RESPID_freefunc_type:
   67|  1.95k|    {                                                                                                           \
   68|  1.95k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  1.95k|    }
ssl_lib.c:sk_OCSP_RESPONSE_pop_free:
  147|  1.95k|    {                                                                                                                      \
  148|  1.95k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  1.95k|                                                                                                                           \
  150|  1.95k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  1.95k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  1.95k|                                                                                                                           \
  153|  1.95k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  1.95k|    }                                                                                                                      \
ssl_lib.c:ossl_check_X509_NAME_sk_type:
   55|  9.48k|    {                                                                                                           \
   56|  9.48k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  9.48k|    }                                                                                                           \
ssl_lib.c:ossl_check_X509_NAME_freefunc_type:
   67|  9.48k|    {                                                                                                           \
   68|  9.48k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  9.48k|    }
ssl_lib.c:ossl_check_SRTP_PROTECTION_PROFILE_sk_type:
   55|  4.74k|    {                                                                                                           \
   56|  4.74k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  4.74k|    }                                                                                                           \
ssl_lib.c:ossl_check_SSL_CIPHER_type:
   47|   108k|    {                                                                                                           \
   48|   108k|        return ptr;                                                                                             \
   49|   108k|    }                                                                                                           \
ssl_sess.c:sk_SSL_SESSION_new_null:
   98|  2.78k|    {                                                                                                                      \
   99|  2.78k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|  2.78k|    }                                                                                                                      \
ssl_sess.c:sk_SSL_SESSION_pop_free:
  147|  2.78k|    {                                                                                                                      \
  148|  2.78k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  2.78k|                                                                                                                           \
  150|  2.78k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  2.78k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  2.78k|                                                                                                                           \
  153|  2.78k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  2.78k|    }                                                                                                                      \
extensions.c:sk_OCSP_RESPONSE_pop_free:
  147|     81|    {                                                                                                                      \
  148|     81|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|     81|                                                                                                                           \
  150|     81|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|     81|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|     81|                                                                                                                           \
  153|     81|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|     81|    }                                                                                                                      \
extensions.c:ossl_check_const_X509_NAME_sk_type:
   51|  1.81k|    {                                                                                                           \
   52|  1.81k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  1.81k|    }                                                                                                           \
extensions_clnt.c:ossl_check_const_SSL_CIPHER_sk_type:
   51|  7.63k|    {                                                                                                           \
   52|  7.63k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  7.63k|    }                                                                                                           \
extensions_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   55|  3.77k|    {                                                                                                           \
   56|  3.77k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  3.77k|    }                                                                                                           \
extensions_clnt.c:ossl_check_const_OCSP_RESPID_sk_type:
   51|      1|    {                                                                                                           \
   52|      1|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|      1|    }                                                                                                           \
statem_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   55|     22|    {                                                                                                           \
   56|     22|        return (OPENSSL_STACK *)sk;                                                                             \
   57|     22|    }                                                                                                           \
statem_clnt.c:ossl_check_SSL_CIPHER_type:
   47|     22|    {                                                                                                           \
   48|     22|        return ptr;                                                                                             \
   49|     22|    }                                                                                                           \
statem_clnt.c:ossl_check_const_SSL_CIPHER_sk_type:
   51|   229k|    {                                                                                                           \
   52|   229k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|   229k|    }                                                                                                           \
tasn_dec.c:ossl_check_ASN1_VALUE_sk_type:
   55|  7.93M|    {                                                                                                           \
   56|  7.93M|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  7.93M|    }                                                                                                           \
tasn_dec.c:ossl_check_ASN1_VALUE_type:
   47|  7.93M|    {                                                                                                           \
   48|  7.93M|        return ptr;                                                                                             \
   49|  7.93M|    }                                                                                                           \
tasn_enc.c:sk_const_ASN1_VALUE_num:
   82|  22.1M|    {                                                                                                                      \
   83|  22.1M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  22.1M|    }                                                                                                                      \
tasn_enc.c:sk_const_ASN1_VALUE_value:
   86|  9.48M|    {                                                                                                                      \
   87|  9.48M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  9.48M|    }                                                                                                                      \
tasn_fre.c:ossl_check_const_ASN1_VALUE_sk_type:
   51|  5.69M|    {                                                                                                           \
   52|  5.69M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  5.69M|    }                                                                                                           \
tasn_fre.c:ossl_check_ASN1_VALUE_sk_type:
   55|  2.46M|    {                                                                                                           \
   56|  2.46M|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  2.46M|    }                                                                                                           \
conf_mod.c:sk_CONF_IMODULE_free:
  114|      2|    {                                                                                                                      \
  115|      2|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      2|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_dup:
  184|      1|    {                                                                                                                      \
  185|      1|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  186|      1|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_new_null:
   98|      1|    {                                                                                                                      \
   99|      1|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      1|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_num:
   82|      2|    {                                                                                                                      \
   83|      2|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|      2|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_free:
  114|      3|    {                                                                                                                      \
  115|      3|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      3|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
conf_mod.c:sk_CONF_IMODULE_num:
   82|      1|    {                                                                                                                      \
   83|      1|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|      1|    }                                                                                                                      \
ct_log.c:ossl_check_CTLOG_sk_type:
   55|  2.78k|    {                                                                                                           \
   56|  2.78k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  2.78k|    }                                                                                                           \
ct_log.c:ossl_check_CTLOG_freefunc_type:
   67|  2.78k|    {                                                                                                           \
   68|  2.78k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  2.78k|    }
ct_sct.c:ossl_check_SCT_sk_type:
   55|  1.95k|    {                                                                                                           \
   56|  1.95k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.95k|    }                                                                                                           \
ct_sct.c:ossl_check_SCT_freefunc_type:
   67|  1.95k|    {                                                                                                           \
   68|  1.95k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  1.95k|    }
dso_lib.c:ossl_check_void_sk_type:
   55|    973|    {                                                                                                           \
   56|    973|        return (OPENSSL_STACK *)sk;                                                                             \
   57|    973|    }                                                                                                           \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_new_null:
   98|      2|    {                                                                                                                      \
   99|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_push:
  131|     11|    {                                                                                                                      \
  132|     11|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|     11|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_new_null:
   98|      2|    {                                                                                                                      \
   99|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_push:
  131|    152|    {                                                                                                                      \
  132|    152|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|    152|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_num:
   82|      2|    {                                                                                                                      \
   83|      2|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_num:
   82|   871k|    {                                                                                                                      \
   83|   871k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   871k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_set_cmp_func:
  196|      4|    {                                                                                                                      \
  197|      4|        return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare);             \
  198|      4|    }
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_value:
   86|  3.36M|    {                                                                                                                      \
   87|  3.36M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  3.36M|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_sort:
  176|      2|    {                                                                                                                      \
  177|      2|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  178|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_value:
   86|  1.67k|    {                                                                                                                      \
   87|  1.67k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  1.67k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_pop_free:
  147|      2|    {                                                                                                                      \
  148|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      2|                                                                                                                           \
  150|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      2|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      2|                                                                                                                           \
  153|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_freefunc_thunk:
   77|    152|    {                                                                                                                      \
   78|    152|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|    152|        freefunc((t3 *)ptr);                                                                                               \
   80|    152|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_pop_free:
  147|   435k|    {                                                                                                                      \
  148|   435k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   435k|                                                                                                                           \
  150|   435k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   435k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   435k|                                                                                                                           \
  153|   435k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   435k|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_freefunc_thunk:
   77|  2.49M|    {                                                                                                                      \
   78|  2.49M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|  2.49M|        freefunc((t3 *)ptr);                                                                                               \
   80|  2.49M|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_new_null:
   98|      2|    {                                                                                                                      \
   99|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      2|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_push:
  131|      3|    {                                                                                                                      \
  132|      3|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      3|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_num:
   82|   436k|    {                                                                                                                      \
   83|   436k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   436k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_value:
   86|   436k|    {                                                                                                                      \
   87|   436k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|   436k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_pop_free:
  147|   435k|    {                                                                                                                      \
  148|   435k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   435k|                                                                                                                           \
  150|   435k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   435k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   435k|                                                                                                                           \
  153|   435k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   435k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_freefunc_thunk:
   77|   555k|    {                                                                                                                      \
   78|   555k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|   555k|        freefunc((t3 *)ptr);                                                                                               \
   80|   555k|    }                                                                                                                      \
decoder_pkey.c:sk_OSSL_DECODER_INSTANCE_deep_copy:
  190|   435k|    {                                                                                                                      \
  191|   435k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  192|   435k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  193|   435k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  194|   435k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_deep_copy:
  190|   435k|    {                                                                                                                      \
  191|   435k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  192|   435k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  193|   435k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  194|   435k|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_new_null:
   98|      1|    {                                                                                                                      \
   99|      1|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      1|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_insert:
  156|      1|    {                                                                                                                      \
  157|      1|        return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx);                                             \
  158|      1|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_push:
  131|      1|    {                                                                                                                      \
  132|      1|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      1|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_freefunc_thunk:
   77|      2|    {                                                                                                                      \
   78|      2|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|      2|        freefunc((t3 *)ptr);                                                                                               \
   80|      2|    }                                                                                                                      \
keymgmt_lib.c:sk_OP_CACHE_ELEM_pop_free:
  147|   881k|    {                                                                                                                      \
  148|   881k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   881k|                                                                                                                           \
  150|   881k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   881k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   881k|                                                                                                                           \
  153|   881k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   881k|    }                                                                                                                      \
p_lib.c:ossl_check_X509_ATTRIBUTE_sk_type:
   55|   881k|    {                                                                                                           \
   56|   881k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   881k|    }                                                                                                           \
p_lib.c:ossl_check_X509_ATTRIBUTE_freefunc_type:
   67|   881k|    {                                                                                                           \
   68|   881k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|   881k|    }
core_namemap.c:sk_NAMES_value:
   86|   777k|    {                                                                                                                      \
   87|   777k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|   777k|    }                                                                                                                      \
core_namemap.c:ossl_check_const_OPENSSL_STRING_sk_type:
   51|  4.94M|    {                                                                                                           \
   52|  4.94M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  4.94M|    }                                                                                                           \
core_namemap.c:ossl_check_OPENSSL_STRING_sk_type:
   55|  1.09M|    {                                                                                                           \
   56|  1.09M|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.09M|    }                                                                                                           \
core_namemap.c:ossl_check_OPENSSL_STRING_type:
   47|   370k|    {                                                                                                           \
   48|   370k|        return ptr;                                                                                             \
   49|   370k|    }                                                                                                           \
core_namemap.c:sk_NAMES_push:
  131|   159k|    {                                                                                                                      \
  132|   159k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|   159k|    }                                                                                                                      \
core_namemap.c:sk_NAMES_num:
   82|   159k|    {                                                                                                                      \
   83|   159k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   159k|    }                                                                                                                      \
core_namemap.c:ossl_check_OPENSSL_STRING_freefunc_type:
   67|   159k|    {                                                                                                           \
   68|   159k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|   159k|    }
core_namemap.c:sk_NAMES_new_null:
   98|    785|    {                                                                                                                      \
   99|    785|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|    785|    }                                                                                                                      \
core_namemap.c:sk_NAMES_pop_free:
  147|    785|    {                                                                                                                      \
  148|    785|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|    785|                                                                                                                           \
  150|    785|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|    785|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|    785|                                                                                                                           \
  153|    785|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|    785|    }                                                                                                                      \
core_namemap.c:sk_NAMES_freefunc_thunk:
   77|   159k|    {                                                                                                                      \
   78|   159k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|   159k|        freefunc((t3 *)ptr);                                                                                               \
   80|   159k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_pop_free:
  147|  14.1k|    {                                                                                                                      \
  148|  14.1k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  14.1k|                                                                                                                           \
  150|  14.1k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  14.1k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  14.1k|                                                                                                                           \
  153|  14.1k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  14.1k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_freefunc_thunk:
   77|      2|    {                                                                                                                      \
   78|      2|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|      2|        freefunc((t3 *)ptr);                                                                                               \
   80|      2|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_num:
   82|  9.68M|    {                                                                                                                      \
   83|  9.68M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  9.68M|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_value:
   86|  3.33k|    {                                                                                                                      \
   87|  3.33k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  3.33k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_new_null:
   98|      2|    {                                                                                                                      \
   99|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      2|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_push:
  131|      4|    {                                                                                                                      \
  132|      4|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      4|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_set:
  160|      2|    {                                                                                                                      \
  161|      2|        return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr);                                          \
  162|      2|    }                                                                                                                      \
ex_data.c:ossl_check_const_void_sk_type:
   51|  11.0k|    {                                                                                                           \
   52|  11.0k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  11.0k|    }                                                                                                           \
ex_data.c:ossl_check_void_sk_type:
   55|  4.85M|    {                                                                                                           \
   56|  4.85M|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  4.85M|    }                                                                                                           \
ex_data.c:ossl_check_void_type:
   47|  6.39k|    {                                                                                                           \
   48|  6.39k|        return ptr;                                                                                             \
   49|  6.39k|    }                                                                                                           \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_new_null:
   98|      1|    {                                                                                                                      \
   99|      1|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_free:
  114|      1|    {                                                                                                                      \
  115|      1|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_push:
  131|      1|    {                                                                                                                      \
  132|      1|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_num:
   82|  3.69k|    {                                                                                                                      \
   83|  3.69k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  3.69k|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_value:
   86|  1.84k|    {                                                                                                                      \
   87|  1.84k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  1.84k|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_delete:
  122|      1|    {                                                                                                                      \
  123|      1|        return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);                                                            \
  124|      1|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_new_null:
   98|  3.41k|    {                                                                                                                      \
   99|  3.41k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|  3.41k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_pop:
  139|  3.41k|    {                                                                                                                      \
  140|  3.41k|        return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk);                                                                  \
  141|  3.41k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_free:
  114|  3.41k|    {                                                                                                                      \
  115|  3.41k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|  3.41k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_push:
  131|  3.41k|    {                                                                                                                      \
  132|  3.41k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|  3.41k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_num:
   82|  13.6k|    {                                                                                                                      \
   83|  13.6k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  13.6k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_value:
   86|  3.41k|    {                                                                                                                      \
   87|  3.41k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  3.41k|    }                                                                                                                      \
provider_conf.c:sk_OSSL_PROVIDER_pop_free:
  147|    785|    {                                                                                                                      \
  148|    785|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|    785|                                                                                                                           \
  150|    785|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|    785|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|    785|                                                                                                                           \
  153|    785|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|    785|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_pop_free:
  147|  1.84k|    {                                                                                                                      \
  148|  1.84k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  1.84k|                                                                                                                           \
  150|  1.84k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  1.84k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  1.84k|                                                                                                                           \
  153|  1.84k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  1.84k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_pop_free:
  147|    785|    {                                                                                                                      \
  148|    785|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|    785|                                                                                                                           \
  150|    785|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|    785|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|    785|                                                                                                                           \
  153|    785|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|    785|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_freefunc_thunk:
   77|  1.70k|    {                                                                                                                      \
   78|  1.70k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|  1.70k|        freefunc((t3 *)ptr);                                                                                               \
   80|  1.70k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_pop_free:
  147|    785|    {                                                                                                                      \
  148|    785|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|    785|                                                                                                                           \
  150|    785|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|    785|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|    785|                                                                                                                           \
  153|    785|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|    785|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_new:
   90|    785|    {                                                                                                                      \
   91|    785|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
   92|    785|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
   93|    785|                                                                                                                           \
   94|    785|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
   95|    785|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
   96|    785|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_new_null:
   98|    785|    {                                                                                                                      \
   99|    785|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|    785|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_sort:
  176|  3.84k|    {                                                                                                                      \
  177|  3.84k|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  178|  3.84k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_find:
  164|  4.76k|    {                                                                                                                      \
  165|  4.76k|        return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  166|  4.76k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_value:
   86|   448k|    {                                                                                                                      \
   87|   448k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|   448k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_deep_copy:
  190|  1.84k|    {                                                                                                                      \
  191|  1.84k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  192|  1.84k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  193|  1.84k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  194|  1.84k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_push:
  131|  1.70k|    {                                                                                                                      \
  132|  1.70k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|  1.70k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_num:
   82|  4.42k|    {                                                                                                                      \
   83|  4.42k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  4.42k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_dup:
  184|  83.9k|    {                                                                                                                      \
  185|  83.9k|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  186|  83.9k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_num:
   82|  83.9k|    {                                                                                                                      \
   83|  83.9k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  83.9k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_free:
  114|  83.9k|    {                                                                                                                      \
  115|  83.9k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|  83.9k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_num:
   82|  2.62k|    {                                                                                                                      \
   83|  2.62k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  2.62k|    }                                                                                                                      \
o_names.c:sk_NAME_FUNCS_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_free:
  114|      1|    {                                                                                                                      \
  115|      1|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      1|    }                                                                                                                      \
pem_info.c:ossl_check_X509_INFO_sk_type:
   55|   435k|    {                                                                                                           \
   56|   435k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   435k|    }                                                                                                           \
pem_info.c:ossl_check_X509_INFO_type:
   47|   435k|    {                                                                                                           \
   48|   435k|        return ptr;                                                                                             \
   49|   435k|    }                                                                                                           \
property.c:sk_IMPLEMENTATION_pop_free:
  147|   168k|    {                                                                                                                      \
  148|   168k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   168k|                                                                                                                           \
  150|   168k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   168k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   168k|                                                                                                                           \
  153|   168k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   168k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_freefunc_thunk:
   77|   168k|    {                                                                                                                      \
   78|   168k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|   168k|        freefunc((t3 *)ptr);                                                                                               \
   80|   168k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_new_null:
   98|   168k|    {                                                                                                                      \
   99|   168k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|   168k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_num:
   82|   623k|    {                                                                                                                      \
   83|   623k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   623k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_value:
   86|   279k|    {                                                                                                                      \
   87|   279k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|   279k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_push:
  131|   169k|    {                                                                                                                      \
  132|   169k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|   169k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_delete:
  122|    543|    {                                                                                                                      \
  123|    543|        return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);                                                            \
  124|    543|    }                                                                                                                      \
property.c:sk_ALGORITHM_new_reserve:
  102|      6|    {                                                                                                                      \
  103|      6|        OPENSSL_STACK *ret = OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n);                                      \
  104|      6|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  105|      6|                                                                                                                           \
  106|      6|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  107|      6|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  108|      6|    }                                                                                                                      \
property.c:sk_ALGORITHM_freefunc_thunk:
   77|    656|    {                                                                                                                      \
   78|    656|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|    656|        freefunc((t3 *)ptr);                                                                                               \
   80|    656|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_dup:
  184|    656|    {                                                                                                                      \
  185|    656|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  186|    656|    }                                                                                                                      \
property.c:sk_ALGORITHM_push:
  131|    656|    {                                                                                                                      \
  132|    656|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|    656|    }                                                                                                                      \
property.c:sk_ALGORITHM_num:
   82|      6|    {                                                                                                                      \
   83|      6|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|      6|    }                                                                                                                      \
property.c:sk_ALGORITHM_value:
   86|    656|    {                                                                                                                      \
   87|    656|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|    656|    }                                                                                                                      \
property.c:sk_ALGORITHM_pop_free:
  147|      6|    {                                                                                                                      \
  148|      6|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      6|                                                                                                                           \
  150|      6|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      6|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      6|                                                                                                                           \
  153|      6|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      6|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_free:
  114|    656|    {                                                                                                                      \
  115|    656|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|    656|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_new:
   90|  36.1k|    {                                                                                                                      \
   91|  36.1k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
   92|  36.1k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
   93|  36.1k|                                                                                                                           \
   94|  36.1k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
   95|  36.1k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
   96|  36.1k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_freefunc_thunk:
   77|   205k|    {                                                                                                                      \
   78|   205k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|   205k|        freefunc((t3 *)ptr);                                                                                               \
   80|   205k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_push:
  131|   205k|    {                                                                                                                      \
  132|   205k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|   205k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_num:
   82|  17.1k|    {                                                                                                                      \
   83|  17.1k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  17.1k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_sort:
  176|  17.1k|    {                                                                                                                      \
  177|  17.1k|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  178|  17.1k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_value:
   86|  28.2k|    {                                                                                                                      \
   87|  28.2k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  28.2k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_pop_free:
  147|  36.1k|    {                                                                                                                      \
  148|  36.1k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  36.1k|                                                                                                                           \
  150|  36.1k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  36.1k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  36.1k|                                                                                                                           \
  153|  36.1k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  36.1k|    }                                                                                                                      \
property_string.c:ossl_check_OPENSSL_CSTRING_sk_type:
   55|  9.79k|    {                                                                                                           \
   56|  9.79k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  9.79k|    }                                                                                                           \
property_string.c:ossl_check_OPENSSL_CSTRING_type:
   47|  8.22k|    {                                                                                                           \
   48|  8.22k|        return ptr;                                                                                             \
   49|  8.22k|    }                                                                                                           \
property_string.c:ossl_check_const_OPENSSL_CSTRING_sk_type:
   51|  2.40k|    {                                                                                                           \
   52|  2.40k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  2.40k|    }                                                                                                           \
rsa_backend.c:sk_BIGNUM_const_new_null:
   98|   949k|    {                                                                                                                      \
   99|   949k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|   949k|    }                                                                                                                      \
rsa_backend.c:sk_BIGNUM_const_free:
  114|   949k|    {                                                                                                                      \
  115|   949k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|   949k|    }                                                                                                                      \
rsa_lib.c:sk_RSA_PRIME_INFO_pop_free:
  147|   316k|    {                                                                                                                      \
  148|   316k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   316k|                                                                                                                           \
  150|   316k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   316k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   316k|                                                                                                                           \
  153|   316k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   316k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_new_null:
   98|   949k|    {                                                                                                                      \
   99|   949k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|   949k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_num:
   82|   949k|    {                                                                                                                      \
   83|   949k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   949k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_free:
  114|   949k|    {                                                                                                                      \
  115|   949k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|   949k|    }                                                                                                                      \
rsa_ossl.c:sk_RSA_PRIME_INFO_num:
   82|   316k|    {                                                                                                                      \
   83|   316k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   316k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_pop_free:
  147|  1.69k|    {                                                                                                                      \
  148|  1.69k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  1.69k|                                                                                                                           \
  150|  1.69k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  1.69k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  1.69k|                                                                                                                           \
  153|  1.69k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  1.69k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_freefunc_thunk:
   77|  4.41k|    {                                                                                                                      \
   78|  4.41k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|  4.41k|        freefunc((t3 *)ptr);                                                                                               \
   80|  4.41k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_pop_free:
  147|  4.41k|    {                                                                                                                      \
  148|  4.41k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  4.41k|                                                                                                                           \
  150|  4.41k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  4.41k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  4.41k|                                                                                                                           \
  153|  4.41k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  4.41k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_num:
   82|   254k|    {                                                                                                                      \
   83|   254k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   254k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_value:
   86|   240k|    {                                                                                                                      \
   87|   240k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|   240k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_new_null:
   98|  1.68k|    {                                                                                                                      \
   99|  1.68k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|  1.68k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_new:
   90|  4.41k|    {                                                                                                                      \
   91|  4.41k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
   92|  4.41k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
   93|  4.41k|                                                                                                                           \
   94|  4.41k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
   95|  4.41k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
   96|  4.41k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_push:
  131|  4.41k|    {                                                                                                                      \
  132|  4.41k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|  4.41k|    }                                                                                                                      \
by_file.c:ossl_check_const_X509_INFO_sk_type:
   51|   874k|    {                                                                                                           \
   52|   874k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|   874k|    }                                                                                                           \
by_file.c:ossl_check_X509_INFO_sk_type:
   55|  3.00k|    {                                                                                                           \
   56|  3.00k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  3.00k|    }                                                                                                           \
by_file.c:ossl_check_X509_INFO_freefunc_type:
   67|  3.00k|    {                                                                                                           \
   68|  3.00k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  3.00k|    }
t_x509.c:ossl_check_X509_sk_type:
   55|  65.2k|    {                                                                                                           \
   56|  65.2k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  65.2k|    }                                                                                                           \
t_x509.c:ossl_check_X509_freefunc_type:
   67|  65.2k|    {                                                                                                           \
   68|  65.2k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  65.2k|    }
v3_lib.c:ossl_check_const_X509_EXTENSION_sk_type:
   51|  35.8M|    {                                                                                                           \
   52|  35.8M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  35.8M|    }                                                                                                           \
v3_purp.c:ossl_check_const_DIST_POINT_sk_type:
   51|   466k|    {                                                                                                           \
   52|   466k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|   466k|    }                                                                                                           \
v3_purp.c:ossl_check_const_GENERAL_NAME_sk_type:
   51|  25.9k|    {                                                                                                           \
   52|  25.9k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  25.9k|    }                                                                                                           \
x509_lu.c:ossl_check_X509_OBJECT_compfunc_type:
   59|  2.78k|    {                                                                                                           \
   60|  2.78k|        return (OPENSSL_sk_compfunc)cmp;                                                                        \
   61|  2.78k|    }                                                                                                           \
x509_lu.c:ossl_check_X509_OBJECT_sk_type:
   55|   685k|    {                                                                                                           \
   56|   685k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   685k|    }                                                                                                           \
x509_lu.c:ossl_check_X509_LOOKUP_sk_type:
   55|  6.29k|    {                                                                                                           \
   56|  6.29k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  6.29k|    }                                                                                                           \
x509_lu.c:ossl_check_const_X509_LOOKUP_sk_type:
   51|  30.0k|    {                                                                                                           \
   52|  30.0k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  30.0k|    }                                                                                                           \
x509_lu.c:ossl_check_X509_OBJECT_freefunc_type:
   67|  2.78k|    {                                                                                                           \
   68|  2.78k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  2.78k|    }
x509_lu.c:ossl_check_X509_LOOKUP_type:
   47|  3.50k|    {                                                                                                           \
   48|  3.50k|        return ptr;                                                                                             \
   49|  3.50k|    }                                                                                                           \
x509_lu.c:ossl_check_const_X509_OBJECT_sk_type:
   51|   378k|    {                                                                                                           \
   52|   378k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|   378k|    }                                                                                                           \
x509_lu.c:ossl_check_X509_OBJECT_type:
   47|   682k|    {                                                                                                           \
   48|   682k|        return ptr;                                                                                             \
   49|   682k|    }                                                                                                           \
x509_v3.c:ossl_check_const_X509_EXTENSION_sk_type:
   51|  4.28M|    {                                                                                                           \
   52|  4.28M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  4.28M|    }                                                                                                           \
x509_vpm.c:ossl_check_ASN1_OBJECT_sk_type:
   55|  7.44k|    {                                                                                                           \
   56|  7.44k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  7.44k|    }                                                                                                           \
x509_vpm.c:ossl_check_ASN1_OBJECT_freefunc_type:
   67|  7.44k|    {                                                                                                           \
   68|  7.44k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  7.44k|    }
x509_vpm.c:ossl_check_OPENSSL_STRING_sk_type:
   55|  7.44k|    {                                                                                                           \
   56|  7.44k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  7.44k|    }                                                                                                           \
x509_vpm.c:ossl_check_OPENSSL_STRING_freefunc_type:
   67|  7.44k|    {                                                                                                           \
   68|  7.44k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  7.44k|    }
x_name.c:ossl_check_X509_NAME_ENTRY_sk_type:
   55|  17.5M|    {                                                                                                           \
   56|  17.5M|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  17.5M|    }                                                                                                           \
x_name.c:ossl_check_X509_NAME_ENTRY_freefunc_type:
   67|  4.92M|    {                                                                                                           \
   68|  4.92M|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  4.92M|    }
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_num:
   82|  4.04M|    {                                                                                                                      \
   83|  4.04M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  4.04M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_value:
   86|  3.16M|    {                                                                                                                      \
   87|  3.16M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  3.16M|    }                                                                                                                      \
x_name.c:ossl_check_const_X509_NAME_ENTRY_sk_type:
   51|  17.5M|    {                                                                                                           \
   52|  17.5M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  17.5M|    }                                                                                                           \
x_name.c:ossl_check_X509_NAME_ENTRY_type:
   47|  9.48M|    {                                                                                                           \
   48|  9.48M|        return ptr;                                                                                             \
   49|  9.48M|    }                                                                                                           \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_new_null:
   98|   887k|    {                                                                                                                      \
   99|   887k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|   887k|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_push:
  131|  3.16M|    {                                                                                                                      \
  132|  3.16M|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|  3.16M|    }                                                                                                                      \
x_name.c:ossl_check_const_ASN1_VALUE_sk_type:
   51|  14.4M|    {                                                                                                           \
   52|  14.4M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  14.4M|    }                                                                                                           \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_pop_free:
  147|  1.77M|    {                                                                                                                      \
  148|  1.77M|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  1.77M|                                                                                                                           \
  150|  1.77M|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  1.77M|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  1.77M|                                                                                                                           \
  153|  1.77M|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  1.77M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_freefunc_thunk:
   77|  6.32M|    {                                                                                                                      \
   78|  6.32M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|  6.32M|        freefunc((t3 *)ptr);                                                                                               \
   80|  6.32M|    }                                                                                                                      \
x_x509.c:ossl_check_IPAddressFamily_sk_type:
   55|   871k|    {                                                                                                           \
   56|   871k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   871k|    }                                                                                                           \
x_x509.c:ossl_check_IPAddressFamily_freefunc_type:
   67|   871k|    {                                                                                                           \
   68|   871k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|   871k|    }
dso_dlfcn.c:ossl_check_const_void_sk_type:
   51|    973|    {                                                                                                           \
   52|    973|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|    973|    }                                                                                                           \
eng_dyn.c:ossl_check_OPENSSL_STRING_freefunc_type:
   67|    829|    {                                                                                                           \
   68|    829|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|    829|    }
eng_dyn.c:ossl_check_const_OPENSSL_STRING_sk_type:
   51|  1.65k|    {                                                                                                           \
   52|  1.65k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  1.65k|    }                                                                                                           \
eng_dyn.c:ossl_check_OPENSSL_STRING_sk_type:
   55|  1.65k|    {                                                                                                           \
   56|  1.65k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.65k|    }                                                                                                           \
eng_dyn.c:ossl_check_OPENSSL_STRING_type:
   47|    829|    {                                                                                                           \
   48|    829|        return ptr;                                                                                             \
   49|    829|    }                                                                                                           \
eng_table.c:sk_ENGINE_new_null:
   98|      1|    {                                                                                                                      \
   99|      1|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      1|    }                                                                                                                      \
eng_table.c:sk_ENGINE_free:
  114|      1|    {                                                                                                                      \
  115|      1|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      1|    }                                                                                                                      \
eng_table.c:sk_ENGINE_delete_ptr:
  126|      2|    {                                                                                                                      \
  127|      2|        return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk,                                                            \
  128|      2|            (const void *)ptr);                                                                                            \
  129|      2|    }                                                                                                                      \
eng_table.c:sk_ENGINE_push:
  131|      2|    {                                                                                                                      \
  132|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      2|    }                                                                                                                      \
evp_pbe.c:sk_EVP_PBE_CTL_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
comp_methods.c:ossl_check_SSL_COMP_compfunc_type:
   59|    785|    {                                                                                                           \
   60|    785|        return (OPENSSL_sk_compfunc)cmp;                                                                        \
   61|    785|    }                                                                                                           \
comp_methods.c:ossl_check_SSL_COMP_sk_type:
   55|    785|    {                                                                                                           \
   56|    785|        return (OPENSSL_STACK *)sk;                                                                             \
   57|    785|    }                                                                                                           \
comp_methods.c:ossl_check_SSL_COMP_freefunc_type:
   67|    785|    {                                                                                                           \
   68|    785|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|    785|    }

ossl_base_provider_init:
  140|    631|{
  141|    631|    OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;
  142|    631|    BIO_METHOD *corebiometh;
  143|       |
  144|    631|    if (!ossl_prov_bio_from_dispatch(in))
  ------------------
  |  Branch (144:9): [True: 0, False: 631]
  ------------------
  145|      0|        return 0;
  146|  34.0k|    for (; in->function_id != 0; in++) {
  ------------------
  |  Branch (146:12): [True: 33.4k, False: 631]
  ------------------
  147|  33.4k|        switch (in->function_id) {
  148|    631|        case OSSL_FUNC_CORE_GETTABLE_PARAMS:
  ------------------
  |  |   72|    631|#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
  ------------------
  |  Branch (148:9): [True: 631, False: 32.8k]
  ------------------
  149|    631|            c_gettable_params = OSSL_FUNC_core_gettable_params(in);
  150|    631|            break;
  151|    631|        case OSSL_FUNC_CORE_GET_PARAMS:
  ------------------
  |  |   75|    631|#define OSSL_FUNC_CORE_GET_PARAMS 2
  ------------------
  |  Branch (151:9): [True: 631, False: 32.8k]
  ------------------
  152|    631|            c_get_params = OSSL_FUNC_core_get_params(in);
  153|    631|            break;
  154|    631|        case OSSL_FUNC_CORE_GET_LIBCTX:
  ------------------
  |  |   79|    631|#define OSSL_FUNC_CORE_GET_LIBCTX 4
  ------------------
  |  Branch (154:9): [True: 631, False: 32.8k]
  ------------------
  155|    631|            c_get_libctx = OSSL_FUNC_core_get_libctx(in);
  156|    631|            break;
  157|  31.5k|        default:
  ------------------
  |  Branch (157:9): [True: 31.5k, False: 1.89k]
  ------------------
  158|       |            /* Just ignore anything we don't understand */
  159|  31.5k|            break;
  160|  33.4k|        }
  161|  33.4k|    }
  162|       |
  163|    631|    if (c_get_libctx == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 631]
  ------------------
  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|    631|    if ((*provctx = ossl_prov_ctx_new()) == NULL
  ------------------
  |  Branch (174:9): [True: 0, False: 631]
  ------------------
  175|    631|        || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) {
  ------------------
  |  Branch (175:12): [True: 0, False: 631]
  ------------------
  176|      0|        ossl_prov_ctx_free(*provctx);
  177|      0|        *provctx = NULL;
  178|      0|        return 0;
  179|      0|    }
  180|    631|    ossl_prov_ctx_set0_libctx(*provctx,
  181|    631|        (OSSL_LIB_CTX *)c_get_libctx(handle));
  182|    631|    ossl_prov_ctx_set0_handle(*provctx, handle);
  183|    631|    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
  184|    631|    ossl_prov_ctx_set0_core_get_params(*provctx, c_get_params);
  185|       |
  186|    631|    *out = base_dispatch_table;
  187|       |
  188|    631|    return 1;
  189|    631|}
baseprov.c:base_teardown:
  120|    631|{
  121|    631|    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
  122|    631|    ossl_prov_ctx_free(provctx);
  123|    631|}
baseprov.c:base_query:
  104|  43.2k|{
  105|  43.2k|    *no_cache = 0;
  106|  43.2k|    switch (operation_id) {
  ------------------
  |  Branch (106:13): [True: 1.08k, False: 42.1k]
  ------------------
  107|      0|    case OSSL_OP_ENCODER:
  ------------------
  |  |  295|      0|#define OSSL_OP_ENCODER 20
  ------------------
  |  Branch (107:5): [True: 0, False: 43.2k]
  ------------------
  108|      0|        return base_encoder;
  109|      0|    case OSSL_OP_DECODER:
  ------------------
  |  |  296|      0|#define OSSL_OP_DECODER 21
  ------------------
  |  Branch (109:5): [True: 0, False: 43.2k]
  ------------------
  110|      0|        return base_decoder;
  111|      0|    case OSSL_OP_STORE:
  ------------------
  |  |  297|      0|#define OSSL_OP_STORE 22
  ------------------
  |  Branch (111:5): [True: 0, False: 43.2k]
  ------------------
  112|      0|        return base_store;
  113|  1.08k|    case OSSL_OP_RAND:
  ------------------
  |  |  287|  1.08k|#define OSSL_OP_RAND 5
  ------------------
  |  Branch (113:5): [True: 1.08k, False: 42.1k]
  ------------------
  114|  1.08k|        return base_rands;
  115|  43.2k|    }
  116|  42.1k|    return NULL;
  117|  43.2k|}

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

ossl_prov_get_capabilities:
  336|  5.56k|{
  337|  5.56k|    if (OPENSSL_strcasecmp(capability, "TLS-GROUP") == 0)
  ------------------
  |  Branch (337:9): [True: 2.78k, False: 2.78k]
  ------------------
  338|  2.78k|        return tls_group_capability(cb, arg);
  339|  2.78k|    if (OPENSSL_strcasecmp(capability, "TLS-SIGALG") == 0)
  ------------------
  |  Branch (339:9): [True: 2.78k, False: 0]
  ------------------
  340|  2.78k|        return tls_sigalg_capability(cb, arg);
  341|       |
  342|       |    /* We don't support this capability */
  343|      0|    return 0;
  344|  2.78k|}
capabilities.c:tls_group_capability:
  261|  2.78k|{
  262|  2.78k|#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ML_KEM)
  263|  2.78k|    size_t i;
  264|       |
  265|   167k|    for (i = 0; i < OSSL_NELEM(param_group_list); i++)
  ------------------
  |  |   14|   167k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (265:17): [True: 164k, False: 2.78k]
  ------------------
  266|   164k|        if (!cb(param_group_list[i], arg))
  ------------------
  |  Branch (266:13): [True: 0, False: 164k]
  ------------------
  267|      0|            return 0;
  268|  2.78k|#endif
  269|       |
  270|  2.78k|    return 1;
  271|  2.78k|}
capabilities.c:tls_sigalg_capability:
  323|  2.78k|{
  324|  2.78k|#if !defined(OPENSSL_NO_ML_DSA)
  325|  2.78k|    size_t i;
  326|       |
  327|  11.1k|    for (i = 0; i < OSSL_NELEM(param_sigalg_list); i++)
  ------------------
  |  |   14|  11.1k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (327:17): [True: 8.35k, False: 2.78k]
  ------------------
  328|  8.35k|        if (!cb(param_sigalg_list[i], arg))
  ------------------
  |  Branch (328:13): [True: 0, False: 8.35k]
  ------------------
  329|      0|            return 0;
  330|  2.78k|#endif
  331|  2.78k|    return 1;
  332|  2.78k|}

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

ossl_prov_ctx_new:
   16|  1.41k|{
   17|  1.41k|    return OPENSSL_zalloc(sizeof(PROV_CTX));
  ------------------
  |  |  108|  1.41k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   18|  1.41k|}
ossl_prov_ctx_free:
   21|  1.41k|{
   22|  1.41k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  1.41k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   23|  1.41k|}
ossl_prov_ctx_set0_libctx:
   26|  1.41k|{
   27|  1.41k|    if (ctx != NULL)
  ------------------
  |  Branch (27:9): [True: 1.41k, False: 0]
  ------------------
   28|  1.41k|        ctx->libctx = libctx;
   29|  1.41k|}
ossl_prov_ctx_set0_handle:
   32|  1.41k|{
   33|  1.41k|    if (ctx != NULL)
  ------------------
  |  Branch (33:9): [True: 1.41k, False: 0]
  ------------------
   34|  1.41k|        ctx->handle = handle;
   35|  1.41k|}
ossl_prov_ctx_set0_core_bio_method:
   38|  1.41k|{
   39|  1.41k|    if (ctx != NULL)
  ------------------
  |  Branch (39:9): [True: 1.41k, False: 0]
  ------------------
   40|  1.41k|        ctx->corebiometh = corebiometh;
   41|  1.41k|}
ossl_prov_ctx_set0_core_get_params:
   45|  1.41k|{
   46|  1.41k|    if (ctx != NULL)
  ------------------
  |  Branch (46:9): [True: 1.41k, False: 0]
  ------------------
   47|  1.41k|        ctx->core_get_params = c_get_params;
   48|  1.41k|}
ossl_prov_ctx_get0_libctx:
   51|   884k|{
   52|   884k|    if (ctx == NULL)
  ------------------
  |  Branch (52:9): [True: 0, False: 884k]
  ------------------
   53|      0|        return NULL;
   54|   884k|    return ctx->libctx;
   55|   884k|}
ossl_prov_ctx_get0_core_bio_method:
   65|   873k|{
   66|   873k|    if (ctx == NULL)
  ------------------
  |  Branch (66:9): [True: 0, False: 873k]
  ------------------
   67|      0|        return NULL;
   68|   873k|    return ctx->corebiometh;
   69|   873k|}
ossl_prov_ctx_get_param:
   80|  4.42k|{
   81|  4.42k|    char *val = NULL;
   82|  4.42k|    OSSL_PARAM param[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.42k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM param[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.42k|    { NULL, 0, NULL, 0, 0 }
  ------------------
   83|       |
   84|  4.42k|    if (ctx == NULL
  ------------------
  |  Branch (84:9): [True: 0, False: 4.42k]
  ------------------
   85|  4.42k|        || ctx->handle == NULL
  ------------------
  |  Branch (85:12): [True: 0, False: 4.42k]
  ------------------
   86|  4.42k|        || ctx->core_get_params == NULL)
  ------------------
  |  Branch (86:12): [True: 0, False: 4.42k]
  ------------------
   87|      0|        return defval;
   88|       |
   89|  4.42k|    param[0].key = (char *)name;
   90|  4.42k|    param[0].data_type = OSSL_PARAM_UTF8_PTR;
  ------------------
  |  |  141|  4.42k|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
   91|  4.42k|    param[0].data = (void *)&val;
   92|  4.42k|    param[0].data_size = sizeof(val);
   93|  4.42k|    param[0].return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  4.42k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
   94|       |
   95|       |    /* Errors are ignored, returning the default value */
   96|  4.42k|    if (ctx->core_get_params(ctx->handle, param)
  ------------------
  |  Branch (96:9): [True: 4.42k, False: 0]
  ------------------
   97|  4.42k|        && OSSL_PARAM_modified(param)
  ------------------
  |  Branch (97:12): [True: 0, False: 4.42k]
  ------------------
   98|      0|        && val != NULL)
  ------------------
  |  Branch (98:12): [True: 0, False: 0]
  ------------------
   99|      0|        return val;
  100|  4.42k|    return defval;
  101|  4.42k|}
ossl_prov_ctx_get_bool_param:
  104|  2.95k|{
  105|  2.95k|    const char *val = ossl_prov_ctx_get_param(ctx, name, NULL);
  106|       |
  107|  2.95k|    if (val != NULL) {
  ------------------
  |  Branch (107:9): [True: 0, False: 2.95k]
  ------------------
  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|  2.95k|    return defval;
  120|  2.95k|}

ossl_err_load_PROV_strings:
  263|      1|{
  264|      1|#ifndef OPENSSL_NO_ERR
  265|      1|    if (ERR_reason_error_string(PROV_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (265:9): [True: 1, False: 0]
  ------------------
  266|      1|        ERR_load_strings_const(PROV_str_reasons);
  267|      1|#endif
  268|      1|    return 1;
  269|      1|}

ossl_prov_seeding_from_dispatch:
   42|    785|{
   43|  42.3k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (43:12): [True: 41.6k, False: 785]
  ------------------
   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|  41.6k|#define set_func(c, f)   \
   50|  41.6k|    do {                 \
   51|  41.6k|        if (c == NULL)   \
   52|  41.6k|            c = f;       \
   53|  41.6k|        else if (c != f) \
   54|  41.6k|            return 0;    \
   55|  41.6k|    } while (0)
   56|  41.6k|        switch (fns->function_id) {
  ------------------
  |  Branch (56:17): [True: 6.28k, False: 35.3k]
  ------------------
   57|    785|        case OSSL_FUNC_GET_ENTROPY:
  ------------------
  |  |  188|    785|#define OSSL_FUNC_GET_ENTROPY 101
  ------------------
  |  Branch (57:9): [True: 785, False: 40.8k]
  ------------------
   58|    785|            set_func(c_get_entropy, OSSL_FUNC_get_entropy(fns));
  ------------------
  |  |   50|    785|    do {                 \
  |  |   51|    785|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 784]
  |  |  ------------------
  |  |   52|    785|            c = f;       \
  |  |   53|    785|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 784]
  |  |  ------------------
  |  |   54|    784|            return 0;    \
  |  |   55|    785|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 785]
  |  |  ------------------
  ------------------
   59|    785|            break;
   60|    785|        case OSSL_FUNC_GET_USER_ENTROPY:
  ------------------
  |  |  179|    785|#define OSSL_FUNC_GET_USER_ENTROPY 98
  ------------------
  |  Branch (60:9): [True: 785, False: 40.8k]
  ------------------
   61|    785|            set_func(c_get_user_entropy, OSSL_FUNC_get_user_entropy(fns));
  ------------------
  |  |   50|    785|    do {                 \
  |  |   51|    785|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 784]
  |  |  ------------------
  |  |   52|    785|            c = f;       \
  |  |   53|    785|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 784]
  |  |  ------------------
  |  |   54|    784|            return 0;    \
  |  |   55|    785|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 785]
  |  |  ------------------
  ------------------
   62|    785|            break;
   63|    785|        case OSSL_FUNC_CLEANUP_ENTROPY:
  ------------------
  |  |  189|    785|#define OSSL_FUNC_CLEANUP_ENTROPY 102
  ------------------
  |  Branch (63:9): [True: 785, False: 40.8k]
  ------------------
   64|    785|            set_func(c_cleanup_entropy, OSSL_FUNC_cleanup_entropy(fns));
  ------------------
  |  |   50|    785|    do {                 \
  |  |   51|    785|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 784]
  |  |  ------------------
  |  |   52|    785|            c = f;       \
  |  |   53|    785|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 784]
  |  |  ------------------
  |  |   54|    784|            return 0;    \
  |  |   55|    785|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 785]
  |  |  ------------------
  ------------------
   65|    785|            break;
   66|    785|        case OSSL_FUNC_CLEANUP_USER_ENTROPY:
  ------------------
  |  |  177|    785|#define OSSL_FUNC_CLEANUP_USER_ENTROPY 96
  ------------------
  |  Branch (66:9): [True: 785, False: 40.8k]
  ------------------
   67|    785|            set_func(c_cleanup_user_entropy, OSSL_FUNC_cleanup_user_entropy(fns));
  ------------------
  |  |   50|    785|    do {                 \
  |  |   51|    785|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 784]
  |  |  ------------------
  |  |   52|    785|            c = f;       \
  |  |   53|    785|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 784]
  |  |  ------------------
  |  |   54|    784|            return 0;    \
  |  |   55|    785|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 785]
  |  |  ------------------
  ------------------
   68|    785|            break;
   69|    785|        case OSSL_FUNC_GET_NONCE:
  ------------------
  |  |  190|    785|#define OSSL_FUNC_GET_NONCE 103
  ------------------
  |  Branch (69:9): [True: 785, False: 40.8k]
  ------------------
   70|    785|            set_func(c_get_nonce, OSSL_FUNC_get_nonce(fns));
  ------------------
  |  |   50|    785|    do {                 \
  |  |   51|    785|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 784]
  |  |  ------------------
  |  |   52|    785|            c = f;       \
  |  |   53|    785|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 784]
  |  |  ------------------
  |  |   54|    784|            return 0;    \
  |  |   55|    785|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 785]
  |  |  ------------------
  ------------------
   71|    785|            break;
   72|    785|        case OSSL_FUNC_GET_USER_NONCE:
  ------------------
  |  |  180|    785|#define OSSL_FUNC_GET_USER_NONCE 99
  ------------------
  |  Branch (72:9): [True: 785, False: 40.8k]
  ------------------
   73|    785|            set_func(c_get_user_nonce, OSSL_FUNC_get_user_nonce(fns));
  ------------------
  |  |   50|    785|    do {                 \
  |  |   51|    785|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 784]
  |  |  ------------------
  |  |   52|    785|            c = f;       \
  |  |   53|    785|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 784]
  |  |  ------------------
  |  |   54|    784|            return 0;    \
  |  |   55|    785|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 785]
  |  |  ------------------
  ------------------
   74|    785|            break;
   75|    785|        case OSSL_FUNC_CLEANUP_NONCE:
  ------------------
  |  |  191|    785|#define OSSL_FUNC_CLEANUP_NONCE 104
  ------------------
  |  Branch (75:9): [True: 785, False: 40.8k]
  ------------------
   76|    785|            set_func(c_cleanup_nonce, OSSL_FUNC_cleanup_nonce(fns));
  ------------------
  |  |   50|    785|    do {                 \
  |  |   51|    785|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 784]
  |  |  ------------------
  |  |   52|    785|            c = f;       \
  |  |   53|    785|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 784]
  |  |  ------------------
  |  |   54|    784|            return 0;    \
  |  |   55|    785|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 785]
  |  |  ------------------
  ------------------
   77|    785|            break;
   78|    785|        case OSSL_FUNC_CLEANUP_USER_NONCE:
  ------------------
  |  |  178|    785|#define OSSL_FUNC_CLEANUP_USER_NONCE 97
  ------------------
  |  Branch (78:9): [True: 785, False: 40.8k]
  ------------------
   79|    785|            set_func(c_cleanup_user_nonce, OSSL_FUNC_cleanup_user_nonce(fns));
  ------------------
  |  |   50|    785|    do {                 \
  |  |   51|    785|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 784]
  |  |  ------------------
  |  |   52|    785|            c = f;       \
  |  |   53|    785|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 784]
  |  |  ------------------
  |  |   54|    784|            return 0;    \
  |  |   55|    785|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 785]
  |  |  ------------------
  ------------------
   80|    785|            break;
   81|  41.6k|        }
   82|  41.6k|#undef set_func
   83|  41.6k|    }
   84|    785|    return 1;
   85|    785|}

ossl_prov_cache_exported_algorithms:
  340|    785|{
  341|    785|    int i, j;
  342|       |
  343|    785|    if (out[0].algorithm_names == NULL) {
  ------------------
  |  Branch (343:9): [True: 1, False: 784]
  ------------------
  344|    140|        for (i = j = 0; in[i].alg.algorithm_names != NULL; ++i) {
  ------------------
  |  Branch (344:25): [True: 139, False: 1]
  ------------------
  345|    139|            if (in[i].capable == NULL || in[i].capable())
  ------------------
  |  Branch (345:17): [True: 126, False: 13]
  |  Branch (345:42): [True: 4, False: 9]
  ------------------
  346|    130|                out[j++] = in[i].alg;
  347|    139|        }
  348|      1|        out[j++] = in[i].alg;
  349|      1|    }
  350|    785|}

ossl_default_provider_init:
  754|    785|{
  755|    785|    OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;
  756|    785|    BIO_METHOD *corebiometh;
  757|       |
  758|    785|    if (!ossl_prov_bio_from_dispatch(in)
  ------------------
  |  Branch (758:9): [True: 0, False: 785]
  ------------------
  759|    785|        || !ossl_prov_seeding_from_dispatch(in))
  ------------------
  |  Branch (759:12): [True: 0, False: 785]
  ------------------
  760|      0|        return 0;
  761|  42.3k|    for (; in->function_id != 0; in++) {
  ------------------
  |  Branch (761:12): [True: 41.6k, False: 785]
  ------------------
  762|  41.6k|        switch (in->function_id) {
  763|    785|        case OSSL_FUNC_CORE_GETTABLE_PARAMS:
  ------------------
  |  |   72|    785|#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
  ------------------
  |  Branch (763:9): [True: 785, False: 40.8k]
  ------------------
  764|    785|            c_gettable_params = OSSL_FUNC_core_gettable_params(in);
  765|    785|            break;
  766|    785|        case OSSL_FUNC_CORE_GET_PARAMS:
  ------------------
  |  |   75|    785|#define OSSL_FUNC_CORE_GET_PARAMS 2
  ------------------
  |  Branch (766:9): [True: 785, False: 40.8k]
  ------------------
  767|    785|            c_get_params = OSSL_FUNC_core_get_params(in);
  768|    785|            break;
  769|    785|        case OSSL_FUNC_CORE_GET_LIBCTX:
  ------------------
  |  |   79|    785|#define OSSL_FUNC_CORE_GET_LIBCTX 4
  ------------------
  |  Branch (769:9): [True: 785, False: 40.8k]
  ------------------
  770|    785|            c_get_libctx = OSSL_FUNC_core_get_libctx(in);
  771|    785|            break;
  772|  39.2k|        default:
  ------------------
  |  Branch (772:9): [True: 39.2k, False: 2.35k]
  ------------------
  773|       |            /* Just ignore anything we don't understand */
  774|  39.2k|            break;
  775|  41.6k|        }
  776|  41.6k|    }
  777|       |
  778|    785|    if (c_get_libctx == NULL)
  ------------------
  |  Branch (778:9): [True: 0, False: 785]
  ------------------
  779|      0|        return 0;
  780|       |
  781|       |    /*
  782|       |     * We want to make sure that all calls from this provider that requires
  783|       |     * a library context use the same context as the one used to call our
  784|       |     * functions.  We do that by passing it along in the provider context.
  785|       |     *
  786|       |     * This only works for built-in providers.  Most providers should
  787|       |     * create their own library context.
  788|       |     */
  789|    785|    if ((*provctx = ossl_prov_ctx_new()) == NULL
  ------------------
  |  Branch (789:9): [True: 0, False: 785]
  ------------------
  790|    785|        || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) {
  ------------------
  |  Branch (790:12): [True: 0, False: 785]
  ------------------
  791|      0|        ossl_prov_ctx_free(*provctx);
  792|      0|        *provctx = NULL;
  793|      0|        return 0;
  794|      0|    }
  795|    785|    ossl_prov_ctx_set0_libctx(*provctx,
  796|    785|        (OSSL_LIB_CTX *)c_get_libctx(handle));
  797|    785|    ossl_prov_ctx_set0_handle(*provctx, handle);
  798|    785|    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
  799|    785|    ossl_prov_ctx_set0_core_get_params(*provctx, c_get_params);
  800|       |
  801|    785|    *out = deflt_dispatch_table;
  802|    785|    ossl_prov_cache_exported_algorithms(deflt_ciphers, exported_ciphers);
  803|       |
  804|    785|    return 1;
  805|    785|}
defltprov.c:deflt_teardown:
  732|    785|{
  733|    785|    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
  734|    785|    ossl_prov_ctx_free(provctx);
  735|    785|}
defltprov.c:deflt_query:
  696|  79.4k|{
  697|  79.4k|    *no_cache = 0;
  698|  79.4k|    switch (operation_id) {
  ------------------
  |  Branch (698:13): [True: 79.4k, False: 0]
  ------------------
  699|  25.9k|    case OSSL_OP_DIGEST:
  ------------------
  |  |  283|  25.9k|#define OSSL_OP_DIGEST 1
  ------------------
  |  Branch (699:5): [True: 25.9k, False: 53.4k]
  ------------------
  700|  25.9k|        return deflt_digests;
  701|  33.8k|    case OSSL_OP_CIPHER:
  ------------------
  |  |  284|  33.8k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
  |  Branch (701:5): [True: 33.8k, False: 45.5k]
  ------------------
  702|  33.8k|        return exported_ciphers;
  703|      0|    case OSSL_OP_MAC:
  ------------------
  |  |  285|      0|#define OSSL_OP_MAC 3
  ------------------
  |  Branch (703:5): [True: 0, False: 79.4k]
  ------------------
  704|      0|        return deflt_macs;
  705|      0|    case OSSL_OP_KDF:
  ------------------
  |  |  286|      0|#define OSSL_OP_KDF 4
  ------------------
  |  Branch (705:5): [True: 0, False: 79.4k]
  ------------------
  706|      0|        return deflt_kdfs;
  707|  1.10k|    case OSSL_OP_RAND:
  ------------------
  |  |  287|  1.10k|#define OSSL_OP_RAND 5
  ------------------
  |  Branch (707:5): [True: 1.10k, False: 78.3k]
  ------------------
  708|  1.10k|        return deflt_rands;
  709|  15.9k|    case OSSL_OP_KEYMGMT:
  ------------------
  |  |  288|  15.9k|#define OSSL_OP_KEYMGMT 10
  ------------------
  |  Branch (709:5): [True: 15.9k, False: 63.4k]
  ------------------
  710|  15.9k|        return deflt_keymgmt;
  711|  1.26k|    case OSSL_OP_KEYEXCH:
  ------------------
  |  |  289|  1.26k|#define OSSL_OP_KEYEXCH 11
  ------------------
  |  Branch (711:5): [True: 1.26k, False: 78.1k]
  ------------------
  712|  1.26k|        return deflt_keyexch;
  713|  1.26k|    case OSSL_OP_SIGNATURE:
  ------------------
  |  |  290|  1.26k|#define OSSL_OP_SIGNATURE 12
  ------------------
  |  Branch (713:5): [True: 1.26k, False: 78.1k]
  ------------------
  714|  1.26k|        return deflt_signature;
  715|      0|    case OSSL_OP_ASYM_CIPHER:
  ------------------
  |  |  291|      0|#define OSSL_OP_ASYM_CIPHER 13
  ------------------
  |  Branch (715:5): [True: 0, False: 79.4k]
  ------------------
  716|      0|        return deflt_asym_cipher;
  717|      0|    case OSSL_OP_KEM:
  ------------------
  |  |  292|      0|#define OSSL_OP_KEM 14
  ------------------
  |  Branch (717:5): [True: 0, False: 79.4k]
  ------------------
  718|      0|        return deflt_asym_kem;
  719|      0|    case OSSL_OP_ENCODER:
  ------------------
  |  |  295|      0|#define OSSL_OP_ENCODER 20
  ------------------
  |  Branch (719:5): [True: 0, False: 79.4k]
  ------------------
  720|      0|        return deflt_encoder;
  721|      4|    case OSSL_OP_DECODER:
  ------------------
  |  |  296|      4|#define OSSL_OP_DECODER 21
  ------------------
  |  Branch (721:5): [True: 4, False: 79.4k]
  ------------------
  722|      4|        return deflt_decoder;
  723|      0|    case OSSL_OP_STORE:
  ------------------
  |  |  297|      0|#define OSSL_OP_STORE 22
  ------------------
  |  Branch (723:5): [True: 0, False: 79.4k]
  ------------------
  724|      0|        return deflt_store;
  725|      0|    case OSSL_OP_SKEYMGMT:
  ------------------
  |  |  293|      0|#define OSSL_OP_SKEYMGMT 15
  ------------------
  |  Branch (725:5): [True: 0, False: 79.4k]
  ------------------
  726|      0|        return deflt_skeymgmt;
  727|  79.4k|    }
  728|      0|    return NULL;
  729|  79.4k|}

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

cipher_aes_cbc_hmac_sha.c:aes_128_cbc_hmac_sha1_get_params:
  401|    630|    {                                                                               \
  402|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  403|    630|            flags, kbits, blkbits, ivbits);                                         \
  404|    630|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_gettable_ctx_params:
  301|  2.52k|{
  302|  2.52k|    return cipher_aes_known_gettable_ctx_params;
  303|  2.52k|}
cipher_aes_cbc_hmac_sha.c:aes_256_cbc_hmac_sha1_get_params:
  401|    630|    {                                                                               \
  402|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  403|    630|            flags, kbits, blkbits, ivbits);                                         \
  404|    630|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_128_cbc_hmac_sha256_get_params:
  401|    630|    {                                                                               \
  402|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  403|    630|            flags, kbits, blkbits, ivbits);                                         \
  404|    630|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_256_cbc_hmac_sha256_get_params:
  401|    630|    {                                                                               \
  402|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  403|    630|            flags, kbits, blkbits, ivbits);                                         \
  404|    630|    }                                                                               \

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:
  288|    630|    {                                                                                                      \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  322|    630|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                                                \
  291|    630|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_gcm_siv_gettable_ctx_params:
  211|  1.89k|{
  212|  1.89k|    return aes_gcm_siv_known_gettable_ctx_params;
  213|  1.89k|}
cipher_aes_gcm_siv.c:ossl_aes_192_gcm_siv_get_params:
  288|    630|    {                                                                                                      \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  322|    630|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                                                \
  291|    630|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_256_gcm_siv_get_params:
  288|    630|    {                                                                                                      \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  322|    630|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                                                \
  291|    630|    }                                                                                                      \

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

cipher_aes_hw.c:cipher_hw_aesni_initkey:
   20|  70.4k|{
   21|  70.4k|    int ret;
   22|  70.4k|    PROV_AES_CTX *adat = (PROV_AES_CTX *)dat;
   23|  70.4k|    AES_KEY *ks = &adat->ks.ks;
   24|       |
   25|  70.4k|    dat->ks = ks;
   26|       |
   27|  70.4k|    if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  311|   140k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
                  if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  312|  31.0k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (27:10): [True: 39.3k, False: 31.0k]
  |  Branch (27:44): [True: 0, False: 31.0k]
  ------------------
   28|  39.3k|        && !dat->enc) {
  ------------------
  |  Branch (28:12): [True: 0, False: 39.3k]
  ------------------
   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 ?
  ------------------
  |  |  312|      0|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (31:27): [True: 0, False: 0]
  ------------------
   32|      0|            (cbc128_f) aesni_cbc_encrypt : NULL;
   33|  70.4k|    } else {
   34|  70.4k|        ret = aesni_set_encrypt_key(key, (int)(keylen * 8), ks);
   35|  70.4k|        dat->block = (block128_f) aesni_encrypt;
   36|  70.4k|        if (dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  312|  70.4k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (36:13): [True: 0, False: 70.4k]
  ------------------
   37|      0|            dat->stream.cbc = (cbc128_f) aesni_cbc_encrypt;
   38|  70.4k|        else if (dat->mode == EVP_CIPH_CTR_MODE)
  ------------------
  |  |  315|  70.4k|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  |  Branch (38:18): [True: 31.0k, False: 39.3k]
  ------------------
   39|  31.0k|            dat->stream.ctr = (ctr128_f) aesni_ctr32_encrypt_blocks;
   40|  39.3k|        else
   41|  39.3k|            dat->stream.cbc = NULL;
   42|  70.4k|    }
   43|       |
   44|  70.4k|    if (ret < 0) {
  ------------------
  |  Branch (44:9): [True: 0, False: 70.4k]
  ------------------
   45|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_KEY_SETUP_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   46|      0|        return 0;
   47|      0|    }
   48|       |
   49|  70.4k|    return 1;
   50|  70.4k|}
cipher_aes_hw.c:cipher_hw_aesni_ecb:
   64|  68.5k|{
   65|  68.5k|    if (len < ctx->blocksize)
  ------------------
  |  Branch (65:9): [True: 0, False: 68.5k]
  ------------------
   66|      0|        return 1;
   67|       |
   68|  68.5k|    aesni_ecb_encrypt(in, out, len, ctx->ks, ctx->enc);
   69|       |
   70|  68.5k|    return 1;
   71|  68.5k|}

cipher_aes_ocb.c:aes_256_ocb_get_params:
  527|    630|    {                                                                           \
  528|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  320|    630|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  529|    630|            flags, kbits, blkbits, ivbits);                                     \
  530|    630|    }                                                                           \
cipher_aes_ocb.c:cipher_ocb_gettable_ctx_params:
  486|  1.89k|{
  487|  1.89k|    return cipher_ocb_known_gettable_ctx_params;
  488|  1.89k|}
cipher_aes_ocb.c:aes_192_ocb_get_params:
  527|    630|    {                                                                           \
  528|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  320|    630|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  529|    630|            flags, kbits, blkbits, ivbits);                                     \
  530|    630|    }                                                                           \
cipher_aes_ocb.c:aes_128_ocb_get_params:
  527|    630|    {                                                                           \
  528|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  320|    630|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  529|    630|            flags, kbits, blkbits, ivbits);                                     \
  530|    630|    }                                                                           \

cipher_aes_siv.c:aes_128_siv_get_params:
  261|    630|    {                                                                            \
  262|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  321|    630|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  263|    630|            flags, 2 * kbits, blkbits, ivbits);                                  \
  264|    630|    }                                                                            \
cipher_aes_siv.c:aes_siv_gettable_ctx_params:
  186|  1.89k|{
  187|  1.89k|    return aes_siv_known_gettable_ctx_params;
  188|  1.89k|}
cipher_aes_siv.c:aes_192_siv_get_params:
  261|    630|    {                                                                            \
  262|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  321|    630|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  263|    630|            flags, 2 * kbits, blkbits, ivbits);                                  \
  264|    630|    }                                                                            \
cipher_aes_siv.c:aes_256_siv_get_params:
  261|    630|    {                                                                            \
  262|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  321|    630|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  263|    630|            flags, 2 * kbits, blkbits, ivbits);                                  \
  264|    630|    }                                                                            \

cipher_aes_wrp.c:aes_256_wrap_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrap_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrap_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrappad_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrappad_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrappad_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrapinv_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrapinv_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrapinv_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrappadinv_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrappadinv_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrappadinv_get_params:
  288|    630|    {                                                                           \
  289|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    630|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    630|            flags, kbits, blkbits, ivbits);                                     \
  291|    630|    }                                                                           \

cipher_aes_xts.c:aes_256_xts_get_params:
  282|    630|    {                                                                              \
  283|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  318|    630|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  284|    630|            flags, 2 * kbits, AES_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   25|    630|#define AES_XTS_BLOCK_BITS 8
  ------------------
  285|    630|            AES_XTS_IV_BITS);                                                      \
  ------------------
  |  |   24|    630|#define AES_XTS_IV_BITS 128
  ------------------
  286|    630|    }                                                                              \
cipher_aes_xts.c:aes_128_xts_get_params:
  282|    630|    {                                                                              \
  283|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  318|    630|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  284|    630|            flags, 2 * kbits, AES_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   25|    630|#define AES_XTS_BLOCK_BITS 8
  ------------------
  285|    630|            AES_XTS_IV_BITS);                                                      \
  ------------------
  |  |   24|    630|#define AES_XTS_IV_BITS 128
  ------------------
  286|    630|    }                                                                              \

cipher_chacha20.c:chacha20_get_params:
   96|    630|{
   97|    630|    return ossl_cipher_generic_get_params(params, 0, CHACHA20_FLAGS,
  ------------------
  |  |   21|    630|#define CHACHA20_FLAGS (PROV_CIPHER_FLAG_CUSTOM_IV)
  |  |  ------------------
  |  |  |  |   40|    630|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  |  |  ------------------
  ------------------
   98|    630|        CHACHA20_KEYLEN * 8,
  ------------------
  |  |   18|    630|#define CHACHA20_KEYLEN (CHACHA_KEY_SIZE)
  |  |  ------------------
  |  |  |  |   44|    630|#define CHACHA_KEY_SIZE 32
  |  |  ------------------
  ------------------
   99|    630|        CHACHA20_BLKLEN * 8,
  ------------------
  |  |   19|    630|#define CHACHA20_BLKLEN (1)
  ------------------
  100|    630|        CHACHA20_IVLEN * 8);
  ------------------
  |  |   20|    630|#define CHACHA20_IVLEN (CHACHA_CTR_SIZE)
  |  |  ------------------
  |  |  |  |   45|    630|#define CHACHA_CTR_SIZE 16
  |  |  ------------------
  ------------------
  101|    630|}
cipher_chacha20.c:chacha20_gettable_ctx_params:
  141|    630|{
  142|    630|    return chacha20_known_gettable_ctx_params;
  143|    630|}

cipher_chacha20_poly1305.c:chacha20_poly1305_get_params:
   96|  3.33k|{
   97|  3.33k|    return ossl_cipher_generic_get_params(params, 0, CHACHA20_POLY1305_FLAGS,
  ------------------
  |  |   25|  3.33k|#define CHACHA20_POLY1305_FLAGS (PROV_CIPHER_FLAG_AEAD \
  |  |  ------------------
  |  |  |  |   39|  3.33k|#define PROV_CIPHER_FLAG_AEAD 0x0001
  |  |  ------------------
  |  |   26|  3.33k|    | PROV_CIPHER_FLAG_CUSTOM_IV)
  |  |  ------------------
  |  |  |  |   40|  3.33k|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  |  |  ------------------
  ------------------
   98|  3.33k|        CHACHA20_POLY1305_KEYLEN * 8,
  ------------------
  |  |   21|  3.33k|#define CHACHA20_POLY1305_KEYLEN CHACHA_KEY_SIZE
  |  |  ------------------
  |  |  |  |   44|  3.33k|#define CHACHA_KEY_SIZE 32
  |  |  ------------------
  ------------------
   99|  3.33k|        CHACHA20_POLY1305_BLKLEN * 8,
  ------------------
  |  |   22|  3.33k|#define CHACHA20_POLY1305_BLKLEN 1
  ------------------
  100|  3.33k|        CHACHA20_POLY1305_IVLEN * 8);
  ------------------
  |  |   16|  3.33k|#define CHACHA20_POLY1305_IVLEN 12
  ------------------
  101|  3.33k|}
cipher_chacha20_poly1305.c:chacha20_poly1305_gettable_ctx_params:
  262|    630|{
  263|    630|    return chacha20_poly1305_get_ctx_params_list;
  264|    630|}

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

cipher_null.c:null_get_params:
  104|    630|{
  105|    630|    return ossl_cipher_generic_get_params(params, 0, 0, 0, 8, 0);
  106|    630|}
cipher_null.c:null_gettable_ctx_params:
  118|    630|{
  119|    630|    return null_known_gettable_ctx_params;
  120|    630|}

cipher_sm4_xts.c:sm4_128_xts_get_params:
  246|    630|    {                                                                              \
  247|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  318|    630|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  248|    630|            flags, 2 * kbits, SM4_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   20|    630|#define SM4_XTS_BLOCK_BITS 8
  ------------------
  249|    630|            SM4_XTS_IV_BITS);                                                      \
  ------------------
  |  |   19|    630|#define SM4_XTS_IV_BITS 128
  ------------------
  250|    630|    }                                                                              \

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

ossl_tdes_get_params:
  185|  9.00k|{
  186|       |#ifdef FIPS_MODULE
  187|       |    const int decrypt_only = 1;
  188|       |#else
  189|  9.00k|    const int decrypt_only = 0;
  190|  9.00k|#endif
  191|  9.00k|    OSSL_PARAM *p;
  192|       |
  193|  9.00k|    p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_DECRYPT_ONLY);
  ------------------
  |  |  193|  9.00k|# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
  ------------------
  194|  9.00k|    if (p != NULL && !OSSL_PARAM_set_int(p, decrypt_only)) {
  ------------------
  |  Branch (194:9): [True: 2.70k, False: 6.30k]
  |  Branch (194:22): [True: 0, False: 2.70k]
  ------------------
  195|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  196|      0|        return 0;
  197|      0|    }
  198|       |
  199|  9.00k|    return ossl_cipher_generic_get_params(params, md, flags,
  200|  9.00k|        kbits, blkbits, ivbits);
  201|  9.00k|}

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

ossl_cipher_generic_get_params:
  205|   119k|{
  206|   119k|    struct ossl_cipher_generic_get_params_st p;
  207|       |
  208|   119k|    if (!ossl_cipher_generic_get_params_decoder(params, &p))
  ------------------
  |  Branch (208:9): [True: 0, False: 119k]
  ------------------
  209|      0|        return 0;
  210|       |
  211|   119k|    if (p.mode != NULL && !OSSL_PARAM_set_uint(p.mode, md)) {
  ------------------
  |  Branch (211:9): [True: 81.9k, False: 37.8k]
  |  Branch (211:27): [True: 0, False: 81.9k]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return 0;
  214|      0|    }
  215|   119k|    if (p.aead != NULL
  ------------------
  |  Branch (215:9): [True: 81.9k, False: 37.8k]
  ------------------
  216|  81.9k|        && !OSSL_PARAM_set_int(p.aead, (flags & PROV_CIPHER_FLAG_AEAD) != 0)) {
  ------------------
  |  |   39|  81.9k|#define PROV_CIPHER_FLAG_AEAD 0x0001
  ------------------
  |  Branch (216:12): [True: 0, False: 81.9k]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        return 0;
  219|      0|    }
  220|   119k|    if (p.custiv != NULL
  ------------------
  |  Branch (220:9): [True: 81.9k, False: 37.8k]
  ------------------
  221|  81.9k|        && !OSSL_PARAM_set_int(p.custiv, (flags & PROV_CIPHER_FLAG_CUSTOM_IV) != 0)) {
  ------------------
  |  |   40|  81.9k|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  ------------------
  |  Branch (221:12): [True: 0, False: 81.9k]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        return 0;
  224|      0|    }
  225|   119k|    if (p.cts != NULL
  ------------------
  |  Branch (225:9): [True: 81.9k, False: 37.8k]
  ------------------
  226|  81.9k|        && !OSSL_PARAM_set_int(p.cts, (flags & PROV_CIPHER_FLAG_CTS) != 0)) {
  ------------------
  |  |   41|  81.9k|#define PROV_CIPHER_FLAG_CTS 0x0004
  ------------------
  |  Branch (226:12): [True: 0, False: 81.9k]
  ------------------
  227|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|        return 0;
  229|      0|    }
  230|   119k|    if (p.mb != NULL
  ------------------
  |  Branch (230:9): [True: 81.9k, False: 37.8k]
  ------------------
  231|  81.9k|        && !OSSL_PARAM_set_int(p.mb, (flags & PROV_CIPHER_FLAG_TLS1_MULTIBLOCK) != 0)) {
  ------------------
  |  |   42|  81.9k|#define PROV_CIPHER_FLAG_TLS1_MULTIBLOCK 0x0008
  ------------------
  |  Branch (231:12): [True: 0, False: 81.9k]
  ------------------
  232|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  233|      0|        return 0;
  234|      0|    }
  235|   119k|    if (p.rand != NULL
  ------------------
  |  Branch (235:9): [True: 81.9k, False: 37.8k]
  ------------------
  236|  81.9k|        && !OSSL_PARAM_set_int(p.rand, (flags & PROV_CIPHER_FLAG_RAND_KEY) != 0)) {
  ------------------
  |  |   43|  81.9k|#define PROV_CIPHER_FLAG_RAND_KEY 0x0010
  ------------------
  |  Branch (236:12): [True: 0, False: 81.9k]
  ------------------
  237|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  238|      0|        return 0;
  239|      0|    }
  240|   119k|    if (p.etm != NULL
  ------------------
  |  Branch (240:9): [True: 81.9k, False: 37.8k]
  ------------------
  241|  81.9k|        && !OSSL_PARAM_set_int(p.etm, (flags & EVP_CIPH_FLAG_ENC_THEN_MAC) != 0)) {
  ------------------
  |  |  368|  81.9k|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  |  Branch (241:12): [True: 0, False: 81.9k]
  ------------------
  242|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  243|      0|        return 0;
  244|      0|    }
  245|   119k|    if (p.keylen != NULL && !OSSL_PARAM_set_size_t(p.keylen, kbits / 8)) {
  ------------------
  |  Branch (245:9): [True: 81.9k, False: 37.8k]
  |  Branch (245:29): [True: 0, False: 81.9k]
  ------------------
  246|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  247|      0|        return 0;
  248|      0|    }
  249|   119k|    if (p.bsize != NULL && !OSSL_PARAM_set_size_t(p.bsize, blkbits / 8)) {
  ------------------
  |  Branch (249:9): [True: 81.9k, False: 37.8k]
  |  Branch (249:28): [True: 0, False: 81.9k]
  ------------------
  250|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  251|      0|        return 0;
  252|      0|    }
  253|   119k|    if (p.ivlen != NULL && !OSSL_PARAM_set_size_t(p.ivlen, ivbits / 8)) {
  ------------------
  |  Branch (253:9): [True: 81.9k, False: 37.8k]
  |  Branch (253:28): [True: 0, False: 81.9k]
  ------------------
  254|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  255|      0|        return 0;
  256|      0|    }
  257|   119k|    return 1;
  258|   119k|}
ossl_cipher_generic_gettable_ctx_params:
  392|  52.2k|{
  393|  52.2k|    return cipher_generic_get_ctx_params_list;
  394|  52.2k|}
ossl_cipher_generic_reset_ctx:
  684|  4.95k|{
  685|  4.95k|    if (ctx != NULL && ctx->alloced) {
  ------------------
  |  Branch (685:9): [True: 4.95k, False: 0]
  |  Branch (685:24): [True: 0, False: 4.95k]
  ------------------
  686|      0|        OPENSSL_free(ctx->tlsmac);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  687|      0|        ctx->alloced = 0;
  688|       |        ctx->tlsmac = NULL;
  689|      0|    }
  690|  4.95k|}
ossl_cipher_generic_einit:
  735|  99.8k|{
  736|  99.8k|    return cipher_generic_init_internal((PROV_CIPHER_CTX *)vctx, key, keylen,
  737|  99.8k|        iv, ivlen, params, 1);
  738|  99.8k|}
ossl_cipher_generic_block_update:
  776|  68.5k|{
  777|  68.5k|    size_t outlint = 0;
  778|  68.5k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  779|  68.5k|    size_t blksz = ctx->blocksize;
  780|  68.5k|    size_t nextblocks;
  781|       |
  782|  68.5k|    if (!ctx->key_set) {
  ------------------
  |  Branch (782:9): [True: 0, False: 68.5k]
  ------------------
  783|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  784|      0|        return 0;
  785|      0|    }
  786|       |
  787|  68.5k|    if (ctx->tlsversion > 0) {
  ------------------
  |  Branch (787:9): [True: 0, False: 68.5k]
  ------------------
  788|       |        /*
  789|       |         * Each update call corresponds to a TLS record and is individually
  790|       |         * padded
  791|       |         */
  792|       |
  793|       |        /* Sanity check inputs */
  794|      0|        if (in == NULL
  ------------------
  |  Branch (794:13): [True: 0, False: 0]
  ------------------
  795|      0|            || in != out
  ------------------
  |  Branch (795:16): [True: 0, False: 0]
  ------------------
  796|      0|            || outsize < inl
  ------------------
  |  Branch (796:16): [True: 0, False: 0]
  ------------------
  797|      0|            || !ctx->pad) {
  ------------------
  |  Branch (797:16): [True: 0, False: 0]
  ------------------
  798|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  799|      0|            return 0;
  800|      0|        }
  801|       |
  802|      0|        if (ctx->enc) {
  ------------------
  |  Branch (802:13): [True: 0, False: 0]
  ------------------
  803|      0|            unsigned char padval;
  804|      0|            size_t padnum, loop;
  805|       |
  806|       |            /* Add padding */
  807|       |
  808|      0|            padnum = blksz - (inl % blksz);
  809|       |
  810|      0|            if (outsize < inl + padnum) {
  ------------------
  |  Branch (810:17): [True: 0, False: 0]
  ------------------
  811|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  812|      0|                return 0;
  813|      0|            }
  814|       |
  815|      0|            if (padnum > MAX_PADDING) {
  ------------------
  |  |  771|      0|#define MAX_PADDING 256
  ------------------
  |  Branch (815:17): [True: 0, False: 0]
  ------------------
  816|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  817|      0|                return 0;
  818|      0|            }
  819|      0|            padval = (unsigned char)(padnum - 1);
  820|      0|            if (ctx->tlsversion == SSL3_VERSION) {
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (820:17): [True: 0, False: 0]
  ------------------
  821|      0|                if (padnum > 1)
  ------------------
  |  Branch (821:21): [True: 0, False: 0]
  ------------------
  822|      0|                    memset(out + inl, 0, padnum - 1);
  823|      0|                *(out + inl + padnum - 1) = padval;
  824|      0|            } else {
  825|       |                /* we need to add 'padnum' padding bytes of value padval */
  826|      0|                for (loop = inl; loop < inl + padnum; loop++)
  ------------------
  |  Branch (826:34): [True: 0, False: 0]
  ------------------
  827|      0|                    out[loop] = padval;
  828|      0|            }
  829|      0|            inl += padnum;
  830|      0|        }
  831|       |
  832|      0|        if ((inl % blksz) != 0) {
  ------------------
  |  Branch (832:13): [True: 0, False: 0]
  ------------------
  833|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  834|      0|            return 0;
  835|      0|        }
  836|       |
  837|       |        /* Shouldn't normally fail */
  838|      0|        if (!ctx->hw->cipher(ctx, out, in, inl)) {
  ------------------
  |  Branch (838:13): [True: 0, False: 0]
  ------------------
  839|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  840|      0|            return 0;
  841|      0|        }
  842|       |
  843|      0|        if (ctx->alloced) {
  ------------------
  |  Branch (843:13): [True: 0, False: 0]
  ------------------
  844|      0|            OPENSSL_free(ctx->tlsmac);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  845|      0|            ctx->alloced = 0;
  846|      0|            ctx->tlsmac = NULL;
  847|      0|        }
  848|       |
  849|       |        /* This only fails if padding is publicly invalid */
  850|      0|        *outl = inl;
  851|      0|        if (!ctx->enc
  ------------------
  |  Branch (851:13): [True: 0, False: 0]
  ------------------
  852|      0|            && !ossl_cipher_tlsunpadblock(ctx->libctx, ctx->tlsversion,
  ------------------
  |  Branch (852:16): [True: 0, False: 0]
  ------------------
  853|      0|                out, outl,
  854|      0|                blksz, &ctx->tlsmac, &ctx->alloced,
  855|      0|                ctx->tlsmacsize, 0)) {
  856|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  857|      0|            return 0;
  858|      0|        }
  859|      0|        return 1;
  860|      0|    }
  861|       |
  862|  68.5k|    if (ctx->bufsz != 0)
  ------------------
  |  Branch (862:9): [True: 0, False: 68.5k]
  ------------------
  863|      0|        nextblocks = ossl_cipher_fillblock(ctx->buf, &ctx->bufsz, blksz,
  864|      0|            &in, &inl);
  865|  68.5k|    else
  866|  68.5k|        nextblocks = inl & ~(blksz - 1);
  867|       |
  868|       |    /*
  869|       |     * If we're decrypting and we end an update on a block boundary we hold
  870|       |     * the last block back in case this is the last update call and the last
  871|       |     * block is padded.
  872|       |     */
  873|  68.5k|    if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) {
  ------------------
  |  Branch (873:9): [True: 0, False: 68.5k]
  |  Branch (873:33): [True: 0, False: 0]
  |  Branch (873:45): [True: 0, False: 0]
  |  Branch (873:56): [True: 0, False: 0]
  ------------------
  874|      0|        if (outsize < blksz) {
  ------------------
  |  Branch (874:13): [True: 0, False: 0]
  ------------------
  875|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  876|      0|            return 0;
  877|      0|        }
  878|      0|        if (!ctx->hw->cipher(ctx, out, ctx->buf, blksz)) {
  ------------------
  |  Branch (878:13): [True: 0, False: 0]
  ------------------
  879|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  880|      0|            return 0;
  881|      0|        }
  882|      0|        ctx->bufsz = 0;
  883|      0|        outlint = blksz;
  884|      0|        out += blksz;
  885|      0|    }
  886|  68.5k|    if (nextblocks > 0) {
  ------------------
  |  Branch (886:9): [True: 68.5k, False: 0]
  ------------------
  887|  68.5k|        if (!ctx->enc && ctx->pad && nextblocks == inl) {
  ------------------
  |  Branch (887:13): [True: 0, False: 68.5k]
  |  Branch (887:26): [True: 0, False: 0]
  |  Branch (887:38): [True: 0, False: 0]
  ------------------
  888|      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 (888:17): [True: 0, False: 0]
  ------------------
  889|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  890|      0|                return 0;
  891|      0|            }
  892|      0|            nextblocks -= blksz;
  893|      0|        }
  894|  68.5k|        outlint += nextblocks;
  895|  68.5k|        if (outsize < outlint) {
  ------------------
  |  Branch (895:13): [True: 0, False: 68.5k]
  ------------------
  896|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  897|      0|            return 0;
  898|      0|        }
  899|  68.5k|    }
  900|  68.5k|    if (nextblocks > 0) {
  ------------------
  |  Branch (900:9): [True: 68.5k, False: 0]
  ------------------
  901|  68.5k|        if (!ctx->hw->cipher(ctx, out, in, nextblocks)) {
  ------------------
  |  Branch (901:13): [True: 0, False: 68.5k]
  ------------------
  902|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  903|      0|            return 0;
  904|      0|        }
  905|  68.5k|        in += nextblocks;
  906|  68.5k|        inl -= nextblocks;
  907|  68.5k|    }
  908|  68.5k|    if (inl != 0
  ------------------
  |  Branch (908:9): [True: 0, False: 68.5k]
  ------------------
  909|      0|        && !ossl_cipher_trailingdata(ctx->buf, &ctx->bufsz, blksz, &in, &inl)) {
  ------------------
  |  Branch (909:12): [True: 0, False: 0]
  ------------------
  910|       |        /* ERR_raise already called */
  911|      0|        return 0;
  912|      0|    }
  913|       |
  914|  68.5k|    *outl = outlint;
  915|  68.5k|    return inl == 0;
  916|  68.5k|}
ossl_cipher_generic_stream_update:
  995|  26.1k|{
  996|  26.1k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  997|       |
  998|  26.1k|    if (!ctx->key_set) {
  ------------------
  |  Branch (998:9): [True: 0, False: 26.1k]
  ------------------
  999|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1000|      0|        return 0;
 1001|      0|    }
 1002|       |
 1003|  26.1k|    if (inl == 0) {
  ------------------
  |  Branch (1003:9): [True: 0, False: 26.1k]
  ------------------
 1004|      0|        *outl = 0;
 1005|      0|        return 1;
 1006|      0|    }
 1007|       |
 1008|  26.1k|    if (outsize < inl) {
  ------------------
  |  Branch (1008:9): [True: 0, False: 26.1k]
  ------------------
 1009|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1010|      0|        return 0;
 1011|      0|    }
 1012|       |
 1013|  26.1k|    if (!ctx->hw->cipher(ctx, out, in, inl)) {
  ------------------
  |  Branch (1013:9): [True: 0, False: 26.1k]
  ------------------
 1014|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1015|      0|        return 0;
 1016|      0|    }
 1017|       |
 1018|  26.1k|    *outl = inl;
 1019|  26.1k|    if (!ctx->enc && ctx->tlsversion > 0) {
  ------------------
  |  Branch (1019:9): [True: 0, False: 26.1k]
  |  Branch (1019:22): [True: 0, False: 0]
  ------------------
 1020|       |        /*
 1021|       |         * Remove any TLS padding. Only used by cipher_aes_cbc_hmac_sha1_hw.c and
 1022|       |         * cipher_aes_cbc_hmac_sha256_hw.c
 1023|       |         */
 1024|      0|        if (ctx->removetlspad) {
  ------------------
  |  Branch (1024:13): [True: 0, False: 0]
  ------------------
 1025|       |            /*
 1026|       |             * We should have already failed in the cipher() call above if this
 1027|       |             * isn't true.
 1028|       |             */
 1029|      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 (1029:17): [True: 0, False: 0]
  ------------------
 1030|      0|                return 0;
 1031|       |            /* The actual padding length */
 1032|      0|            *outl -= out[inl - 1] + 1;
 1033|      0|        }
 1034|       |
 1035|       |        /* TLS MAC and explicit IV if relevant. We should have already failed
 1036|       |         * in the cipher() call above if *outl is too short.
 1037|       |         */
 1038|      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 (1038:13): [True: 0, False: 0]
  ------------------
 1039|      0|            return 0;
 1040|      0|        *outl -= ctx->removetlsfixed;
 1041|       |
 1042|       |        /* Extract the MAC if there is one */
 1043|      0|        if (ctx->tlsmacsize > 0) {
  ------------------
  |  Branch (1043:13): [True: 0, False: 0]
  ------------------
 1044|      0|            if (*outl < ctx->tlsmacsize)
  ------------------
  |  Branch (1044:17): [True: 0, False: 0]
  ------------------
 1045|      0|                return 0;
 1046|       |
 1047|      0|            ctx->tlsmac = out + *outl - ctx->tlsmacsize;
 1048|      0|            *outl -= ctx->tlsmacsize;
 1049|      0|        }
 1050|      0|    }
 1051|       |
 1052|  26.1k|    return 1;
 1053|  26.1k|}
ossl_cipher_common_get_ctx_params:
 1100|  6.61k|{
 1101|  6.61k|    if (p->ivlen != NULL && !OSSL_PARAM_set_size_t(p->ivlen, ctx->ivlen)) {
  ------------------
  |  Branch (1101:9): [True: 1.65k, False: 4.95k]
  |  Branch (1101:29): [True: 0, False: 1.65k]
  ------------------
 1102|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1103|      0|        return 0;
 1104|      0|    }
 1105|       |
 1106|  6.61k|    if (p->pad != NULL && !OSSL_PARAM_set_uint(p->pad, ctx->pad)) {
  ------------------
  |  Branch (1106:9): [True: 0, False: 6.61k]
  |  Branch (1106:27): [True: 0, False: 0]
  ------------------
 1107|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1108|      0|        return 0;
 1109|      0|    }
 1110|       |
 1111|  6.61k|    if (p->iv != NULL
  ------------------
  |  Branch (1111:9): [True: 0, False: 6.61k]
  ------------------
 1112|      0|        && !OSSL_PARAM_set_octet_string_or_ptr(p->iv, ctx->oiv, ctx->ivlen)) {
  ------------------
  |  Branch (1112:12): [True: 0, False: 0]
  ------------------
 1113|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1114|      0|        return 0;
 1115|      0|    }
 1116|       |
 1117|  6.61k|    if (p->updiv != NULL
  ------------------
  |  Branch (1117:9): [True: 0, False: 6.61k]
  ------------------
 1118|      0|        && !OSSL_PARAM_set_octet_string_or_ptr(p->updiv, ctx->iv, ctx->ivlen)) {
  ------------------
  |  Branch (1118:12): [True: 0, False: 0]
  ------------------
 1119|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1120|      0|        return 0;
 1121|      0|    }
 1122|       |
 1123|  6.61k|    if (p->num != NULL && !OSSL_PARAM_set_uint(p->num, ctx->num)) {
  ------------------
  |  Branch (1123:9): [True: 0, False: 6.61k]
  |  Branch (1123:27): [True: 0, False: 0]
  ------------------
 1124|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1125|      0|        return 0;
 1126|      0|    }
 1127|       |
 1128|  6.61k|    if (p->keylen != NULL && !OSSL_PARAM_set_size_t(p->keylen, ctx->keylen)) {
  ------------------
  |  Branch (1128:9): [True: 4.95k, False: 1.65k]
  |  Branch (1128:30): [True: 0, False: 4.95k]
  ------------------
 1129|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1130|      0|        return 0;
 1131|      0|    }
 1132|       |
 1133|  6.61k|    if (p->tlsmac != NULL
  ------------------
  |  Branch (1133:9): [True: 0, False: 6.61k]
  ------------------
 1134|      0|        && !OSSL_PARAM_set_octet_ptr(p->tlsmac, ctx->tlsmac, ctx->tlsmacsize)) {
  ------------------
  |  Branch (1134:12): [True: 0, False: 0]
  ------------------
 1135|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1136|      0|        return 0;
 1137|      0|    }
 1138|  6.61k|    return 1;
 1139|  6.61k|}
ossl_cipher_generic_get_ctx_params:
 1142|  6.61k|{
 1143|  6.61k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
 1144|  6.61k|    struct ossl_cipher_get_ctx_param_list_st p;
 1145|       |
 1146|  6.61k|    if (ctx == NULL || !cipher_generic_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (1146:9): [True: 0, False: 6.61k]
  |  Branch (1146:24): [True: 0, False: 6.61k]
  ------------------
 1147|      0|        return 0;
 1148|  6.61k|    return ossl_cipher_common_get_ctx_params(ctx, &p);
 1149|  6.61k|}
ossl_cipher_generic_set_ctx_params:
 1204|  99.8k|{
 1205|  99.8k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
 1206|  99.8k|    struct ossl_cipher_set_ctx_param_list_st p;
 1207|       |
 1208|  99.8k|    if (ossl_param_is_empty(params))
  ------------------
  |  Branch (1208:9): [True: 99.8k, False: 0]
  ------------------
 1209|  99.8k|        return 1;
 1210|       |
 1211|      0|    if (ctx == NULL || !cipher_generic_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (1211:9): [True: 0, False: 0]
  |  Branch (1211:24): [True: 0, False: 0]
  ------------------
 1212|      0|        return 0;
 1213|      0|    return ossl_cipher_common_set_ctx_params(ctx, &p);
 1214|      0|}
ossl_cipher_generic_initiv:
 1218|  26.1k|{
 1219|  26.1k|    if (ivlen != ctx->ivlen
  ------------------
  |  Branch (1219:9): [True: 0, False: 26.1k]
  ------------------
 1220|  26.1k|        || ivlen > sizeof(ctx->iv)) {
  ------------------
  |  Branch (1220:12): [True: 0, False: 26.1k]
  ------------------
 1221|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1222|      0|        return 0;
 1223|      0|    }
 1224|  26.1k|    ctx->iv_set = 1;
 1225|  26.1k|    memcpy(ctx->iv, iv, ivlen);
 1226|  26.1k|    memcpy(ctx->oiv, iv, ivlen);
 1227|  26.1k|    return 1;
 1228|  26.1k|}
ossl_cipher_generic_initkey:
 1234|  4.95k|{
 1235|  4.95k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
 1236|       |
 1237|  4.95k|    if ((flags & PROV_CIPHER_FLAG_INVERSE_CIPHER) != 0)
  ------------------
  |  |   46|  4.95k|#define PROV_CIPHER_FLAG_INVERSE_CIPHER 0x0200
  ------------------
  |  Branch (1237:9): [True: 0, False: 4.95k]
  ------------------
 1238|      0|        ctx->inverse_cipher = 1;
 1239|  4.95k|    if ((flags & PROV_CIPHER_FLAG_VARIABLE_LENGTH) != 0)
  ------------------
  |  |   45|  4.95k|#define PROV_CIPHER_FLAG_VARIABLE_LENGTH 0x0100
  ------------------
  |  Branch (1239:9): [True: 0, False: 4.95k]
  ------------------
 1240|      0|        ctx->variable_keylength = 1;
 1241|       |
 1242|  4.95k|    ctx->pad = 1;
 1243|  4.95k|    ctx->keylen = ((kbits) / 8);
 1244|  4.95k|    ctx->ivlen = ((ivbits) / 8);
 1245|  4.95k|    ctx->hw = hw;
 1246|  4.95k|    ctx->mode = mode;
 1247|  4.95k|    ctx->blocksize = blkbits / 8;
 1248|  4.95k|    if (provctx != NULL)
  ------------------
  |  Branch (1248:9): [True: 4.95k, False: 0]
  ------------------
 1249|  4.95k|        ctx->libctx = PROV_LIBCTX_OF(provctx); /* used for rand */
  ------------------
  |  |   31|  4.95k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
 1250|  4.95k|}
ciphercommon.c:ossl_cipher_generic_get_params_decoder:
   67|   119k|{
   68|   119k|    const char *s;
   69|       |
   70|   119k|    memset(r, 0, sizeof(*r));
   71|   119k|    if (p != NULL)
  ------------------
  |  Branch (71:9): [True: 119k, False: 0]
  ------------------
   72|   976k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (72:16): [True: 856k, False: 119k]
  ------------------
   73|   856k|            switch(s[0]) {
   74|  37.8k|            default:
  ------------------
  |  Branch (74:13): [True: 37.8k, False: 819k]
  ------------------
   75|  37.8k|                break;
   76|  81.9k|            case 'a':
  ------------------
  |  Branch (76:13): [True: 81.9k, False: 774k]
  ------------------
   77|  81.9k|                if (ossl_likely(strcmp("ead", s + 1) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
   78|       |                    /* OSSL_CIPHER_PARAM_AEAD */
   79|  81.9k|                    if (ossl_unlikely(r->aead != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
   80|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   81|      0|                                       "param %s is repeated", s);
   82|      0|                        return 0;
   83|      0|                    }
   84|  81.9k|                    r->aead = (OSSL_PARAM *)p;
   85|  81.9k|                }
   86|  81.9k|                break;
   87|  81.9k|            case 'b':
  ------------------
  |  Branch (87:13): [True: 81.9k, False: 774k]
  ------------------
   88|  81.9k|                if (ossl_likely(strcmp("locksize", s + 1) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
   89|       |                    /* OSSL_CIPHER_PARAM_BLOCK_SIZE */
   90|  81.9k|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
   91|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   92|      0|                                       "param %s is repeated", s);
   93|      0|                        return 0;
   94|      0|                    }
   95|  81.9k|                    r->bsize = (OSSL_PARAM *)p;
   96|  81.9k|                }
   97|  81.9k|                break;
   98|   163k|            case 'c':
  ------------------
  |  Branch (98:13): [True: 163k, False: 693k]
  ------------------
   99|   163k|                switch(s[1]) {
  100|      0|                default:
  ------------------
  |  Branch (100:17): [True: 0, False: 163k]
  ------------------
  101|      0|                    break;
  102|  81.9k|                case 't':
  ------------------
  |  Branch (102:17): [True: 81.9k, False: 81.9k]
  ------------------
  103|  81.9k|                    if (ossl_likely(strcmp("s", s + 2) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
  104|       |                        /* OSSL_CIPHER_PARAM_CTS */
  105|  81.9k|                        if (ossl_unlikely(r->cts != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
  106|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  107|      0|                                           "param %s is repeated", s);
  108|      0|                            return 0;
  109|      0|                        }
  110|  81.9k|                        r->cts = (OSSL_PARAM *)p;
  111|  81.9k|                    }
  112|  81.9k|                    break;
  113|  81.9k|                case 'u':
  ------------------
  |  Branch (113:17): [True: 81.9k, False: 81.9k]
  ------------------
  114|  81.9k|                    if (ossl_likely(strcmp("stom-iv", s + 2) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
  115|       |                        /* OSSL_CIPHER_PARAM_CUSTOM_IV */
  116|  81.9k|                        if (ossl_unlikely(r->custiv != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
  117|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  118|      0|                                           "param %s is repeated", s);
  119|      0|                            return 0;
  120|      0|                        }
  121|  81.9k|                        r->custiv = (OSSL_PARAM *)p;
  122|  81.9k|                    }
  123|   163k|                }
  124|   163k|                break;
  125|   163k|            case 'e':
  ------------------
  |  Branch (125:13): [True: 81.9k, False: 774k]
  ------------------
  126|  81.9k|                if (ossl_likely(strcmp("ncrypt-then-mac", s + 1) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
  127|       |                    /* OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC */
  128|  81.9k|                    if (ossl_unlikely(r->etm != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
  129|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  130|      0|                                       "param %s is repeated", s);
  131|      0|                        return 0;
  132|      0|                    }
  133|  81.9k|                    r->etm = (OSSL_PARAM *)p;
  134|  81.9k|                }
  135|  81.9k|                break;
  136|  81.9k|            case 'h':
  ------------------
  |  Branch (136:13): [True: 81.9k, False: 774k]
  ------------------
  137|  81.9k|                if (ossl_likely(strcmp("as-randkey", s + 1) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
  138|       |                    /* OSSL_CIPHER_PARAM_HAS_RAND_KEY */
  139|  81.9k|                    if (ossl_unlikely(r->rand != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
  140|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  141|      0|                                       "param %s is repeated", s);
  142|      0|                        return 0;
  143|      0|                    }
  144|  81.9k|                    r->rand = (OSSL_PARAM *)p;
  145|  81.9k|                }
  146|  81.9k|                break;
  147|  81.9k|            case 'i':
  ------------------
  |  Branch (147:13): [True: 81.9k, False: 774k]
  ------------------
  148|  81.9k|                if (ossl_likely(strcmp("vlen", s + 1) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
  149|       |                    /* OSSL_CIPHER_PARAM_IVLEN */
  150|  81.9k|                    if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
  151|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  152|      0|                                       "param %s is repeated", s);
  153|      0|                        return 0;
  154|      0|                    }
  155|  81.9k|                    r->ivlen = (OSSL_PARAM *)p;
  156|  81.9k|                }
  157|  81.9k|                break;
  158|  81.9k|            case 'k':
  ------------------
  |  Branch (158:13): [True: 81.9k, False: 774k]
  ------------------
  159|  81.9k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
  160|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  161|  81.9k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
  162|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  163|      0|                                       "param %s is repeated", s);
  164|      0|                        return 0;
  165|      0|                    }
  166|  81.9k|                    r->keylen = (OSSL_PARAM *)p;
  167|  81.9k|                }
  168|  81.9k|                break;
  169|  81.9k|            case 'm':
  ------------------
  |  Branch (169:13): [True: 81.9k, False: 774k]
  ------------------
  170|  81.9k|                if (ossl_likely(strcmp("ode", s + 1) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
  171|       |                    /* OSSL_CIPHER_PARAM_MODE */
  172|  81.9k|                    if (ossl_unlikely(r->mode != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
  173|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  174|      0|                                       "param %s is repeated", s);
  175|      0|                        return 0;
  176|      0|                    }
  177|  81.9k|                    r->mode = (OSSL_PARAM *)p;
  178|  81.9k|                }
  179|  81.9k|                break;
  180|  81.9k|            case 't':
  ------------------
  |  Branch (180:13): [True: 81.9k, False: 774k]
  ------------------
  181|  81.9k|                if (ossl_likely(strcmp("ls-multi", s + 1) == 0)) {
  ------------------
  |  |   22|  81.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 81.9k, False: 0]
  |  |  ------------------
  ------------------
  182|       |                    /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK */
  183|  81.9k|                    if (ossl_unlikely(r->mb != NULL)) {
  ------------------
  |  |   23|  81.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 81.9k]
  |  |  ------------------
  ------------------
  184|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  185|      0|                                       "param %s is repeated", s);
  186|      0|                        return 0;
  187|      0|                    }
  188|  81.9k|                    r->mb = (OSSL_PARAM *)p;
  189|  81.9k|                }
  190|   856k|            }
  191|   119k|    return 1;
  192|   119k|}
ciphercommon.c:cipher_generic_init_internal:
  696|  99.8k|{
  697|  99.8k|    ctx->num = 0;
  698|  99.8k|    ctx->bufsz = 0;
  699|  99.8k|    ctx->updated = 0;
  700|  99.8k|    ctx->enc = enc ? 1 : 0;
  ------------------
  |  Branch (700:16): [True: 99.8k, False: 0]
  ------------------
  701|       |
  702|  99.8k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (702:9): [True: 0, False: 99.8k]
  ------------------
  703|      0|        return 0;
  704|       |
  705|  99.8k|    if (iv != NULL && ctx->mode != EVP_CIPH_ECB_MODE) {
  ------------------
  |  |  311|  26.1k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  |  Branch (705:9): [True: 26.1k, False: 73.7k]
  |  Branch (705:23): [True: 26.1k, False: 0]
  ------------------
  706|  26.1k|        if (!ossl_cipher_generic_initiv(ctx, iv, ivlen))
  ------------------
  |  Branch (706:13): [True: 0, False: 26.1k]
  ------------------
  707|      0|            return 0;
  708|  26.1k|    }
  709|  99.8k|    if (iv == NULL && ctx->iv_set
  ------------------
  |  Branch (709:9): [True: 73.7k, False: 26.1k]
  |  Branch (709:23): [True: 27.7k, False: 45.9k]
  ------------------
  710|  27.7k|        && (ctx->mode == EVP_CIPH_CBC_MODE
  ------------------
  |  |  312|  55.5k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (710:13): [True: 0, False: 27.7k]
  ------------------
  711|  27.7k|            || ctx->mode == EVP_CIPH_CFB_MODE
  ------------------
  |  |  313|  55.5k|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  |  Branch (711:16): [True: 0, False: 27.7k]
  ------------------
  712|  27.7k|            || ctx->mode == EVP_CIPH_OFB_MODE))
  ------------------
  |  |  314|  27.7k|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  |  Branch (712:16): [True: 0, False: 27.7k]
  ------------------
  713|       |        /* reset IV for these modes to keep compatibility with 1.1.1 */
  714|      0|        memcpy(ctx->iv, ctx->oiv, ctx->ivlen);
  715|       |
  716|  99.8k|    if (key != NULL) {
  ------------------
  |  Branch (716:9): [True: 70.4k, False: 29.4k]
  ------------------
  717|  70.4k|        if (ctx->variable_keylength == 0) {
  ------------------
  |  Branch (717:13): [True: 70.4k, False: 0]
  ------------------
  718|  70.4k|            if (keylen != ctx->keylen) {
  ------------------
  |  Branch (718:17): [True: 0, False: 70.4k]
  ------------------
  719|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  720|      0|                return 0;
  721|      0|            }
  722|  70.4k|        } else {
  723|      0|            ctx->keylen = keylen;
  724|      0|        }
  725|  70.4k|        if (!ctx->hw->init(ctx, key, ctx->keylen))
  ------------------
  |  Branch (725:13): [True: 0, False: 70.4k]
  ------------------
  726|      0|            return 0;
  727|  70.4k|        ctx->key_set = 1;
  728|  70.4k|    }
  729|  99.8k|    return ossl_cipher_generic_set_ctx_params(ctx, params);
  730|  99.8k|}
ciphercommon.c:cipher_generic_get_ctx_params_decoder:
  292|  6.61k|{
  293|  6.61k|    const char *s;
  294|       |
  295|  6.61k|    memset(r, 0, sizeof(*r));
  296|  6.61k|    if (p != NULL)
  ------------------
  |  Branch (296:9): [True: 6.61k, False: 0]
  ------------------
  297|  13.2k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (297:16): [True: 6.61k, False: 6.61k]
  ------------------
  298|  6.61k|            switch(s[0]) {
  299|      0|            default:
  ------------------
  |  Branch (299:13): [True: 0, False: 6.61k]
  ------------------
  300|      0|                break;
  301|  1.65k|            case 'i':
  ------------------
  |  Branch (301:13): [True: 1.65k, False: 4.95k]
  ------------------
  302|  1.65k|                switch(s[1]) {
  303|      0|                default:
  ------------------
  |  Branch (303:17): [True: 0, False: 1.65k]
  ------------------
  304|      0|                    break;
  305|  1.65k|                case 'v':
  ------------------
  |  Branch (305:17): [True: 1.65k, False: 0]
  ------------------
  306|  1.65k|                    switch(s[2]) {
  307|      0|                    default:
  ------------------
  |  Branch (307:21): [True: 0, False: 1.65k]
  ------------------
  308|      0|                        break;
  309|  1.65k|                    case 'l':
  ------------------
  |  Branch (309:21): [True: 1.65k, False: 0]
  ------------------
  310|  1.65k|                        if (ossl_likely(strcmp("en", s + 3) == 0)) {
  ------------------
  |  |   22|  1.65k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
  311|       |                            /* OSSL_CIPHER_PARAM_IVLEN */
  312|  1.65k|                            if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  1.65k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
  313|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  314|      0|                                               "param %s is repeated", s);
  315|      0|                                return 0;
  316|      0|                            }
  317|  1.65k|                            r->ivlen = (OSSL_PARAM *)p;
  318|  1.65k|                        }
  319|  1.65k|                        break;
  320|  1.65k|                    case '\0':
  ------------------
  |  Branch (320:21): [True: 0, False: 1.65k]
  ------------------
  321|      0|                        if (ossl_unlikely(r->iv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  322|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  323|      0|                                           "param %s is repeated", s);
  324|      0|                            return 0;
  325|      0|                        }
  326|      0|                        r->iv = (OSSL_PARAM *)p;
  327|  1.65k|                    }
  328|  1.65k|                }
  329|  1.65k|                break;
  330|  4.95k|            case 'k':
  ------------------
  |  Branch (330:13): [True: 4.95k, False: 1.65k]
  ------------------
  331|  4.95k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  4.95k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.95k, False: 0]
  |  |  ------------------
  ------------------
  332|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  333|  4.95k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  4.95k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.95k]
  |  |  ------------------
  ------------------
  334|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  335|      0|                                       "param %s is repeated", s);
  336|      0|                        return 0;
  337|      0|                    }
  338|  4.95k|                    r->keylen = (OSSL_PARAM *)p;
  339|  4.95k|                }
  340|  4.95k|                break;
  341|  4.95k|            case 'n':
  ------------------
  |  Branch (341:13): [True: 0, False: 6.61k]
  ------------------
  342|      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]
  |  |  ------------------
  ------------------
  343|       |                    /* OSSL_CIPHER_PARAM_NUM */
  344|      0|                    if (ossl_unlikely(r->num != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  345|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  346|      0|                                       "param %s is repeated", s);
  347|      0|                        return 0;
  348|      0|                    }
  349|      0|                    r->num = (OSSL_PARAM *)p;
  350|      0|                }
  351|      0|                break;
  352|      0|            case 'p':
  ------------------
  |  Branch (352:13): [True: 0, False: 6.61k]
  ------------------
  353|      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]
  |  |  ------------------
  ------------------
  354|       |                    /* OSSL_CIPHER_PARAM_PADDING */
  355|      0|                    if (ossl_unlikely(r->pad != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  356|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  357|      0|                                       "param %s is repeated", s);
  358|      0|                        return 0;
  359|      0|                    }
  360|      0|                    r->pad = (OSSL_PARAM *)p;
  361|      0|                }
  362|      0|                break;
  363|      0|            case 't':
  ------------------
  |  Branch (363:13): [True: 0, False: 6.61k]
  ------------------
  364|      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]
  |  |  ------------------
  ------------------
  365|       |                    /* OSSL_CIPHER_PARAM_TLS_MAC */
  366|      0|                    if (ossl_unlikely(r->tlsmac != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  367|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  368|      0|                                       "param %s is repeated", s);
  369|      0|                        return 0;
  370|      0|                    }
  371|      0|                    r->tlsmac = (OSSL_PARAM *)p;
  372|      0|                }
  373|      0|                break;
  374|      0|            case 'u':
  ------------------
  |  Branch (374:13): [True: 0, False: 6.61k]
  ------------------
  375|      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]
  |  |  ------------------
  ------------------
  376|       |                    /* OSSL_CIPHER_PARAM_UPDATED_IV */
  377|      0|                    if (ossl_unlikely(r->updiv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  378|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  379|      0|                                       "param %s is repeated", s);
  380|      0|                        return 0;
  381|      0|                    }
  382|      0|                    r->updiv = (OSSL_PARAM *)p;
  383|      0|                }
  384|  6.61k|            }
  385|  6.61k|    return 1;
  386|  6.61k|}

ossl_ccm_gettable_ctx_params:
  390|  4.41k|{
  391|  4.41k|    return ossl_cipher_ccm_get_ctx_params_list;
  392|  4.41k|}

ossl_gcm_gettable_ctx_params:
  325|  4.41k|{
  326|  4.41k|    return ossl_cipher_gcm_get_ctx_params_list;
  327|  4.41k|}

ossl_cipher_hw_generic_ctr:
  112|  26.1k|{
  113|  26.1k|    unsigned int num = dat->num;
  114|       |
  115|  26.1k|    if (dat->stream.ctr)
  ------------------
  |  Branch (115:9): [True: 26.1k, False: 0]
  ------------------
  116|  26.1k|        CRYPTO_ctr128_encrypt_ctr32(in, out, len, dat->ks, dat->iv, dat->buf,
  117|  26.1k|            &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|  26.1k|    dat->num = num;
  122|       |
  123|  26.1k|    return 1;
  124|  26.1k|}

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

ossl_digest_default_get_params:
  104|  17.0k|{
  105|  17.0k|    struct digest_default_get_params_st p;
  106|       |
  107|  17.0k|    if (!digest_default_get_params_decoder(params, &p))
  ------------------
  |  Branch (107:9): [True: 0, False: 17.0k]
  ------------------
  108|      0|        return 0;
  109|       |
  110|  17.0k|    if (p.bsize != NULL && !OSSL_PARAM_set_size_t(p.bsize, blksz)) {
  ------------------
  |  Branch (110:9): [True: 17.0k, False: 0]
  |  Branch (110:28): [True: 0, False: 17.0k]
  ------------------
  111|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  112|      0|        return 0;
  113|      0|    }
  114|  17.0k|    if (p.size != NULL && !OSSL_PARAM_set_size_t(p.size, paramsz)) {
  ------------------
  |  Branch (114:9): [True: 17.0k, False: 0]
  |  Branch (114:27): [True: 0, False: 17.0k]
  ------------------
  115|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  116|      0|        return 0;
  117|      0|    }
  118|  17.0k|    if (p.xof != NULL
  ------------------
  |  Branch (118:9): [True: 17.0k, False: 0]
  ------------------
  119|  17.0k|        && !OSSL_PARAM_set_int(p.xof, (flags & PROV_DIGEST_FLAG_XOF) != 0)) {
  ------------------
  |  |   19|  17.0k|#define PROV_DIGEST_FLAG_XOF 0x0001
  ------------------
  |  Branch (119:12): [True: 0, False: 17.0k]
  ------------------
  120|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  121|      0|        return 0;
  122|      0|    }
  123|  17.0k|    if (p.aldid != NULL
  ------------------
  |  Branch (123:9): [True: 17.0k, False: 0]
  ------------------
  124|  17.0k|        && !OSSL_PARAM_set_int(p.aldid, (flags & PROV_DIGEST_FLAG_ALGID_ABSENT) != 0)) {
  ------------------
  |  |   20|  17.0k|#define PROV_DIGEST_FLAG_ALGID_ABSENT 0x0002
  ------------------
  |  Branch (124:12): [True: 0, False: 17.0k]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return 0;
  127|      0|    }
  128|  17.0k|    return 1;
  129|  17.0k|}
digestcommon.c:digest_default_get_params_decoder:
   43|  17.0k|{
   44|  17.0k|    const char *s;
   45|       |
   46|  17.0k|    memset(r, 0, sizeof(*r));
   47|  17.0k|    if (p != NULL)
  ------------------
  |  Branch (47:9): [True: 17.0k, False: 0]
  ------------------
   48|  85.0k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (48:16): [True: 68.0k, False: 17.0k]
  ------------------
   49|  68.0k|            switch(s[0]) {
   50|      0|            default:
  ------------------
  |  Branch (50:13): [True: 0, False: 68.0k]
  ------------------
   51|      0|                break;
   52|  17.0k|            case 'a':
  ------------------
  |  Branch (52:13): [True: 17.0k, False: 51.0k]
  ------------------
   53|  17.0k|                if (ossl_likely(strcmp("lgid-absent", s + 1) == 0)) {
  ------------------
  |  |   22|  17.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 17.0k, False: 0]
  |  |  ------------------
  ------------------
   54|       |                    /* OSSL_DIGEST_PARAM_ALGID_ABSENT */
   55|  17.0k|                    if (ossl_unlikely(r->aldid != NULL)) {
  ------------------
  |  |   23|  17.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 17.0k]
  |  |  ------------------
  ------------------
   56|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   57|      0|                                       "param %s is repeated", s);
   58|      0|                        return 0;
   59|      0|                    }
   60|  17.0k|                    r->aldid = (OSSL_PARAM *)p;
   61|  17.0k|                }
   62|  17.0k|                break;
   63|  17.0k|            case 'b':
  ------------------
  |  Branch (63:13): [True: 17.0k, False: 51.0k]
  ------------------
   64|  17.0k|                if (ossl_likely(strcmp("locksize", s + 1) == 0)) {
  ------------------
  |  |   22|  17.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 17.0k, False: 0]
  |  |  ------------------
  ------------------
   65|       |                    /* OSSL_DIGEST_PARAM_BLOCK_SIZE */
   66|  17.0k|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|  17.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 17.0k]
  |  |  ------------------
  ------------------
   67|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   68|      0|                                       "param %s is repeated", s);
   69|      0|                        return 0;
   70|      0|                    }
   71|  17.0k|                    r->bsize = (OSSL_PARAM *)p;
   72|  17.0k|                }
   73|  17.0k|                break;
   74|  17.0k|            case 's':
  ------------------
  |  Branch (74:13): [True: 17.0k, False: 51.0k]
  ------------------
   75|  17.0k|                if (ossl_likely(strcmp("ize", s + 1) == 0)) {
  ------------------
  |  |   22|  17.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 17.0k, False: 0]
  |  |  ------------------
  ------------------
   76|       |                    /* OSSL_DIGEST_PARAM_SIZE */
   77|  17.0k|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|  17.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 17.0k]
  |  |  ------------------
  ------------------
   78|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   79|      0|                                       "param %s is repeated", s);
   80|      0|                        return 0;
   81|      0|                    }
   82|  17.0k|                    r->size = (OSSL_PARAM *)p;
   83|  17.0k|                }
   84|  17.0k|                break;
   85|  17.0k|            case 'x':
  ------------------
  |  Branch (85:13): [True: 17.0k, False: 51.0k]
  ------------------
   86|  17.0k|                if (ossl_likely(strcmp("of", s + 1) == 0)) {
  ------------------
  |  |   22|  17.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 17.0k, False: 0]
  |  |  ------------------
  ------------------
   87|       |                    /* OSSL_DIGEST_PARAM_XOF */
   88|  17.0k|                    if (ossl_unlikely(r->xof != NULL)) {
  ------------------
  |  |   23|  17.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 17.0k]
  |  |  ------------------
  ------------------
   89|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   90|      0|                                       "param %s is repeated", s);
   91|      0|                        return 0;
   92|      0|                    }
   93|  17.0k|                    r->xof = (OSSL_PARAM *)p;
   94|  17.0k|                }
   95|  68.0k|            }
   96|  17.0k|    return 1;
   97|  17.0k|}

sha2_prov.c:sha1_set_ctx_params:
   43|   378k|{
   44|   378k|    const OSSL_PARAM *p;
   45|   378k|    SHA_CTX *ctx = (SHA_CTX *)vctx;
   46|       |
   47|   378k|    if (ctx == NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 378k]
  ------------------
   48|      0|        return 0;
   49|   378k|    if (ossl_param_is_empty(params))
  ------------------
  |  Branch (49:9): [True: 378k, False: 0]
  ------------------
   50|   378k|        return 1;
   51|       |
   52|      0|    p = OSSL_PARAM_locate_const(params, OSSL_DIGEST_PARAM_SSL3_MS);
  ------------------
  |  |  230|      0|# define OSSL_DIGEST_PARAM_SSL3_MS "ssl3-ms"
  ------------------
   53|      0|    if (p != NULL && p->data_type == OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (53:9): [True: 0, False: 0]
  |  Branch (53:22): [True: 0, False: 0]
  ------------------
   54|      0|        return ossl_sha1_ctrl(ctx, EVP_CTRL_SSL3_MASTER_SECRET,
  ------------------
  |  |  419|      0|#define EVP_CTRL_SSL3_MASTER_SECRET 0x1d
  ------------------
   55|      0|            (int)p->data_size, p->data);
   56|      0|    return 1;
   57|      0|}

sha3_prov.c:generic_sha3_absorb:
  155|  31.0k|{
  156|  31.0k|    KECCAK1600_CTX *ctx = vctx;
  157|       |
  158|  31.0k|    if (!(ctx->xof_state == XOF_STATE_INIT || ctx->xof_state == XOF_STATE_ABSORB))
  ------------------
  |  |   35|  62.1k|#define XOF_STATE_INIT 0
  ------------------
                  if (!(ctx->xof_state == XOF_STATE_INIT || ctx->xof_state == XOF_STATE_ABSORB))
  ------------------
  |  |   36|  5.91k|#define XOF_STATE_ABSORB 1
  ------------------
  |  Branch (158:11): [True: 25.1k, False: 5.91k]
  |  Branch (158:47): [True: 5.91k, False: 0]
  ------------------
  159|      0|        return 0;
  160|  31.0k|    ctx->xof_state = XOF_STATE_ABSORB;
  ------------------
  |  |   36|  31.0k|#define XOF_STATE_ABSORB 1
  ------------------
  161|  31.0k|    return SHA3_absorb(ctx->A, inp, len, ctx->block_size);
  162|  31.0k|}
sha3_prov.c:generic_sha3_final:
  165|  11.8k|{
  166|  11.8k|    return ossl_sha3_final((KECCAK1600_CTX *)vctx, out, outlen);
  167|  11.8k|}
sha3_prov.c:keccak_update:
   79|  29.6k|{
   80|  29.6k|    KECCAK1600_CTX *ctx = vctx;
   81|  29.6k|    const size_t bsz = ctx->block_size;
   82|  29.6k|    size_t num, rem;
   83|       |
   84|  29.6k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|  29.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 29.6k]
  |  |  ------------------
  ------------------
   85|      0|        return 1;
   86|       |
   87|       |    /* Is there anything in the buffer already ? */
   88|  29.6k|    if (ossl_likely((num = ctx->bufsz) != 0)) {
  ------------------
  |  |   22|  29.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.43k, False: 25.1k]
  |  |  ------------------
  ------------------
   89|       |        /* Calculate how much space is left in the buffer */
   90|  4.43k|        rem = bsz - num;
   91|       |        /* If the new input does not fill the buffer then just add it */
   92|  4.43k|        if (len < rem) {
  ------------------
  |  Branch (92:13): [True: 1.47k, False: 2.95k]
  ------------------
   93|  1.47k|            memcpy(ctx->buf + num, inp, len);
   94|  1.47k|            ctx->bufsz += len;
   95|  1.47k|            return 1;
   96|  1.47k|        }
   97|       |        /* otherwise fill up the buffer and absorb the buffer */
   98|  2.95k|        memcpy(ctx->buf + num, inp, rem);
   99|       |        /* Update the input pointer */
  100|  2.95k|        inp += rem;
  101|  2.95k|        len -= rem;
  102|  2.95k|        ctx->meth.absorb(ctx, ctx->buf, bsz);
  103|  2.95k|        ctx->bufsz = 0;
  104|  2.95k|    }
  105|       |    /* Absorb the input - rem = leftover part of the input < blocksize) */
  106|  28.1k|    rem = ctx->meth.absorb(ctx, inp, len);
  107|       |    /* Copy the leftover bit of the input into the buffer */
  108|  28.1k|    if (ossl_likely(rem)) {
  ------------------
  |  |   22|  28.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 28.1k, False: 0]
  |  |  ------------------
  ------------------
  109|  28.1k|        memcpy(ctx->buf, inp + len - rem, rem);
  110|  28.1k|        ctx->bufsz = rem;
  111|  28.1k|    }
  112|  28.1k|    return 1;
  113|  29.6k|}
sha3_prov.c:keccak_final:
  117|  11.8k|{
  118|  11.8k|    int ret = 1;
  119|  11.8k|    KECCAK1600_CTX *ctx = vctx;
  120|       |
  121|  11.8k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|  11.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.8k]
  |  |  ------------------
  ------------------
  122|      0|        return 0;
  123|  11.8k|    if (ossl_unlikely(ctx->md_size == SIZE_MAX)) {
  ------------------
  |  |   23|  11.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.8k]
  |  |  ------------------
  ------------------
  124|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_DIGEST_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  125|      0|        return 0;
  126|      0|    }
  127|  11.8k|    if (ossl_likely(outlen > 0))
  ------------------
  |  |   22|  11.8k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 11.8k, False: 0]
  |  |  ------------------
  ------------------
  128|  11.8k|        ret = ctx->meth.final(ctx, out, ctx->md_size);
  129|       |
  130|  11.8k|    *outl = ctx->md_size;
  131|  11.8k|    return ret;
  132|  11.8k|}
sha3_prov.c:keccak_freectx:
  556|  5.90k|{
  557|  5.90k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  558|       |
  559|  5.90k|    OPENSSL_clear_free(ctx, sizeof(*ctx));
  ------------------
  |  |  129|  5.90k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  560|  5.90k|}
sha3_prov.c:keccak_init:
   64|  25.1k|{
   65|  25.1k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|  25.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 25.1k]
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|       |    /* The newctx() handles most of the ctx fixed setup. */
   68|  25.1k|    ossl_sha3_reset((KECCAK1600_CTX *)vctx);
   69|  25.1k|    return 1;
   70|  25.1k|}
sha3_prov.c:generic_sha3_squeeze:
  170|  40.1k|{
  171|  40.1k|    return ossl_sha3_squeeze((KECCAK1600_CTX *)vctx, out, outlen);
  172|  40.1k|}
sha3_prov.c:shake_squeeze:
  136|  40.1k|{
  137|  40.1k|    int ret = 1;
  138|  40.1k|    KECCAK1600_CTX *ctx = vctx;
  139|       |
  140|  40.1k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (140:9): [True: 0, False: 40.1k]
  ------------------
  141|      0|        return 0;
  142|  40.1k|    if (ctx->meth.squeeze == NULL)
  ------------------
  |  Branch (142:9): [True: 0, False: 40.1k]
  ------------------
  143|      0|        return 0;
  144|  40.1k|    if (outlen > 0)
  ------------------
  |  Branch (144:9): [True: 40.1k, False: 0]
  ------------------
  145|  40.1k|        ret = ctx->meth.squeeze(ctx, out, outlen);
  146|       |
  147|  40.1k|    *outl = outlen;
  148|  40.1k|    return ret;
  149|  40.1k|}
sha3_prov.c:keccak_init_params:
   73|  22.2k|{
   74|  22.2k|    return keccak_init(vctx, NULL)
  ------------------
  |  Branch (74:12): [True: 22.2k, False: 0]
  ------------------
   75|  22.2k|        && shake_set_ctx_params(vctx, params);
  ------------------
  |  Branch (75:12): [True: 22.2k, False: 0]
  ------------------
   76|  22.2k|}
sha3_prov.c:shake_set_ctx_params:
  727|  31.0k|{
  728|  31.0k|    struct shake_set_ctx_params_st p;
  729|  31.0k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  730|       |
  731|  31.0k|    if (ossl_unlikely(ctx == NULL || !shake_set_ctx_params_decoder(params, &p)))
  ------------------
  |  |   23|  62.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 31.0k]
  |  |  |  Branch (23:46): [True: 0, False: 31.0k]
  |  |  |  Branch (23:46): [True: 0, False: 31.0k]
  |  |  ------------------
  ------------------
  732|      0|        return 0;
  733|       |
  734|  31.0k|    if (ossl_unlikely(p.xoflen != NULL
  ------------------
  |  |   23|  39.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 31.0k]
  |  |  |  Branch (23:46): [True: 8.86k, False: 22.2k]
  |  |  |  Branch (23:46): [True: 0, False: 8.86k]
  |  |  ------------------
  ------------------
  735|  31.0k|            && !OSSL_PARAM_get_size_t(p.xoflen, &ctx->md_size))) {
  736|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  737|      0|        return 0;
  738|      0|    }
  739|  31.0k|    return 1;
  740|  31.0k|}
sha3_prov.c:shake_set_ctx_params_decoder:
  683|  31.0k|{
  684|  31.0k|    const char *s;
  685|       |
  686|  31.0k|    memset(r, 0, sizeof(*r));
  687|  31.0k|    if (p != NULL)
  ------------------
  |  Branch (687:9): [True: 8.86k, False: 22.2k]
  ------------------
  688|  17.7k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (688:16): [True: 8.86k, False: 8.86k]
  ------------------
  689|  8.86k|            switch(s[0]) {
  690|      0|            default:
  ------------------
  |  Branch (690:13): [True: 0, False: 8.86k]
  ------------------
  691|      0|                break;
  692|      0|            case 's':
  ------------------
  |  Branch (692:13): [True: 0, False: 8.86k]
  ------------------
  693|      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]
  |  |  ------------------
  ------------------
  694|       |                    /* OSSL_DIGEST_PARAM_SIZE */
  695|      0|                    if (ossl_unlikely(r->xoflen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  696|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  697|      0|                                       "param %s is repeated", s);
  698|      0|                        return 0;
  699|      0|                    }
  700|      0|                    r->xoflen = (OSSL_PARAM *)p;
  701|      0|                }
  702|      0|                break;
  703|  8.86k|            case 'x':
  ------------------
  |  Branch (703:13): [True: 8.86k, False: 0]
  ------------------
  704|  8.86k|                if (ossl_likely(strcmp("oflen", s + 1) == 0)) {
  ------------------
  |  |   22|  8.86k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 8.86k, False: 0]
  |  |  ------------------
  ------------------
  705|       |                    /* OSSL_DIGEST_PARAM_XOFLEN */
  706|  8.86k|                    if (ossl_unlikely(r->xoflen != NULL)) {
  ------------------
  |  |   23|  8.86k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.86k]
  |  |  ------------------
  ------------------
  707|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  708|      0|                                       "param %s is repeated", s);
  709|      0|                        return 0;
  710|      0|                    }
  711|  8.86k|                    r->xoflen = (OSSL_PARAM *)p;
  712|  8.86k|                }
  713|  8.86k|            }
  714|  31.0k|    return 1;
  715|  31.0k|}

decode_der2key.c:der2key_newctx:
  165|  1.18M|{
  166|  1.18M|    struct der2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|  1.18M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|       |
  168|  1.18M|    if (ctx != NULL) {
  ------------------
  |  Branch (168:9): [True: 1.18M, False: 0]
  ------------------
  169|  1.18M|        ctx->provctx = provctx;
  170|  1.18M|        ctx->desc = desc;
  171|  1.18M|    }
  172|  1.18M|    return ctx;
  173|  1.18M|}
decode_der2key.c:der2key_freectx:
  237|  1.18M|{
  238|  1.18M|    struct der2key_ctx_st *ctx = vctx;
  239|       |
  240|  1.18M|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  1.18M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  241|  1.18M|}
decode_der2key.c:PrivateKeyInfo_der2dh_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:der2key_check_selection:
  245|    138|{
  246|       |    /*
  247|       |     * The selections are kinda sorta "levels", i.e. each selection given
  248|       |     * here is assumed to include those following.
  249|       |     */
  250|    138|    int checks[] = {
  251|    138|        OSSL_KEYMGMT_SELECT_PRIVATE_KEY,
  ------------------
  |  |  640|    138|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  252|    138|        OSSL_KEYMGMT_SELECT_PUBLIC_KEY,
  ------------------
  |  |  641|    138|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  253|    138|        OSSL_KEYMGMT_SELECT_ALL_PARAMETERS
  ------------------
  |  |  647|    138|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  642|    138|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  648|    138|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  643|    138|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
  254|    138|    };
  255|    138|    size_t i;
  256|       |
  257|       |    /* The decoder implementations made here support guessing */
  258|    138|    if (selection == 0)
  ------------------
  |  Branch (258:9): [True: 0, False: 138]
  ------------------
  259|      0|        return 1;
  260|       |
  261|    276|    for (i = 0; i < OSSL_NELEM(checks); i++) {
  ------------------
  |  |   14|    276|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (261:17): [True: 276, False: 0]
  ------------------
  262|    276|        int check1 = (selection & checks[i]) != 0;
  263|    276|        int check2 = (desc->selection_mask & checks[i]) != 0;
  264|       |
  265|       |        /*
  266|       |         * If the caller asked for the currently checked bit(s), return
  267|       |         * whether the decoder description says it's supported.
  268|       |         */
  269|    276|        if (check1)
  ------------------
  |  Branch (269:13): [True: 138, False: 138]
  ------------------
  270|    138|            return check2;
  271|    276|    }
  272|       |
  273|       |    /* This should be dead code, but just to be safe... */
  274|      0|    return 0;
  275|    138|}
decode_der2key.c:der2key_decode:
  280|   435k|{
  281|   435k|    struct der2key_ctx_st *ctx = vctx;
  282|   435k|    unsigned char *der = NULL;
  283|   435k|    const unsigned char *derp;
  284|   435k|    long der_len = 0;
  285|   435k|    void *key = NULL;
  286|   435k|    int ok = 0;
  287|       |
  288|   435k|    ctx->selection = selection;
  289|       |    /*
  290|       |     * The caller is allowed to specify 0 as a selection mask, to have the
  291|       |     * structure and key type guessed.  For type-specific structures, this
  292|       |     * is not recommended, as some structures are very similar.
  293|       |     * Note that 0 isn't the same as OSSL_KEYMGMT_SELECT_ALL, as the latter
  294|       |     * signifies a private key structure, where everything else is assumed
  295|       |     * to be present as well.
  296|       |     */
  297|   435k|    if (selection == 0)
  ------------------
  |  Branch (297:9): [True: 0, False: 435k]
  ------------------
  298|      0|        selection = ctx->desc->selection_mask;
  299|   435k|    if ((selection & ctx->desc->selection_mask) == 0) {
  ------------------
  |  Branch (299:9): [True: 0, False: 435k]
  ------------------
  300|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  301|      0|        return 0;
  302|      0|    }
  303|       |
  304|   435k|    ok = ossl_read_der(ctx->provctx, cin, &der, &der_len);
  305|   435k|    if (!ok)
  ------------------
  |  Branch (305:9): [True: 0, False: 435k]
  ------------------
  306|      0|        goto next;
  307|       |
  308|   435k|    ok = 0; /* Assume that we fail */
  309|       |
  310|   435k|    ERR_set_mark();
  311|   435k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  640|   435k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (311:9): [True: 0, False: 435k]
  ------------------
  312|      0|        derp = der;
  313|      0|        if (ctx->desc->d2i_PKCS8 != NULL) {
  ------------------
  |  Branch (313:13): [True: 0, False: 0]
  ------------------
  314|      0|            key = ctx->desc->d2i_PKCS8(&derp, der_len, ctx);
  315|      0|            if (ctx->flag_fatal) {
  ------------------
  |  Branch (315:17): [True: 0, False: 0]
  ------------------
  316|      0|                ERR_clear_last_mark();
  317|      0|                goto end;
  318|      0|            }
  319|      0|        } else if (ctx->desc->d2i_private_key != NULL) {
  ------------------
  |  Branch (319:20): [True: 0, False: 0]
  ------------------
  320|      0|            key = ctx->desc->d2i_private_key(NULL, &derp, der_len);
  321|      0|        }
  322|      0|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (322:13): [True: 0, False: 0]
  |  Branch (322:28): [True: 0, False: 0]
  ------------------
  323|      0|            ERR_clear_last_mark();
  324|      0|            goto next;
  325|      0|        }
  326|      0|    }
  327|   435k|    if (key == NULL && (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  641|   435k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (327:9): [True: 435k, False: 0]
  |  Branch (327:24): [True: 435k, False: 0]
  ------------------
  328|   435k|        derp = der;
  329|   435k|        if (ctx->desc->d2i_PUBKEY != NULL)
  ------------------
  |  Branch (329:13): [True: 435k, False: 0]
  ------------------
  330|   435k|            key = ctx->desc->d2i_PUBKEY(&derp, der_len, ctx);
  331|      0|        else if (ctx->desc->d2i_public_key != NULL)
  ------------------
  |  Branch (331:18): [True: 0, False: 0]
  ------------------
  332|      0|            key = ctx->desc->d2i_public_key(NULL, &derp, der_len);
  333|   435k|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (333:13): [True: 0, False: 435k]
  |  Branch (333:28): [True: 0, False: 0]
  ------------------
  334|      0|            ERR_clear_last_mark();
  335|      0|            goto next;
  336|      0|        }
  337|   435k|    }
  338|   435k|    if (key == NULL && (selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) {
  ------------------
  |  |  647|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  642|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  648|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  643|      0|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
  |  Branch (338:9): [True: 0, False: 435k]
  |  Branch (338:24): [True: 0, False: 0]
  ------------------
  339|      0|        derp = der;
  340|      0|        if (ctx->desc->d2i_key_params != NULL)
  ------------------
  |  Branch (340:13): [True: 0, False: 0]
  ------------------
  341|      0|            key = ctx->desc->d2i_key_params(NULL, &derp, der_len);
  342|      0|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (342:13): [True: 0, False: 0]
  |  Branch (342:28): [True: 0, False: 0]
  ------------------
  343|      0|            ERR_clear_last_mark();
  344|      0|            goto next;
  345|      0|        }
  346|      0|    }
  347|   435k|    if (key == NULL)
  ------------------
  |  Branch (347:9): [True: 0, False: 435k]
  ------------------
  348|      0|        ERR_clear_last_mark();
  349|   435k|    else
  350|   435k|        ERR_pop_to_mark();
  351|       |
  352|       |    /*
  353|       |     * Last minute check to see if this was the correct type of key.  This
  354|       |     * should never lead to a fatal error, i.e. the decoding itself was
  355|       |     * correct, it was just an unexpected key type.  This is generally for
  356|       |     * classes of key types that have subtle variants, like RSA-PSS keys as
  357|       |     * opposed to plain RSA keys.
  358|       |     */
  359|   435k|    if (key != NULL
  ------------------
  |  Branch (359:9): [True: 435k, False: 0]
  ------------------
  360|   435k|        && ctx->desc->check_key != NULL
  ------------------
  |  Branch (360:12): [True: 435k, False: 0]
  ------------------
  361|   435k|        && !ctx->desc->check_key(key, ctx)) {
  ------------------
  |  Branch (361:12): [True: 0, False: 435k]
  ------------------
  362|      0|        ctx->desc->free_key(key);
  363|      0|        key = NULL;
  364|      0|    }
  365|       |
  366|   435k|    if (key != NULL && ctx->desc->adjust_key != NULL)
  ------------------
  |  Branch (366:9): [True: 435k, False: 0]
  |  Branch (366:24): [True: 435k, False: 0]
  ------------------
  367|   435k|        ctx->desc->adjust_key(key, ctx);
  368|       |
  369|   435k|next:
  370|       |    /*
  371|       |     * Indicated that we successfully decoded something, or not at all.
  372|       |     * Ending up "empty handed" is not an error.
  373|       |     */
  374|   435k|    ok = 1;
  375|       |
  376|       |    /*
  377|       |     * We free memory here so it's not held up during the callback, because
  378|       |     * we know the process is recursive and the allocated chunks of memory
  379|       |     * add up.
  380|       |     */
  381|   435k|    OPENSSL_free(der);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  382|   435k|    der = NULL;
  383|       |
  384|   435k|    if (key != NULL) {
  ------------------
  |  Branch (384:9): [True: 435k, False: 0]
  ------------------
  385|   435k|        OSSL_PARAM params[4];
  386|   435k|        int object_type = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|   435k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  387|       |
  388|   435k|        params[0] = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &object_type);
  ------------------
  |  |  362|   435k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  389|       |
  390|   435k|#ifndef OPENSSL_NO_SM2
  391|   435k|        if (strcmp(ctx->desc->keytype_name, "EC") == 0
  ------------------
  |  Branch (391:13): [True: 119k, False: 316k]
  ------------------
  392|   119k|            && (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0)
  ------------------
  |  |  954|   119k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  |  Branch (392:16): [True: 0, False: 119k]
  ------------------
  393|      0|            params[1] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  358|      0|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  394|      0|                "SM2", 0);
  395|   435k|        else
  396|   435k|#endif
  397|   435k|            params[1] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  358|   435k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  398|   435k|                (char *)ctx->desc->keytype_name,
  399|   435k|                0);
  400|       |        /* The address of the key becomes the octet string */
  401|   435k|        params[2] = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_REFERENCE,
  ------------------
  |  |  361|   435k|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  402|   435k|            &key, sizeof(key));
  403|   435k|        params[3] = OSSL_PARAM_construct_end();
  404|       |
  405|   435k|        ok = data_cb(params, data_cbarg);
  406|   435k|    }
  407|       |
  408|   435k|end:
  409|   435k|    ctx->desc->free_key(key);
  410|   435k|    OPENSSL_free(der);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  411|       |
  412|   435k|    return ok;
  413|   435k|}
decode_der2key.c:SubjectPublicKeyInfo_der2dh_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_params_der2dh_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:DH_der2dh_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dhx_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2dhx_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_params_der2dhx_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:DHX_der2dhx_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2dsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_der2dsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:DSA_der2dsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:ec_check:
  523|   119k|{
  524|       |    /* We're trying to be clever by comparing two truths */
  525|   119k|    int ret = 0;
  526|   119k|    int sm2 = (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0;
  ------------------
  |  |  954|   119k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  527|       |
  528|   119k|    if (sm2)
  ------------------
  |  Branch (528:9): [True: 0, False: 119k]
  ------------------
  529|      0|        ret = ctx->desc->evp_type == EVP_PKEY_SM2
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (529:15): [True: 0, False: 0]
  ------------------
  530|      0|            || ctx->desc->evp_type == NID_X9_62_id_ecPublicKey;
  ------------------
  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (530:16): [True: 0, False: 0]
  ------------------
  531|   119k|    else
  532|   119k|        ret = ctx->desc->evp_type != EVP_PKEY_SM2;
  ------------------
  |  |   74|   119k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|   119k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  533|       |
  534|   119k|    return ret;
  535|   119k|}
decode_der2key.c:ec_adjust:
  538|   119k|{
  539|   119k|    ossl_ec_key_set0_libctx(key, PROV_LIBCTX_OF(ctx->provctx));
  ------------------
  |  |   31|   119k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  540|   119k|}
decode_der2key.c:PrivateKeyInfo_der2ec_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ec_newctx:
 1231|   119k|    {                                                                                                                 \
 1232|   119k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|   119k|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ec_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2ec_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:EC_der2ec_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x25519_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2x25519_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x448_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2x448_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed25519_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ed25519_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed448_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ed448_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2sm2_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2sm2_newctx:
 1231|   119k|    {                                                                                                                 \
 1232|   119k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|   119k|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2sm2_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2sm2_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_512_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_512_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_768_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_768_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_1024_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_1024_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_128s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_128f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_192s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_192f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_256s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_256f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_128s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_128f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_192s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_192f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_256s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_256f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:rsa_check:
  949|   316k|{
  950|   316k|    int valid;
  951|       |
  952|   316k|    switch (RSA_test_flags(key, RSA_FLAG_TYPE_MASK)) {
  ------------------
  |  |  117|   316k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  953|   316k|    case RSA_FLAG_TYPE_RSA:
  ------------------
  |  |  118|   316k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
  |  Branch (953:5): [True: 316k, False: 0]
  ------------------
  954|   316k|        valid = (ctx->desc->evp_type == EVP_PKEY_RSA);
  ------------------
  |  |   63|   316k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   316k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  955|   316k|        break;
  956|      0|    case RSA_FLAG_TYPE_RSASSAPSS:
  ------------------
  |  |  119|      0|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (956:5): [True: 0, False: 316k]
  ------------------
  957|      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
  |  |  ------------------
  ------------------
  958|      0|        break;
  959|      0|    default:
  ------------------
  |  Branch (959:5): [True: 0, False: 316k]
  ------------------
  960|       |        /* Currently unsupported RSA key type */
  961|      0|        valid = 0;
  962|   316k|    }
  963|       |
  964|   316k|    valid = (valid && ossl_rsa_check_factors(key));
  ------------------
  |  Branch (964:14): [True: 316k, False: 0]
  |  Branch (964:23): [True: 316k, False: 0]
  ------------------
  965|       |
  966|   316k|    return valid;
  967|   316k|}
decode_der2key.c:rsa_adjust:
  970|   316k|{
  971|   316k|    ossl_rsa_set0_libctx(key, PROV_LIBCTX_OF(ctx->provctx));
  ------------------
  |  |   31|   316k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  972|   316k|}
decode_der2key.c:PrivateKeyInfo_der2rsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2rsa_newctx:
 1231|   316k|    {                                                                                                                 \
 1232|   316k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|   316k|    }                                                                                                                 \
decode_der2key.c:rsa_d2i_PUBKEY:
  944|   316k|{
  945|       |    return d2i_RSA_PUBKEY(NULL, der, der_len);
  946|   316k|}
decode_der2key.c:SubjectPublicKeyInfo_der2rsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_keypair_der2rsa_newctx:
 1231|   316k|    {                                                                                                                 \
 1232|   316k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|   316k|    }                                                                                                                 \
decode_der2key.c:type_specific_keypair_der2rsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:RSA_der2rsa_newctx:
 1231|   316k|    {                                                                                                                 \
 1232|   316k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|   316k|    }                                                                                                                 \
decode_der2key.c:RSA_der2rsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2rsapss_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2rsapss_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_44_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_44_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_65_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_65_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_87_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_87_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \

decode_epki2pki.c:epki2pki_newctx:
   46|   435k|{
   47|   435k|    struct epki2pki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|       |
   49|   435k|    if (ctx != NULL)
  ------------------
  |  Branch (49:9): [True: 435k, False: 0]
  ------------------
   50|   435k|        ctx->provctx = provctx;
   51|   435k|    return ctx;
   52|   435k|}
decode_epki2pki.c:epki2pki_freectx:
   55|   435k|{
   56|   435k|    struct epki2pki_ctx_st *ctx = vctx;
   57|       |
   58|   435k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|   435k|}
decode_epki2pki.c:epki2pki_set_ctx_params:
  106|      2|{
  107|      2|    struct epki2pki_ctx_st *ctx = vctx;
  108|      2|    struct epki2pki_set_ctx_params_st p;
  109|      2|    char *str;
  110|       |
  111|      2|    if (ctx == NULL || !epki2pki_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (111:9): [True: 0, False: 2]
  |  Branch (111:24): [True: 0, False: 2]
  ------------------
  112|      0|        return 0;
  113|       |
  114|      2|    str = ctx->propq;
  115|      2|    if (p.propq != NULL
  ------------------
  |  Branch (115:9): [True: 0, False: 2]
  ------------------
  116|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (116:12): [True: 0, False: 0]
  ------------------
  117|      0|        return 0;
  118|       |
  119|      2|    return 1;
  120|      2|}
decode_epki2pki.c:epki2pki_set_ctx_params_decoder:
   79|      2|{
   80|      2|    const char *s;
   81|       |
   82|      2|    memset(r, 0, sizeof(*r));
   83|      2|    if (p != NULL)
  ------------------
  |  Branch (83:9): [True: 2, False: 0]
  ------------------
   84|      4|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (84:16): [True: 2, False: 2]
  ------------------
   85|      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]
  |  |  ------------------
  ------------------
   86|       |                /* OSSL_DECODER_PARAM_PROPERTIES */
   87|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   88|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   89|      0|                                   "param %s is repeated", s);
   90|      0|                    return 0;
   91|      0|                }
   92|      0|                r->propq = (OSSL_PARAM *)p;
   93|      0|            }
   94|      2|    return 1;
   95|      2|}

decode_msblob2key.c:msblob2key_newctx:
   65|      1|{
   66|      1|    struct msblob2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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)
  ------------------
  |  |  640|      4|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
                  if ((selection & (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)) != 0)
  ------------------
  |  |  641|      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:
   66|   435k|{
   67|   435k|    struct pem2der_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   68|       |
   69|   435k|    if (ctx != NULL)
  ------------------
  |  Branch (69:9): [True: 435k, False: 0]
  ------------------
   70|   435k|        ctx->provctx = provctx;
   71|   435k|    return ctx;
   72|   435k|}
decode_pem2der.c:pem2der_freectx:
   75|   435k|{
   76|   435k|    struct pem2der_ctx_st *ctx = vctx;
   77|       |
   78|   435k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|   435k|}
decode_pem2der.c:pem2der_set_ctx_params:
  144|      7|{
  145|      7|    struct pem2der_ctx_st *ctx = vctx;
  146|      7|    struct pem2der_set_ctx_params_st p;
  147|      7|    char *str;
  148|       |
  149|      7|    if (ctx == NULL || !pem2der_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (149:9): [True: 0, False: 7]
  |  Branch (149:24): [True: 0, False: 7]
  ------------------
  150|      0|        return 0;
  151|       |
  152|      7|    str = ctx->propq;
  153|      7|    if (p.propq != NULL
  ------------------
  |  Branch (153:9): [True: 0, False: 7]
  ------------------
  154|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (154:12): [True: 0, False: 0]
  ------------------
  155|      0|        return 0;
  156|       |
  157|      7|    str = ctx->data_structure;
  158|      7|    if (p.ds != NULL
  ------------------
  |  Branch (158:9): [True: 7, False: 0]
  ------------------
  159|      7|        && !OSSL_PARAM_get_utf8_string(p.ds, &str, sizeof(ctx->data_structure)))
  ------------------
  |  Branch (159:12): [True: 0, False: 7]
  ------------------
  160|      0|        return 0;
  161|       |
  162|      7|    return 1;
  163|      7|}
decode_pem2der.c:pem2der_set_ctx_params_decoder:
  101|      7|{
  102|      7|    const char *s;
  103|       |
  104|      7|    memset(r, 0, sizeof(*r));
  105|      7|    if (p != NULL)
  ------------------
  |  Branch (105:9): [True: 7, False: 0]
  ------------------
  106|     14|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (106:16): [True: 7, False: 7]
  ------------------
  107|      7|            switch(s[0]) {
  108|      0|            default:
  ------------------
  |  Branch (108:13): [True: 0, False: 7]
  ------------------
  109|      0|                break;
  110|      7|            case 'd':
  ------------------
  |  Branch (110:13): [True: 7, False: 0]
  ------------------
  111|      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]
  |  |  ------------------
  ------------------
  112|       |                    /* OSSL_OBJECT_PARAM_DATA_STRUCTURE */
  113|      7|                    if (ossl_unlikely(r->ds != NULL)) {
  ------------------
  |  |   23|      7|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7]
  |  |  ------------------
  ------------------
  114|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  115|      0|                                       "param %s is repeated", s);
  116|      0|                        return 0;
  117|      0|                    }
  118|      7|                    r->ds = (OSSL_PARAM *)p;
  119|      7|                }
  120|      7|                break;
  121|      7|            case 'p':
  ------------------
  |  Branch (121:13): [True: 0, False: 7]
  ------------------
  122|      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]
  |  |  ------------------
  ------------------
  123|       |                    /* OSSL_DECODER_PARAM_PROPERTIES */
  124|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  125|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  126|      0|                                       "param %s is repeated", s);
  127|      0|                        return 0;
  128|      0|                    }
  129|      0|                    r->propq = (OSSL_PARAM *)p;
  130|      0|                }
  131|      7|            }
  132|      7|    return 1;
  133|      7|}

decode_pvk2key.c:pvk2key_does_selection:
  153|      4|{
  154|      4|    if (selection == 0)
  ------------------
  |  Branch (154:9): [True: 0, False: 4]
  ------------------
  155|      0|        return 1;
  156|       |
  157|      4|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
  ------------------
  |  |  640|      4|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (157:9): [True: 0, False: 4]
  ------------------
  158|      0|        return 1;
  159|       |
  160|      4|    return 0;
  161|      4|}

ossl_spki2typespki_der_decode:
  144|   435k|{
  145|   435k|    const unsigned char *derp = der;
  146|   435k|    X509_PUBKEY *xpub = NULL;
  147|   435k|    X509_ALGOR *algor = NULL;
  148|   435k|    const ASN1_OBJECT *oid = NULL;
  149|   435k|    char dataname[OSSL_MAX_NAME_SIZE];
  150|   435k|    OSSL_PARAM params[6], *p = params;
  151|   435k|    int objtype = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|   435k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  152|   435k|    int ok = 0;
  153|       |
  154|   435k|    xpub = ossl_d2i_X509_PUBKEY_INTERNAL(&derp, len, libctx, propq);
  155|       |
  156|   435k|    if (xpub == NULL) {
  ------------------
  |  Branch (156:9): [True: 0, False: 435k]
  ------------------
  157|       |        /* We return "empty handed".  This is not an error. */
  158|      0|        ok = 1;
  159|      0|        goto end;
  160|      0|    }
  161|       |
  162|   435k|    if (!X509_PUBKEY_get0_param(NULL, NULL, NULL, &algor, xpub))
  ------------------
  |  Branch (162:9): [True: 0, False: 435k]
  ------------------
  163|      0|        goto end;
  164|   435k|    X509_ALGOR_get0(&oid, NULL, NULL, algor);
  165|       |
  166|   435k|#ifndef OPENSSL_NO_EC
  167|       |    /* SM2 abuses the EC oid, so this could actually be SM2 */
  168|   435k|    if (OBJ_obj2nid(oid) == NID_X9_62_id_ecPublicKey
  ------------------
  |  |  178|   871k|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (168:9): [True: 119k, False: 316k]
  ------------------
  169|   119k|        && ossl_x509_algor_is_sm2(algor))
  ------------------
  |  Branch (169:12): [True: 0, False: 119k]
  ------------------
  170|      0|        strcpy(dataname, "SM2");
  171|   435k|    else
  172|   435k|#endif
  173|   435k|        if (OBJ_obj2txt(dataname, sizeof(dataname), oid, 0) <= 0)
  ------------------
  |  Branch (173:13): [True: 0, False: 435k]
  ------------------
  174|      0|        goto end;
  175|       |
  176|   435k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  177|   435k|    xpub = NULL;
  178|       |
  179|   435k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  358|   435k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  180|   435k|        dataname, 0);
  181|       |
  182|   435k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_INPUT_TYPE,
  ------------------
  |  |  360|   435k|# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
  ------------------
  183|   435k|        "DER", 0);
  184|       |
  185|   435k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  357|   435k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  186|   435k|        "SubjectPublicKeyInfo",
  187|   435k|        0);
  188|   435k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_DATA, der, len);
  ------------------
  |  |  356|   435k|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  189|   435k|    *p++ = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &objtype);
  ------------------
  |  |  362|   435k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  190|       |
  191|   435k|    *p = OSSL_PARAM_construct_end();
  192|       |
  193|   435k|    ok = data_cb(params, data_cbarg);
  194|       |
  195|   435k|end:
  196|   435k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  197|   435k|    return ok;
  198|   435k|}
decode_spki2typespki.c:spki2typespki_newctx:
   45|   435k|{
   46|   435k|    struct spki2typespki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|   435k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   47|       |
   48|   435k|    if (ctx != NULL)
  ------------------
  |  Branch (48:9): [True: 435k, False: 0]
  ------------------
   49|   435k|        ctx->provctx = provctx;
   50|   435k|    return ctx;
   51|   435k|}
decode_spki2typespki.c:spki2typespki_freectx:
   54|   435k|{
   55|   435k|    struct spki2typespki_ctx_st *ctx = vctx;
   56|       |
   57|   435k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   58|   435k|}
decode_spki2typespki.c:spki2typespki_decode:
  124|   435k|{
  125|   435k|    struct spki2typespki_ctx_st *ctx = vctx;
  126|   435k|    unsigned char *der;
  127|   435k|    long len;
  128|   435k|    int ok = 0;
  129|       |
  130|   435k|    if (!ossl_read_der(ctx->provctx, cin, &der, &len))
  ------------------
  |  Branch (130:9): [True: 0, False: 435k]
  ------------------
  131|      0|        return 1;
  132|       |
  133|   435k|    ok = ossl_spki2typespki_der_decode(der, len, selection, data_cb, data_cbarg,
  134|   435k|        pw_cb, pw_cbarg,
  135|   435k|        PROV_LIBCTX_OF(ctx->provctx), ctx->propq);
  ------------------
  |  |   31|   435k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  136|   435k|    OPENSSL_free(der);
  ------------------
  |  |  131|   435k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|   435k|    return ok;
  138|   435k|}
decode_spki2typespki.c:spki2typespki_set_ctx_params:
  105|      2|{
  106|      2|    struct spki2typespki_ctx_st *ctx = vctx;
  107|      2|    struct spki2typespki_set_ctx_params_st p;
  108|      2|    char *str;
  109|       |
  110|      2|    if (ctx == NULL || !spki2typespki_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (110:9): [True: 0, False: 2]
  |  Branch (110:24): [True: 0, False: 2]
  ------------------
  111|      0|        return 0;
  112|       |
  113|      2|    str = ctx->propq;
  114|      2|    if (p.propq != NULL
  ------------------
  |  Branch (114:9): [True: 0, False: 2]
  ------------------
  115|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (115:12): [True: 0, False: 0]
  ------------------
  116|      0|        return 0;
  117|       |
  118|      2|    return 1;
  119|      2|}
decode_spki2typespki.c:spki2typespki_set_ctx_params_decoder:
   78|      2|{
   79|      2|    const char *s;
   80|       |
   81|      2|    memset(r, 0, sizeof(*r));
   82|      2|    if (p != NULL)
  ------------------
  |  Branch (82:9): [True: 2, False: 0]
  ------------------
   83|      4|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (83:16): [True: 2, False: 2]
  ------------------
   84|      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]
  |  |  ------------------
  ------------------
   85|       |                /* OSSL_DECODER_PARAM_PROPERTIES */
   86|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   87|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   88|      0|                                   "param %s is repeated", s);
   89|      0|                    return 0;
   90|      0|                }
   91|      0|                r->propq = (OSSL_PARAM *)p;
   92|      0|            }
   93|      2|    return 1;
   94|      2|}

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

cipher_aes.c:aes_256_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_192_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_128_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_256_cbc_get_params:
  198|  3.33k|    {                                                                                   \
  199|  3.33k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|  3.33k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|  3.33k|            flags, kbits, blkbits, ivbits);                                             \
  201|  3.33k|    }                                                                                   \
cipher_aes.c:aes_192_cbc_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_128_cbc_get_params:
  198|  3.33k|    {                                                                                   \
  199|  3.33k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|  3.33k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|  3.33k|            flags, kbits, blkbits, ivbits);                                             \
  201|  3.33k|    }                                                                                   \
cipher_aes.c:aes_256_ofb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_192_ofb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_128_ofb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_256_cfb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_192_cfb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_128_cfb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_256_cfb1_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_192_cfb1_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_128_cfb1_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_256_cfb8_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_192_cfb8_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_128_cfb8_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_256_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_192_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_128_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aes.c:aes_cbc_cts_gettable_ctx_params:
  348|  1.89k|    {                                                                    \
  349|  1.89k|        return name##_known_gettable_ctx_params;                         \
  350|  1.89k|    }
cipher_aria.c:aria_256_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_192_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_128_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_256_cbc_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_192_cbc_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_128_cbc_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_256_ofb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_192_ofb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_128_ofb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_256_cfb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_192_cfb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_128_cfb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_256_cfb1_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_192_cfb1_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_128_cfb1_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_256_cfb8_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_192_cfb8_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_128_cfb8_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_256_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_192_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_aria.c:aria_128_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_256_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_192_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_128_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_256_cbc_get_params:
  198|  3.33k|    {                                                                                   \
  199|  3.33k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|  3.33k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|  3.33k|            flags, kbits, blkbits, ivbits);                                             \
  201|  3.33k|    }                                                                                   \
cipher_camellia.c:camellia_192_cbc_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_128_cbc_get_params:
  198|  3.33k|    {                                                                                   \
  199|  3.33k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|  3.33k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|  3.33k|            flags, kbits, blkbits, ivbits);                                             \
  201|  3.33k|    }                                                                                   \
cipher_camellia.c:camellia_256_ofb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_192_ofb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_128_ofb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_256_cfb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_192_cfb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_128_cfb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_256_cfb1_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_192_cfb1_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_128_cfb1_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_256_cfb8_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_192_cfb8_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_128_cfb8_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_256_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_192_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_128_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_camellia.c:camellia_cbc_cts_gettable_ctx_params:
  348|  1.89k|    {                                                                    \
  349|  1.89k|        return name##_known_gettable_ctx_params;                         \
  350|  1.89k|    }
cipher_sm4.c:sm4_128_ecb_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    630|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_sm4.c:sm4_128_cbc_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    630|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_sm4.c:sm4_128_ctr_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    630|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_sm4.c:sm4_128_ofb128_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    630|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
cipher_sm4.c:sm4_128_cfb128_get_params:
  198|    630|    {                                                                                   \
  199|    630|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    630|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    630|            flags, kbits, blkbits, ivbits);                                             \
  201|    630|    }                                                                                   \
ossl_tdes_gettable_ctx_params:
  348|  6.93k|    {                                                                    \
  349|  6.93k|        return name##_known_gettable_ctx_params;                         \
  350|  6.93k|    }

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

md5_prov.c:md5_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
md5_sha1_prov.c:md5_sha1_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
null_prov.c:nullmd_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
ripemd_prov.c:ripemd160_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha2_prov.c:sha1_internal_final:
   44|   378k|    {                                                                             \
   45|   378k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 378k, False: 0]
  |  Branch (45:39): [True: 378k, False: 0]
  |  Branch (45:60): [True: 378k, False: 0]
  ------------------
   46|   378k|            *outl = dgstsize;                                                     \
   47|   378k|            return 1;                                                             \
   48|   378k|        }                                                                         \
   49|   378k|        return 0;                                                                 \
   50|   378k|    }
sha2_prov.c:sha1_freectx:
   63|   378k|    {                                                                            \
   64|   378k|        CTX *ctx = (CTX *)vctx;                                                  \
   65|   378k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  129|   378k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|   378k|    }                                                                            \
sha2_prov.c:sha1_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha2_prov.c:sha1_internal_init:
  117|   378k|    {                                                                                  \
  118|   378k|        return ossl_prov_is_running()                                                  \
  ------------------
  |  Branch (118:16): [True: 378k, False: 0]
  ------------------
  119|   378k|            && init(ctx)                                                               \
  ------------------
  |  Branch (119:16): [True: 378k, False: 0]
  ------------------
  120|   378k|            && set_ctx_params(ctx, params);                                            \
  ------------------
  |  Branch (120:16): [True: 378k, False: 0]
  ------------------
  121|   378k|    }                                                                                  \
sha2_prov.c:sha224_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha2_prov.c:sha256_internal_final:
   44|  6.84k|    {                                                                             \
   45|  6.84k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 6.84k, False: 0]
  |  Branch (45:39): [True: 6.84k, False: 0]
  |  Branch (45:60): [True: 6.84k, False: 0]
  ------------------
   46|  6.84k|            *outl = dgstsize;                                                     \
   47|  6.84k|            return 1;                                                             \
   48|  6.84k|        }                                                                         \
   49|  6.84k|        return 0;                                                                 \
   50|  6.84k|    }
sha2_prov.c:sha256_freectx:
   63|  6.84k|    {                                                                            \
   64|  6.84k|        CTX *ctx = (CTX *)vctx;                                                  \
   65|  6.84k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  129|  6.84k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|  6.84k|    }                                                                            \
sha2_prov.c:sha256_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha2_prov.c:sha256_internal_init:
  104|  6.84k|    {                                                                              \
  105|  6.84k|        return ossl_prov_is_running() && init(ctx);                                \
  ------------------
  |  Branch (105:16): [True: 6.84k, False: 0]
  |  Branch (105:42): [True: 6.84k, False: 0]
  ------------------
  106|  6.84k|    }                                                                              \
sha2_prov.c:sha256_192_internal_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha2_prov.c:sha384_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha2_prov.c:sha512_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha2_prov.c:sha512_224_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha2_prov.c:sha512_256_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:sha3_224_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:sha3_256_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:sha3_384_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:sha3_512_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:keccak_224_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:keccak_256_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:keccak_384_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:keccak_512_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:shake_128_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:shake_256_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:keccak_kmac_128_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sha3_prov.c:keccak_kmac_256_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }
sm3_prov.c:sm3_get_params:
   29|    630|    {                                                                            \
   30|    630|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    630|    }

dh_kmgmt.c:dh_gen_init:
  493|     86|{
  494|     86|    return dh_gen_init_base(provctx, selection, params, DH_FLAG_TYPE_DH);
  ------------------
  |  |  111|     86|#define DH_FLAG_TYPE_DH 0x0000
  ------------------
  495|     86|}
dh_kmgmt.c:dh_gen_init_base:
  453|     86|{
  454|     86|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|     86|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  455|     86|    struct dh_gen_ctx *gctx = NULL;
  456|       |
  457|     86|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (457:9): [True: 0, False: 86]
  ------------------
  458|      0|        return NULL;
  459|       |
  460|     86|    if ((selection & (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS)) == 0)
  ------------------
  |  |  650|     86|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|     86|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|     86|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                  if ((selection & (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS)) == 0)
  ------------------
  |  |  642|     86|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  |  Branch (460:9): [True: 0, False: 86]
  ------------------
  461|      0|        return NULL;
  462|       |
  463|     86|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  108|     86|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (463:9): [True: 86, False: 0]
  ------------------
  464|     86|        gctx->selection = selection;
  465|     86|        gctx->libctx = libctx;
  466|     86|        gctx->pbits = 2048;
  467|     86|        gctx->qbits = 224;
  468|     86|        gctx->mdname = NULL;
  469|       |#ifdef FIPS_MODULE
  470|       |        gctx->gen_type = (type == DH_FLAG_TYPE_DHX)
  471|       |            ? DH_PARAMGEN_TYPE_FIPS_186_4
  472|       |            : DH_PARAMGEN_TYPE_GROUP;
  473|       |#else
  474|     86|        gctx->gen_type = (type == DH_FLAG_TYPE_DHX)
  ------------------
  |  |  112|     86|#define DH_FLAG_TYPE_DHX 0x1000
  ------------------
  |  Branch (474:26): [True: 0, False: 86]
  ------------------
  475|     86|            ? DH_PARAMGEN_TYPE_FIPS_186_2
  ------------------
  |  |   34|      0|#define DH_PARAMGEN_TYPE_FIPS_186_2 1 /* Use FIPS186-2 standard */
  ------------------
  476|     86|            : DH_PARAMGEN_TYPE_GENERATOR;
  ------------------
  |  |   33|    172|#define DH_PARAMGEN_TYPE_GENERATOR 0 /* Use a safe prime generator */
  ------------------
  477|     86|#endif
  478|     86|        gctx->gindex = -1;
  479|     86|        gctx->hindex = 0;
  480|     86|        gctx->pcounter = -1;
  481|     86|        gctx->generator = DH_GENERATOR_2;
  ------------------
  |  |  147|     86|#define DH_GENERATOR_2 2
  ------------------
  482|     86|        gctx->dh_type = type;
  483|     86|    }
  484|     86|    if (!dh_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (484:9): [True: 0, False: 86]
  ------------------
  485|      0|        OPENSSL_free(gctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  486|       |        gctx = NULL;
  487|      0|    }
  488|     86|    return gctx;
  489|     86|}
dh_kmgmt.c:dh_gen_set_params:
  660|    172|{
  661|    172|    struct dh_gen_ctx *gctx = genctx;
  662|    172|    const OSSL_PARAM *p;
  663|       |
  664|    172|    if (!dh_gen_common_set_params(genctx, params))
  ------------------
  |  Branch (664:9): [True: 0, False: 172]
  ------------------
  665|      0|        return 0;
  666|       |
  667|    172|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_DH_GENERATOR);
  ------------------
  |  |  372|    172|# define OSSL_PKEY_PARAM_DH_GENERATOR "safeprime-generator"
  ------------------
  668|    172|    if (p != NULL && !OSSL_PARAM_get_int(p, &gctx->generator))
  ------------------
  |  Branch (668:9): [True: 0, False: 172]
  |  Branch (668:22): [True: 0, False: 0]
  ------------------
  669|      0|        return 0;
  670|       |
  671|       |    /* Parameters that are not allowed for DH */
  672|    172|    if (OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_GINDEX) != NULL
  ------------------
  |  |  404|    172|# define OSSL_PKEY_PARAM_FFC_GINDEX "gindex"
  ------------------
  |  Branch (672:9): [True: 0, False: 172]
  ------------------
  673|    172|        || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_PCOUNTER) != NULL
  ------------------
  |  |  408|    172|# define OSSL_PKEY_PARAM_FFC_PCOUNTER "pcounter"
  ------------------
  |  Branch (673:12): [True: 0, False: 172]
  ------------------
  674|    172|        || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_H) != NULL
  ------------------
  |  |  405|    172|# define OSSL_PKEY_PARAM_FFC_H "hindex"
  ------------------
  |  Branch (674:12): [True: 0, False: 172]
  ------------------
  675|    172|        || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_SEED) != NULL
  ------------------
  |  |  411|    172|# define OSSL_PKEY_PARAM_FFC_SEED "seed"
  ------------------
  |  Branch (675:12): [True: 0, False: 172]
  ------------------
  676|    172|        || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_QBITS) != NULL
  ------------------
  |  |  410|    172|# define OSSL_PKEY_PARAM_FFC_QBITS "qbits"
  ------------------
  |  Branch (676:12): [True: 0, False: 172]
  ------------------
  677|    172|        || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_DIGEST) != NULL
  ------------------
  |  |  401|    172|# define OSSL_PKEY_PARAM_FFC_DIGEST OSSL_PKEY_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  374|    172|# define OSSL_PKEY_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  |  |  ------------------
  |  |  |  |  |  |  128|    172|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (677:12): [True: 0, False: 172]
  ------------------
  678|    172|        || OSSL_PARAM_locate_const(params,
  ------------------
  |  Branch (678:12): [True: 0, False: 172]
  ------------------
  679|    172|               OSSL_PKEY_PARAM_FFC_DIGEST_PROPS)
  ------------------
  |  |  402|    172|# define OSSL_PKEY_PARAM_FFC_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  440|    172|# define OSSL_PKEY_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  |  |  ------------------
  |  |  |  |  |  |  132|    172|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  680|    172|            != NULL) {
  681|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  682|      0|        return 0;
  683|      0|    }
  684|    172|    return 1;
  685|    172|}
dh_kmgmt.c:dh_gen_common_set_params:
  530|    172|{
  531|    172|    struct dh_gen_ctx *gctx = genctx;
  532|    172|    const OSSL_PARAM *p;
  533|    172|    int gen_type = -1;
  534|       |
  535|    172|    if (gctx == NULL)
  ------------------
  |  Branch (535:9): [True: 0, False: 172]
  ------------------
  536|      0|        return 0;
  537|    172|    if (ossl_param_is_empty(params))
  ------------------
  |  Branch (537:9): [True: 86, False: 86]
  ------------------
  538|     86|        return 1;
  539|       |
  540|     86|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_TYPE);
  ------------------
  |  |  412|     86|# define OSSL_PKEY_PARAM_FFC_TYPE "type"
  ------------------
  541|     86|    if (p != NULL) {
  ------------------
  |  Branch (541:9): [True: 0, False: 86]
  ------------------
  542|      0|        if (p->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (542:13): [True: 0, False: 0]
  ------------------
  543|      0|            || ((gen_type = dh_gen_type_name2id_w_default(p->data, gctx->dh_type)) == -1)) {
  ------------------
  |  Branch (543:16): [True: 0, False: 0]
  ------------------
  544|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  545|      0|            return 0;
  546|      0|        }
  547|      0|        if (gen_type != -1)
  ------------------
  |  Branch (547:13): [True: 0, False: 0]
  ------------------
  548|      0|            gctx->gen_type = gen_type;
  549|      0|    }
  550|     86|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_GROUP_NAME);
  ------------------
  |  |  420|     86|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  551|     86|    if (p != NULL) {
  ------------------
  |  Branch (551:9): [True: 86, False: 0]
  ------------------
  552|     86|        const DH_NAMED_GROUP *group = NULL;
  553|       |
  554|     86|        if (p->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|    172|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (554:13): [True: 0, False: 86]
  ------------------
  555|     86|            || p->data == NULL
  ------------------
  |  Branch (555:16): [True: 0, False: 86]
  ------------------
  556|     86|            || (group = ossl_ffc_name_to_dh_named_group(p->data)) == NULL
  ------------------
  |  Branch (556:16): [True: 0, False: 86]
  ------------------
  557|     86|            || ((gctx->group_nid = ossl_ffc_named_group_get_uid(group)) == NID_undef)) {
  ------------------
  |  |   18|     86|#define NID_undef                       0
  ------------------
  |  Branch (557:16): [True: 0, False: 86]
  ------------------
  558|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  559|      0|            return 0;
  560|      0|        }
  561|     86|    }
  562|     86|    if ((p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_PBITS)) != NULL
  ------------------
  |  |  407|     86|# define OSSL_PKEY_PARAM_FFC_PBITS "pbits"
  ------------------
  |  Branch (562:9): [True: 0, False: 86]
  ------------------
  563|      0|        && !OSSL_PARAM_get_size_t(p, &gctx->pbits))
  ------------------
  |  Branch (563:12): [True: 0, False: 0]
  ------------------
  564|      0|        return 0;
  565|     86|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_DH_PRIV_LEN);
  ------------------
  |  |  373|     86|# define OSSL_PKEY_PARAM_DH_PRIV_LEN "priv_len"
  ------------------
  566|     86|    if (p != NULL && !OSSL_PARAM_get_int(p, &gctx->priv_len))
  ------------------
  |  Branch (566:9): [True: 0, False: 86]
  |  Branch (566:22): [True: 0, False: 0]
  ------------------
  567|      0|        return 0;
  568|     86|    return 1;
  569|     86|}
dh_kmgmt.c:dh_gen:
  699|     86|{
  700|     86|    int ret = 0;
  701|     86|    struct dh_gen_ctx *gctx = genctx;
  702|     86|    DH *dh = NULL;
  703|     86|    BN_GENCB *gencb = NULL;
  704|     86|    FFC_PARAMS *ffc;
  705|       |
  706|     86|    if (!ossl_prov_is_running() || gctx == NULL)
  ------------------
  |  Branch (706:9): [True: 0, False: 86]
  |  Branch (706:36): [True: 0, False: 86]
  ------------------
  707|      0|        return NULL;
  708|       |
  709|       |    /*
  710|       |     * If a group name is selected then the type is group regardless of what
  711|       |     * the user selected. This overrides rather than errors for backwards
  712|       |     * compatibility.
  713|       |     */
  714|     86|    if (gctx->group_nid != NID_undef)
  ------------------
  |  |   18|     86|#define NID_undef                       0
  ------------------
  |  Branch (714:9): [True: 86, False: 0]
  ------------------
  715|     86|        gctx->gen_type = DH_PARAMGEN_TYPE_GROUP;
  ------------------
  |  |   36|     86|#define DH_PARAMGEN_TYPE_GROUP 3 /* Use a named safe prime group */
  ------------------
  716|       |
  717|       |    /*
  718|       |     * Do a bounds check on context gen_type. Must be in range:
  719|       |     * DH_PARAMGEN_TYPE_GENERATOR <= gen_type <= DH_PARAMGEN_TYPE_GROUP
  720|       |     * Noted here as this needs to be adjusted if a new group type is
  721|       |     * added.
  722|       |     */
  723|     86|    if (!ossl_assert((gctx->gen_type >= DH_PARAMGEN_TYPE_GENERATOR)
  ------------------
  |  |   52|    172|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 86, False: 0]
  |  |  |  Branch (52:41): [True: 86, False: 0]
  |  |  ------------------
  |  |   53|     86|    __FILE__, __LINE__)
  ------------------
  |  Branch (723:9): [True: 0, False: 86]
  ------------------
  724|     86|            && (gctx->gen_type <= DH_PARAMGEN_TYPE_GROUP))) {
  725|      0|        ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  726|      0|            "gen_type set to unsupported value %d", gctx->gen_type);
  727|      0|        return NULL;
  728|      0|    }
  729|       |
  730|       |    /* For parameter generation - If there is a group name just create it */
  731|     86|    if (gctx->gen_type == DH_PARAMGEN_TYPE_GROUP
  ------------------
  |  |   36|    172|#define DH_PARAMGEN_TYPE_GROUP 3 /* Use a named safe prime group */
  ------------------
  |  Branch (731:9): [True: 86, False: 0]
  ------------------
  732|     86|        && gctx->ffc_params == NULL) {
  ------------------
  |  Branch (732:12): [True: 86, False: 0]
  ------------------
  733|       |        /* Select a named group if there is not one already */
  734|     86|        if (gctx->group_nid == NID_undef)
  ------------------
  |  |   18|     86|#define NID_undef                       0
  ------------------
  |  Branch (734:13): [True: 0, False: 86]
  ------------------
  735|      0|            gctx->group_nid = ossl_dh_get_named_group_uid_from_size((int)gctx->pbits);
  736|     86|        if (gctx->group_nid == NID_undef)
  ------------------
  |  |   18|     86|#define NID_undef                       0
  ------------------
  |  Branch (736:13): [True: 0, False: 86]
  ------------------
  737|      0|            return NULL;
  738|     86|        dh = ossl_dh_new_by_nid_ex(gctx->libctx, gctx->group_nid);
  739|     86|        if (dh == NULL)
  ------------------
  |  Branch (739:13): [True: 0, False: 86]
  ------------------
  740|      0|            return NULL;
  741|     86|        ffc = ossl_dh_get0_params(dh);
  742|     86|    } else {
  743|      0|        dh = ossl_dh_new_ex(gctx->libctx);
  744|      0|        if (dh == NULL)
  ------------------
  |  Branch (744:13): [True: 0, False: 0]
  ------------------
  745|      0|            return NULL;
  746|      0|        ffc = ossl_dh_get0_params(dh);
  747|       |
  748|       |        /* Copy the template value if one was passed */
  749|      0|        if (gctx->ffc_params != NULL
  ------------------
  |  Branch (749:13): [True: 0, False: 0]
  ------------------
  750|      0|            && !ossl_ffc_params_copy(ffc, gctx->ffc_params))
  ------------------
  |  Branch (750:16): [True: 0, False: 0]
  ------------------
  751|      0|            goto end;
  752|       |
  753|      0|        if (!ossl_ffc_params_set_seed(ffc, gctx->seed, gctx->seedlen))
  ------------------
  |  Branch (753:13): [True: 0, False: 0]
  ------------------
  754|      0|            goto end;
  755|      0|        if (gctx->gindex != -1) {
  ------------------
  |  Branch (755:13): [True: 0, False: 0]
  ------------------
  756|      0|            ossl_ffc_params_set_gindex(ffc, gctx->gindex);
  757|      0|            if (gctx->pcounter != -1)
  ------------------
  |  Branch (757:17): [True: 0, False: 0]
  ------------------
  758|      0|                ossl_ffc_params_set_pcounter(ffc, gctx->pcounter);
  759|      0|        } else if (gctx->hindex != 0) {
  ------------------
  |  Branch (759:20): [True: 0, False: 0]
  ------------------
  760|      0|            ossl_ffc_params_set_h(ffc, gctx->hindex);
  761|      0|        }
  762|      0|        if (gctx->mdname != NULL)
  ------------------
  |  Branch (762:13): [True: 0, False: 0]
  ------------------
  763|      0|            ossl_ffc_set_digest(ffc, gctx->mdname, gctx->mdprops);
  764|      0|        gctx->cb = osslcb;
  765|      0|        gctx->cbarg = cbarg;
  766|      0|        gencb = BN_GENCB_new();
  767|      0|        if (gencb != NULL)
  ------------------
  |  Branch (767:13): [True: 0, False: 0]
  ------------------
  768|      0|            BN_GENCB_set(gencb, dh_gencb, genctx);
  769|       |
  770|      0|        if ((gctx->selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
  ------------------
  |  |  642|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  |  Branch (770:13): [True: 0, False: 0]
  ------------------
  771|       |            /*
  772|       |             * NOTE: The old safe prime generator code is not used in fips mode,
  773|       |             * (i.e internally it ignores the generator and chooses a named
  774|       |             * group based on pbits.
  775|       |             */
  776|      0|            if (gctx->gen_type == DH_PARAMGEN_TYPE_GENERATOR)
  ------------------
  |  |   33|      0|#define DH_PARAMGEN_TYPE_GENERATOR 0 /* Use a safe prime generator */
  ------------------
  |  Branch (776:17): [True: 0, False: 0]
  ------------------
  777|      0|                ret = DH_generate_parameters_ex(dh, (int)gctx->pbits,
  778|      0|                    gctx->generator, gencb);
  779|      0|            else
  780|      0|                ret = ossl_dh_generate_ffc_parameters(dh, gctx->gen_type,
  781|      0|                    (int)gctx->pbits,
  782|      0|                    (int)gctx->qbits, gencb);
  783|      0|            if (ret <= 0)
  ------------------
  |  Branch (783:17): [True: 0, False: 0]
  ------------------
  784|      0|                goto end;
  785|      0|        }
  786|      0|    }
  787|       |
  788|     86|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  650|     86|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|     86|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|     86|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (788:9): [True: 86, False: 0]
  ------------------
  789|     86|        if (ffc->p == NULL || ffc->g == NULL)
  ------------------
  |  Branch (789:13): [True: 0, False: 86]
  |  Branch (789:31): [True: 0, False: 86]
  ------------------
  790|      0|            goto end;
  791|     86|        if (gctx->priv_len > 0)
  ------------------
  |  Branch (791:13): [True: 0, False: 86]
  ------------------
  792|      0|            DH_set_length(dh, (long)gctx->priv_len);
  793|     86|        ossl_ffc_params_enable_flags(ffc, FFC_PARAM_FLAG_VALIDATE_LEGACY,
  ------------------
  |  |   47|     86|#define FFC_PARAM_FLAG_VALIDATE_LEGACY 0x04
  ------------------
  794|     86|            gctx->gen_type == DH_PARAMGEN_TYPE_FIPS_186_2);
  ------------------
  |  |   34|     86|#define DH_PARAMGEN_TYPE_FIPS_186_2 1 /* Use FIPS186-2 standard */
  ------------------
  795|     86|        if (DH_generate_key(dh) <= 0)
  ------------------
  |  Branch (795:13): [True: 0, False: 86]
  ------------------
  796|      0|            goto end;
  797|       |#ifdef FIPS_MODULE
  798|       |        if (!ossl_fips_self_testing()) {
  799|       |            ret = ossl_dh_check_pairwise(dh, 0);
  800|       |            if (ret <= 0) {
  801|       |                ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
  802|       |                goto end;
  803|       |            }
  804|       |        }
  805|       |#endif /* FIPS_MODULE */
  806|     86|    }
  807|     86|    DH_clear_flags(dh, DH_FLAG_TYPE_MASK);
  ------------------
  |  |  110|     86|#define DH_FLAG_TYPE_MASK 0xF000
  ------------------
  808|     86|    DH_set_flags(dh, gctx->dh_type);
  809|       |
  810|     86|    ret = 1;
  811|     86|end:
  812|     86|    if (ret <= 0) {
  ------------------
  |  Branch (812:9): [True: 0, False: 86]
  ------------------
  813|      0|        DH_free(dh);
  814|       |        dh = NULL;
  815|      0|    }
  816|     86|    BN_GENCB_free(gencb);
  817|     86|    return dh;
  818|     86|}
dh_kmgmt.c:dh_gen_cleanup:
  821|     86|{
  822|     86|    struct dh_gen_ctx *gctx = genctx;
  823|       |
  824|     86|    if (gctx == NULL)
  ------------------
  |  Branch (824:9): [True: 0, False: 86]
  ------------------
  825|      0|        return;
  826|       |
  827|     86|    OPENSSL_free(gctx->mdname);
  ------------------
  |  |  131|     86|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  828|     86|    OPENSSL_free(gctx->mdprops);
  ------------------
  |  |  131|     86|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  829|     86|    OPENSSL_clear_free(gctx->seed, gctx->seedlen);
  ------------------
  |  |  129|     86|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  830|     86|    OPENSSL_free(gctx);
  ------------------
  |  |  131|     86|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  831|     86|}
dh_kmgmt.c:dh_freedata:
  128|     86|{
  129|     86|    DH_free(keydata);
  130|     86|}
dh_kmgmt.c:dh_get_params:
  316|    258|{
  317|    258|    DH *dh = key;
  318|    258|    OSSL_PARAM *p;
  319|       |
  320|    258|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  366|    258|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (320:9): [True: 86, False: 172]
  ------------------
  321|     86|        && !OSSL_PARAM_set_int(p, DH_bits(dh)))
  ------------------
  |  Branch (321:12): [True: 0, False: 86]
  ------------------
  322|      0|        return 0;
  323|    258|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL
  ------------------
  |  |  495|    258|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (323:9): [True: 86, False: 172]
  ------------------
  324|     86|        && !OSSL_PARAM_set_int(p, DH_security_bits(dh)))
  ------------------
  |  Branch (324:12): [True: 0, False: 86]
  ------------------
  325|      0|        return 0;
  326|    258|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  424|    258|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (326:9): [True: 86, False: 172]
  ------------------
  327|     86|        && !OSSL_PARAM_set_int(p, DH_size(dh)))
  ------------------
  |  Branch (327:12): [True: 0, False: 86]
  ------------------
  328|      0|        return 0;
  329|    258|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY)) != NULL) {
  ------------------
  |  |  398|    258|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
  |  Branch (329:9): [True: 172, False: 86]
  ------------------
  330|    172|        if (p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|    172|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (330:13): [True: 0, False: 172]
  ------------------
  331|      0|            return 0;
  332|    172|        p->return_size = ossl_dh_key2buf(dh, (unsigned char **)&p->data,
  333|    172|            p->data_size, 0);
  334|    172|        if (p->return_size == 0)
  ------------------
  |  Branch (334:13): [True: 0, False: 172]
  ------------------
  335|      0|            return 0;
  336|    172|    }
  337|    258|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  496|    258|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  133|    258|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (337:9): [True: 86, False: 172]
  ------------------
  338|     86|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (338:13): [True: 0, False: 86]
  ------------------
  339|      0|            return 0;
  340|       |
  341|    258|    return ossl_dh_params_todata(dh, NULL, params)
  ------------------
  |  Branch (341:12): [True: 258, False: 0]
  ------------------
  342|    258|        && ossl_dh_key_todata(dh, NULL, params, 1);
  ------------------
  |  Branch (342:12): [True: 258, False: 0]
  ------------------
  343|    258|}

ec_kmgmt.c:ec_gen_init:
  975|    594|{
  976|    594|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|    594|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  977|    594|    struct ec_gen_ctx *gctx = NULL;
  978|       |
  979|    594|    if (!ossl_prov_is_running() || (selection & (EC_POSSIBLE_SELECTIONS)) == 0)
  ------------------
  |  |   79|    594|    (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  650|    594|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  640|    594|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  641|    594|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  647|    594|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  ------------------
  |  |  |  |  |  |  642|    594|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  ------------------
  |  |  |  |  648|    594|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  643|    594|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (979:9): [True: 0, False: 594]
  |  Branch (979:36): [True: 0, False: 594]
  ------------------
  980|      0|        return NULL;
  981|       |
  982|    594|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  108|    594|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (982:9): [True: 594, False: 0]
  ------------------
  983|    594|        gctx->libctx = libctx;
  984|    594|        gctx->selection = selection;
  985|    594|        gctx->ecdh_mode = 0;
  986|    594|        OSSL_FIPS_IND_INIT(gctx)
  987|    594|        if (!ec_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (987:13): [True: 0, False: 594]
  ------------------
  988|      0|            ec_gen_cleanup(gctx);
  989|       |            gctx = NULL;
  990|      0|        }
  991|    594|    }
  992|    594|    return gctx;
  993|    594|}
ec_kmgmt.c:ec_gen_set_params:
 1080|  1.18k|{
 1081|  1.18k|    int ret = 0;
 1082|  1.18k|    struct ec_gen_ctx *gctx = genctx;
 1083|  1.18k|    const OSSL_PARAM *p;
 1084|       |
 1085|  1.18k|    if (!OSSL_FIPS_IND_SET_CTX_PARAM(gctx, OSSL_FIPS_IND_SETTABLE0, params,
  ------------------
  |  |  157|  1.18k|#define OSSL_FIPS_IND_SET_CTX_PARAM(ctx, id, params, name) 1
  ------------------
  |  Branch (1085:9): [Folded, False: 1.18k]
  ------------------
 1086|  1.18k|            OSSL_PKEY_PARAM_FIPS_KEY_CHECK))
 1087|      0|        goto err;
 1088|       |
 1089|  1.18k|    COPY_INT_PARAM(params, OSSL_PKEY_PARAM_USE_COFACTOR_ECDH, gctx->ecdh_mode);
  ------------------
  |  | 1043|  1.18k|    p = OSSL_PARAM_locate_const(params, key);      \
  |  | 1044|  1.18k|    if (p != NULL && !OSSL_PARAM_get_int(p, &val)) \
  |  |  ------------------
  |  |  |  Branch (1044:9): [True: 0, False: 1.18k]
  |  |  |  Branch (1044:22): [True: 0, False: 0]
  |  |  ------------------
  |  | 1045|  1.18k|        goto err;
  ------------------
 1090|       |
 1091|  1.18k|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_GROUP_NAME, gctx->group_name);
  ------------------
  |  | 1048|  1.18k|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1049|  1.18k|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1049:9): [True: 594, False: 594]
  |  |  ------------------
  |  | 1050|    594|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|    594|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1050:13): [True: 0, False: 594]
  |  |  ------------------
  |  | 1051|    594|            goto err;                               \
  |  | 1052|    594|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  131|    594|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1053|    594|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  135|    594|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1054|    594|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1054:13): [True: 0, False: 594]
  |  |  ------------------
  |  | 1055|    594|            goto err;                               \
  |  | 1056|    594|    }
  ------------------
 1092|  1.18k|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_FIELD_TYPE, gctx->field_type);
  ------------------
  |  | 1048|  1.18k|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1049|  1.18k|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1049:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1050|      0|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1050:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1051|      0|            goto err;                               \
  |  | 1052|      0|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1053|      0|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1054|      0|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1054:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1055|      0|            goto err;                               \
  |  | 1056|      0|    }
  ------------------
 1093|  1.18k|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_ENCODING, gctx->encoding);
  ------------------
  |  | 1048|  1.18k|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1049|  1.18k|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1049:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1050|      0|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1050:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1051|      0|            goto err;                               \
  |  | 1052|      0|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1053|      0|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1054|      0|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1054:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1055|      0|            goto err;                               \
  |  | 1056|      0|    }
  ------------------
 1094|  1.18k|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT, gctx->pt_format);
  ------------------
  |  | 1048|  1.18k|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1049|  1.18k|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1049:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1050|      0|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1050:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1051|      0|            goto err;                               \
  |  | 1052|      0|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1053|      0|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1054|      0|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1054:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1055|      0|            goto err;                               \
  |  | 1056|      0|    }
  ------------------
 1095|  1.18k|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE, gctx->group_check);
  ------------------
  |  | 1048|  1.18k|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1049|  1.18k|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1049:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1050|      0|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1050:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1051|      0|            goto err;                               \
  |  | 1052|      0|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1053|      0|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1054|      0|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1054:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1055|      0|            goto err;                               \
  |  | 1056|      0|    }
  ------------------
 1096|       |
 1097|  1.18k|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_P, gctx->p);
  ------------------
  |  | 1071|  1.18k|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1072|  1.18k|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1072:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1073|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1073:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1074|      0|            bn = BN_new();                            \
  |  | 1075|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1075:13): [True: 0, False: 0]
  |  |  |  Branch (1075:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1076|      0|            goto err;                                 \
  |  | 1077|      0|    }
  ------------------
 1098|  1.18k|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_A, gctx->a);
  ------------------
  |  | 1071|  1.18k|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1072|  1.18k|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1072:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1073|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1073:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1074|      0|            bn = BN_new();                            \
  |  | 1075|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1075:13): [True: 0, False: 0]
  |  |  |  Branch (1075:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1076|      0|            goto err;                                 \
  |  | 1077|      0|    }
  ------------------
 1099|  1.18k|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_B, gctx->b);
  ------------------
  |  | 1071|  1.18k|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1072|  1.18k|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1072:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1073|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1073:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1074|      0|            bn = BN_new();                            \
  |  | 1075|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1075:13): [True: 0, False: 0]
  |  |  |  Branch (1075:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1076|      0|            goto err;                                 \
  |  | 1077|      0|    }
  ------------------
 1100|  1.18k|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_ORDER, gctx->order);
  ------------------
  |  | 1071|  1.18k|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1072|  1.18k|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1072:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1073|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1073:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1074|      0|            bn = BN_new();                            \
  |  | 1075|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1075:13): [True: 0, False: 0]
  |  |  |  Branch (1075:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1076|      0|            goto err;                                 \
  |  | 1077|      0|    }
  ------------------
 1101|  1.18k|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_COFACTOR, gctx->cofactor);
  ------------------
  |  | 1071|  1.18k|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1072|  1.18k|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1072:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1073|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1073:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1074|      0|            bn = BN_new();                            \
  |  | 1075|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1075:13): [True: 0, False: 0]
  |  |  |  Branch (1075:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1076|      0|            goto err;                                 \
  |  | 1077|      0|    }
  ------------------
 1102|       |
 1103|  1.18k|    COPY_OCTET_PARAM(params, OSSL_PKEY_PARAM_EC_SEED, gctx->seed, gctx->seed_len);
  ------------------
  |  | 1059|  1.18k|    p = OSSL_PARAM_locate_const(params, key);        \
  |  | 1060|  1.18k|    if (p != NULL) {                                 \
  |  |  ------------------
  |  |  |  Branch (1060:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1061|      0|        if (p->data_type != OSSL_PARAM_OCTET_STRING) \
  |  |  ------------------
  |  |  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  |  |  ------------------
  |  |  |  Branch (1061:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1062|      0|            goto err;                                \
  |  | 1063|      0|        OPENSSL_free(val);                           \
  |  |  ------------------
  |  |  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1064|      0|        len = p->data_size;                          \
  |  | 1065|      0|        val = OPENSSL_memdup(p->data, p->data_size); \
  |  |  ------------------
  |  |  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1066|      0|        if (val == NULL)                             \
  |  |  ------------------
  |  |  |  Branch (1066:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1067|      0|            goto err;                                \
  |  | 1068|      0|    }
  ------------------
 1104|  1.18k|    COPY_OCTET_PARAM(params, OSSL_PKEY_PARAM_EC_GENERATOR, gctx->gen,
  ------------------
  |  | 1059|  1.18k|    p = OSSL_PARAM_locate_const(params, key);        \
  |  | 1060|  1.18k|    if (p != NULL) {                                 \
  |  |  ------------------
  |  |  |  Branch (1060:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1061|      0|        if (p->data_type != OSSL_PARAM_OCTET_STRING) \
  |  |  ------------------
  |  |  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  |  |  ------------------
  |  |  |  Branch (1061:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1062|      0|            goto err;                                \
  |  | 1063|      0|        OPENSSL_free(val);                           \
  |  |  ------------------
  |  |  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1064|      0|        len = p->data_size;                          \
  |  | 1065|      0|        val = OPENSSL_memdup(p->data, p->data_size); \
  |  |  ------------------
  |  |  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1066|      0|        if (val == NULL)                             \
  |  |  ------------------
  |  |  |  Branch (1066:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1067|      0|            goto err;                                \
  |  | 1068|      0|    }
  ------------------
 1105|  1.18k|        gctx->gen_len);
 1106|       |
 1107|  1.18k|    COPY_OCTET_PARAM(params, OSSL_PKEY_PARAM_DHKEM_IKM, gctx->dhkem_ikm,
  ------------------
  |  | 1059|  1.18k|    p = OSSL_PARAM_locate_const(params, key);        \
  |  | 1060|  1.18k|    if (p != NULL) {                                 \
  |  |  ------------------
  |  |  |  Branch (1060:9): [True: 0, False: 1.18k]
  |  |  ------------------
  |  | 1061|      0|        if (p->data_type != OSSL_PARAM_OCTET_STRING) \
  |  |  ------------------
  |  |  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  |  |  ------------------
  |  |  |  Branch (1061:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1062|      0|            goto err;                                \
  |  | 1063|      0|        OPENSSL_free(val);                           \
  |  |  ------------------
  |  |  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1064|      0|        len = p->data_size;                          \
  |  | 1065|      0|        val = OPENSSL_memdup(p->data, p->data_size); \
  |  |  ------------------
  |  |  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1066|      0|        if (val == NULL)                             \
  |  |  ------------------
  |  |  |  Branch (1066:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1067|      0|            goto err;                                \
  |  | 1068|      0|    }
  ------------------
 1108|  1.18k|        gctx->dhkem_ikmlen);
 1109|       |
 1110|  1.18k|    ret = 1;
 1111|  1.18k|err:
 1112|  1.18k|    return ret;
 1113|  1.18k|}
ec_kmgmt.c:ec_gen:
 1251|    594|{
 1252|    594|    struct ec_gen_ctx *gctx = genctx;
 1253|    594|    EC_KEY *ec = NULL;
 1254|    594|    int ret = 0;
 1255|       |
 1256|    594|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (1256:9): [True: 0, False: 594]
  ------------------
 1257|    594|        || gctx == NULL
  ------------------
  |  Branch (1257:12): [True: 0, False: 594]
  ------------------
 1258|    594|        || (ec = EC_KEY_new_ex(gctx->libctx, NULL)) == NULL)
  ------------------
  |  Branch (1258:12): [True: 0, False: 594]
  ------------------
 1259|      0|        return NULL;
 1260|       |
 1261|    594|    if (gctx->gen_group == NULL) {
  ------------------
  |  Branch (1261:9): [True: 594, False: 0]
  ------------------
 1262|    594|        if (!ec_gen_set_group_from_params(gctx))
  ------------------
  |  Branch (1262:13): [True: 0, False: 594]
  ------------------
 1263|      0|            goto err;
 1264|    594|    } else {
 1265|      0|        if (gctx->encoding != NULL) {
  ------------------
  |  Branch (1265:13): [True: 0, False: 0]
  ------------------
 1266|      0|            int flags = ossl_ec_encoding_name2id(gctx->encoding);
 1267|       |
 1268|      0|            if (flags < 0)
  ------------------
  |  Branch (1268:17): [True: 0, False: 0]
  ------------------
 1269|      0|                goto err;
 1270|      0|            EC_GROUP_set_asn1_flag(gctx->gen_group, flags);
 1271|      0|        }
 1272|      0|        if (gctx->pt_format != NULL) {
  ------------------
  |  Branch (1272:13): [True: 0, False: 0]
  ------------------
 1273|      0|            int format = ossl_ec_pt_format_name2id(gctx->pt_format);
 1274|       |
 1275|      0|            if (format < 0)
  ------------------
  |  Branch (1275:17): [True: 0, False: 0]
  ------------------
 1276|      0|                goto err;
 1277|      0|            EC_GROUP_set_point_conversion_form(gctx->gen_group, format);
 1278|      0|        }
 1279|      0|    }
 1280|       |#ifdef FIPS_MODULE
 1281|       |    if (!ossl_fips_ind_ec_key_check(OSSL_FIPS_IND_GET(gctx),
 1282|       |            OSSL_FIPS_IND_SETTABLE0, gctx->libctx,
 1283|       |            gctx->gen_group, "EC KeyGen", 1))
 1284|       |        goto err;
 1285|       |#endif
 1286|       |
 1287|       |    /* We must always assign a group, no matter what */
 1288|    594|    ret = ec_gen_assign_group(ec, gctx->gen_group);
 1289|       |
 1290|       |    /* Whether you want it or not, you get a keypair, not just one half */
 1291|    594|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  650|    594|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|    594|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|    594|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (1291:9): [True: 594, False: 0]
  ------------------
 1292|    594|#ifndef FIPS_MODULE
 1293|    594|        if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0)
  ------------------
  |  Branch (1293:13): [True: 0, False: 594]
  |  Branch (1293:40): [True: 0, False: 0]
  ------------------
 1294|      0|            ret = ret && ossl_ec_generate_key_dhkem(ec, gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  Branch (1294:19): [True: 0, False: 0]
  |  Branch (1294:26): [True: 0, False: 0]
  ------------------
 1295|    594|        else
 1296|    594|#endif
 1297|    594|            ret = ret && EC_KEY_generate_key(ec);
  ------------------
  |  Branch (1297:19): [True: 594, False: 0]
  |  Branch (1297:26): [True: 594, False: 0]
  ------------------
 1298|    594|    }
 1299|       |
 1300|    594|    if (gctx->ecdh_mode != -1)
  ------------------
  |  Branch (1300:9): [True: 594, False: 0]
  ------------------
 1301|    594|        ret = ret && ossl_ec_set_ecdh_cofactor_mode(ec, gctx->ecdh_mode);
  ------------------
  |  Branch (1301:15): [True: 594, False: 0]
  |  Branch (1301:22): [True: 594, False: 0]
  ------------------
 1302|       |
 1303|    594|    if (gctx->group_check != NULL)
  ------------------
  |  Branch (1303:9): [True: 0, False: 594]
  ------------------
 1304|      0|        ret = ret && ossl_ec_set_check_group_type_from_name(ec, gctx->group_check);
  ------------------
  |  Branch (1304:15): [True: 0, False: 0]
  |  Branch (1304:22): [True: 0, False: 0]
  ------------------
 1305|       |#ifdef FIPS_MODULE
 1306|       |    if (ret > 0
 1307|       |        && !ossl_fips_self_testing()
 1308|       |        && EC_KEY_get0_public_key(ec) != NULL
 1309|       |        && EC_KEY_get0_private_key(ec) != NULL
 1310|       |        && EC_KEY_get0_group(ec) != NULL) {
 1311|       |        BN_CTX *bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(ec));
 1312|       |
 1313|       |        ret = bnctx != NULL && ossl_ec_key_pairwise_check(ec, bnctx);
 1314|       |        BN_CTX_free(bnctx);
 1315|       |        if (ret <= 0)
 1316|       |            ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
 1317|       |    }
 1318|       |#endif /* FIPS_MODULE */
 1319|       |
 1320|    594|    if (ret)
  ------------------
  |  Branch (1320:9): [True: 594, False: 0]
  ------------------
 1321|    594|        return ec;
 1322|      0|err:
 1323|       |    /* Something went wrong, throw the key away */
 1324|      0|    EC_KEY_free(ec);
 1325|       |    return NULL;
 1326|    594|}
ec_kmgmt.c:ec_gen_set_group_from_params:
 1116|    594|{
 1117|    594|    int ret = 0;
 1118|    594|    OSSL_PARAM_BLD *bld;
 1119|    594|    OSSL_PARAM *params = NULL;
 1120|    594|    EC_GROUP *group = NULL;
 1121|       |
 1122|    594|    bld = OSSL_PARAM_BLD_new();
 1123|    594|    if (bld == NULL)
  ------------------
  |  Branch (1123:9): [True: 0, False: 594]
  ------------------
 1124|      0|        return 0;
 1125|       |
 1126|    594|    if (gctx->encoding != NULL
  ------------------
  |  Branch (1126:9): [True: 0, False: 594]
  ------------------
 1127|      0|        && !OSSL_PARAM_BLD_push_utf8_string(bld, OSSL_PKEY_PARAM_EC_ENCODING,
  ------------------
  |  |  387|      0|# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
  ------------------
  |  Branch (1127:12): [True: 0, False: 0]
  ------------------
 1128|      0|            gctx->encoding, 0))
 1129|      0|        goto err;
 1130|       |
 1131|    594|    if (gctx->pt_format != NULL
  ------------------
  |  Branch (1131:9): [True: 0, False: 594]
  ------------------
 1132|      0|        && !OSSL_PARAM_BLD_push_utf8_string(bld,
  ------------------
  |  Branch (1132:12): [True: 0, False: 0]
  ------------------
 1133|      0|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT,
  ------------------
  |  |  394|      0|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
 1134|      0|            gctx->pt_format, 0))
 1135|      0|        goto err;
 1136|       |
 1137|    594|    if (gctx->group_name != NULL) {
  ------------------
  |  Branch (1137:9): [True: 594, False: 0]
  ------------------
 1138|    594|        if (!OSSL_PARAM_BLD_push_utf8_string(bld, OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  420|    594|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  |  Branch (1138:13): [True: 0, False: 594]
  ------------------
 1139|    594|                gctx->group_name, 0))
 1140|      0|            goto err;
 1141|       |        /* Ignore any other parameters if there is a group name */
 1142|    594|        goto build;
 1143|    594|    } else if (gctx->field_type != NULL) {
  ------------------
  |  Branch (1143:16): [True: 0, False: 0]
  ------------------
 1144|      0|        if (!OSSL_PARAM_BLD_push_utf8_string(bld, OSSL_PKEY_PARAM_EC_FIELD_TYPE,
  ------------------
  |  |  388|      0|# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
  ------------------
  |  Branch (1144:13): [True: 0, False: 0]
  ------------------
 1145|      0|                gctx->field_type, 0))
 1146|      0|            goto err;
 1147|      0|    } else {
 1148|      0|        goto err;
 1149|      0|    }
 1150|      0|    if (gctx->p == NULL
  ------------------
  |  Branch (1150:9): [True: 0, False: 0]
  ------------------
 1151|      0|        || gctx->a == NULL
  ------------------
  |  Branch (1151:12): [True: 0, False: 0]
  ------------------
 1152|      0|        || gctx->b == NULL
  ------------------
  |  Branch (1152:12): [True: 0, False: 0]
  ------------------
 1153|      0|        || gctx->order == NULL
  ------------------
  |  Branch (1153:12): [True: 0, False: 0]
  ------------------
 1154|      0|        || !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_P, gctx->p)
  ------------------
  |  |  393|      0|# define OSSL_PKEY_PARAM_EC_P "p"
  ------------------
  |  Branch (1154:12): [True: 0, False: 0]
  ------------------
 1155|      0|        || !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_A, gctx->a)
  ------------------
  |  |  377|      0|# define OSSL_PKEY_PARAM_EC_A "a"
  ------------------
  |  Branch (1155:12): [True: 0, False: 0]
  ------------------
 1156|      0|        || !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_B, gctx->b)
  ------------------
  |  |  378|      0|# define OSSL_PKEY_PARAM_EC_B "b"
  ------------------
  |  Branch (1156:12): [True: 0, False: 0]
  ------------------
 1157|      0|        || !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_ORDER, gctx->order))
  ------------------
  |  |  392|      0|# define OSSL_PKEY_PARAM_EC_ORDER "order"
  ------------------
  |  Branch (1157:12): [True: 0, False: 0]
  ------------------
 1158|      0|        goto err;
 1159|       |
 1160|      0|    if (gctx->cofactor != NULL
  ------------------
  |  Branch (1160:9): [True: 0, False: 0]
  ------------------
 1161|      0|        && !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_COFACTOR,
  ------------------
  |  |  385|      0|# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
  ------------------
  |  Branch (1161:12): [True: 0, False: 0]
  ------------------
 1162|      0|            gctx->cofactor))
 1163|      0|        goto err;
 1164|       |
 1165|      0|    if (gctx->seed != NULL
  ------------------
  |  Branch (1165:9): [True: 0, False: 0]
  ------------------
 1166|      0|        && !OSSL_PARAM_BLD_push_octet_string(bld, OSSL_PKEY_PARAM_EC_SEED,
  ------------------
  |  |  397|      0|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
  |  Branch (1166:12): [True: 0, False: 0]
  ------------------
 1167|      0|            gctx->seed, gctx->seed_len))
 1168|      0|        goto err;
 1169|       |
 1170|      0|    if (gctx->gen == NULL
  ------------------
  |  Branch (1170:9): [True: 0, False: 0]
  ------------------
 1171|      0|        || !OSSL_PARAM_BLD_push_octet_string(bld, OSSL_PKEY_PARAM_EC_GENERATOR,
  ------------------
  |  |  389|      0|# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
  ------------------
  |  Branch (1171:12): [True: 0, False: 0]
  ------------------
 1172|      0|            gctx->gen, gctx->gen_len))
 1173|      0|        goto err;
 1174|    594|build:
 1175|    594|    params = OSSL_PARAM_BLD_to_param(bld);
 1176|    594|    if (params == NULL)
  ------------------
  |  Branch (1176:9): [True: 0, False: 594]
  ------------------
 1177|      0|        goto err;
 1178|    594|    group = EC_GROUP_new_from_params(params, gctx->libctx, NULL);
 1179|    594|    if (group == NULL)
  ------------------
  |  Branch (1179:9): [True: 0, False: 594]
  ------------------
 1180|      0|        goto err;
 1181|       |
 1182|    594|    EC_GROUP_free(gctx->gen_group);
 1183|    594|    gctx->gen_group = group;
 1184|       |
 1185|    594|    ret = 1;
 1186|    594|err:
 1187|    594|    OSSL_PARAM_free(params);
 1188|    594|    OSSL_PARAM_BLD_free(bld);
 1189|    594|    return ret;
 1190|    594|}
ec_kmgmt.c:ec_gen_assign_group:
 1239|    594|{
 1240|    594|    if (group == NULL) {
  ------------------
  |  Branch (1240:9): [True: 0, False: 594]
  ------------------
 1241|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_PARAMETERS_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1242|      0|        return 0;
 1243|      0|    }
 1244|    594|    return EC_KEY_set_group(ec, group) > 0;
 1245|    594|}
ec_kmgmt.c:ec_gen_cleanup:
 1381|    594|{
 1382|    594|    struct ec_gen_ctx *gctx = genctx;
 1383|       |
 1384|    594|    if (gctx == NULL)
  ------------------
  |  Branch (1384:9): [True: 0, False: 594]
  ------------------
 1385|      0|        return;
 1386|       |
 1387|    594|    OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  |  129|    594|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1388|    594|    EC_GROUP_free(gctx->gen_group);
 1389|    594|    BN_free(gctx->p);
 1390|    594|    BN_free(gctx->a);
 1391|    594|    BN_free(gctx->b);
 1392|    594|    BN_free(gctx->order);
 1393|    594|    BN_free(gctx->cofactor);
 1394|    594|    OPENSSL_free(gctx->group_name);
  ------------------
  |  |  131|    594|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1395|    594|    OPENSSL_free(gctx->field_type);
  ------------------
  |  |  131|    594|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1396|    594|    OPENSSL_free(gctx->pt_format);
  ------------------
  |  |  131|    594|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1397|    594|    OPENSSL_free(gctx->encoding);
  ------------------
  |  |  131|    594|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1398|    594|    OPENSSL_free(gctx->seed);
  ------------------
  |  |  131|    594|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1399|    594|    OPENSSL_free(gctx->gen);
  ------------------
  |  |  131|    594|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1400|    594|    OPENSSL_free(gctx);
  ------------------
  |  |  131|    594|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1401|    594|}
ec_kmgmt.c:ec_load:
 1423|   119k|{
 1424|   119k|    return common_load(reference, reference_sz, 0);
 1425|   119k|}
ec_kmgmt.c:common_load:
 1405|   119k|{
 1406|   119k|    EC_KEY *ec = NULL;
 1407|       |
 1408|   119k|    if (ossl_prov_is_running() && reference_sz == sizeof(ec)) {
  ------------------
  |  Branch (1408:9): [True: 119k, False: 0]
  |  Branch (1408:35): [True: 119k, False: 0]
  ------------------
 1409|       |        /* The contents of the reference is the address to our object */
 1410|   119k|        ec = *(EC_KEY **)reference;
 1411|       |
 1412|   119k|        if (!common_check_sm2(ec, sm2_wanted))
  ------------------
  |  Branch (1412:13): [True: 0, False: 119k]
  ------------------
 1413|      0|            return NULL;
 1414|       |
 1415|       |        /* We grabbed, so we detach it */
 1416|   119k|        *(EC_KEY **)reference = NULL;
 1417|   119k|        return ec;
 1418|   119k|    }
 1419|      0|    return NULL;
 1420|   119k|}
ec_kmgmt.c:common_check_sm2:
  372|   119k|{
  373|   119k|    const EC_GROUP *ecg = NULL;
  374|       |
  375|       |    /*
  376|       |     * sm2_wanted: import the keys or domparams only on SM2 Curve
  377|       |     * !sm2_wanted: import the keys or domparams only not on SM2 Curve
  378|       |     */
  379|   119k|    if ((ecg = EC_KEY_get0_group(ec)) == NULL
  ------------------
  |  Branch (379:9): [True: 0, False: 119k]
  ------------------
  380|   119k|        || (sm2_wanted ^ (EC_GROUP_get_curve_name(ecg) == NID_sm2)))
  ------------------
  |  | 1255|   119k|#define NID_sm2         1172
  ------------------
  |  Branch (380:12): [True: 0, False: 119k]
  ------------------
  381|      0|        return 0;
  382|   119k|    return 1;
  383|   119k|}
ec_kmgmt.c:ec_freedata:
  296|   120k|{
  297|   120k|    EC_KEY_free(keydata);
  298|   120k|}
ec_kmgmt.c:ec_get_params:
  753|   121k|{
  754|   121k|    return common_get_params(key, params, 0);
  755|   121k|}
ec_kmgmt.c:common_get_params:
  620|   121k|{
  621|   121k|    int ret = 0;
  622|   121k|    EC_KEY *eck = key;
  623|   121k|    const EC_GROUP *ecg = NULL;
  624|   121k|    OSSL_PARAM *p;
  625|   121k|    unsigned char *pub_key = NULL, *genbuf = NULL;
  626|   121k|    OSSL_LIB_CTX *libctx;
  627|   121k|    const char *propq;
  628|   121k|    BN_CTX *bnctx = NULL;
  629|       |
  630|   121k|    ecg = EC_KEY_get0_group(eck);
  631|   121k|    if (ecg == NULL) {
  ------------------
  |  Branch (631:9): [True: 0, False: 121k]
  ------------------
  632|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_PARAMETERS_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  633|      0|        return 0;
  634|      0|    }
  635|       |
  636|   121k|    libctx = ossl_ec_key_get_libctx(eck);
  637|   121k|    propq = ossl_ec_key_get0_propq(eck);
  638|       |
  639|   121k|    bnctx = BN_CTX_new_ex(libctx);
  640|   121k|    if (bnctx == NULL)
  ------------------
  |  Branch (640:9): [True: 0, False: 121k]
  ------------------
  641|      0|        return 0;
  642|   121k|    BN_CTX_start(bnctx);
  643|       |
  644|   121k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  424|   121k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (644:9): [True: 120k, False: 1.18k]
  ------------------
  645|   120k|        && !OSSL_PARAM_set_int(p, ECDSA_size(eck)))
  ------------------
  |  Branch (645:12): [True: 0, False: 120k]
  ------------------
  646|      0|        goto err;
  647|   121k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  366|   121k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (647:9): [True: 120k, False: 1.18k]
  ------------------
  648|   120k|        && !OSSL_PARAM_set_int(p, EC_GROUP_order_bits(ecg)))
  ------------------
  |  Branch (648:12): [True: 0, False: 120k]
  ------------------
  649|      0|        goto err;
  650|   121k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL) {
  ------------------
  |  |  495|   121k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (650:9): [True: 120k, False: 1.18k]
  ------------------
  651|   120k|        int ecbits, sec_bits;
  652|       |
  653|   120k|        ecbits = EC_GROUP_order_bits(ecg);
  654|       |
  655|       |        /*
  656|       |         * The following estimates are based on the values published
  657|       |         * in Table 2 of "NIST Special Publication 800-57 Part 1 Revision 4"
  658|       |         * at http://dx.doi.org/10.6028/NIST.SP.800-57pt1r4 .
  659|       |         *
  660|       |         * Note that the above reference explicitly categorizes algorithms in a
  661|       |         * discrete set of values {80, 112, 128, 192, 256}, and that it is
  662|       |         * relevant only for NIST approved Elliptic Curves, while OpenSSL
  663|       |         * applies the same logic also to other curves.
  664|       |         *
  665|       |         * Classifications produced by other standardazing bodies might differ,
  666|       |         * so the results provided for "bits of security" by this provider are
  667|       |         * to be considered merely indicative, and it is the users'
  668|       |         * responsibility to compare these values against the normative
  669|       |         * references that may be relevant for their intent and purposes.
  670|       |         */
  671|   120k|        if (ecbits >= 512)
  ------------------
  |  Branch (671:13): [True: 197, False: 119k]
  ------------------
  672|    197|            sec_bits = 256;
  673|   119k|        else if (ecbits >= 384)
  ------------------
  |  Branch (673:18): [True: 107k, False: 12.1k]
  ------------------
  674|   107k|            sec_bits = 192;
  675|  12.1k|        else if (ecbits >= 256)
  ------------------
  |  Branch (675:18): [True: 12.1k, False: 0]
  ------------------
  676|  12.1k|            sec_bits = 128;
  677|      0|        else if (ecbits >= 224)
  ------------------
  |  Branch (677:18): [True: 0, False: 0]
  ------------------
  678|      0|            sec_bits = 112;
  679|      0|        else if (ecbits >= 160)
  ------------------
  |  Branch (679:18): [True: 0, False: 0]
  ------------------
  680|      0|            sec_bits = 80;
  681|      0|        else
  682|      0|            sec_bits = ecbits / 2;
  683|       |
  684|   120k|        if (!OSSL_PARAM_set_int(p, sec_bits))
  ------------------
  |  Branch (684:13): [True: 0, False: 120k]
  ------------------
  685|      0|            goto err;
  686|   120k|    }
  687|   121k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  496|   121k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  133|   121k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (687:9): [True: 120k, False: 1.18k]
  ------------------
  688|   120k|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (688:13): [True: 0, False: 120k]
  ------------------
  689|      0|            goto err;
  690|       |
  691|   121k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (691:9): [True: 0, False: 121k]
  ------------------
  692|   121k|             OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS))
  ------------------
  |  |  386|   121k|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
  693|   121k|        != NULL) {
  694|      0|        int explicitparams = EC_KEY_decoded_from_explicit_params(eck);
  695|       |
  696|      0|        if (explicitparams < 0
  ------------------
  |  Branch (696:13): [True: 0, False: 0]
  ------------------
  697|      0|            || !OSSL_PARAM_set_int(p, explicitparams))
  ------------------
  |  Branch (697:16): [True: 0, False: 0]
  ------------------
  698|      0|            goto err;
  699|      0|    }
  700|       |
  701|   121k|    if (!sm2) {
  ------------------
  |  Branch (701:9): [True: 121k, False: 0]
  ------------------
  702|   121k|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  370|   121k|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (702:13): [True: 0, False: 121k]
  ------------------
  703|      0|            && !OSSL_PARAM_set_utf8_string(p, EC_DEFAULT_MD))
  ------------------
  |  |   77|      0|#define EC_DEFAULT_MD "SHA256"
  ------------------
  |  Branch (703:16): [True: 0, False: 0]
  ------------------
  704|      0|            goto err;
  705|   121k|    } else {
  706|      0|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  370|      0|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (706:13): [True: 0, False: 0]
  ------------------
  707|      0|            && !OSSL_PARAM_set_utf8_string(p, SM2_DEFAULT_MD))
  ------------------
  |  |   80|      0|#define SM2_DEFAULT_MD "SM3"
  ------------------
  |  Branch (707:16): [True: 0, False: 0]
  ------------------
  708|      0|            goto err;
  709|      0|    }
  710|       |
  711|       |    /* SM2 doesn't support this PARAM */
  712|   121k|    if (!sm2) {
  ------------------
  |  Branch (712:9): [True: 121k, False: 0]
  ------------------
  713|   121k|        p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_USE_COFACTOR_ECDH);
  ------------------
  |  |  498|   121k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  499|   121k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  714|   121k|        if (p != NULL) {
  ------------------
  |  Branch (714:13): [True: 0, False: 121k]
  ------------------
  715|      0|            int ecdh_cofactor_mode = 0;
  716|       |
  717|      0|            ecdh_cofactor_mode = (EC_KEY_get_flags(eck) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
  ------------------
  |  |  955|      0|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  |  Branch (717:34): [True: 0, False: 0]
  ------------------
  718|       |
  719|      0|            if (!OSSL_PARAM_set_int(p, ecdh_cofactor_mode))
  ------------------
  |  Branch (719:17): [True: 0, False: 0]
  ------------------
  720|      0|                goto err;
  721|      0|        }
  722|   121k|    }
  723|   121k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (723:9): [True: 1.18k, False: 120k]
  ------------------
  724|   121k|             OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY))
  ------------------
  |  |  398|   121k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
  725|   121k|        != NULL) {
  726|  1.18k|        const EC_POINT *ecp = EC_KEY_get0_public_key(key);
  727|       |
  728|  1.18k|        if (ecp == NULL) {
  ------------------
  |  Branch (728:13): [True: 0, False: 1.18k]
  ------------------
  729|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_NOT_A_PUBLIC_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  730|      0|            goto err;
  731|      0|        }
  732|  1.18k|        p->return_size = EC_POINT_point2oct(ecg, ecp,
  733|  1.18k|            POINT_CONVERSION_UNCOMPRESSED,
  734|  1.18k|            p->data, p->data_size, bnctx);
  735|  1.18k|        if (p->return_size == 0)
  ------------------
  |  Branch (735:13): [True: 0, False: 1.18k]
  ------------------
  736|      0|            goto err;
  737|  1.18k|    }
  738|       |
  739|   121k|    ret = ec_get_ecm_params(ecg, params)
  ------------------
  |  Branch (739:11): [True: 121k, False: 0]
  ------------------
  740|   121k|        && ossl_ec_group_todata(ecg, NULL, params, libctx, propq, bnctx,
  ------------------
  |  Branch (740:12): [True: 121k, False: 0]
  ------------------
  741|   121k|            &genbuf)
  742|   121k|        && key_to_params(eck, NULL, params, 1, &pub_key)
  ------------------
  |  Branch (742:12): [True: 121k, False: 0]
  ------------------
  743|   121k|        && otherparams_to_params(eck, NULL, params);
  ------------------
  |  Branch (743:12): [True: 121k, False: 0]
  ------------------
  744|   121k|err:
  745|   121k|    OPENSSL_free(genbuf);
  ------------------
  |  |  131|   121k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  746|   121k|    OPENSSL_free(pub_key);
  ------------------
  |  |  131|   121k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  747|   121k|    BN_CTX_end(bnctx);
  748|   121k|    BN_CTX_free(bnctx);
  749|   121k|    return ret;
  750|   121k|}
ec_kmgmt.c:ec_get_ecm_params:
  569|   121k|{
  570|       |#ifdef OPENSSL_NO_EC2M
  571|       |    return 1;
  572|       |#else
  573|   121k|    int ret = 0, m;
  574|   121k|    unsigned int k1 = 0, k2 = 0, k3 = 0;
  575|   121k|    int basis_nid;
  576|   121k|    const char *basis_name = NULL;
  577|   121k|    int fid = EC_GROUP_get_field_type(group);
  578|       |
  579|   121k|    if (fid != NID_X9_62_characteristic_two_field)
  ------------------
  |  |  156|   121k|#define NID_X9_62_characteristic_two_field              407
  ------------------
  |  Branch (579:9): [True: 121k, False: 0]
  ------------------
  580|   121k|        return 1;
  581|       |
  582|      0|    basis_nid = EC_GROUP_get_basis_type(group);
  583|      0|    if (basis_nid == NID_X9_62_tpBasis)
  ------------------
  |  |  168|      0|#define NID_X9_62_tpBasis               682
  ------------------
  |  Branch (583:9): [True: 0, False: 0]
  ------------------
  584|      0|        basis_name = SN_X9_62_tpBasis;
  ------------------
  |  |  167|      0|#define SN_X9_62_tpBasis                "tpBasis"
  ------------------
  585|      0|    else if (basis_nid == NID_X9_62_ppBasis)
  ------------------
  |  |  172|      0|#define NID_X9_62_ppBasis               683
  ------------------
  |  Branch (585:14): [True: 0, False: 0]
  ------------------
  586|      0|        basis_name = SN_X9_62_ppBasis;
  ------------------
  |  |  171|      0|#define SN_X9_62_ppBasis                "ppBasis"
  ------------------
  587|      0|    else
  588|      0|        goto err;
  589|       |
  590|      0|    m = EC_GROUP_get_degree(group);
  591|      0|    if (!ossl_param_build_set_int(NULL, params, OSSL_PKEY_PARAM_EC_CHAR2_M, m)
  ------------------
  |  |  379|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_M "m"
  ------------------
  |  Branch (591:9): [True: 0, False: 0]
  ------------------
  592|      0|        || !ossl_param_build_set_utf8_string(NULL, params,
  ------------------
  |  Branch (592:12): [True: 0, False: 0]
  ------------------
  593|      0|            OSSL_PKEY_PARAM_EC_CHAR2_TYPE,
  ------------------
  |  |  384|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_TYPE "basis-type"
  ------------------
  594|      0|            basis_name))
  595|      0|        goto err;
  596|       |
  597|      0|    if (basis_nid == NID_X9_62_tpBasis) {
  ------------------
  |  |  168|      0|#define NID_X9_62_tpBasis               682
  ------------------
  |  Branch (597:9): [True: 0, False: 0]
  ------------------
  598|      0|        if (!EC_GROUP_get_trinomial_basis(group, &k1)
  ------------------
  |  Branch (598:13): [True: 0, False: 0]
  ------------------
  599|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (599:16): [True: 0, False: 0]
  ------------------
  600|      0|                OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS,
  ------------------
  |  |  383|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS "tp"
  ------------------
  601|      0|                (int)k1))
  602|      0|            goto err;
  603|      0|    } else {
  604|      0|        if (!EC_GROUP_get_pentanomial_basis(group, &k1, &k2, &k3)
  ------------------
  |  Branch (604:13): [True: 0, False: 0]
  ------------------
  605|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (605:16): [True: 0, False: 0]
  ------------------
  606|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K1, (int)k1)
  ------------------
  |  |  380|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K1 "k1"
  ------------------
  607|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (607:16): [True: 0, False: 0]
  ------------------
  608|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K2, (int)k2)
  ------------------
  |  |  381|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K2 "k2"
  ------------------
  609|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (609:16): [True: 0, False: 0]
  ------------------
  610|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K3, (int)k3))
  ------------------
  |  |  382|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K3 "k3"
  ------------------
  611|      0|            goto err;
  612|      0|    }
  613|      0|    ret = 1;
  614|      0|err:
  615|      0|    return ret;
  616|      0|#endif /* OPENSSL_NO_EC2M */
  617|      0|}
ec_kmgmt.c:key_to_params:
  116|   121k|{
  117|   121k|    BIGNUM *x = NULL, *y = NULL;
  118|   121k|    const BIGNUM *priv_key = NULL;
  119|   121k|    const EC_POINT *pub_point = NULL;
  120|   121k|    const EC_GROUP *ecg = NULL;
  121|   121k|    size_t pub_key_len = 0;
  122|   121k|    int ret = 0;
  123|   121k|    BN_CTX *bnctx = NULL;
  124|       |
  125|   121k|    if (eckey == NULL
  ------------------
  |  Branch (125:9): [True: 0, False: 121k]
  ------------------
  126|   121k|        || (ecg = EC_KEY_get0_group(eckey)) == NULL)
  ------------------
  |  Branch (126:12): [True: 0, False: 121k]
  ------------------
  127|      0|        return 0;
  128|       |
  129|   121k|    priv_key = EC_KEY_get0_private_key(eckey);
  130|   121k|    pub_point = EC_KEY_get0_public_key(eckey);
  131|       |
  132|   121k|    if (pub_point != NULL) {
  ------------------
  |  Branch (132:9): [True: 121k, False: 0]
  ------------------
  133|   121k|        OSSL_PARAM *p = NULL, *px = NULL, *py = NULL;
  134|       |        /*
  135|       |         * EC_POINT_point2buf() can generate random numbers in some
  136|       |         * implementations so we need to ensure we use the correct libctx.
  137|       |         */
  138|   121k|        bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey));
  139|   121k|        if (bnctx == NULL)
  ------------------
  |  Branch (139:13): [True: 0, False: 121k]
  ------------------
  140|      0|            goto err;
  141|       |
  142|       |        /* If we are doing a get then check first before decoding the point */
  143|   121k|        if (tmpl == NULL) {
  ------------------
  |  Branch (143:13): [True: 121k, False: 0]
  ------------------
  144|   121k|            p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_PUB_KEY);
  ------------------
  |  |  441|   121k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  145|   121k|            px = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_X);
  ------------------
  |  |  395|   121k|# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
  ------------------
  146|   121k|            py = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_Y);
  ------------------
  |  |  396|   121k|# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
  ------------------
  147|   121k|        }
  148|       |
  149|   121k|        if (p != NULL || tmpl != NULL) {
  ------------------
  |  Branch (149:13): [True: 0, False: 121k]
  |  Branch (149:26): [True: 0, False: 121k]
  ------------------
  150|       |            /* convert pub_point to a octet string according to the SECG standard */
  151|      0|            point_conversion_form_t format = EC_KEY_get_conv_form(eckey);
  152|       |
  153|      0|            if ((pub_key_len = EC_POINT_point2buf(ecg, pub_point,
  ------------------
  |  Branch (153:17): [True: 0, False: 0]
  ------------------
  154|      0|                     format,
  155|      0|                     pub_key, bnctx))
  156|      0|                    == 0
  157|      0|                || !ossl_param_build_set_octet_string(tmpl, p,
  ------------------
  |  Branch (157:20): [True: 0, False: 0]
  ------------------
  158|      0|                    OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  441|      0|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  159|      0|                    *pub_key, pub_key_len))
  160|      0|                goto err;
  161|      0|        }
  162|   121k|        if (px != NULL || py != NULL) {
  ------------------
  |  Branch (162:13): [True: 0, False: 121k]
  |  Branch (162:27): [True: 0, False: 121k]
  ------------------
  163|      0|            if (px != NULL) {
  ------------------
  |  Branch (163:17): [True: 0, False: 0]
  ------------------
  164|      0|                x = BN_CTX_get(bnctx);
  165|      0|                if (x == NULL)
  ------------------
  |  Branch (165:21): [True: 0, False: 0]
  ------------------
  166|      0|                    goto err;
  167|      0|            }
  168|      0|            if (py != NULL) {
  ------------------
  |  Branch (168:17): [True: 0, False: 0]
  ------------------
  169|      0|                y = BN_CTX_get(bnctx);
  170|      0|                if (y == NULL)
  ------------------
  |  Branch (170:21): [True: 0, False: 0]
  ------------------
  171|      0|                    goto err;
  172|      0|            }
  173|       |
  174|      0|            if (!EC_POINT_get_affine_coordinates(ecg, pub_point, x, y, bnctx))
  ------------------
  |  Branch (174:17): [True: 0, False: 0]
  ------------------
  175|      0|                goto err;
  176|      0|            if (px != NULL
  ------------------
  |  Branch (176:17): [True: 0, False: 0]
  ------------------
  177|      0|                && !ossl_param_build_set_bn(tmpl, px,
  ------------------
  |  Branch (177:20): [True: 0, False: 0]
  ------------------
  178|      0|                    OSSL_PKEY_PARAM_EC_PUB_X, x))
  ------------------
  |  |  395|      0|# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
  ------------------
  179|      0|                goto err;
  180|      0|            if (py != NULL
  ------------------
  |  Branch (180:17): [True: 0, False: 0]
  ------------------
  181|      0|                && !ossl_param_build_set_bn(tmpl, py,
  ------------------
  |  Branch (181:20): [True: 0, False: 0]
  ------------------
  182|      0|                    OSSL_PKEY_PARAM_EC_PUB_Y, y))
  ------------------
  |  |  396|      0|# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
  ------------------
  183|      0|                goto err;
  184|      0|        }
  185|   121k|    }
  186|       |
  187|   121k|    if (priv_key != NULL && include_private) {
  ------------------
  |  Branch (187:9): [True: 1.78k, False: 119k]
  |  Branch (187:29): [True: 1.78k, False: 0]
  ------------------
  188|  1.78k|        size_t sz;
  189|  1.78k|        int ecbits;
  190|       |
  191|       |        /*
  192|       |         * Key import/export should never leak the bit length of the secret
  193|       |         * scalar in the key.
  194|       |         *
  195|       |         * For this reason, on export we use padded BIGNUMs with fixed length.
  196|       |         *
  197|       |         * When importing we also should make sure that, even if short lived,
  198|       |         * the newly created BIGNUM is marked with the BN_FLG_CONSTTIME flag as
  199|       |         * soon as possible, so that any processing of this BIGNUM might opt for
  200|       |         * constant time implementations in the backend.
  201|       |         *
  202|       |         * Setting the BN_FLG_CONSTTIME flag alone is never enough, we also have
  203|       |         * to preallocate the BIGNUM internal buffer to a fixed public size big
  204|       |         * enough that operations performed during the processing never trigger
  205|       |         * a realloc which would leak the size of the scalar through memory
  206|       |         * accesses.
  207|       |         *
  208|       |         * Fixed Length
  209|       |         * ------------
  210|       |         *
  211|       |         * The order of the large prime subgroup of the curve is our choice for
  212|       |         * a fixed public size, as that is generally the upper bound for
  213|       |         * generating a private key in EC cryptosystems and should fit all valid
  214|       |         * secret scalars.
  215|       |         *
  216|       |         * For padding on export we just use the bit length of the order
  217|       |         * converted to bytes (rounding up).
  218|       |         *
  219|       |         * For preallocating the BIGNUM storage we look at the number of "words"
  220|       |         * required for the internal representation of the order, and we
  221|       |         * preallocate 2 extra "words" in case any of the subsequent processing
  222|       |         * might temporarily overflow the order length.
  223|       |         */
  224|  1.78k|        ecbits = EC_GROUP_order_bits(ecg);
  225|  1.78k|        if (ecbits <= 0)
  ------------------
  |  Branch (225:13): [True: 0, False: 1.78k]
  ------------------
  226|      0|            goto err;
  227|  1.78k|        sz = (ecbits + 7) / 8;
  228|       |
  229|  1.78k|        if (!ossl_param_build_set_bn_pad(tmpl, params,
  ------------------
  |  Branch (229:13): [True: 0, False: 1.78k]
  ------------------
  230|  1.78k|                OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  439|  1.78k|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  231|  1.78k|                priv_key, sz))
  232|      0|            goto err;
  233|  1.78k|    }
  234|   121k|    ret = 1;
  235|   121k|err:
  236|   121k|    BN_CTX_free(bnctx);
  237|   121k|    return ret;
  238|   121k|}
ec_kmgmt.c:otherparams_to_params:
  242|   121k|{
  243|   121k|    int ecdh_cofactor_mode = 0, group_check = 0;
  244|   121k|    const char *name = NULL;
  245|   121k|    point_conversion_form_t format;
  246|       |
  247|   121k|    if (ec == NULL)
  ------------------
  |  Branch (247:9): [True: 0, False: 121k]
  ------------------
  248|      0|        return 0;
  249|       |
  250|   121k|    format = EC_KEY_get_conv_form(ec);
  251|   121k|    name = ossl_ec_pt_format_id2name((int)format);
  252|   121k|    if (name != NULL
  ------------------
  |  Branch (252:9): [True: 121k, False: 0]
  ------------------
  253|   121k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (253:12): [True: 0, False: 121k]
  ------------------
  254|   121k|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT,
  ------------------
  |  |  394|   121k|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
  255|   121k|            name))
  256|      0|        return 0;
  257|       |
  258|   121k|    group_check = EC_KEY_get_flags(ec) & EC_FLAG_CHECK_NAMED_GROUP_MASK;
  ------------------
  |  |  959|   121k|    (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  956|   121k|#define EC_FLAG_CHECK_NAMED_GROUP 0x2000
  |  |  ------------------
  |  |                   (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  957|   121k|#define EC_FLAG_CHECK_NAMED_GROUP_NIST 0x4000
  |  |  ------------------
  ------------------
  259|   121k|    name = ossl_ec_check_group_type_id2name(group_check);
  260|   121k|    if (name != NULL
  ------------------
  |  Branch (260:9): [True: 121k, False: 0]
  ------------------
  261|   121k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (261:12): [True: 0, False: 121k]
  ------------------
  262|   121k|            OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE,
  ------------------
  |  |  390|   121k|# define OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE "group-check"
  ------------------
  263|   121k|            name))
  264|      0|        return 0;
  265|       |
  266|   121k|    if ((EC_KEY_get_enc_flags(ec) & EC_PKEY_NO_PUBKEY) != 0
  ------------------
  |  |  951|   121k|#define EC_PKEY_NO_PUBKEY 0x002
  ------------------
  |  Branch (266:9): [True: 0, False: 121k]
  ------------------
  267|      0|        && !ossl_param_build_set_int(tmpl, params,
  ------------------
  |  Branch (267:12): [True: 0, False: 0]
  ------------------
  268|      0|            OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC, 0))
  ------------------
  |  |  391|      0|# define OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC "include-public"
  ------------------
  269|      0|        return 0;
  270|       |
  271|   121k|    ecdh_cofactor_mode = (EC_KEY_get_flags(ec) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
  ------------------
  |  |  955|   121k|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  |  Branch (271:26): [True: 0, False: 121k]
  ------------------
  272|   121k|    return ossl_param_build_set_int(tmpl, params,
  273|   121k|        OSSL_PKEY_PARAM_USE_COFACTOR_ECDH,
  ------------------
  |  |  498|   121k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  499|   121k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  274|   121k|        ecdh_cofactor_mode);
  275|   121k|}

ecx_kmgmt.c:x25519_get_params:
  803|  5.63k|{
  804|  5.63k|    return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   33|  5.63k|#define X25519_BITS 253
  ------------------
                  return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   34|  5.63k|#define X25519_SECURITY_BITS 128
  ------------------
  805|  5.63k|        X25519_KEYLEN);
  ------------------
  |  |   26|  5.63k|#define X25519_KEYLEN 32
  ------------------
  806|  5.63k|}
ecx_kmgmt.c:ecx_get_params:
  766|  5.63k|{
  767|  5.63k|    ECX_KEY *ecx = key;
  768|  5.63k|    struct ecx_ed_common_get_params_st p;
  769|       |
  770|  5.63k|    if (key == NULL || !ecx_get_params_decoder(params, &p))
  ------------------
  |  Branch (770:9): [True: 0, False: 5.63k]
  |  Branch (770:24): [True: 0, False: 5.63k]
  ------------------
  771|      0|        return 0;
  772|       |
  773|  5.63k|    if (p.encpub != NULL
  ------------------
  |  Branch (773:9): [True: 2.81k, False: 2.81k]
  ------------------
  774|  2.81k|        && !OSSL_PARAM_set_octet_string(p.encpub, ecx->pubkey, ecx->keylen))
  ------------------
  |  Branch (774:12): [True: 0, False: 2.81k]
  ------------------
  775|      0|        return 0;
  776|       |#ifdef FIPS_MODULE
  777|       |    {
  778|       |        /* Currently X25519 and X448 are not approved */
  779|       |        int approved = 0;
  780|       |
  781|       |        if (p.ind != NULL && !OSSL_PARAM_set_int(p.ind, approved))
  782|       |            return 0;
  783|       |    }
  784|       |#endif
  785|       |
  786|  5.63k|    return ecx_ed_common_get_params(key, &p, bits, secbits, size);
  787|  5.63k|}
ecx_kmgmt.c:ecx_get_params_decoder:
  406|  5.63k|{
  407|  5.63k|    const char *s;
  408|       |
  409|  5.63k|    memset(r, 0, sizeof(*r));
  410|  5.63k|    if (p != NULL)
  ------------------
  |  Branch (410:9): [True: 5.63k, False: 0]
  ------------------
  411|  19.7k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (411:16): [True: 14.0k, False: 5.63k]
  ------------------
  412|  14.0k|            switch(s[0]) {
  413|      0|            default:
  ------------------
  |  Branch (413:13): [True: 0, False: 14.0k]
  ------------------
  414|      0|                break;
  415|  2.81k|            case 'b':
  ------------------
  |  Branch (415:13): [True: 2.81k, False: 11.2k]
  ------------------
  416|  2.81k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  2.81k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.81k, False: 0]
  |  |  ------------------
  ------------------
  417|       |                    /* OSSL_PKEY_PARAM_BITS */
  418|  2.81k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  2.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  419|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  420|      0|                                       "param %s is repeated", s);
  421|      0|                        return 0;
  422|      0|                    }
  423|  2.81k|                    r->bits = (OSSL_PARAM *)p;
  424|  2.81k|                }
  425|  2.81k|                break;
  426|  2.81k|            case 'e':
  ------------------
  |  Branch (426:13): [True: 2.81k, False: 11.2k]
  ------------------
  427|  2.81k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  2.81k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.81k, False: 0]
  |  |  ------------------
  ------------------
  428|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  429|  2.81k|                    if (ossl_unlikely(r->encpub != NULL)) {
  ------------------
  |  |   23|  2.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  430|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  431|      0|                                       "param %s is repeated", s);
  432|      0|                        return 0;
  433|      0|                    }
  434|  2.81k|                    r->encpub = (OSSL_PARAM *)p;
  435|  2.81k|                }
  436|  2.81k|                break;
  437|  2.81k|            case 'f':
  ------------------
  |  Branch (437:13): [True: 0, False: 14.0k]
  ------------------
  438|       |# if defined(FIPS_MODULE)
  439|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
  440|       |                    /* OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR */
  441|       |                    if (ossl_unlikely(r->ind != NULL)) {
  442|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  443|       |                                       "param %s is repeated", s);
  444|       |                        return 0;
  445|       |                    }
  446|       |                    r->ind = (OSSL_PARAM *)p;
  447|       |                }
  448|       |# endif
  449|      0|                break;
  450|  2.81k|            case 'm':
  ------------------
  |  Branch (450:13): [True: 2.81k, False: 11.2k]
  ------------------
  451|  2.81k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  2.81k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.81k, False: 0]
  |  |  ------------------
  ------------------
  452|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  453|  2.81k|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|  2.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  454|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  455|      0|                                       "param %s is repeated", s);
  456|      0|                        return 0;
  457|      0|                    }
  458|  2.81k|                    r->size = (OSSL_PARAM *)p;
  459|  2.81k|                }
  460|  2.81k|                break;
  461|  2.81k|            case 'p':
  ------------------
  |  Branch (461:13): [True: 0, False: 14.0k]
  ------------------
  462|      0|                switch(s[1]) {
  463|      0|                default:
  ------------------
  |  Branch (463:17): [True: 0, False: 0]
  ------------------
  464|      0|                    break;
  465|      0|                case 'r':
  ------------------
  |  Branch (465:17): [True: 0, False: 0]
  ------------------
  466|      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]
  |  |  ------------------
  ------------------
  467|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  468|      0|                        if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  469|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  470|      0|                                           "param %s is repeated", s);
  471|      0|                            return 0;
  472|      0|                        }
  473|      0|                        r->priv = (OSSL_PARAM *)p;
  474|      0|                    }
  475|      0|                    break;
  476|      0|                case 'u':
  ------------------
  |  Branch (476:17): [True: 0, False: 0]
  ------------------
  477|      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]
  |  |  ------------------
  ------------------
  478|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  479|      0|                        if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  480|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  481|      0|                                           "param %s is repeated", s);
  482|      0|                            return 0;
  483|      0|                        }
  484|      0|                        r->pub = (OSSL_PARAM *)p;
  485|      0|                    }
  486|      0|                }
  487|      0|                break;
  488|  5.63k|            case 's':
  ------------------
  |  Branch (488:13): [True: 5.63k, False: 8.45k]
  ------------------
  489|  5.63k|                switch(s[1]) {
  490|      0|                default:
  ------------------
  |  Branch (490:17): [True: 0, False: 5.63k]
  ------------------
  491|      0|                    break;
  492|  5.63k|                case 'e':
  ------------------
  |  Branch (492:17): [True: 5.63k, False: 0]
  ------------------
  493|  5.63k|                    switch(s[2]) {
  494|      0|                    default:
  ------------------
  |  Branch (494:21): [True: 0, False: 5.63k]
  ------------------
  495|      0|                        break;
  496|  5.63k|                    case 'c':
  ------------------
  |  Branch (496:21): [True: 5.63k, False: 0]
  ------------------
  497|  5.63k|                        switch(s[3]) {
  498|      0|                        default:
  ------------------
  |  Branch (498:25): [True: 0, False: 5.63k]
  ------------------
  499|      0|                            break;
  500|  5.63k|                        case 'u':
  ------------------
  |  Branch (500:25): [True: 5.63k, False: 0]
  ------------------
  501|  5.63k|                            switch(s[4]) {
  502|      0|                            default:
  ------------------
  |  Branch (502:29): [True: 0, False: 5.63k]
  ------------------
  503|      0|                                break;
  504|  5.63k|                            case 'r':
  ------------------
  |  Branch (504:29): [True: 5.63k, False: 0]
  ------------------
  505|  5.63k|                                switch(s[5]) {
  506|      0|                                default:
  ------------------
  |  Branch (506:33): [True: 0, False: 5.63k]
  ------------------
  507|      0|                                    break;
  508|  5.63k|                                case 'i':
  ------------------
  |  Branch (508:33): [True: 5.63k, False: 0]
  ------------------
  509|  5.63k|                                    switch(s[6]) {
  510|      0|                                    default:
  ------------------
  |  Branch (510:37): [True: 0, False: 5.63k]
  ------------------
  511|      0|                                        break;
  512|  5.63k|                                    case 't':
  ------------------
  |  Branch (512:37): [True: 5.63k, False: 0]
  ------------------
  513|  5.63k|                                        switch(s[7]) {
  514|      0|                                        default:
  ------------------
  |  Branch (514:41): [True: 0, False: 5.63k]
  ------------------
  515|      0|                                            break;
  516|  5.63k|                                        case 'y':
  ------------------
  |  Branch (516:41): [True: 5.63k, False: 0]
  ------------------
  517|  5.63k|                                            switch(s[8]) {
  518|      0|                                            default:
  ------------------
  |  Branch (518:45): [True: 0, False: 5.63k]
  ------------------
  519|      0|                                                break;
  520|  5.63k|                                            case '-':
  ------------------
  |  Branch (520:45): [True: 5.63k, False: 0]
  ------------------
  521|  5.63k|                                                switch(s[9]) {
  522|      0|                                                default:
  ------------------
  |  Branch (522:49): [True: 0, False: 5.63k]
  ------------------
  523|      0|                                                    break;
  524|  2.81k|                                                case 'b':
  ------------------
  |  Branch (524:49): [True: 2.81k, False: 2.81k]
  ------------------
  525|  2.81k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  2.81k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.81k, False: 0]
  |  |  ------------------
  ------------------
  526|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  527|  2.81k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  2.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  528|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  529|      0|                                                                           "param %s is repeated", s);
  530|      0|                                                            return 0;
  531|      0|                                                        }
  532|  2.81k|                                                        r->secbits = (OSSL_PARAM *)p;
  533|  2.81k|                                                    }
  534|  2.81k|                                                    break;
  535|  2.81k|                                                case 'c':
  ------------------
  |  Branch (535:49): [True: 2.81k, False: 2.81k]
  ------------------
  536|  2.81k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  2.81k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.81k, False: 0]
  |  |  ------------------
  ------------------
  537|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  538|  2.81k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  2.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  539|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  540|      0|                                                                           "param %s is repeated", s);
  541|      0|                                                            return 0;
  542|      0|                                                        }
  543|  2.81k|                                                        r->seccat = (OSSL_PARAM *)p;
  544|  2.81k|                                                    }
  545|  5.63k|                                                }
  546|  5.63k|                                            }
  547|  5.63k|                                        }
  548|  5.63k|                                    }
  549|  5.63k|                                }
  550|  5.63k|                            }
  551|  5.63k|                        }
  552|  5.63k|                    }
  553|  5.63k|                }
  554|  14.0k|            }
  555|  5.63k|    return 1;
  556|  5.63k|}
ecx_kmgmt.c:ecx_ed_common_get_params:
  749|  5.63k|{
  750|  5.63k|    ECX_KEY *ecx = key;
  751|       |
  752|  5.63k|    if (p->bits != NULL && !OSSL_PARAM_set_int(p->bits, bits))
  ------------------
  |  Branch (752:9): [True: 2.81k, False: 2.81k]
  |  Branch (752:28): [True: 0, False: 2.81k]
  ------------------
  753|      0|        return 0;
  754|  5.63k|    if (p->secbits != NULL && !OSSL_PARAM_set_int(p->secbits, secbits))
  ------------------
  |  Branch (754:9): [True: 2.81k, False: 2.81k]
  |  Branch (754:31): [True: 0, False: 2.81k]
  ------------------
  755|      0|        return 0;
  756|  5.63k|    if (p->size != NULL && !OSSL_PARAM_set_int(p->size, size))
  ------------------
  |  Branch (756:9): [True: 2.81k, False: 2.81k]
  |  Branch (756:28): [True: 0, False: 2.81k]
  ------------------
  757|      0|        return 0;
  758|  5.63k|    if (p->seccat != NULL && !OSSL_PARAM_set_int(p->seccat, 0))
  ------------------
  |  Branch (758:9): [True: 2.81k, False: 2.81k]
  |  Branch (758:30): [True: 0, False: 2.81k]
  ------------------
  759|      0|        return 0;
  760|  5.63k|    return key_to_params(ecx, NULL, p->pub, p->priv, 1);
  761|  5.63k|}
ecx_kmgmt.c:key_to_params:
  294|  7.04k|{
  295|  7.04k|    if (key == NULL)
  ------------------
  |  Branch (295:9): [True: 0, False: 7.04k]
  ------------------
  296|      0|        return 0;
  297|       |
  298|  7.04k|    if (!ossl_param_build_set_octet_string(tmpl, pub,
  ------------------
  |  Branch (298:9): [True: 0, False: 7.04k]
  ------------------
  299|  7.04k|            OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  441|  7.04k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  300|  7.04k|            key->pubkey, key->keylen))
  301|      0|        return 0;
  302|       |
  303|  7.04k|    if (include_private
  ------------------
  |  Branch (303:9): [True: 5.63k, False: 1.40k]
  ------------------
  304|  5.63k|        && key->privkey != NULL
  ------------------
  |  Branch (304:12): [True: 5.63k, False: 0]
  ------------------
  305|  5.63k|        && !ossl_param_build_set_octet_string(tmpl, priv,
  ------------------
  |  Branch (305:12): [True: 0, False: 5.63k]
  ------------------
  306|  5.63k|            OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  439|  5.63k|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  307|  5.63k|            key->privkey, key->keylen))
  308|      0|        return 0;
  309|       |
  310|  7.04k|    return 1;
  311|  7.04k|}
ecx_kmgmt.c:ecx_export:
  315|  1.40k|{
  316|  1.40k|    ECX_KEY *key = keydata;
  317|  1.40k|    OSSL_PARAM_BLD *tmpl;
  318|  1.40k|    OSSL_PARAM *params = NULL;
  319|  1.40k|    int ret = 0;
  320|       |
  321|  1.40k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (321:9): [True: 0, False: 1.40k]
  |  Branch (321:36): [True: 0, False: 1.40k]
  ------------------
  322|      0|        return 0;
  323|       |
  324|  1.40k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  1.40k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.40k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.40k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (324:9): [True: 0, False: 1.40k]
  ------------------
  325|      0|        return 0;
  326|       |
  327|  1.40k|    tmpl = OSSL_PARAM_BLD_new();
  328|  1.40k|    if (tmpl == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 1.40k]
  ------------------
  329|      0|        return 0;
  330|       |
  331|  1.40k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  650|  1.40k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.40k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.40k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (331:9): [True: 1.40k, False: 0]
  ------------------
  332|  1.40k|        int include_private = ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0);
  ------------------
  |  |  640|  1.40k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  333|       |
  334|  1.40k|        if (!key_to_params(key, tmpl, NULL, NULL, include_private))
  ------------------
  |  Branch (334:13): [True: 0, False: 1.40k]
  ------------------
  335|      0|            goto err;
  336|  1.40k|    }
  337|       |
  338|  1.40k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  339|  1.40k|    if (params == NULL)
  ------------------
  |  Branch (339:9): [True: 0, False: 1.40k]
  ------------------
  340|      0|        goto err;
  341|       |
  342|  1.40k|    ret = param_cb(params, cbarg);
  343|  1.40k|    OSSL_PARAM_free(params);
  344|  1.40k|err:
  345|  1.40k|    OSSL_PARAM_BLD_free(tmpl);
  346|  1.40k|    return ret;
  347|  1.40k|}
ecx_kmgmt.c:x25519_gen_init:
 1021|  2.81k|{
 1022|  2.81k|    return ecx_gen_init(provctx, selection, params, ECX_KEY_TYPE_X25519, "X25519");
 1023|  2.81k|}
ecx_kmgmt.c:ecx_gen_init:
  990|  2.81k|{
  991|  2.81k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|  2.81k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  992|  2.81k|    struct ecx_gen_ctx *gctx = NULL;
  993|       |
  994|  2.81k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (994:9): [True: 0, False: 2.81k]
  ------------------
  995|      0|        return NULL;
  996|       |
  997|  2.81k|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  108|  2.81k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (997:9): [True: 2.81k, False: 0]
  ------------------
  998|  2.81k|        gctx->libctx = libctx;
  999|  2.81k|        gctx->type = type;
 1000|  2.81k|        gctx->selection = selection;
 1001|       |#ifdef FIPS_MODULE
 1002|       |        /* X25519/X448 are not FIPS approved, (ED25519/ED448 are approved) */
 1003|       |        if (algdesc != NULL
 1004|       |            && !ossl_FIPS_IND_callback(libctx, algdesc, "KeyGen Init")) {
 1005|       |            OPENSSL_free(gctx);
 1006|       |            return NULL;
 1007|       |        }
 1008|       |#endif
 1009|  2.81k|    } else {
 1010|      0|        return NULL;
 1011|      0|    }
 1012|  2.81k|    if (!ecx_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (1012:9): [True: 0, False: 2.81k]
  ------------------
 1013|      0|        ecx_gen_cleanup(gctx);
 1014|       |        gctx = NULL;
 1015|      0|    }
 1016|  2.81k|    return gctx;
 1017|  2.81k|}
ecx_kmgmt.c:ecx_gen_set_params:
 1114|  5.63k|{
 1115|  5.63k|    struct ecx_gen_ctx *gctx = genctx;
 1116|  5.63k|    struct ecx_gen_set_params_st p;
 1117|       |
 1118|  5.63k|    if (gctx == NULL || !ecx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (1118:9): [True: 0, False: 5.63k]
  |  Branch (1118:25): [True: 0, False: 5.63k]
  ------------------
 1119|      0|        return 0;
 1120|       |
 1121|  5.63k|    if (p.group != NULL) {
  ------------------
  |  Branch (1121:9): [True: 1.40k, False: 4.22k]
  ------------------
 1122|  1.40k|        const char *groupname = NULL;
 1123|       |
 1124|       |        /*
 1125|       |         * We optionally allow setting a group name - but each algorithm only
 1126|       |         * support one such name, so all we do is verify that it is the one we
 1127|       |         * expected.
 1128|       |         */
 1129|  1.40k|        switch (gctx->type) {
 1130|  1.40k|        case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (1130:9): [True: 1.40k, False: 1]
  ------------------
 1131|  1.40k|            groupname = "x25519";
 1132|  1.40k|            break;
 1133|      1|        case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (1133:9): [True: 1, False: 1.40k]
  ------------------
 1134|      1|            groupname = "x448";
 1135|      1|            break;
 1136|      0|        default:
  ------------------
  |  Branch (1136:9): [True: 0, False: 1.40k]
  ------------------
 1137|       |            /* We only support this for key exchange at the moment */
 1138|      0|            break;
 1139|  1.40k|        }
 1140|  1.40k|        if (p.group->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|  2.81k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1140:13): [True: 0, False: 1.40k]
  ------------------
 1141|  1.40k|            || groupname == NULL
  ------------------
  |  Branch (1141:16): [True: 0, False: 1.40k]
  ------------------
 1142|  1.40k|            || OPENSSL_strcasecmp(p.group->data, groupname) != 0) {
  ------------------
  |  Branch (1142:16): [True: 0, False: 1.40k]
  ------------------
 1143|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1144|      0|            return 0;
 1145|      0|        }
 1146|  1.40k|    }
 1147|       |
 1148|  5.63k|    if (p.kdfpropq != NULL) {
  ------------------
  |  Branch (1148:9): [True: 0, False: 5.63k]
  ------------------
 1149|      0|        if (p.kdfpropq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1149:13): [True: 0, False: 0]
  ------------------
 1150|      0|            return 0;
 1151|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1152|      0|        gctx->propq = OPENSSL_strdup(p.kdfpropq->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1153|      0|        if (gctx->propq == NULL)
  ------------------
  |  Branch (1153:13): [True: 0, False: 0]
  ------------------
 1154|      0|            return 0;
 1155|      0|    }
 1156|       |
 1157|  5.63k|    if (p.ikm != NULL) {
  ------------------
  |  Branch (1157:9): [True: 0, False: 5.63k]
  ------------------
 1158|      0|        if (p.ikm->data_size != 0 && p.ikm->data != NULL) {
  ------------------
  |  Branch (1158:13): [True: 0, False: 0]
  |  Branch (1158:38): [True: 0, False: 0]
  ------------------
 1159|      0|            OPENSSL_free(gctx->dhkem_ikm);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1160|      0|            gctx->dhkem_ikm = NULL;
 1161|      0|            if (!OSSL_PARAM_get_octet_string(p.ikm, (void **)&gctx->dhkem_ikm, 0,
  ------------------
  |  Branch (1161:17): [True: 0, False: 0]
  ------------------
 1162|      0|                    &gctx->dhkem_ikmlen))
 1163|      0|                return 0;
 1164|      0|        }
 1165|      0|    }
 1166|       |
 1167|  5.63k|    return 1;
 1168|  5.63k|}
ecx_kmgmt.c:ecx_gen_set_params_decoder:
 1065|  5.63k|{
 1066|  5.63k|    const char *s;
 1067|       |
 1068|  5.63k|    memset(r, 0, sizeof(*r));
 1069|  5.63k|    if (p != NULL)
  ------------------
  |  Branch (1069:9): [True: 2.81k, False: 2.81k]
  ------------------
 1070|  4.22k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (1070:16): [True: 1.40k, False: 2.81k]
  ------------------
 1071|  1.40k|            switch(s[0]) {
 1072|      0|            default:
  ------------------
  |  Branch (1072:13): [True: 0, False: 1.40k]
  ------------------
 1073|      0|                break;
 1074|      0|            case 'd':
  ------------------
  |  Branch (1074:13): [True: 0, False: 1.40k]
  ------------------
 1075|      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]
  |  |  ------------------
  ------------------
 1076|       |                    /* OSSL_PKEY_PARAM_DHKEM_IKM */
 1077|      0|                    if (ossl_unlikely(r->ikm != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1078|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1079|      0|                                       "param %s is repeated", s);
 1080|      0|                        return 0;
 1081|      0|                    }
 1082|      0|                    r->ikm = (OSSL_PARAM *)p;
 1083|      0|                }
 1084|      0|                break;
 1085|  1.40k|            case 'g':
  ------------------
  |  Branch (1085:13): [True: 1.40k, False: 0]
  ------------------
 1086|  1.40k|                if (ossl_likely(strcmp("roup", s + 1) == 0)) {
  ------------------
  |  |   22|  1.40k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.40k, False: 0]
  |  |  ------------------
  ------------------
 1087|       |                    /* OSSL_PKEY_PARAM_GROUP_NAME */
 1088|  1.40k|                    if (ossl_unlikely(r->group != NULL)) {
  ------------------
  |  |   23|  1.40k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.40k]
  |  |  ------------------
  ------------------
 1089|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1090|      0|                                       "param %s is repeated", s);
 1091|      0|                        return 0;
 1092|      0|                    }
 1093|  1.40k|                    r->group = (OSSL_PARAM *)p;
 1094|  1.40k|                }
 1095|  1.40k|                break;
 1096|  1.40k|            case 'p':
  ------------------
  |  Branch (1096:13): [True: 0, False: 1.40k]
  ------------------
 1097|      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]
  |  |  ------------------
  ------------------
 1098|       |                    /* OSSL_KDF_PARAM_PROPERTIES */
 1099|      0|                    if (ossl_unlikely(r->kdfpropq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1100|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1101|      0|                                       "param %s is repeated", s);
 1102|      0|                        return 0;
 1103|      0|                    }
 1104|      0|                    r->kdfpropq = (OSSL_PARAM *)p;
 1105|      0|                }
 1106|  1.40k|            }
 1107|  5.63k|    return 1;
 1108|  5.63k|}
ecx_kmgmt.c:x25519_gen:
 1311|  2.81k|{
 1312|  2.81k|    struct ecx_gen_ctx *gctx = genctx;
 1313|       |
 1314|  2.81k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (1314:9): [True: 0, False: 2.81k]
  ------------------
 1315|      0|        return 0;
 1316|       |
 1317|       |#ifdef S390X_EC_ASM
 1318|       |    if (OPENSSL_s390xcap_P.pcc[1] & S390X_CAPBIT(S390X_SCALAR_MULTIPLY_X25519))
 1319|       |        return s390x_ecx_keygen25519(gctx);
 1320|       |#endif
 1321|  2.81k|    return ecx_gen(gctx);
 1322|  2.81k|}
ecx_kmgmt.c:ecx_gen:
 1245|  2.81k|{
 1246|  2.81k|    ECX_KEY *key;
 1247|  2.81k|    unsigned char *privkey;
 1248|       |
 1249|  2.81k|    if (gctx == NULL)
  ------------------
  |  Branch (1249:9): [True: 0, False: 2.81k]
  ------------------
 1250|      0|        return NULL;
 1251|  2.81k|    if ((key = ossl_ecx_key_new(gctx->libctx, gctx->type, 0,
  ------------------
  |  Branch (1251:9): [True: 0, False: 2.81k]
  ------------------
 1252|  2.81k|             gctx->propq))
 1253|  2.81k|        == NULL) {
 1254|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1255|      0|        return NULL;
 1256|      0|    }
 1257|       |
 1258|       |    /* If we're doing parameter generation then we just return a blank key */
 1259|  2.81k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  2.81k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  2.81k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  2.81k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (1259:9): [True: 0, False: 2.81k]
  ------------------
 1260|      0|        return key;
 1261|       |
 1262|  2.81k|    if ((privkey = ossl_ecx_key_allocate_privkey(key)) == NULL) {
  ------------------
  |  Branch (1262:9): [True: 0, False: 2.81k]
  ------------------
 1263|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1264|      0|        goto err;
 1265|      0|    }
 1266|  2.81k|#ifndef FIPS_MODULE
 1267|  2.81k|    if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0) {
  ------------------
  |  Branch (1267:9): [True: 0, False: 2.81k]
  |  Branch (1267:36): [True: 0, False: 0]
  ------------------
 1268|      0|        if (ecx_key_type_is_ed(gctx->type))
  ------------------
  |  Branch (1268:13): [True: 0, False: 0]
  ------------------
 1269|      0|            goto err;
 1270|      0|        if (!ossl_ecx_dhkem_derive_private(key, privkey,
  ------------------
  |  Branch (1270:13): [True: 0, False: 0]
  ------------------
 1271|      0|                gctx->dhkem_ikm, gctx->dhkem_ikmlen))
 1272|      0|            goto err;
 1273|      0|    } else
 1274|  2.81k|#endif
 1275|  2.81k|    {
 1276|  2.81k|        if (RAND_priv_bytes_ex(gctx->libctx, privkey, key->keylen, 0) <= 0)
  ------------------
  |  Branch (1276:13): [True: 0, False: 2.81k]
  ------------------
 1277|      0|            goto err;
 1278|  2.81k|    }
 1279|       |
 1280|  2.81k|    switch (gctx->type) {
  ------------------
  |  Branch (1280:13): [True: 2.81k, False: 0]
  ------------------
 1281|  2.81k|    case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (1281:5): [True: 2.81k, False: 1]
  ------------------
 1282|  2.81k|        privkey[0] &= 248;
 1283|  2.81k|        privkey[X25519_KEYLEN - 1] &= 127;
  ------------------
  |  |   26|  2.81k|#define X25519_KEYLEN 32
  ------------------
 1284|  2.81k|        privkey[X25519_KEYLEN - 1] |= 64;
  ------------------
  |  |   26|  2.81k|#define X25519_KEYLEN 32
  ------------------
 1285|  2.81k|        ossl_x25519_public_from_private(key->pubkey, privkey);
 1286|  2.81k|        break;
 1287|      1|    case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (1287:5): [True: 1, False: 2.81k]
  ------------------
 1288|      1|        privkey[0] &= 252;
 1289|      1|        privkey[X448_KEYLEN - 1] |= 128;
  ------------------
  |  |   27|      1|#define X448_KEYLEN 56
  ------------------
 1290|      1|        ossl_x448_public_from_private(key->pubkey, privkey);
 1291|      1|        break;
 1292|      0|    case ECX_KEY_TYPE_ED25519:
  ------------------
  |  Branch (1292:5): [True: 0, False: 2.81k]
  ------------------
 1293|      0|        if (!ossl_ed25519_public_from_private(gctx->libctx, key->pubkey, privkey,
  ------------------
  |  Branch (1293:13): [True: 0, False: 0]
  ------------------
 1294|      0|                gctx->propq))
 1295|      0|            goto err;
 1296|      0|        break;
 1297|      0|    case ECX_KEY_TYPE_ED448:
  ------------------
  |  Branch (1297:5): [True: 0, False: 2.81k]
  ------------------
 1298|      0|        if (!ossl_ed448_public_from_private(gctx->libctx, key->pubkey, privkey,
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  ------------------
 1299|      0|                gctx->propq))
 1300|      0|            goto err;
 1301|      0|        break;
 1302|  2.81k|    }
 1303|  2.81k|    key->haspubkey = 1;
 1304|  2.81k|    return key;
 1305|      0|err:
 1306|      0|    ossl_ecx_key_free(key);
 1307|       |    return NULL;
 1308|  2.81k|}
ecx_kmgmt.c:ecx_gen_cleanup:
 1406|  2.81k|{
 1407|  2.81k|    struct ecx_gen_ctx *gctx = genctx;
 1408|       |
 1409|  2.81k|    if (gctx == NULL)
  ------------------
  |  Branch (1409:9): [True: 0, False: 2.81k]
  ------------------
 1410|      0|        return;
 1411|       |
 1412|  2.81k|    OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  |  129|  2.81k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1413|  2.81k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|  2.81k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1414|  2.81k|    OPENSSL_free(gctx);
  ------------------
  |  |  131|  2.81k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1415|  2.81k|}
ecx_kmgmt.c:x448_get_params:
  809|      3|{
  810|      3|    return ecx_get_params(key, params, X448_BITS, X448_SECURITY_BITS,
  ------------------
  |  |   36|      3|#define X448_BITS 448
  ------------------
                  return ecx_get_params(key, params, X448_BITS, X448_SECURITY_BITS,
  ------------------
  |  |   37|      3|#define X448_SECURITY_BITS 224
  ------------------
  811|      3|        X448_KEYLEN);
  ------------------
  |  |   27|      3|#define X448_KEYLEN 56
  ------------------
  812|      3|}
ecx_kmgmt.c:x448_gen_init:
 1027|      1|{
 1028|      1|    return ecx_gen_init(provctx, selection, params, ECX_KEY_TYPE_X448, "X448");
 1029|      1|}
ecx_kmgmt.c:x448_gen:
 1325|      1|{
 1326|      1|    struct ecx_gen_ctx *gctx = genctx;
 1327|       |
 1328|      1|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (1328:9): [True: 0, False: 1]
  ------------------
 1329|      0|        return 0;
 1330|       |
 1331|       |#ifdef S390X_EC_ASM
 1332|       |    if (OPENSSL_s390xcap_P.pcc[1] & S390X_CAPBIT(S390X_SCALAR_MULTIPLY_X448))
 1333|       |        return s390x_ecx_keygen448(gctx);
 1334|       |#endif
 1335|      1|    return ecx_gen(gctx);
 1336|      1|}

ossl_prov_ml_kem_new:
  161|  1.47k|{
  162|  1.47k|    ML_KEM_KEY *key;
  163|       |
  164|  1.47k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (164:9): [True: 0, False: 1.47k]
  ------------------
  165|      0|        return NULL;
  166|       |    /*
  167|       |     * When decoding, if the key ends up "loaded" into the same provider, these
  168|       |     * are the correct config settings, otherwise, new values will be assigned
  169|       |     * on import into a different provider.  The "load" API does not pass along
  170|       |     * the provider context.
  171|       |     */
  172|  1.47k|    if ((key = ossl_ml_kem_key_new(PROV_LIBCTX_OF(ctx), propq, evp_type)) != NULL) {
  ------------------
  |  |   31|  1.47k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  |  Branch (172:9): [True: 1.47k, False: 0]
  ------------------
  173|  1.47k|        const char *pct_type = ossl_prov_ctx_get_param(
  174|  1.47k|            ctx, OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE, "random");
  ------------------
  |  |  432|  1.47k|# define OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE "ml-kem.import_pct_type"
  ------------------
  175|       |
  176|  1.47k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (176:13): [True: 1.47k, False: 0]
  ------------------
  177|  1.47k|                ctx, OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED, 1))
  ------------------
  |  |  436|  1.47k|# define OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED "ml-kem.retain_seed"
  ------------------
  178|  1.47k|            key->prov_flags |= ML_KEM_KEY_RETAIN_SEED;
  ------------------
  |  |  126|  1.47k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  179|      0|        else
  180|      0|            key->prov_flags &= ~ML_KEM_KEY_RETAIN_SEED;
  ------------------
  |  |  126|      0|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  181|  1.47k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (181:13): [True: 1.47k, False: 0]
  ------------------
  182|  1.47k|                ctx, OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED, 1))
  ------------------
  |  |  435|  1.47k|# define OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED "ml-kem.prefer_seed"
  ------------------
  183|  1.47k|            key->prov_flags |= ML_KEM_KEY_PREFER_SEED;
  ------------------
  |  |  125|  1.47k|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  ------------------
  184|      0|        else
  185|      0|            key->prov_flags &= ~ML_KEM_KEY_PREFER_SEED;
  ------------------
  |  |  125|      0|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  ------------------
  186|  1.47k|        if (OPENSSL_strcasecmp(pct_type, "random") == 0)
  ------------------
  |  Branch (186:13): [True: 1.47k, False: 0]
  ------------------
  187|  1.47k|            key->prov_flags |= ML_KEM_KEY_RANDOM_PCT;
  ------------------
  |  |  123|  1.47k|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  ------------------
  188|      0|        else if (OPENSSL_strcasecmp(pct_type, "fixed") == 0)
  ------------------
  |  Branch (188:18): [True: 0, False: 0]
  ------------------
  189|      0|            key->prov_flags |= ML_KEM_KEY_FIXED_PCT;
  ------------------
  |  |  124|      0|#define ML_KEM_KEY_FIXED_PCT (1 << 1)
  ------------------
  190|      0|        else
  191|      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)
  |  |  ------------------
  ------------------
  192|  1.47k|    }
  193|  1.47k|    return key;
  194|  1.47k|}
ml_kem_kmgmt.c:ml_kem_get_params:
  847|  1.60k|{
  848|  1.60k|    ML_KEM_KEY *key = vkey;
  849|  1.60k|    const ML_KEM_VINFO *v;
  850|  1.60k|    struct ml_kem_get_params_st p;
  851|       |
  852|  1.60k|    if (key == NULL || !ml_kem_get_params_decoder(params, &p))
  ------------------
  |  Branch (852:9): [True: 0, False: 1.60k]
  |  Branch (852:24): [True: 0, False: 1.60k]
  ------------------
  853|      0|        return 0;
  854|       |
  855|  1.60k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  1.60k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  856|       |
  857|  1.60k|    if (p.bits != NULL && !OSSL_PARAM_set_size_t(p.bits, v->bits))
  ------------------
  |  Branch (857:9): [True: 1.47k, False: 132]
  |  Branch (857:27): [True: 0, False: 1.47k]
  ------------------
  858|      0|        return 0;
  859|       |
  860|  1.60k|    if (p.secbits != NULL && !OSSL_PARAM_set_size_t(p.secbits, v->secbits))
  ------------------
  |  Branch (860:9): [True: 1.47k, False: 132]
  |  Branch (860:30): [True: 0, False: 1.47k]
  ------------------
  861|      0|        return 0;
  862|       |
  863|  1.60k|    if (p.maxsize != NULL && !OSSL_PARAM_set_size_t(p.maxsize, v->ctext_bytes))
  ------------------
  |  Branch (863:9): [True: 1.47k, False: 132]
  |  Branch (863:30): [True: 0, False: 1.47k]
  ------------------
  864|      0|        return 0;
  865|       |
  866|  1.60k|    if (p.seccat != NULL && !OSSL_PARAM_set_int(p.seccat, v->security_category))
  ------------------
  |  Branch (866:9): [True: 1.47k, False: 132]
  |  Branch (866:29): [True: 0, False: 1.47k]
  ------------------
  867|      0|        return 0;
  868|       |
  869|  1.60k|    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 (869:9): [True: 0, False: 1.60k]
  ------------------
  870|       |        /* Exported to EVP_PKEY_get_raw_public_key() */
  871|      0|        if (!ml_kem_get_key_param(key, p.pubkey, v->pubkey_bytes,
  ------------------
  |  Branch (871:13): [True: 0, False: 0]
  ------------------
  872|      0|                &ossl_ml_kem_encode_public_key))
  873|      0|            return 0;
  874|      0|    }
  875|       |
  876|  1.60k|    if (p.encpubkey != NULL && ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|    132|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 132, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (876:9): [True: 132, False: 1.47k]
  ------------------
  877|       |        /* Needed by EVP_PKEY_get1_encoded_public_key() */
  878|    132|        if (!ml_kem_get_key_param(key, p.encpubkey, v->pubkey_bytes,
  ------------------
  |  Branch (878:13): [True: 0, False: 132]
  ------------------
  879|    132|                &ossl_ml_kem_encode_public_key))
  880|      0|            return 0;
  881|    132|    }
  882|       |
  883|  1.60k|    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 (883:9): [True: 0, False: 1.60k]
  ------------------
  884|       |        /* Exported to EVP_PKEY_get_raw_private_key() */
  885|      0|        if (!ml_kem_get_key_param(key, p.privkey, v->prvkey_bytes,
  ------------------
  |  Branch (885:13): [True: 0, False: 0]
  ------------------
  886|      0|                &ossl_ml_kem_encode_private_key))
  887|      0|            return 0;
  888|      0|    }
  889|       |
  890|  1.60k|    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 (890:9): [True: 0, False: 1.60k]
  ------------------
  891|       |        /* Exported for import */
  892|      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 (892:13): [True: 0, False: 0]
  ------------------
  893|      0|                &ossl_ml_kem_encode_seed))
  894|      0|            return 0;
  895|      0|    }
  896|       |
  897|  1.60k|#ifndef OPENSSL_NO_CMS
  898|  1.60k|    if (p.ri_type != NULL && !OSSL_PARAM_set_int(p.ri_type, CMS_RECIPINFO_KEM))
  ------------------
  |  |  175|      0|#define CMS_RECIPINFO_KEM 5
  ------------------
  |  Branch (898:9): [True: 0, False: 1.60k]
  |  Branch (898:30): [True: 0, False: 0]
  ------------------
  899|      0|        return 0;
  900|       |
  901|  1.60k|    if (p.kemri_kdf_alg != NULL) {
  ------------------
  |  Branch (901:9): [True: 0, False: 1.60k]
  ------------------
  902|      0|        uint8_t aid_buf[OSSL_MAX_ALGORITHM_ID_SIZE];
  903|      0|        int ret;
  904|      0|        size_t aid_len = 0;
  905|      0|        WPACKET pkt;
  906|      0|        uint8_t *aid = NULL;
  907|       |
  908|      0|        ret = WPACKET_init_der(&pkt, aid_buf, sizeof(aid_buf));
  909|      0|        ret &= ossl_DER_w_begin_sequence(&pkt, -1)
  ------------------
  |  Branch (909:16): [True: 0, False: 0]
  ------------------
  910|      0|            && ossl_DER_w_precompiled(&pkt, -1, ossl_der_oid_id_alg_hkdf_with_sha256,
  ------------------
  |  Branch (910:16): [True: 0, False: 0]
  ------------------
  911|      0|                sizeof(ossl_der_oid_id_alg_hkdf_with_sha256))
  912|      0|            && ossl_DER_w_end_sequence(&pkt, -1);
  ------------------
  |  Branch (912:16): [True: 0, False: 0]
  ------------------
  913|      0|        if (ret && WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (913:13): [True: 0, False: 0]
  |  Branch (913:20): [True: 0, False: 0]
  ------------------
  914|      0|            WPACKET_get_total_written(&pkt, &aid_len);
  915|      0|            aid = WPACKET_get_curr(&pkt);
  916|      0|        }
  917|      0|        WPACKET_cleanup(&pkt);
  918|      0|        if (!ret)
  ------------------
  |  Branch (918:13): [True: 0, False: 0]
  ------------------
  919|      0|            return 0;
  920|      0|        if (aid != NULL && aid_len != 0 && !OSSL_PARAM_set_octet_string(p.kemri_kdf_alg, aid, aid_len))
  ------------------
  |  Branch (920:13): [True: 0, False: 0]
  |  Branch (920:28): [True: 0, False: 0]
  |  Branch (920:44): [True: 0, False: 0]
  ------------------
  921|      0|            return 0;
  922|      0|    }
  923|  1.60k|#endif
  924|       |
  925|  1.60k|    return 1;
  926|  1.60k|}
ml_kem_kmgmt.c:ml_kem_get_params_decoder:
  600|  1.60k|{
  601|  1.60k|    const char *s;
  602|       |
  603|  1.60k|    memset(r, 0, sizeof(*r));
  604|  1.60k|    if (p != NULL)
  ------------------
  |  Branch (604:9): [True: 1.60k, False: 0]
  ------------------
  605|  7.63k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (605:16): [True: 6.03k, False: 1.60k]
  ------------------
  606|  6.03k|            switch(s[0]) {
  607|      0|            default:
  ------------------
  |  Branch (607:13): [True: 0, False: 6.03k]
  ------------------
  608|      0|                break;
  609|  1.47k|            case 'b':
  ------------------
  |  Branch (609:13): [True: 1.47k, False: 4.55k]
  ------------------
  610|  1.47k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  1.47k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.47k, False: 0]
  |  |  ------------------
  ------------------
  611|       |                    /* OSSL_PKEY_PARAM_BITS */
  612|  1.47k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  1.47k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.47k]
  |  |  ------------------
  ------------------
  613|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  614|      0|                                       "param %s is repeated", s);
  615|      0|                        return 0;
  616|      0|                    }
  617|  1.47k|                    r->bits = (OSSL_PARAM *)p;
  618|  1.47k|                }
  619|  1.47k|                break;
  620|  1.47k|            case 'e':
  ------------------
  |  Branch (620:13): [True: 132, False: 5.90k]
  ------------------
  621|    132|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|    132|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 132, False: 0]
  |  |  ------------------
  ------------------
  622|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  623|    132|                    if (ossl_unlikely(r->encpubkey != NULL)) {
  ------------------
  |  |   23|    132|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 132]
  |  |  ------------------
  ------------------
  624|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  625|      0|                                       "param %s is repeated", s);
  626|      0|                        return 0;
  627|      0|                    }
  628|    132|                    r->encpubkey = (OSSL_PARAM *)p;
  629|    132|                }
  630|    132|                break;
  631|    132|            case 'k':
  ------------------
  |  Branch (631:13): [True: 0, False: 6.03k]
  ------------------
  632|      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]
  |  |  ------------------
  ------------------
  633|       |                    /* OSSL_PKEY_PARAM_CMS_KEMRI_KDF_ALGORITHM */
  634|      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]
  |  |  ------------------
  ------------------
  635|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  636|      0|                                       "param %s is repeated", s);
  637|      0|                        return 0;
  638|      0|                    }
  639|      0|                    r->kemri_kdf_alg = (OSSL_PARAM *)p;
  640|      0|                }
  641|      0|                break;
  642|  1.47k|            case 'm':
  ------------------
  |  Branch (642:13): [True: 1.47k, False: 4.55k]
  ------------------
  643|  1.47k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  1.47k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.47k, False: 0]
  |  |  ------------------
  ------------------
  644|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  645|  1.47k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  1.47k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.47k]
  |  |  ------------------
  ------------------
  646|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  647|      0|                                       "param %s is repeated", s);
  648|      0|                        return 0;
  649|      0|                    }
  650|  1.47k|                    r->maxsize = (OSSL_PARAM *)p;
  651|  1.47k|                }
  652|  1.47k|                break;
  653|  1.47k|            case 'p':
  ------------------
  |  Branch (653:13): [True: 0, False: 6.03k]
  ------------------
  654|      0|                switch(s[1]) {
  655|      0|                default:
  ------------------
  |  Branch (655:17): [True: 0, False: 0]
  ------------------
  656|      0|                    break;
  657|      0|                case 'r':
  ------------------
  |  Branch (657:17): [True: 0, False: 0]
  ------------------
  658|      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]
  |  |  ------------------
  ------------------
  659|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  660|      0|                        if (ossl_unlikely(r->privkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  661|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  662|      0|                                           "param %s is repeated", s);
  663|      0|                            return 0;
  664|      0|                        }
  665|      0|                        r->privkey = (OSSL_PARAM *)p;
  666|      0|                    }
  667|      0|                    break;
  668|      0|                case 'u':
  ------------------
  |  Branch (668:17): [True: 0, False: 0]
  ------------------
  669|      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]
  |  |  ------------------
  ------------------
  670|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  671|      0|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  672|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  673|      0|                                           "param %s is repeated", s);
  674|      0|                            return 0;
  675|      0|                        }
  676|      0|                        r->pubkey = (OSSL_PARAM *)p;
  677|      0|                    }
  678|      0|                }
  679|      0|                break;
  680|      0|            case 'r':
  ------------------
  |  Branch (680:13): [True: 0, False: 6.03k]
  ------------------
  681|      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]
  |  |  ------------------
  ------------------
  682|       |                    /* OSSL_PKEY_PARAM_CMS_RI_TYPE */
  683|      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]
  |  |  ------------------
  ------------------
  684|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  685|      0|                                       "param %s is repeated", s);
  686|      0|                        return 0;
  687|      0|                    }
  688|      0|                    r->ri_type = (OSSL_PARAM *)p;
  689|      0|                }
  690|      0|                break;
  691|  2.95k|            case 's':
  ------------------
  |  Branch (691:13): [True: 2.95k, False: 3.08k]
  ------------------
  692|  2.95k|                switch(s[1]) {
  693|      0|                default:
  ------------------
  |  Branch (693:17): [True: 0, False: 2.95k]
  ------------------
  694|      0|                    break;
  695|  2.95k|                case 'e':
  ------------------
  |  Branch (695:17): [True: 2.95k, False: 0]
  ------------------
  696|  2.95k|                    switch(s[2]) {
  697|      0|                    default:
  ------------------
  |  Branch (697:21): [True: 0, False: 2.95k]
  ------------------
  698|      0|                        break;
  699|  2.95k|                    case 'c':
  ------------------
  |  Branch (699:21): [True: 2.95k, False: 0]
  ------------------
  700|  2.95k|                        switch(s[3]) {
  701|      0|                        default:
  ------------------
  |  Branch (701:25): [True: 0, False: 2.95k]
  ------------------
  702|      0|                            break;
  703|  2.95k|                        case 'u':
  ------------------
  |  Branch (703:25): [True: 2.95k, False: 0]
  ------------------
  704|  2.95k|                            switch(s[4]) {
  705|      0|                            default:
  ------------------
  |  Branch (705:29): [True: 0, False: 2.95k]
  ------------------
  706|      0|                                break;
  707|  2.95k|                            case 'r':
  ------------------
  |  Branch (707:29): [True: 2.95k, False: 0]
  ------------------
  708|  2.95k|                                switch(s[5]) {
  709|      0|                                default:
  ------------------
  |  Branch (709:33): [True: 0, False: 2.95k]
  ------------------
  710|      0|                                    break;
  711|  2.95k|                                case 'i':
  ------------------
  |  Branch (711:33): [True: 2.95k, False: 0]
  ------------------
  712|  2.95k|                                    switch(s[6]) {
  713|      0|                                    default:
  ------------------
  |  Branch (713:37): [True: 0, False: 2.95k]
  ------------------
  714|      0|                                        break;
  715|  2.95k|                                    case 't':
  ------------------
  |  Branch (715:37): [True: 2.95k, False: 0]
  ------------------
  716|  2.95k|                                        switch(s[7]) {
  717|      0|                                        default:
  ------------------
  |  Branch (717:41): [True: 0, False: 2.95k]
  ------------------
  718|      0|                                            break;
  719|  2.95k|                                        case 'y':
  ------------------
  |  Branch (719:41): [True: 2.95k, False: 0]
  ------------------
  720|  2.95k|                                            switch(s[8]) {
  721|      0|                                            default:
  ------------------
  |  Branch (721:45): [True: 0, False: 2.95k]
  ------------------
  722|      0|                                                break;
  723|  2.95k|                                            case '-':
  ------------------
  |  Branch (723:45): [True: 2.95k, False: 0]
  ------------------
  724|  2.95k|                                                switch(s[9]) {
  725|      0|                                                default:
  ------------------
  |  Branch (725:49): [True: 0, False: 2.95k]
  ------------------
  726|      0|                                                    break;
  727|  1.47k|                                                case 'b':
  ------------------
  |  Branch (727:49): [True: 1.47k, False: 1.47k]
  ------------------
  728|  1.47k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  1.47k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.47k, False: 0]
  |  |  ------------------
  ------------------
  729|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  730|  1.47k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  1.47k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.47k]
  |  |  ------------------
  ------------------
  731|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  732|      0|                                                                           "param %s is repeated", s);
  733|      0|                                                            return 0;
  734|      0|                                                        }
  735|  1.47k|                                                        r->secbits = (OSSL_PARAM *)p;
  736|  1.47k|                                                    }
  737|  1.47k|                                                    break;
  738|  1.47k|                                                case 'c':
  ------------------
  |  Branch (738:49): [True: 1.47k, False: 1.47k]
  ------------------
  739|  1.47k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  1.47k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.47k, False: 0]
  |  |  ------------------
  ------------------
  740|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  741|  1.47k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  1.47k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.47k]
  |  |  ------------------
  ------------------
  742|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  743|      0|                                                                           "param %s is repeated", s);
  744|      0|                                                            return 0;
  745|      0|                                                        }
  746|  1.47k|                                                        r->seccat = (OSSL_PARAM *)p;
  747|  1.47k|                                                    }
  748|  2.95k|                                                }
  749|  2.95k|                                            }
  750|  2.95k|                                        }
  751|  2.95k|                                    }
  752|  2.95k|                                }
  753|  2.95k|                            }
  754|  2.95k|                        }
  755|  2.95k|                        break;
  756|  2.95k|                    case 'e':
  ------------------
  |  Branch (756:21): [True: 0, False: 2.95k]
  ------------------
  757|      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]
  |  |  ------------------
  ------------------
  758|       |                            /* OSSL_PKEY_PARAM_ML_KEM_SEED */
  759|      0|                            if (ossl_unlikely(r->seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  760|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  761|      0|                                               "param %s is repeated", s);
  762|      0|                                return 0;
  763|      0|                            }
  764|      0|                            r->seed = (OSSL_PARAM *)p;
  765|      0|                        }
  766|  2.95k|                    }
  767|  2.95k|                }
  768|  6.03k|            }
  769|  1.60k|    return 1;
  770|  1.60k|}
ml_kem_kmgmt.c:ml_kem_get_key_param:
  832|    132|{
  833|    132|    if (p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|    132|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (833:9): [True: 0, False: 132]
  ------------------
  834|      0|        return 0;
  835|    132|    p->return_size = bytes;
  836|    132|    if (p->data != NULL)
  ------------------
  |  Branch (836:9): [True: 66, False: 66]
  ------------------
  837|     66|        if (p->data_size < p->return_size
  ------------------
  |  Branch (837:13): [True: 0, False: 66]
  ------------------
  838|     66|            || !(*get_f)(p->data, p->return_size, key))
  ------------------
  |  Branch (838:16): [True: 0, False: 66]
  ------------------
  839|      0|            return 0;
  840|    132|    return 1;
  841|    132|}
ml_kem_kmgmt.c:ml_kem_512_gen_init:
 1206|     25|    {                                                                                     \
 1207|     25|        return ml_kem_gen_init(provctx, selection, params,                                \
 1208|     25|            EVP_PKEY_ML_KEM_##bits);                                                      \
  ------------------
  |  |   93|     25|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  ------------------
  |  |  |  | 6636|     25|#define NID_ML_KEM_512          1454
  |  |  ------------------
  ------------------
 1209|     25|    }                                                                                     \
ml_kem_kmgmt.c:ml_kem_gen_init:
 1096|  1.47k|{
 1097|  1.47k|    PROV_ML_KEM_GEN_CTX *gctx = NULL;
 1098|       |
 1099|       |    /*
 1100|       |     * We can only generate private keys, check that the selection is
 1101|       |     * appropriate.
 1102|       |     */
 1103|  1.47k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (1103:9): [True: 0, False: 1.47k]
  ------------------
 1104|  1.47k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (1104:12): [True: 0, False: 1.47k]
  ------------------
 1105|  1.47k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  108|  1.47k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1105:12): [True: 0, False: 1.47k]
  ------------------
 1106|      0|        return NULL;
 1107|       |
 1108|  1.47k|    gctx->selection = selection;
 1109|  1.47k|    gctx->evp_type = evp_type;
 1110|  1.47k|    gctx->provctx = provctx;
 1111|  1.47k|    if (ml_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (1111:9): [True: 1.47k, False: 0]
  ------------------
 1112|  1.47k|        return gctx;
 1113|       |
 1114|      0|    ml_kem_gen_cleanup(gctx);
 1115|       |    return NULL;
 1116|  1.47k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params:
 1062|  2.95k|{
 1063|  2.95k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
 1064|  2.95k|    struct ml_kem_gen_set_params_st p;
 1065|       |
 1066|  2.95k|    if (gctx == NULL || !ml_kem_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (1066:9): [True: 0, False: 2.95k]
  |  Branch (1066:25): [True: 0, False: 2.95k]
  ------------------
 1067|      0|        return 0;
 1068|       |
 1069|  2.95k|    if (p.propq != NULL) {
  ------------------
  |  Branch (1069:9): [True: 0, False: 2.95k]
  ------------------
 1070|      0|        if (p.propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1070:13): [True: 0, False: 0]
  ------------------
 1071|      0|            return 0;
 1072|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1073|      0|        if ((gctx->propq = OPENSSL_strdup(p.propq->data)) == NULL)
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1073:13): [True: 0, False: 0]
  ------------------
 1074|      0|            return 0;
 1075|      0|    }
 1076|       |
 1077|  2.95k|    if (p.seed != NULL) {
  ------------------
  |  Branch (1077:9): [True: 0, False: 2.95k]
  ------------------
 1078|      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, ... */
  |  |  ------------------
  ------------------
 1079|       |
 1080|      0|        gctx->seed = gctx->seedbuf;
 1081|      0|        if (OSSL_PARAM_get_octet_string(p.seed, (void **)&gctx->seed, len, &len)
  ------------------
  |  Branch (1081:13): [True: 0, False: 0]
  ------------------
 1082|      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 (1082:16): [True: 0, False: 0]
  ------------------
 1083|      0|            return 1;
 1084|       |
 1085|       |        /* Possibly, but less likely wrong data type */
 1086|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_SEED_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1087|      0|        gctx->seed = NULL;
 1088|      0|        return 0;
 1089|      0|    }
 1090|       |
 1091|  2.95k|    return 1;
 1092|  2.95k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params_decoder:
 1024|  2.95k|{
 1025|  2.95k|    const char *s;
 1026|       |
 1027|  2.95k|    memset(r, 0, sizeof(*r));
 1028|  2.95k|    if (p != NULL)
  ------------------
  |  Branch (1028:9): [True: 1.47k, False: 1.47k]
  ------------------
 1029|  1.54k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (1029:16): [True: 66, False: 1.47k]
  ------------------
 1030|     66|            switch(s[0]) {
 1031|     66|            default:
  ------------------
  |  Branch (1031:13): [True: 66, False: 0]
  ------------------
 1032|     66|                break;
 1033|     66|            case 'p':
  ------------------
  |  Branch (1033:13): [True: 0, False: 66]
  ------------------
 1034|      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]
  |  |  ------------------
  ------------------
 1035|       |                    /* OSSL_PKEY_PARAM_PROPERTIES */
 1036|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1037|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1038|      0|                                       "param %s is repeated", s);
 1039|      0|                        return 0;
 1040|      0|                    }
 1041|      0|                    r->propq = (OSSL_PARAM *)p;
 1042|      0|                }
 1043|      0|                break;
 1044|      0|            case 's':
  ------------------
  |  Branch (1044:13): [True: 0, False: 66]
  ------------------
 1045|      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]
  |  |  ------------------
  ------------------
 1046|       |                    /* OSSL_PKEY_PARAM_ML_DSA_SEED */
 1047|      0|                    if (ossl_unlikely(r->seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1048|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1049|      0|                                       "param %s is repeated", s);
 1050|      0|                        return 0;
 1051|      0|                    }
 1052|      0|                    r->seed = (OSSL_PARAM *)p;
 1053|      0|                }
 1054|     66|            }
 1055|  2.95k|    return 1;
 1056|  2.95k|}
ml_kem_kmgmt.c:ml_kem_gen:
 1125|  1.47k|{
 1126|  1.47k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
 1127|  1.47k|    ML_KEM_KEY *key;
 1128|  1.47k|    uint8_t *nopub = NULL;
 1129|  1.47k|    uint8_t *seed;
 1130|  1.47k|    int genok = 0;
 1131|       |
 1132|  1.47k|    if (gctx == NULL
  ------------------
  |  Branch (1132:9): [True: 0, False: 1.47k]
  ------------------
 1133|  1.47k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  650|  1.47k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.47k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.47k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  641|  1.47k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (1133:12): [True: 0, False: 1.47k]
  ------------------
 1134|      0|        return NULL;
 1135|  1.47k|    seed = gctx->seed;
 1136|  1.47k|    key = ossl_prov_ml_kem_new(gctx->provctx, gctx->propq, gctx->evp_type);
 1137|  1.47k|    if (key == NULL)
  ------------------
  |  Branch (1137:9): [True: 0, False: 1.47k]
  ------------------
 1138|      0|        return NULL;
 1139|       |
 1140|  1.47k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  1.47k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.47k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.47k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (1140:9): [True: 0, False: 1.47k]
  ------------------
 1141|      0|        return key;
 1142|       |
 1143|  1.47k|    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 (1143:9): [True: 0, False: 1.47k]
  |  Branch (1143:25): [True: 0, False: 0]
  ------------------
 1144|      0|        return NULL;
 1145|  1.47k|    genok = ossl_ml_kem_genkey(nopub, 0, key);
 1146|       |
 1147|       |    /* Erase the single-use seed */
 1148|  1.47k|    if (seed != NULL)
  ------------------
  |  Branch (1148:9): [True: 0, False: 1.47k]
  ------------------
 1149|      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, ... */
  |  |  ------------------
  ------------------
 1150|  1.47k|    gctx->seed = NULL;
 1151|       |
 1152|  1.47k|    if (genok) {
  ------------------
  |  Branch (1152:9): [True: 1.47k, False: 0]
  ------------------
 1153|       |#ifdef FIPS_MODULE
 1154|       |        if (!ml_kem_pairwise_test(key, ML_KEM_KEY_FIXED_PCT)) {
 1155|       |            ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
 1156|       |            ossl_ml_kem_key_free(key);
 1157|       |            return NULL;
 1158|       |        }
 1159|       |#endif /* FIPS_MODULE */
 1160|  1.47k|        return key;
 1161|  1.47k|    }
 1162|       |
 1163|      0|    ossl_ml_kem_key_free(key);
 1164|       |    return NULL;
 1165|  1.47k|}
ml_kem_kmgmt.c:ml_kem_gen_cleanup:
 1168|  1.47k|{
 1169|  1.47k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
 1170|       |
 1171|  1.47k|    if (gctx == NULL)
  ------------------
  |  Branch (1171:9): [True: 0, False: 1.47k]
  ------------------
 1172|      0|        return;
 1173|       |
 1174|  1.47k|    if (gctx->seed != NULL)
  ------------------
  |  Branch (1174:9): [True: 0, False: 1.47k]
  ------------------
 1175|      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, ... */
  |  |  ------------------
  ------------------
 1176|  1.47k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|  1.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1177|  1.47k|    OPENSSL_free(gctx);
  ------------------
  |  |  131|  1.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1178|  1.47k|}
ml_kem_kmgmt.c:ml_kem_export:
  243|  1.40k|{
  244|  1.40k|    ML_KEM_KEY *key = vkey;
  245|  1.40k|    OSSL_PARAM_BLD *tmpl = NULL;
  246|  1.40k|    OSSL_PARAM *params = NULL;
  247|  1.40k|    const ML_KEM_VINFO *v;
  248|  1.40k|    uint8_t *pubenc = NULL, *prvenc = NULL, *seedenc = NULL;
  249|  1.40k|    size_t prvlen = 0, seedlen = 0;
  250|  1.40k|    int ret = 0;
  251|       |
  252|  1.40k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (252:9): [True: 0, False: 1.40k]
  |  Branch (252:36): [True: 0, False: 1.40k]
  ------------------
  253|      0|        return 0;
  254|       |
  255|  1.40k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  1.40k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.40k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.40k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (255:9): [True: 0, False: 1.40k]
  ------------------
  256|      0|        return 0;
  257|       |
  258|  1.40k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  1.40k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  259|  1.40k|    if (!ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|  1.40k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (259:9): [True: 0, False: 1.40k]
  ------------------
  260|       |        /* Fail when no key material can be returned */
  261|      0|        if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) == 0
  ------------------
  |  |  640|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      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]
  |  |  ------------------
  ------------------
  263|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  264|      0|            return 0;
  265|      0|        }
  266|  1.40k|    } else if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  641|  1.40k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (266:16): [True: 1.40k, False: 0]
  ------------------
  267|  1.40k|        pubenc = OPENSSL_malloc(v->pubkey_bytes);
  ------------------
  |  |  106|  1.40k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  268|  1.40k|        if (pubenc == NULL
  ------------------
  |  Branch (268:13): [True: 0, False: 1.40k]
  ------------------
  269|  1.40k|            || !ossl_ml_kem_encode_public_key(pubenc, v->pubkey_bytes, key))
  ------------------
  |  Branch (269:16): [True: 0, False: 1.40k]
  ------------------
  270|      0|            goto err;
  271|  1.40k|    }
  272|       |
  273|  1.40k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  640|  1.40k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (273:9): [True: 0, False: 1.40k]
  ------------------
  274|       |        /*
  275|       |         * The seed and/or private key material are allocated on the secure
  276|       |         * heap if configured, ossl_param_build_set_octet_string(), will then
  277|       |         * also use the secure heap.
  278|       |         */
  279|      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]
  |  |  ------------------
  ------------------
  280|      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, ... */
  |  |  ------------------
  ------------------
  281|      0|            if ((seedenc = OPENSSL_secure_zalloc(seedlen)) == NULL
  ------------------
  |  |  141|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (281:17): [True: 0, False: 0]
  ------------------
  282|      0|                || !ossl_ml_kem_encode_seed(seedenc, seedlen, key))
  ------------------
  |  Branch (282:20): [True: 0, False: 0]
  ------------------
  283|      0|                goto err;
  284|      0|        }
  285|      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]
  |  |  ------------------
  ------------------
  286|      0|            prvlen = v->prvkey_bytes;
  287|      0|            if ((prvenc = OPENSSL_secure_zalloc(prvlen)) == NULL
  ------------------
  |  |  141|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (287:17): [True: 0, False: 0]
  ------------------
  288|      0|                || !ossl_ml_kem_encode_private_key(prvenc, prvlen, key))
  ------------------
  |  Branch (288:20): [True: 0, False: 0]
  ------------------
  289|      0|                goto err;
  290|      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]
  |  |  ------------------
  ------------------
  291|      0|            prvlen = v->prvkey_bytes;
  292|      0|            if ((prvenc = OPENSSL_secure_zalloc(prvlen)) == NULL)
  ------------------
  |  |  141|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (292:17): [True: 0, False: 0]
  ------------------
  293|      0|                goto err;
  294|      0|            memcpy(prvenc, key->encoded_dk, prvlen);
  295|      0|        }
  296|      0|    }
  297|       |
  298|  1.40k|    tmpl = OSSL_PARAM_BLD_new();
  299|  1.40k|    if (tmpl == NULL)
  ------------------
  |  Branch (299:9): [True: 0, False: 1.40k]
  ------------------
  300|      0|        goto err;
  301|       |
  302|       |    /* The (d, z) seed, when available and private keys are requested. */
  303|  1.40k|    if (seedenc != NULL
  ------------------
  |  Branch (303:9): [True: 0, False: 1.40k]
  ------------------
  304|      0|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (304:12): [True: 0, False: 0]
  ------------------
  305|      0|            tmpl, params, OSSL_PKEY_PARAM_ML_KEM_SEED, seedenc, seedlen))
  ------------------
  |  |  437|      0|# define OSSL_PKEY_PARAM_ML_KEM_SEED "seed"
  ------------------
  306|      0|        goto err;
  307|       |
  308|       |    /* The private key in the FIPS 203 |dk| format, when requested. */
  309|  1.40k|    if (prvenc != NULL
  ------------------
  |  Branch (309:9): [True: 0, False: 1.40k]
  ------------------
  310|      0|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (310:12): [True: 0, False: 0]
  ------------------
  311|      0|            tmpl, params, OSSL_PKEY_PARAM_PRIV_KEY, prvenc, prvlen))
  ------------------
  |  |  439|      0|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  312|      0|        goto err;
  313|       |
  314|       |    /* The public key on request; it is always available when either is */
  315|  1.40k|    if (pubenc != NULL
  ------------------
  |  Branch (315:9): [True: 1.40k, False: 0]
  ------------------
  316|  1.40k|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (316:12): [True: 0, False: 1.40k]
  ------------------
  317|  1.40k|            tmpl, params, OSSL_PKEY_PARAM_PUB_KEY, pubenc, v->pubkey_bytes))
  ------------------
  |  |  441|  1.40k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  318|      0|        goto err;
  319|       |
  320|  1.40k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  321|  1.40k|    if (params == NULL)
  ------------------
  |  Branch (321:9): [True: 0, False: 1.40k]
  ------------------
  322|      0|        goto err;
  323|       |
  324|  1.40k|    ret = param_cb(params, cbarg);
  325|  1.40k|    OSSL_PARAM_free(params);
  326|       |
  327|  1.40k|err:
  328|  1.40k|    OSSL_PARAM_BLD_free(tmpl);
  329|  1.40k|    OPENSSL_secure_clear_free(seedenc, seedlen);
  ------------------
  |  |  149|  1.40k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  330|  1.40k|    OPENSSL_secure_clear_free(prvenc, prvlen);
  ------------------
  |  |  149|  1.40k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  331|  1.40k|    OPENSSL_free(pubenc);
  ------------------
  |  |  131|  1.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  332|  1.40k|    return ret;
  333|  1.40k|}
ml_kem_kmgmt.c:ml_kem_768_gen_init:
 1206|  1.42k|    {                                                                                     \
 1207|  1.42k|        return ml_kem_gen_init(provctx, selection, params,                                \
 1208|  1.42k|            EVP_PKEY_ML_KEM_##bits);                                                      \
  ------------------
  |  |  103|  1.42k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6641|  1.42k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
 1209|  1.42k|    }                                                                                     \
ml_kem_kmgmt.c:ml_kem_1024_gen_init:
 1206|     30|    {                                                                                     \
 1207|     30|        return ml_kem_gen_init(provctx, selection, params,                                \
 1208|     30|            EVP_PKEY_ML_KEM_##bits);                                                      \
  ------------------
  |  |  113|     30|#define EVP_PKEY_ML_KEM_1024 NID_ML_KEM_1024
  |  |  ------------------
  |  |  |  | 6646|     30|#define NID_ML_KEM_1024         1456
  |  |  ------------------
  ------------------
 1209|     30|    }                                                                                     \

mlx_kmgmt.c:mlx_kem_key_new:
   80|  1.40k|{
   81|  1.40k|    MLX_KEY *key = NULL;
   82|  1.40k|    unsigned int ml_kem_variant;
   83|       |
   84|  1.40k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (84:9): [True: 0, False: 1.40k]
  ------------------
   85|  1.40k|        || v >= OSSL_NELEM(hybrid_vtable)
  ------------------
  |  |   14|  2.81k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (85:12): [True: 0, False: 1.40k]
  ------------------
   86|  1.40k|        || (key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  106|  1.40k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (86:12): [True: 0, False: 1.40k]
  ------------------
   87|      0|        goto err;
   88|       |
   89|  1.40k|    ml_kem_variant = hybrid_vtable[v].ml_kem_variant;
   90|  1.40k|    key->libctx = libctx;
   91|  1.40k|    key->minfo = ossl_ml_kem_get_vinfo(ml_kem_variant);
   92|  1.40k|    key->xinfo = &hybrid_vtable[v];
   93|  1.40k|    key->xkey = key->mkey = NULL;
   94|  1.40k|    key->state = MLX_HAVE_NOKEYS;
  ------------------
  |  |   39|  1.40k|#define MLX_HAVE_NOKEYS 0
  ------------------
   95|  1.40k|    key->propq = propq;
   96|  1.40k|    return key;
   97|       |
   98|      0|err:
   99|      0|    OPENSSL_free(propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  100|       |    return NULL;
  101|  1.40k|}
mlx_kmgmt.c:mlx_kem_key_free:
   66|  1.40k|{
   67|  1.40k|    MLX_KEY *key = vkey;
   68|       |
   69|  1.40k|    if (key == NULL)
  ------------------
  |  Branch (69:9): [True: 0, False: 1.40k]
  ------------------
   70|      0|        return;
   71|  1.40k|    OPENSSL_free(key->propq);
  ------------------
  |  |  131|  1.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|  1.40k|    EVP_PKEY_free(key->mkey);
   73|  1.40k|    EVP_PKEY_free(key->xkey);
   74|  1.40k|    OPENSSL_free(key);
  ------------------
  |  |  131|  1.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|  1.40k|}
mlx_kmgmt.c:mlx_kem_get_params:
  696|  4.22k|{
  697|  4.22k|    MLX_KEY *key = vkey;
  698|  4.22k|    OSSL_PARAM *pub, *prv = NULL;
  699|  4.22k|    EXPORT_CB_ARG sub_arg;
  700|  4.22k|    int selection;
  701|  4.22k|    struct mlx_get_params_st p;
  702|       |
  703|  4.22k|    if (key == NULL || !mlx_get_params_decoder(params, &p))
  ------------------
  |  Branch (703:9): [True: 0, False: 4.22k]
  |  Branch (703:24): [True: 0, False: 4.22k]
  ------------------
  704|      0|        return 0;
  705|       |
  706|       |    /* The reported "bit" count is those of the ML-KEM key */
  707|  4.22k|    if (p.bits != NULL)
  ------------------
  |  Branch (707:9): [True: 1.40k, False: 2.81k]
  ------------------
  708|  1.40k|        if (!OSSL_PARAM_set_int(p.bits, key->minfo->bits))
  ------------------
  |  Branch (708:13): [True: 0, False: 1.40k]
  ------------------
  709|      0|            return 0;
  710|       |
  711|       |    /* The reported security bits are those of the ML-KEM key */
  712|  4.22k|    if (p.secbits != NULL)
  ------------------
  |  Branch (712:9): [True: 1.40k, False: 2.81k]
  ------------------
  713|  1.40k|        if (!OSSL_PARAM_set_int(p.secbits, key->minfo->secbits))
  ------------------
  |  Branch (713:13): [True: 0, False: 1.40k]
  ------------------
  714|      0|            return 0;
  715|       |
  716|       |    /* The reported security category are those of the ML-KEM key */
  717|  4.22k|    if (p.seccat != NULL)
  ------------------
  |  Branch (717:9): [True: 1.40k, False: 2.81k]
  ------------------
  718|  1.40k|        if (!OSSL_PARAM_set_int(p.seccat, key->minfo->security_category))
  ------------------
  |  Branch (718:13): [True: 0, False: 1.40k]
  ------------------
  719|      0|            return 0;
  720|       |
  721|       |    /* The ciphertext sizes are additive */
  722|  4.22k|    if (p.maxsize != NULL)
  ------------------
  |  Branch (722:9): [True: 1.40k, False: 2.81k]
  ------------------
  723|  1.40k|        if (!OSSL_PARAM_set_size_t(p.maxsize, key->minfo->ctext_bytes + key->xinfo->pubkey_bytes))
  ------------------
  |  Branch (723:13): [True: 0, False: 1.40k]
  ------------------
  724|      0|            return 0;
  725|       |
  726|  4.22k|    if (!mlx_kem_have_pubkey(key))
  ------------------
  |  |   44|  4.22k|#define mlx_kem_have_pubkey(key) ((key)->state > 0)
  ------------------
  |  Branch (726:9): [True: 0, False: 4.22k]
  ------------------
  727|      0|        return 1;
  728|       |
  729|  4.22k|    memset(&sub_arg, 0, sizeof(sub_arg));
  730|  4.22k|    if ((pub = p.pub) != NULL) {
  ------------------
  |  Branch (730:9): [True: 2.81k, False: 1.40k]
  ------------------
  731|  2.81k|        size_t publen = key->minfo->pubkey_bytes + key->xinfo->pubkey_bytes;
  732|       |
  733|  2.81k|        if (pub->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|  2.81k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (733:13): [True: 0, False: 2.81k]
  ------------------
  734|      0|            return 0;
  735|  2.81k|        pub->return_size = publen;
  736|  2.81k|        if (pub->data == NULL) {
  ------------------
  |  Branch (736:13): [True: 1.40k, False: 1.40k]
  ------------------
  737|  1.40k|            pub = NULL;
  738|  1.40k|        } else if (pub->data_size < publen) {
  ------------------
  |  Branch (738:20): [True: 0, False: 1.40k]
  ------------------
  739|      0|            ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  127|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  740|      0|                "public key output buffer too short: %lu < %lu",
  741|      0|                (unsigned long)pub->data_size,
  742|      0|                (unsigned long)publen);
  743|      0|            return 0;
  744|  1.40k|        } else {
  745|  1.40k|            sub_arg.pubenc = pub->data;
  746|  1.40k|        }
  747|  2.81k|    }
  748|  4.22k|    if (mlx_kem_have_prvkey(key)) {
  ------------------
  |  |   45|  4.22k|#define mlx_kem_have_prvkey(key) ((key)->state > 1)
  |  |  ------------------
  |  |  |  Branch (45:34): [True: 4.22k, False: 0]
  |  |  ------------------
  ------------------
  749|  4.22k|        if ((prv = p.priv) != NULL) {
  ------------------
  |  Branch (749:13): [True: 0, False: 4.22k]
  ------------------
  750|      0|            size_t prvlen = key->minfo->prvkey_bytes + key->xinfo->prvkey_bytes;
  751|       |
  752|      0|            if (prv->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (752:17): [True: 0, False: 0]
  ------------------
  753|      0|                return 0;
  754|      0|            prv->return_size = prvlen;
  755|      0|            if (prv->data == NULL) {
  ------------------
  |  Branch (755:17): [True: 0, False: 0]
  ------------------
  756|      0|                prv = NULL;
  757|      0|            } else if (prv->data_size < prvlen) {
  ------------------
  |  Branch (757:24): [True: 0, False: 0]
  ------------------
  758|      0|                ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                              ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  127|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  759|      0|                    "private key output buffer too short: %lu < %lu",
  760|      0|                    (unsigned long)prv->data_size,
  761|      0|                    (unsigned long)prvlen);
  762|      0|                return 0;
  763|      0|            } else {
  764|      0|                sub_arg.prvenc = prv->data;
  765|      0|            }
  766|      0|        }
  767|  4.22k|    }
  768|  4.22k|    if (pub == NULL && prv == NULL)
  ------------------
  |  Branch (768:9): [True: 2.81k, False: 1.40k]
  |  Branch (768:24): [True: 2.81k, False: 0]
  ------------------
  769|  2.81k|        return 1;
  770|       |
  771|  1.40k|    selection = prv == NULL ? 0 : OSSL_KEYMGMT_SELECT_PRIVATE_KEY;
  ------------------
  |  |  640|  1.40k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (771:17): [True: 1.40k, False: 0]
  ------------------
  772|  1.40k|    selection |= pub == NULL ? 0 : OSSL_KEYMGMT_SELECT_PUBLIC_KEY;
  ------------------
  |  |  641|  2.81k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (772:18): [True: 0, False: 1.40k]
  ------------------
  773|  1.40k|    if (key->xinfo->group_name != NULL)
  ------------------
  |  Branch (773:9): [True: 0, False: 1.40k]
  ------------------
  774|      0|        selection |= OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS;
  ------------------
  |  |  642|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  775|       |
  776|       |    /* Extract sub-component key material */
  777|  1.40k|    if (!export_sub(&sub_arg, selection, key))
  ------------------
  |  Branch (777:9): [True: 0, False: 1.40k]
  ------------------
  778|      0|        return 0;
  779|       |
  780|  1.40k|    if ((pub != NULL && sub_arg.pubcount != 2)
  ------------------
  |  Branch (780:10): [True: 1.40k, False: 0]
  |  Branch (780:25): [True: 0, False: 1.40k]
  ------------------
  781|  1.40k|        || (prv != NULL && sub_arg.prvcount != 2))
  ------------------
  |  Branch (781:13): [True: 0, False: 1.40k]
  |  Branch (781:28): [True: 0, False: 0]
  ------------------
  782|      0|        return 0;
  783|       |
  784|  1.40k|    return 1;
  785|  1.40k|}
mlx_kmgmt.c:mlx_get_params_decoder:
  561|  4.22k|{
  562|  4.22k|    const char *s;
  563|       |
  564|  4.22k|    memset(r, 0, sizeof(*r));
  565|  4.22k|    if (p != NULL)
  ------------------
  |  Branch (565:9): [True: 4.22k, False: 0]
  ------------------
  566|  12.6k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (566:16): [True: 8.45k, False: 4.22k]
  ------------------
  567|  8.45k|            switch(s[0]) {
  568|      0|            default:
  ------------------
  |  Branch (568:13): [True: 0, False: 8.45k]
  ------------------
  569|      0|                break;
  570|  1.40k|            case 'b':
  ------------------
  |  Branch (570:13): [True: 1.40k, False: 7.04k]
  ------------------
  571|  1.40k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  1.40k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.40k, False: 0]
  |  |  ------------------
  ------------------
  572|       |                    /* OSSL_PKEY_PARAM_BITS */
  573|  1.40k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  1.40k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.40k]
  |  |  ------------------
  ------------------
  574|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  575|      0|                                       "param %s is repeated", s);
  576|      0|                        return 0;
  577|      0|                    }
  578|  1.40k|                    r->bits = (OSSL_PARAM *)p;
  579|  1.40k|                }
  580|  1.40k|                break;
  581|  2.81k|            case 'e':
  ------------------
  |  Branch (581:13): [True: 2.81k, False: 5.63k]
  ------------------
  582|  2.81k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  2.81k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.81k, False: 0]
  |  |  ------------------
  ------------------
  583|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  584|  2.81k|                    if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|  2.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  585|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  586|      0|                                       "param %s is repeated", s);
  587|      0|                        return 0;
  588|      0|                    }
  589|  2.81k|                    r->pub = (OSSL_PARAM *)p;
  590|  2.81k|                }
  591|  2.81k|                break;
  592|  2.81k|            case 'm':
  ------------------
  |  Branch (592:13): [True: 1.40k, False: 7.04k]
  ------------------
  593|  1.40k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  1.40k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.40k, False: 0]
  |  |  ------------------
  ------------------
  594|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  595|  1.40k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  1.40k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.40k]
  |  |  ------------------
  ------------------
  596|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  597|      0|                                       "param %s is repeated", s);
  598|      0|                        return 0;
  599|      0|                    }
  600|  1.40k|                    r->maxsize = (OSSL_PARAM *)p;
  601|  1.40k|                }
  602|  1.40k|                break;
  603|  1.40k|            case 'p':
  ------------------
  |  Branch (603:13): [True: 0, False: 8.45k]
  ------------------
  604|      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]
  |  |  ------------------
  ------------------
  605|       |                    /* OSSL_PKEY_PARAM_PRIV_KEY */
  606|      0|                    if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  607|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  608|      0|                                       "param %s is repeated", s);
  609|      0|                        return 0;
  610|      0|                    }
  611|      0|                    r->priv = (OSSL_PARAM *)p;
  612|      0|                }
  613|      0|                break;
  614|  2.81k|            case 's':
  ------------------
  |  Branch (614:13): [True: 2.81k, False: 5.63k]
  ------------------
  615|  2.81k|                switch(s[1]) {
  616|      0|                default:
  ------------------
  |  Branch (616:17): [True: 0, False: 2.81k]
  ------------------
  617|      0|                    break;
  618|  2.81k|                case 'e':
  ------------------
  |  Branch (618:17): [True: 2.81k, False: 0]
  ------------------
  619|  2.81k|                    switch(s[2]) {
  620|      0|                    default:
  ------------------
  |  Branch (620:21): [True: 0, False: 2.81k]
  ------------------
  621|      0|                        break;
  622|  2.81k|                    case 'c':
  ------------------
  |  Branch (622:21): [True: 2.81k, False: 0]
  ------------------
  623|  2.81k|                        switch(s[3]) {
  624|      0|                        default:
  ------------------
  |  Branch (624:25): [True: 0, False: 2.81k]
  ------------------
  625|      0|                            break;
  626|  2.81k|                        case 'u':
  ------------------
  |  Branch (626:25): [True: 2.81k, False: 0]
  ------------------
  627|  2.81k|                            switch(s[4]) {
  628|      0|                            default:
  ------------------
  |  Branch (628:29): [True: 0, False: 2.81k]
  ------------------
  629|      0|                                break;
  630|  2.81k|                            case 'r':
  ------------------
  |  Branch (630:29): [True: 2.81k, False: 0]
  ------------------
  631|  2.81k|                                switch(s[5]) {
  632|      0|                                default:
  ------------------
  |  Branch (632:33): [True: 0, False: 2.81k]
  ------------------
  633|      0|                                    break;
  634|  2.81k|                                case 'i':
  ------------------
  |  Branch (634:33): [True: 2.81k, False: 0]
  ------------------
  635|  2.81k|                                    switch(s[6]) {
  636|      0|                                    default:
  ------------------
  |  Branch (636:37): [True: 0, False: 2.81k]
  ------------------
  637|      0|                                        break;
  638|  2.81k|                                    case 't':
  ------------------
  |  Branch (638:37): [True: 2.81k, False: 0]
  ------------------
  639|  2.81k|                                        switch(s[7]) {
  640|      0|                                        default:
  ------------------
  |  Branch (640:41): [True: 0, False: 2.81k]
  ------------------
  641|      0|                                            break;
  642|  2.81k|                                        case 'y':
  ------------------
  |  Branch (642:41): [True: 2.81k, False: 0]
  ------------------
  643|  2.81k|                                            switch(s[8]) {
  644|      0|                                            default:
  ------------------
  |  Branch (644:45): [True: 0, False: 2.81k]
  ------------------
  645|      0|                                                break;
  646|  2.81k|                                            case '-':
  ------------------
  |  Branch (646:45): [True: 2.81k, False: 0]
  ------------------
  647|  2.81k|                                                switch(s[9]) {
  648|      0|                                                default:
  ------------------
  |  Branch (648:49): [True: 0, False: 2.81k]
  ------------------
  649|      0|                                                    break;
  650|  1.40k|                                                case 'b':
  ------------------
  |  Branch (650:49): [True: 1.40k, False: 1.40k]
  ------------------
  651|  1.40k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  1.40k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.40k, False: 0]
  |  |  ------------------
  ------------------
  652|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  653|  1.40k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  1.40k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.40k]
  |  |  ------------------
  ------------------
  654|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  655|      0|                                                                           "param %s is repeated", s);
  656|      0|                                                            return 0;
  657|      0|                                                        }
  658|  1.40k|                                                        r->secbits = (OSSL_PARAM *)p;
  659|  1.40k|                                                    }
  660|  1.40k|                                                    break;
  661|  1.40k|                                                case 'c':
  ------------------
  |  Branch (661:49): [True: 1.40k, False: 1.40k]
  ------------------
  662|  1.40k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  1.40k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.40k, False: 0]
  |  |  ------------------
  ------------------
  663|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  664|  1.40k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  1.40k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.40k]
  |  |  ------------------
  ------------------
  665|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  666|      0|                                                                           "param %s is repeated", s);
  667|      0|                                                            return 0;
  668|      0|                                                        }
  669|  1.40k|                                                        r->seccat = (OSSL_PARAM *)p;
  670|  1.40k|                                                    }
  671|  2.81k|                                                }
  672|  2.81k|                                            }
  673|  2.81k|                                        }
  674|  2.81k|                                    }
  675|  2.81k|                                }
  676|  2.81k|                            }
  677|  2.81k|                        }
  678|  2.81k|                    }
  679|  2.81k|                }
  680|  8.45k|            }
  681|  4.22k|    return 1;
  682|  4.22k|}
mlx_kmgmt.c:export_sub:
  271|  1.40k|{
  272|  1.40k|    int slot;
  273|       |
  274|       |    /*
  275|       |     * The caller is responsible for initialising only the pubenc and prvenc
  276|       |     * pointer fields, the rest are set here or in the callback.
  277|       |     */
  278|  1.40k|    sub_arg->pubcount = 0;
  279|  1.40k|    sub_arg->prvcount = 0;
  280|       |
  281|  4.22k|    for (slot = 0; slot < 2; ++slot) {
  ------------------
  |  Branch (281:20): [True: 2.81k, False: 1.40k]
  ------------------
  282|  2.81k|        int ml_kem_slot = key->xinfo->ml_kem_slot;
  283|  2.81k|        EVP_PKEY *pkey;
  284|       |
  285|       |        /* Export the parts of each component into its storage slot */
  286|  2.81k|        if (slot == ml_kem_slot) {
  ------------------
  |  Branch (286:13): [True: 1.40k, False: 1.40k]
  ------------------
  287|  1.40k|            pkey = key->mkey;
  288|  1.40k|            sub_arg->algorithm_name = key->minfo->algorithm_name;
  289|  1.40k|            sub_arg->puboff = slot * key->xinfo->pubkey_bytes;
  290|  1.40k|            sub_arg->prvoff = slot * key->xinfo->prvkey_bytes;
  291|  1.40k|            sub_arg->publen = key->minfo->pubkey_bytes;
  292|  1.40k|            sub_arg->prvlen = key->minfo->prvkey_bytes;
  293|  1.40k|        } else {
  294|  1.40k|            pkey = key->xkey;
  295|  1.40k|            sub_arg->algorithm_name = key->xinfo->algorithm_name;
  296|  1.40k|            sub_arg->puboff = (1 - ml_kem_slot) * key->minfo->pubkey_bytes;
  297|  1.40k|            sub_arg->prvoff = (1 - ml_kem_slot) * key->minfo->prvkey_bytes;
  298|  1.40k|            sub_arg->publen = key->xinfo->pubkey_bytes;
  299|  1.40k|            sub_arg->prvlen = key->xinfo->prvkey_bytes;
  300|  1.40k|        }
  301|  2.81k|        if (!EVP_PKEY_export(pkey, selection, export_sub_cb, (void *)sub_arg))
  ------------------
  |  Branch (301:13): [True: 0, False: 2.81k]
  ------------------
  302|      0|            return 0;
  303|  2.81k|    }
  304|  1.40k|    return 1;
  305|  1.40k|}
mlx_kmgmt.c:export_sub_cb:
  225|  2.81k|{
  226|  2.81k|    EXPORT_CB_ARG *sub_arg = varg;
  227|  2.81k|    struct ml_kem_import_export_st p;
  228|  2.81k|    size_t len;
  229|       |
  230|  2.81k|    if (!ml_kem_import_export_decoder(params, &p))
  ------------------
  |  Branch (230:9): [True: 0, False: 2.81k]
  ------------------
  231|      0|        return 0;
  232|       |
  233|       |    /*
  234|       |     * The caller will decide whether anything essential is missing, but, if
  235|       |     * some key material was returned, it should have the right (parameter)
  236|       |     * data type and length.
  237|       |     */
  238|  2.81k|    if (sub_arg->pubenc != NULL && p.pubkey != NULL) {
  ------------------
  |  Branch (238:9): [True: 2.81k, False: 0]
  |  Branch (238:36): [True: 2.81k, False: 0]
  ------------------
  239|  2.81k|        void *pub = sub_arg->pubenc + sub_arg->puboff;
  240|       |
  241|  2.81k|        if (OSSL_PARAM_get_octet_string(p.pubkey, &pub, sub_arg->publen, &len) != 1)
  ------------------
  |  Branch (241:13): [True: 0, False: 2.81k]
  ------------------
  242|      0|            return 0;
  243|  2.81k|        if (len != sub_arg->publen) {
  ------------------
  |  Branch (243:13): [True: 0, False: 2.81k]
  ------------------
  244|      0|            ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  245|      0|                "Unexpected %s public key length %lu != %lu",
  246|      0|                sub_arg->algorithm_name, (unsigned long)len,
  247|      0|                sub_arg->publen);
  248|      0|            return 0;
  249|      0|        }
  250|  2.81k|        ++sub_arg->pubcount;
  251|  2.81k|    }
  252|  2.81k|    if (sub_arg->prvenc != NULL && p.privkey != NULL) {
  ------------------
  |  Branch (252:9): [True: 0, False: 2.81k]
  |  Branch (252:36): [True: 0, False: 0]
  ------------------
  253|      0|        void *prv = sub_arg->prvenc + sub_arg->prvoff;
  254|       |
  255|      0|        if (OSSL_PARAM_get_octet_string(p.privkey, &prv, sub_arg->prvlen, &len) != 1)
  ------------------
  |  Branch (255:13): [True: 0, False: 0]
  ------------------
  256|      0|            return 0;
  257|      0|        if (len != sub_arg->prvlen) {
  ------------------
  |  Branch (257:13): [True: 0, False: 0]
  ------------------
  258|      0|            ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|      0|                "Unexpected %s private key length %lu != %lu",
  260|      0|                sub_arg->algorithm_name, (unsigned long)len,
  261|      0|                (unsigned long)sub_arg->publen);
  262|      0|            return 0;
  263|      0|        }
  264|      0|        ++sub_arg->prvcount;
  265|      0|    }
  266|  2.81k|    return 1;
  267|  2.81k|}
mlx_kmgmt.c:ml_kem_import_export_decoder:
  169|  2.81k|{
  170|  2.81k|    const char *s;
  171|       |
  172|  2.81k|    memset(r, 0, sizeof(*r));
  173|  2.81k|    if (p != NULL)
  ------------------
  |  Branch (173:9): [True: 2.81k, False: 0]
  ------------------
  174|  5.63k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (174:16): [True: 2.81k, False: 2.81k]
  ------------------
  175|  2.81k|            switch(s[0]) {
  176|      0|            default:
  ------------------
  |  Branch (176:13): [True: 0, False: 2.81k]
  ------------------
  177|      0|                break;
  178|  2.81k|            case 'p':
  ------------------
  |  Branch (178:13): [True: 2.81k, False: 0]
  ------------------
  179|  2.81k|                switch(s[1]) {
  180|      0|                default:
  ------------------
  |  Branch (180:17): [True: 0, False: 2.81k]
  ------------------
  181|      0|                    break;
  182|      0|                case 'r':
  ------------------
  |  Branch (182:17): [True: 0, False: 2.81k]
  ------------------
  183|      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]
  |  |  ------------------
  ------------------
  184|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  185|      0|                        if (ossl_unlikely(r->privkey != 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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  187|      0|                                           "param %s is repeated", s);
  188|      0|                            return 0;
  189|      0|                        }
  190|      0|                        r->privkey = (OSSL_PARAM *)p;
  191|      0|                    }
  192|      0|                    break;
  193|  2.81k|                case 'u':
  ------------------
  |  Branch (193:17): [True: 2.81k, False: 0]
  ------------------
  194|  2.81k|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|  2.81k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.81k, False: 0]
  |  |  ------------------
  ------------------
  195|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  196|  2.81k|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|  2.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  197|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  198|      0|                                           "param %s is repeated", s);
  199|      0|                            return 0;
  200|      0|                        }
  201|  2.81k|                        r->pubkey = (OSSL_PARAM *)p;
  202|  2.81k|                    }
  203|  2.81k|                }
  204|  2.81k|            }
  205|  2.81k|    return 1;
  206|  2.81k|}
mlx_kmgmt.c:mlx_kem_gen_init:
  947|  1.40k|{
  948|  1.40k|    PROV_ML_KEM_GEN_CTX *gctx = NULL;
  949|       |
  950|       |    /*
  951|       |     * We can only generate private keys, check that the selection is
  952|       |     * appropriate.
  953|       |     */
  954|  1.40k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (954:9): [True: 0, False: 1.40k]
  ------------------
  955|  1.40k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (955:12): [True: 0, False: 1.40k]
  ------------------
  956|  1.40k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  108|  1.40k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (956:12): [True: 0, False: 1.40k]
  ------------------
  957|      0|        return NULL;
  958|       |
  959|  1.40k|    gctx->evp_type = evp_type;
  960|  1.40k|    gctx->libctx = libctx;
  961|  1.40k|    gctx->selection = selection;
  962|  1.40k|    if (mlx_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (962:9): [True: 1.40k, False: 0]
  ------------------
  963|  1.40k|        return gctx;
  964|       |
  965|      0|    mlx_kem_gen_cleanup(gctx);
  966|       |    return NULL;
  967|  1.40k|}
mlx_kmgmt.c:mlx_kem_gen_set_params:
  928|  2.81k|{
  929|  2.81k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  930|  2.81k|    struct mlx_gen_set_params_st p;
  931|       |
  932|  2.81k|    if (gctx == NULL || !mlx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (932:9): [True: 0, False: 2.81k]
  |  Branch (932:25): [True: 0, False: 2.81k]
  ------------------
  933|      0|        return 0;
  934|       |
  935|  2.81k|    if (p.propq != NULL) {
  ------------------
  |  Branch (935:9): [True: 0, False: 2.81k]
  ------------------
  936|      0|        if (p.propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (936:13): [True: 0, False: 0]
  ------------------
  937|      0|            return 0;
  938|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  939|      0|        if ((gctx->propq = OPENSSL_strdup(p.propq->data)) == NULL)
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (939:13): [True: 0, False: 0]
  ------------------
  940|      0|            return 0;
  941|      0|    }
  942|  2.81k|    return 1;
  943|  2.81k|}
mlx_kmgmt.c:mlx_gen_set_params_decoder:
  906|  2.81k|{
  907|  2.81k|    const char *s;
  908|       |
  909|  2.81k|    memset(r, 0, sizeof(*r));
  910|  2.81k|    if (p != NULL)
  ------------------
  |  Branch (910:9): [True: 1.40k, False: 1.40k]
  ------------------
  911|  2.81k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (911:16): [True: 1.40k, False: 1.40k]
  ------------------
  912|  1.40k|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|  1.40k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 1.40k]
  |  |  ------------------
  ------------------
  913|       |                /* OSSL_PKEY_PARAM_PROPERTIES */
  914|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  915|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  916|      0|                                   "param %s is repeated", s);
  917|      0|                    return 0;
  918|      0|                }
  919|      0|                r->propq = (OSSL_PARAM *)p;
  920|      0|            }
  921|  2.81k|    return 1;
  922|  2.81k|}
mlx_kmgmt.c:mlx_kem_gen:
  976|  1.40k|{
  977|  1.40k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  978|  1.40k|    MLX_KEY *key;
  979|  1.40k|    char *propq;
  980|       |
  981|  1.40k|    if (gctx == NULL
  ------------------
  |  Branch (981:9): [True: 0, False: 1.40k]
  ------------------
  982|  1.40k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  650|  1.40k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.40k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.40k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  641|  1.40k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (982:12): [True: 0, False: 1.40k]
  ------------------
  983|      0|        return NULL;
  984|       |
  985|       |    /* Lose ownership of propq */
  986|  1.40k|    propq = gctx->propq;
  987|  1.40k|    gctx->propq = NULL;
  988|  1.40k|    if ((key = mlx_kem_key_new(gctx->evp_type, gctx->libctx, propq)) == NULL)
  ------------------
  |  Branch (988:9): [True: 0, False: 1.40k]
  ------------------
  989|      0|        return NULL;
  990|       |
  991|  1.40k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  1.40k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.40k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.40k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (991:9): [True: 0, False: 1.40k]
  ------------------
  992|      0|        return key;
  993|       |
  994|       |    /* For now, using the same "propq" for all components */
  995|  1.40k|    key->mkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  996|  1.40k|        key->minfo->algorithm_name);
  997|  1.40k|    key->xkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  998|  1.40k|        key->xinfo->algorithm_name,
  999|  1.40k|        key->xinfo->group_name);
 1000|  1.40k|    if (key->mkey != NULL && key->xkey != NULL) {
  ------------------
  |  Branch (1000:9): [True: 1.40k, False: 0]
  |  Branch (1000:30): [True: 1.40k, False: 0]
  ------------------
 1001|  1.40k|        key->state = MLX_HAVE_PRVKEY;
  ------------------
  |  |   41|  1.40k|#define MLX_HAVE_PRVKEY 2
  ------------------
 1002|  1.40k|        return key;
 1003|  1.40k|    }
 1004|       |
 1005|      0|    mlx_kem_key_free(key);
 1006|       |    return NULL;
 1007|  1.40k|}
mlx_kmgmt.c:mlx_kem_gen_cleanup:
 1010|  1.40k|{
 1011|  1.40k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
 1012|       |
 1013|  1.40k|    if (gctx == NULL)
  ------------------
  |  Branch (1013:9): [True: 0, False: 1.40k]
  ------------------
 1014|      0|        return;
 1015|  1.40k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|  1.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1016|  1.40k|    OPENSSL_free(gctx);
  ------------------
  |  |  131|  1.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1017|  1.40k|}

rsa_kmgmt.c:rsa_load:
  671|   316k|{
  672|   316k|    return common_load(reference, reference_sz, RSA_FLAG_TYPE_RSA);
  ------------------
  |  |  118|   316k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
  673|   316k|}
rsa_kmgmt.c:common_load:
  653|   316k|{
  654|   316k|    RSA *rsa = NULL;
  655|       |
  656|   316k|    if (ossl_prov_is_running() && reference_sz == sizeof(rsa)) {
  ------------------
  |  Branch (656:9): [True: 316k, False: 0]
  |  Branch (656:35): [True: 316k, False: 0]
  ------------------
  657|       |        /* The contents of the reference is the address to our object */
  658|   316k|        rsa = *(RSA **)reference;
  659|       |
  660|   316k|        if (RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK) != expected_rsa_type)
  ------------------
  |  |  117|   316k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  |  Branch (660:13): [True: 0, False: 316k]
  ------------------
  661|      0|            return NULL;
  662|       |
  663|       |        /* We grabbed, so we detach it */
  664|   316k|        *(RSA **)reference = NULL;
  665|   316k|        return rsa;
  666|   316k|    }
  667|      0|    return NULL;
  668|   316k|}
rsa_kmgmt.c:rsa_freedata:
  111|   316k|{
  112|   316k|    RSA_free(keydata);
  113|   316k|}
rsa_kmgmt.c:rsa_get_params:
  325|   316k|{
  326|   316k|    RSA *rsa = key;
  327|   316k|    const RSA_PSS_PARAMS_30 *pss_params = ossl_rsa_get0_pss_params_30(rsa);
  328|   316k|    int rsa_type = RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK);
  ------------------
  |  |  117|   316k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  329|   316k|    OSSL_PARAM *p;
  330|   316k|    int empty = RSA_get0_n(rsa) == NULL;
  331|       |
  332|   316k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  366|   316k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (332:9): [True: 316k, False: 0]
  ------------------
  333|   316k|        && (empty || !OSSL_PARAM_set_int(p, RSA_bits(rsa))))
  ------------------
  |  Branch (333:13): [True: 0, False: 316k]
  |  Branch (333:22): [True: 0, False: 316k]
  ------------------
  334|      0|        return 0;
  335|   316k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL
  ------------------
  |  |  495|   316k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (335:9): [True: 316k, False: 0]
  ------------------
  336|   316k|        && (empty || !OSSL_PARAM_set_int(p, RSA_security_bits(rsa))))
  ------------------
  |  Branch (336:13): [True: 0, False: 316k]
  |  Branch (336:22): [True: 0, False: 316k]
  ------------------
  337|      0|        return 0;
  338|   316k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  424|   316k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (338:9): [True: 316k, False: 0]
  ------------------
  339|   316k|        && (empty || !OSSL_PARAM_set_int(p, RSA_size(rsa))))
  ------------------
  |  Branch (339:13): [True: 0, False: 316k]
  |  Branch (339:22): [True: 0, False: 316k]
  ------------------
  340|      0|        return 0;
  341|   316k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  496|   316k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  133|   316k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (341:9): [True: 316k, False: 0]
  ------------------
  342|   316k|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (342:13): [True: 0, False: 316k]
  ------------------
  343|      0|            return 0;
  344|       |
  345|       |    /*
  346|       |     * For restricted RSA-PSS keys, we ignore the default digest request.
  347|       |     * With RSA-OAEP keys, this may need to be amended.
  348|       |     */
  349|   316k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  370|   316k|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (349:9): [True: 0, False: 316k]
  ------------------
  350|      0|        && (rsa_type != RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|      0|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (350:13): [True: 0, False: 0]
  ------------------
  351|      0|            || ossl_rsa_pss_params_30_is_unrestricted(pss_params))) {
  ------------------
  |  Branch (351:16): [True: 0, False: 0]
  ------------------
  352|      0|        if (!OSSL_PARAM_set_utf8_string(p, RSA_DEFAULT_MD))
  ------------------
  |  |   55|      0|#define RSA_DEFAULT_MD "SHA256"
  ------------------
  |  Branch (352:13): [True: 0, False: 0]
  ------------------
  353|      0|            return 0;
  354|      0|    }
  355|       |
  356|       |    /*
  357|       |     * For non-RSA-PSS keys, we ignore the mandatory digest request.
  358|       |     * With RSA-OAEP keys, this may need to be amended.
  359|       |     */
  360|   316k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (360:9): [True: 0, False: 316k]
  ------------------
  361|   316k|             OSSL_PKEY_PARAM_MANDATORY_DIGEST))
  ------------------
  |  |  422|   316k|# define OSSL_PKEY_PARAM_MANDATORY_DIGEST "mandatory-digest"
  ------------------
  362|   316k|            != NULL
  363|      0|        && rsa_type == RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|   316k|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (363:12): [True: 0, False: 0]
  ------------------
  364|      0|        && !ossl_rsa_pss_params_30_is_unrestricted(pss_params)) {
  ------------------
  |  Branch (364:12): [True: 0, False: 0]
  ------------------
  365|      0|        const char *mdname = ossl_rsa_oaeppss_nid2name(ossl_rsa_pss_params_30_hashalg(pss_params));
  366|       |
  367|      0|        if (mdname == NULL || !OSSL_PARAM_set_utf8_string(p, mdname))
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  |  Branch (367:31): [True: 0, False: 0]
  ------------------
  368|      0|            return 0;
  369|      0|    }
  370|   316k|    return (rsa_type != RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|   633k|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (370:13): [True: 316k, False: 0]
  ------------------
  371|      0|               || ossl_rsa_pss_params_30_todata(pss_params, NULL, params))
  ------------------
  |  Branch (371:19): [True: 0, False: 0]
  ------------------
  372|   316k|        && ossl_rsa_todata(rsa, NULL, params, 1);
  ------------------
  |  Branch (372:12): [True: 316k, False: 0]
  ------------------
  373|   316k|}

ossl_drbg_lock:
   54|  64.2k|{
   55|  64.2k|    return 1;
   56|  64.2k|}
ossl_drbg_unlock:
   60|  64.2k|{
   61|  64.2k|}
ossl_drbg_get_seed:
  148|  2.20k|{
  149|  2.20k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  150|  2.20k|    size_t bytes_needed;
  151|  2.20k|    unsigned char *buffer;
  152|       |
  153|       |    /* Figure out how many bytes we need */
  154|  2.20k|    bytes_needed = entropy >= 0 ? (entropy + 7) / 8 : 0;
  ------------------
  |  Branch (154:20): [True: 2.20k, False: 0]
  ------------------
  155|  2.20k|    if (bytes_needed < min_len)
  ------------------
  |  Branch (155:9): [True: 0, False: 2.20k]
  ------------------
  156|      0|        bytes_needed = min_len;
  157|  2.20k|    if (bytes_needed > max_len)
  ------------------
  |  Branch (157:9): [True: 0, False: 2.20k]
  ------------------
  158|      0|        bytes_needed = max_len;
  159|       |
  160|       |    /* Allocate storage */
  161|  2.20k|    buffer = OPENSSL_secure_malloc(bytes_needed);
  ------------------
  |  |  139|  2.20k|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  162|  2.20k|    if (buffer == NULL)
  ------------------
  |  Branch (162:9): [True: 0, False: 2.20k]
  ------------------
  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.20k|    if (!ossl_prov_drbg_generate(drbg, buffer, bytes_needed,
  ------------------
  |  Branch (174:9): [True: 0, False: 2.20k]
  ------------------
  175|  2.20k|            drbg->strength, prediction_resistance,
  176|  2.20k|            (unsigned char *)&drbg, sizeof(drbg))) {
  177|      0|        OPENSSL_secure_clear_free(buffer, bytes_needed);
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  178|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_GENERATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|        return 0;
  180|      0|    }
  181|  2.20k|    *pout = buffer;
  182|  2.20k|    return bytes_needed;
  183|  2.20k|}
ossl_drbg_clear_seed:
  188|  2.20k|{
  189|  2.20k|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  149|  2.20k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  190|  2.20k|}
ossl_prov_drbg_nonce_ctx_new:
  272|    785|{
  273|    785|    PROV_DRBG_NONCE_GLOBAL *dngbl = OPENSSL_zalloc(sizeof(*dngbl));
  ------------------
  |  |  108|    785|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  274|       |
  275|    785|    if (dngbl == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 785]
  ------------------
  276|      0|        return NULL;
  277|       |
  278|    785|    dngbl->rand_nonce_lock = CRYPTO_THREAD_lock_new();
  279|    785|    if (dngbl->rand_nonce_lock == NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 785]
  ------------------
  280|      0|        OPENSSL_free(dngbl);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|      0|    }
  283|       |
  284|    785|    return dngbl;
  285|    785|}
ossl_prov_drbg_nonce_ctx_free:
  288|    785|{
  289|    785|    PROV_DRBG_NONCE_GLOBAL *dngbl = vdngbl;
  290|       |
  291|    785|    if (dngbl == NULL)
  ------------------
  |  Branch (291:9): [True: 0, False: 785]
  ------------------
  292|      0|        return;
  293|       |
  294|    785|    CRYPTO_THREAD_lock_free(dngbl->rand_nonce_lock);
  295|       |
  296|    785|    OPENSSL_free(dngbl);
  ------------------
  |  |  131|    785|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|    785|}
ossl_prov_drbg_instantiate:
  352|  1.65k|{
  353|  1.65k|    unsigned char *nonce = NULL, *entropy = NULL;
  354|  1.65k|    size_t noncelen = 0, entropylen = 0;
  355|  1.65k|    unsigned int min_entropy;
  356|  1.65k|    size_t min_entropylen, max_entropylen;
  357|       |
  358|  1.65k|    if (strength > drbg->strength) {
  ------------------
  |  Branch (358:9): [True: 0, False: 1.65k]
  ------------------
  359|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INSUFFICIENT_DRBG_STRENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  360|      0|        goto end;
  361|      0|    }
  362|  1.65k|    min_entropy = drbg->strength;
  363|  1.65k|    min_entropylen = drbg->min_entropylen;
  364|  1.65k|    max_entropylen = drbg->max_entropylen;
  365|       |
  366|  1.65k|    if (pers == NULL) {
  ------------------
  |  Branch (366:9): [True: 1.65k, False: 0]
  ------------------
  367|  1.65k|        pers = (const unsigned char *)ossl_pers_string;
  368|  1.65k|        perslen = sizeof(ossl_pers_string);
  369|  1.65k|    }
  370|  1.65k|    if (perslen > drbg->max_perslen) {
  ------------------
  |  Branch (370:9): [True: 0, False: 1.65k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PERSONALISATION_STRING_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        goto end;
  373|      0|    }
  374|       |
  375|  1.65k|    if (drbg->state != EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1345|  1.65k|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
  |  Branch (375:9): [True: 0, False: 1.65k]
  ------------------
  376|      0|        if (drbg->state == EVP_RAND_STATE_ERROR)
  ------------------
  |  | 1347|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  378|      0|        else
  379|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_ALREADY_INSTANTIATED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  380|      0|        goto end;
  381|      0|    }
  382|       |
  383|  1.65k|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|  1.65k|#define EVP_RAND_STATE_ERROR 2
  ------------------
  384|       |
  385|  1.65k|    if (drbg->min_noncelen > 0) {
  ------------------
  |  Branch (385:9): [True: 1.65k, False: 0]
  ------------------
  386|  1.65k|        if (drbg->parent_nonce != NULL) {
  ------------------
  |  Branch (386:13): [True: 0, False: 1.65k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  392|      0|                goto end;
  393|      0|            }
  394|      0|            nonce = OPENSSL_malloc(noncelen);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  401|      0|                goto end;
  402|      0|            }
  403|      0|#ifndef PROV_RAND_GET_RANDOM_NONCE
  404|  1.65k|        } else if (drbg->parent != NULL) {
  ------------------
  |  Branch (404:20): [True: 1.65k, False: 0]
  ------------------
  405|  1.65k|#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.65k|            min_entropy += drbg->strength / 2;
  414|  1.65k|            min_entropylen += drbg->min_noncelen;
  415|  1.65k|            max_entropylen += drbg->max_noncelen;
  416|  1.65k|        }
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  424|      0|                goto end;
  425|      0|            }
  426|      0|        }
  427|  1.65k|#endif
  428|  1.65k|    }
  429|       |
  430|  1.65k|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|  1.65k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  431|  1.65k|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (431:9): [True: 1.65k, False: 0]
  ------------------
  432|  1.65k|        drbg->reseed_next_counter++;
  433|  1.65k|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (433:13): [True: 0, False: 1.65k]
  ------------------
  434|      0|            drbg->reseed_next_counter = 1;
  435|  1.65k|    }
  436|       |
  437|  1.65k|    entropylen = get_entropy(drbg, &entropy, min_entropy,
  438|  1.65k|        min_entropylen, max_entropylen,
  439|  1.65k|        prediction_resistance);
  440|  1.65k|    if (entropylen < min_entropylen
  ------------------
  |  Branch (440:9): [True: 0, False: 1.65k]
  ------------------
  441|  1.65k|        || entropylen > max_entropylen) {
  ------------------
  |  Branch (441:12): [True: 0, False: 1.65k]
  ------------------
  442|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_ENTROPY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  443|      0|        goto end;
  444|      0|    }
  445|       |
  446|  1.65k|    if (!drbg->instantiate(drbg, entropy, entropylen, nonce, noncelen,
  ------------------
  |  Branch (446:9): [True: 0, False: 1.65k]
  ------------------
  447|  1.65k|            pers, perslen)) {
  448|      0|        cleanup_entropy(drbg, entropy, entropylen);
  449|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  450|      0|        goto end;
  451|      0|    }
  452|  1.65k|    cleanup_entropy(drbg, entropy, entropylen);
  453|       |
  454|  1.65k|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1346|  1.65k|#define EVP_RAND_STATE_READY 1
  ------------------
  455|  1.65k|    drbg->generate_counter = 1;
  456|  1.65k|    drbg->reseed_time = time(NULL);
  457|  1.65k|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|  1.65k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  458|       |
  459|  1.65k|end:
  460|  1.65k|    if (nonce != NULL)
  ------------------
  |  Branch (460:9): [True: 0, False: 1.65k]
  ------------------
  461|      0|        ossl_prov_cleanup_nonce(drbg->provctx, nonce, noncelen);
  462|  1.65k|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1346|  1.65k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (462:9): [True: 1.65k, False: 0]
  ------------------
  463|  1.65k|        return 1;
  464|      0|    return 0;
  465|  1.65k|}
ossl_prov_drbg_generate:
  625|  26.1k|{
  626|  26.1k|    int fork_id;
  627|  26.1k|    int reseed_required = 0;
  628|  26.1k|    int ret = 0;
  629|  26.1k|    time_t reseed_time_interval = drbg->reseed_time_interval;
  630|  26.1k|    time_t now = 0;
  631|       |
  632|  26.1k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (632:9): [True: 0, False: 26.1k]
  ------------------
  633|      0|        return 0;
  634|       |
  635|  26.1k|    fork_id = openssl_get_fork_id();
  636|       |
  637|  26.1k|    if (reseed_time_interval > 0)
  ------------------
  |  Branch (637:9): [True: 26.1k, False: 0]
  ------------------
  638|  26.1k|        now = time(NULL);
  639|       |
  640|  26.1k|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (640:9): [True: 2.20k, False: 23.9k]
  |  Branch (640:31): [True: 0, False: 2.20k]
  ------------------
  641|      0|        return 0;
  642|       |
  643|  26.1k|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1346|  26.1k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (643:9): [True: 0, False: 26.1k]
  ------------------
  644|       |        /* try to recover from previous errors */
  645|      0|        rand_drbg_restart(drbg);
  646|       |
  647|      0|        if (drbg->state == EVP_RAND_STATE_ERROR) {
  ------------------
  |  | 1347|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  649|      0|            goto err;
  650|      0|        }
  651|      0|        if (drbg->state == EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1345|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  653|      0|            goto err;
  654|      0|        }
  655|      0|    }
  656|  26.1k|    if (strength > drbg->strength) {
  ------------------
  |  Branch (656:9): [True: 0, False: 26.1k]
  ------------------
  657|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INSUFFICIENT_DRBG_STRENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  658|      0|        goto err;
  659|      0|    }
  660|       |
  661|  26.1k|    if (outlen > drbg->max_request) {
  ------------------
  |  Branch (661:9): [True: 0, False: 26.1k]
  ------------------
  662|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_REQUEST_TOO_LARGE_FOR_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  663|      0|        goto err;
  664|      0|    }
  665|  26.1k|    if (adinlen > drbg->max_adinlen) {
  ------------------
  |  Branch (665:9): [True: 0, False: 26.1k]
  ------------------
  666|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ADDITIONAL_INPUT_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  667|      0|        goto err;
  668|      0|    }
  669|       |
  670|  26.1k|    if (drbg->fork_id != fork_id) {
  ------------------
  |  Branch (670:9): [True: 0, False: 26.1k]
  ------------------
  671|      0|        drbg->fork_id = fork_id;
  672|      0|        reseed_required = 1;
  673|      0|    }
  674|       |
  675|  26.1k|    if (drbg->reseed_interval > 0) {
  ------------------
  |  Branch (675:9): [True: 26.1k, False: 0]
  ------------------
  676|  26.1k|        if (drbg->generate_counter >= drbg->reseed_interval)
  ------------------
  |  Branch (676:13): [True: 0, False: 26.1k]
  ------------------
  677|      0|            reseed_required = 1;
  678|  26.1k|    }
  679|  26.1k|    if (reseed_time_interval > 0) {
  ------------------
  |  Branch (679:9): [True: 26.1k, False: 0]
  ------------------
  680|  26.1k|        if (now < drbg->reseed_time
  ------------------
  |  Branch (680:13): [True: 0, False: 26.1k]
  ------------------
  681|  26.1k|            || now - drbg->reseed_time >= reseed_time_interval)
  ------------------
  |  Branch (681:16): [True: 0, False: 26.1k]
  ------------------
  682|      0|            reseed_required = 1;
  683|  26.1k|    }
  684|  26.1k|    if (drbg->parent != NULL
  ------------------
  |  Branch (684:9): [True: 26.1k, False: 0]
  ------------------
  685|  26.1k|        && get_parent_reseed_count(drbg) != drbg->parent_reseed_counter)
  ------------------
  |  Branch (685:12): [True: 1.10k, False: 25.0k]
  ------------------
  686|  1.10k|        reseed_required = 1;
  687|       |
  688|  26.1k|    if (reseed_required || prediction_resistance) {
  ------------------
  |  Branch (688:9): [True: 1.10k, False: 25.0k]
  |  Branch (688:28): [True: 0, False: 25.0k]
  ------------------
  689|  1.10k|        if (!ossl_prov_drbg_reseed_unlocked(drbg, prediction_resistance, NULL,
  ------------------
  |  Branch (689:13): [True: 0, False: 1.10k]
  ------------------
  690|  1.10k|                0, adin, adinlen)) {
  691|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_RESEED_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  692|      0|            goto err;
  693|      0|        }
  694|  1.10k|        adin = NULL;
  695|  1.10k|        adinlen = 0;
  696|  1.10k|    }
  697|       |
  698|  26.1k|    if (!drbg->generate(drbg, out, outlen, adin, adinlen)) {
  ------------------
  |  Branch (698:9): [True: 0, False: 26.1k]
  ------------------
  699|      0|        drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  700|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_GENERATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  701|      0|        goto err;
  702|      0|    }
  703|       |
  704|  26.1k|    drbg->generate_counter++;
  705|       |
  706|  26.1k|    ret = 1;
  707|  26.1k|err:
  708|  26.1k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (708:9): [True: 2.20k, False: 23.9k]
  ------------------
  709|  2.20k|        CRYPTO_THREAD_unlock(drbg->lock);
  710|       |
  711|  26.1k|    return ret;
  712|  26.1k|}
ossl_drbg_enable_locking:
  759|    551|{
  760|    551|    PROV_DRBG *drbg = vctx;
  761|       |
  762|    551|    if (drbg != NULL && drbg->lock == NULL) {
  ------------------
  |  Branch (762:9): [True: 551, False: 0]
  |  Branch (762:25): [True: 551, False: 0]
  ------------------
  763|    551|        if (drbg->parent_enable_locking != NULL)
  ------------------
  |  Branch (763:13): [True: 551, False: 0]
  ------------------
  764|    551|            if (!drbg->parent_enable_locking(drbg->parent)) {
  ------------------
  |  Branch (764:17): [True: 0, False: 551]
  ------------------
  765|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_LOCKING_NOT_ENABLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  766|      0|                return 0;
  767|      0|            }
  768|    551|        drbg->lock = CRYPTO_THREAD_lock_new();
  769|    551|        if (drbg->lock == NULL) {
  ------------------
  |  Branch (769:13): [True: 0, False: 551]
  ------------------
  770|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_CREATE_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  771|      0|            return 0;
  772|      0|        }
  773|    551|    }
  774|    551|    return 1;
  775|    551|}
ossl_rand_drbg_new:
  797|  1.65k|{
  798|  1.65k|    PROV_DRBG *drbg;
  799|  1.65k|    unsigned int p_str;
  800|  1.65k|    const OSSL_DISPATCH *pfunc;
  801|       |
  802|  1.65k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (802:9): [True: 0, False: 1.65k]
  ------------------
  803|      0|        return NULL;
  804|       |
  805|  1.65k|    drbg = OPENSSL_zalloc(sizeof(*drbg));
  ------------------
  |  |  108|  1.65k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  806|  1.65k|    if (drbg == NULL)
  ------------------
  |  Branch (806:9): [True: 0, False: 1.65k]
  ------------------
  807|      0|        return NULL;
  808|       |
  809|  1.65k|    drbg->provctx = provctx;
  810|  1.65k|    drbg->instantiate = instantiate;
  811|  1.65k|    drbg->uninstantiate = uninstantiate;
  812|  1.65k|    drbg->reseed = reseed;
  813|  1.65k|    drbg->generate = generate;
  814|  1.65k|    drbg->fork_id = openssl_get_fork_id();
  815|       |
  816|       |    /* Extract parent's functions */
  817|  1.65k|    drbg->parent = parent;
  818|  1.65k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_ENABLE_LOCKING)) != NULL)
  ------------------
  |  |  542|  1.65k|#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
  ------------------
  |  Branch (818:9): [True: 1.65k, False: 0]
  ------------------
  819|  1.65k|        drbg->parent_enable_locking = OSSL_FUNC_rand_enable_locking(pfunc);
  820|  1.65k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_LOCK)) != NULL)
  ------------------
  |  |  543|  1.65k|#define OSSL_FUNC_RAND_LOCK 9
  ------------------
  |  Branch (820:9): [True: 1.65k, False: 0]
  ------------------
  821|  1.65k|        drbg->parent_lock = OSSL_FUNC_rand_lock(pfunc);
  822|  1.65k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_UNLOCK)) != NULL)
  ------------------
  |  |  544|  1.65k|#define OSSL_FUNC_RAND_UNLOCK 10
  ------------------
  |  Branch (822:9): [True: 1.65k, False: 0]
  ------------------
  823|  1.65k|        drbg->parent_unlock = OSSL_FUNC_rand_unlock(pfunc);
  824|  1.65k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_CTX_PARAMS)) != NULL)
  ------------------
  |  |  549|  1.65k|#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
  ------------------
  |  Branch (824:9): [True: 1.65k, False: 0]
  ------------------
  825|  1.65k|        drbg->parent_get_ctx_params = OSSL_FUNC_rand_get_ctx_params(pfunc);
  826|  1.65k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_NONCE)) != NULL)
  ------------------
  |  |  541|  1.65k|#define OSSL_FUNC_RAND_NONCE 7
  ------------------
  |  Branch (826:9): [True: 0, False: 1.65k]
  ------------------
  827|      0|        drbg->parent_nonce = OSSL_FUNC_rand_nonce(pfunc);
  828|  1.65k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_SEED)) != NULL)
  ------------------
  |  |  552|  1.65k|#define OSSL_FUNC_RAND_GET_SEED 18
  ------------------
  |  Branch (828:9): [True: 1.65k, False: 0]
  ------------------
  829|  1.65k|        drbg->parent_get_seed = OSSL_FUNC_rand_get_seed(pfunc);
  830|  1.65k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_CLEAR_SEED)) != NULL)
  ------------------
  |  |  553|  1.65k|#define OSSL_FUNC_RAND_CLEAR_SEED 19
  ------------------
  |  Branch (830:9): [True: 1.65k, False: 0]
  ------------------
  831|  1.65k|        drbg->parent_clear_seed = OSSL_FUNC_rand_clear_seed(pfunc);
  832|       |
  833|       |    /* Set some default maximums up */
  834|  1.65k|    drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.65k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  835|  1.65k|    drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.65k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  836|  1.65k|    drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.65k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  837|  1.65k|    drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.65k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  838|  1.65k|    drbg->generate_counter = 1;
  839|  1.65k|    drbg->reseed_counter = 1;
  840|  1.65k|    drbg->reseed_interval = RESEED_INTERVAL;
  ------------------
  |  |   31|  1.65k|#define RESEED_INTERVAL (1 << 8)
  ------------------
  841|  1.65k|    drbg->reseed_time_interval = TIME_INTERVAL;
  ------------------
  |  |   32|  1.65k|#define TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  842|       |
  843|  1.65k|    if (!dnew(drbg))
  ------------------
  |  Branch (843:9): [True: 0, False: 1.65k]
  ------------------
  844|      0|        goto err;
  845|       |
  846|  1.65k|    if (parent != NULL) {
  ------------------
  |  Branch (846:9): [True: 1.65k, False: 0]
  ------------------
  847|  1.65k|        if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (847:13): [True: 0, False: 1.65k]
  ------------------
  848|      0|            goto err;
  849|  1.65k|        if (drbg->strength > p_str) {
  ------------------
  |  Branch (849:13): [True: 0, False: 1.65k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  855|      0|            goto err;
  856|      0|        }
  857|  1.65k|    }
  858|       |#ifdef TSAN_REQUIRES_LOCKING
  859|       |    if (!ossl_drbg_enable_locking(drbg))
  860|       |        goto err;
  861|       |#endif
  862|  1.65k|    return drbg;
  863|       |
  864|      0|err:
  865|      0|    dfree(drbg);
  866|       |    return NULL;
  867|  1.65k|}
ossl_rand_drbg_free:
  870|  1.65k|{
  871|  1.65k|    if (drbg == NULL)
  ------------------
  |  Branch (871:9): [True: 0, False: 1.65k]
  ------------------
  872|      0|        return;
  873|       |
  874|  1.65k|    CRYPTO_THREAD_lock_free(drbg->lock);
  875|  1.65k|    OPENSSL_free(drbg);
  ------------------
  |  |  131|  1.65k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  876|  1.65k|}
ossl_drbg_get_ctx_params:
  884|  9.27k|{
  885|  9.27k|    if (p->state != NULL && !OSSL_PARAM_set_int(p->state, drbg->state))
  ------------------
  |  Branch (885:9): [True: 5.97k, False: 3.30k]
  |  Branch (885:29): [True: 0, False: 5.97k]
  ------------------
  886|      0|        return 0;
  887|       |
  888|  9.27k|    if (p->str != NULL && !OSSL_PARAM_set_int(p->str, drbg->strength))
  ------------------
  |  Branch (888:9): [True: 3.30k, False: 5.97k]
  |  Branch (888:27): [True: 0, False: 3.30k]
  ------------------
  889|      0|        return 0;
  890|       |
  891|  9.27k|    if (p->minentlen != NULL
  ------------------
  |  Branch (891:9): [True: 0, False: 9.27k]
  ------------------
  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|  9.27k|    if (p->maxentlen != NULL
  ------------------
  |  Branch (895:9): [True: 0, False: 9.27k]
  ------------------
  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|  9.27k|    if (p->minnonlen != NULL
  ------------------
  |  Branch (899:9): [True: 0, False: 9.27k]
  ------------------
  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|  9.27k|    if (p->maxnonlen != NULL
  ------------------
  |  Branch (903:9): [True: 0, False: 9.27k]
  ------------------
  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|  9.27k|    if (p->maxperlen != NULL
  ------------------
  |  Branch (907:9): [True: 0, False: 9.27k]
  ------------------
  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|  9.27k|    if (p->maxadlen != NULL
  ------------------
  |  Branch (911:9): [True: 0, False: 9.27k]
  ------------------
  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|  9.27k|    if (p->reseed_req != NULL
  ------------------
  |  Branch (915:9): [True: 0, False: 9.27k]
  ------------------
  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|  9.27k|    if (p->reseed_time != NULL
  ------------------
  |  Branch (919:9): [True: 0, False: 9.27k]
  ------------------
  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|  9.27k|    if (p->reseed_int != NULL
  ------------------
  |  Branch (923:9): [True: 0, False: 9.27k]
  ------------------
  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|  9.27k|    if (!OSSL_FIPS_IND_GET_CTX_FROM_PARAM(drbg, p->ind))
  ------------------
  |  |  161|  9.27k|#define OSSL_FIPS_IND_GET_CTX_FROM_PARAM(ctx, params) 1
  ------------------
  |  Branch (927:9): [Folded, False: 9.27k]
  ------------------
  928|      0|        return 0;
  929|       |
  930|  9.27k|    return 1;
  931|  9.27k|}
ossl_drbg_get_ctx_params_no_lock:
  940|  58.2k|{
  941|  58.2k|    size_t cnt = 0;
  942|       |
  943|       |    /* This value never changes once set */
  944|  58.2k|    if (p->maxreq != NULL) {
  ------------------
  |  Branch (944:9): [True: 23.9k, False: 34.2k]
  ------------------
  945|  23.9k|        if (!OSSL_PARAM_set_size_t(p->maxreq, drbg->max_request))
  ------------------
  |  Branch (945:13): [True: 0, False: 23.9k]
  ------------------
  946|      0|            return 0;
  947|  23.9k|        cnt++;
  948|  23.9k|    }
  949|       |
  950|       |    /*
  951|       |     * Can be changed by multiple threads, but we tolerate inaccuracies in this
  952|       |     * value.
  953|       |     */
  954|  58.2k|    if (p->reseed_cnt != NULL) {
  ------------------
  |  Branch (954:9): [True: 25.0k, False: 33.1k]
  ------------------
  955|  25.0k|        if (!OSSL_PARAM_set_uint(p->reseed_cnt, tsan_load(&drbg->reseed_counter)))
  ------------------
  |  |   61|  25.0k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (955:13): [True: 0, False: 25.0k]
  ------------------
  956|      0|            return 0;
  957|  25.0k|        cnt++;
  958|  25.0k|    }
  959|       |
  960|  58.2k|    if (params[cnt].key == NULL)
  ------------------
  |  Branch (960:9): [True: 48.9k, False: 9.27k]
  ------------------
  961|  48.9k|        *complete = 1;
  962|  9.27k|    else
  963|  9.27k|        *complete = 0;
  964|       |
  965|  58.2k|    return 1;
  966|  58.2k|}
ossl_drbg_set_ctx_params:
  970|  1.65k|{
  971|  1.65k|    if (p->reseed_req != NULL
  ------------------
  |  Branch (971:9): [True: 1.65k, False: 0]
  ------------------
  972|  1.65k|        && !OSSL_PARAM_get_uint(p->reseed_req, &drbg->reseed_interval))
  ------------------
  |  Branch (972:12): [True: 0, False: 1.65k]
  ------------------
  973|      0|        return 0;
  974|       |
  975|  1.65k|    if (p->reseed_time != NULL
  ------------------
  |  Branch (975:9): [True: 1.65k, False: 0]
  ------------------
  976|  1.65k|        && !OSSL_PARAM_get_time_t(p->reseed_time, &drbg->reseed_time_interval))
  ------------------
  |  Branch (976:12): [True: 0, False: 1.65k]
  ------------------
  977|      0|        return 0;
  978|       |
  979|  1.65k|    return 1;
  980|  1.65k|}
drbg.c:get_entropy:
  195|  2.75k|{
  196|  2.75k|    size_t bytes;
  197|  2.75k|    unsigned int p_str;
  198|       |
  199|  2.75k|    if (drbg->parent == NULL)
  ------------------
  |  Branch (199:9): [True: 0, False: 2.75k]
  ------------------
  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.75k|    if (drbg->parent_get_seed == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 2.75k]
  ------------------
  208|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_CANNOT_SUPPLY_ENTROPY_SEED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  209|      0|        return 0;
  210|      0|    }
  211|  2.75k|    if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (211:9): [True: 0, False: 2.75k]
  ------------------
  212|      0|        return 0;
  213|  2.75k|    if (drbg->strength > p_str) {
  ------------------
  |  Branch (213:9): [True: 0, False: 2.75k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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.75k|    if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (227:9): [True: 0, False: 2.75k]
  ------------------
  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.75k|    bytes = drbg->parent_get_seed(drbg->parent, pout,
  239|  2.75k|        entropy > 0 ? entropy : (int)drbg->strength,
  ------------------
  |  Branch (239:9): [True: 2.75k, False: 0]
  ------------------
  240|  2.75k|        min_len, max_len, prediction_resistance,
  241|  2.75k|        (unsigned char *)&drbg, sizeof(drbg));
  242|  2.75k|    ossl_drbg_unlock_parent(drbg);
  243|  2.75k|    return bytes;
  244|  2.75k|}
drbg.c:ossl_drbg_lock_parent:
   64|  37.1k|{
   65|  37.1k|    void *parent = drbg->parent;
   66|       |
   67|  37.1k|    if (parent != NULL
  ------------------
  |  Branch (67:9): [True: 37.1k, False: 0]
  ------------------
   68|  37.1k|        && drbg->parent_lock != NULL
  ------------------
  |  Branch (68:12): [True: 37.1k, False: 0]
  ------------------
   69|  37.1k|        && !drbg->parent_lock(parent)) {
  ------------------
  |  Branch (69:12): [True: 0, False: 37.1k]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_LOCKING_NOT_ENABLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|  37.1k|    return 1;
   74|  37.1k|}
drbg.c:ossl_drbg_unlock_parent:
   77|  37.1k|{
   78|  37.1k|    void *parent = drbg->parent;
   79|       |
   80|  37.1k|    if (parent != NULL && drbg->parent_unlock != NULL)
  ------------------
  |  Branch (80:9): [True: 37.1k, False: 0]
  |  Branch (80:27): [True: 37.1k, False: 0]
  ------------------
   81|  37.1k|        drbg->parent_unlock(parent);
   82|  37.1k|}
drbg.c:cleanup_entropy:
  247|  2.75k|{
  248|  2.75k|    if (drbg->parent == NULL) {
  ------------------
  |  Branch (248:9): [True: 0, False: 2.75k]
  ------------------
  249|      0|        ossl_prov_cleanup_entropy(drbg->provctx, out, outlen);
  250|  2.75k|    } else if (drbg->parent_clear_seed != NULL) {
  ------------------
  |  Branch (250:16): [True: 2.75k, False: 0]
  ------------------
  251|  2.75k|        if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (251:13): [True: 0, False: 2.75k]
  ------------------
  252|      0|            return;
  253|  2.75k|        drbg->parent_clear_seed(drbg->parent, out, outlen);
  254|  2.75k|        ossl_drbg_unlock_parent(drbg);
  255|  2.75k|    }
  256|  2.75k|}
drbg.c:ossl_prov_drbg_reseed_unlocked:
  486|  1.10k|{
  487|  1.10k|    unsigned char *entropy = NULL;
  488|  1.10k|    size_t entropylen = 0;
  489|       |
  490|  1.10k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (490:9): [True: 0, False: 1.10k]
  ------------------
  491|      0|        return 0;
  492|       |
  493|  1.10k|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1346|  1.10k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (493:9): [True: 0, False: 1.10k]
  ------------------
  494|       |        /* try to recover from previous errors */
  495|      0|        rand_drbg_restart(drbg);
  496|       |
  497|      0|        if (drbg->state == EVP_RAND_STATE_ERROR) {
  ------------------
  |  | 1347|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|      0|            return 0;
  500|      0|        }
  501|      0|        if (drbg->state == EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1345|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  503|      0|            return 0;
  504|      0|        }
  505|      0|    }
  506|       |
  507|  1.10k|    if (ent != NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 1.10k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  510|      0|            drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  515|      0|            drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  516|      0|            return 0;
  517|      0|        }
  518|      0|    }
  519|       |
  520|  1.10k|    if (adin == NULL) {
  ------------------
  |  Branch (520:9): [True: 1.10k, False: 0]
  ------------------
  521|  1.10k|        adinlen = 0;
  522|  1.10k|    } 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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  524|      0|        return 0;
  525|      0|    }
  526|       |
  527|  1.10k|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|  1.10k|#define EVP_RAND_STATE_ERROR 2
  ------------------
  528|       |
  529|  1.10k|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|  1.10k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  530|  1.10k|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (530:9): [True: 1.10k, False: 0]
  ------------------
  531|  1.10k|        drbg->reseed_next_counter++;
  532|  1.10k|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (532:13): [True: 0, False: 1.10k]
  ------------------
  533|      0|            drbg->reseed_next_counter = 1;
  534|  1.10k|    }
  535|       |
  536|  1.10k|    if (ent != NULL) {
  ------------------
  |  Branch (536:9): [True: 0, False: 1.10k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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.10k|    entropylen = get_entropy(drbg, &entropy, drbg->strength,
  562|  1.10k|        drbg->min_entropylen, drbg->max_entropylen,
  563|  1.10k|        prediction_resistance);
  564|  1.10k|    if (entropylen < drbg->min_entropylen
  ------------------
  |  Branch (564:9): [True: 0, False: 1.10k]
  ------------------
  565|  1.10k|        || entropylen > drbg->max_entropylen) {
  ------------------
  |  Branch (565:12): [True: 0, False: 1.10k]
  ------------------
  566|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_ENTROPY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  567|      0|        goto end;
  568|      0|    }
  569|       |
  570|  1.10k|    if (!drbg->reseed(drbg, entropy, entropylen, adin, adinlen))
  ------------------
  |  Branch (570:9): [True: 0, False: 1.10k]
  ------------------
  571|      0|        goto end;
  572|       |
  573|  1.10k|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1346|  1.10k|#define EVP_RAND_STATE_READY 1
  ------------------
  574|  1.10k|    drbg->generate_counter = 1;
  575|  1.10k|    drbg->reseed_time = time(NULL);
  576|  1.10k|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|  1.10k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  577|  1.10k|    if (drbg->parent != NULL)
  ------------------
  |  Branch (577:9): [True: 1.10k, False: 0]
  ------------------
  578|  1.10k|        drbg->parent_reseed_counter = get_parent_reseed_count(drbg);
  579|       |
  580|  1.10k|end:
  581|  1.10k|    cleanup_entropy(drbg, entropy, entropylen);
  582|  1.10k|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1346|  1.10k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (582:9): [True: 1.10k, False: 0]
  ------------------
  583|  1.10k|        return 1;
  584|      0|    return 0;
  585|  1.10k|}
drbg.c:get_parent_reseed_count:
  110|  27.2k|{
  111|  27.2k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  27.2k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  27.2k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  112|  27.2k|    void *parent = drbg->parent;
  113|  27.2k|    unsigned int r = 0;
  114|       |
  115|  27.2k|    *params = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_COUNTER, &r);
  ------------------
  |  |  250|  27.2k|# define OSSL_DRBG_PARAM_RESEED_COUNTER "reseed_counter"
  ------------------
  116|  27.2k|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (116:9): [True: 0, False: 27.2k]
  ------------------
  117|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_LOCK_PARENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  118|      0|        goto err;
  119|      0|    }
  120|  27.2k|    if (!drbg->parent_get_ctx_params(parent, params))
  ------------------
  |  Branch (120:9): [True: 0, False: 27.2k]
  ------------------
  121|      0|        r = 0;
  122|  27.2k|    ossl_drbg_unlock_parent(drbg);
  123|  27.2k|    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|  27.2k|}
drbg.c:find_call:
  748|  11.5k|{
  749|  11.5k|    if (dispatch != NULL)
  ------------------
  |  Branch (749:9): [True: 11.5k, False: 0]
  ------------------
  750|   136k|        while (dispatch->function_id != 0) {
  ------------------
  |  Branch (750:16): [True: 134k, False: 1.65k]
  ------------------
  751|   134k|            if (dispatch->function_id == function)
  ------------------
  |  Branch (751:17): [True: 9.91k, False: 124k]
  ------------------
  752|  9.91k|                return dispatch;
  753|   124k|            dispatch++;
  754|   124k|        }
  755|  1.65k|    return NULL;
  756|  11.5k|}
drbg.c:get_parent_strength:
   85|  4.40k|{
   86|  4.40k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.40k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.40k|    { NULL, 0, NULL, 0, 0 }
  ------------------
   87|  4.40k|    void *parent = drbg->parent;
   88|  4.40k|    int res;
   89|       |
   90|  4.40k|    if (drbg->parent_get_ctx_params == NULL) {
  ------------------
  |  Branch (90:9): [True: 0, False: 4.40k]
  ------------------
   91|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   92|      0|        return 0;
   93|      0|    }
   94|       |
   95|  4.40k|    *params = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_STRENGTH, str);
  ------------------
  |  |  542|  4.40k|# define OSSL_RAND_PARAM_STRENGTH "strength"
  ------------------
   96|  4.40k|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (96:9): [True: 0, False: 4.40k]
  ------------------
   97|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_LOCK_PARENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|        return 0;
   99|      0|    }
  100|  4.40k|    res = drbg->parent_get_ctx_params(parent, params);
  101|  4.40k|    ossl_drbg_unlock_parent(drbg);
  102|  4.40k|    if (!res) {
  ------------------
  |  Branch (102:9): [True: 0, False: 4.40k]
  ------------------
  103|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  104|      0|        return 0;
  105|      0|    }
  106|  4.40k|    return 1;
  107|  4.40k|}

drbg_ctr.c:drbg_ctr_new_wrapper:
  648|  1.65k|{
  649|  1.65k|    return ossl_rand_drbg_new(provctx, parent, parent_dispatch,
  650|  1.65k|        &drbg_ctr_new, &drbg_ctr_free,
  651|  1.65k|        &drbg_ctr_instantiate, &drbg_ctr_uninstantiate,
  652|  1.65k|        &drbg_ctr_reseed, &drbg_ctr_generate);
  653|  1.65k|}
drbg_ctr.c:drbg_ctr_new:
  633|  1.65k|{
  634|  1.65k|    PROV_DRBG_CTR *ctr;
  635|       |
  636|  1.65k|    ctr = OPENSSL_secure_zalloc(sizeof(*ctr));
  ------------------
  |  |  141|  1.65k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  637|  1.65k|    if (ctr == NULL)
  ------------------
  |  Branch (637:9): [True: 0, False: 1.65k]
  ------------------
  638|      0|        return 0;
  639|       |
  640|  1.65k|    ctr->use_df = 1;
  641|  1.65k|    drbg->data = ctr;
  642|  1.65k|    OSSL_FIPS_IND_INIT(drbg)
  643|  1.65k|    return drbg_ctr_init_lengths(drbg);
  644|  1.65k|}
drbg_ctr.c:drbg_ctr_init_lengths:
  539|  3.30k|{
  540|  3.30k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  541|  3.30k|    int res = 1;
  542|       |
  543|       |    /* Maximum number of bits per request = 2^19  = 2^16 bytes */
  544|  3.30k|    drbg->max_request = 1 << 16;
  545|  3.30k|    if (ctr->use_df) {
  ------------------
  |  Branch (545:9): [True: 3.30k, False: 0]
  ------------------
  546|  3.30k|        drbg->min_entropylen = 0;
  547|  3.30k|        drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.30k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  548|  3.30k|        drbg->min_noncelen = 0;
  549|  3.30k|        drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.30k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  550|  3.30k|        drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.30k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  551|  3.30k|        drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.30k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  552|       |
  553|  3.30k|        if (ctr->keylen > 0) {
  ------------------
  |  Branch (553:13): [True: 1.65k, False: 1.65k]
  ------------------
  554|  1.65k|            drbg->min_entropylen = ctr->keylen;
  555|  1.65k|            drbg->min_noncelen = drbg->min_entropylen / 2;
  556|  1.65k|        }
  557|  3.30k|    } else {
  558|      0|        const size_t len = ctr->keylen > 0 ? drbg->seedlen : DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      0|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  |  Branch (558:28): [True: 0, False: 0]
  ------------------
  559|       |
  560|      0|        drbg->min_entropylen = len;
  561|      0|        drbg->max_entropylen = len;
  562|       |        /* Nonce not used */
  563|      0|        drbg->min_noncelen = 0;
  564|      0|        drbg->max_noncelen = 0;
  565|      0|        drbg->max_perslen = len;
  566|      0|        drbg->max_adinlen = len;
  567|      0|    }
  568|  3.30k|    return res;
  569|  3.30k|}
drbg_ctr.c:drbg_ctr_instantiate:
  322|  1.65k|{
  323|  1.65k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  324|       |
  325|  1.65k|    if (entropy == NULL)
  ------------------
  |  Branch (325:9): [True: 0, False: 1.65k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  1.65k|    memset(ctr->K, 0, sizeof(ctr->K));
  329|  1.65k|    memset(ctr->V, 0, sizeof(ctr->V));
  330|  1.65k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (330:9): [True: 0, False: 1.65k]
  ------------------
  331|      0|        return 0;
  332|       |
  333|  1.65k|    inc_128(ctr);
  334|  1.65k|    if (!ctr_update(drbg, entropy, entropylen, pers, perslen, nonce, noncelen))
  ------------------
  |  Branch (334:9): [True: 0, False: 1.65k]
  ------------------
  335|      0|        return 0;
  336|  1.65k|    return 1;
  337|  1.65k|}
drbg_ctr.c:inc_128:
   71|  93.2k|{
   72|  93.2k|    unsigned char *p = &ctr->V[0];
   73|  93.2k|    u32 n = 16, c = 1;
   74|       |
   75|  1.49M|    do {
   76|  1.49M|        --n;
   77|  1.49M|        c += p[n];
   78|  1.49M|        p[n] = (u8)c;
   79|  1.49M|        c >>= 8;
   80|  1.49M|    } while (n);
  ------------------
  |  Branch (80:14): [True: 1.39M, False: 93.2k]
  ------------------
   81|  93.2k|}
drbg_ctr.c:ctr_update:
  276|  31.0k|{
  277|  31.0k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  278|  31.0k|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  31.0k|#define AES_BLOCK_SIZE 16
  ------------------
  279|  31.0k|    unsigned char V_tmp[48], out[48];
  280|  31.0k|    unsigned char len;
  281|       |
  282|       |    /* correct key is already set up. */
  283|  31.0k|    memcpy(V_tmp, ctr->V, 16);
  284|  31.0k|    inc_128(ctr);
  285|  31.0k|    memcpy(V_tmp + 16, ctr->V, 16);
  286|  31.0k|    if (ctr->keylen == 16) {
  ------------------
  |  Branch (286:9): [True: 0, False: 31.0k]
  ------------------
  287|      0|        len = 32;
  288|  31.0k|    } else {
  289|  31.0k|        inc_128(ctr);
  290|  31.0k|        memcpy(V_tmp + 32, ctr->V, 16);
  291|  31.0k|        len = 48;
  292|  31.0k|    }
  293|  31.0k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, out, &outlen, V_tmp, len)
  ------------------
  |  Branch (293:9): [True: 0, False: 31.0k]
  ------------------
  294|  31.0k|        || outlen != len)
  ------------------
  |  Branch (294:12): [True: 0, False: 31.0k]
  ------------------
  295|      0|        return 0;
  296|  31.0k|    memcpy(ctr->K, out, ctr->keylen);
  297|  31.0k|    memcpy(ctr->V, out + ctr->keylen, 16);
  298|       |
  299|  31.0k|    if (ctr->use_df) {
  ------------------
  |  Branch (299:9): [True: 31.0k, False: 0]
  ------------------
  300|       |        /* If no input reuse existing derived value */
  301|  31.0k|        if (in1 != NULL || nonce != NULL || in2 != NULL)
  ------------------
  |  Branch (301:13): [True: 4.95k, False: 26.1k]
  |  Branch (301:28): [True: 0, False: 26.1k]
  |  Branch (301:45): [True: 0, False: 26.1k]
  ------------------
  302|  4.95k|            if (!ctr_df(ctr, in1, in1len, nonce, noncelen, in2, in2len))
  ------------------
  |  Branch (302:17): [True: 0, False: 4.95k]
  ------------------
  303|      0|                return 0;
  304|       |        /* If this a reuse input in1len != 0 */
  305|  31.0k|        if (in1len)
  ------------------
  |  Branch (305:13): [True: 7.16k, False: 23.9k]
  ------------------
  306|  7.16k|            ctr_XOR(ctr, ctr->KX, drbg->seedlen);
  307|  31.0k|    } else {
  308|      0|        ctr_XOR(ctr, in1, in1len);
  309|      0|        ctr_XOR(ctr, in2, in2len);
  310|      0|    }
  311|       |
  312|  31.0k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1)
  ------------------
  |  Branch (312:9): [True: 0, False: 31.0k]
  ------------------
  313|  31.0k|        || !EVP_CipherInit_ex(ctr->ctx_ctr, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (313:12): [True: 0, False: 31.0k]
  ------------------
  314|      0|        return 0;
  315|  31.0k|    return 1;
  316|  31.0k|}
drbg_ctr.c:ctr_df:
  213|  4.95k|{
  214|  4.95k|    static unsigned char c80 = 0x80;
  215|  4.95k|    size_t inlen;
  216|  4.95k|    unsigned char *p = ctr->bltmp;
  217|  4.95k|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  218|       |
  219|  4.95k|    if (!ctr_BCC_init(ctr))
  ------------------
  |  Branch (219:9): [True: 0, False: 4.95k]
  ------------------
  220|      0|        return 0;
  221|  4.95k|    if (in1 == NULL)
  ------------------
  |  Branch (221:9): [True: 0, False: 4.95k]
  ------------------
  222|      0|        in1len = 0;
  223|  4.95k|    if (in2 == NULL)
  ------------------
  |  Branch (223:9): [True: 4.95k, False: 0]
  ------------------
  224|  4.95k|        in2len = 0;
  225|  4.95k|    if (in3 == NULL)
  ------------------
  |  Branch (225:9): [True: 3.30k, False: 1.65k]
  ------------------
  226|  3.30k|        in3len = 0;
  227|  4.95k|    inlen = in1len + in2len + in3len;
  228|       |    /* Initialise L||N in temporary block */
  229|  4.95k|    *p++ = (inlen >> 24) & 0xff;
  230|  4.95k|    *p++ = (inlen >> 16) & 0xff;
  231|  4.95k|    *p++ = (inlen >> 8) & 0xff;
  232|  4.95k|    *p++ = inlen & 0xff;
  233|       |
  234|       |    /* NB keylen is at most 32 bytes */
  235|  4.95k|    *p++ = 0;
  236|  4.95k|    *p++ = 0;
  237|  4.95k|    *p++ = 0;
  238|  4.95k|    *p = (unsigned char)((ctr->keylen + 16) & 0xff);
  239|  4.95k|    ctr->bltmp_pos = 8;
  240|  4.95k|    if (!ctr_BCC_update(ctr, in1, in1len)
  ------------------
  |  Branch (240:9): [True: 0, False: 4.95k]
  ------------------
  241|  4.95k|        || !ctr_BCC_update(ctr, in2, in2len)
  ------------------
  |  Branch (241:12): [True: 0, False: 4.95k]
  ------------------
  242|  4.95k|        || !ctr_BCC_update(ctr, in3, in3len)
  ------------------
  |  Branch (242:12): [True: 0, False: 4.95k]
  ------------------
  243|  4.95k|        || !ctr_BCC_update(ctr, &c80, 1)
  ------------------
  |  Branch (243:12): [True: 0, False: 4.95k]
  ------------------
  244|  4.95k|        || !ctr_BCC_final(ctr))
  ------------------
  |  Branch (244:12): [True: 0, False: 4.95k]
  ------------------
  245|      0|        return 0;
  246|       |    /* Set up key K */
  247|  4.95k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->KX, NULL, -1))
  ------------------
  |  Branch (247:9): [True: 0, False: 4.95k]
  ------------------
  248|      0|        return 0;
  249|       |    /* X follows key K */
  250|  4.95k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX, &outlen, ctr->KX + ctr->keylen,
  ------------------
  |  Branch (250:9): [True: 0, False: 4.95k]
  ------------------
  251|  4.95k|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  252|  4.95k|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (252:12): [True: 0, False: 4.95k]
  ------------------
  253|      0|        return 0;
  254|  4.95k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 16, &outlen, ctr->KX,
  ------------------
  |  Branch (254:9): [True: 0, False: 4.95k]
  ------------------
  255|  4.95k|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  256|  4.95k|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (256:12): [True: 0, False: 4.95k]
  ------------------
  257|      0|        return 0;
  258|  4.95k|    if (ctr->keylen != 16)
  ------------------
  |  Branch (258:9): [True: 4.95k, False: 0]
  ------------------
  259|  4.95k|        if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 32, &outlen,
  ------------------
  |  Branch (259:13): [True: 0, False: 4.95k]
  ------------------
  260|  4.95k|                ctr->KX + 16, AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  261|  4.95k|            || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (261:16): [True: 0, False: 4.95k]
  ------------------
  262|      0|            return 0;
  263|  4.95k|    return 1;
  264|  4.95k|}
drbg_ctr.c:ctr_BCC_init:
  150|  4.95k|{
  151|  4.95k|    unsigned char bltmp[48] = { 0 };
  152|  4.95k|    unsigned char num_of_blk;
  153|       |
  154|  4.95k|    memset(ctr->KX, 0, 48);
  155|  4.95k|    num_of_blk = ctr->keylen == 16 ? 2 : 3;
  ------------------
  |  Branch (155:18): [True: 0, False: 4.95k]
  ------------------
  156|  4.95k|    bltmp[(AES_BLOCK_SIZE * 1) + 3] = 1;
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  157|  4.95k|    bltmp[(AES_BLOCK_SIZE * 2) + 3] = 2;
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  158|  4.95k|    return ctr_BCC_block(ctr, ctr->KX, bltmp, num_of_blk * AES_BLOCK_SIZE);
  ------------------
  |  |   26|  4.95k|#define AES_BLOCK_SIZE 16
  ------------------
  159|  4.95k|}
drbg_ctr.c:ctr_BCC_block:
  116|  22.5k|{
  117|  22.5k|    int i, outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  22.5k|#define AES_BLOCK_SIZE 16
  ------------------
  118|       |
  119|  1.10M|    for (i = 0; i < len; i++)
  ------------------
  |  Branch (119:17): [True: 1.08M, False: 22.5k]
  ------------------
  120|  1.08M|        out[i] ^= in[i];
  121|       |
  122|  22.5k|    if (!EVP_CipherUpdate(ctr->ctx_df, out, &outlen, out, len)
  ------------------
  |  Branch (122:9): [True: 0, False: 22.5k]
  ------------------
  123|  22.5k|        || outlen != len)
  ------------------
  |  Branch (123:12): [True: 0, False: 22.5k]
  ------------------
  124|      0|        return 0;
  125|  22.5k|    return 1;
  126|  22.5k|}
drbg_ctr.c:ctr_BCC_update:
  166|  19.8k|{
  167|  19.8k|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (167:9): [True: 8.26k, False: 11.5k]
  |  Branch (167:23): [True: 0, False: 11.5k]
  ------------------
  168|  8.26k|        return 1;
  169|       |
  170|       |    /* If we have partial block handle it first */
  171|  11.5k|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (171:9): [True: 9.36k, False: 2.20k]
  ------------------
  172|  9.36k|        size_t left = 16 - ctr->bltmp_pos;
  173|       |
  174|       |        /* If we now have a complete block process it */
  175|  9.36k|        if (inlen >= left) {
  ------------------
  |  Branch (175:13): [True: 6.61k, False: 2.75k]
  ------------------
  176|  6.61k|            memcpy(ctr->bltmp + ctr->bltmp_pos, in, left);
  177|  6.61k|            if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (177:17): [True: 0, False: 6.61k]
  ------------------
  178|      0|                return 0;
  179|  6.61k|            ctr->bltmp_pos = 0;
  180|  6.61k|            inlen -= left;
  181|  6.61k|            in += left;
  182|  6.61k|        }
  183|  9.36k|    }
  184|       |
  185|       |    /* Process zero or more complete blocks */
  186|  17.6k|    for (; inlen >= 16; in += 16, inlen -= 16) {
  ------------------
  |  Branch (186:12): [True: 6.06k, False: 11.5k]
  ------------------
  187|  6.06k|        if (!ctr_BCC_blocks(ctr, in))
  ------------------
  |  Branch (187:13): [True: 0, False: 6.06k]
  ------------------
  188|      0|            return 0;
  189|  6.06k|    }
  190|       |
  191|       |    /* Copy any remaining partial block to the temporary buffer */
  192|  11.5k|    if (inlen > 0) {
  ------------------
  |  Branch (192:9): [True: 9.36k, False: 2.20k]
  ------------------
  193|  9.36k|        memcpy(ctr->bltmp + ctr->bltmp_pos, in, inlen);
  194|  9.36k|        ctr->bltmp_pos += inlen;
  195|  9.36k|    }
  196|  11.5k|    return 1;
  197|  11.5k|}
drbg_ctr.c:ctr_BCC_blocks:
  132|  17.6k|{
  133|  17.6k|    unsigned char in_tmp[48];
  134|  17.6k|    unsigned char num_of_blk = 2;
  135|       |
  136|  17.6k|    memcpy(in_tmp, in, 16);
  137|  17.6k|    memcpy(in_tmp + 16, in, 16);
  138|  17.6k|    if (ctr->keylen != 16) {
  ------------------
  |  Branch (138:9): [True: 17.6k, False: 0]
  ------------------
  139|  17.6k|        memcpy(in_tmp + 32, in, 16);
  140|  17.6k|        num_of_blk = 3;
  141|  17.6k|    }
  142|  17.6k|    return ctr_BCC_block(ctr, ctr->KX, in_tmp, AES_BLOCK_SIZE * num_of_blk);
  ------------------
  |  |   26|  17.6k|#define AES_BLOCK_SIZE 16
  ------------------
  143|  17.6k|}
drbg_ctr.c:ctr_BCC_final:
  200|  4.95k|{
  201|  4.95k|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (201:9): [True: 4.95k, False: 0]
  ------------------
  202|  4.95k|        memset(ctr->bltmp + ctr->bltmp_pos, 0, 16 - ctr->bltmp_pos);
  203|  4.95k|        if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (203:13): [True: 0, False: 4.95k]
  ------------------
  204|      0|            return 0;
  205|  4.95k|    }
  206|  4.95k|    return 1;
  207|  4.95k|}
drbg_ctr.c:ctr_XOR:
   84|  7.16k|{
   85|  7.16k|    size_t i, n;
   86|       |
   87|  7.16k|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (87:9): [True: 0, False: 7.16k]
  |  Branch (87:23): [True: 0, False: 7.16k]
  ------------------
   88|      0|        return;
   89|       |
   90|       |    /*
   91|       |     * Any zero padding will have no effect on the result as we
   92|       |     * are XORing. So just process however much input we have.
   93|       |     */
   94|  7.16k|    n = inlen < ctr->keylen ? inlen : ctr->keylen;
  ------------------
  |  Branch (94:9): [True: 0, False: 7.16k]
  ------------------
   95|  7.16k|    if (!ossl_assert(n <= sizeof(ctr->K)))
  ------------------
  |  |   52|  7.16k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.16k|    __FILE__, __LINE__)
  ------------------
  |  Branch (95:9): [True: 0, False: 7.16k]
  ------------------
   96|      0|        return;
   97|   236k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (97:17): [True: 229k, False: 7.16k]
  ------------------
   98|   229k|        ctr->K[i] ^= in[i];
   99|  7.16k|    if (inlen <= ctr->keylen)
  ------------------
  |  Branch (99:9): [True: 0, False: 7.16k]
  ------------------
  100|      0|        return;
  101|       |
  102|  7.16k|    n = inlen - ctr->keylen;
  103|  7.16k|    if (n > 16) {
  ------------------
  |  Branch (103:9): [True: 0, False: 7.16k]
  ------------------
  104|       |        /* Should never happen */
  105|      0|        n = 16;
  106|      0|    }
  107|   121k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (107:17): [True: 114k, False: 7.16k]
  ------------------
  108|   114k|        ctr->V[i] ^= in[i + ctr->keylen];
  109|  7.16k|}
drbg_ctr.c:drbg_ctr_reseed:
  369|  1.10k|{
  370|  1.10k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  371|       |
  372|  1.10k|    if (entropy == NULL)
  ------------------
  |  Branch (372:9): [True: 0, False: 1.10k]
  ------------------
  373|      0|        return 0;
  374|       |
  375|  1.10k|    inc_128(ctr);
  376|  1.10k|    if (!ctr_update(drbg, entropy, entropylen, adin, adinlen, NULL, 0))
  ------------------
  |  Branch (376:9): [True: 0, False: 1.10k]
  ------------------
  377|      0|        return 0;
  378|  1.10k|    return 1;
  379|  1.10k|}
drbg_ctr.c:drbg_ctr_generate:
  406|  26.1k|{
  407|  26.1k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  408|  26.1k|    unsigned int ctr32, blocks;
  409|  26.1k|    int outl, buflen;
  410|       |
  411|  26.1k|    if (adin != NULL && adinlen != 0) {
  ------------------
  |  Branch (411:9): [True: 2.20k, False: 23.9k]
  |  Branch (411:25): [True: 2.20k, False: 0]
  ------------------
  412|  2.20k|        inc_128(ctr);
  413|       |
  414|  2.20k|        if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (414:13): [True: 0, False: 2.20k]
  ------------------
  415|      0|            return 0;
  416|       |        /* This means we reuse derived value */
  417|  2.20k|        if (ctr->use_df) {
  ------------------
  |  Branch (417:13): [True: 2.20k, False: 0]
  ------------------
  418|  2.20k|            adin = NULL;
  419|  2.20k|            adinlen = 1;
  420|  2.20k|        }
  421|  23.9k|    } else {
  422|  23.9k|        adinlen = 0;
  423|  23.9k|    }
  424|       |
  425|  26.1k|    inc_128(ctr);
  426|       |
  427|  26.1k|    if (outlen == 0) {
  ------------------
  |  Branch (427:9): [True: 0, False: 26.1k]
  ------------------
  428|      0|        inc_128(ctr);
  429|       |
  430|      0|        if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (430:13): [True: 0, False: 0]
  ------------------
  431|      0|            return 0;
  432|      0|        return 1;
  433|      0|    }
  434|       |
  435|  26.1k|    memset(out, 0, outlen);
  436|       |
  437|  26.1k|    do {
  438|  26.1k|        if (!EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (438:13): [True: 0, False: 26.1k]
  ------------------
  439|  26.1k|                NULL, NULL, NULL, ctr->V, -1))
  440|      0|            return 0;
  441|       |
  442|       |        /*-
  443|       |         * outlen has type size_t while EVP_CipherUpdate takes an
  444|       |         * int argument and thus cannot be guaranteed to process more
  445|       |         * than 2^31-1 bytes at a time. We process such huge generate
  446|       |         * requests in 2^30 byte chunks, which is the greatest multiple
  447|       |         * of AES block size lower than or equal to 2^31-1.
  448|       |         */
  449|  26.1k|        buflen = outlen > (1U << 30) ? (1 << 30) : (int)outlen;
  ------------------
  |  Branch (449:18): [True: 0, False: 26.1k]
  ------------------
  450|  26.1k|        blocks = (buflen + 15) / 16;
  451|       |
  452|  26.1k|        ctr32 = GETU32(ctr->V + 12) + blocks;
  ------------------
  |  |   98|  26.1k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  453|  26.1k|        if (ctr32 < blocks) {
  ------------------
  |  Branch (453:13): [True: 0, False: 26.1k]
  ------------------
  454|       |            /* 32-bit counter overflow into V. */
  455|      0|            if (ctr32 != 0) {
  ------------------
  |  Branch (455:17): [True: 0, False: 0]
  ------------------
  456|      0|                blocks -= ctr32;
  457|      0|                buflen = blocks * 16;
  458|      0|                ctr32 = 0;
  459|      0|            }
  460|      0|            ctr96_inc(ctr->V);
  461|      0|        }
  462|  26.1k|        PUTU32(ctr->V + 12, ctr32);
  ------------------
  |  |   99|  26.1k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  463|       |
  464|  26.1k|        if (!EVP_CipherUpdate(ctr->ctx_ctr, out, &outl, out, buflen)
  ------------------
  |  Branch (464:13): [True: 0, False: 26.1k]
  ------------------
  465|  26.1k|            || outl != buflen)
  ------------------
  |  Branch (465:16): [True: 0, False: 26.1k]
  ------------------
  466|      0|            return 0;
  467|       |
  468|  26.1k|        out += buflen;
  469|  26.1k|        outlen -= buflen;
  470|  26.1k|    } while (outlen);
  ------------------
  |  Branch (470:14): [True: 0, False: 26.1k]
  ------------------
  471|       |
  472|  26.1k|    if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (472:9): [True: 0, False: 26.1k]
  ------------------
  473|      0|        return 0;
  474|  26.1k|    return 1;
  475|  26.1k|}
drbg_ctr.c:drbg_ctr_free:
  656|  1.65k|{
  657|  1.65k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  658|  1.65k|    PROV_DRBG_CTR *ctr;
  659|       |
  660|  1.65k|    if (drbg != NULL && (ctr = (PROV_DRBG_CTR *)drbg->data) != NULL) {
  ------------------
  |  Branch (660:9): [True: 1.65k, False: 0]
  |  Branch (660:25): [True: 1.65k, False: 0]
  ------------------
  661|  1.65k|        EVP_CIPHER_CTX_free(ctr->ctx_ecb);
  662|  1.65k|        EVP_CIPHER_CTX_free(ctr->ctx_ctr);
  663|  1.65k|        EVP_CIPHER_CTX_free(ctr->ctx_df);
  664|  1.65k|        EVP_CIPHER_free(ctr->cipher_ecb);
  665|  1.65k|        EVP_CIPHER_free(ctr->cipher_ctr);
  666|       |
  667|  1.65k|        OPENSSL_secure_clear_free(ctr, sizeof(*ctr));
  ------------------
  |  |  149|  1.65k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  668|  1.65k|    }
  669|  1.65k|    ossl_rand_drbg_free(drbg);
  670|  1.65k|}
drbg_ctr.c:drbg_ctr_instantiate_wrapper:
  344|  1.65k|{
  345|  1.65k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  346|  1.65k|    struct drbg_set_ctx_params_st p;
  347|  1.65k|    int ret = 0;
  348|       |
  349|  1.65k|    if (drbg == NULL || !drbg_ctr_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (349:9): [True: 0, False: 1.65k]
  |  Branch (349:25): [True: 0, False: 1.65k]
  ------------------
  350|      0|        return 0;
  351|       |
  352|  1.65k|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (352:9): [True: 0, False: 1.65k]
  |  Branch (352:31): [True: 0, False: 0]
  ------------------
  353|      0|        return 0;
  354|       |
  355|  1.65k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (355:9): [True: 0, False: 1.65k]
  ------------------
  356|  1.65k|        || !drbg_ctr_set_ctx_params_locked(drbg, &p))
  ------------------
  |  Branch (356:12): [True: 0, False: 1.65k]
  ------------------
  357|      0|        goto err;
  358|  1.65k|    ret = ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
  359|  1.65k|        pstr, pstr_len);
  360|  1.65k|err:
  361|  1.65k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (361:9): [True: 0, False: 1.65k]
  ------------------
  362|      0|        CRYPTO_THREAD_unlock(drbg->lock);
  363|  1.65k|    return ret;
  364|  1.65k|}
drbg_ctr.c:drbg_ctr_set_ctx_params_decoder:
 1180|  1.65k|{
 1181|  1.65k|    const char *s;
 1182|       |
 1183|  1.65k|    memset(r, 0, sizeof(*r));
 1184|  1.65k|    if (p != NULL)
  ------------------
  |  Branch (1184:9): [True: 1.65k, False: 0]
  ------------------
 1185|  9.91k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (1185:16): [True: 8.26k, False: 1.65k]
  ------------------
 1186|  8.26k|            switch(s[0]) {
 1187|      0|            default:
  ------------------
  |  Branch (1187:13): [True: 0, False: 8.26k]
  ------------------
 1188|      0|                break;
 1189|  1.65k|            case 'c':
  ------------------
  |  Branch (1189:13): [True: 1.65k, False: 6.61k]
  ------------------
 1190|  1.65k|                if (ossl_likely(strcmp("ipher", s + 1) == 0)) {
  ------------------
  |  |   22|  1.65k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
 1191|       |                    /* OSSL_DRBG_PARAM_CIPHER */
 1192|  1.65k|                    if (ossl_unlikely(r->cipher != NULL)) {
  ------------------
  |  |   23|  1.65k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 1193|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1194|      0|                                       "param %s is repeated", s);
 1195|      0|                        return 0;
 1196|      0|                    }
 1197|  1.65k|                    r->cipher = (OSSL_PARAM *)p;
 1198|  1.65k|                }
 1199|  1.65k|                break;
 1200|  1.65k|            case 'p':
  ------------------
  |  Branch (1200:13): [True: 1.65k, False: 6.61k]
  ------------------
 1201|  1.65k|                switch(s[1]) {
 1202|      0|                default:
  ------------------
  |  Branch (1202:17): [True: 0, False: 1.65k]
  ------------------
 1203|      0|                    break;
 1204|  1.65k|                case 'r':
  ------------------
  |  Branch (1204:17): [True: 1.65k, False: 0]
  ------------------
 1205|  1.65k|                    switch(s[2]) {
 1206|      0|                    default:
  ------------------
  |  Branch (1206:21): [True: 0, False: 1.65k]
  ------------------
 1207|      0|                        break;
 1208|  1.65k|                    case 'o':
  ------------------
  |  Branch (1208:21): [True: 1.65k, False: 0]
  ------------------
 1209|  1.65k|                        switch(s[3]) {
 1210|      0|                        default:
  ------------------
  |  Branch (1210:25): [True: 0, False: 1.65k]
  ------------------
 1211|      0|                            break;
 1212|      0|                        case 'p':
  ------------------
  |  Branch (1212:25): [True: 0, False: 1.65k]
  ------------------
 1213|      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]
  |  |  ------------------
  ------------------
 1214|       |                                /* OSSL_DRBG_PARAM_PROPERTIES */
 1215|      0|                                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1216|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1217|      0|                                                   "param %s is repeated", s);
 1218|      0|                                    return 0;
 1219|      0|                                }
 1220|      0|                                r->propq = (OSSL_PARAM *)p;
 1221|      0|                            }
 1222|      0|                            break;
 1223|  1.65k|                        case 'v':
  ------------------
  |  Branch (1223:25): [True: 1.65k, False: 0]
  ------------------
 1224|  1.65k|                            if (ossl_likely(strcmp("ider-name", s + 4) == 0)) {
  ------------------
  |  |   22|  1.65k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
 1225|       |                                /* OSSL_PROV_PARAM_CORE_PROV_NAME */
 1226|  1.65k|                                if (ossl_unlikely(r->prov != NULL)) {
  ------------------
  |  |   23|  1.65k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 1227|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1228|      0|                                                   "param %s is repeated", s);
 1229|      0|                                    return 0;
 1230|      0|                                }
 1231|  1.65k|                                r->prov = (OSSL_PARAM *)p;
 1232|  1.65k|                            }
 1233|  1.65k|                        }
 1234|  1.65k|                    }
 1235|  1.65k|                }
 1236|  1.65k|                break;
 1237|  3.30k|            case 'r':
  ------------------
  |  Branch (1237:13): [True: 3.30k, False: 4.95k]
  ------------------
 1238|  3.30k|                switch(s[1]) {
 1239|      0|                default:
  ------------------
  |  Branch (1239:17): [True: 0, False: 3.30k]
  ------------------
 1240|      0|                    break;
 1241|  3.30k|                case 'e':
  ------------------
  |  Branch (1241:17): [True: 3.30k, False: 0]
  ------------------
 1242|  3.30k|                    switch(s[2]) {
 1243|      0|                    default:
  ------------------
  |  Branch (1243:21): [True: 0, False: 3.30k]
  ------------------
 1244|      0|                        break;
 1245|  3.30k|                    case 's':
  ------------------
  |  Branch (1245:21): [True: 3.30k, False: 0]
  ------------------
 1246|  3.30k|                        switch(s[3]) {
 1247|      0|                        default:
  ------------------
  |  Branch (1247:25): [True: 0, False: 3.30k]
  ------------------
 1248|      0|                            break;
 1249|  3.30k|                        case 'e':
  ------------------
  |  Branch (1249:25): [True: 3.30k, False: 0]
  ------------------
 1250|  3.30k|                            switch(s[4]) {
 1251|      0|                            default:
  ------------------
  |  Branch (1251:29): [True: 0, False: 3.30k]
  ------------------
 1252|      0|                                break;
 1253|  3.30k|                            case 'e':
  ------------------
  |  Branch (1253:29): [True: 3.30k, False: 0]
  ------------------
 1254|  3.30k|                                switch(s[5]) {
 1255|      0|                                default:
  ------------------
  |  Branch (1255:33): [True: 0, False: 3.30k]
  ------------------
 1256|      0|                                    break;
 1257|  3.30k|                                case 'd':
  ------------------
  |  Branch (1257:33): [True: 3.30k, False: 0]
  ------------------
 1258|  3.30k|                                    switch(s[6]) {
 1259|      0|                                    default:
  ------------------
  |  Branch (1259:37): [True: 0, False: 3.30k]
  ------------------
 1260|      0|                                        break;
 1261|  3.30k|                                    case '_':
  ------------------
  |  Branch (1261:37): [True: 3.30k, False: 0]
  ------------------
 1262|  3.30k|                                        switch(s[7]) {
 1263|      0|                                        default:
  ------------------
  |  Branch (1263:41): [True: 0, False: 3.30k]
  ------------------
 1264|      0|                                            break;
 1265|  1.65k|                                        case 'r':
  ------------------
  |  Branch (1265:41): [True: 1.65k, False: 1.65k]
  ------------------
 1266|  1.65k|                                            if (ossl_likely(strcmp("equests", s + 8) == 0)) {
  ------------------
  |  |   22|  1.65k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
 1267|       |                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
 1268|  1.65k|                                                if (ossl_unlikely(r->reseed_req != NULL)) {
  ------------------
  |  |   23|  1.65k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 1269|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1270|      0|                                                                   "param %s is repeated", s);
 1271|      0|                                                    return 0;
 1272|      0|                                                }
 1273|  1.65k|                                                r->reseed_req = (OSSL_PARAM *)p;
 1274|  1.65k|                                            }
 1275|  1.65k|                                            break;
 1276|  1.65k|                                        case 't':
  ------------------
  |  Branch (1276:41): [True: 1.65k, False: 1.65k]
  ------------------
 1277|  1.65k|                                            if (ossl_likely(strcmp("ime_interval", s + 8) == 0)) {
  ------------------
  |  |   22|  1.65k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
 1278|       |                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
 1279|  1.65k|                                                if (ossl_unlikely(r->reseed_time != NULL)) {
  ------------------
  |  |   23|  1.65k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 1280|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1281|      0|                                                                   "param %s is repeated", s);
 1282|      0|                                                    return 0;
 1283|      0|                                                }
 1284|  1.65k|                                                r->reseed_time = (OSSL_PARAM *)p;
 1285|  1.65k|                                            }
 1286|  3.30k|                                        }
 1287|  3.30k|                                    }
 1288|  3.30k|                                }
 1289|  3.30k|                            }
 1290|  3.30k|                        }
 1291|  3.30k|                    }
 1292|  3.30k|                }
 1293|  3.30k|                break;
 1294|  3.30k|            case 'u':
  ------------------
  |  Branch (1294:13): [True: 1.65k, False: 6.61k]
  ------------------
 1295|  1.65k|                if (ossl_likely(strcmp("se_derivation_function", s + 1) == 0)) {
  ------------------
  |  |   22|  1.65k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
 1296|       |                    /* OSSL_DRBG_PARAM_USE_DF */
 1297|  1.65k|                    if (ossl_unlikely(r->df != NULL)) {
  ------------------
  |  |   23|  1.65k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 1298|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1299|      0|                                       "param %s is repeated", s);
 1300|      0|                        return 0;
 1301|      0|                    }
 1302|  1.65k|                    r->df = (OSSL_PARAM *)p;
 1303|  1.65k|                }
 1304|  8.26k|            }
 1305|  1.65k|    return 1;
 1306|  1.65k|}
drbg_ctr.c:drbg_ctr_set_ctx_params_locked:
 1063|  1.65k|{
 1064|  1.65k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)ctx->data;
 1065|  1.65k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
  ------------------
  |  |   31|  1.65k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
 1066|  1.65k|    OSSL_PROVIDER *prov = NULL;
 1067|  1.65k|    char *ecb;
 1068|  1.65k|    const char *propquery = NULL;
 1069|  1.65k|    int i, cipher_init = 0;
 1070|       |
 1071|  1.65k|    if (p->df != NULL && OSSL_PARAM_get_int(p->df, &i)) {
  ------------------
  |  Branch (1071:9): [True: 1.65k, False: 0]
  |  Branch (1071:26): [True: 1.65k, False: 0]
  ------------------
 1072|       |        /* FIPS errors out in the drbg_ctr_init() call later */
 1073|  1.65k|        ctr->use_df = i != 0;
 1074|  1.65k|        cipher_init = 1;
 1075|  1.65k|    }
 1076|       |
 1077|  1.65k|    if (p->propq != NULL) {
  ------------------
  |  Branch (1077:9): [True: 0, False: 1.65k]
  ------------------
 1078|      0|        if (p->propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1078:13): [True: 0, False: 0]
  ------------------
 1079|      0|            return 0;
 1080|      0|        propquery = (const char *)p->propq->data;
 1081|      0|    }
 1082|       |
 1083|  1.65k|    if (p->prov != NULL) {
  ------------------
  |  Branch (1083:9): [True: 1.65k, False: 0]
  ------------------
 1084|  1.65k|        if (p->prov->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|  1.65k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1084:13): [True: 0, False: 1.65k]
  ------------------
 1085|      0|            return 0;
 1086|  1.65k|        if ((prov = ossl_provider_find(libctx,
  ------------------
  |  Branch (1086:13): [True: 0, False: 1.65k]
  ------------------
 1087|  1.65k|                 (const char *)p->prov->data, 1))
 1088|  1.65k|            == NULL)
 1089|      0|            return 0;
 1090|  1.65k|    }
 1091|       |
 1092|  1.65k|    if (p->cipher != NULL) {
  ------------------
  |  Branch (1092:9): [True: 1.65k, False: 0]
  ------------------
 1093|  1.65k|        const char *base = (const char *)p->cipher->data;
 1094|  1.65k|        size_t ctr_str_len = sizeof("CTR") - 1;
 1095|  1.65k|        size_t ecb_str_len = sizeof("ECB") - 1;
 1096|       |
 1097|  1.65k|        if (p->cipher->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|  3.30k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1097:13): [True: 0, False: 1.65k]
  ------------------
 1098|  1.65k|            || p->cipher->data_size < ctr_str_len) {
  ------------------
  |  Branch (1098:16): [True: 0, False: 1.65k]
  ------------------
 1099|      0|            ossl_provider_free(prov);
 1100|      0|            return 0;
 1101|      0|        }
 1102|  1.65k|        if (OPENSSL_strcasecmp("CTR", base + p->cipher->data_size - ctr_str_len) != 0) {
  ------------------
  |  Branch (1102:13): [True: 0, False: 1.65k]
  ------------------
 1103|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_REQUIRE_CTR_MODE_CIPHER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1104|      0|            ossl_provider_free(prov);
 1105|      0|            return 0;
 1106|      0|        }
 1107|  1.65k|        if ((ecb = OPENSSL_strndup(base, p->cipher->data_size)) == NULL) {
  ------------------
  |  |  137|  1.65k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1107:13): [True: 0, False: 1.65k]
  ------------------
 1108|      0|            ossl_provider_free(prov);
 1109|      0|            return 0;
 1110|      0|        }
 1111|  1.65k|        strcpy(ecb + p->cipher->data_size - ecb_str_len, "ECB");
 1112|  1.65k|        EVP_CIPHER_free(ctr->cipher_ecb);
 1113|  1.65k|        EVP_CIPHER_free(ctr->cipher_ctr);
 1114|       |        /*
 1115|       |         * Try to fetch algorithms from our own provider code, fallback
 1116|       |         * to generic fetch only if that fails
 1117|       |         */
 1118|  1.65k|        (void)ERR_set_mark();
 1119|  1.65k|        ctr->cipher_ctr = evp_cipher_fetch_from_prov(prov, base, NULL);
 1120|  1.65k|        if (ctr->cipher_ctr == NULL) {
  ------------------
  |  Branch (1120:13): [True: 0, False: 1.65k]
  ------------------
 1121|      0|            (void)ERR_pop_to_mark();
 1122|      0|            ctr->cipher_ctr = EVP_CIPHER_fetch(libctx, base, propquery);
 1123|  1.65k|        } else {
 1124|  1.65k|            (void)ERR_clear_last_mark();
 1125|  1.65k|        }
 1126|  1.65k|        (void)ERR_set_mark();
 1127|  1.65k|        ctr->cipher_ecb = evp_cipher_fetch_from_prov(prov, ecb, NULL);
 1128|  1.65k|        if (ctr->cipher_ecb == NULL) {
  ------------------
  |  Branch (1128:13): [True: 0, False: 1.65k]
  ------------------
 1129|      0|            (void)ERR_pop_to_mark();
 1130|      0|            ctr->cipher_ecb = EVP_CIPHER_fetch(libctx, ecb, propquery);
 1131|  1.65k|        } else {
 1132|  1.65k|            (void)ERR_clear_last_mark();
 1133|  1.65k|        }
 1134|  1.65k|        OPENSSL_free(ecb);
  ------------------
  |  |  131|  1.65k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1135|  1.65k|        if (ctr->cipher_ctr == NULL || ctr->cipher_ecb == NULL) {
  ------------------
  |  Branch (1135:13): [True: 0, False: 1.65k]
  |  Branch (1135:40): [True: 0, False: 1.65k]
  ------------------
 1136|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_FIND_CIPHERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1137|      0|            ossl_provider_free(prov);
 1138|      0|            return 0;
 1139|      0|        }
 1140|  1.65k|        cipher_init = 1;
 1141|  1.65k|    }
 1142|  1.65k|    ossl_provider_free(prov);
 1143|       |
 1144|  1.65k|    if (cipher_init && !drbg_ctr_init(ctx))
  ------------------
  |  Branch (1144:9): [True: 1.65k, False: 0]
  |  Branch (1144:24): [True: 0, False: 1.65k]
  ------------------
 1145|      0|        return 0;
 1146|       |
 1147|  1.65k|    return ossl_drbg_set_ctx_params(ctx, p);
 1148|  1.65k|}
drbg_ctr.c:drbg_ctr_init:
  572|  1.65k|{
  573|  1.65k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  574|  1.65k|    size_t keylen;
  575|       |
  576|  1.65k|    if (ctr->cipher_ctr == NULL) {
  ------------------
  |  Branch (576:9): [True: 0, False: 1.65k]
  ------------------
  577|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_CIPHER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  578|      0|        return 0;
  579|      0|    }
  580|  1.65k|    ctr->keylen = keylen = EVP_CIPHER_get_key_length(ctr->cipher_ctr);
  581|  1.65k|    if (ctr->ctx_ecb == NULL)
  ------------------
  |  Branch (581:9): [True: 1.65k, False: 0]
  ------------------
  582|  1.65k|        ctr->ctx_ecb = EVP_CIPHER_CTX_new();
  583|  1.65k|    if (ctr->ctx_ctr == NULL)
  ------------------
  |  Branch (583:9): [True: 1.65k, False: 0]
  ------------------
  584|  1.65k|        ctr->ctx_ctr = EVP_CIPHER_CTX_new();
  585|  1.65k|    if (ctr->ctx_ecb == NULL || ctr->ctx_ctr == NULL) {
  ------------------
  |  Branch (585:9): [True: 0, False: 1.65k]
  |  Branch (585:33): [True: 0, False: 1.65k]
  ------------------
  586|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  587|      0|        goto err;
  588|      0|    }
  589|       |
  590|  1.65k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb,
  ------------------
  |  Branch (590:9): [True: 0, False: 1.65k]
  ------------------
  591|  1.65k|            ctr->cipher_ecb, NULL, NULL, NULL, 1)
  592|  1.65k|        || !EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (592:12): [True: 0, False: 1.65k]
  ------------------
  593|  1.65k|            ctr->cipher_ctr, NULL, NULL, NULL, 1)) {
  594|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_INITIALISE_CIPHERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  595|      0|        goto err;
  596|      0|    }
  597|       |
  598|  1.65k|    drbg->strength = (unsigned int)(keylen * 8);
  599|  1.65k|    drbg->seedlen = keylen + 16;
  600|       |
  601|  1.65k|    if (ctr->use_df) {
  ------------------
  |  Branch (601:9): [True: 1.65k, False: 0]
  ------------------
  602|       |        /* df initialisation */
  603|  1.65k|        static const unsigned char df_key[32] = {
  604|  1.65k|            0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  605|  1.65k|            0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
  606|  1.65k|            0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
  607|  1.65k|            0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
  608|  1.65k|        };
  609|       |
  610|  1.65k|        if (ctr->ctx_df == NULL)
  ------------------
  |  Branch (610:13): [True: 1.65k, False: 0]
  ------------------
  611|  1.65k|            ctr->ctx_df = EVP_CIPHER_CTX_new();
  612|  1.65k|        if (ctr->ctx_df == NULL) {
  ------------------
  |  Branch (612:13): [True: 0, False: 1.65k]
  ------------------
  613|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  614|      0|            goto err;
  615|      0|        }
  616|       |        /* Set key schedule for df_key */
  617|  1.65k|        if (!EVP_CipherInit_ex(ctr->ctx_df,
  ------------------
  |  Branch (617:13): [True: 0, False: 1.65k]
  ------------------
  618|  1.65k|                ctr->cipher_ecb, NULL, df_key, NULL, 1)) {
  619|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_DERIVATION_FUNCTION_INIT_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  620|      0|            goto err;
  621|      0|        }
  622|  1.65k|    }
  623|  1.65k|    return drbg_ctr_init_lengths(drbg);
  624|       |
  625|      0|err:
  626|      0|    EVP_CIPHER_CTX_free(ctr->ctx_ecb);
  627|      0|    EVP_CIPHER_CTX_free(ctr->ctx_ctr);
  628|       |    ctr->ctx_ecb = ctr->ctx_ctr = NULL;
  629|      0|    return 0;
  630|  1.65k|}
drbg_ctr.c:drbg_ctr_generate_wrapper:
  480|  23.9k|{
  481|  23.9k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  482|       |
  483|  23.9k|    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
  484|  23.9k|        prediction_resistance, adin, adin_len);
  485|  23.9k|}
drbg_ctr.c:drbg_ctr_settable_ctx_params:
 1333|  1.65k|{
 1334|  1.65k|    return drbg_ctr_set_ctx_params_list;
 1335|  1.65k|}
drbg_ctr.c:drbg_ctr_get_ctx_params:
 1017|  58.2k|{
 1018|  58.2k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 1019|  58.2k|    PROV_DRBG_CTR *ctr;
 1020|  58.2k|    struct drbg_ctr_get_ctx_params_st p;
 1021|  58.2k|    int ret = 0, complete = 0;
 1022|       |
 1023|  58.2k|    if (drbg == NULL || !drbg_ctr_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (1023:9): [True: 0, False: 58.2k]
  |  Branch (1023:25): [True: 0, False: 58.2k]
  ------------------
 1024|      0|        return 0;
 1025|       |
 1026|  58.2k|    if (!ossl_drbg_get_ctx_params_no_lock(drbg, &p, params, &complete))
  ------------------
  |  Branch (1026:9): [True: 0, False: 58.2k]
  ------------------
 1027|      0|        return 0;
 1028|       |
 1029|  58.2k|    if (complete)
  ------------------
  |  Branch (1029:9): [True: 48.9k, False: 9.27k]
  ------------------
 1030|  48.9k|        return 1;
 1031|       |
 1032|  9.27k|    ctr = (PROV_DRBG_CTR *)drbg->data;
 1033|       |
 1034|  9.27k|    if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock))
  ------------------
  |  Branch (1034:9): [True: 9.27k, False: 0]
  |  Branch (1034:31): [True: 0, False: 9.27k]
  ------------------
 1035|      0|        return 0;
 1036|       |
 1037|  9.27k|    if (p.df != NULL && !OSSL_PARAM_set_int(p.df, ctr->use_df))
  ------------------
  |  Branch (1037:9): [True: 0, False: 9.27k]
  |  Branch (1037:25): [True: 0, False: 0]
  ------------------
 1038|      0|        goto err;
 1039|       |
 1040|  9.27k|    if (p.cipher != NULL) {
  ------------------
  |  Branch (1040:9): [True: 0, False: 9.27k]
  ------------------
 1041|      0|        if (ctr->cipher_ctr == NULL
  ------------------
  |  Branch (1041:13): [True: 0, False: 0]
  ------------------
 1042|      0|            || !OSSL_PARAM_set_utf8_string(p.cipher,
  ------------------
  |  Branch (1042:16): [True: 0, False: 0]
  ------------------
 1043|      0|                EVP_CIPHER_get0_name(ctr->cipher_ctr)))
 1044|      0|            goto err;
 1045|      0|    }
 1046|       |
 1047|  9.27k|    ret = ossl_drbg_get_ctx_params(drbg, &p);
 1048|  9.27k|err:
 1049|  9.27k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (1049:9): [True: 9.27k, False: 0]
  ------------------
 1050|  9.27k|        CRYPTO_THREAD_unlock(drbg->lock);
 1051|       |
 1052|  9.27k|    return ret;
 1053|  9.27k|}
drbg_ctr.c:drbg_ctr_get_ctx_params_decoder:
  726|  58.2k|{
  727|  58.2k|    const char *s;
  728|       |
  729|  58.2k|    memset(r, 0, sizeof(*r));
  730|  58.2k|    if (p != NULL)
  ------------------
  |  Branch (730:9): [True: 58.2k, False: 0]
  ------------------
  731|   116k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (731:16): [True: 58.2k, False: 58.2k]
  ------------------
  732|  58.2k|            switch(s[0]) {
  733|      0|            default:
  ------------------
  |  Branch (733:13): [True: 0, False: 58.2k]
  ------------------
  734|      0|                break;
  735|      0|            case 'c':
  ------------------
  |  Branch (735:13): [True: 0, False: 58.2k]
  ------------------
  736|      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]
  |  |  ------------------
  ------------------
  737|       |                    /* OSSL_DRBG_PARAM_CIPHER */
  738|      0|                    if (ossl_unlikely(r->cipher != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  739|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  740|      0|                                       "param %s is repeated", s);
  741|      0|                        return 0;
  742|      0|                    }
  743|      0|                    r->cipher = (OSSL_PARAM *)p;
  744|      0|                }
  745|      0|                break;
  746|      0|            case 'f':
  ------------------
  |  Branch (746:13): [True: 0, False: 58.2k]
  ------------------
  747|       |# if defined(FIPS_MODULE)
  748|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
  749|       |                    /* OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR */
  750|       |                    if (ossl_unlikely(r->ind != NULL)) {
  751|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  752|       |                                       "param %s is repeated", s);
  753|       |                        return 0;
  754|       |                    }
  755|       |                    r->ind = (OSSL_PARAM *)p;
  756|       |                }
  757|       |# endif
  758|      0|                break;
  759|  23.9k|            case 'm':
  ------------------
  |  Branch (759:13): [True: 23.9k, False: 34.2k]
  ------------------
  760|  23.9k|                switch(s[1]) {
  761|      0|                default:
  ------------------
  |  Branch (761:17): [True: 0, False: 23.9k]
  ------------------
  762|      0|                    break;
  763|  23.9k|                case 'a':
  ------------------
  |  Branch (763:17): [True: 23.9k, False: 0]
  ------------------
  764|  23.9k|                    switch(s[2]) {
  765|      0|                    default:
  ------------------
  |  Branch (765:21): [True: 0, False: 23.9k]
  ------------------
  766|      0|                        break;
  767|  23.9k|                    case 'x':
  ------------------
  |  Branch (767:21): [True: 23.9k, False: 0]
  ------------------
  768|  23.9k|                        switch(s[3]) {
  769|      0|                        default:
  ------------------
  |  Branch (769:25): [True: 0, False: 23.9k]
  ------------------
  770|      0|                            break;
  771|  23.9k|                        case '_':
  ------------------
  |  Branch (771:25): [True: 23.9k, False: 0]
  ------------------
  772|  23.9k|                            switch(s[4]) {
  773|      0|                            default:
  ------------------
  |  Branch (773:29): [True: 0, False: 23.9k]
  ------------------
  774|      0|                                break;
  775|      0|                            case 'a':
  ------------------
  |  Branch (775:29): [True: 0, False: 23.9k]
  ------------------
  776|      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]
  |  |  ------------------
  ------------------
  777|       |                                    /* OSSL_DRBG_PARAM_MAX_ADINLEN */
  778|      0|                                    if (ossl_unlikely(r->maxadlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  779|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  780|      0|                                                       "param %s is repeated", s);
  781|      0|                                        return 0;
  782|      0|                                    }
  783|      0|                                    r->maxadlen = (OSSL_PARAM *)p;
  784|      0|                                }
  785|      0|                                break;
  786|      0|                            case 'e':
  ------------------
  |  Branch (786:29): [True: 0, False: 23.9k]
  ------------------
  787|      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]
  |  |  ------------------
  ------------------
  788|       |                                    /* OSSL_DRBG_PARAM_MAX_ENTROPYLEN */
  789|      0|                                    if (ossl_unlikely(r->maxentlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  790|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  791|      0|                                                       "param %s is repeated", s);
  792|      0|                                        return 0;
  793|      0|                                    }
  794|      0|                                    r->maxentlen = (OSSL_PARAM *)p;
  795|      0|                                }
  796|      0|                                break;
  797|      0|                            case 'n':
  ------------------
  |  Branch (797:29): [True: 0, False: 23.9k]
  ------------------
  798|      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]
  |  |  ------------------
  ------------------
  799|       |                                    /* OSSL_DRBG_PARAM_MAX_NONCELEN */
  800|      0|                                    if (ossl_unlikely(r->maxnonlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  801|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  802|      0|                                                       "param %s is repeated", s);
  803|      0|                                        return 0;
  804|      0|                                    }
  805|      0|                                    r->maxnonlen = (OSSL_PARAM *)p;
  806|      0|                                }
  807|      0|                                break;
  808|      0|                            case 'p':
  ------------------
  |  Branch (808:29): [True: 0, False: 23.9k]
  ------------------
  809|      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]
  |  |  ------------------
  ------------------
  810|       |                                    /* OSSL_DRBG_PARAM_MAX_PERSLEN */
  811|      0|                                    if (ossl_unlikely(r->maxperlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  812|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  813|      0|                                                       "param %s is repeated", s);
  814|      0|                                        return 0;
  815|      0|                                    }
  816|      0|                                    r->maxperlen = (OSSL_PARAM *)p;
  817|      0|                                }
  818|      0|                                break;
  819|  23.9k|                            case 'r':
  ------------------
  |  Branch (819:29): [True: 23.9k, False: 0]
  ------------------
  820|  23.9k|                                if (ossl_likely(strcmp("equest", s + 5) == 0)) {
  ------------------
  |  |   22|  23.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 23.9k, False: 0]
  |  |  ------------------
  ------------------
  821|       |                                    /* OSSL_RAND_PARAM_MAX_REQUEST */
  822|  23.9k|                                    if (ossl_unlikely(r->maxreq != NULL)) {
  ------------------
  |  |   23|  23.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 23.9k]
  |  |  ------------------
  ------------------
  823|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  824|      0|                                                       "param %s is repeated", s);
  825|      0|                                        return 0;
  826|      0|                                    }
  827|  23.9k|                                    r->maxreq = (OSSL_PARAM *)p;
  828|  23.9k|                                }
  829|  23.9k|                            }
  830|  23.9k|                        }
  831|  23.9k|                    }
  832|  23.9k|                    break;
  833|  23.9k|                case 'i':
  ------------------
  |  Branch (833:17): [True: 0, False: 23.9k]
  ------------------
  834|      0|                    switch(s[2]) {
  835|      0|                    default:
  ------------------
  |  Branch (835:21): [True: 0, False: 0]
  ------------------
  836|      0|                        break;
  837|      0|                    case 'n':
  ------------------
  |  Branch (837:21): [True: 0, False: 0]
  ------------------
  838|      0|                        switch(s[3]) {
  839|      0|                        default:
  ------------------
  |  Branch (839:25): [True: 0, False: 0]
  ------------------
  840|      0|                            break;
  841|      0|                        case '_':
  ------------------
  |  Branch (841:25): [True: 0, False: 0]
  ------------------
  842|      0|                            switch(s[4]) {
  843|      0|                            default:
  ------------------
  |  Branch (843:29): [True: 0, False: 0]
  ------------------
  844|      0|                                break;
  845|      0|                            case 'e':
  ------------------
  |  Branch (845:29): [True: 0, False: 0]
  ------------------
  846|      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]
  |  |  ------------------
  ------------------
  847|       |                                    /* OSSL_DRBG_PARAM_MIN_ENTROPYLEN */
  848|      0|                                    if (ossl_unlikely(r->minentlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  849|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  850|      0|                                                       "param %s is repeated", s);
  851|      0|                                        return 0;
  852|      0|                                    }
  853|      0|                                    r->minentlen = (OSSL_PARAM *)p;
  854|      0|                                }
  855|      0|                                break;
  856|      0|                            case 'n':
  ------------------
  |  Branch (856:29): [True: 0, False: 0]
  ------------------
  857|      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]
  |  |  ------------------
  ------------------
  858|       |                                    /* OSSL_DRBG_PARAM_MIN_NONCELEN */
  859|      0|                                    if (ossl_unlikely(r->minnonlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  860|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  861|      0|                                                       "param %s is repeated", s);
  862|      0|                                        return 0;
  863|      0|                                    }
  864|      0|                                    r->minnonlen = (OSSL_PARAM *)p;
  865|      0|                                }
  866|      0|                            }
  867|      0|                        }
  868|      0|                    }
  869|  23.9k|                }
  870|  23.9k|                break;
  871|  25.0k|            case 'r':
  ------------------
  |  Branch (871:13): [True: 25.0k, False: 33.1k]
  ------------------
  872|  25.0k|                switch(s[1]) {
  873|      0|                default:
  ------------------
  |  Branch (873:17): [True: 0, False: 25.0k]
  ------------------
  874|      0|                    break;
  875|  25.0k|                case 'e':
  ------------------
  |  Branch (875:17): [True: 25.0k, False: 0]
  ------------------
  876|  25.0k|                    switch(s[2]) {
  877|      0|                    default:
  ------------------
  |  Branch (877:21): [True: 0, False: 25.0k]
  ------------------
  878|      0|                        break;
  879|  25.0k|                    case 's':
  ------------------
  |  Branch (879:21): [True: 25.0k, False: 0]
  ------------------
  880|  25.0k|                        switch(s[3]) {
  881|      0|                        default:
  ------------------
  |  Branch (881:25): [True: 0, False: 25.0k]
  ------------------
  882|      0|                            break;
  883|  25.0k|                        case 'e':
  ------------------
  |  Branch (883:25): [True: 25.0k, False: 0]
  ------------------
  884|  25.0k|                            switch(s[4]) {
  885|      0|                            default:
  ------------------
  |  Branch (885:29): [True: 0, False: 25.0k]
  ------------------
  886|      0|                                break;
  887|  25.0k|                            case 'e':
  ------------------
  |  Branch (887:29): [True: 25.0k, False: 0]
  ------------------
  888|  25.0k|                                switch(s[5]) {
  889|      0|                                default:
  ------------------
  |  Branch (889:33): [True: 0, False: 25.0k]
  ------------------
  890|      0|                                    break;
  891|  25.0k|                                case 'd':
  ------------------
  |  Branch (891:33): [True: 25.0k, False: 0]
  ------------------
  892|  25.0k|                                    switch(s[6]) {
  893|      0|                                    default:
  ------------------
  |  Branch (893:37): [True: 0, False: 25.0k]
  ------------------
  894|      0|                                        break;
  895|  25.0k|                                    case '_':
  ------------------
  |  Branch (895:37): [True: 25.0k, False: 0]
  ------------------
  896|  25.0k|                                        switch(s[7]) {
  897|      0|                                        default:
  ------------------
  |  Branch (897:41): [True: 0, False: 25.0k]
  ------------------
  898|      0|                                            break;
  899|  25.0k|                                        case 'c':
  ------------------
  |  Branch (899:41): [True: 25.0k, False: 0]
  ------------------
  900|  25.0k|                                            if (ossl_likely(strcmp("ounter", s + 8) == 0)) {
  ------------------
  |  |   22|  25.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 25.0k, False: 0]
  |  |  ------------------
  ------------------
  901|       |                                                /* OSSL_DRBG_PARAM_RESEED_COUNTER */
  902|  25.0k|                                                if (ossl_unlikely(r->reseed_cnt != NULL)) {
  ------------------
  |  |   23|  25.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 25.0k]
  |  |  ------------------
  ------------------
  903|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  904|      0|                                                                   "param %s is repeated", s);
  905|      0|                                                    return 0;
  906|      0|                                                }
  907|  25.0k|                                                r->reseed_cnt = (OSSL_PARAM *)p;
  908|  25.0k|                                            }
  909|  25.0k|                                            break;
  910|  25.0k|                                        case 'r':
  ------------------
  |  Branch (910:41): [True: 0, False: 25.0k]
  ------------------
  911|      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]
  |  |  ------------------
  ------------------
  912|       |                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
  913|      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]
  |  |  ------------------
  ------------------
  914|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  915|      0|                                                                   "param %s is repeated", s);
  916|      0|                                                    return 0;
  917|      0|                                                }
  918|      0|                                                r->reseed_req = (OSSL_PARAM *)p;
  919|      0|                                            }
  920|      0|                                            break;
  921|      0|                                        case 't':
  ------------------
  |  Branch (921:41): [True: 0, False: 25.0k]
  ------------------
  922|      0|                                            switch(s[8]) {
  923|      0|                                            default:
  ------------------
  |  Branch (923:45): [True: 0, False: 0]
  ------------------
  924|      0|                                                break;
  925|      0|                                            case 'i':
  ------------------
  |  Branch (925:45): [True: 0, False: 0]
  ------------------
  926|      0|                                                switch(s[9]) {
  927|      0|                                                default:
  ------------------
  |  Branch (927:49): [True: 0, False: 0]
  ------------------
  928|      0|                                                    break;
  929|      0|                                                case 'm':
  ------------------
  |  Branch (929:49): [True: 0, False: 0]
  ------------------
  930|      0|                                                    switch(s[10]) {
  931|      0|                                                    default:
  ------------------
  |  Branch (931:53): [True: 0, False: 0]
  ------------------
  932|      0|                                                        break;
  933|      0|                                                    case 'e':
  ------------------
  |  Branch (933:53): [True: 0, False: 0]
  ------------------
  934|      0|                                                        switch(s[11]) {
  935|      0|                                                        default:
  ------------------
  |  Branch (935:57): [True: 0, False: 0]
  ------------------
  936|      0|                                                            break;
  937|      0|                                                        case '_':
  ------------------
  |  Branch (937:57): [True: 0, False: 0]
  ------------------
  938|      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]
  |  |  ------------------
  ------------------
  939|       |                                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
  940|      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]
  |  |  ------------------
  ------------------
  941|      0|                                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  942|      0|                                                                                   "param %s is repeated", s);
  943|      0|                                                                    return 0;
  944|      0|                                                                }
  945|      0|                                                                r->reseed_int = (OSSL_PARAM *)p;
  946|      0|                                                            }
  947|      0|                                                            break;
  948|      0|                                                        case '\0':
  ------------------
  |  Branch (948:57): [True: 0, False: 0]
  ------------------
  949|      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]
  |  |  ------------------
  ------------------
  950|      0|                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  951|      0|                                                                               "param %s is repeated", s);
  952|      0|                                                                return 0;
  953|      0|                                                            }
  954|      0|                                                            r->reseed_time = (OSSL_PARAM *)p;
  955|      0|                                                        }
  956|      0|                                                    }
  957|      0|                                                }
  958|      0|                                            }
  959|  25.0k|                                        }
  960|  25.0k|                                    }
  961|  25.0k|                                }
  962|  25.0k|                            }
  963|  25.0k|                        }
  964|  25.0k|                    }
  965|  25.0k|                }
  966|  25.0k|                break;
  967|  25.0k|            case 's':
  ------------------
  |  Branch (967:13): [True: 9.27k, False: 48.9k]
  ------------------
  968|  9.27k|                switch(s[1]) {
  969|      0|                default:
  ------------------
  |  Branch (969:17): [True: 0, False: 9.27k]
  ------------------
  970|      0|                    break;
  971|  9.27k|                case 't':
  ------------------
  |  Branch (971:17): [True: 9.27k, False: 0]
  ------------------
  972|  9.27k|                    switch(s[2]) {
  973|      0|                    default:
  ------------------
  |  Branch (973:21): [True: 0, False: 9.27k]
  ------------------
  974|      0|                        break;
  975|  5.97k|                    case 'a':
  ------------------
  |  Branch (975:21): [True: 5.97k, False: 3.30k]
  ------------------
  976|  5.97k|                        if (ossl_likely(strcmp("te", s + 3) == 0)) {
  ------------------
  |  |   22|  5.97k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 5.97k, False: 0]
  |  |  ------------------
  ------------------
  977|       |                            /* OSSL_RAND_PARAM_STATE */
  978|  5.97k|                            if (ossl_unlikely(r->state != NULL)) {
  ------------------
  |  |   23|  5.97k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 5.97k]
  |  |  ------------------
  ------------------
  979|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  980|      0|                                               "param %s is repeated", s);
  981|      0|                                return 0;
  982|      0|                            }
  983|  5.97k|                            r->state = (OSSL_PARAM *)p;
  984|  5.97k|                        }
  985|  5.97k|                        break;
  986|  5.97k|                    case 'r':
  ------------------
  |  Branch (986:21): [True: 3.30k, False: 5.97k]
  ------------------
  987|  3.30k|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|  3.30k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.30k, False: 0]
  |  |  ------------------
  ------------------
  988|       |                            /* OSSL_RAND_PARAM_STRENGTH */
  989|  3.30k|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|  3.30k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.30k]
  |  |  ------------------
  ------------------
  990|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  991|      0|                                               "param %s is repeated", s);
  992|      0|                                return 0;
  993|      0|                            }
  994|  3.30k|                            r->str = (OSSL_PARAM *)p;
  995|  3.30k|                        }
  996|  9.27k|                    }
  997|  9.27k|                }
  998|  9.27k|                break;
  999|  9.27k|            case 'u':
  ------------------
  |  Branch (999:13): [True: 0, False: 58.2k]
  ------------------
 1000|      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]
  |  |  ------------------
  ------------------
 1001|       |                    /* OSSL_DRBG_PARAM_USE_DF */
 1002|      0|                    if (ossl_unlikely(r->df != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1003|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1004|      0|                                       "param %s is repeated", s);
 1005|      0|                        return 0;
 1006|      0|                    }
 1007|      0|                    r->df = (OSSL_PARAM *)p;
 1008|      0|                }
 1009|  58.2k|            }
 1010|  58.2k|    return 1;
 1011|  58.2k|}

seed_src.c:seed_src_new:
   51|    551|{
   52|    551|    PROV_SEED_SRC *s;
   53|       |
   54|    551|    if (parent != NULL) {
  ------------------
  |  Branch (54:9): [True: 0, False: 551]
  ------------------
   55|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_SEED_SOURCES_MUST_NOT_HAVE_A_PARENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   56|      0|        return NULL;
   57|      0|    }
   58|       |
   59|    551|    s = OPENSSL_zalloc(sizeof(*s));
  ------------------
  |  |  108|    551|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   60|    551|    if (s == NULL)
  ------------------
  |  Branch (60:9): [True: 0, False: 551]
  ------------------
   61|      0|        return NULL;
   62|       |
   63|    551|    s->provctx = provctx;
   64|    551|    s->state = EVP_RAND_STATE_UNINITIALISED;
  ------------------
  |  | 1345|    551|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
   65|    551|    return s;
   66|    551|}
seed_src.c:seed_src_free:
   69|    551|{
   70|    551|    OPENSSL_free(vseed);
  ------------------
  |  |  131|    551|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   71|    551|}
seed_src.c:seed_src_instantiate:
   77|    551|{
   78|    551|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
   79|       |
   80|    551|    s->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1346|    551|#define EVP_RAND_STATE_READY 1
  ------------------
   81|    551|    return 1;
   82|    551|}
seed_src.c:seed_src_enable_locking:
  294|    551|{
  295|    551|    return 1;
  296|    551|}
seed_src.c:seed_src_lock:
  299|  4.95k|{
  300|  4.95k|    return 1;
  301|  4.95k|}
seed_src.c:seed_src_unlock:
  304|  4.95k|{
  305|  4.95k|}
seed_src.c:seed_src_get_ctx_params:
  229|  3.30k|{
  230|  3.30k|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
  231|  3.30k|    struct seed_src_get_ctx_params_st p;
  232|       |
  233|  3.30k|    if (s == NULL || !seed_src_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (233:9): [True: 0, False: 3.30k]
  |  Branch (233:22): [True: 0, False: 3.30k]
  ------------------
  234|      0|        return 0;
  235|       |
  236|  3.30k|    if (p.state != NULL && !OSSL_PARAM_set_int(p.state, s->state))
  ------------------
  |  Branch (236:9): [True: 0, False: 3.30k]
  |  Branch (236:28): [True: 0, False: 0]
  ------------------
  237|      0|        return 0;
  238|       |
  239|  3.30k|    if (p.str != NULL && !OSSL_PARAM_set_uint(p.str, 1024))
  ------------------
  |  Branch (239:9): [True: 1.10k, False: 2.20k]
  |  Branch (239:26): [True: 0, False: 1.10k]
  ------------------
  240|      0|        return 0;
  241|       |
  242|  3.30k|    if (p.maxreq != NULL && !OSSL_PARAM_set_size_t(p.maxreq, 128))
  ------------------
  |  Branch (242:9): [True: 0, False: 3.30k]
  |  Branch (242:29): [True: 0, False: 0]
  ------------------
  243|      0|        return 0;
  244|  3.30k|    return 1;
  245|  3.30k|}
seed_src.c:seed_src_get_ctx_params_decoder:
  170|  3.30k|{
  171|  3.30k|    const char *s;
  172|       |
  173|  3.30k|    memset(r, 0, sizeof(*r));
  174|  3.30k|    if (p != NULL)
  ------------------
  |  Branch (174:9): [True: 3.30k, False: 0]
  ------------------
  175|  6.61k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (175:16): [True: 3.30k, False: 3.30k]
  ------------------
  176|  3.30k|            switch(s[0]) {
  177|  2.20k|            default:
  ------------------
  |  Branch (177:13): [True: 2.20k, False: 1.10k]
  ------------------
  178|  2.20k|                break;
  179|  2.20k|            case 'm':
  ------------------
  |  Branch (179:13): [True: 0, False: 3.30k]
  ------------------
  180|      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]
  |  |  ------------------
  ------------------
  181|       |                    /* OSSL_RAND_PARAM_MAX_REQUEST */
  182|      0|                    if (ossl_unlikely(r->maxreq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  183|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  184|      0|                                       "param %s is repeated", s);
  185|      0|                        return 0;
  186|      0|                    }
  187|      0|                    r->maxreq = (OSSL_PARAM *)p;
  188|      0|                }
  189|      0|                break;
  190|  1.10k|            case 's':
  ------------------
  |  Branch (190:13): [True: 1.10k, False: 2.20k]
  ------------------
  191|  1.10k|                switch(s[1]) {
  192|      0|                default:
  ------------------
  |  Branch (192:17): [True: 0, False: 1.10k]
  ------------------
  193|      0|                    break;
  194|  1.10k|                case 't':
  ------------------
  |  Branch (194:17): [True: 1.10k, False: 0]
  ------------------
  195|  1.10k|                    switch(s[2]) {
  196|      0|                    default:
  ------------------
  |  Branch (196:21): [True: 0, False: 1.10k]
  ------------------
  197|      0|                        break;
  198|      0|                    case 'a':
  ------------------
  |  Branch (198:21): [True: 0, False: 1.10k]
  ------------------
  199|      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]
  |  |  ------------------
  ------------------
  200|       |                            /* OSSL_RAND_PARAM_STATE */
  201|      0|                            if (ossl_unlikely(r->state != 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,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  203|      0|                                               "param %s is repeated", s);
  204|      0|                                return 0;
  205|      0|                            }
  206|      0|                            r->state = (OSSL_PARAM *)p;
  207|      0|                        }
  208|      0|                        break;
  209|  1.10k|                    case 'r':
  ------------------
  |  Branch (209:21): [True: 1.10k, False: 0]
  ------------------
  210|  1.10k|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|  1.10k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.10k, False: 0]
  |  |  ------------------
  ------------------
  211|       |                            /* OSSL_RAND_PARAM_STRENGTH */
  212|  1.10k|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|  1.10k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.10k]
  |  |  ------------------
  ------------------
  213|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  214|      0|                                               "param %s is repeated", s);
  215|      0|                                return 0;
  216|      0|                            }
  217|  1.10k|                            r->str = (OSSL_PARAM *)p;
  218|  1.10k|                        }
  219|  1.10k|                    }
  220|  1.10k|                }
  221|  3.30k|            }
  222|  3.30k|    return 1;
  223|  3.30k|}
seed_src.c:seed_get_seed:
  262|    551|{
  263|    551|    size_t ret = 0;
  264|    551|    size_t entropy_available = 0;
  265|    551|    RAND_POOL *pool;
  266|       |
  267|    551|    pool = ossl_rand_pool_new(entropy, 1, min_len, max_len);
  268|    551|    if (pool == NULL) {
  ------------------
  |  Branch (268:9): [True: 0, False: 551]
  ------------------
  269|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_RAND_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return 0;
  271|      0|    }
  272|       |
  273|       |    /* Get entropy by polling system entropy sources. */
  274|    551|    entropy_available = ossl_pool_acquire_entropy(pool);
  275|       |
  276|    551|    if (entropy_available > 0
  ------------------
  |  Branch (276:9): [True: 551, False: 0]
  ------------------
  277|    551|        && ossl_rand_pool_adin_mix_in(pool, adin, adin_len)) {
  ------------------
  |  Branch (277:12): [True: 551, False: 0]
  ------------------
  278|    551|        ret = ossl_rand_pool_length(pool);
  279|    551|        *pout = ossl_rand_pool_detach(pool);
  280|    551|    } else {
  281|       |        ERR_raise(ERR_LIB_PROV, PROV_R_ENTROPY_SOURCE_STRENGTH_TOO_WEAK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  282|      0|    }
  283|    551|    ossl_rand_pool_free(pool);
  284|    551|    return ret;
  285|    551|}
seed_src.c:seed_clear_seed:
  289|    551|{
  290|    551|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  149|    551|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  291|    551|}

ossl_rand_pool_init:
  571|      1|{
  572|      1|    size_t i;
  573|       |
  574|      5|    for (i = 0; i < OSSL_NELEM(random_devices); i++)
  ------------------
  |  |   14|      5|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (574:17): [True: 4, False: 1]
  ------------------
  575|      4|        random_devices[i].fd = -1;
  576|       |
  577|      1|    return 1;
  578|      1|}
ossl_rand_pool_cleanup:
  581|      1|{
  582|      1|    size_t i;
  583|       |
  584|      5|    for (i = 0; i < OSSL_NELEM(random_devices); i++)
  ------------------
  |  |   14|      5|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (584:17): [True: 4, False: 1]
  ------------------
  585|      4|        close_random_device(i);
  586|      1|}
ossl_pool_acquire_entropy:
  631|    551|{
  632|       |#if defined(OPENSSL_RAND_SEED_NONE)
  633|       |    return ossl_rand_pool_entropy_available(pool);
  634|       |#else
  635|    551|    size_t entropy_available = 0;
  636|       |
  637|    551|    (void)entropy_available; /* avoid compiler warning */
  638|       |
  639|    551|#if defined(OPENSSL_RAND_SEED_GETRANDOM)
  640|    551|    {
  641|    551|        size_t bytes_needed;
  642|    551|        unsigned char *buffer;
  643|    551|        ssize_t bytes;
  644|       |        /* Maximum allowed number of consecutive unsuccessful attempts */
  645|    551|        int attempts = 3;
  646|       |
  647|    551|        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  648|  1.10k|        while (bytes_needed != 0 && attempts-- > 0) {
  ------------------
  |  Branch (648:16): [True: 551, False: 551]
  |  Branch (648:37): [True: 551, False: 0]
  ------------------
  649|    551|            buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  650|    551|            bytes = syscall_random(buffer, bytes_needed);
  651|    551|            if (bytes > 0) {
  ------------------
  |  Branch (651:17): [True: 551, False: 0]
  ------------------
  652|    551|                ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  653|    551|                bytes_needed -= bytes;
  654|    551|                attempts = 3; /* reset counter after successful attempt */
  655|    551|            } else if (bytes < 0 && errno != EINTR) {
  ------------------
  |  Branch (655:24): [True: 0, False: 0]
  |  Branch (655:37): [True: 0, False: 0]
  ------------------
  656|      0|                break;
  657|      0|            }
  658|    551|        }
  659|    551|    }
  660|    551|    entropy_available = ossl_rand_pool_entropy_available(pool);
  661|    551|    if (entropy_available > 0)
  ------------------
  |  Branch (661:9): [True: 551, False: 0]
  ------------------
  662|    551|        return entropy_available;
  663|      0|#endif
  664|       |
  665|      0|#if defined(OPENSSL_RAND_SEED_DEVRANDOM)
  666|      0|    if (wait_random_seeded()) {
  ------------------
  |  Branch (666:9): [True: 0, False: 0]
  ------------------
  667|      0|        size_t bytes_needed;
  668|      0|        unsigned char *buffer;
  669|      0|        size_t i;
  670|       |
  671|      0|        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  672|      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 (672:21): [True: 0, False: 0]
  |  Branch (672:41): [True: 0, False: 0]
  ------------------
  673|      0|            i++) {
  674|      0|            ssize_t bytes = 0;
  675|       |            /* Maximum number of consecutive unsuccessful attempts */
  676|      0|            int attempts = 3;
  677|      0|            const int fd = get_random_device(i);
  678|       |
  679|      0|            if (fd == -1)
  ------------------
  |  Branch (679:17): [True: 0, False: 0]
  ------------------
  680|      0|                continue;
  681|       |
  682|      0|            while (bytes_needed != 0 && attempts-- > 0) {
  ------------------
  |  Branch (682:20): [True: 0, False: 0]
  |  Branch (682:41): [True: 0, False: 0]
  ------------------
  683|      0|                buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  684|      0|                bytes = read(fd, buffer, bytes_needed);
  685|       |
  686|      0|                if (bytes > 0) {
  ------------------
  |  Branch (686:21): [True: 0, False: 0]
  ------------------
  687|      0|                    ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  688|      0|                    bytes_needed -= bytes;
  689|      0|                    attempts = 3; /* reset counter on successful attempt */
  690|      0|                } else if (bytes < 0 && errno != EINTR) {
  ------------------
  |  Branch (690:28): [True: 0, False: 0]
  |  Branch (690:41): [True: 0, False: 0]
  ------------------
  691|      0|                    break;
  692|      0|                }
  693|      0|            }
  694|      0|            if (bytes < 0 || !keep_random_devices_open)
  ------------------
  |  Branch (694:17): [True: 0, False: 0]
  |  Branch (694:30): [True: 0, False: 0]
  ------------------
  695|      0|                close_random_device(i);
  696|       |
  697|      0|            bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
  698|      0|        }
  699|      0|        entropy_available = ossl_rand_pool_entropy_available(pool);
  700|      0|        if (entropy_available > 0)
  ------------------
  |  Branch (700:13): [True: 0, False: 0]
  ------------------
  701|      0|            return entropy_available;
  702|      0|    }
  703|      0|#endif
  704|       |
  705|       |#if defined(OPENSSL_RAND_SEED_RDTSC)
  706|       |    entropy_available = ossl_prov_acquire_entropy_from_tsc(pool);
  707|       |    if (entropy_available > 0)
  708|       |        return entropy_available;
  709|       |#endif
  710|       |
  711|       |#if defined(OPENSSL_RAND_SEED_RDCPU)
  712|       |    entropy_available = ossl_prov_acquire_entropy_from_cpu(pool);
  713|       |    if (entropy_available > 0)
  714|       |        return entropy_available;
  715|       |#endif
  716|       |
  717|       |#if defined(OPENSSL_RAND_SEED_EGD)
  718|       |    {
  719|       |        static const char *paths[] = { DEVRANDOM_EGD, NULL };
  720|       |        size_t bytes_needed;
  721|       |        unsigned char *buffer;
  722|       |        int i;
  723|       |
  724|       |        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  725|       |        for (i = 0; bytes_needed > 0 && paths[i] != NULL; i++) {
  726|       |            size_t bytes = 0;
  727|       |            int num;
  728|       |
  729|       |            buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  730|       |            num = RAND_query_egd_bytes(paths[i],
  731|       |                buffer, (int)bytes_needed);
  732|       |            if (num == (int)bytes_needed)
  733|       |                bytes = bytes_needed;
  734|       |
  735|       |            ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  736|       |            bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
  737|       |        }
  738|       |        entropy_available = ossl_rand_pool_entropy_available(pool);
  739|       |        if (entropy_available > 0)
  740|       |            return entropy_available;
  741|       |    }
  742|       |#endif
  743|       |
  744|      0|    return ossl_rand_pool_entropy_available(pool);
  745|      0|#endif
  746|      0|}
rand_unix.c:close_random_device:
  562|      4|{
  563|      4|    struct random_device *rd = &random_devices[n];
  564|       |
  565|      4|    if (check_random_device(rd))
  ------------------
  |  Branch (565:9): [True: 0, False: 4]
  ------------------
  566|      0|        close(rd->fd);
  567|      4|    rd->fd = -1;
  568|      4|}
rand_unix.c:check_random_device:
  517|      4|{
  518|      4|    struct stat st;
  519|       |
  520|      4|    return rd->fd != -1
  ------------------
  |  Branch (520:12): [True: 0, False: 4]
  ------------------
  521|      0|        && fstat(rd->fd, &st) != -1
  ------------------
  |  Branch (521:12): [True: 0, False: 0]
  ------------------
  522|      0|        && rd->dev == st.st_dev
  ------------------
  |  Branch (522:12): [True: 0, False: 0]
  ------------------
  523|      0|        && rd->ino == st.st_ino
  ------------------
  |  Branch (523:12): [True: 0, False: 0]
  ------------------
  524|      0|        && ((rd->mode ^ st.st_mode) & ~(S_IRWXU | S_IRWXG | S_IRWXO)) == 0
  ------------------
  |  Branch (524:12): [True: 0, False: 0]
  ------------------
  525|      0|        && rd->rdev == st.st_rdev;
  ------------------
  |  Branch (525:12): [True: 0, False: 0]
  ------------------
  526|      4|}
rand_unix.c:syscall_random:
  333|    551|{
  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|    551|#if !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
  357|    551|#if defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__) && !defined(__hpux)
  358|    551|    extern int getentropy(void *buffer, size_t length) __attribute__((weak));
  359|       |
  360|    551|    if (getentropy != NULL) {
  ------------------
  |  Branch (360:9): [True: 551, False: 0]
  ------------------
  361|    551|        if (getentropy(buf, buflen) == 0)
  ------------------
  |  Branch (361:13): [True: 551, False: 0]
  ------------------
  362|    551|            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|    551|}

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

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

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

ossl_quic_free_token_store:
 4842|  2.78k|{
 4843|  2.78k|    int refs;
 4844|       |
 4845|  2.78k|    if (hdl == NULL)
  ------------------
  |  Branch (4845:9): [True: 2.78k, False: 0]
  ------------------
 4846|  2.78k|        return;
 4847|       |
 4848|      0|    if (!CRYPTO_DOWN_REF(&hdl->references, &refs))
  ------------------
  |  Branch (4848:9): [True: 0, False: 0]
  ------------------
 4849|      0|        return;
 4850|       |
 4851|      0|    if (refs > 0)
  ------------------
  |  Branch (4851:9): [True: 0, False: 0]
  ------------------
 4852|      0|        return;
 4853|       |
 4854|       |    /* last reference, we can clean up */
 4855|      0|    ossl_crypto_mutex_free(&hdl->mutex);
 4856|      0|    lh_QUIC_TOKEN_doall(hdl->cache, free_this_token);
 4857|      0|    lh_QUIC_TOKEN_free(hdl->cache);
 4858|      0|    CRYPTO_FREE_REF(&hdl->references);
 4859|      0|    OPENSSL_free(hdl);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4860|      0|    return;
 4861|      0|}

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

ossl_tls_buffer_release:
   27|  11.7k|{
   28|  11.7k|    OPENSSL_free(b->buf);
  ------------------
  |  |  131|  11.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   29|       |    b->buf = NULL;
   30|  11.7k|}
ossl_rlayer_fatal:
   50|    151|{
   51|    151|    va_list args;
   52|       |
   53|    151|    va_start(args, fmt);
   54|    151|    ERR_vset_error(ERR_LIB_SSL, reason, fmt, args);
  ------------------
  |  |   89|    151|#define ERR_LIB_SSL 20
  ------------------
   55|    151|    va_end(args);
   56|       |
   57|    151|    rl->alert = al;
   58|    151|}
tls_setup_write_buffer:
  144|  3.63k|{
  145|  3.63k|    unsigned char *p;
  146|  3.63k|    size_t maxalign = 0, headerlen;
  147|  3.63k|    TLS_BUFFER *wb;
  148|  3.63k|    size_t currpipe;
  149|  3.63k|    size_t defltlen = 0;
  150|  3.63k|    size_t contenttypelen = 0;
  151|       |
  152|  3.63k|    if (firstlen == 0 || (numwpipes > 1 && nextlen == 0)) {
  ------------------
  |  Branch (152:9): [True: 3.63k, False: 0]
  |  Branch (152:27): [True: 0, False: 0]
  |  Branch (152:44): [True: 0, False: 0]
  ------------------
  153|  3.63k|        if (rl->isdtls)
  ------------------
  |  Branch (153:13): [True: 0, False: 3.63k]
  ------------------
  154|      0|            headerlen = DTLS1_RT_HEADER_LENGTH + 1;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  155|  3.63k|        else
  156|  3.63k|            headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  3.63k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  157|       |
  158|       |        /* TLSv1.3 adds an extra content type byte after payload data */
  159|  3.63k|        if (rl->version == TLS1_3_VERSION)
  ------------------
  |  |   27|  3.63k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (159:13): [True: 4, False: 3.63k]
  ------------------
  160|      4|            contenttypelen = 1;
  161|       |
  162|  3.63k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  163|  3.63k|        maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  3.63k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  164|  3.63k|#endif
  165|       |
  166|  3.63k|        defltlen = maxalign + headerlen + rl->eivlen + rl->max_frag_len
  167|  3.63k|            + contenttypelen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  3.63k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  3.63k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  3.63k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  168|  3.63k|#ifndef OPENSSL_NO_COMP
  169|  3.63k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (169:13): [True: 0, False: 3.63k]
  ------------------
  170|      0|            defltlen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  171|  3.63k|#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|  3.63k|        if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0)
  ------------------
  |  |  377|  3.63k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  350|  3.63k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (177:13): [True: 3.63k, False: 5]
  ------------------
  178|  3.63k|            defltlen += headerlen + maxalign + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  3.63k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  3.63k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  3.63k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  179|  3.63k|    }
  180|       |
  181|  3.63k|    wb = rl->wbuf;
  182|  7.27k|    for (currpipe = 0; currpipe < numwpipes; currpipe++) {
  ------------------
  |  Branch (182:24): [True: 3.63k, False: 3.63k]
  ------------------
  183|  3.63k|        TLS_BUFFER *thiswb = &wb[currpipe];
  184|  3.63k|        size_t len = (currpipe == 0) ? firstlen : nextlen;
  ------------------
  |  Branch (184:22): [True: 3.63k, False: 0]
  ------------------
  185|       |
  186|  3.63k|        if (len == 0)
  ------------------
  |  Branch (186:13): [True: 3.63k, False: 0]
  ------------------
  187|  3.63k|            len = defltlen;
  188|       |
  189|  3.63k|        if (thiswb->len != len) {
  ------------------
  |  Branch (189:13): [True: 1.96k, False: 1.67k]
  ------------------
  190|  1.96k|            OPENSSL_free(thiswb->buf);
  ------------------
  |  |  131|  1.96k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  191|  1.96k|            thiswb->buf = NULL; /* force reallocation */
  192|  1.96k|        }
  193|       |
  194|  3.63k|        p = thiswb->buf;
  195|  3.63k|        if (p == NULL) {
  ------------------
  |  Branch (195:13): [True: 1.96k, False: 1.67k]
  ------------------
  196|  1.96k|            p = OPENSSL_malloc(len);
  ------------------
  |  |  106|  1.96k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  197|  1.96k|            if (p == NULL) {
  ------------------
  |  Branch (197:17): [True: 0, False: 1.96k]
  ------------------
  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);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  206|      0|                return 0;
  207|      0|            }
  208|  1.96k|        }
  209|  3.63k|        memset(thiswb, 0, sizeof(TLS_BUFFER));
  210|  3.63k|        thiswb->buf = p;
  211|  3.63k|        thiswb->len = len;
  212|  3.63k|    }
  213|       |
  214|       |    /* Free any previously allocated buffers that we are no longer using */
  215|  3.63k|    tls_release_write_buffer_int(rl, currpipe);
  216|       |
  217|  3.63k|    rl->numwpipes = numwpipes;
  218|       |
  219|  3.63k|    return 1;
  220|  3.63k|}
tls_setup_read_buffer:
  230|  1.83k|{
  231|  1.83k|    unsigned char *p;
  232|  1.83k|    size_t len, maxalign = 0, headerlen;
  233|  1.83k|    TLS_BUFFER *b;
  234|       |
  235|  1.83k|    b = &rl->rbuf;
  236|       |
  237|  1.83k|    if (rl->isdtls)
  ------------------
  |  Branch (237:9): [True: 0, False: 1.83k]
  ------------------
  238|      0|        headerlen = DTLS1_RT_HEADER_LENGTH;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  239|  1.83k|    else
  240|  1.83k|        headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  1.83k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  241|       |
  242|  1.83k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  243|  1.83k|    maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  1.83k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  244|  1.83k|#endif
  245|       |
  246|  1.83k|    if (b->buf == NULL) {
  ------------------
  |  Branch (246:9): [True: 1.83k, False: 0]
  ------------------
  247|  1.83k|        len = rl->max_frag_len
  248|  1.83k|            + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + maxalign;
  ------------------
  |  |  186|  1.83k|#define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  1.83k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  249|  1.83k|#ifndef OPENSSL_NO_COMP
  250|  1.83k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (250:13): [True: 0, False: 1.83k]
  ------------------
  251|      0|            len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  252|  1.83k|#endif
  253|       |
  254|       |        /* Ensure our buffer is large enough to support all our pipelines */
  255|  1.83k|        if (rl->max_pipelines > 1)
  ------------------
  |  Branch (255:13): [True: 0, False: 1.83k]
  ------------------
  256|      0|            len *= rl->max_pipelines;
  257|       |
  258|  1.83k|        if (b->default_len > len)
  ------------------
  |  Branch (258:13): [True: 1.83k, False: 0]
  ------------------
  259|  1.83k|            len = b->default_len;
  260|       |
  261|  1.83k|        if ((p = OPENSSL_malloc(len)) == NULL) {
  ------------------
  |  |  106|  1.83k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (261:13): [True: 0, False: 1.83k]
  ------------------
  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);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  268|      0|            return 0;
  269|      0|        }
  270|  1.83k|        b->buf = p;
  271|  1.83k|        b->len = len;
  272|  1.83k|    }
  273|       |
  274|  1.83k|    return 1;
  275|  1.83k|}
tls_default_read_n:
  296|  2.51k|{
  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|  2.51k|    size_t len, left, align = 0;
  307|  2.51k|    unsigned char *pkt;
  308|  2.51k|    TLS_BUFFER *rb;
  309|       |
  310|  2.51k|    if (n == 0)
  ------------------
  |  Branch (310:9): [True: 0, False: 2.51k]
  ------------------
  311|      0|        return OSSL_RECORD_RETURN_NON_FATAL_ERR;
  ------------------
  |  |   47|      0|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  312|       |
  313|  2.51k|    rb = &rl->rbuf;
  314|  2.51k|    left = rb->left;
  315|  2.51k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  316|  2.51k|    align = (size_t)rb->buf + SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  2.51k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  317|  2.51k|    align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  2.51k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
                  align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  2.51k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  318|  2.51k|#endif
  319|       |
  320|  2.51k|    if (!extend) {
  ------------------
  |  Branch (320:9): [True: 2.21k, False: 303]
  ------------------
  321|       |        /* start with empty packet ... */
  322|  2.21k|        if (left == 0)
  ------------------
  |  Branch (322:13): [True: 2.20k, False: 5]
  ------------------
  323|  2.20k|            rb->offset = align;
  324|       |
  325|  2.21k|        rl->packet = rb->buf + rb->offset;
  326|  2.21k|        rl->packet_length = 0;
  327|       |        /* ... now we can act as if 'extend' was set */
  328|  2.21k|    }
  329|       |
  330|  2.51k|    if (!ossl_assert(rl->packet != NULL)) {
  ------------------
  |  |   52|  2.51k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.51k|    __FILE__, __LINE__)
  ------------------
  |  Branch (330:9): [True: 0, False: 2.51k]
  ------------------
  331|       |        /* does not happen */
  332|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  333|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  334|      0|    }
  335|       |
  336|  2.51k|    len = rl->packet_length;
  337|  2.51k|    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|  2.51k|    if (rl->packet != pkt && clearold == 1) {
  ------------------
  |  Branch (342:9): [True: 0, False: 2.51k]
  |  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|  2.51k|    if (rl->isdtls) {
  ------------------
  |  Branch (353:9): [True: 0, False: 2.51k]
  ------------------
  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|  2.51k|    if (left >= n) {
  ------------------
  |  Branch (366:9): [True: 0, False: 2.51k]
  ------------------
  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|  2.51k|    if (n > rb->len - rb->offset) {
  ------------------
  |  Branch (376:9): [True: 0, False: 2.51k]
  ------------------
  377|       |        /* does not happen */
  378|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      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|  2.51k|    if (!rl->read_ahead && !rl->isdtls) {
  ------------------
  |  Branch (383:9): [True: 2.51k, False: 0]
  |  Branch (383:28): [True: 2.51k, False: 0]
  ------------------
  384|       |        /* ignore max parameter */
  385|  2.51k|        max = n;
  386|  2.51k|    } 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|  3.29k|    while (left < n) {
  ------------------
  |  Branch (393:12): [True: 2.55k, False: 741]
  ------------------
  394|  2.55k|        size_t bioread = 0;
  395|  2.55k|        int ret;
  396|  2.55k|        BIO *bio = rl->prev != NULL ? rl->prev : rl->bio;
  ------------------
  |  Branch (396:20): [True: 0, False: 2.55k]
  ------------------
  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|  2.55k|        clear_sys_error();
  ------------------
  |  |   31|  2.55k|#define clear_sys_error() errno = 0
  ------------------
  405|  2.55k|        if (bio != NULL) {
  ------------------
  |  Branch (405:13): [True: 2.55k, False: 0]
  ------------------
  406|  2.55k|            ret = BIO_read(bio, pkt + len + left, (int)(max - left));
  407|  2.55k|            if (ret > 0) {
  ------------------
  |  Branch (407:17): [True: 782, False: 1.77k]
  ------------------
  408|    782|                bioread = ret;
  409|    782|                ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    782|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  410|  1.77k|            } else if (BIO_should_retry(bio)) {
  ------------------
  |  |  272|  1.77k|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|  1.77k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (272:29): [True: 306, False: 1.47k]
  |  |  ------------------
  ------------------
  411|    306|                if (rl->prev != NULL) {
  ------------------
  |  Branch (411:21): [True: 0, False: 306]
  ------------------
  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|    306|                ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|    306|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  421|  1.47k|            } else if (BIO_eof(bio)) {
  ------------------
  |  |  633|  1.47k|#define BIO_eof(b) (int)BIO_ctrl(b, BIO_CTRL_EOF, 0, NULL)
  |  |  ------------------
  |  |  |  |   91|  1.47k|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  |  |  ------------------
  |  |  |  Branch (633:20): [True: 1.45k, False: 13]
  |  |  ------------------
  ------------------
  422|  1.45k|                ret = OSSL_RECORD_RETURN_EOF;
  ------------------
  |  |   49|  1.45k|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  423|  1.45k|            } else {
  424|     13|                ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|     13|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  425|     13|            }
  426|  2.55k|        } else {
  427|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_READ_BIO_NOT_SET);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  428|      0|            ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  429|      0|        }
  430|       |
  431|  2.55k|        if (ret <= OSSL_RECORD_RETURN_RETRY) {
  ------------------
  |  |   46|  2.55k|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  |  Branch (431:13): [True: 1.77k, False: 782]
  ------------------
  432|  1.77k|            rb->left = left;
  433|  1.77k|            if ((rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0 && !rl->isdtls)
  ------------------
  |  |  515|  1.77k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (433:17): [True: 0, False: 1.77k]
  |  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|  1.77k|            return ret;
  437|  1.77k|        }
  438|    782|        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|    782|        if (rl->isdtls) {
  ------------------
  |  Branch (444:13): [True: 0, False: 782]
  ------------------
  445|      0|            if (n > left)
  ------------------
  |  Branch (445:17): [True: 0, False: 0]
  ------------------
  446|      0|                n = left; /* makes the while condition false */
  447|      0|        }
  448|    782|    }
  449|       |
  450|       |    /* done reading, now the book-keeping */
  451|    741|    rb->offset += n;
  452|    741|    rb->left = left - n;
  453|    741|    rl->packet_length += n;
  454|    741|    *readbytes = n;
  455|    741|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    741|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  456|  2.51k|}
tls_get_more_records:
  544|  2.22k|{
  545|  2.22k|    int enc_err, rret;
  546|  2.22k|    int i;
  547|  2.22k|    size_t more, n;
  548|  2.22k|    TLS_RL_RECORD *rr, *thisrr;
  549|  2.22k|    TLS_BUFFER *rbuf;
  550|  2.22k|    unsigned char *p;
  551|  2.22k|    unsigned char md[EVP_MAX_MD_SIZE];
  552|  2.22k|    unsigned int version;
  553|  2.22k|    size_t mac_size = 0;
  554|  2.22k|    int imac_size;
  555|  2.22k|    size_t num_recs = 0, max_recs, j;
  556|  2.22k|    PACKET pkt, sslv2pkt;
  557|  2.22k|    SSL_MAC_BUF *macbufs = NULL;
  558|  2.22k|    int ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|  2.22k|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  559|       |
  560|  2.22k|    rr = rl->rrec;
  561|  2.22k|    rbuf = &rl->rbuf;
  562|  2.22k|    if (rbuf->buf == NULL) {
  ------------------
  |  Branch (562:9): [True: 1.83k, False: 387]
  ------------------
  563|  1.83k|        if (!tls_setup_read_buffer(rl)) {
  ------------------
  |  Branch (563:13): [True: 0, False: 1.83k]
  ------------------
  564|       |            /* RLAYERfatal() already called */
  565|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  566|      0|        }
  567|  1.83k|    }
  568|       |
  569|  2.22k|    max_recs = rl->max_pipelines;
  570|       |
  571|  2.22k|    if (max_recs == 0)
  ------------------
  |  Branch (571:9): [True: 2.22k, False: 0]
  ------------------
  572|  2.22k|        max_recs = 1;
  573|       |
  574|  2.22k|    do {
  575|  2.22k|        thisrr = &rr[num_recs];
  576|       |
  577|       |        /* check if we have the header */
  578|  2.22k|        if ((rl->rstate != SSL_ST_READ_BODY) || (rl->packet_length < SSL3_RT_HEADER_LENGTH)) {
  ------------------
  |  | 1161|  2.22k|#define SSL_ST_READ_BODY 0xF1
  ------------------
                      if ((rl->rstate != SSL_ST_READ_BODY) || (rl->packet_length < SSL3_RT_HEADER_LENGTH)) {
  ------------------
  |  |  139|      6|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (578:13): [True: 2.21k, False: 6]
  |  Branch (578:49): [True: 0, False: 6]
  ------------------
  579|  2.21k|            size_t sslv2len;
  580|  2.21k|            unsigned int type;
  581|       |
  582|  2.21k|            rret = rl->funcs->read_n(rl, SSL3_RT_HEADER_LENGTH,
  ------------------
  |  |  139|  2.21k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  583|  2.21k|                TLS_BUFFER_get_len(rbuf), 0,
  ------------------
  |  |  527|  2.21k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
  584|  2.21k|                num_recs == 0 ? 1 : 0, &n);
  ------------------
  |  Branch (584:17): [True: 2.21k, False: 0]
  ------------------
  585|       |
  586|  2.21k|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  2.21k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (586:17): [True: 1.74k, False: 465]
  ------------------
  587|  1.74k|                return rret; /* error or non-blocking */
  588|       |
  589|    465|            rl->rstate = SSL_ST_READ_BODY;
  ------------------
  |  | 1161|    465|#define SSL_ST_READ_BODY 0xF1
  ------------------
  590|       |
  591|    465|            p = rl->packet;
  592|    465|            if (!PACKET_buf_init(&pkt, p, rl->packet_length)) {
  ------------------
  |  Branch (592:17): [True: 0, False: 465]
  ------------------
  593|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  594|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  595|      0|            }
  596|    465|            sslv2pkt = pkt;
  597|    465|            if (!PACKET_get_net_2_len(&sslv2pkt, &sslv2len)
  ------------------
  |  Branch (597:17): [True: 0, False: 465]
  ------------------
  598|    465|                || !PACKET_get_1(&sslv2pkt, &type)) {
  ------------------
  |  Branch (598:20): [True: 0, False: 465]
  ------------------
  599|      0|                RLAYERfatal(rl, SSL_AD_DECODE_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  600|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  601|      0|            }
  602|       |            /*
  603|       |             * The first record received by the server may be a V2ClientHello.
  604|       |             */
  605|    465|            if (rl->role == OSSL_RECORD_ROLE_SERVER
  ------------------
  |  |   40|    930|#define OSSL_RECORD_ROLE_SERVER 1
  ------------------
  |  Branch (605:17): [True: 0, False: 465]
  ------------------
  606|      0|                && rl->is_first_record
  ------------------
  |  Branch (606:20): [True: 0, False: 0]
  ------------------
  607|      0|                && (sslv2len & 0x8000) != 0
  ------------------
  |  Branch (607:20): [True: 0, False: 0]
  ------------------
  608|      0|                && (type == SSL2_MT_CLIENT_HELLO)) {
  ------------------
  |  |   25|      0|#define SSL2_MT_CLIENT_HELLO 1
  ------------------
  |  Branch (608:20): [True: 0, False: 0]
  ------------------
  609|       |                /*
  610|       |                 *  SSLv2 style record
  611|       |                 *
  612|       |                 * |num_recs| here will actually always be 0 because
  613|       |                 * |num_recs > 0| only ever occurs when we are processing
  614|       |                 * multiple app data records - which we know isn't the case here
  615|       |                 * because it is an SSLv2ClientHello. We keep it using
  616|       |                 * |num_recs| for the sake of consistency
  617|       |                 */
  618|      0|                thisrr->type = SSL3_RT_HANDSHAKE;
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  619|      0|                thisrr->rec_version = SSL2_VERSION;
  ------------------
  |  |   23|      0|#define SSL2_VERSION 0x0002
  ------------------
  620|       |
  621|      0|                thisrr->length = sslv2len & 0x7fff;
  622|       |
  623|      0|                if (!rl->funcs->validate_record_header(rl, thisrr)) {
  ------------------
  |  Branch (623:21): [True: 0, False: 0]
  ------------------
  624|       |                    /* RLAYERfatal already called */
  625|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  626|      0|                }
  627|       |
  628|      0|                if (thisrr->length > TLS_BUFFER_get_len(rbuf)
  ------------------
  |  |  527|      0|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
  |  Branch (628:21): [True: 0, False: 0]
  ------------------
  629|      0|                        - SSL2_RT_HEADER_LENGTH) {
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  630|      0|                    RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  631|      0|                        SSL_R_PACKET_LENGTH_TOO_LONG);
  632|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  633|      0|                }
  634|    465|            } else {
  635|       |                /* SSLv3+ style record */
  636|       |
  637|       |                /* Pull apart the header into the TLS_RL_RECORD */
  638|    465|                if (!PACKET_get_1(&pkt, &type)
  ------------------
  |  Branch (638:21): [True: 0, False: 465]
  ------------------
  639|    465|                    || !PACKET_get_net_2(&pkt, &version)
  ------------------
  |  Branch (639:24): [True: 0, False: 465]
  ------------------
  640|    465|                    || !PACKET_get_net_2_len(&pkt, &thisrr->length)) {
  ------------------
  |  Branch (640:24): [True: 0, False: 465]
  ------------------
  641|      0|                    if (rl->msg_callback != NULL)
  ------------------
  |  Branch (641:25): [True: 0, False: 0]
  ------------------
  642|      0|                        rl->msg_callback(0, 0, SSL3_RT_HEADER, p, 5, rl->cbarg);
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
  643|      0|                    RLAYERfatal(rl, SSL_AD_DECODE_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  644|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  645|      0|                }
  646|    465|                thisrr->type = type;
  647|    465|                thisrr->rec_version = version;
  648|       |
  649|       |                /*
  650|       |                 * When we call validate_record_header() only records actually
  651|       |                 * received in SSLv2 format should have the record version set
  652|       |                 * to SSL2_VERSION. This way validate_record_header() can know
  653|       |                 * what format the record was in based on the version.
  654|       |                 */
  655|    465|                if (thisrr->rec_version == SSL2_VERSION) {
  ------------------
  |  |   23|    465|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (655:21): [True: 1, False: 464]
  ------------------
  656|      1|                    RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  391|      1|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      1|    (ERR_new(),                                                  \
  |  |  |  |  394|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      1|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  657|      1|                        SSL_R_WRONG_VERSION_NUMBER);
  658|      1|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      1|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  659|      1|                }
  660|       |
  661|    464|                if (rl->msg_callback != NULL)
  ------------------
  |  Branch (661:21): [True: 0, False: 464]
  ------------------
  662|      0|                    rl->msg_callback(0, version, SSL3_RT_HEADER, p, 5, rl->cbarg);
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
  663|       |
  664|    464|                if (!rl->funcs->validate_record_header(rl, thisrr)) {
  ------------------
  |  Branch (664:21): [True: 150, False: 314]
  ------------------
  665|       |                    /* RLAYERfatal already called */
  666|    150|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|    150|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  667|    150|                }
  668|       |
  669|    314|                if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  527|    314|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
                              if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  139|    314|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (669:21): [True: 0, False: 314]
  ------------------
  670|      0|                    RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  671|      0|                        SSL_R_PACKET_LENGTH_TOO_LONG);
  672|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  673|      0|                }
  674|    314|            }
  675|       |
  676|       |            /* now rl->rstate == SSL_ST_READ_BODY */
  677|    465|        }
  678|       |
  679|       |        /*
  680|       |         * rl->rstate == SSL_ST_READ_BODY, get and decode the data. Calculate
  681|       |         * how much more data we need to read for the rest of the record
  682|       |         */
  683|    320|        if (thisrr->rec_version == SSL2_VERSION) {
  ------------------
  |  |   23|    320|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (683:13): [True: 0, False: 320]
  ------------------
  684|      0|            more = thisrr->length + SSL2_RT_HEADER_LENGTH
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  685|      0|                - SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|      0|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  686|    320|        } else {
  687|    320|            more = thisrr->length;
  688|    320|        }
  689|       |
  690|    320|        if (more > 0) {
  ------------------
  |  Branch (690:13): [True: 303, False: 17]
  ------------------
  691|       |            /* now rl->packet_length == SSL3_RT_HEADER_LENGTH */
  692|       |
  693|    303|            rret = rl->funcs->read_n(rl, more, more, 1, 0, &n);
  694|    303|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|    303|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (694:17): [True: 27, False: 276]
  ------------------
  695|     27|                return rret; /* error or non-blocking io */
  696|    303|        }
  697|       |
  698|       |        /* set state for later operations */
  699|    293|        rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1160|    293|#define SSL_ST_READ_HEADER 0xF0
  ------------------
  700|       |
  701|       |        /*
  702|       |         * At this point, rl->packet_length == SSL3_RT_HEADER_LENGTH
  703|       |         * + thisrr->length, or rl->packet_length == SSL2_RT_HEADER_LENGTH
  704|       |         * + thisrr->length and we have that many bytes in rl->packet
  705|       |         */
  706|    293|        if (thisrr->rec_version == SSL2_VERSION)
  ------------------
  |  |   23|    293|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (706:13): [True: 0, False: 293]
  ------------------
  707|      0|            thisrr->input = &(rl->packet[SSL2_RT_HEADER_LENGTH]);
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  708|    293|        else
  709|    293|            thisrr->input = &(rl->packet[SSL3_RT_HEADER_LENGTH]);
  ------------------
  |  |  139|    293|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  710|       |
  711|       |        /*
  712|       |         * ok, we can now read from 'rl->packet' data into 'thisrr'.
  713|       |         * thisrr->input points at thisrr->length bytes, which need to be copied
  714|       |         * into thisrr->data by either the decryption or by the decompression.
  715|       |         * When the data is 'copied' into the thisrr->data buffer,
  716|       |         * thisrr->input will be updated to point at the new buffer
  717|       |         */
  718|       |
  719|       |        /*
  720|       |         * We now have - encrypted [ MAC [ compressed [ plain ] ] ]
  721|       |         * thisrr->length bytes of encrypted compressed stuff.
  722|       |         */
  723|       |
  724|       |        /* decrypt in place in 'thisrr->input' */
  725|    293|        thisrr->data = thisrr->input;
  726|    293|        thisrr->orig_len = thisrr->length;
  727|       |
  728|    293|        num_recs++;
  729|       |
  730|       |        /* we have pulled in a full packet so zero things */
  731|    293|        rl->packet_length = 0;
  732|    293|        rl->is_first_record = 0;
  733|    293|    } while (num_recs < max_recs
  ------------------
  |  Branch (733:14): [True: 0, False: 293]
  ------------------
  734|      0|        && thisrr->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    293|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (734:12): [True: 0, False: 0]
  ------------------
  735|      0|        && RLAYER_USE_EXPLICIT_IV(rl)
  ------------------
  |  |  397|    293|#define RLAYER_USE_EXPLICIT_IV(rl) ((rl)->version == TLS1_1_VERSION \
  |  |  ------------------
  |  |  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  |  |  ------------------
  |  |  |  Branch (397:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  398|      0|    || (rl)->version == TLS1_2_VERSION                              \
  |  |  ------------------
  |  |  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  |  |  ------------------
  |  |  |  Branch (398:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  399|      0|    || (rl)->version == DTLS1_BAD_VER                               \
  |  |  ------------------
  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  ------------------
  |  |  |  Branch (399:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  400|      0|    || (rl)->version == DTLS1_VERSION                               \
  |  |  ------------------
  |  |  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  |  |  ------------------
  |  |  |  Branch (400:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  401|    293|    || (rl)->version == DTLS1_2_VERSION)
  |  |  ------------------
  |  |  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  |  |  ------------------
  |  |  |  Branch (401:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  736|      0|        && rl->enc_ctx != NULL
  ------------------
  |  Branch (736:12): [True: 0, False: 0]
  ------------------
  737|      0|        && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx))
  ------------------
  |  Branch (737:12): [True: 0, False: 0]
  ------------------
  738|      0|               & EVP_CIPH_FLAG_PIPELINE)
  ------------------
  |  |  360|      0|#define EVP_CIPH_FLAG_PIPELINE 0X800000
  ------------------
  739|      0|            != 0
  740|      0|        && tls_record_app_data_waiting(rl));
  ------------------
  |  Branch (740:12): [True: 0, False: 0]
  ------------------
  741|       |
  742|    293|    if (num_recs == 1
  ------------------
  |  Branch (742:9): [True: 293, False: 0]
  ------------------
  743|    293|        && thisrr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|    586|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (743:12): [True: 15, False: 278]
  ------------------
  744|       |        /* The following can happen in tlsany_meth after HRR */
  745|     15|        && rl->version == TLS1_3_VERSION
  ------------------
  |  |   27|    308|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (745:12): [True: 0, False: 15]
  ------------------
  746|      0|        && rl->is_first_handshake) {
  ------------------
  |  Branch (746:12): [True: 0, False: 0]
  ------------------
  747|       |        /*
  748|       |         * CCS messages must be exactly 1 byte long, containing the value 0x01
  749|       |         */
  750|      0|        if (thisrr->length != 1 || thisrr->data[0] != 0x01) {
  ------------------
  |  Branch (750:13): [True: 0, False: 0]
  |  Branch (750:36): [True: 0, False: 0]
  ------------------
  751|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  752|      0|                SSL_R_INVALID_CCS_MESSAGE);
  753|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  754|      0|        }
  755|       |        /*
  756|       |         * CCS messages are ignored in TLSv1.3. We treat it like an empty
  757|       |         * handshake record - but we still call the msg_callback
  758|       |         */
  759|      0|        if (rl->msg_callback != NULL)
  ------------------
  |  Branch (759:13): [True: 0, False: 0]
  ------------------
  760|      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
  ------------------
  761|      0|                thisrr->data, 1, rl->cbarg);
  762|      0|        thisrr->type = SSL3_RT_HANDSHAKE;
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  763|      0|        if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|      0|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (763:13): [True: 0, False: 0]
  ------------------
  764|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  765|      0|                SSL_R_UNEXPECTED_CCS_MESSAGE);
  766|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  767|      0|        }
  768|      0|        rl->num_recs = 0;
  769|      0|        rl->curr_rec = 0;
  770|      0|        rl->num_released = 0;
  771|       |
  772|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  773|      0|    }
  774|       |
  775|    293|    if (rl->md_ctx != NULL) {
  ------------------
  |  Branch (775:9): [True: 0, False: 293]
  ------------------
  776|      0|        const EVP_MD *tmpmd = EVP_MD_CTX_get0_md(rl->md_ctx);
  777|       |
  778|      0|        if (tmpmd != NULL) {
  ------------------
  |  Branch (778:13): [True: 0, False: 0]
  ------------------
  779|      0|            imac_size = EVP_MD_get_size(tmpmd);
  780|      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 (780:17): [True: 0, False: 0]
  ------------------
  781|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  782|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  783|      0|            }
  784|      0|            mac_size = (size_t)imac_size;
  785|      0|        }
  786|      0|    }
  787|       |
  788|       |    /*
  789|       |     * If in encrypt-then-mac mode calculate mac from encrypted record. All
  790|       |     * the details below are public so no timing details can leak.
  791|       |     */
  792|    293|    if (rl->use_etm && rl->md_ctx != NULL) {
  ------------------
  |  Branch (792:9): [True: 0, False: 293]
  |  Branch (792:24): [True: 0, False: 0]
  ------------------
  793|      0|        unsigned char *mac;
  794|       |
  795|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (795:21): [True: 0, False: 0]
  ------------------
  796|      0|            thisrr = &rr[j];
  797|       |
  798|      0|            if (thisrr->length < mac_size) {
  ------------------
  |  Branch (798:17): [True: 0, False: 0]
  ------------------
  799|      0|                RLAYERfatal(rl, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_TOO_SHORT);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  800|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  801|      0|            }
  802|      0|            thisrr->length -= mac_size;
  803|      0|            mac = thisrr->data + thisrr->length;
  804|      0|            i = rl->funcs->mac(rl, thisrr, md, 0 /* not send */);
  805|      0|            if (i == 0 || CRYPTO_memcmp(md, mac, mac_size) != 0) {
  ------------------
  |  |  319|      0|#define CRYPTO_memcmp memcmp
  ------------------
  |  Branch (805:17): [True: 0, False: 0]
  |  Branch (805:27): [True: 0, False: 0]
  ------------------
  806|      0|                RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  807|      0|                    SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  808|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  809|      0|            }
  810|      0|        }
  811|       |        /*
  812|       |         * We've handled the mac now - there is no MAC inside the encrypted
  813|       |         * record
  814|       |         */
  815|      0|        mac_size = 0;
  816|      0|    }
  817|       |
  818|    293|    if (mac_size > 0) {
  ------------------
  |  Branch (818:9): [True: 0, False: 293]
  ------------------
  819|      0|        macbufs = OPENSSL_calloc(num_recs, sizeof(*macbufs));
  ------------------
  |  |  112|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  820|      0|        if (macbufs == NULL) {
  ------------------
  |  Branch (820:13): [True: 0, False: 0]
  ------------------
  821|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  822|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  823|      0|        }
  824|      0|    }
  825|       |
  826|    293|    ERR_set_mark();
  827|    293|    enc_err = rl->funcs->cipher(rl, rr, num_recs, 0, macbufs, mac_size);
  828|       |
  829|       |    /*-
  830|       |     * enc_err is:
  831|       |     *    0: if the record is publicly invalid, or an internal error, or AEAD
  832|       |     *       decryption failed, or ETM decryption failed.
  833|       |     *    1: Success or MTE decryption failed (MAC will be randomised)
  834|       |     */
  835|    293|    if (enc_err == 0) {
  ------------------
  |  Branch (835:9): [True: 0, False: 293]
  ------------------
  836|      0|        if (rl->alert != SSL_AD_NO_ALERT) {
  ------------------
  |  |   63|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (836:13): [True: 0, False: 0]
  ------------------
  837|       |            /* RLAYERfatal() already got called */
  838|      0|            ERR_clear_last_mark();
  839|      0|            goto end;
  840|      0|        }
  841|      0|        if (num_recs == 1
  ------------------
  |  Branch (841:13): [True: 0, False: 0]
  ------------------
  842|      0|            && rl->skip_early_data != NULL
  ------------------
  |  Branch (842:16): [True: 0, False: 0]
  ------------------
  843|      0|            && rl->skip_early_data(rl->cbarg)) {
  ------------------
  |  Branch (843:16): [True: 0, False: 0]
  ------------------
  844|       |            /*
  845|       |             * Valid early_data that we cannot decrypt will fail here. We treat
  846|       |             * it like an empty record.
  847|       |             */
  848|       |
  849|       |            /*
  850|       |             * Remove any errors from the stack. Decryption failures are normal
  851|       |             * behaviour.
  852|       |             */
  853|      0|            ERR_pop_to_mark();
  854|       |
  855|      0|            thisrr = &rr[0];
  856|       |
  857|      0|            if (!rlayer_early_data_count_ok(rl, thisrr->length,
  ------------------
  |  Branch (857:17): [True: 0, False: 0]
  ------------------
  858|      0|                    EARLY_DATA_CIPHERTEXT_OVERHEAD, 0)) {
  ------------------
  |  |  616|      0|#define EARLY_DATA_CIPHERTEXT_OVERHEAD ((6 * (EVP_GCM_TLS_TAG_LEN + 1)) + 2)
  |  |  ------------------
  |  |  |  |  476|      0|#define EVP_GCM_TLS_TAG_LEN 16
  |  |  ------------------
  ------------------
  859|       |                /* RLAYERfatal() already called */
  860|      0|                goto end;
  861|      0|            }
  862|       |
  863|      0|            thisrr->length = 0;
  864|      0|            rl->num_recs = 0;
  865|      0|            rl->curr_rec = 0;
  866|      0|            rl->num_released = 0;
  867|       |            /* Reset the read sequence */
  868|      0|            memset(rl->sequence, 0, sizeof(rl->sequence));
  869|      0|            ret = 1;
  870|      0|            goto end;
  871|      0|        }
  872|      0|        ERR_clear_last_mark();
  873|      0|        RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  874|      0|            SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  875|      0|        goto end;
  876|    293|    } else {
  877|    293|        ERR_clear_last_mark();
  878|    293|    }
  879|    293|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  221|    293|    do {                           \
  |  |  222|    293|        BIO *trc_out = NULL;       \
  |  |  223|    293|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 293]
  |  |  ------------------
  ------------------
  880|      0|    {
  881|      0|        BIO_printf(trc_out, "dec %lu\n", (unsigned long)rr[0].length);
  882|      0|        BIO_dump_indent(trc_out, rr[0].data, (int)rr[0].length, 4);
  883|      0|    }
  884|    293|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  226|    293|    }                            \
  |  |  227|    293|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 293]
  |  |  ------------------
  ------------------
  885|       |
  886|       |    /* r->length is now the compressed data plus mac */
  887|    293|    if (rl->enc_ctx != NULL
  ------------------
  |  Branch (887:9): [True: 0, False: 293]
  ------------------
  888|      0|        && !rl->use_etm
  ------------------
  |  Branch (888:12): [True: 0, False: 0]
  ------------------
  889|      0|        && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) {
  ------------------
  |  Branch (889:12): [True: 0, False: 0]
  ------------------
  890|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (890:21): [True: 0, False: 0]
  ------------------
  891|      0|            SSL_MAC_BUF *thismb = &macbufs[j];
  892|       |
  893|      0|            thisrr = &rr[j];
  894|       |
  895|      0|            i = rl->funcs->mac(rl, thisrr, md, 0 /* not send */);
  896|      0|            if (i == 0 || thismb == NULL || thismb->mac == NULL
  ------------------
  |  Branch (896:17): [True: 0, False: 0]
  |  Branch (896:27): [True: 0, False: 0]
  |  Branch (896:45): [True: 0, False: 0]
  ------------------
  897|      0|                || CRYPTO_memcmp(md, thismb->mac, (size_t)mac_size) != 0)
  ------------------
  |  |  319|      0|#define CRYPTO_memcmp memcmp
  ------------------
  |  Branch (897:20): [True: 0, False: 0]
  ------------------
  898|      0|                enc_err = 0;
  899|      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 (899:17): [True: 0, False: 0]
  ------------------
  900|      0|                enc_err = 0;
  901|      0|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  902|      0|            if (enc_err == 0 && mac_size > 0 && thismb != NULL && thismb->mac != NULL && (md[0] ^ thismb->mac[0]) != 0xFF) {
  ------------------
  |  Branch (902:17): [True: 0, False: 0]
  |  Branch (902:33): [True: 0, False: 0]
  |  Branch (902:49): [True: 0, False: 0]
  |  Branch (902:67): [True: 0, False: 0]
  |  Branch (902:90): [True: 0, False: 0]
  ------------------
  903|      0|                enc_err = 1;
  904|      0|            }
  905|      0|#endif
  906|      0|        }
  907|      0|    }
  908|       |
  909|    293|    if (enc_err == 0) {
  ------------------
  |  Branch (909:9): [True: 0, False: 293]
  ------------------
  910|      0|        if (rl->alert != SSL_AD_NO_ALERT) {
  ------------------
  |  |   63|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (910:13): [True: 0, False: 0]
  ------------------
  911|       |            /* We already called RLAYERfatal() */
  912|      0|            goto end;
  913|      0|        }
  914|       |        /*
  915|       |         * A separate 'decryption_failed' alert was introduced with TLS 1.0,
  916|       |         * SSL 3.0 only has 'bad_record_mac'.  But unless a decryption
  917|       |         * failure is directly visible from the ciphertext anyway, we should
  918|       |         * not reveal which kind of error occurred -- this might become
  919|       |         * visible to an attacker (e.g. via a logfile)
  920|       |         */
  921|      0|        RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  922|      0|            SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  923|      0|        goto end;
  924|      0|    }
  925|       |
  926|    586|    for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (926:17): [True: 293, False: 293]
  ------------------
  927|    293|        thisrr = &rr[j];
  928|       |
  929|    293|        if (!rl->funcs->post_process_record(rl, thisrr)) {
  ------------------
  |  Branch (929:13): [True: 0, False: 293]
  ------------------
  930|       |            /* RLAYERfatal already called */
  931|      0|            goto end;
  932|      0|        }
  933|       |
  934|       |        /*
  935|       |         * Record overflow checking (e.g. checking if
  936|       |         * thisrr->length > SSL3_RT_MAX_PLAIN_LENGTH) is the responsibility of
  937|       |         * the post_process_record() function above. However we check here if
  938|       |         * the received packet overflows the current Max Fragment Length setting
  939|       |         * if there is one.
  940|       |         * Note: rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH and KTLS are
  941|       |         * mutually exclusive. Also note that with KTLS thisrr->length can
  942|       |         * be > SSL3_RT_MAX_PLAIN_LENGTH (and rl->max_frag_len must be ignored)
  943|       |         */
  944|    293|        if (rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH
  ------------------
  |  |  177|    586|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (944:13): [True: 0, False: 293]
  ------------------
  945|      0|            && thisrr->length > rl->max_frag_len) {
  ------------------
  |  Branch (945:16): [True: 0, False: 0]
  ------------------
  946|      0|            RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  947|      0|            goto end;
  948|      0|        }
  949|       |
  950|    293|        thisrr->off = 0;
  951|       |        /*-
  952|       |         * So at this point the following is true
  953|       |         * thisrr->type   is the type of record
  954|       |         * thisrr->length == number of bytes in record
  955|       |         * thisrr->off    == offset to first valid byte
  956|       |         * thisrr->data   == where to take bytes from, increment after use :-).
  957|       |         */
  958|       |
  959|       |        /* just read a 0 length packet */
  960|    293|        if (thisrr->length == 0) {
  ------------------
  |  Branch (960:13): [True: 17, False: 276]
  ------------------
  961|     17|            if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|     17|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (961:17): [True: 0, False: 17]
  ------------------
  962|      0|                RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  963|      0|                    SSL_R_RECORD_TOO_SMALL);
  964|      0|                goto end;
  965|      0|            }
  966|    276|        } else {
  967|    276|            rl->empty_record_count = 0;
  968|    276|        }
  969|    293|    }
  970|       |
  971|    293|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_EARLY) {
  ------------------
  |  | 2933|    293|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
  |  Branch (971:9): [True: 0, False: 293]
  ------------------
  972|      0|        thisrr = &rr[0];
  973|      0|        if (thisrr->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (973:13): [True: 0, False: 0]
  ------------------
  974|      0|            && !rlayer_early_data_count_ok(rl, thisrr->length, 0, 0)) {
  ------------------
  |  Branch (974:16): [True: 0, False: 0]
  ------------------
  975|       |            /* RLAYERfatal already called */
  976|      0|            goto end;
  977|      0|        }
  978|      0|    }
  979|       |
  980|    293|    rl->num_recs = num_recs;
  981|    293|    rl->curr_rec = 0;
  982|    293|    rl->num_released = 0;
  983|    293|    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    293|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  984|    293|end:
  985|    293|    if (macbufs != NULL) {
  ------------------
  |  Branch (985:9): [True: 0, False: 293]
  ------------------
  986|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (986:21): [True: 0, False: 0]
  ------------------
  987|      0|            if (macbufs[j].alloced)
  ------------------
  |  Branch (987:17): [True: 0, False: 0]
  ------------------
  988|      0|                OPENSSL_free(macbufs[j].mac);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  989|      0|        }
  990|      0|        OPENSSL_free(macbufs);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  991|      0|    }
  992|    293|    return ret;
  993|    293|}
tls_default_post_process_record:
 1069|    293|{
 1070|    293|    if (rl->compctx != NULL) {
  ------------------
  |  Branch (1070:9): [True: 0, False: 293]
  ------------------
 1071|      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 (1071:13): [True: 0, False: 0]
  ------------------
 1072|      0|            RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1073|      0|                SSL_R_COMPRESSED_LENGTH_TOO_LONG);
 1074|      0|            return 0;
 1075|      0|        }
 1076|      0|        if (!tls_do_uncompress(rl, rec)) {
  ------------------
  |  Branch (1076:13): [True: 0, False: 0]
  ------------------
 1077|      0|            RLAYERfatal(rl, SSL_AD_DECOMPRESSION_FAILURE,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1078|      0|                SSL_R_BAD_DECOMPRESSION);
 1079|      0|            return 0;
 1080|      0|        }
 1081|      0|    }
 1082|       |
 1083|    293|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|    293|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1083:9): [True: 0, False: 293]
  ------------------
 1084|      0|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1085|      0|        return 0;
 1086|      0|    }
 1087|       |
 1088|    293|    return 1;
 1089|    293|}
tls_read_record:
 1124|  2.22k|{
 1125|  2.22k|    TLS_RL_RECORD *rec;
 1126|       |
 1127|       |    /*
 1128|       |     * tls_get_more_records() can return success without actually reading
 1129|       |     * anything useful (i.e. if empty records are read). We loop here until
 1130|       |     * we have something useful. tls_get_more_records() will eventually fail if
 1131|       |     * too many sequential empty records are read.
 1132|       |     */
 1133|  2.51k|    while (rl->curr_rec >= rl->num_recs) {
  ------------------
  |  Branch (1133:12): [True: 2.22k, False: 293]
  ------------------
 1134|  2.22k|        int ret;
 1135|       |
 1136|  2.22k|        if (rl->num_released != rl->num_recs) {
  ------------------
  |  Branch (1136:13): [True: 0, False: 2.22k]
  ------------------
 1137|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_RECORDS_NOT_RELEASED);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1138|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1139|      0|        }
 1140|       |
 1141|  2.22k|        ret = rl->funcs->get_more_records(rl);
 1142|       |
 1143|  2.22k|        if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  2.22k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1143:13): [True: 1.92k, False: 293]
  ------------------
 1144|  1.92k|            return ret;
 1145|  2.22k|    }
 1146|       |
 1147|       |    /*
 1148|       |     * We have now got rl->num_recs records buffered in rl->rrec. rl->curr_rec
 1149|       |     * points to the next one to read.
 1150|       |     */
 1151|    293|    rec = &rl->rrec[rl->curr_rec++];
 1152|       |
 1153|    293|    *rechandle = rec;
 1154|    293|    *rversion = rec->rec_version;
 1155|    293|    *type = rec->type;
 1156|    293|    *data = rec->data + rec->off;
 1157|    293|    *datalen = rec->length;
 1158|    293|    if (rl->isdtls) {
  ------------------
  |  Branch (1158:9): [True: 0, False: 293]
  ------------------
 1159|      0|        *epoch = rec->epoch;
 1160|      0|        memcpy(seq_num, rec->seq_num, sizeof(rec->seq_num));
 1161|      0|    }
 1162|       |
 1163|    293|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    293|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1164|  2.22k|}
tls_release_record:
 1167|    785|{
 1168|    785|    TLS_RL_RECORD *rec = &rl->rrec[rl->num_released];
 1169|       |
 1170|    785|    if (!ossl_assert(rl->num_released < rl->curr_rec)
  ------------------
  |  |   52|  1.57k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.57k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1170:9): [True: 0, False: 785]
  ------------------
 1171|    785|        || !ossl_assert(rechandle == rec)) {
  ------------------
  |  |   52|    785|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    785|    __FILE__, __LINE__)
  ------------------
  |  Branch (1171:12): [True: 0, False: 785]
  ------------------
 1172|       |        /* Should not happen */
 1173|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_INVALID_RECORD);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1174|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1175|      0|    }
 1176|       |
 1177|    785|    if (rec->length < length) {
  ------------------
  |  Branch (1177:9): [True: 0, False: 785]
  ------------------
 1178|       |        /* Should not happen */
 1179|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1180|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1181|      0|    }
 1182|       |
 1183|    785|    if ((rl->options & SSL_OP_CLEANSE_PLAINTEXT) != 0)
  ------------------
  |  |  358|    785|#define SSL_OP_CLEANSE_PLAINTEXT SSL_OP_BIT(1)
  |  |  ------------------
  |  |  |  |  350|    785|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1183:9): [True: 0, False: 785]
  ------------------
 1184|      0|        OPENSSL_cleanse(rec->data + rec->off, length);
 1185|       |
 1186|    785|    rec->off += length;
 1187|    785|    rec->length -= length;
 1188|       |
 1189|    785|    if (rec->length > 0)
  ------------------
  |  Branch (1189:9): [True: 492, False: 293]
  ------------------
 1190|    492|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    492|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1191|       |
 1192|    293|    rl->num_released++;
 1193|       |
 1194|    293|    if (rl->curr_rec == rl->num_released
  ------------------
  |  Branch (1194:9): [True: 293, False: 0]
  ------------------
 1195|    293|        && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0
  ------------------
  |  |  515|    293|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1195:12): [True: 0, False: 293]
  ------------------
 1196|      0|        && TLS_BUFFER_get_left(&rl->rbuf) == 0)
  ------------------
  |  |  528|      0|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
  |  Branch (1196:12): [True: 0, False: 0]
  ------------------
 1197|      0|        tls_release_read_buffer(rl);
 1198|       |
 1199|    293|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    293|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1200|    785|}
tls_set_options:
 1203|  11.7k|{
 1204|  11.7k|    const OSSL_PARAM *p;
 1205|       |
 1206|  11.7k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS);
  ------------------
  |  |  332|  11.7k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
  ------------------
 1207|  11.7k|    if (p != NULL && !OSSL_PARAM_get_uint64(p, &rl->options)) {
  ------------------
  |  Branch (1207:9): [True: 11.7k, False: 0]
  |  Branch (1207:22): [True: 0, False: 11.7k]
  ------------------
 1208|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1209|      0|        return 0;
 1210|      0|    }
 1211|       |
 1212|  11.7k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE);
  ------------------
  |  |  331|  11.7k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 1213|  11.7k|    if (p != NULL && !OSSL_PARAM_get_uint32(p, &rl->mode)) {
  ------------------
  |  Branch (1213:9): [True: 11.7k, False: 0]
  |  Branch (1213:22): [True: 0, False: 11.7k]
  ------------------
 1214|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1215|      0|        return 0;
 1216|      0|    }
 1217|       |
 1218|  11.7k|    if (rl->direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  11.7k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1218:9): [True: 5.86k, False: 5.86k]
  ------------------
 1219|  5.86k|        p = OSSL_PARAM_locate_const(options,
 1220|  5.86k|            OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN);
  ------------------
  |  |  337|  5.86k|# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
  ------------------
 1221|  5.86k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->rbuf.default_len)) {
  ------------------
  |  Branch (1221:13): [True: 5.86k, False: 0]
  |  Branch (1221:26): [True: 0, False: 5.86k]
  ------------------
 1222|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1223|      0|            return 0;
 1224|      0|        }
 1225|  5.86k|    } else {
 1226|  5.86k|        p = OSSL_PARAM_locate_const(options,
 1227|  5.86k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING);
  ------------------
  |  |  327|  5.86k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
  ------------------
 1228|  5.86k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->block_padding)) {
  ------------------
  |  Branch (1228:13): [True: 5.86k, False: 0]
  |  Branch (1228:26): [True: 0, False: 5.86k]
  ------------------
 1229|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1230|      0|            return 0;
 1231|      0|        }
 1232|  5.86k|        p = OSSL_PARAM_locate_const(options,
 1233|  5.86k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING);
  ------------------
  |  |  328|  5.86k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
  ------------------
 1234|  5.86k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->hs_padding)) {
  ------------------
  |  Branch (1234:13): [True: 5.86k, False: 0]
  |  Branch (1234:26): [True: 0, False: 5.86k]
  ------------------
 1235|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1236|      0|            return 0;
 1237|      0|        }
 1238|  5.86k|    }
 1239|       |
 1240|  11.7k|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_APPLICATION) {
  ------------------
  |  | 2935|  11.7k|#define OSSL_RECORD_PROTECTION_LEVEL_APPLICATION 3
  ------------------
  |  Branch (1240:9): [True: 0, False: 11.7k]
  ------------------
 1241|       |        /*
 1242|       |         * We ignore any read_ahead setting prior to the application protection
 1243|       |         * level. Otherwise we may read ahead data in a lower protection level
 1244|       |         * that is destined for a higher protection level. To simplify the logic
 1245|       |         * we don't support that at this stage.
 1246|       |         */
 1247|      0|        p = OSSL_PARAM_locate_const(options,
 1248|      0|            OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD);
  ------------------
  |  |  333|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
  ------------------
 1249|      0|        if (p != NULL && !OSSL_PARAM_get_int(p, &rl->read_ahead)) {
  ------------------
  |  Branch (1249:13): [True: 0, False: 0]
  |  Branch (1249:26): [True: 0, False: 0]
  ------------------
 1250|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1251|      0|            return 0;
 1252|      0|        }
 1253|      0|    }
 1254|       |
 1255|  11.7k|    return 1;
 1256|  11.7k|}
tls_int_new_record_layer:
 1266|  11.7k|{
 1267|  11.7k|    OSSL_RECORD_LAYER *rl = OPENSSL_zalloc(sizeof(*rl));
  ------------------
  |  |  108|  11.7k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1268|  11.7k|    const OSSL_PARAM *p;
 1269|       |
 1270|  11.7k|    *retrl = NULL;
 1271|       |
 1272|  11.7k|    if (rl == NULL)
  ------------------
  |  Branch (1272:9): [True: 0, False: 11.7k]
  ------------------
 1273|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1274|       |
 1275|       |    /*
 1276|       |     * Default the value for max_frag_len. This may be overridden by the
 1277|       |     * settings
 1278|       |     */
 1279|  11.7k|    rl->max_frag_len = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  11.7k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1280|       |
 1281|       |    /* Loop through all the settings since they must all be understood */
 1282|  11.7k|    if (settings != NULL) {
  ------------------
  |  Branch (1282:9): [True: 11.7k, False: 0]
  ------------------
 1283|  11.7k|        for (p = settings; p->key != NULL; p++) {
  ------------------
  |  Branch (1283:28): [True: 0, False: 11.7k]
  ------------------
 1284|      0|            if (strcmp(p->key, OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM) == 0) {
  ------------------
  |  |  336|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
  ------------------
  |  Branch (1284:17): [True: 0, False: 0]
  ------------------
 1285|      0|                if (!OSSL_PARAM_get_int(p, &rl->use_etm)) {
  ------------------
  |  Branch (1285:21): [True: 0, False: 0]
  ------------------
 1286|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1287|      0|                    goto err;
 1288|      0|                }
 1289|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1289:24): [True: 0, False: 0]
  ------------------
 1290|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN)
  ------------------
  |  |  330|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
  ------------------
 1291|      0|                == 0) {
 1292|      0|                if (!OSSL_PARAM_get_uint(p, &rl->max_frag_len)) {
  ------------------
  |  Branch (1292:21): [True: 0, False: 0]
  ------------------
 1293|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1294|      0|                    goto err;
 1295|      0|                }
 1296|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1296:24): [True: 0, False: 0]
  ------------------
 1297|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA)
  ------------------
  |  |  329|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
  ------------------
 1298|      0|                == 0) {
 1299|      0|                if (!OSSL_PARAM_get_uint32(p, &rl->max_early_data)) {
  ------------------
  |  Branch (1299:21): [True: 0, False: 0]
  ------------------
 1300|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1301|      0|                    goto err;
 1302|      0|                }
 1303|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1303:24): [True: 0, False: 0]
  ------------------
 1304|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC)
  ------------------
  |  |  334|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
  ------------------
 1305|      0|                == 0) {
 1306|      0|                if (!OSSL_PARAM_get_int(p, &rl->stream_mac)) {
  ------------------
  |  Branch (1306:21): [True: 0, False: 0]
  ------------------
 1307|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1308|      0|                    goto err;
 1309|      0|                }
 1310|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1310:24): [True: 0, False: 0]
  ------------------
 1311|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE)
  ------------------
  |  |  335|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
  ------------------
 1312|      0|                == 0) {
 1313|      0|                if (!OSSL_PARAM_get_int(p, &rl->tlstree)) {
  ------------------
  |  Branch (1313:21): [True: 0, False: 0]
  ------------------
 1314|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1315|      0|                    goto err;
 1316|      0|                }
 1317|      0|            } else {
 1318|      0|                ERR_raise(ERR_LIB_SSL, SSL_R_UNKNOWN_MANDATORY_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1319|      0|                goto err;
 1320|      0|            }
 1321|      0|        }
 1322|  11.7k|    }
 1323|       |
 1324|  11.7k|    rl->libctx = libctx;
 1325|  11.7k|    rl->propq = propq;
 1326|       |
 1327|  11.7k|    rl->version = vers;
 1328|  11.7k|    rl->role = role;
 1329|  11.7k|    rl->direction = direction;
 1330|  11.7k|    rl->level = level;
 1331|  11.7k|    rl->taglen = taglen;
 1332|  11.7k|    rl->md = md;
 1333|       |
 1334|  11.7k|    rl->alert = SSL_AD_NO_ALERT;
  ------------------
  |  |   63|  11.7k|#define SSL_AD_NO_ALERT -1
  ------------------
 1335|  11.7k|    rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1160|  11.7k|#define SSL_ST_READ_HEADER 0xF0
  ------------------
 1336|       |
 1337|  11.7k|    if (level == OSSL_RECORD_PROTECTION_LEVEL_NONE)
  ------------------
  |  | 2932|  11.7k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1337:9): [True: 11.7k, False: 0]
  ------------------
 1338|  11.7k|        rl->is_first_record = 1;
 1339|       |
 1340|  11.7k|    if (!tls_set1_bio(rl, transport))
  ------------------
  |  Branch (1340:9): [True: 0, False: 11.7k]
  ------------------
 1341|      0|        goto err;
 1342|       |
 1343|  11.7k|    if (prev != NULL && !BIO_up_ref(prev))
  ------------------
  |  Branch (1343:9): [True: 0, False: 11.7k]
  |  Branch (1343:25): [True: 0, False: 0]
  ------------------
 1344|      0|        goto err;
 1345|  11.7k|    rl->prev = prev;
 1346|       |
 1347|  11.7k|    if (next != NULL && !BIO_up_ref(next))
  ------------------
  |  Branch (1347:9): [True: 5.86k, False: 5.86k]
  |  Branch (1347:25): [True: 0, False: 5.86k]
  ------------------
 1348|      0|        goto err;
 1349|  11.7k|    rl->next = next;
 1350|       |
 1351|  11.7k|    rl->cbarg = cbarg;
 1352|  11.7k|    if (fns != NULL) {
  ------------------
  |  Branch (1352:9): [True: 11.7k, False: 0]
  ------------------
 1353|  35.2k|        for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1353:16): [True: 23.4k, False: 11.7k]
  ------------------
 1354|  23.4k|            switch (fns->function_id) {
 1355|  11.7k|            case OSSL_FUNC_RLAYER_SKIP_EARLY_DATA:
  ------------------
  |  |  185|  11.7k|#define OSSL_FUNC_RLAYER_SKIP_EARLY_DATA 1
  ------------------
  |  Branch (1355:13): [True: 11.7k, False: 11.7k]
  ------------------
 1356|  11.7k|                rl->skip_early_data = OSSL_FUNC_rlayer_skip_early_data(fns);
 1357|  11.7k|                break;
 1358|      0|            case OSSL_FUNC_RLAYER_MSG_CALLBACK:
  ------------------
  |  |  187|      0|#define OSSL_FUNC_RLAYER_MSG_CALLBACK 2
  ------------------
  |  Branch (1358:13): [True: 0, False: 23.4k]
  ------------------
 1359|      0|                rl->msg_callback = OSSL_FUNC_rlayer_msg_callback(fns);
 1360|      0|                break;
 1361|  11.7k|            case OSSL_FUNC_RLAYER_SECURITY:
  ------------------
  |  |  189|  11.7k|#define OSSL_FUNC_RLAYER_SECURITY 3
  ------------------
  |  Branch (1361:13): [True: 11.7k, False: 11.7k]
  ------------------
 1362|  11.7k|                rl->security = OSSL_FUNC_rlayer_security(fns);
 1363|  11.7k|                break;
 1364|      0|            case OSSL_FUNC_RLAYER_PADDING:
  ------------------
  |  |  191|      0|#define OSSL_FUNC_RLAYER_PADDING 4
  ------------------
  |  Branch (1364:13): [True: 0, False: 23.4k]
  ------------------
 1365|      0|                rl->padding = OSSL_FUNC_rlayer_padding(fns);
 1366|      0|            default:
  ------------------
  |  Branch (1366:13): [True: 0, False: 23.4k]
  ------------------
 1367|       |                /* Just ignore anything we don't understand */
 1368|      0|                break;
 1369|  23.4k|            }
 1370|  23.4k|        }
 1371|  11.7k|    }
 1372|       |
 1373|  11.7k|    if (!tls_set_options(rl, options)) {
  ------------------
  |  Branch (1373:9): [True: 0, False: 11.7k]
  ------------------
 1374|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1375|      0|        goto err;
 1376|      0|    }
 1377|       |
 1378|  11.7k|    if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0
  ------------------
  |  |  377|  11.7k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  350|  11.7k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1378:9): [True: 11.7k, False: 18]
  ------------------
 1379|  11.7k|        && rl->version <= TLS1_VERSION
  ------------------
  |  |   24|  23.4k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1379:12): [True: 0, False: 11.7k]
  ------------------
 1380|      0|        && !EVP_CIPHER_is_a(ciph, "NULL")
  ------------------
  |  Branch (1380:12): [True: 0, False: 0]
  ------------------
 1381|      0|        && !EVP_CIPHER_is_a(ciph, "RC4")) {
  ------------------
  |  Branch (1381:12): [True: 0, False: 0]
  ------------------
 1382|       |        /*
 1383|       |         * Enable vulnerability countermeasure for CBC ciphers with known-IV
 1384|       |         * problem (http://www.openssl.org/~bodo/tls-cbc.txt)
 1385|       |         */
 1386|      0|        rl->need_empty_fragments = 1;
 1387|      0|    }
 1388|       |
 1389|  11.7k|    *retrl = rl;
 1390|  11.7k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  11.7k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1391|      0|err:
 1392|      0|    tls_int_free(rl);
 1393|      0|    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1394|  11.7k|}
tls_free:
 1481|  11.7k|{
 1482|  11.7k|    TLS_BUFFER *rbuf;
 1483|  11.7k|    size_t left, written;
 1484|  11.7k|    int ret = 1;
 1485|       |
 1486|  11.7k|    if (rl == NULL)
  ------------------
  |  Branch (1486:9): [True: 0, False: 11.7k]
  ------------------
 1487|      0|        return 1;
 1488|       |
 1489|  11.7k|    rbuf = &rl->rbuf;
 1490|       |
 1491|  11.7k|    left = TLS_BUFFER_get_left(rbuf);
  ------------------
  |  |  528|  11.7k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1492|  11.7k|    if (left > 0) {
  ------------------
  |  Branch (1492:9): [True: 40, False: 11.6k]
  ------------------
 1493|       |        /*
 1494|       |         * This record layer is closing but we still have data left in our
 1495|       |         * buffer. It must be destined for the next epoch - so push it there.
 1496|       |         */
 1497|     40|        ret = BIO_write_ex(rl->next, rbuf->buf + rbuf->offset, left, &written);
 1498|     40|    }
 1499|  11.7k|    tls_int_free(rl);
 1500|       |
 1501|  11.7k|    return ret;
 1502|  11.7k|}
tls_processed_read_pending:
 1510|    293|{
 1511|    293|    return rl->curr_rec < rl->num_recs;
 1512|    293|}
tls_get_max_records_default:
 1530|  1.83k|{
 1531|       |    /*
 1532|       |     * If we have a pipeline capable cipher, and we have been configured to use
 1533|       |     * it, then return the preferred number of pipelines.
 1534|       |     */
 1535|  1.83k|    if (rl->max_pipelines > 0
  ------------------
  |  Branch (1535:9): [True: 0, False: 1.83k]
  ------------------
 1536|      0|        && rl->enc_ctx != NULL
  ------------------
  |  Branch (1536:12): [True: 0, False: 0]
  ------------------
 1537|      0|        && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx))
  ------------------
  |  Branch (1537:12): [True: 0, False: 0]
  ------------------
 1538|      0|               & EVP_CIPH_FLAG_PIPELINE)
  ------------------
  |  |  360|      0|#define EVP_CIPH_FLAG_PIPELINE 0X800000
  ------------------
 1539|      0|            != 0
 1540|      0|        && RLAYER_USE_EXPLICIT_IV(rl)) {
  ------------------
  |  |  397|      0|#define RLAYER_USE_EXPLICIT_IV(rl) ((rl)->version == TLS1_1_VERSION \
  |  |  ------------------
  |  |  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  |  |  ------------------
  |  |  |  Branch (397:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  398|      0|    || (rl)->version == TLS1_2_VERSION                              \
  |  |  ------------------
  |  |  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  |  |  ------------------
  |  |  |  Branch (398:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  399|      0|    || (rl)->version == DTLS1_BAD_VER                               \
  |  |  ------------------
  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  ------------------
  |  |  |  Branch (399:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  400|      0|    || (rl)->version == DTLS1_VERSION                               \
  |  |  ------------------
  |  |  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  |  |  ------------------
  |  |  |  Branch (400:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  401|      0|    || (rl)->version == DTLS1_2_VERSION)
  |  |  ------------------
  |  |  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  |  |  ------------------
  |  |  |  Branch (401:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1541|      0|        size_t pipes;
 1542|       |
 1543|      0|        if (len == 0)
  ------------------
  |  Branch (1543:13): [True: 0, False: 0]
  ------------------
 1544|      0|            return 1;
 1545|      0|        pipes = ((len - 1) / *preffrag) + 1;
 1546|       |
 1547|      0|        return (pipes < rl->max_pipelines) ? pipes : rl->max_pipelines;
  ------------------
  |  Branch (1547:16): [True: 0, False: 0]
  ------------------
 1548|      0|    }
 1549|       |
 1550|  1.83k|    return 1;
 1551|  1.83k|}
tls_get_max_records:
 1555|  1.83k|{
 1556|  1.83k|    return rl->funcs->get_max_records(rl, type, len, maxfrag, preffrag);
 1557|  1.83k|}
tls_allocate_write_buffers_default:
 1563|  3.63k|{
 1564|  3.63k|    if (!tls_setup_write_buffer(rl, numtempl, 0, 0)) {
  ------------------
  |  Branch (1564:9): [True: 0, False: 3.63k]
  ------------------
 1565|       |        /* RLAYERfatal() already called */
 1566|      0|        return 0;
 1567|      0|    }
 1568|       |
 1569|  3.63k|    return 1;
 1570|  3.63k|}
tls_initialise_write_packets_default:
 1579|  3.63k|{
 1580|  3.63k|    WPACKET *thispkt;
 1581|  3.63k|    size_t j, align;
 1582|  3.63k|    TLS_BUFFER *wb;
 1583|       |
 1584|  7.27k|    for (j = 0; j < numtempl; j++) {
  ------------------
  |  Branch (1584:17): [True: 3.63k, False: 3.63k]
  ------------------
 1585|  3.63k|        thispkt = &pkt[j];
 1586|  3.63k|        wb = &bufs[j];
 1587|       |
 1588|  3.63k|        wb->type = templates[j].type;
 1589|       |
 1590|  3.63k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
 1591|  3.63k|        align = (size_t)TLS_BUFFER_get_buf(wb);
  ------------------
  |  |  525|  3.63k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
 1592|  3.63k|        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|  7.27k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (1592:18): [True: 0, False: 3.63k]
  ------------------
 1593|  3.63k|        align = SSL3_ALIGN_PAYLOAD - 1
  ------------------
  |  |  152|  3.63k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1594|  3.63k|            - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  3.63k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1595|  3.63k|#endif
 1596|  3.63k|        TLS_BUFFER_set_offset(wb, align);
  ------------------
  |  |  532|  3.63k|#define TLS_BUFFER_set_offset(b, o) ((b)->offset = (o))
  ------------------
 1597|       |
 1598|  3.63k|        if (!WPACKET_init_static_len(thispkt, TLS_BUFFER_get_buf(wb),
  ------------------
  |  |  525|  3.63k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
  |  Branch (1598:13): [True: 0, False: 3.63k]
  ------------------
 1599|  3.63k|                TLS_BUFFER_get_len(wb), 0)) {
  ------------------
  |  |  527|  3.63k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
 1600|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1601|      0|            return 0;
 1602|      0|        }
 1603|  3.63k|        (*wpinited)++;
 1604|  3.63k|        if (!WPACKET_allocate_bytes(thispkt, align, NULL)) {
  ------------------
  |  Branch (1604:13): [True: 0, False: 3.63k]
  ------------------
 1605|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1606|      0|            return 0;
 1607|      0|        }
 1608|  3.63k|    }
 1609|       |
 1610|  3.63k|    return 1;
 1611|  3.63k|}
tls_prepare_record_header_default:
 1618|  3.63k|{
 1619|  3.63k|    size_t maxcomplen;
 1620|       |
 1621|  3.63k|    *recdata = NULL;
 1622|       |
 1623|  3.63k|    maxcomplen = templ->buflen;
 1624|  3.63k|    if (rl->compctx != NULL)
  ------------------
  |  Branch (1624:9): [True: 0, False: 3.63k]
  ------------------
 1625|      0|        maxcomplen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
 1626|       |
 1627|  3.63k|    if (!WPACKET_put_bytes_u8(thispkt, rectype)
  ------------------
  |  |  889|  7.27k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1627:9): [True: 0, False: 3.63k]
  ------------------
 1628|  3.63k|        || !WPACKET_put_bytes_u16(thispkt, templ->version)
  ------------------
  |  |  891|  7.27k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1628:12): [True: 0, False: 3.63k]
  ------------------
 1629|  3.63k|        || !WPACKET_start_sub_packet_u16(thispkt)
  ------------------
  |  |  792|  7.27k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1629:12): [True: 0, False: 3.63k]
  ------------------
 1630|  3.63k|        || (rl->eivlen > 0
  ------------------
  |  Branch (1630:13): [True: 0, False: 3.63k]
  ------------------
 1631|      0|            && !WPACKET_allocate_bytes(thispkt, rl->eivlen, NULL))
  ------------------
  |  Branch (1631:16): [True: 0, False: 0]
  ------------------
 1632|  3.63k|        || (maxcomplen > 0
  ------------------
  |  Branch (1632:13): [True: 3.63k, False: 0]
  ------------------
 1633|  3.63k|            && !WPACKET_reserve_bytes(thispkt, maxcomplen,
  ------------------
  |  Branch (1633:16): [True: 0, False: 3.63k]
  ------------------
 1634|  3.63k|                recdata))) {
 1635|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1636|      0|        return 0;
 1637|      0|    }
 1638|       |
 1639|  3.63k|    return 1;
 1640|  3.63k|}
tls_post_encryption_processing_default:
 1696|  3.63k|{
 1697|  3.63k|    size_t origlen, len;
 1698|  3.63k|    size_t headerlen = rl->isdtls ? DTLS1_RT_HEADER_LENGTH
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  |  Branch (1698:24): [True: 0, False: 3.63k]
  ------------------
 1699|  3.63k|                                  : SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  7.27k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
 1700|       |
 1701|       |    /* Allocate bytes for the encryption overhead */
 1702|  3.63k|    if (!WPACKET_get_length(thispkt, &origlen)
  ------------------
  |  Branch (1702:9): [True: 0, False: 3.63k]
  ------------------
 1703|       |        /* Check we allowed enough room for the encryption growth */
 1704|  3.63k|        || !ossl_assert(origlen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD
  ------------------
  |  |   52|  7.27k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.27k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1704:12): [True: 0, False: 3.63k]
  ------------------
 1705|  3.63k|                - mac_size
 1706|  3.63k|            >= thiswr->length)
 1707|       |        /* Encryption should never shrink the data! */
 1708|  3.63k|        || origlen > thiswr->length
  ------------------
  |  Branch (1708:12): [True: 0, False: 3.63k]
  ------------------
 1709|  3.63k|        || (thiswr->length > origlen
  ------------------
  |  Branch (1709:13): [True: 0, False: 3.63k]
  ------------------
 1710|      0|            && !WPACKET_allocate_bytes(thispkt,
  ------------------
  |  Branch (1710:16): [True: 0, False: 0]
  ------------------
 1711|      0|                thiswr->length - origlen,
 1712|      0|                NULL))) {
 1713|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1714|      0|        return 0;
 1715|      0|    }
 1716|  3.63k|    if (rl->use_etm && mac_size != 0) {
  ------------------
  |  Branch (1716:9): [True: 0, False: 3.63k]
  |  Branch (1716:24): [True: 0, False: 0]
  ------------------
 1717|      0|        unsigned char *mac;
 1718|       |
 1719|      0|        if (!WPACKET_allocate_bytes(thispkt, mac_size, &mac)
  ------------------
  |  Branch (1719:13): [True: 0, False: 0]
  ------------------
 1720|      0|            || !rl->funcs->mac(rl, thiswr, mac, 1)) {
  ------------------
  |  Branch (1720:16): [True: 0, False: 0]
  ------------------
 1721|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1722|      0|            return 0;
 1723|      0|        }
 1724|       |
 1725|      0|        TLS_RL_RECORD_add_length(thiswr, mac_size);
  ------------------
  |  |   87|      0|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1726|      0|    }
 1727|       |
 1728|  3.63k|    if (!WPACKET_get_length(thispkt, &len)
  ------------------
  |  Branch (1728:9): [True: 0, False: 3.63k]
  ------------------
 1729|  3.63k|        || !WPACKET_close(thispkt)) {
  ------------------
  |  Branch (1729:12): [True: 0, False: 3.63k]
  ------------------
 1730|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1731|      0|        return 0;
 1732|      0|    }
 1733|       |
 1734|  3.63k|    if (rl->msg_callback != NULL) {
  ------------------
  |  Branch (1734:9): [True: 0, False: 3.63k]
  ------------------
 1735|      0|        unsigned char *recordstart;
 1736|       |
 1737|      0|        recordstart = WPACKET_get_curr(thispkt) - len - headerlen;
 1738|      0|        rl->msg_callback(1, thiswr->rec_version, SSL3_RT_HEADER, recordstart,
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
 1739|      0|            headerlen, rl->cbarg);
 1740|       |
 1741|      0|        if (rl->version == TLS1_3_VERSION && rl->enc_ctx != NULL) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1741:13): [True: 0, False: 0]
  |  Branch (1741:46): [True: 0, False: 0]
  ------------------
 1742|      0|            unsigned char ctype = thistempl->type;
 1743|       |
 1744|      0|            rl->msg_callback(1, thiswr->rec_version, SSL3_RT_INNER_CONTENT_TYPE,
  ------------------
  |  |  240|      0|#define SSL3_RT_INNER_CONTENT_TYPE 0x101
  ------------------
 1745|      0|                &ctype, 1, rl->cbarg);
 1746|      0|        }
 1747|      0|    }
 1748|       |
 1749|  3.63k|    if (!WPACKET_finish(thispkt)) {
  ------------------
  |  Branch (1749:9): [True: 0, False: 3.63k]
  ------------------
 1750|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1751|      0|        return 0;
 1752|      0|    }
 1753|       |
 1754|  3.63k|    TLS_RL_RECORD_add_length(thiswr, headerlen);
  ------------------
  |  |   87|  3.63k|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1755|       |
 1756|  3.63k|    return 1;
 1757|  3.63k|}
tls_write_records_default:
 1762|  3.63k|{
 1763|  3.63k|    WPACKET pkt[SSL_MAX_PIPELINES + 1];
 1764|  3.63k|    TLS_RL_RECORD wr[SSL_MAX_PIPELINES + 1];
 1765|  3.63k|    WPACKET *thispkt;
 1766|  3.63k|    TLS_RL_RECORD *thiswr;
 1767|  3.63k|    int mac_size = 0, ret = 0;
 1768|  3.63k|    size_t wpinited = 0;
 1769|  3.63k|    size_t j, prefix = 0;
 1770|  3.63k|    OSSL_RECORD_TEMPLATE prefixtempl;
 1771|  3.63k|    OSSL_RECORD_TEMPLATE *thistempl;
 1772|       |
 1773|  3.63k|    if (rl->md_ctx != NULL && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) {
  ------------------
  |  Branch (1773:9): [True: 0, False: 3.63k]
  |  Branch (1773:31): [True: 0, False: 0]
  ------------------
 1774|      0|        mac_size = EVP_MD_CTX_get_size(rl->md_ctx);
  ------------------
  |  |  589|      0|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
 1775|      0|        if (mac_size < 0) {
  ------------------
  |  Branch (1775:13): [True: 0, False: 0]
  ------------------
 1776|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1777|      0|            goto err;
 1778|      0|        }
 1779|      0|    }
 1780|       |
 1781|  3.63k|    if (!rl->funcs->allocate_write_buffers(rl, templates, numtempl, &prefix)) {
  ------------------
  |  Branch (1781:9): [True: 0, False: 3.63k]
  ------------------
 1782|       |        /* RLAYERfatal() already called */
 1783|      0|        goto err;
 1784|      0|    }
 1785|       |
 1786|  3.63k|    if (!rl->funcs->initialise_write_packets(rl, templates, numtempl,
  ------------------
  |  Branch (1786:9): [True: 0, False: 3.63k]
  ------------------
 1787|  3.63k|            &prefixtempl, pkt, rl->wbuf,
 1788|  3.63k|            &wpinited)) {
 1789|       |        /* RLAYERfatal() already called */
 1790|      0|        goto err;
 1791|      0|    }
 1792|       |
 1793|       |    /* Clear our TLS_RL_RECORD structures */
 1794|  3.63k|    memset(wr, 0, sizeof(wr));
 1795|  7.27k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1795:17): [True: 3.63k, False: 3.63k]
  ------------------
 1796|  3.63k|        unsigned char *compressdata = NULL;
 1797|  3.63k|        uint8_t rectype;
 1798|       |
 1799|  3.63k|        thispkt = &pkt[j];
 1800|  3.63k|        thiswr = &wr[j];
 1801|  3.63k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1801:21): [True: 0, False: 3.63k]
  ------------------
 1802|       |
 1803|       |        /*
 1804|       |         * Default to the record type as specified in the template unless the
 1805|       |         * protocol implementation says differently.
 1806|       |         */
 1807|  3.63k|        if (rl->funcs->get_record_type != NULL)
  ------------------
  |  Branch (1807:13): [True: 0, False: 3.63k]
  ------------------
 1808|      0|            rectype = rl->funcs->get_record_type(rl, thistempl);
 1809|  3.63k|        else
 1810|  3.63k|            rectype = thistempl->type;
 1811|       |
 1812|  3.63k|        TLS_RL_RECORD_set_type(thiswr, rectype);
  ------------------
  |  |   83|  3.63k|#define TLS_RL_RECORD_set_type(r, t) ((r)->type = (t))
  ------------------
 1813|  3.63k|        TLS_RL_RECORD_set_rec_version(thiswr, thistempl->version);
  ------------------
  |  |   84|  3.63k|#define TLS_RL_RECORD_set_rec_version(r, v) ((r)->rec_version = (v))
  ------------------
 1814|       |
 1815|  3.63k|        if (!rl->funcs->prepare_record_header(rl, thispkt, thistempl, rectype,
  ------------------
  |  Branch (1815:13): [True: 0, False: 3.63k]
  ------------------
 1816|  3.63k|                &compressdata)) {
 1817|       |            /* RLAYERfatal() already called */
 1818|      0|            goto err;
 1819|      0|        }
 1820|       |
 1821|       |        /* lets setup the record stuff. */
 1822|  3.63k|        TLS_RL_RECORD_set_data(thiswr, compressdata);
  ------------------
  |  |   88|  3.63k|#define TLS_RL_RECORD_set_data(r, d) ((r)->data = (d))
  ------------------
 1823|  3.63k|        TLS_RL_RECORD_set_length(thiswr, thistempl->buflen);
  ------------------
  |  |   86|  3.63k|#define TLS_RL_RECORD_set_length(r, l) ((r)->length = (l))
  ------------------
 1824|       |
 1825|  3.63k|        TLS_RL_RECORD_set_input(thiswr, (unsigned char *)thistempl->buf);
  ------------------
  |  |   89|  3.63k|#define TLS_RL_RECORD_set_input(r, i) ((r)->input = (i))
  ------------------
 1826|       |
 1827|       |        /*
 1828|       |         * we now 'read' from thiswr->input, thiswr->length bytes into
 1829|       |         * thiswr->data
 1830|       |         */
 1831|       |
 1832|       |        /* first we compress */
 1833|  3.63k|        if (rl->compctx != NULL) {
  ------------------
  |  Branch (1833:13): [True: 0, False: 3.63k]
  ------------------
 1834|      0|            if (!tls_do_compress(rl, thiswr)
  ------------------
  |  Branch (1834:17): [True: 0, False: 0]
  ------------------
 1835|      0|                || !WPACKET_allocate_bytes(thispkt, thiswr->length, NULL)) {
  ------------------
  |  Branch (1835:20): [True: 0, False: 0]
  ------------------
 1836|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_COMPRESSION_FAILURE);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1837|      0|                goto err;
 1838|      0|            }
 1839|  3.63k|        } else if (compressdata != NULL) {
  ------------------
  |  Branch (1839:20): [True: 3.63k, False: 0]
  ------------------
 1840|  3.63k|            if (!WPACKET_memcpy(thispkt, thiswr->input, thiswr->length)) {
  ------------------
  |  Branch (1840:17): [True: 0, False: 3.63k]
  ------------------
 1841|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1842|      0|                goto err;
 1843|      0|            }
 1844|  3.63k|            TLS_RL_RECORD_reset_input(&wr[j]);
  ------------------
  |  |   90|  3.63k|#define TLS_RL_RECORD_reset_input(r) ((r)->input = (r)->data)
  ------------------
 1845|  3.63k|        }
 1846|       |
 1847|  3.63k|        if (rl->funcs->add_record_padding != NULL
  ------------------
  |  Branch (1847:13): [True: 0, False: 3.63k]
  ------------------
 1848|      0|            && !rl->funcs->add_record_padding(rl, thistempl, thispkt,
  ------------------
  |  Branch (1848:16): [True: 0, False: 0]
  ------------------
 1849|      0|                thiswr)) {
 1850|       |            /* RLAYERfatal() already called */
 1851|      0|            goto err;
 1852|      0|        }
 1853|       |
 1854|  3.63k|        if (!rl->funcs->prepare_for_encryption(rl, mac_size, thispkt, thiswr)) {
  ------------------
  |  Branch (1854:13): [True: 0, False: 3.63k]
  ------------------
 1855|       |            /* RLAYERfatal() already called */
 1856|      0|            goto err;
 1857|      0|        }
 1858|  3.63k|    }
 1859|       |
 1860|  3.63k|    if (prefix) {
  ------------------
  |  Branch (1860:9): [True: 0, False: 3.63k]
  ------------------
 1861|      0|        if (rl->funcs->cipher(rl, wr, 1, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1861:13): [True: 0, False: 0]
  ------------------
 1862|      0|            if (rl->alert == SSL_AD_NO_ALERT) {
  ------------------
  |  |   63|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (1862:17): [True: 0, False: 0]
  ------------------
 1863|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1864|      0|            }
 1865|      0|            goto err;
 1866|      0|        }
 1867|      0|    }
 1868|       |
 1869|  3.63k|    if (rl->funcs->cipher(rl, wr + prefix, numtempl, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1869:9): [True: 0, False: 3.63k]
  ------------------
 1870|      0|        if (rl->alert == SSL_AD_NO_ALERT) {
  ------------------
  |  |   63|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (1870:13): [True: 0, False: 0]
  ------------------
 1871|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1872|      0|        }
 1873|      0|        goto err;
 1874|      0|    }
 1875|       |
 1876|  7.27k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1876:17): [True: 3.63k, False: 3.63k]
  ------------------
 1877|  3.63k|        thispkt = &pkt[j];
 1878|  3.63k|        thiswr = &wr[j];
 1879|  3.63k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1879:21): [True: 0, False: 3.63k]
  ------------------
 1880|       |
 1881|  3.63k|        if (!rl->funcs->post_encryption_processing(rl, mac_size, thistempl,
  ------------------
  |  Branch (1881:13): [True: 0, False: 3.63k]
  ------------------
 1882|  3.63k|                thispkt, thiswr)) {
 1883|       |            /* RLAYERfatal() already called */
 1884|      0|            goto err;
 1885|      0|        }
 1886|       |
 1887|       |        /* now let's set up wb */
 1888|  3.63k|        TLS_BUFFER_set_left(&rl->wbuf[j], TLS_RL_RECORD_get_length(thiswr));
  ------------------
  |  |  529|  3.63k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1889|  3.63k|    }
 1890|       |
 1891|  3.63k|    ret = 1;
 1892|  3.63k|err:
 1893|  7.27k|    for (j = 0; j < wpinited; j++)
  ------------------
  |  Branch (1893:17): [True: 3.63k, False: 3.63k]
  ------------------
 1894|  3.63k|        WPACKET_cleanup(&pkt[j]);
 1895|  3.63k|    return ret;
 1896|  3.63k|}
tls_write_records:
 1900|  3.63k|{
 1901|       |    /* Check we don't have pending data waiting to write */
 1902|  3.63k|    if (!ossl_assert(rl->nextwbuf >= rl->numwpipes
  ------------------
  |  |   52|  3.63k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 3.63k, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  3.63k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1902:9): [True: 0, False: 3.63k]
  ------------------
 1903|  3.63k|            || TLS_BUFFER_get_left(&rl->wbuf[rl->nextwbuf]) == 0)) {
 1904|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1905|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1906|      0|    }
 1907|       |
 1908|  3.63k|    if (!rl->funcs->write_records(rl, templates, numtempl)) {
  ------------------
  |  Branch (1908:9): [True: 0, False: 3.63k]
  ------------------
 1909|       |        /* RLAYERfatal already called */
 1910|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1911|      0|    }
 1912|       |
 1913|  3.63k|    rl->nextwbuf = 0;
 1914|       |    /* we now just need to write the buffers */
 1915|  3.63k|    return tls_retry_write_records(rl);
 1916|  3.63k|}
tls_retry_write_records:
 1919|  3.63k|{
 1920|  3.63k|    int i, ret;
 1921|  3.63k|    TLS_BUFFER *thiswb;
 1922|  3.63k|    size_t tmpwrit = 0;
 1923|       |
 1924|  3.63k|    if (rl->nextwbuf >= rl->numwpipes)
  ------------------
  |  Branch (1924:9): [True: 0, False: 3.63k]
  ------------------
 1925|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1926|       |
 1927|  3.63k|    for (;;) {
 1928|  3.63k|        thiswb = &rl->wbuf[rl->nextwbuf];
 1929|       |
 1930|  3.63k|        clear_sys_error();
  ------------------
  |  |   31|  3.63k|#define clear_sys_error() errno = 0
  ------------------
 1931|  3.63k|        if (rl->bio != NULL) {
  ------------------
  |  Branch (1931:13): [True: 3.63k, False: 0]
  ------------------
 1932|  3.63k|            if (rl->funcs->prepare_write_bio != NULL) {
  ------------------
  |  Branch (1932:17): [True: 0, False: 3.63k]
  ------------------
 1933|      0|                ret = rl->funcs->prepare_write_bio(rl, thiswb->type);
 1934|      0|                if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1934:21): [True: 0, False: 0]
  ------------------
 1935|      0|                    return ret;
 1936|      0|            }
 1937|  3.63k|            i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  525|  3.63k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
                          i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  531|  3.63k|#define TLS_BUFFER_get_offset(b) ((b)->offset)
  ------------------
 1938|  3.63k|                (unsigned int)TLS_BUFFER_get_left(thiswb));
  ------------------
  |  |  528|  3.63k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1939|  3.63k|            if (i >= 0) {
  ------------------
  |  Branch (1939:17): [True: 3.63k, False: 0]
  ------------------
 1940|  3.63k|                tmpwrit = i;
 1941|  3.63k|                if (i == 0 && BIO_should_retry(rl->bio))
  ------------------
  |  |  272|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (272:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1941:21): [True: 0, False: 3.63k]
  ------------------
 1942|      0|                    ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1943|  3.63k|                else
 1944|  3.63k|                    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  3.63k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1945|  3.63k|            } else {
 1946|      0|                if (BIO_should_retry(rl->bio)) {
  ------------------
  |  |  272|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (272:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1947|      0|                    ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1948|      0|                } else {
 1949|      0|                    ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|      0|#define ERR_LIB_SYS 2
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
 1950|      0|                        "tls_retry_write_records failure");
 1951|      0|                    ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1952|      0|                }
 1953|      0|            }
 1954|  3.63k|        } else {
 1955|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_BIO_NOT_SET);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1956|      0|            ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1957|      0|            i = -1;
 1958|      0|        }
 1959|       |
 1960|       |        /*
 1961|       |         * When an empty fragment is sent on a connection using KTLS,
 1962|       |         * it is sent as a write of zero bytes.  If this zero byte
 1963|       |         * write succeeds, i will be 0 rather than a non-zero value.
 1964|       |         * Treat i == 0 as success rather than an error for zero byte
 1965|       |         * writes to permit this case.
 1966|       |         */
 1967|  3.63k|        if (i >= 0 && tmpwrit == TLS_BUFFER_get_left(thiswb)) {
  ------------------
  |  |  528|  3.63k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
  |  Branch (1967:13): [True: 3.63k, False: 0]
  |  Branch (1967:23): [True: 3.63k, False: 0]
  ------------------
 1968|  3.63k|            TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  529|  3.63k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1969|  3.63k|            TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  533|  3.63k|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1970|  3.63k|            if (++(rl->nextwbuf) < rl->numwpipes)
  ------------------
  |  Branch (1970:17): [True: 0, False: 3.63k]
  ------------------
 1971|      0|                continue;
 1972|       |
 1973|  3.63k|            if (rl->nextwbuf == rl->numwpipes
  ------------------
  |  Branch (1973:17): [True: 3.63k, False: 0]
  ------------------
 1974|  3.63k|                && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  515|  3.63k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1974:20): [True: 0, False: 3.63k]
  ------------------
 1975|      0|                tls_release_write_buffer(rl);
 1976|  3.63k|            return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  3.63k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1977|  3.63k|        } else if (i <= 0) {
  ------------------
  |  Branch (1977:20): [True: 0, False: 0]
  ------------------
 1978|      0|            if (rl->isdtls) {
  ------------------
  |  Branch (1978:17): [True: 0, False: 0]
  ------------------
 1979|       |                /*
 1980|       |                 * For DTLS, just drop it. That's kind of the whole point in
 1981|       |                 * using a datagram service
 1982|       |                 */
 1983|      0|                TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  529|      0|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1984|      0|                if (++(rl->nextwbuf) == rl->numwpipes
  ------------------
  |  Branch (1984:21): [True: 0, False: 0]
  ------------------
 1985|      0|                    && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  515|      0|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1985:24): [True: 0, False: 0]
  ------------------
 1986|      0|                    tls_release_write_buffer(rl);
 1987|      0|            }
 1988|      0|            return ret;
 1989|      0|        }
 1990|      0|        TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  533|      0|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1991|      0|        TLS_BUFFER_sub_left(thiswb, tmpwrit);
  ------------------
  |  |  530|      0|#define TLS_BUFFER_sub_left(b, l) ((b)->left -= (l))
  ------------------
 1992|      0|    }
 1993|  3.63k|}
tls_get_alert_code:
 1996|    164|{
 1997|    164|    return rl->alert;
 1998|    164|}
tls_set1_bio:
 2001|  19.5k|{
 2002|  19.5k|    if (bio != NULL && !BIO_up_ref(bio))
  ------------------
  |  Branch (2002:9): [True: 11.7k, False: 7.82k]
  |  Branch (2002:24): [True: 0, False: 11.7k]
  ------------------
 2003|      0|        return 0;
 2004|  19.5k|    BIO_free(rl->bio);
 2005|  19.5k|    rl->bio = bio;
 2006|       |
 2007|  19.5k|    return 1;
 2008|  19.5k|}
tls_set_protocol_version:
 2020|     94|{
 2021|     94|    return rl->funcs->set_protocol_version(rl, version);
 2022|     94|}
tls_set_first_handshake:
 2030|  11.7k|{
 2031|  11.7k|    rl->is_first_handshake = first;
 2032|  11.7k|}
tls_common.c:tls_allow_compression:
  114|  5.46k|{
  115|  5.46k|    if (rl->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  394|  5.46k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  350|  5.46k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 5.46k, False: 0]
  ------------------
  116|  5.46k|        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);
  ------------------
  |  | 2778|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (119:12): [True: 0, False: 0]
  ------------------
  120|  5.46k|}
tls_common.c:tls_release_write_buffer_int:
  124|  15.3k|{
  125|  15.3k|    TLS_BUFFER *wb;
  126|  15.3k|    size_t pipes;
  127|       |
  128|  15.3k|    pipes = rl->numwpipes;
  129|       |
  130|  17.3k|    while (pipes > start) {
  ------------------
  |  Branch (130:12): [True: 1.95k, False: 15.3k]
  ------------------
  131|  1.95k|        wb = &rl->wbuf[pipes - 1];
  132|       |
  133|  1.95k|        if (TLS_BUFFER_is_app_buffer(wb))
  ------------------
  |  |  535|  1.95k|#define TLS_BUFFER_is_app_buffer(b) ((b)->app_buffer)
  |  |  ------------------
  |  |  |  Branch (535:37): [True: 0, False: 1.95k]
  |  |  ------------------
  ------------------
  134|      0|            TLS_BUFFER_set_app_buffer(wb, 0);
  ------------------
  |  |  534|      0|#define TLS_BUFFER_set_app_buffer(b, l) ((b)->app_buffer = (l))
  ------------------
  135|  1.95k|        else
  136|  1.95k|            OPENSSL_free(wb->buf);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|       |        wb->buf = NULL;
  138|  1.95k|        pipes--;
  139|  1.95k|    }
  140|  15.3k|}
tls_common.c:tls_int_free:
 1456|  11.7k|{
 1457|  11.7k|    BIO_free(rl->prev);
 1458|  11.7k|    BIO_free(rl->bio);
 1459|  11.7k|    BIO_free(rl->next);
 1460|  11.7k|    ossl_tls_buffer_release(&rl->rbuf);
 1461|       |
 1462|  11.7k|    tls_release_write_buffer(rl);
 1463|       |
 1464|  11.7k|    EVP_CIPHER_CTX_free(rl->enc_ctx);
 1465|  11.7k|    EVP_MAC_CTX_free(rl->mac_ctx);
 1466|  11.7k|    EVP_MD_CTX_free(rl->md_ctx);
 1467|  11.7k|#ifndef OPENSSL_NO_COMP
 1468|  11.7k|    COMP_CTX_free(rl->compctx);
 1469|  11.7k|#endif
 1470|  11.7k|    OPENSSL_free(rl->iv);
  ------------------
  |  |  131|  11.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1471|  11.7k|    OPENSSL_free(rl->nonce);
  ------------------
  |  |  131|  11.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1472|  11.7k|    if (rl->version == SSL3_VERSION)
  ------------------
  |  |   23|  11.7k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (1472:9): [True: 0, False: 11.7k]
  ------------------
 1473|      0|        OPENSSL_cleanse(rl->mac_secret, sizeof(rl->mac_secret));
 1474|       |
 1475|  11.7k|    TLS_RL_RECORD_release(rl->rrec, SSL_MAX_PIPELINES);
  ------------------
  |  |   71|  11.7k|#define SSL_MAX_PIPELINES 32
  ------------------
 1476|       |
 1477|  11.7k|    OPENSSL_free(rl);
  ------------------
  |  |  131|  11.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1478|  11.7k|}
tls_common.c:TLS_RL_RECORD_release:
   33|  11.7k|{
   34|  11.7k|    size_t i;
   35|       |
   36|   387k|    for (i = 0; i < num_recs; i++) {
  ------------------
  |  Branch (36:17): [True: 375k, False: 11.7k]
  ------------------
   37|   375k|        OPENSSL_free(r[i].comp);
  ------------------
  |  |  131|   375k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|       |        r[i].comp = NULL;
   39|   375k|    }
   40|  11.7k|}
tls_common.c:tls_release_write_buffer:
  223|  11.7k|{
  224|  11.7k|    tls_release_write_buffer_int(rl, 0);
  225|       |
  226|  11.7k|    rl->numwpipes = 0;
  227|  11.7k|}
tls_common.c:tls_new_record_layer:
 1410|  11.7k|{
 1411|  11.7k|    int ret;
 1412|       |
 1413|  11.7k|    ret = tls_int_new_record_layer(libctx, propq, vers, role, direction, level,
 1414|  11.7k|        ciph, taglen, md, comp, prev,
 1415|  11.7k|        transport, next, settings,
 1416|  11.7k|        options, fns, cbarg, retrl);
 1417|       |
 1418|  11.7k|    if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  11.7k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1418:9): [True: 0, False: 11.7k]
  ------------------
 1419|      0|        return ret;
 1420|       |
 1421|  11.7k|    switch (vers) {
 1422|  11.7k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  11.7k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (1422:5): [True: 11.7k, False: 0]
  ------------------
 1423|  11.7k|        (*retrl)->funcs = &tls_any_funcs;
 1424|  11.7k|        break;
 1425|      0|    case TLS1_3_VERSION:
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1425:5): [True: 0, False: 11.7k]
  ------------------
 1426|      0|        (*retrl)->funcs = &tls_1_3_funcs;
 1427|      0|        break;
 1428|      0|    case TLS1_2_VERSION:
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (1428:5): [True: 0, False: 11.7k]
  ------------------
 1429|      0|    case TLS1_1_VERSION:
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1429:5): [True: 0, False: 11.7k]
  ------------------
 1430|      0|    case TLS1_VERSION:
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1430:5): [True: 0, False: 11.7k]
  ------------------
 1431|      0|        (*retrl)->funcs = &tls_1_funcs;
 1432|      0|        break;
 1433|      0|    case SSL3_VERSION:
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (1433:5): [True: 0, False: 11.7k]
  ------------------
 1434|      0|        (*retrl)->funcs = &ssl_3_0_funcs;
 1435|      0|        break;
 1436|      0|    default:
  ------------------
  |  Branch (1436:5): [True: 0, False: 11.7k]
  ------------------
 1437|       |        /* Should not happen */
 1438|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1439|      0|        ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1440|      0|        goto err;
 1441|  11.7k|    }
 1442|       |
 1443|  11.7k|    ret = (*retrl)->funcs->set_crypto_state(*retrl, level, key, keylen, iv,
 1444|  11.7k|        ivlen, mackey, mackeylen, ciph,
 1445|  11.7k|        taglen, mactype, md, comp);
 1446|       |
 1447|  11.7k|err:
 1448|  11.7k|    if (ret != OSSL_RECORD_RETURN_SUCCESS) {
  ------------------
  |  |   45|  11.7k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1448:9): [True: 0, False: 11.7k]
  ------------------
 1449|      0|        tls_int_free(*retrl);
 1450|       |        *retrl = NULL;
 1451|      0|    }
 1452|  11.7k|    return ret;
 1453|  11.7k|}

tlsany_meth.c:tls_any_set_crypto_state:
   26|  11.7k|{
   27|  11.7k|    if (level != OSSL_RECORD_PROTECTION_LEVEL_NONE) {
  ------------------
  |  | 2932|  11.7k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (27:9): [True: 0, False: 11.7k]
  ------------------
   28|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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|  11.7k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  11.7k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
   35|  11.7k|}
tlsany_meth.c:tls_any_cipher:
   40|  3.92k|{
   41|  3.92k|    return 1;
   42|  3.92k|}
tlsany_meth.c:tls_any_set_protocol_version:
  128|     94|{
  129|     94|    if (rl->version != TLS_ANY_VERSION && rl->version != vers)
  ------------------
  |  |   40|    188|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (129:9): [True: 0, False: 94]
  |  Branch (129:43): [True: 0, False: 0]
  ------------------
  130|      0|        return 0;
  131|     94|    rl->version = vers;
  132|       |
  133|     94|    return 1;
  134|     94|}
tlsany_meth.c:tls_validate_record_header:
   45|    464|{
   46|    464|    if (rec->rec_version == SSL2_VERSION) {
  ------------------
  |  |   23|    464|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (46:9): [True: 0, False: 464]
  ------------------
   47|       |        /* SSLv2 format ClientHello */
   48|      0|        if (!ossl_assert(rl->version == TLS_ANY_VERSION)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (48:13): [True: 0, False: 0]
  ------------------
   49|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   50|      0|            return 0;
   51|      0|        }
   52|      0|        if (rec->length < MIN_SSL2_RECORD_LEN) {
  ------------------
  |  |   15|      0|#define MIN_SSL2_RECORD_LEN 9
  ------------------
  |  Branch (52:13): [True: 0, False: 0]
  ------------------
   53|      0|            RLAYERfatal(rl, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_TOO_SHORT);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   54|      0|            return 0;
   55|      0|        }
   56|    464|    } else {
   57|    464|        if (rl->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|    464|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (57:13): [True: 464, False: 0]
  ------------------
   58|    464|            if ((rec->rec_version >> 8) != SSL3_VERSION_MAJOR) {
  ------------------
  |  |  216|    464|#define SSL3_VERSION_MAJOR 0x03
  ------------------
  |  Branch (58:17): [True: 147, False: 317]
  ------------------
   59|    147|                if (rl->is_first_record) {
  ------------------
  |  Branch (59:21): [True: 130, False: 17]
  ------------------
   60|    130|                    unsigned char *p;
   61|       |
   62|       |                    /*
   63|       |                     * Go back to start of packet, look at the five bytes that
   64|       |                     * we have.
   65|       |                     */
   66|    130|                    p = rl->packet;
   67|    130|                    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|    260|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 129]
  |  |  ------------------
  ------------------
                                  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|    259|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 128]
  |  |  ------------------
  ------------------
                                  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|    258|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 127]
  |  |  ------------------
  ------------------
                                  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|    257|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 126]
  |  |  ------------------
  ------------------
                                  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|    256|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 125]
  |  |  ------------------
  ------------------
                                  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|    255|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 124]
  |  |  ------------------
  ------------------
                                  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|    254|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 123]
  |  |  ------------------
  ------------------
                                  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|    123|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 122]
  |  |  ------------------
  ------------------
   68|      8|                        RLAYERfatal(rl, SSL_AD_NO_ALERT, SSL_R_HTTP_REQUEST);
  ------------------
  |  |  391|      8|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      8|    (ERR_new(),                                                  \
  |  |  |  |  394|      8|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      8|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      8|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   69|      8|                        return 0;
   70|    122|                    } else if (HAS_PREFIX((char *)p, "CONNE")) {
  ------------------
  |  |   58|    122|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 121]
  |  |  ------------------
  ------------------
   71|      1|                        RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  391|      1|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      1|    (ERR_new(),                                                  \
  |  |  |  |  394|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      1|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   72|      1|                            SSL_R_HTTPS_PROXY_REQUEST);
   73|      1|                        return 0;
   74|      1|                    }
   75|       |
   76|       |                    /* Doesn't look like TLS - don't send an alert */
   77|    130|                    RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  391|    121|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|    121|    (ERR_new(),                                                  \
  |  |  |  |  394|    121|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    121|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|    121|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   78|    121|                        SSL_R_WRONG_VERSION_NUMBER);
   79|    121|                    return 0;
   80|    130|                } else {
   81|     17|                    RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  391|     17|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|     17|    (ERR_new(),                                                  \
  |  |  |  |  394|     17|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     17|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|     17|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   82|     17|                        SSL_R_WRONG_VERSION_NUMBER);
   83|     17|                    return 0;
   84|     17|                }
   85|    147|            }
   86|    464|        } else if (rl->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (86:20): [True: 0, False: 0]
  ------------------
   87|       |            /*
   88|       |             * In this case we know we are going to negotiate TLSv1.3, but we've
   89|       |             * had an HRR, so we haven't actually done so yet. In TLSv1.3 we
   90|       |             * must ignore the legacy record version in plaintext records.
   91|       |             */
   92|      0|        } else if (rec->rec_version != rl->version) {
  ------------------
  |  Branch (92:20): [True: 0, False: 0]
  ------------------
   93|      0|            if ((rl->version & 0xFF00) == (rec->rec_version & 0xFF00)) {
  ------------------
  |  Branch (93:17): [True: 0, False: 0]
  ------------------
   94|      0|                if (rec->type == SSL3_RT_ALERT) {
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (94:21): [True: 0, False: 0]
  ------------------
   95|       |                    /*
   96|       |                     * The record is using an incorrect version number,
   97|       |                     * but what we've got appears to be an alert. We
   98|       |                     * haven't read the body yet to check whether its a
   99|       |                     * fatal or not - but chances are it is. We probably
  100|       |                     * shouldn't send a fatal alert back. We'll just
  101|       |                     * end.
  102|       |                     */
  103|      0|                    RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  104|      0|                        SSL_R_WRONG_VERSION_NUMBER);
  105|      0|                    return 0;
  106|      0|                }
  107|       |                /* Send back error using their minor version number */
  108|      0|                rl->version = (unsigned short)rec->rec_version;
  109|      0|            }
  110|      0|            RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  111|      0|                SSL_R_WRONG_VERSION_NUMBER);
  112|      0|            return 0;
  113|      0|        }
  114|    464|    }
  115|    317|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|    317|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (115:9): [True: 3, False: 314]
  ------------------
  116|       |        /*
  117|       |         * We use SSL_R_DATA_LENGTH_TOO_LONG instead of
  118|       |         * SSL_R_ENCRYPTED_LENGTH_TOO_LONG here because we are the "any" method
  119|       |         * and we know that we are dealing with plaintext data
  120|       |         */
  121|      3|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  391|      3|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      3|    (ERR_new(),                                                  \
  |  |  |  |  394|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      3|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      3|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  122|      3|        return 0;
  123|      3|    }
  124|    314|    return 1;
  125|    317|}
tlsany_meth.c:tls_any_prepare_for_encryption:
  140|  3.63k|{
  141|       |    /* No encryption, so nothing to do */
  142|  3.63k|    return 1;
  143|  3.63k|}

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

ssl3_cleanup_key_block:
  214|  9.78k|{
  215|  9.78k|    OPENSSL_clear_free(s->s3.tmp.key_block, s->s3.tmp.key_block_length);
  ------------------
  |  |  129|  9.78k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  216|       |    s->s3.tmp.key_block = NULL;
  217|  9.78k|    s->s3.tmp.key_block_length = 0;
  218|  9.78k|}
ssl3_init_finished_mac:
  221|  1.95k|{
  222|  1.95k|    BIO *buf = BIO_new(BIO_s_mem());
  223|       |
  224|  1.95k|    if (buf == NULL) {
  ------------------
  |  Branch (224:9): [True: 0, False: 1.95k]
  ------------------
  225|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BIO_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  226|      0|        return 0;
  227|      0|    }
  228|  1.95k|    ssl3_free_digest_list(s);
  229|  1.95k|    s->s3.handshake_buffer = buf;
  230|       |    (void)BIO_set_close(s->s3.handshake_buffer, BIO_CLOSE);
  ------------------
  |  |  634|  1.95k|#define BIO_set_close(b, c) (int)BIO_ctrl(b, BIO_CTRL_SET_CLOSE, (c), NULL)
  |  |  ------------------
  |  |  |  |   98|  1.95k|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  |  |  ------------------
  ------------------
  231|  1.95k|    return 1;
  232|  1.95k|}
ssl3_free_digest_list:
  240|  11.7k|{
  241|  11.7k|    BIO_free(s->s3.handshake_buffer);
  242|  11.7k|    s->s3.handshake_buffer = NULL;
  243|  11.7k|    EVP_MD_CTX_free(s->s3.handshake_dgst);
  244|       |    s->s3.handshake_dgst = NULL;
  245|  11.7k|}
ssl3_finish_mac:
  248|  1.98k|{
  249|  1.98k|    int ret;
  250|       |
  251|  1.98k|    if (s->s3.handshake_dgst == NULL) {
  ------------------
  |  Branch (251:9): [True: 1.98k, False: 0]
  ------------------
  252|       |        /* Note: this writes to a memory BIO so a failure is a fatal error */
  253|  1.98k|        if (len > INT_MAX) {
  ------------------
  |  Branch (253:13): [True: 0, False: 1.98k]
  ------------------
  254|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_OVERFLOW_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  255|      0|            return 0;
  256|      0|        }
  257|  1.98k|        ret = BIO_write(s->s3.handshake_buffer, (void *)buf, (int)len);
  258|  1.98k|        if (ret <= 0 || ret != (int)len) {
  ------------------
  |  Branch (258:13): [True: 0, False: 1.98k]
  |  Branch (258:25): [True: 0, False: 1.98k]
  ------------------
  259|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  260|      0|            return 0;
  261|      0|        }
  262|  1.98k|    } else {
  263|      0|        ret = EVP_DigestUpdate(s->s3.handshake_dgst, buf, len);
  264|      0|        if (!ret) {
  ------------------
  |  Branch (264:13): [True: 0, False: 0]
  ------------------
  265|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  266|      0|            return 0;
  267|      0|        }
  268|      0|    }
  269|  1.98k|    return 1;
  270|  1.98k|}

ssl_sort_cipher_list:
 3730|      1|{
 3731|      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]))
  |  |  ------------------
  ------------------
 3732|      1|        cipher_compare);
 3733|      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]))
  |  |  ------------------
  ------------------
 3734|      1|        cipher_compare);
 3735|      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]))
  |  |  ------------------
  ------------------
 3736|      1|}
ssl3_num_ciphers:
 3777|  4.17k|{
 3778|  4.17k|    return SSL3_NUM_CIPHERS;
  ------------------
  |  |   28|  4.17k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  4.17k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3779|  4.17k|}
ssl3_get_cipher:
 3782|   691k|{
 3783|   691k|    if (u < SSL3_NUM_CIPHERS)
  ------------------
  |  |   28|   691k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|   691k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (3783:9): [True: 691k, False: 0]
  ------------------
 3784|   691k|        return &(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u]);
  ------------------
  |  |   28|   691k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|   691k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3785|      0|    else
 3786|      0|        return NULL;
 3787|   691k|}
ssl3_set_handshake_header:
 3790|  1.95k|{
 3791|       |    /* No header in the event of a CCS */
 3792|  1.95k|    if (htype == SSL3_MT_CHANGE_CIPHER_SPEC)
  ------------------
  |  |  337|  1.95k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (3792:9): [True: 0, False: 1.95k]
  ------------------
 3793|      0|        return 1;
 3794|       |
 3795|       |    /* Set the content type and 3 bytes for the message len */
 3796|  1.95k|    if (!WPACKET_put_bytes_u8(pkt, htype)
  ------------------
  |  |  889|  3.90k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (3796:9): [True: 0, False: 1.95k]
  ------------------
 3797|  1.95k|        || !WPACKET_start_sub_packet_u24(pkt))
  ------------------
  |  |  794|  1.95k|    WPACKET_start_sub_packet_len__((pkt), 3)
  ------------------
  |  Branch (3797:12): [True: 0, False: 1.95k]
  ------------------
 3798|      0|        return 0;
 3799|       |
 3800|  1.95k|    return 1;
 3801|  1.95k|}
ssl3_handshake_write:
 3804|  1.83k|{
 3805|  1.83k|    return ssl3_do_write(s, SSL3_RT_HANDSHAKE);
  ------------------
  |  |  221|  1.83k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 3806|  1.83k|}
ssl3_new:
 3809|  1.95k|{
 3810|  1.95k|#ifndef OPENSSL_NO_SRP
 3811|  1.95k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.95k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.95k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.95k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.95k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.95k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.95k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.95k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3812|       |
 3813|  1.95k|    if (sc == NULL)
  ------------------
  |  Branch (3813:9): [True: 0, False: 1.95k]
  ------------------
 3814|      0|        return 0;
 3815|       |
 3816|  1.95k|    if (!ssl_srp_ctx_init_intern(sc))
  ------------------
  |  Branch (3816:9): [True: 0, False: 1.95k]
  ------------------
 3817|      0|        return 0;
 3818|  1.95k|#endif
 3819|       |
 3820|  1.95k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (3820:9): [True: 0, False: 1.95k]
  ------------------
 3821|      0|        return 0;
 3822|       |
 3823|  1.95k|    return 1;
 3824|  1.95k|}
ssl3_free:
 3827|  1.95k|{
 3828|  1.95k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.95k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.95k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.95k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.95k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.95k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.95k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.95k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3829|  1.95k|    size_t i;
 3830|       |
 3831|  1.95k|    if (sc == NULL)
  ------------------
  |  Branch (3831:9): [True: 0, False: 1.95k]
  ------------------
 3832|      0|        return;
 3833|       |
 3834|  1.95k|    ssl3_cleanup_key_block(sc);
 3835|       |
 3836|  1.95k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3837|  1.95k|    sc->s3.peer_tmp = NULL;
 3838|       |
 3839|  5.51k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3839:17): [True: 3.56k, False: 1.95k]
  ------------------
 3840|  3.56k|        if (sc->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (3840:13): [True: 3.56k, False: 0]
  ------------------
 3841|  3.56k|            if (sc->s3.tmp.pkey == sc->s3.tmp.ks_pkey[i])
  ------------------
  |  Branch (3841:17): [True: 1.81k, False: 1.74k]
  ------------------
 3842|  1.81k|                sc->s3.tmp.pkey = NULL;
 3843|       |
 3844|  3.56k|            EVP_PKEY_free(sc->s3.tmp.ks_pkey[i]);
 3845|  3.56k|            sc->s3.tmp.ks_pkey[i] = NULL;
 3846|  3.56k|        }
 3847|  1.95k|    sc->s3.tmp.num_ks_pkey = 0;
 3848|       |
 3849|  1.95k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3849:9): [True: 0, False: 1.95k]
  ------------------
 3850|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3851|      0|        sc->s3.tmp.pkey = NULL;
 3852|      0|    }
 3853|       |
 3854|  1.95k|    ssl_evp_cipher_free(sc->s3.tmp.new_sym_enc);
 3855|  1.95k|    ssl_evp_md_free(sc->s3.tmp.new_hash);
 3856|       |
 3857|  1.95k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3858|  1.95k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  1.95k|#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))
  ------------------
 3859|  1.95k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3860|  1.95k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  129|  1.95k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3861|  1.95k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3862|  1.95k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3863|  1.95k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3864|  1.95k|    ssl3_free_digest_list(sc);
 3865|  1.95k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3866|  1.95k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3867|  1.95k|    ossl_quic_tls_free(sc->qtls);
 3868|       |
 3869|  1.95k|#ifndef OPENSSL_NO_PSK
 3870|  1.95k|    OPENSSL_free(sc->s3.tmp.psk);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3871|  1.95k|#endif
 3872|       |
 3873|  1.95k|#ifndef OPENSSL_NO_SRP
 3874|  1.95k|    ssl_srp_ctx_free_intern(sc);
 3875|  1.95k|#endif
 3876|  1.95k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3877|  1.95k|}
ssl3_clear:
 3880|  7.82k|{
 3881|  7.82k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.82k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.82k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.82k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.82k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  7.82k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.82k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.82k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.82k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3882|  7.82k|    int flags;
 3883|  7.82k|    size_t i;
 3884|       |
 3885|  7.82k|    if (sc == NULL)
  ------------------
  |  Branch (3885:9): [True: 0, False: 7.82k]
  ------------------
 3886|      0|        return 0;
 3887|       |
 3888|  7.82k|    ssl3_cleanup_key_block(sc);
 3889|  7.82k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  131|  7.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3890|  7.82k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  7.82k|#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))
  ------------------
 3891|  7.82k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  131|  7.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3892|  7.82k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  129|  7.82k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3893|  7.82k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  131|  7.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3894|  7.82k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  131|  7.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3895|  7.82k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  131|  7.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3896|       |
 3897|  7.82k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3898|       |
 3899|  7.82k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3899:17): [True: 0, False: 7.82k]
  ------------------
 3900|      0|        if (sc->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (3900:13): [True: 0, False: 0]
  ------------------
 3901|      0|            if (sc->s3.tmp.pkey == sc->s3.tmp.ks_pkey[i])
  ------------------
  |  Branch (3901:17): [True: 0, False: 0]
  ------------------
 3902|      0|                sc->s3.tmp.pkey = NULL;
 3903|       |
 3904|      0|            EVP_PKEY_free(sc->s3.tmp.ks_pkey[i]);
 3905|      0|            sc->s3.tmp.ks_pkey[i] = NULL;
 3906|      0|        }
 3907|  7.82k|    sc->s3.tmp.num_ks_pkey = 0;
 3908|       |
 3909|  7.82k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3909:9): [True: 0, False: 7.82k]
  ------------------
 3910|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3911|      0|        sc->s3.tmp.pkey = NULL;
 3912|      0|    }
 3913|       |
 3914|  7.82k|    ssl3_free_digest_list(sc);
 3915|       |
 3916|  7.82k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  131|  7.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3917|  7.82k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  131|  7.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3918|       |
 3919|       |    /*
 3920|       |     * NULL/zero-out everything in the s3 struct, but remember if we are doing
 3921|       |     * QUIC.
 3922|       |     */
 3923|  7.82k|    flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   29|  7.82k|#define TLS1_FLAGS_QUIC 0x2000
  ------------------
                  flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   31|  7.82k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  ------------------
 3924|  7.82k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3925|  7.82k|    sc->s3.flags |= flags;
 3926|       |
 3927|  7.82k|    if (!ssl_free_wbio_buffer(sc))
  ------------------
  |  Branch (3927:9): [True: 0, False: 7.82k]
  ------------------
 3928|      0|        return 0;
 3929|       |
 3930|  7.82k|    sc->version = SSL3_VERSION;
  ------------------
  |  |   23|  7.82k|#define SSL3_VERSION 0x0300
  ------------------
 3931|       |
 3932|  7.82k|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 3933|  7.82k|    OPENSSL_free(sc->ext.npn);
  ------------------
  |  |  131|  7.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3934|  7.82k|    sc->ext.npn = NULL;
 3935|  7.82k|    sc->ext.npn_len = 0;
 3936|  7.82k|#endif
 3937|       |
 3938|  7.82k|    return 1;
 3939|  7.82k|}
ssl3_ctrl:
 3956|  1.05k|{
 3957|  1.05k|    int ret = 0;
 3958|  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                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  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)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3959|  1.05k|#ifndef OPENSSL_NO_OCSP
 3960|  1.05k|    unsigned char *p = NULL;
 3961|  1.05k|    OCSP_RESPONSE *resp = NULL;
 3962|  1.05k|#endif
 3963|       |
 3964|  1.05k|    if (sc == NULL)
  ------------------
  |  Branch (3964:9): [True: 0, False: 1.05k]
  ------------------
 3965|      0|        return ret;
 3966|       |
 3967|  1.05k|    switch (cmd) {
 3968|      0|    case SSL_CTRL_GET_CLIENT_CERT_REQUEST:
  ------------------
  |  | 1279|      0|#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9
  ------------------
  |  Branch (3968:5): [True: 0, False: 1.05k]
  ------------------
 3969|      0|        break;
 3970|      0|    case SSL_CTRL_GET_NUM_RENEGOTIATIONS:
  ------------------
  |  | 1280|      0|#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10
  ------------------
  |  Branch (3970:5): [True: 0, False: 1.05k]
  ------------------
 3971|      0|        ret = sc->s3.num_renegotiations;
 3972|      0|        break;
 3973|      0|    case SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS:
  ------------------
  |  | 1281|      0|#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11
  ------------------
  |  Branch (3973:5): [True: 0, False: 1.05k]
  ------------------
 3974|      0|        ret = sc->s3.num_renegotiations;
 3975|      0|        sc->s3.num_renegotiations = 0;
 3976|      0|        break;
 3977|      0|    case SSL_CTRL_GET_TOTAL_RENEGOTIATIONS:
  ------------------
  |  | 1282|      0|#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12
  ------------------
  |  Branch (3977:5): [True: 0, False: 1.05k]
  ------------------
 3978|      0|        ret = sc->s3.total_renegotiations;
 3979|      0|        break;
 3980|      0|    case SSL_CTRL_GET_FLAGS:
  ------------------
  |  | 1283|      0|#define SSL_CTRL_GET_FLAGS 13
  ------------------
  |  Branch (3980:5): [True: 0, False: 1.05k]
  ------------------
 3981|      0|        ret = (int)(sc->s3.flags);
 3982|      0|        break;
 3983|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 3984|      0|    case SSL_CTRL_SET_TMP_DH: {
  ------------------
  |  | 1274|      0|#define SSL_CTRL_SET_TMP_DH 3
  ------------------
  |  Branch (3984:5): [True: 0, False: 1.05k]
  ------------------
 3985|      0|        EVP_PKEY *pkdh = NULL;
 3986|      0|        if (parg == NULL) {
  ------------------
  |  Branch (3986:13): [True: 0, False: 0]
  ------------------
 3987|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3988|      0|            return 0;
 3989|      0|        }
 3990|      0|        pkdh = ssl_dh_to_pkey(parg);
 3991|      0|        if (pkdh == NULL) {
  ------------------
  |  Branch (3991:13): [True: 0, False: 0]
  ------------------
 3992|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_DH_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3993|      0|            return 0;
 3994|      0|        }
 3995|      0|        if (!SSL_set0_tmp_dh_pkey(s, pkdh)) {
  ------------------
  |  Branch (3995:13): [True: 0, False: 0]
  ------------------
 3996|      0|            EVP_PKEY_free(pkdh);
 3997|      0|            return 0;
 3998|      0|        }
 3999|      0|        return 1;
 4000|      0|    } break;
 4001|      0|    case SSL_CTRL_SET_TMP_DH_CB: {
  ------------------
  |  | 1276|      0|#define SSL_CTRL_SET_TMP_DH_CB 6
  ------------------
  |  Branch (4001:5): [True: 0, False: 1.05k]
  ------------------
 4002|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4003|      0|        return ret;
 4004|      0|    }
 4005|      0|#endif
 4006|      0|    case SSL_CTRL_SET_DH_AUTO:
  ------------------
  |  | 1373|      0|#define SSL_CTRL_SET_DH_AUTO 118
  ------------------
  |  Branch (4006:5): [True: 0, False: 1.05k]
  ------------------
 4007|      0|        sc->cert->dh_tmp_auto = larg;
 4008|      0|        return 1;
 4009|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4010|      0|    case SSL_CTRL_SET_TMP_ECDH: {
  ------------------
  |  | 1275|      0|#define SSL_CTRL_SET_TMP_ECDH 4
  ------------------
  |  Branch (4010:5): [True: 0, False: 1.05k]
  ------------------
 4011|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4011:13): [True: 0, False: 0]
  ------------------
 4012|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4013|      0|            return 0;
 4014|      0|        }
 4015|      0|        return ssl_set_tmp_ecdh_groups(&sc->ext.supportedgroups,
 4016|      0|            &sc->ext.supportedgroups_len,
 4017|      0|            &sc->ext.keyshares,
 4018|      0|            &sc->ext.keyshares_len,
 4019|      0|            &sc->ext.tuples,
 4020|      0|            &sc->ext.tuples_len,
 4021|      0|            parg);
 4022|      0|    }
 4023|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
 4024|  1.05k|    case SSL_CTRL_SET_TLSEXT_HOSTNAME:
  ------------------
  |  | 1315|  1.05k|#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55
  ------------------
  |  Branch (4024:5): [True: 1.05k, False: 1]
  ------------------
 4025|       |        /*
 4026|       |         * This API is only used for a client to set what SNI it will request
 4027|       |         * from the server, but we currently allow it to be used on servers
 4028|       |         * as well, which is a programming error.  Currently we just clear
 4029|       |         * the field in SSL_do_handshake() for server SSLs, but when we can
 4030|       |         * make ABI-breaking changes, we may want to make use of this API
 4031|       |         * an error on server SSLs.
 4032|       |         */
 4033|  1.05k|        if (larg == TLSEXT_NAMETYPE_host_name) {
  ------------------
  |  |  171|  1.05k|#define TLSEXT_NAMETYPE_host_name 0
  ------------------
  |  Branch (4033:13): [True: 1.05k, False: 0]
  ------------------
 4034|  1.05k|            size_t len;
 4035|       |
 4036|  1.05k|            OPENSSL_free(sc->ext.hostname);
  ------------------
  |  |  131|  1.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4037|  1.05k|            sc->ext.hostname = NULL;
 4038|       |
 4039|  1.05k|            ret = 1;
 4040|  1.05k|            if (parg == NULL)
  ------------------
  |  Branch (4040:17): [True: 0, False: 1.05k]
  ------------------
 4041|      0|                break;
 4042|  1.05k|            len = strlen((char *)parg);
 4043|  1.05k|            if (len == 0 || len > TLSEXT_MAXLEN_host_name) {
  ------------------
  |  |  248|  1.05k|#define TLSEXT_MAXLEN_host_name 255
  ------------------
  |  Branch (4043:17): [True: 0, False: 1.05k]
  |  Branch (4043:29): [True: 0, False: 1.05k]
  ------------------
 4044|      0|                ERR_raise(ERR_LIB_SSL, SSL_R_SSL3_EXT_INVALID_SERVERNAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4045|      0|                return 0;
 4046|      0|            }
 4047|  1.05k|            if ((sc->ext.hostname = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  135|  1.05k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4047:17): [True: 0, False: 1.05k]
  ------------------
 4048|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4049|      0|                return 0;
 4050|      0|            }
 4051|  1.05k|        } else {
 4052|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4053|      0|            return 0;
 4054|      0|        }
 4055|  1.05k|        break;
 4056|  1.05k|    case SSL_CTRL_SET_TLSEXT_DEBUG_ARG:
  ------------------
  |  | 1317|      0|#define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57
  ------------------
  |  Branch (4056:5): [True: 0, False: 1.05k]
  ------------------
 4057|      0|        sc->ext.debug_arg = parg;
 4058|      0|        ret = 1;
 4059|      0|        break;
 4060|       |
 4061|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1381|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127
  ------------------
  |  Branch (4061:5): [True: 0, False: 1.05k]
  ------------------
 4062|      0|        ret = sc->ext.status_type;
 4063|      0|        break;
 4064|       |
 4065|      1|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1325|      1|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  ------------------
  |  Branch (4065:5): [True: 1, False: 1.05k]
  ------------------
 4066|      1|        sc->ext.status_type = larg;
 4067|      1|        ret = 1;
 4068|      1|        break;
 4069|       |
 4070|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS:
  ------------------
  |  | 1326|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66
  ------------------
  |  Branch (4070:5): [True: 0, False: 1.05k]
  ------------------
 4071|      0|        *(STACK_OF(X509_EXTENSION) **)parg = sc->ext.ocsp.exts;
 4072|      0|        ret = 1;
 4073|      0|        break;
 4074|       |
 4075|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS:
  ------------------
  |  | 1327|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67
  ------------------
  |  Branch (4075:5): [True: 0, False: 1.05k]
  ------------------
 4076|      0|        sc->ext.ocsp.exts = parg;
 4077|      0|        ret = 1;
 4078|      0|        break;
 4079|       |
 4080|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS:
  ------------------
  |  | 1328|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68
  ------------------
  |  Branch (4080:5): [True: 0, False: 1.05k]
  ------------------
 4081|      0|        *(STACK_OF(OCSP_RESPID) **)parg = sc->ext.ocsp.ids;
 4082|      0|        ret = 1;
 4083|      0|        break;
 4084|       |
 4085|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS:
  ------------------
  |  | 1329|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69
  ------------------
  |  Branch (4085:5): [True: 0, False: 1.05k]
  ------------------
 4086|      0|        sc->ext.ocsp.ids = parg;
 4087|      0|        ret = 1;
 4088|      0|        break;
 4089|       |
 4090|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP:
  ------------------
  |  | 1330|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70
  ------------------
  |  Branch (4090:5): [True: 0, False: 1.05k]
  ------------------
 4091|      0|        *(unsigned char **)parg = NULL;
 4092|      0|        ret = -1;
 4093|       |
 4094|      0|#ifndef OPENSSL_NO_OCSP
 4095|      0|        resp = sk_OCSP_RESPONSE_value(sc->ext.ocsp.resp_ex, 0);
 4096|       |
 4097|      0|        if (resp != NULL) {
  ------------------
  |  Branch (4097:13): [True: 0, False: 0]
  ------------------
 4098|      0|            int resp_len = i2d_OCSP_RESPONSE(resp, &p);
 4099|       |
 4100|      0|            if (resp_len > 0) {
  ------------------
  |  Branch (4100:17): [True: 0, False: 0]
  ------------------
 4101|      0|                OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4102|      0|                *(unsigned char **)parg = sc->ext.ocsp.resp = p;
 4103|      0|                sc->ext.ocsp.resp_len = (size_t)resp_len;
 4104|      0|                ret = resp_len;
 4105|      0|            }
 4106|      0|        }
 4107|      0|#endif
 4108|      0|        break;
 4109|       |
 4110|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP:
  ------------------
  |  | 1331|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71
  ------------------
  |  Branch (4110:5): [True: 0, False: 1.05k]
  ------------------
 4111|      0|        ret = 1;
 4112|      0|#ifndef OPENSSL_NO_OCSP
 4113|       |        /*
 4114|       |         * In case of success keep the single value so we do not need to
 4115|       |         * free it immediately.
 4116|       |         * However in the handshake code we only use the extended values.
 4117|       |         */
 4118|      0|        OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4119|      0|        sc->ext.ocsp.resp = NULL;
 4120|      0|        sc->ext.ocsp.resp_len = 0;
 4121|       |
 4122|      0|        sk_OCSP_RESPONSE_pop_free(sc->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 4123|      0|        sc->ext.ocsp.resp_ex = NULL;
 4124|       |
 4125|      0|        if (parg != NULL) {
  ------------------
  |  Branch (4125:13): [True: 0, False: 0]
  ------------------
 4126|      0|            sc->ext.ocsp.resp_ex = sk_OCSP_RESPONSE_new_reserve(NULL, 1);
 4127|      0|            if (sc->ext.ocsp.resp_ex == NULL)
  ------------------
  |  Branch (4127:17): [True: 0, False: 0]
  ------------------
 4128|      0|                return 0;
 4129|       |
 4130|      0|            p = parg;
 4131|      0|            resp = d2i_OCSP_RESPONSE(NULL, (const unsigned char **)&p, larg);
 4132|      0|            if (resp != NULL)
  ------------------
  |  Branch (4132:17): [True: 0, False: 0]
  ------------------
 4133|      0|                sk_OCSP_RESPONSE_push(sc->ext.ocsp.resp_ex, resp);
 4134|       |
 4135|      0|            sc->ext.ocsp.resp = parg;
 4136|      0|            sc->ext.ocsp.resp_len = larg;
 4137|      0|        }
 4138|      0|#endif
 4139|      0|        break;
 4140|       |
 4141|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP_EX:
  ------------------
  |  | 1396|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP_EX 142
  ------------------
  |  Branch (4141:5): [True: 0, False: 1.05k]
  ------------------
 4142|      0|#ifndef OPENSSL_NO_OCSP
 4143|      0|        *(STACK_OF(OCSP_RESPONSE) **)parg = sc->ext.ocsp.resp_ex;
 4144|      0|        ret = sk_OCSP_RESPONSE_num(sc->ext.ocsp.resp_ex);
 4145|       |#else
 4146|       |        *(unsigned char **)parg = NULL;
 4147|       |        ret = -1;
 4148|       |#endif
 4149|      0|        break;
 4150|       |
 4151|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP_EX:
  ------------------
  |  | 1397|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP_EX 143
  ------------------
  |  Branch (4151:5): [True: 0, False: 1.05k]
  ------------------
 4152|      0|#ifndef OPENSSL_NO_OCSP
 4153|       |        /*
 4154|       |         * cleanup single values, which might be set somewhere else
 4155|       |         * we only use the extended values
 4156|       |         */
 4157|      0|        if (sc->ext.ocsp.resp != NULL) {
  ------------------
  |  Branch (4157:13): [True: 0, False: 0]
  ------------------
 4158|      0|            OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4159|      0|            sc->ext.ocsp.resp = NULL;
 4160|      0|            sc->ext.ocsp.resp_len = 0;
 4161|      0|        }
 4162|       |
 4163|      0|        sk_OCSP_RESPONSE_pop_free(sc->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 4164|      0|        sc->ext.ocsp.resp_ex = (STACK_OF(OCSP_RESPONSE) *)parg;
 4165|      0|#endif
 4166|      0|        ret = 1;
 4167|      0|        break;
 4168|       |
 4169|      0|    case SSL_CTRL_CHAIN:
  ------------------
  |  | 1349|      0|#define SSL_CTRL_CHAIN 88
  ------------------
  |  Branch (4169:5): [True: 0, False: 1.05k]
  ------------------
 4170|      0|        if (larg)
  ------------------
  |  Branch (4170:13): [True: 0, False: 0]
  ------------------
 4171|      0|            return ssl_cert_set1_chain(sc, NULL, (STACK_OF(X509) *)parg);
 4172|      0|        else
 4173|      0|            return ssl_cert_set0_chain(sc, NULL, (STACK_OF(X509) *)parg);
 4174|       |
 4175|      0|    case SSL_CTRL_CHAIN_CERT:
  ------------------
  |  | 1350|      0|#define SSL_CTRL_CHAIN_CERT 89
  ------------------
  |  Branch (4175:5): [True: 0, False: 1.05k]
  ------------------
 4176|      0|        if (larg)
  ------------------
  |  Branch (4176:13): [True: 0, False: 0]
  ------------------
 4177|      0|            return ssl_cert_add1_chain_cert(sc, NULL, (X509 *)parg);
 4178|      0|        else
 4179|      0|            return ssl_cert_add0_chain_cert(sc, NULL, (X509 *)parg);
 4180|       |
 4181|      0|    case SSL_CTRL_GET_CHAIN_CERTS:
  ------------------
  |  | 1370|      0|#define SSL_CTRL_GET_CHAIN_CERTS 115
  ------------------
  |  Branch (4181:5): [True: 0, False: 1.05k]
  ------------------
 4182|      0|        *(STACK_OF(X509) **)parg = sc->cert->key->chain;
 4183|      0|        ret = 1;
 4184|      0|        break;
 4185|       |
 4186|      0|    case SSL_CTRL_SELECT_CURRENT_CERT:
  ------------------
  |  | 1371|      0|#define SSL_CTRL_SELECT_CURRENT_CERT 116
  ------------------
  |  Branch (4186:5): [True: 0, False: 1.05k]
  ------------------
 4187|      0|        return ssl_cert_select_current(sc->cert, (X509 *)parg);
 4188|       |
 4189|      0|    case SSL_CTRL_SET_CURRENT_CERT:
  ------------------
  |  | 1372|      0|#define SSL_CTRL_SET_CURRENT_CERT 117
  ------------------
  |  Branch (4189:5): [True: 0, False: 1.05k]
  ------------------
 4190|      0|        if (larg == SSL_CERT_SET_SERVER) {
  ------------------
  |  | 1400|      0|#define SSL_CERT_SET_SERVER 3
  ------------------
  |  Branch (4190:13): [True: 0, False: 0]
  ------------------
 4191|      0|            const SSL_CIPHER *cipher;
 4192|      0|            if (!sc->server)
  ------------------
  |  Branch (4192:17): [True: 0, False: 0]
  ------------------
 4193|      0|                return 0;
 4194|      0|            cipher = sc->s3.tmp.new_cipher;
 4195|      0|            if (cipher == NULL)
  ------------------
  |  Branch (4195:17): [True: 0, False: 0]
  ------------------
 4196|      0|                return 0;
 4197|       |            /*
 4198|       |             * No certificate for unauthenticated ciphersuites or using SRP
 4199|       |             * authentication
 4200|       |             */
 4201|      0|            if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  ------------------
  |  |  112|      0|#define SSL_aNULL 0x00000004U
  ------------------
                          if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  ------------------
  |  |  120|      0|#define SSL_aSRP 0x00000040U
  ------------------
  |  Branch (4201:17): [True: 0, False: 0]
  ------------------
 4202|      0|                return 2;
 4203|      0|            if (sc->s3.tmp.cert == NULL)
  ------------------
  |  Branch (4203:17): [True: 0, False: 0]
  ------------------
 4204|      0|                return 0;
 4205|      0|            sc->cert->key = sc->s3.tmp.cert;
 4206|      0|            return 1;
 4207|      0|        }
 4208|      0|        return ssl_cert_set_current(sc->cert, larg);
 4209|       |
 4210|      0|    case SSL_CTRL_GET_GROUPS: {
  ------------------
  |  | 1351|      0|#define SSL_CTRL_GET_GROUPS 90
  ------------------
  |  Branch (4210:5): [True: 0, False: 1.05k]
  ------------------
 4211|      0|        uint16_t *clist;
 4212|      0|        size_t clistlen;
 4213|       |
 4214|      0|        if (!sc->session)
  ------------------
  |  Branch (4214:13): [True: 0, False: 0]
  ------------------
 4215|      0|            return 0;
 4216|      0|        clist = sc->ext.peer_supportedgroups;
 4217|      0|        clistlen = sc->ext.peer_supportedgroups_len;
 4218|      0|        if (parg) {
  ------------------
  |  Branch (4218:13): [True: 0, False: 0]
  ------------------
 4219|      0|            size_t i;
 4220|      0|            int *cptr = parg;
 4221|       |
 4222|      0|            for (i = 0; i < clistlen; i++) {
  ------------------
  |  Branch (4222:25): [True: 0, False: 0]
  ------------------
 4223|      0|                const TLS_GROUP_INFO *cinf
 4224|      0|                    = tls1_group_id_lookup(s->ctx, clist[i]);
 4225|       |
 4226|      0|                if (cinf != NULL)
  ------------------
  |  Branch (4226:21): [True: 0, False: 0]
  ------------------
 4227|      0|                    cptr[i] = tls1_group_id2nid(cinf->group_id, 1);
 4228|      0|                else
 4229|      0|                    cptr[i] = TLSEXT_nid_unknown | clist[i];
  ------------------
  |  |  219|      0|#define TLSEXT_nid_unknown 0x1000000
  ------------------
 4230|      0|            }
 4231|      0|        }
 4232|      0|        return (int)clistlen;
 4233|      0|    }
 4234|       |
 4235|      0|    case SSL_CTRL_SET_GROUPS:
  ------------------
  |  | 1352|      0|#define SSL_CTRL_SET_GROUPS 91
  ------------------
  |  Branch (4235:5): [True: 0, False: 1.05k]
  ------------------
 4236|      0|        return tls1_set_groups(&sc->ext.supportedgroups,
 4237|      0|            &sc->ext.supportedgroups_len,
 4238|      0|            &sc->ext.keyshares,
 4239|      0|            &sc->ext.keyshares_len,
 4240|      0|            &sc->ext.tuples,
 4241|      0|            &sc->ext.tuples_len,
 4242|      0|            parg, larg);
 4243|       |
 4244|      0|    case SSL_CTRL_SET_GROUPS_LIST:
  ------------------
  |  | 1353|      0|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (4244:5): [True: 0, False: 1.05k]
  ------------------
 4245|      0|        return tls1_set_groups_list(s->ctx,
 4246|      0|            &sc->ext.supportedgroups,
 4247|      0|            &sc->ext.supportedgroups_len,
 4248|      0|            &sc->ext.keyshares,
 4249|      0|            &sc->ext.keyshares_len,
 4250|      0|            &sc->ext.tuples,
 4251|      0|            &sc->ext.tuples_len,
 4252|      0|            parg);
 4253|       |
 4254|      0|    case SSL_CTRL_GET_SHARED_GROUP: {
  ------------------
  |  | 1354|      0|#define SSL_CTRL_GET_SHARED_GROUP 93
  ------------------
  |  Branch (4254:5): [True: 0, False: 1.05k]
  ------------------
 4255|      0|        uint16_t id = tls1_shared_group(sc, larg);
 4256|       |
 4257|      0|        if (larg != -1)
  ------------------
  |  Branch (4257:13): [True: 0, False: 0]
  ------------------
 4258|      0|            return tls1_group_id2nid(id, 1);
 4259|      0|        return id;
 4260|      0|    }
 4261|      0|    case SSL_CTRL_GET_NEGOTIATED_GROUP: {
  ------------------
  |  | 1388|      0|#define SSL_CTRL_GET_NEGOTIATED_GROUP 134
  ------------------
  |  Branch (4261:5): [True: 0, False: 1.05k]
  ------------------
 4262|      0|        unsigned int id;
 4263|       |
 4264|      0|        if (SSL_CONNECTION_IS_TLS13(sc) && sc->s3.did_kex)
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      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 (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4264:44): [True: 0, False: 0]
  ------------------
 4265|      0|            id = sc->s3.group_id;
 4266|      0|        else
 4267|      0|            id = (sc->session != NULL) ? sc->session->kex_group : NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (4267:18): [True: 0, False: 0]
  ------------------
 4268|      0|        ret = tls1_group_id2nid(id, 1);
 4269|      0|        break;
 4270|      0|    }
 4271|      0|    case SSL_CTRL_SET_SIGALGS:
  ------------------
  |  | 1355|      0|#define SSL_CTRL_SET_SIGALGS 97
  ------------------
  |  Branch (4271:5): [True: 0, False: 1.05k]
  ------------------
 4272|      0|        return tls1_set_sigalgs(sc->cert, parg, larg, 0);
 4273|       |
 4274|      0|    case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1356|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (4274:5): [True: 0, False: 1.05k]
  ------------------
 4275|      0|        return tls1_set_sigalgs_list(s->ctx, sc->cert, parg, 0);
 4276|       |
 4277|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS:
  ------------------
  |  | 1359|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS 101
  ------------------
  |  Branch (4277:5): [True: 0, False: 1.05k]
  ------------------
 4278|      0|        return tls1_set_sigalgs(sc->cert, parg, larg, 1);
 4279|       |
 4280|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1360|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (4280:5): [True: 0, False: 1.05k]
  ------------------
 4281|      0|        return tls1_set_sigalgs_list(s->ctx, sc->cert, parg, 1);
 4282|       |
 4283|      0|    case SSL_CTRL_GET_CLIENT_CERT_TYPES: {
  ------------------
  |  | 1361|      0|#define SSL_CTRL_GET_CLIENT_CERT_TYPES 103
  ------------------
  |  Branch (4283:5): [True: 0, False: 1.05k]
  ------------------
 4284|      0|        const unsigned char **pctype = parg;
 4285|      0|        if (sc->server || !sc->s3.tmp.cert_req)
  ------------------
  |  Branch (4285:13): [True: 0, False: 0]
  |  Branch (4285:27): [True: 0, False: 0]
  ------------------
 4286|      0|            return 0;
 4287|      0|        if (pctype)
  ------------------
  |  Branch (4287:13): [True: 0, False: 0]
  ------------------
 4288|      0|            *pctype = sc->s3.tmp.ctype;
 4289|      0|        return (long)sc->s3.tmp.ctype_len;
 4290|      0|    }
 4291|       |
 4292|      0|    case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  ------------------
  |  | 1362|      0|#define SSL_CTRL_SET_CLIENT_CERT_TYPES 104
  ------------------
  |  Branch (4292:5): [True: 0, False: 1.05k]
  ------------------
 4293|      0|        if (!sc->server)
  ------------------
  |  Branch (4293:13): [True: 0, False: 0]
  ------------------
 4294|      0|            return 0;
 4295|      0|        return ssl3_set_req_cert_type(sc->cert, parg, larg);
 4296|       |
 4297|      0|    case SSL_CTRL_BUILD_CERT_CHAIN:
  ------------------
  |  | 1363|      0|#define SSL_CTRL_BUILD_CERT_CHAIN 105
  ------------------
  |  Branch (4297:5): [True: 0, False: 1.05k]
  ------------------
 4298|      0|        return ssl_build_cert_chain(sc, NULL, larg);
 4299|       |
 4300|      0|    case SSL_CTRL_SET_VERIFY_CERT_STORE:
  ------------------
  |  | 1364|      0|#define SSL_CTRL_SET_VERIFY_CERT_STORE 106
  ------------------
  |  Branch (4300:5): [True: 0, False: 1.05k]
  ------------------
 4301|      0|        return ssl_cert_set_cert_store(sc->cert, parg, 0, larg);
 4302|       |
 4303|      0|    case SSL_CTRL_SET_CHAIN_CERT_STORE:
  ------------------
  |  | 1365|      0|#define SSL_CTRL_SET_CHAIN_CERT_STORE 107
  ------------------
  |  Branch (4303:5): [True: 0, False: 1.05k]
  ------------------
 4304|      0|        return ssl_cert_set_cert_store(sc->cert, parg, 1, larg);
 4305|       |
 4306|      0|    case SSL_CTRL_GET_VERIFY_CERT_STORE:
  ------------------
  |  | 1391|      0|#define SSL_CTRL_GET_VERIFY_CERT_STORE 137
  ------------------
  |  Branch (4306:5): [True: 0, False: 1.05k]
  ------------------
 4307|      0|        return ssl_cert_get_cert_store(sc->cert, parg, 0);
 4308|       |
 4309|      0|    case SSL_CTRL_GET_CHAIN_CERT_STORE:
  ------------------
  |  | 1392|      0|#define SSL_CTRL_GET_CHAIN_CERT_STORE 138
  ------------------
  |  Branch (4309:5): [True: 0, False: 1.05k]
  ------------------
 4310|      0|        return ssl_cert_get_cert_store(sc->cert, parg, 1);
 4311|       |
 4312|      0|    case SSL_CTRL_GET_PEER_SIGNATURE_NAME:
  ------------------
  |  | 1395|      0|#define SSL_CTRL_GET_PEER_SIGNATURE_NAME 141
  ------------------
  |  Branch (4312:5): [True: 0, False: 1.05k]
  ------------------
 4313|      0|        if (parg == NULL || sc->s3.tmp.peer_sigalg == NULL)
  ------------------
  |  Branch (4313:13): [True: 0, False: 0]
  |  Branch (4313:29): [True: 0, False: 0]
  ------------------
 4314|      0|            return 0;
 4315|      0|        *(const char **)parg = sc->s3.tmp.peer_sigalg->name;
 4316|      0|        return 1;
 4317|       |
 4318|      0|    case SSL_CTRL_GET_PEER_SIGNATURE_NID:
  ------------------
  |  | 1366|      0|#define SSL_CTRL_GET_PEER_SIGNATURE_NID 108
  ------------------
  |  Branch (4318:5): [True: 0, False: 1.05k]
  ------------------
 4319|      0|        if (sc->s3.tmp.peer_sigalg == NULL)
  ------------------
  |  Branch (4319:13): [True: 0, False: 0]
  ------------------
 4320|      0|            return 0;
 4321|      0|        *(int *)parg = sc->s3.tmp.peer_sigalg->hash;
 4322|      0|        return 1;
 4323|       |
 4324|      0|    case SSL_CTRL_GET_SIGNATURE_NAME:
  ------------------
  |  | 1394|      0|#define SSL_CTRL_GET_SIGNATURE_NAME 140
  ------------------
  |  Branch (4324:5): [True: 0, False: 1.05k]
  ------------------
 4325|      0|        if (parg == NULL || sc->s3.tmp.sigalg == NULL)
  ------------------
  |  Branch (4325:13): [True: 0, False: 0]
  |  Branch (4325:29): [True: 0, False: 0]
  ------------------
 4326|      0|            return 0;
 4327|      0|        *(const char **)parg = sc->s3.tmp.sigalg->name;
 4328|      0|        return 1;
 4329|       |
 4330|      0|    case SSL_CTRL_GET_SIGNATURE_NID:
  ------------------
  |  | 1386|      0|#define SSL_CTRL_GET_SIGNATURE_NID 132
  ------------------
  |  Branch (4330:5): [True: 0, False: 1.05k]
  ------------------
 4331|      0|        if (sc->s3.tmp.sigalg == NULL)
  ------------------
  |  Branch (4331:13): [True: 0, False: 0]
  ------------------
 4332|      0|            return 0;
 4333|      0|        *(int *)parg = sc->s3.tmp.sigalg->hash;
 4334|      0|        return 1;
 4335|       |
 4336|      0|    case SSL_CTRL_GET_PEER_TMP_KEY:
  ------------------
  |  | 1367|      0|#define SSL_CTRL_GET_PEER_TMP_KEY 109
  ------------------
  |  Branch (4336:5): [True: 0, False: 1.05k]
  ------------------
 4337|      0|        if (sc->session == NULL || sc->s3.peer_tmp == NULL) {
  ------------------
  |  Branch (4337:13): [True: 0, False: 0]
  |  Branch (4337:36): [True: 0, False: 0]
  ------------------
 4338|      0|            return 0;
 4339|      0|        } else {
 4340|      0|            if (!EVP_PKEY_up_ref(sc->s3.peer_tmp))
  ------------------
  |  Branch (4340:17): [True: 0, False: 0]
  ------------------
 4341|      0|                return 0;
 4342|       |
 4343|      0|            *(EVP_PKEY **)parg = sc->s3.peer_tmp;
 4344|      0|            return 1;
 4345|      0|        }
 4346|       |
 4347|      0|    case SSL_CTRL_GET_TMP_KEY:
  ------------------
  |  | 1387|      0|#define SSL_CTRL_GET_TMP_KEY 133
  ------------------
  |  Branch (4347:5): [True: 0, False: 1.05k]
  ------------------
 4348|      0|        if (sc->session == NULL || sc->s3.tmp.pkey == NULL) {
  ------------------
  |  Branch (4348:13): [True: 0, False: 0]
  |  Branch (4348:36): [True: 0, False: 0]
  ------------------
 4349|      0|            return 0;
 4350|      0|        } else {
 4351|      0|            if (!EVP_PKEY_up_ref(sc->s3.tmp.pkey))
  ------------------
  |  Branch (4351:17): [True: 0, False: 0]
  ------------------
 4352|      0|                return 0;
 4353|       |
 4354|      0|            *(EVP_PKEY **)parg = sc->s3.tmp.pkey;
 4355|      0|            return 1;
 4356|      0|        }
 4357|       |
 4358|      0|    case SSL_CTRL_GET_EC_POINT_FORMATS: {
  ------------------
  |  | 1369|      0|#define SSL_CTRL_GET_EC_POINT_FORMATS 111
  ------------------
  |  Branch (4358:5): [True: 0, False: 1.05k]
  ------------------
 4359|      0|        const unsigned char **pformat = parg;
 4360|       |
 4361|      0|        if (sc->ext.peer_ecpointformats == NULL)
  ------------------
  |  Branch (4361:13): [True: 0, False: 0]
  ------------------
 4362|      0|            return 0;
 4363|      0|        *pformat = sc->ext.peer_ecpointformats;
 4364|      0|        return (int)sc->ext.peer_ecpointformats_len;
 4365|      0|    }
 4366|       |
 4367|      0|    case SSL_CTRL_GET_IANA_GROUPS: {
  ------------------
  |  | 1389|      0|#define SSL_CTRL_GET_IANA_GROUPS 135
  ------------------
  |  Branch (4367:5): [True: 0, False: 1.05k]
  ------------------
 4368|      0|        if (parg != NULL) {
  ------------------
  |  Branch (4368:13): [True: 0, False: 0]
  ------------------
 4369|      0|            *(uint16_t **)parg = (uint16_t *)sc->ext.peer_supportedgroups;
 4370|      0|        }
 4371|      0|        return (int)sc->ext.peer_supportedgroups_len;
 4372|      0|    }
 4373|       |
 4374|      0|    case SSL_CTRL_SET_MSG_CALLBACK_ARG:
  ------------------
  |  | 1286|      0|#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
  ------------------
  |  Branch (4374:5): [True: 0, False: 1.05k]
  ------------------
 4375|      0|        sc->msg_callback_arg = parg;
 4376|      0|        return 1;
 4377|       |
 4378|      0|    default:
  ------------------
  |  Branch (4378:5): [True: 0, False: 1.05k]
  ------------------
 4379|      0|        break;
 4380|  1.05k|    }
 4381|  1.05k|    return ret;
 4382|  1.05k|}
ssl3_ctx_ctrl:
 4420|  3.35k|{
 4421|  3.35k|    switch (cmd) {
 4422|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4423|      0|    case SSL_CTRL_SET_TMP_DH: {
  ------------------
  |  | 1274|      0|#define SSL_CTRL_SET_TMP_DH 3
  ------------------
  |  Branch (4423:5): [True: 0, False: 3.35k]
  ------------------
 4424|      0|        EVP_PKEY *pkdh = NULL;
 4425|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4425:13): [True: 0, False: 0]
  ------------------
 4426|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4427|      0|            return 0;
 4428|      0|        }
 4429|      0|        pkdh = ssl_dh_to_pkey(parg);
 4430|      0|        if (pkdh == NULL) {
  ------------------
  |  Branch (4430:13): [True: 0, False: 0]
  ------------------
 4431|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_DH_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4432|      0|            return 0;
 4433|      0|        }
 4434|      0|        if (!SSL_CTX_set0_tmp_dh_pkey(ctx, pkdh)) {
  ------------------
  |  Branch (4434:13): [True: 0, False: 0]
  ------------------
 4435|      0|            EVP_PKEY_free(pkdh);
 4436|      0|            return 0;
 4437|      0|        }
 4438|      0|        return 1;
 4439|      0|    }
 4440|      0|    case SSL_CTRL_SET_TMP_DH_CB: {
  ------------------
  |  | 1276|      0|#define SSL_CTRL_SET_TMP_DH_CB 6
  ------------------
  |  Branch (4440:5): [True: 0, False: 3.35k]
  ------------------
 4441|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4442|      0|        return 0;
 4443|      0|    }
 4444|      0|#endif
 4445|      0|    case SSL_CTRL_SET_DH_AUTO:
  ------------------
  |  | 1373|      0|#define SSL_CTRL_SET_DH_AUTO 118
  ------------------
  |  Branch (4445:5): [True: 0, False: 3.35k]
  ------------------
 4446|      0|        ctx->cert->dh_tmp_auto = larg;
 4447|      0|        return 1;
 4448|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4449|      0|    case SSL_CTRL_SET_TMP_ECDH: {
  ------------------
  |  | 1275|      0|#define SSL_CTRL_SET_TMP_ECDH 4
  ------------------
  |  Branch (4449:5): [True: 0, False: 3.35k]
  ------------------
 4450|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4450:13): [True: 0, False: 0]
  ------------------
 4451|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4452|      0|            return 0;
 4453|      0|        }
 4454|      0|        return ssl_set_tmp_ecdh_groups(&ctx->ext.supportedgroups,
 4455|      0|            &ctx->ext.supportedgroups_len,
 4456|      0|            &ctx->ext.keyshares,
 4457|      0|            &ctx->ext.keyshares_len,
 4458|      0|            &ctx->ext.tuples,
 4459|      0|            &ctx->ext.tuples_len,
 4460|      0|            parg);
 4461|      0|    }
 4462|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
 4463|      0|    case SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG:
  ------------------
  |  | 1314|      0|#define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54
  ------------------
  |  Branch (4463:5): [True: 0, False: 3.35k]
  ------------------
 4464|      0|        ctx->ext.servername_arg = parg;
 4465|      0|        break;
 4466|      0|    case SSL_CTRL_SET_TLSEXT_TICKET_KEYS:
  ------------------
  |  | 1319|      0|#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
  ------------------
  |  Branch (4466:5): [True: 0, False: 3.35k]
  ------------------
 4467|      0|    case SSL_CTRL_GET_TLSEXT_TICKET_KEYS: {
  ------------------
  |  | 1318|      0|#define SSL_CTRL_GET_TLSEXT_TICKET_KEYS 58
  ------------------
  |  Branch (4467:5): [True: 0, False: 3.35k]
  ------------------
 4468|      0|        unsigned char *keys = parg;
 4469|      0|        long tick_keylen = (sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key) + sizeof(ctx->ext.secure->tick_aes_key));
 4470|      0|        if (keys == NULL)
  ------------------
  |  Branch (4470:13): [True: 0, False: 0]
  ------------------
 4471|      0|            return tick_keylen;
 4472|      0|        if (larg != tick_keylen) {
  ------------------
  |  Branch (4472:13): [True: 0, False: 0]
  ------------------
 4473|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_TICKET_KEYS_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4474|      0|            return 0;
 4475|      0|        }
 4476|      0|        if (cmd == SSL_CTRL_SET_TLSEXT_TICKET_KEYS) {
  ------------------
  |  | 1319|      0|#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
  ------------------
  |  Branch (4476:13): [True: 0, False: 0]
  ------------------
 4477|      0|            memcpy(ctx->ext.tick_key_name, keys,
 4478|      0|                sizeof(ctx->ext.tick_key_name));
 4479|      0|            memcpy(ctx->ext.secure->tick_hmac_key,
 4480|      0|                keys + sizeof(ctx->ext.tick_key_name),
 4481|      0|                sizeof(ctx->ext.secure->tick_hmac_key));
 4482|      0|            memcpy(ctx->ext.secure->tick_aes_key,
 4483|      0|                keys + sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key),
 4484|      0|                sizeof(ctx->ext.secure->tick_aes_key));
 4485|      0|        } else {
 4486|      0|            memcpy(keys, ctx->ext.tick_key_name,
 4487|      0|                sizeof(ctx->ext.tick_key_name));
 4488|      0|            memcpy(keys + sizeof(ctx->ext.tick_key_name),
 4489|      0|                ctx->ext.secure->tick_hmac_key,
 4490|      0|                sizeof(ctx->ext.secure->tick_hmac_key));
 4491|      0|            memcpy(keys + sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key),
 4492|      0|                ctx->ext.secure->tick_aes_key,
 4493|      0|                sizeof(ctx->ext.secure->tick_aes_key));
 4494|      0|        }
 4495|      0|        return 1;
 4496|      0|    }
 4497|       |
 4498|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1381|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127
  ------------------
  |  Branch (4498:5): [True: 0, False: 3.35k]
  ------------------
 4499|      0|        return ctx->ext.status_type;
 4500|       |
 4501|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1325|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  ------------------
  |  Branch (4501:5): [True: 0, False: 3.35k]
  ------------------
 4502|      0|        ctx->ext.status_type = larg;
 4503|      0|        break;
 4504|       |
 4505|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG:
  ------------------
  |  | 1324|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64
  ------------------
  |  Branch (4505:5): [True: 0, False: 3.35k]
  ------------------
 4506|      0|        ctx->ext.status_arg = parg;
 4507|      0|        return 1;
 4508|       |
 4509|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG:
  ------------------
  |  | 1383|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG 129
  ------------------
  |  Branch (4509:5): [True: 0, False: 3.35k]
  ------------------
 4510|      0|        *(void **)parg = ctx->ext.status_arg;
 4511|      0|        break;
 4512|       |
 4513|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB:
  ------------------
  |  | 1382|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB 128
  ------------------
  |  Branch (4513:5): [True: 0, False: 3.35k]
  ------------------
 4514|      0|        *(int (**)(SSL *, void *))parg = ctx->ext.status_cb;
 4515|      0|        break;
 4516|       |
 4517|      0|#ifndef OPENSSL_NO_SRP
 4518|      6|    case SSL_CTRL_SET_TLS_EXT_SRP_USERNAME:
  ------------------
  |  | 1339|      6|#define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME 79
  ------------------
  |  Branch (4518:5): [True: 6, False: 3.35k]
  ------------------
 4519|      6|        ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  ------------------
  |  |   91|      6|#define SSL_kSRP 0x00000020U
  ------------------
 4520|      6|        OPENSSL_free(ctx->srp_ctx.login);
  ------------------
  |  |  131|      6|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4521|      6|        ctx->srp_ctx.login = NULL;
 4522|      6|        if (parg == NULL)
  ------------------
  |  Branch (4522:13): [True: 0, False: 6]
  ------------------
 4523|      0|            break;
 4524|      6|        if (strlen((const char *)parg) > 255 || strlen((const char *)parg) < 1) {
  ------------------
  |  Branch (4524:13): [True: 1, False: 5]
  |  Branch (4524:49): [True: 1, False: 4]
  ------------------
 4525|      2|            ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_SRP_USERNAME);
  ------------------
  |  |  404|      2|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      2|    (ERR_new(),                                                  \
  |  |  |  |  407|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      2|        ERR_set_error)
  |  |  ------------------
  ------------------
 4526|      2|            return 0;
 4527|      2|        }
 4528|      4|        if ((ctx->srp_ctx.login = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  135|      4|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4528:13): [True: 0, False: 4]
  ------------------
 4529|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4530|      0|            return 0;
 4531|      0|        }
 4532|      4|        break;
 4533|      4|    case SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD:
  ------------------
  |  | 1341|      4|#define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD 81
  ------------------
  |  Branch (4533:5): [True: 4, False: 3.35k]
  ------------------
 4534|      4|        ctx->srp_ctx.SRP_give_srp_client_pwd_callback = srp_password_from_info_cb;
 4535|      4|        if (ctx->srp_ctx.info != NULL)
  ------------------
  |  Branch (4535:13): [True: 0, False: 4]
  ------------------
 4536|      0|            OPENSSL_free(ctx->srp_ctx.info);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4537|      4|        if ((ctx->srp_ctx.info = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  135|      4|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4537:13): [True: 2, False: 2]
  ------------------
 4538|      2|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      2|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      2|    (ERR_new(),                                                  \
  |  |  |  |  407|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      2|        ERR_set_error)
  |  |  ------------------
  ------------------
 4539|      2|            return 0;
 4540|      2|        }
 4541|      2|        break;
 4542|      2|    case SSL_CTRL_SET_SRP_ARG:
  ------------------
  |  | 1338|      0|#define SSL_CTRL_SET_SRP_ARG 78
  ------------------
  |  Branch (4542:5): [True: 0, False: 3.35k]
  ------------------
 4543|      0|        ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  ------------------
  |  |   91|      0|#define SSL_kSRP 0x00000020U
  ------------------
 4544|      0|        ctx->srp_ctx.SRP_cb_arg = parg;
 4545|      0|        break;
 4546|       |
 4547|      0|    case SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH:
  ------------------
  |  | 1340|      0|#define SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH 80
  ------------------
  |  Branch (4547:5): [True: 0, False: 3.35k]
  ------------------
 4548|      0|        ctx->srp_ctx.strength = larg;
 4549|      0|        break;
 4550|      0|#endif
 4551|       |
 4552|      0|    case SSL_CTRL_SET_GROUPS:
  ------------------
  |  | 1352|      0|#define SSL_CTRL_SET_GROUPS 91
  ------------------
  |  Branch (4552:5): [True: 0, False: 3.35k]
  ------------------
 4553|      0|        return tls1_set_groups(&ctx->ext.supportedgroups,
 4554|      0|            &ctx->ext.supportedgroups_len,
 4555|      0|            &ctx->ext.keyshares,
 4556|      0|            &ctx->ext.keyshares_len,
 4557|      0|            &ctx->ext.tuples,
 4558|      0|            &ctx->ext.tuples_len,
 4559|      0|            parg, larg);
 4560|       |
 4561|  3.34k|    case SSL_CTRL_SET_GROUPS_LIST:
  ------------------
  |  | 1353|  3.34k|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (4561:5): [True: 3.34k, False: 10]
  ------------------
 4562|  3.34k|        return tls1_set_groups_list(ctx,
 4563|  3.34k|            &ctx->ext.supportedgroups,
 4564|  3.34k|            &ctx->ext.supportedgroups_len,
 4565|  3.34k|            &ctx->ext.keyshares,
 4566|  3.34k|            &ctx->ext.keyshares_len,
 4567|  3.34k|            &ctx->ext.tuples,
 4568|  3.34k|            &ctx->ext.tuples_len,
 4569|  3.34k|            parg);
 4570|       |
 4571|      0|    case SSL_CTRL_GET0_IMPLEMENTED_GROUPS:
  ------------------
  |  | 1393|      0|#define SSL_CTRL_GET0_IMPLEMENTED_GROUPS 139
  ------------------
  |  Branch (4571:5): [True: 0, False: 3.35k]
  ------------------
 4572|      0|        return tls1_get0_implemented_groups(ctx->min_proto_version,
 4573|      0|            ctx->max_proto_version,
 4574|      0|            ctx->group_list,
 4575|      0|            ctx->group_list_len, larg, parg);
 4576|       |
 4577|      0|    case SSL_CTRL_SET_SIGALGS:
  ------------------
  |  | 1355|      0|#define SSL_CTRL_SET_SIGALGS 97
  ------------------
  |  Branch (4577:5): [True: 0, False: 3.35k]
  ------------------
 4578|      0|        return tls1_set_sigalgs(ctx->cert, parg, larg, 0);
 4579|       |
 4580|      0|    case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1356|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (4580:5): [True: 0, False: 3.35k]
  ------------------
 4581|      0|        return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 0);
 4582|       |
 4583|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS:
  ------------------
  |  | 1359|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS 101
  ------------------
  |  Branch (4583:5): [True: 0, False: 3.35k]
  ------------------
 4584|      0|        return tls1_set_sigalgs(ctx->cert, parg, larg, 1);
 4585|       |
 4586|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1360|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (4586:5): [True: 0, False: 3.35k]
  ------------------
 4587|      0|        return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 1);
 4588|       |
 4589|      0|    case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  ------------------
  |  | 1362|      0|#define SSL_CTRL_SET_CLIENT_CERT_TYPES 104
  ------------------
  |  Branch (4589:5): [True: 0, False: 3.35k]
  ------------------
 4590|      0|        return ssl3_set_req_cert_type(ctx->cert, parg, larg);
 4591|       |
 4592|      0|    case SSL_CTRL_BUILD_CERT_CHAIN:
  ------------------
  |  | 1363|      0|#define SSL_CTRL_BUILD_CERT_CHAIN 105
  ------------------
  |  Branch (4592:5): [True: 0, False: 3.35k]
  ------------------
 4593|      0|        return ssl_build_cert_chain(NULL, ctx, larg);
 4594|       |
 4595|      0|    case SSL_CTRL_SET_VERIFY_CERT_STORE:
  ------------------
  |  | 1364|      0|#define SSL_CTRL_SET_VERIFY_CERT_STORE 106
  ------------------
  |  Branch (4595:5): [True: 0, False: 3.35k]
  ------------------
 4596|      0|        return ssl_cert_set_cert_store(ctx->cert, parg, 0, larg);
 4597|       |
 4598|      0|    case SSL_CTRL_SET_CHAIN_CERT_STORE:
  ------------------
  |  | 1365|      0|#define SSL_CTRL_SET_CHAIN_CERT_STORE 107
  ------------------
  |  Branch (4598:5): [True: 0, False: 3.35k]
  ------------------
 4599|      0|        return ssl_cert_set_cert_store(ctx->cert, parg, 1, larg);
 4600|       |
 4601|      0|    case SSL_CTRL_GET_VERIFY_CERT_STORE:
  ------------------
  |  | 1391|      0|#define SSL_CTRL_GET_VERIFY_CERT_STORE 137
  ------------------
  |  Branch (4601:5): [True: 0, False: 3.35k]
  ------------------
 4602|      0|        return ssl_cert_get_cert_store(ctx->cert, parg, 0);
 4603|       |
 4604|      0|    case SSL_CTRL_GET_CHAIN_CERT_STORE:
  ------------------
  |  | 1392|      0|#define SSL_CTRL_GET_CHAIN_CERT_STORE 138
  ------------------
  |  Branch (4604:5): [True: 0, False: 3.35k]
  ------------------
 4605|      0|        return ssl_cert_get_cert_store(ctx->cert, parg, 1);
 4606|       |
 4607|       |        /* A Thawte special :-) */
 4608|      0|    case SSL_CTRL_EXTRA_CHAIN_CERT:
  ------------------
  |  | 1284|      0|#define SSL_CTRL_EXTRA_CHAIN_CERT 14
  ------------------
  |  Branch (4608:5): [True: 0, False: 3.35k]
  ------------------
 4609|      0|        if (ctx->extra_certs == NULL) {
  ------------------
  |  Branch (4609:13): [True: 0, False: 0]
  ------------------
 4610|      0|            if ((ctx->extra_certs = sk_X509_new_null()) == NULL) {
  ------------------
  |  |   85|      0|#define sk_X509_new_null() ((STACK_OF(X509) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (4610:17): [True: 0, False: 0]
  ------------------
 4611|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4612|      0|                return 0;
 4613|      0|            }
 4614|      0|        }
 4615|      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 (4615:13): [True: 0, False: 0]
  ------------------
 4616|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4617|      0|            return 0;
 4618|      0|        }
 4619|      0|        break;
 4620|       |
 4621|      0|    case SSL_CTRL_GET_EXTRA_CHAIN_CERTS:
  ------------------
  |  | 1347|      0|#define SSL_CTRL_GET_EXTRA_CHAIN_CERTS 82
  ------------------
  |  Branch (4621:5): [True: 0, False: 3.35k]
  ------------------
 4622|      0|        if (ctx->extra_certs == NULL && larg == 0)
  ------------------
  |  Branch (4622:13): [True: 0, False: 0]
  |  Branch (4622:41): [True: 0, False: 0]
  ------------------
 4623|      0|            *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
 4624|      0|        else
 4625|      0|            *(STACK_OF(X509) **)parg = ctx->extra_certs;
 4626|      0|        break;
 4627|       |
 4628|      0|    case SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS:
  ------------------
  |  | 1348|      0|#define SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS 83
  ------------------
  |  Branch (4628:5): [True: 0, False: 3.35k]
  ------------------
 4629|      0|        OSSL_STACK_OF_X509_free(ctx->extra_certs);
 4630|      0|        ctx->extra_certs = NULL;
 4631|      0|        break;
 4632|       |
 4633|      0|    case SSL_CTRL_CHAIN:
  ------------------
  |  | 1349|      0|#define SSL_CTRL_CHAIN 88
  ------------------
  |  Branch (4633:5): [True: 0, False: 3.35k]
  ------------------
 4634|      0|        if (larg)
  ------------------
  |  Branch (4634:13): [True: 0, False: 0]
  ------------------
 4635|      0|            return ssl_cert_set1_chain(NULL, ctx, (STACK_OF(X509) *)parg);
 4636|      0|        else
 4637|      0|            return ssl_cert_set0_chain(NULL, ctx, (STACK_OF(X509) *)parg);
 4638|       |
 4639|      0|    case SSL_CTRL_CHAIN_CERT:
  ------------------
  |  | 1350|      0|#define SSL_CTRL_CHAIN_CERT 89
  ------------------
  |  Branch (4639:5): [True: 0, False: 3.35k]
  ------------------
 4640|      0|        if (larg)
  ------------------
  |  Branch (4640:13): [True: 0, False: 0]
  ------------------
 4641|      0|            return ssl_cert_add1_chain_cert(NULL, ctx, (X509 *)parg);
 4642|      0|        else
 4643|      0|            return ssl_cert_add0_chain_cert(NULL, ctx, (X509 *)parg);
 4644|       |
 4645|      0|    case SSL_CTRL_GET_CHAIN_CERTS:
  ------------------
  |  | 1370|      0|#define SSL_CTRL_GET_CHAIN_CERTS 115
  ------------------
  |  Branch (4645:5): [True: 0, False: 3.35k]
  ------------------
 4646|      0|        *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
 4647|      0|        break;
 4648|       |
 4649|      0|    case SSL_CTRL_SELECT_CURRENT_CERT:
  ------------------
  |  | 1371|      0|#define SSL_CTRL_SELECT_CURRENT_CERT 116
  ------------------
  |  Branch (4649:5): [True: 0, False: 3.35k]
  ------------------
 4650|      0|        return ssl_cert_select_current(ctx->cert, (X509 *)parg);
 4651|       |
 4652|      0|    case SSL_CTRL_SET_CURRENT_CERT:
  ------------------
  |  | 1372|      0|#define SSL_CTRL_SET_CURRENT_CERT 117
  ------------------
  |  Branch (4652:5): [True: 0, False: 3.35k]
  ------------------
 4653|      0|        return ssl_cert_set_current(ctx->cert, larg);
 4654|       |
 4655|      0|    default:
  ------------------
  |  Branch (4655:5): [True: 0, False: 3.35k]
  ------------------
 4656|      0|        return 0;
 4657|  3.35k|    }
 4658|      6|    return 1;
 4659|  3.35k|}
ssl3_get_cipher_by_id:
 4716|     41|{
 4717|     41|    SSL_CIPHER c;
 4718|     41|    const SSL_CIPHER *cp;
 4719|       |
 4720|     41|    c.id = id;
 4721|     41|    cp = OBJ_bsearch_ssl_cipher_id(&c, tls13_ciphers, TLS13_NUM_CIPHERS);
  ------------------
  |  |   27|     41|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|     41|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4722|     41|    if (cp != NULL)
  ------------------
  |  Branch (4722:9): [True: 5, False: 36]
  ------------------
 4723|      5|        return cp;
 4724|     36|    cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
  ------------------
  |  |   28|     36|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|     36|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4725|     36|    if (cp != NULL)
  ------------------
  |  Branch (4725:9): [True: 23, False: 13]
  ------------------
 4726|     23|        return cp;
 4727|     13|    return OBJ_bsearch_ssl_cipher_id(&c, ssl3_scsvs, SSL3_NUM_SCSVS);
  ------------------
  |  |   29|     13|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|     13|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4728|     36|}
ssl3_get_cipher_by_std_name:
 4731|  13.8k|{
 4732|  13.8k|    SSL_CIPHER *tbl;
 4733|  13.8k|    SSL_CIPHER *alltabs[] = { tls13_ciphers, ssl3_ciphers, ssl3_scsvs };
 4734|  13.8k|    size_t i, j, tblsize[] = { TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS, SSL3_NUM_SCSVS };
  ------------------
  |  |   27|  13.8k|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|  13.8k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
                  size_t i, j, tblsize[] = { TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS, SSL3_NUM_SCSVS };
  ------------------
  |  |   28|  13.8k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  13.8k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
                  size_t i, j, tblsize[] = { TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS, SSL3_NUM_SCSVS };
  ------------------
  |  |   29|  13.8k|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|  13.8k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4735|       |
 4736|       |    /* this is not efficient, necessary to optimize this? */
 4737|  30.3k|    for (j = 0; j < OSSL_NELEM(alltabs); j++) {
  ------------------
  |  |   14|  30.3k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (4737:17): [True: 24.8k, False: 5.44k]
  ------------------
 4738|  1.13M|        for (i = 0, tbl = alltabs[j]; i < tblsize[j]; i++, tbl++) {
  ------------------
  |  Branch (4738:39): [True: 1.11M, False: 16.4k]
  ------------------
 4739|  1.11M|            if (tbl->stdname == NULL)
  ------------------
  |  Branch (4739:17): [True: 27.3k, False: 1.09M]
  ------------------
 4740|  27.3k|                continue;
 4741|  1.09M|            if (strcmp(stdname, tbl->stdname) == 0) {
  ------------------
  |  Branch (4741:17): [True: 8.43k, False: 1.08M]
  ------------------
 4742|  8.43k|                return tbl;
 4743|  8.43k|            }
 4744|  1.09M|        }
 4745|  24.8k|    }
 4746|  5.44k|    return NULL;
 4747|  13.8k|}
ssl3_get_cipher_by_char:
 4754|     41|{
 4755|     41|    return ssl3_get_cipher_by_id(SSL3_CK_CIPHERSUITE_FLAG
  ------------------
  |  |  254|     41|#define SSL3_CK_CIPHERSUITE_FLAG 0x03000000
  ------------------
 4756|     41|        | ((uint32_t)p[0] << 8L)
 4757|     41|        | (uint32_t)p[1]);
 4758|     41|}
ssl3_put_cipher_by_char:
 4761|  55.7k|{
 4762|  55.7k|    if ((c->id & 0xff000000) != SSL3_CK_CIPHERSUITE_FLAG) {
  ------------------
  |  |  254|  55.7k|#define SSL3_CK_CIPHERSUITE_FLAG 0x03000000
  ------------------
  |  Branch (4762:9): [True: 0, False: 55.7k]
  ------------------
 4763|      0|        *len = 0;
 4764|      0|        return 1;
 4765|      0|    }
 4766|       |
 4767|  55.7k|    if (!WPACKET_put_bytes_u16(pkt, c->id & 0xffff))
  ------------------
  |  |  891|  55.7k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (4767:9): [True: 0, False: 55.7k]
  ------------------
 4768|      0|        return 0;
 4769|       |
 4770|  55.7k|    *len = 2;
 4771|  55.7k|    return 1;
 4772|  55.7k|}
ssl3_renegotiate_check:
 5184|  2.25k|{
 5185|  2.25k|    int ret = 0;
 5186|  2.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  2.25k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  2.25k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |   18|  2.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  2.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 2.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  2.25k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  2.25k|                             : NULL))
  |  |  ------------------
  ------------------
 5187|       |
 5188|  2.25k|    if (sc == NULL)
  ------------------
  |  Branch (5188:9): [True: 0, False: 2.25k]
  ------------------
 5189|      0|        return 0;
 5190|       |
 5191|  2.25k|    if (sc->s3.renegotiate) {
  ------------------
  |  Branch (5191:9): [True: 0, False: 2.25k]
  ------------------
 5192|      0|        if (!RECORD_LAYER_read_pending(&sc->rlayer)
  ------------------
  |  Branch (5192:13): [True: 0, False: 0]
  ------------------
 5193|      0|            && !RECORD_LAYER_write_pending(&sc->rlayer)
  ------------------
  |  Branch (5193:16): [True: 0, False: 0]
  ------------------
 5194|      0|            && (initok || !SSL_in_init(s))) {
  ------------------
  |  Branch (5194:17): [True: 0, False: 0]
  |  Branch (5194:27): [True: 0, False: 0]
  ------------------
 5195|       |            /*
 5196|       |             * if we are the server, and we have sent a 'RENEGOTIATE'
 5197|       |             * message, we need to set the state machine into the renegotiate
 5198|       |             * state.
 5199|       |             */
 5200|      0|            ossl_statem_set_renegotiate(sc);
 5201|      0|            sc->s3.renegotiate = 0;
 5202|      0|            sc->s3.num_renegotiations++;
 5203|      0|            sc->s3.total_renegotiations++;
 5204|      0|            ret = 1;
 5205|      0|        }
 5206|      0|    }
 5207|  2.25k|    return ret;
 5208|  2.25k|}
ssl_fill_hello_random:
 5241|  1.95k|{
 5242|  1.95k|    int send_time = 0, ret;
 5243|       |
 5244|  1.95k|    if (len < 4)
  ------------------
  |  Branch (5244:9): [True: 0, False: 1.95k]
  ------------------
 5245|      0|        return 0;
 5246|  1.95k|    if (server)
  ------------------
  |  Branch (5246:9): [True: 0, False: 1.95k]
  ------------------
 5247|      0|        send_time = (s->mode & SSL_MODE_SEND_SERVERHELLO_TIME) != 0;
  ------------------
  |  |  522|      0|#define SSL_MODE_SEND_SERVERHELLO_TIME 0x00000040U
  ------------------
 5248|  1.95k|    else
 5249|  1.95k|        send_time = (s->mode & SSL_MODE_SEND_CLIENTHELLO_TIME) != 0;
  ------------------
  |  |  521|  1.95k|#define SSL_MODE_SEND_CLIENTHELLO_TIME 0x00000020U
  ------------------
 5250|  1.95k|    if (send_time) {
  ------------------
  |  Branch (5250:9): [True: 0, False: 1.95k]
  ------------------
 5251|      0|        unsigned long Time = (unsigned long)time(NULL);
 5252|      0|        unsigned char *p = result;
 5253|       |
 5254|      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))
  ------------------
 5255|      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)
  ------------------
 5256|  1.95k|    } else {
 5257|  1.95k|        ret = RAND_bytes_ex(SSL_CONNECTION_GET_CTX(s)->libctx, result, len, 0);
  ------------------
  |  |   26|  1.95k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5258|  1.95k|    }
 5259|       |
 5260|  1.95k|    if (ret > 0) {
  ------------------
  |  Branch (5260:9): [True: 1.95k, False: 0]
  ------------------
 5261|  1.95k|        if (!ossl_assert(sizeof(tls11downgrade) < len)
  ------------------
  |  |   52|  3.90k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.90k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5261:13): [True: 0, False: 1.95k]
  ------------------
 5262|  1.95k|            || !ossl_assert(sizeof(tls12downgrade) < len))
  ------------------
  |  |   52|  1.95k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.95k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5262:16): [True: 0, False: 1.95k]
  ------------------
 5263|      0|            return 0;
 5264|  1.95k|        if (dgrd == DOWNGRADE_TO_1_2)
  ------------------
  |  Branch (5264:13): [True: 0, False: 1.95k]
  ------------------
 5265|      0|            memcpy(result + len - sizeof(tls12downgrade), tls12downgrade,
 5266|      0|                sizeof(tls12downgrade));
 5267|  1.95k|        else if (dgrd == DOWNGRADE_TO_1_1)
  ------------------
  |  Branch (5267:18): [True: 0, False: 1.95k]
  ------------------
 5268|      0|            memcpy(result + len - sizeof(tls11downgrade), tls11downgrade,
 5269|      0|                sizeof(tls11downgrade));
 5270|  1.95k|    }
 5271|       |
 5272|  1.95k|    return ret;
 5273|  1.95k|}
ssl_generate_pkey_group:
 5373|  3.56k|{
 5374|  3.56k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.56k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5375|  3.56k|    const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(sctx, id);
 5376|  3.56k|    EVP_PKEY_CTX *pctx = NULL;
 5377|  3.56k|    EVP_PKEY *pkey = NULL;
 5378|       |
 5379|  3.56k|    if (ginf == NULL) {
  ------------------
  |  Branch (5379:9): [True: 0, False: 3.56k]
  ------------------
 5380|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5381|      0|        goto err;
 5382|      0|    }
 5383|       |
 5384|  3.56k|    pctx = EVP_PKEY_CTX_new_from_name(sctx->libctx, ginf->algorithm,
 5385|  3.56k|        sctx->propq);
 5386|       |
 5387|  3.56k|    if (pctx == NULL) {
  ------------------
  |  Branch (5387:9): [True: 0, False: 3.56k]
  ------------------
 5388|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5389|      0|        goto err;
 5390|      0|    }
 5391|  3.56k|    if (EVP_PKEY_keygen_init(pctx) <= 0) {
  ------------------
  |  Branch (5391:9): [True: 0, False: 3.56k]
  ------------------
 5392|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5393|      0|        goto err;
 5394|      0|    }
 5395|  3.56k|    if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
  ------------------
  |  Branch (5395:9): [True: 0, False: 3.56k]
  ------------------
 5396|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5397|      0|        goto err;
 5398|      0|    }
 5399|  3.56k|    if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
  ------------------
  |  Branch (5399:9): [True: 0, False: 3.56k]
  ------------------
 5400|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5401|      0|        EVP_PKEY_free(pkey);
 5402|      0|        pkey = NULL;
 5403|      0|    }
 5404|       |
 5405|  3.56k|err:
 5406|  3.56k|    EVP_PKEY_CTX_free(pctx);
 5407|  3.56k|    return pkey;
 5408|  3.56k|}
s3_lib.c:cipher_compare:
 3720|    973|{
 3721|    973|    const SSL_CIPHER *ap = (const SSL_CIPHER *)a;
 3722|    973|    const SSL_CIPHER *bp = (const SSL_CIPHER *)b;
 3723|       |
 3724|    973|    if (ap->id == bp->id)
  ------------------
  |  Branch (3724:9): [True: 0, False: 973]
  ------------------
 3725|      0|        return 0;
 3726|    973|    return ap->id < bp->id ? -1 : 1;
  ------------------
  |  Branch (3726:12): [True: 626, False: 347]
  ------------------
 3727|    973|}

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

SSL_get_ex_data_X509_STORE_CTX_idx:
   56|  2.78k|{
   57|       |
   58|  2.78k|    if (!RUN_ONCE(&ssl_x509_store_ctx_once, ssl_x509_store_ctx_init))
  ------------------
  |  |  130|  2.78k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2.78k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (58:9): [True: 0, False: 2.78k]
  ------------------
   59|      0|        return -1;
   60|  2.78k|    return ssl_x509_store_ctx_idx;
   61|  2.78k|}
ssl_cert_new:
   64|  2.78k|{
   65|  2.78k|    CERT *ret = NULL;
   66|       |
   67|       |    /* Should never happen */
   68|  2.78k|    if (!ossl_assert(ssl_pkey_num >= SSL_PKEY_NUM))
  ------------------
  |  |   52|  2.78k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.78k|    __FILE__, __LINE__)
  ------------------
  |  Branch (68:9): [True: 0, False: 2.78k]
  ------------------
   69|      0|        return NULL;
   70|       |
   71|  2.78k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.78k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|  2.78k|    if (ret == NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 2.78k]
  ------------------
   73|      0|        return NULL;
   74|       |
   75|  2.78k|    ret->ssl_pkey_num = ssl_pkey_num;
   76|  2.78k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  112|  2.78k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  2.78k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 2.78k]
  ------------------
   78|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|      0|        return NULL;
   80|      0|    }
   81|       |
   82|  2.78k|    ret->key = &(ret->pkeys[SSL_PKEY_RSA]);
  ------------------
  |  |  319|  2.78k|#define SSL_PKEY_RSA 0
  ------------------
   83|  2.78k|    ret->sec_cb = ssl_security_default_callback;
   84|  2.78k|    ret->sec_level = OPENSSL_TLS_SECURITY_LEVEL;
  ------------------
  |  |   31|  2.78k|#define OPENSSL_TLS_SECURITY_LEVEL 2
  ------------------
   85|  2.78k|    ret->sec_ex = NULL;
   86|  2.78k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 2.78k]
  ------------------
   87|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   88|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   89|      0|        return NULL;
   90|      0|    }
   91|       |
   92|  2.78k|    return ret;
   93|  2.78k|}
ssl_cert_dup:
   96|  1.95k|{
   97|  1.95k|    CERT *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  1.95k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   98|  1.95k|    size_t i;
   99|       |#ifndef OPENSSL_NO_COMP_ALG
  100|       |    int j;
  101|       |#endif
  102|       |
  103|  1.95k|    if (ret == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 1.95k]
  ------------------
  104|      0|        return NULL;
  105|       |
  106|  1.95k|    ret->ssl_pkey_num = cert->ssl_pkey_num;
  107|  1.95k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  112|  1.95k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  108|  1.95k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (108:9): [True: 0, False: 1.95k]
  ------------------
  109|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|      0|        return NULL;
  111|      0|    }
  112|       |
  113|  1.95k|    ret->key = &ret->pkeys[cert->key - cert->pkeys];
  114|  1.95k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (114:9): [True: 0, False: 1.95k]
  ------------------
  115|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  116|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|      0|        return NULL;
  118|      0|    }
  119|       |
  120|  1.95k|    if (cert->dh_tmp != NULL) {
  ------------------
  |  Branch (120:9): [True: 0, False: 1.95k]
  ------------------
  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|  1.95k|    ret->dh_tmp_cb = cert->dh_tmp_cb;
  127|  1.95k|    ret->dh_tmp_auto = cert->dh_tmp_auto;
  128|       |
  129|  25.4k|    for (i = 0; i < ret->ssl_pkey_num; i++) {
  ------------------
  |  Branch (129:17): [True: 23.4k, False: 1.95k]
  ------------------
  130|  23.4k|        CERT_PKEY *cpk = cert->pkeys + i;
  131|  23.4k|        CERT_PKEY *rpk = ret->pkeys + i;
  132|       |
  133|  23.4k|        if (cpk->x509 != NULL) {
  ------------------
  |  Branch (133:13): [True: 0, False: 23.4k]
  ------------------
  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|  23.4k|        if (cpk->privatekey != NULL) {
  ------------------
  |  Branch (139:13): [True: 0, False: 23.4k]
  ------------------
  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|  23.4k|        if (cpk->chain) {
  ------------------
  |  Branch (145:13): [True: 0, False: 23.4k]
  ------------------
  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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  149|      0|                goto err;
  150|      0|            }
  151|      0|        }
  152|  23.4k|        if (cpk->serverinfo != NULL) {
  ------------------
  |  Branch (152:13): [True: 0, False: 23.4k]
  ------------------
  153|       |            /* Just copy everything. */
  154|      0|            rpk->serverinfo = OPENSSL_memdup(cpk->serverinfo, cpk->serverinfo_length);
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|  23.4k|    }
  169|       |
  170|       |    /* Configured sigalgs copied across */
  171|  1.95k|    if (cert->conf_sigalgs) {
  ------------------
  |  Branch (171:9): [True: 0, False: 1.95k]
  ------------------
  172|      0|        ret->conf_sigalgs = OPENSSL_malloc_array(cert->conf_sigalgslen,
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|  1.95k|        ret->conf_sigalgs = NULL;
  181|       |
  182|  1.95k|    if (cert->client_sigalgs) {
  ------------------
  |  Branch (182:9): [True: 0, False: 1.95k]
  ------------------
  183|      0|        ret->client_sigalgs = OPENSSL_malloc_array(cert->client_sigalgslen,
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|  1.95k|        ret->client_sigalgs = NULL;
  192|       |    /* Copy any custom client certificate types */
  193|  1.95k|    if (cert->ctype) {
  ------------------
  |  Branch (193:9): [True: 0, False: 1.95k]
  ------------------
  194|      0|        ret->ctype = OPENSSL_memdup(cert->ctype, cert->ctype_len);
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|  1.95k|    ret->cert_flags = cert->cert_flags;
  201|       |
  202|  1.95k|    ret->cert_cb = cert->cert_cb;
  203|  1.95k|    ret->cert_cb_arg = cert->cert_cb_arg;
  204|       |
  205|  1.95k|    if (cert->verify_store) {
  ------------------
  |  Branch (205:9): [True: 0, False: 1.95k]
  ------------------
  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|  1.95k|    if (cert->chain_store) {
  ------------------
  |  Branch (211:9): [True: 0, False: 1.95k]
  ------------------
  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|  1.95k|    ret->sec_cb = cert->sec_cb;
  218|  1.95k|    ret->sec_level = cert->sec_level;
  219|  1.95k|    ret->sec_ex = cert->sec_ex;
  220|       |
  221|  1.95k|    if (!custom_exts_copy(&ret->custext, &cert->custext))
  ------------------
  |  Branch (221:9): [True: 0, False: 1.95k]
  ------------------
  222|      0|        goto err;
  223|  1.95k|#ifndef OPENSSL_NO_PSK
  224|  1.95k|    if (cert->psk_identity_hint) {
  ------------------
  |  Branch (224:9): [True: 0, False: 1.95k]
  ------------------
  225|      0|        ret->psk_identity_hint = OPENSSL_strdup(cert->psk_identity_hint);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|  1.95k|#endif
  230|  1.95k|    return ret;
  231|       |
  232|      0|err:
  233|      0|    ssl_cert_free(ret);
  234|       |
  235|       |    return NULL;
  236|  1.95k|}
ssl_cert_clear_certs:
  241|  4.74k|{
  242|  4.74k|    size_t i;
  243|       |#ifndef OPENSSL_NO_COMP_ALG
  244|       |    int j;
  245|       |#endif
  246|       |
  247|  4.74k|    if (c == NULL)
  ------------------
  |  Branch (247:9): [True: 0, False: 4.74k]
  ------------------
  248|      0|        return;
  249|  61.3k|    for (i = 0; i < c->ssl_pkey_num; i++) {
  ------------------
  |  Branch (249:17): [True: 56.6k, False: 4.74k]
  ------------------
  250|  56.6k|        CERT_PKEY *cpk = c->pkeys + i;
  251|  56.6k|        X509_free(cpk->x509);
  252|  56.6k|        cpk->x509 = NULL;
  253|  56.6k|        EVP_PKEY_free(cpk->privatekey);
  254|  56.6k|        cpk->privatekey = NULL;
  255|  56.6k|        OSSL_STACK_OF_X509_free(cpk->chain);
  256|  56.6k|        cpk->chain = NULL;
  257|  56.6k|        OPENSSL_free(cpk->serverinfo);
  ------------------
  |  |  131|  56.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|  56.6k|        cpk->serverinfo = NULL;
  259|  56.6k|        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|  56.6k|    }
  268|  4.74k|}
ssl_cert_free:
  271|  4.74k|{
  272|  4.74k|    int i;
  273|       |
  274|  4.74k|    if (c == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 4.74k]
  ------------------
  275|      0|        return;
  276|  4.74k|    CRYPTO_DOWN_REF(&c->references, &i);
  277|  4.74k|    REF_PRINT_COUNT("CERT", i, c);
  ------------------
  |  |  301|  4.74k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  4.74k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  4.74k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  4.74k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|  4.74k|    if (i > 0)
  ------------------
  |  Branch (278:9): [True: 0, False: 4.74k]
  ------------------
  279|      0|        return;
  280|  4.74k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  4.74k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 4.74k]
  |  |  ------------------
  ------------------
  281|       |
  282|  4.74k|    EVP_PKEY_free(c->dh_tmp);
  283|       |
  284|  4.74k|    ssl_cert_clear_certs(c);
  285|  4.74k|    OPENSSL_free(c->conf_sigalgs);
  ------------------
  |  |  131|  4.74k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  286|  4.74k|    OPENSSL_free(c->client_sigalgs);
  ------------------
  |  |  131|  4.74k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  287|  4.74k|    OPENSSL_free(c->ctype);
  ------------------
  |  |  131|  4.74k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  288|  4.74k|    X509_STORE_free(c->verify_store);
  289|  4.74k|    X509_STORE_free(c->chain_store);
  290|  4.74k|    custom_exts_free(&c->custext);
  291|  4.74k|#ifndef OPENSSL_NO_PSK
  292|  4.74k|    OPENSSL_free(c->psk_identity_hint);
  ------------------
  |  |  131|  4.74k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  293|  4.74k|#endif
  294|  4.74k|    OPENSSL_free(c->pkeys);
  ------------------
  |  |  131|  4.74k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  295|  4.74k|    CRYPTO_FREE_REF(&c->references);
  296|  4.74k|    OPENSSL_free(c);
  ------------------
  |  |  131|  4.74k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|  4.74k|}
SSL_get0_CA_list:
  631|  1.81k|{
  632|  1.81k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  1.81k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  1.81k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.81k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.81k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.81k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.81k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.81k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.81k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  633|       |
  634|  1.81k|    if (sc == NULL)
  ------------------
  |  Branch (634:9): [True: 0, False: 1.81k]
  ------------------
  635|      0|        return NULL;
  636|       |
  637|  1.81k|    return sc->ca_names != NULL ? sc->ca_names : s->ctx->ca_names;
  ------------------
  |  Branch (637:12): [True: 0, False: 1.81k]
  ------------------
  638|  1.81k|}
ssl_get_security_level_bits:
 1219|   299k|{
 1220|   299k|    int level;
 1221|       |    /*
 1222|       |     * note that there's a corresponding minbits_table
 1223|       |     * in crypto/x509/x509_vfy.c that's used for checking the security level
 1224|       |     * of RSA and DSA keys
 1225|       |     */
 1226|   299k|    static const int minbits_table[5 + 1] = { 0, 80, 112, 128, 192, 256 };
 1227|       |
 1228|   299k|    if (ctx != NULL)
  ------------------
  |  Branch (1228:9): [True: 0, False: 299k]
  ------------------
 1229|      0|        level = SSL_CTX_get_security_level(ctx);
 1230|   299k|    else
 1231|   299k|        level = SSL_get_security_level(s);
 1232|       |
 1233|   299k|    if (level > 5)
  ------------------
  |  Branch (1233:9): [True: 0, False: 299k]
  ------------------
 1234|      0|        level = 5;
 1235|   299k|    else if (level < 0)
  ------------------
  |  Branch (1235:14): [True: 0, False: 299k]
  ------------------
 1236|      0|        level = 0;
 1237|       |
 1238|   299k|    if (levelp != NULL)
  ------------------
  |  Branch (1238:9): [True: 299k, False: 0]
  ------------------
 1239|   299k|        *levelp = level;
 1240|       |
 1241|   299k|    return minbits_table[level];
 1242|   299k|}
ssl_security:
 1315|   299k|{
 1316|   299k|    return s->cert->sec_cb(SSL_CONNECTION_GET_USER_SSL(s), NULL, op, bits, nid,
  ------------------
  |  |   28|   299k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1317|   299k|        other, s->cert->sec_ex);
 1318|   299k|}
ssl_cert_lookup_by_idx:
 1376|   227k|{
 1377|   227k|    if (idx >= (OSSL_NELEM(ssl_cert_info) + ctx->sigalg_list_len))
  ------------------
  |  |   14|   227k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1377:9): [True: 0, False: 227k]
  ------------------
 1378|      0|        return NULL;
 1379|   227k|    else if (idx >= (OSSL_NELEM(ssl_cert_info)))
  ------------------
  |  |   14|   227k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1379:14): [True: 16.8k, False: 210k]
  ------------------
 1380|  16.8k|        return &(ctx->ssl_cert_info[idx - SSL_PKEY_NUM]);
  ------------------
  |  |  328|  16.8k|#define SSL_PKEY_NUM 9
  ------------------
 1381|   210k|    return &ssl_cert_info[idx];
 1382|   227k|}
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,
  ------------------
  |  |  774|      1|    CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE_CTX, l, p, newf, dupf, freef)
  |  |  ------------------
  |  |  |  |  255|      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:
 1247|   299k|{
 1248|   299k|    int level, minbits, pfs_mask;
 1249|   299k|    const SSL_CONNECTION *sc;
 1250|       |
 1251|   299k|    minbits = ssl_get_security_level_bits(s, ctx, &level);
 1252|       |
 1253|   299k|    if (level == 0) {
  ------------------
  |  Branch (1253:9): [True: 1.93k, False: 297k]
  ------------------
 1254|       |        /*
 1255|       |         * No EDH keys weaker than 1024-bits even at level 0, otherwise,
 1256|       |         * anything goes.
 1257|       |         */
 1258|  1.93k|        if (op == SSL_SECOP_TMP_DH && bits < 80)
  ------------------
  |  | 2764|  3.86k|#define SSL_SECOP_TMP_DH (7 | SSL_SECOP_OTHER_PKEY)
  |  |  ------------------
  |  |  |  | 2741|  1.93k|#define SSL_SECOP_OTHER_PKEY (4 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1258:13): [True: 0, False: 1.93k]
  |  Branch (1258:39): [True: 0, False: 0]
  ------------------
 1259|      0|            return 0;
 1260|  1.93k|        return 1;
 1261|  1.93k|    }
 1262|   297k|    switch (op) {
 1263|   169k|    case SSL_SECOP_CIPHER_SUPPORTED:
  ------------------
  |  | 2752|   169k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|   169k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1263:5): [True: 169k, False: 128k]
  ------------------
 1264|   169k|    case SSL_SECOP_CIPHER_SHARED:
  ------------------
  |  | 2754|   169k|#define SSL_SECOP_CIPHER_SHARED (2 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|   169k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1264:5): [True: 0, False: 297k]
  ------------------
 1265|   169k|    case SSL_SECOP_CIPHER_CHECK: {
  ------------------
  |  | 2756|   169k|#define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|   169k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1265:5): [True: 23, False: 297k]
  ------------------
 1266|   169k|        const SSL_CIPHER *c = other;
 1267|       |        /* No ciphers below security level */
 1268|   169k|        if (bits < minbits)
  ------------------
  |  Branch (1268:13): [True: 2.36k, False: 166k]
  ------------------
 1269|  2.36k|            return 0;
 1270|       |        /* No unauthenticated ciphersuites */
 1271|   166k|        if (c->algorithm_auth & SSL_aNULL)
  ------------------
  |  |  112|   166k|#define SSL_aNULL 0x00000004U
  ------------------
  |  Branch (1271:13): [True: 2.69k, False: 163k]
  ------------------
 1272|  2.69k|            return 0;
 1273|       |        /* No MD5 mac ciphersuites */
 1274|   163k|        if (c->algorithm_mac & SSL_MD5)
  ------------------
  |  |  168|   163k|#define SSL_MD5 0x00000001U
  ------------------
  |  Branch (1274:13): [True: 0, False: 163k]
  ------------------
 1275|      0|            return 0;
 1276|       |        /* SHA1 HMAC is 160 bits of security */
 1277|   163k|        if (minbits > 160 && c->algorithm_mac & SSL_SHA1)
  ------------------
  |  |  169|    535|#define SSL_SHA1 0x00000002U
  ------------------
  |  Branch (1277:13): [True: 535, False: 163k]
  |  Branch (1277:30): [True: 160, False: 375]
  ------------------
 1278|    160|            return 0;
 1279|       |        /* Level 3: forward secure ciphersuites only */
 1280|   163k|        pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   83|   163k|#define SSL_kDHE 0x00000002U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   85|   163k|#define SSL_kECDHE 0x00000004U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   95|   163k|#define SSL_kDHEPSK 0x00000100U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   94|   163k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
 1281|   163k|        if (level >= 3 && c->min_tls != TLS1_3_VERSION && !(c->algorithm_mkey & pfs_mask))
  ------------------
  |  |   27|   164k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1281:13): [True: 793, False: 163k]
  |  Branch (1281:27): [True: 688, False: 105]
  |  Branch (1281:59): [True: 136, False: 552]
  ------------------
 1282|    136|            return 0;
 1283|   163k|        break;
 1284|   163k|    }
 1285|   163k|    case SSL_SECOP_VERSION:
  ------------------
  |  | 2766|  39.9k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|  39.9k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1285:5): [True: 39.9k, False: 257k]
  ------------------
 1286|  39.9k|        if ((sc = SSL_CONNECTION_FROM_CONST_SSL(s)) == NULL)
  ------------------
  |  |   41|  39.9k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  39.9k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 39.9k]
  |  |  |  |  ------------------
  |  |  |  |   33|  39.9k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  39.9k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 39.9k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  39.9k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  39.9k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  |  Branch (1286:13): [True: 0, False: 39.9k]
  ------------------
 1287|      0|            return 0;
 1288|  39.9k|        if (!SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  258|  39.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  39.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  39.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (1288:13): [True: 39.9k, False: 0]
  ------------------
 1289|       |            /* SSLv3, TLS v1.0 and TLS v1.1 only allowed at level 0 */
 1290|  39.9k|            if (nid <= TLS1_1_VERSION && level > 0)
  ------------------
  |  |   25|  79.8k|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1290:17): [True: 3.92k, False: 36.0k]
  |  Branch (1290:42): [True: 3.92k, False: 0]
  ------------------
 1291|  3.92k|                return 0;
 1292|  39.9k|        } else {
 1293|       |            /* DTLS v1.0 only allowed at level 0 */
 1294|      0|            if (DTLS_VERSION_LT(nid, DTLS1_2_VERSION) && level > 0)
  ------------------
  |  |   60|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (60:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1294:58): [True: 0, False: 0]
  ------------------
 1295|      0|                return 0;
 1296|      0|        }
 1297|  36.0k|        break;
 1298|       |
 1299|  36.0k|    case SSL_SECOP_COMPRESSION:
  ------------------
  |  | 2778|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1299:5): [True: 0, False: 297k]
  ------------------
 1300|      0|        if (level >= 2)
  ------------------
  |  Branch (1300:13): [True: 0, False: 0]
  ------------------
 1301|      0|            return 0;
 1302|      0|        break;
 1303|      0|    case SSL_SECOP_TICKET:
  ------------------
  |  | 2768|      0|#define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1303:5): [True: 0, False: 297k]
  ------------------
 1304|      0|        if (level >= 3)
  ------------------
  |  Branch (1304:13): [True: 0, False: 0]
  ------------------
 1305|      0|            return 0;
 1306|      0|        break;
 1307|  88.2k|    default:
  ------------------
  |  Branch (1307:5): [True: 88.2k, False: 208k]
  ------------------
 1308|  88.2k|        if (bits < minbits)
  ------------------
  |  Branch (1308:13): [True: 5.95k, False: 82.3k]
  ------------------
 1309|  5.95k|            return 0;
 1310|   297k|    }
 1311|   282k|    return 1;
 1312|   297k|}

ssl_load_ciphers:
  327|  2.78k|{
  328|  2.78k|    size_t i;
  329|  2.78k|    const ssl_cipher_table *t;
  330|  2.78k|    EVP_KEYEXCH *kex = NULL;
  331|  2.78k|    EVP_SIGNATURE *sig = NULL;
  332|       |
  333|  2.78k|    ctx->disabled_enc_mask = 0;
  334|  69.6k|    for (i = 0, t = ssl_cipher_table_cipher; i < SSL_ENC_NUM_IDX; i++, t++) {
  ------------------
  |  |  354|  69.6k|#define SSL_ENC_NUM_IDX 24
  ------------------
  |  Branch (334:46): [True: 66.8k, False: 2.78k]
  ------------------
  335|  66.8k|        if (t->nid != NID_undef) {
  ------------------
  |  |   18|  66.8k|#define NID_undef                       0
  ------------------
  |  Branch (335:13): [True: 64.0k, False: 2.78k]
  ------------------
  336|  64.0k|            const EVP_CIPHER *cipher
  337|  64.0k|                = ssl_evp_cipher_fetch(ctx->libctx, t->nid, ctx->propq);
  338|       |
  339|  64.0k|            ctx->ssl_cipher_methods[i] = cipher;
  340|  64.0k|            if (cipher == NULL)
  ------------------
  |  Branch (340:17): [True: 26.1k, False: 37.8k]
  ------------------
  341|  26.1k|                ctx->disabled_enc_mask |= t->mask;
  342|  64.0k|        }
  343|  66.8k|    }
  344|  2.78k|    ctx->disabled_mac_mask = 0;
  345|  41.7k|    for (i = 0, t = ssl_cipher_table_mac; i < SSL_MD_NUM_IDX; i++, t++) {
  ------------------
  |  |  203|  41.7k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  201|  41.7k|#define SSL_MAX_DIGEST 14
  |  |  ------------------
  ------------------
  |  Branch (345:43): [True: 38.9k, False: 2.78k]
  ------------------
  346|  38.9k|        const EVP_MD *md
  347|  38.9k|            = ssl_evp_md_fetch(ctx->libctx, t->nid, ctx->propq);
  348|       |
  349|  38.9k|        ctx->ssl_digest_methods[i] = md;
  350|  38.9k|        if (md == NULL) {
  ------------------
  |  Branch (350:13): [True: 20.0k, False: 18.9k]
  ------------------
  351|  20.0k|            ctx->disabled_mac_mask |= t->mask;
  352|  20.0k|        } else {
  353|  18.9k|            int tmpsize = EVP_MD_get_size(md);
  354|       |
  355|  18.9k|            if (!ossl_assert(tmpsize > 0))
  ------------------
  |  |   52|  18.9k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  18.9k|    __FILE__, __LINE__)
  ------------------
  |  Branch (355:17): [True: 0, False: 18.9k]
  ------------------
  356|      0|                return 0;
  357|  18.9k|            ctx->ssl_mac_secret_size[i] = tmpsize;
  358|  18.9k|        }
  359|  38.9k|    }
  360|       |
  361|  2.78k|    ctx->disabled_mkey_mask = 0;
  362|  2.78k|    ctx->disabled_auth_mask = 0;
  363|       |
  364|       |    /*
  365|       |     * We ignore any errors from the fetches below. They are expected to fail
  366|       |     * if these algorithms are not available.
  367|       |     */
  368|  2.78k|    ERR_set_mark();
  369|  2.78k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "DSA", ctx->propq);
  370|  2.78k|    if (sig == NULL)
  ------------------
  |  Branch (370:9): [True: 79, False: 2.70k]
  ------------------
  371|     79|        ctx->disabled_auth_mask |= SSL_aDSS;
  ------------------
  |  |  110|     79|#define SSL_aDSS 0x00000002U
  ------------------
  372|  2.70k|    else
  373|  2.70k|        EVP_SIGNATURE_free(sig);
  374|  2.78k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "DH", ctx->propq);
  375|  2.78k|    if (kex == NULL)
  ------------------
  |  Branch (375:9): [True: 79, False: 2.70k]
  ------------------
  376|     79|        ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   83|     79|#define SSL_kDHE 0x00000002U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   95|     79|#define SSL_kDHEPSK 0x00000100U
  ------------------
  377|  2.70k|    else
  378|  2.70k|        EVP_KEYEXCH_free(kex);
  379|  2.78k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "ECDH", ctx->propq);
  380|  2.78k|    if (kex == NULL)
  ------------------
  |  Branch (380:9): [True: 79, False: 2.70k]
  ------------------
  381|     79|        ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   85|     79|#define SSL_kECDHE 0x00000004U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   94|     79|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  382|  2.70k|    else
  383|  2.70k|        EVP_KEYEXCH_free(kex);
  384|  2.78k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "ECDSA", ctx->propq);
  385|  2.78k|    if (sig == NULL)
  ------------------
  |  Branch (385:9): [True: 79, False: 2.70k]
  ------------------
  386|     79|        ctx->disabled_auth_mask |= SSL_aECDSA;
  ------------------
  |  |  114|     79|#define SSL_aECDSA 0x00000008U
  ------------------
  387|  2.70k|    else
  388|  2.70k|        EVP_SIGNATURE_free(sig);
  389|  2.78k|    ERR_pop_to_mark();
  390|       |
  391|       |#ifdef OPENSSL_NO_PSK
  392|       |    ctx->disabled_mkey_mask |= SSL_PSK;
  393|       |    ctx->disabled_auth_mask |= SSL_aPSK;
  394|       |#endif
  395|       |#ifdef OPENSSL_NO_SRP
  396|       |    ctx->disabled_mkey_mask |= SSL_kSRP;
  397|       |#endif
  398|       |
  399|       |    /*
  400|       |     * Check for presence of GOST 34.10 algorithms, and if they are not
  401|       |     * present, disable appropriate auth and key exchange
  402|       |     */
  403|  2.78k|    memcpy(ctx->ssl_mac_pkey_id, default_mac_pkey_id,
  404|  2.78k|        sizeof(ctx->ssl_mac_pkey_id));
  405|       |
  406|  2.78k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX] = get_optional_pkey_id(SN_id_Gost28147_89_MAC);
  ------------------
  |  |  190|  2.78k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
                  ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX] = get_optional_pkey_id(SN_id_Gost28147_89_MAC);
  ------------------
  |  | 4607|  2.78k|#define SN_id_Gost28147_89_MAC          "gost-mac"
  ------------------
  407|  2.78k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX])
  ------------------
  |  |  190|  2.78k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  |  Branch (407:9): [True: 0, False: 2.78k]
  ------------------
  408|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC_IDX] = 32;
  ------------------
  |  |  190|      0|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  409|  2.78k|    else
  410|  2.78k|        ctx->disabled_mac_mask |= SSL_GOST89MAC;
  ------------------
  |  |  171|  2.78k|#define SSL_GOST89MAC 0x00000008U
  ------------------
  411|       |
  412|  2.78k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX] = get_optional_pkey_id(SN_gost_mac_12);
  ------------------
  |  |  194|  2.78k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
                  ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX] = get_optional_pkey_id(SN_gost_mac_12);
  ------------------
  |  | 4612|  2.78k|#define SN_gost_mac_12          "gost-mac-12"
  ------------------
  413|  2.78k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX])
  ------------------
  |  |  194|  2.78k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  |  Branch (413:9): [True: 0, False: 2.78k]
  ------------------
  414|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC12_IDX] = 32;
  ------------------
  |  |  194|      0|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  415|  2.78k|    else
  416|  2.78k|        ctx->disabled_mac_mask |= SSL_GOST89MAC12;
  ------------------
  |  |  177|  2.78k|#define SSL_GOST89MAC12 0x00000100U
  ------------------
  417|       |
  418|  2.78k|    ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX] = get_optional_pkey_id(SN_magma_mac);
  ------------------
  |  |  199|  2.78k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
                  ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX] = get_optional_pkey_id(SN_magma_mac);
  ------------------
  |  | 5071|  2.78k|#define SN_magma_mac            "magma-mac"
  ------------------
  419|  2.78k|    if (ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX])
  ------------------
  |  |  199|  2.78k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  |  Branch (419:9): [True: 0, False: 2.78k]
  ------------------
  420|      0|        ctx->ssl_mac_secret_size[SSL_MD_MAGMAOMAC_IDX] = 32;
  ------------------
  |  |  199|      0|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  421|  2.78k|    else
  422|  2.78k|        ctx->disabled_mac_mask |= SSL_MAGMAOMAC;
  ------------------
  |  |  179|  2.78k|#define SSL_MAGMAOMAC 0x00000400U
  ------------------
  423|       |
  424|  2.78k|    ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX] = get_optional_pkey_id(SN_kuznyechik_mac);
  ------------------
  |  |  200|  2.78k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
                  ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX] = get_optional_pkey_id(SN_kuznyechik_mac);
  ------------------
  |  | 5053|  2.78k|#define SN_kuznyechik_mac               "kuznyechik-mac"
  ------------------
  425|  2.78k|    if (ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX])
  ------------------
  |  |  200|  2.78k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  |  Branch (425:9): [True: 0, False: 2.78k]
  ------------------
  426|      0|        ctx->ssl_mac_secret_size[SSL_MD_KUZNYECHIKOMAC_IDX] = 32;
  ------------------
  |  |  200|      0|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  427|  2.78k|    else
  428|  2.78k|        ctx->disabled_mac_mask |= SSL_KUZNYECHIKOMAC;
  ------------------
  |  |  180|  2.78k|#define SSL_KUZNYECHIKOMAC 0x00000800U
  ------------------
  429|       |
  430|  2.78k|    if (!get_optional_pkey_id(SN_id_GostR3410_2001))
  ------------------
  |  | 4577|  2.78k|#define SN_id_GostR3410_2001            "gost2001"
  ------------------
  |  Branch (430:9): [True: 2.78k, False: 0]
  ------------------
  431|  2.78k|        ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  118|  2.78k|#define SSL_aGOST01 0x00000020U
  ------------------
                      ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  122|  2.78k|#define SSL_aGOST12 0x00000080U
  ------------------
  432|  2.78k|    if (!get_optional_pkey_id(SN_id_GostR3410_2012_256))
  ------------------
  |  | 4788|  2.78k|#define SN_id_GostR3410_2012_256                "gost2012_256"
  ------------------
  |  Branch (432:9): [True: 2.78k, False: 0]
  ------------------
  433|  2.78k|        ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  122|  2.78k|#define SSL_aGOST12 0x00000080U
  ------------------
  434|  2.78k|    if (!get_optional_pkey_id(SN_id_GostR3410_2012_512))
  ------------------
  |  | 4793|  2.78k|#define SN_id_GostR3410_2012_512                "gost2012_512"
  ------------------
  |  Branch (434:9): [True: 2.78k, False: 0]
  ------------------
  435|  2.78k|        ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  122|  2.78k|#define SSL_aGOST12 0x00000080U
  ------------------
  436|       |    /*
  437|       |     * Disable GOST key exchange if no GOST signature algs are available *
  438|       |     */
  439|  2.78k|    if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  118|  2.78k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  2.78k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  118|  2.78k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  2.78k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (439:9): [True: 2.78k, False: 0]
  ------------------
  440|  2.78k|        ctx->disabled_mkey_mask |= SSL_kGOST;
  ------------------
  |  |   89|  2.78k|#define SSL_kGOST 0x00000010U
  ------------------
  441|       |
  442|  2.78k|    if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  122|  2.78k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  122|  2.78k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (442:9): [True: 2.78k, False: 0]
  ------------------
  443|  2.78k|        ctx->disabled_mkey_mask |= SSL_kGOST18;
  ------------------
  |  |   97|  2.78k|#define SSL_kGOST18 0x00000200U
  ------------------
  444|       |
  445|  2.78k|    return 1;
  446|  2.78k|}
ssl_md:
  595|  60.6k|{
  596|  60.6k|    idx &= SSL_HANDSHAKE_MAC_MASK;
  ------------------
  |  |  208|  60.6k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
  597|  60.6k|    if (idx < 0 || idx >= SSL_MD_NUM_IDX)
  ------------------
  |  |  203|  60.6k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  201|  60.6k|#define SSL_MAX_DIGEST 14
  |  |  ------------------
  ------------------
  |  Branch (597:9): [True: 0, False: 60.6k]
  |  Branch (597:20): [True: 0, False: 60.6k]
  ------------------
  598|      0|        return NULL;
  599|  60.6k|    return ctx->ssl_digest_methods[idx];
  600|  60.6k|}
SSL_CTX_set_ciphersuites:
 1386|  2.93k|{
 1387|  2.93k|    int ret = set_ciphersuites(&(ctx->tls13_ciphersuites), str);
 1388|       |
 1389|  2.93k|    if (ret && ctx->cipher_list != NULL)
  ------------------
  |  Branch (1389:9): [True: 2.85k, False: 83]
  |  Branch (1389:16): [True: 67, False: 2.78k]
  ------------------
 1390|     67|        return update_cipher_list(ctx, &ctx->cipher_list, &ctx->cipher_list_by_id,
 1391|     67|            ctx->tls13_ciphersuites);
 1392|       |
 1393|  2.86k|    return ret;
 1394|  2.93k|}
ssl_create_cipher_list:
 1425|  3.61k|{
 1426|  3.61k|    int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases, i;
 1427|  3.61k|    uint32_t disabled_mkey, disabled_auth, disabled_enc, disabled_mac;
 1428|  3.61k|    STACK_OF(SSL_CIPHER) *cipherstack;
  ------------------
  |  |   33|  3.61k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1429|  3.61k|    const char *rule_p;
 1430|  3.61k|    CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr;
 1431|  3.61k|    const SSL_CIPHER **ca_list = NULL;
 1432|  3.61k|    const SSL_METHOD *ssl_method = ctx->method;
 1433|       |
 1434|       |    /*
 1435|       |     * Return with error if nothing to do.
 1436|       |     */
 1437|  3.61k|    if (rule_str == NULL || cipher_list == NULL || cipher_list_by_id == NULL)
  ------------------
  |  Branch (1437:9): [True: 0, False: 3.61k]
  |  Branch (1437:29): [True: 0, False: 3.61k]
  |  Branch (1437:52): [True: 0, False: 3.61k]
  ------------------
 1438|      0|        return NULL;
 1439|       |
 1440|  3.61k|    if (!check_suiteb_cipher_list(ssl_method, c, &rule_str))
  ------------------
  |  Branch (1440:9): [True: 0, False: 3.61k]
  ------------------
 1441|      0|        return NULL;
 1442|       |
 1443|       |    /*
 1444|       |     * To reduce the work to do we only want to process the compiled
 1445|       |     * in algorithms, so we first get the mask of disabled ciphers.
 1446|       |     */
 1447|       |
 1448|  3.61k|    disabled_mkey = ctx->disabled_mkey_mask;
 1449|  3.61k|    disabled_auth = ctx->disabled_auth_mask;
 1450|  3.61k|    disabled_enc = ctx->disabled_enc_mask;
 1451|  3.61k|    disabled_mac = ctx->disabled_mac_mask;
 1452|       |
 1453|       |    /*
 1454|       |     * Now we have to collect the available ciphers from the compiled
 1455|       |     * in ciphers. We cannot get more than the number compiled in, so
 1456|       |     * it is used for allocation.
 1457|       |     */
 1458|  3.61k|    num_of_ciphers = ssl_method->num_ciphers();
 1459|       |
 1460|  3.61k|    if (num_of_ciphers > 0) {
  ------------------
  |  Branch (1460:9): [True: 3.61k, False: 0]
  ------------------
 1461|  3.61k|        co_list = OPENSSL_malloc_array(num_of_ciphers, sizeof(*co_list));
  ------------------
  |  |  110|  3.61k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1462|  3.61k|        if (co_list == NULL)
  ------------------
  |  Branch (1462:13): [True: 0, False: 3.61k]
  ------------------
 1463|      0|            return NULL; /* Failure */
 1464|  3.61k|    }
 1465|       |
 1466|  3.61k|    ssl_cipher_collect_ciphers(ssl_method, num_of_ciphers,
 1467|  3.61k|        disabled_mkey, disabled_auth, disabled_enc,
 1468|  3.61k|        disabled_mac, co_list, &head, &tail);
 1469|       |
 1470|       |    /* Now arrange all ciphers by preference. */
 1471|       |
 1472|       |    /*
 1473|       |     * Everything else being equal, prefer ephemeral ECDH over other key
 1474|       |     * exchange mechanisms.
 1475|       |     * For consistency, prefer ECDSA over RSA (though this only matters if the
 1476|       |     * server has both certificates, and is using the DEFAULT, or a client
 1477|       |     * preference).
 1478|       |     */
 1479|  3.61k|    ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |   85|  3.61k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  114|  3.61k|#define SSL_aECDSA 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  144|  3.61k|#define CIPHER_ADD 1
  ------------------
 1480|  3.61k|        -1, &head, &tail);
 1481|  3.61k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |   85|  3.61k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |  144|  3.61k|#define CIPHER_ADD 1
  ------------------
 1482|  3.61k|        &tail);
 1483|  3.61k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |   85|  3.61k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |  146|  3.61k|#define CIPHER_DEL 3
  ------------------
 1484|  3.61k|        &tail);
 1485|       |
 1486|       |    /* Within each strength group, we prefer GCM over CHACHA... */
 1487|  3.61k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  155|  3.61k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  142|  3.61k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  143|  3.61k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  144|  3.61k|#define CIPHER_ADD 1
  ------------------
 1488|  3.61k|        &head, &tail);
 1489|  3.61k|    ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  159|  3.61k|#define SSL_CHACHA20 (SSL_CHACHA20POLY1305)
  |  |  ------------------
  |  |  |  |  149|  3.61k|#define SSL_CHACHA20POLY1305 0x00080000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  144|  3.61k|#define CIPHER_ADD 1
  ------------------
 1490|  3.61k|        &head, &tail);
 1491|       |
 1492|       |    /*
 1493|       |     * ...and generally, our preferred cipher is AES.
 1494|       |     * Note that AEADs will be bumped to take preference after sorting by
 1495|       |     * strength.
 1496|       |     */
 1497|  3.61k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  157|  3.61k|#define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  136|  3.61k|#define SSL_AES128 0x00000040U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  137|  3.61k|#define SSL_AES256 0x00000080U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  155|  3.61k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  142|  3.61k|#define SSL_AES128GCM 0x00001000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  143|  3.61k|#define SSL_AES256GCM 0x00002000U
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  156|  3.61k|#define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  3.61k|#define SSL_AES128CCM 0x00004000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  145|  3.61k|#define SSL_AES256CCM 0x00008000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  3.61k|#define SSL_AES128CCM8 0x00010000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  3.61k|#define SSL_AES256CCM8 0x00020000U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  155|  3.61k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  142|  3.61k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  143|  3.61k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  144|  3.61k|#define CIPHER_ADD 1
  ------------------
 1498|  3.61k|        -1, &head, &tail);
 1499|       |
 1500|       |    /* Temporarily enable everything else for sorting */
 1501|  3.61k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head, &tail);
  ------------------
  |  |  144|  3.61k|#define CIPHER_ADD 1
  ------------------
 1502|       |
 1503|       |    /* Low priority for MD5 */
 1504|  3.61k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  168|  3.61k|#define SSL_MD5 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  3.61k|#define CIPHER_ORD 4
  ------------------
 1505|  3.61k|        &tail);
 1506|       |
 1507|       |    /*
 1508|       |     * Move anonymous ciphers to the end.  Usually, these will remain
 1509|       |     * disabled. (For applications that allow them, they aren't too bad, but
 1510|       |     * we prefer authenticated ciphers.)
 1511|       |     */
 1512|  3.61k|    ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  112|  3.61k|#define SSL_aNULL 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  3.61k|#define CIPHER_ORD 4
  ------------------
 1513|  3.61k|        &tail);
 1514|       |
 1515|  3.61k|    ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   81|  3.61k|#define SSL_kRSA 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  3.61k|#define CIPHER_ORD 4
  ------------------
 1516|  3.61k|        &tail);
 1517|  3.61k|    ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   87|  3.61k|#define SSL_kPSK 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  3.61k|#define CIPHER_ORD 4
  ------------------
 1518|  3.61k|        &tail);
 1519|       |
 1520|       |    /* RC4 is sort-of broken -- move to the end */
 1521|  3.61k|    ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  132|  3.61k|#define SSL_RC4 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  3.61k|#define CIPHER_ORD 4
  ------------------
 1522|  3.61k|        &tail);
 1523|       |
 1524|       |    /*
 1525|       |     * Now sort by symmetric encryption strength.  The above ordering remains
 1526|       |     * in force within each class
 1527|       |     */
 1528|  3.61k|    if (!ssl_cipher_strength_sort(&head, &tail)) {
  ------------------
  |  Branch (1528:9): [True: 0, False: 3.61k]
  ------------------
 1529|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1530|      0|        return NULL;
 1531|      0|    }
 1532|       |
 1533|       |    /*
 1534|       |     * Partially overrule strength sort to prefer TLS 1.2 ciphers/PRFs.
 1535|       |     */
 1536|  3.61k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |   26|  3.61k|#define TLS1_2_VERSION 0x0303
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  153|  3.61k|#define CIPHER_BUMP 6
  ------------------
 1537|  3.61k|        &head, &tail);
 1538|       |
 1539|       |    /*
 1540|       |     * Irrespective of strength, enforce the following order:
 1541|       |     * (EC)DHE + AEAD > (EC)DHE > rest of AEAD > rest.
 1542|       |     * Within each group, ciphers remain sorted by strength and previous
 1543|       |     * preference, i.e.,
 1544|       |     * 1) ECDHE > DHE
 1545|       |     * 2) GCM > CHACHA
 1546|       |     * 3) AES > rest
 1547|       |     * 4) TLS 1.2 > legacy
 1548|       |     *
 1549|       |     * Because we now bump ciphers to the top of the list, we proceed in
 1550|       |     * reverse order of preference.
 1551|       |     */
 1552|  3.61k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  175|  3.61k|#define SSL_AEAD 0x00000040U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  153|  3.61k|#define CIPHER_BUMP 6
  ------------------
 1553|  3.61k|        &head, &tail);
 1554|  3.61k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   83|  3.61k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   85|  3.61k|#define SSL_kECDHE 0x00000004U
  ------------------
 1555|  3.61k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  153|  3.61k|#define CIPHER_BUMP 6
  ------------------
 1556|  3.61k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   83|  3.61k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   85|  3.61k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |  175|  3.61k|#define SSL_AEAD 0x00000040U
  ------------------
 1557|  3.61k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  153|  3.61k|#define CIPHER_BUMP 6
  ------------------
 1558|       |
 1559|       |    /* Now disable everything (maintaining the ordering!) */
 1560|  3.61k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head, &tail);
  ------------------
  |  |  146|  3.61k|#define CIPHER_DEL 3
  ------------------
 1561|       |
 1562|       |    /*
 1563|       |     * We also need cipher aliases for selecting based on the rule_str.
 1564|       |     * There might be two types of entries in the rule_str: 1) names
 1565|       |     * of ciphers themselves 2) aliases for groups of ciphers.
 1566|       |     * For 1) we need the available ciphers and for 2) the cipher
 1567|       |     * groups of cipher_aliases added together in one list (otherwise
 1568|       |     * we would be happy with just the cipher_aliases table).
 1569|       |     */
 1570|  3.61k|    num_of_group_aliases = OSSL_NELEM(cipher_aliases);
  ------------------
  |  |   14|  3.61k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1571|  3.61k|    num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1;
 1572|  3.61k|    ca_list = OPENSSL_malloc_array(num_of_alias_max, sizeof(*ca_list));
  ------------------
  |  |  110|  3.61k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1573|  3.61k|    if (ca_list == NULL) {
  ------------------
  |  Branch (1573:9): [True: 0, False: 3.61k]
  ------------------
 1574|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1575|      0|        return NULL; /* Failure */
 1576|      0|    }
 1577|  3.61k|    ssl_cipher_collect_aliases(ca_list, num_of_group_aliases,
 1578|  3.61k|        disabled_mkey, disabled_auth, disabled_enc,
 1579|  3.61k|        disabled_mac, head);
 1580|       |
 1581|       |    /*
 1582|       |     * If the rule_string begins with DEFAULT, apply the default rule
 1583|       |     * before using the (possibly available) additional rules.
 1584|       |     */
 1585|  3.61k|    ok = 1;
 1586|  3.61k|    rule_p = rule_str;
 1587|  3.61k|    if (HAS_PREFIX(rule_str, "DEFAULT")) {
  ------------------
  |  |   58|  3.61k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 25, False: 3.59k]
  |  |  ------------------
  ------------------
 1588|     25|        ok = ssl_cipher_process_rulestr(OSSL_default_cipher_list(),
 1589|     25|            &head, &tail, ca_list, c);
 1590|     25|        rule_p += 7;
 1591|     25|        if (*rule_p == ':')
  ------------------
  |  Branch (1591:13): [True: 1, False: 24]
  ------------------
 1592|      1|            rule_p++;
 1593|     25|    }
 1594|       |
 1595|  3.61k|    if (ok && (rule_p[0] != '\0'))
  ------------------
  |  Branch (1595:9): [True: 3.61k, False: 0]
  |  Branch (1595:15): [True: 3.61k, False: 2]
  ------------------
 1596|  3.61k|        ok = ssl_cipher_process_rulestr(rule_p, &head, &tail, ca_list, c);
 1597|       |
 1598|  3.61k|    OPENSSL_free(ca_list); /* Not needed anymore */
  ------------------
  |  |  131|  3.61k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1599|       |
 1600|  3.61k|    if (!ok) { /* Rule processing failure */
  ------------------
  |  Branch (1600:9): [True: 282, False: 3.33k]
  ------------------
 1601|    282|        OPENSSL_free(co_list);
  ------------------
  |  |  131|    282|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1602|    282|        return NULL;
 1603|    282|    }
 1604|       |
 1605|       |    /*
 1606|       |     * Allocate new "cipherstack" for the result, return with error
 1607|       |     * if we cannot get one.
 1608|       |     */
 1609|  3.33k|    if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL) {
  ------------------
  |  | 1008|  3.33k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (1609:9): [True: 0, False: 3.33k]
  ------------------
 1610|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1611|      0|        return NULL;
 1612|      0|    }
 1613|       |
 1614|       |    /* Add TLSv1.3 ciphers first - we always prefer those if possible */
 1615|  13.3k|    for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++) {
  ------------------
  |  | 1005|  13.3k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1615:17): [True: 10.0k, False: 3.33k]
  ------------------
 1616|  10.0k|        const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
  ------------------
  |  | 1006|  10.0k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 1617|       |
 1618|       |        /* Don't include any TLSv1.3 ciphers that are disabled */
 1619|  10.0k|        if ((sslc->algorithm_enc & disabled_enc) != 0
  ------------------
  |  Branch (1619:13): [True: 237, False: 9.77k]
  ------------------
 1620|  9.77k|            || (ssl_cipher_table_mac[sslc->algorithm2
  ------------------
  |  Branch (1620:16): [True: 0, False: 9.77k]
  ------------------
 1621|  9.77k|                    & SSL_HANDSHAKE_MAC_MASK]
  ------------------
  |  |  208|  9.77k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
 1622|  9.77k|                       .mask
 1623|  9.77k|                   & ctx->disabled_mac_mask)
 1624|  9.77k|                != 0) {
 1625|    237|            sk_SSL_CIPHER_delete(tls13_ciphersuites, i);
  ------------------
  |  | 1013|    237|#define sk_SSL_CIPHER_delete(sk, i) ((const SSL_CIPHER *)OPENSSL_sk_delete(ossl_check_SSL_CIPHER_sk_type(sk), (i)))
  ------------------
 1626|    237|            i--;
 1627|    237|            continue;
 1628|    237|        }
 1629|       |
 1630|  9.77k|        if (!sk_SSL_CIPHER_push(cipherstack, sslc)) {
  ------------------
  |  | 1015|  9.77k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1630:13): [True: 0, False: 9.77k]
  ------------------
 1631|      0|            OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1632|      0|            sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1633|      0|            return NULL;
 1634|      0|        }
 1635|  9.77k|    }
 1636|       |
 1637|  3.33k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  221|  3.33k|    do {                           \
  |  |  222|  3.33k|        BIO *trc_out = NULL;       \
  |  |  223|  3.33k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 3.33k]
  |  |  ------------------
  ------------------
 1638|      0|    {
 1639|      0|        BIO_printf(trc_out, "cipher selection:\n");
 1640|      0|    }
 1641|       |    /*
 1642|       |     * The cipher selection for the list is done. The ciphers are added
 1643|       |     * to the resulting precedence to the STACK_OF(SSL_CIPHER).
 1644|       |     */
 1645|   242k|    for (curr = head; curr != NULL; curr = curr->next) {
  ------------------
  |  Branch (1645:23): [True: 239k, False: 3.33k]
  ------------------
 1646|   239k|        if (curr->active) {
  ------------------
  |  Branch (1646:13): [True: 165k, False: 74.0k]
  ------------------
 1647|   165k|            if (!sk_SSL_CIPHER_push(cipherstack, curr->cipher)) {
  ------------------
  |  | 1015|   165k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1647:17): [True: 0, False: 165k]
  ------------------
 1648|      0|                OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1649|      0|                sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1650|      0|                OSSL_TRACE_CANCEL(TLS_CIPHER);
  ------------------
  |  |  230|      0|    ((void)0)
  ------------------
 1651|      0|                return NULL;
 1652|      0|            }
 1653|   165k|            if (trc_out != NULL)
  ------------------
  |  Branch (1653:17): [True: 0, False: 165k]
  ------------------
 1654|      0|                BIO_printf(trc_out, "<%s>\n", curr->cipher->name);
 1655|   165k|        }
 1656|   239k|    }
 1657|  3.33k|    OPENSSL_free(co_list); /* Not needed any longer */
  ------------------
  |  |  131|  3.33k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1658|  3.33k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  226|  3.33k|    }                            \
  |  |  227|  3.33k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 3.33k]
  |  |  ------------------
  ------------------
 1659|       |
 1660|  3.33k|    if (!update_cipher_list_by_id(cipher_list_by_id, cipherstack)) {
  ------------------
  |  Branch (1660:9): [True: 0, False: 3.33k]
  ------------------
 1661|      0|        sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1662|      0|        return NULL;
 1663|      0|    }
 1664|  3.33k|    sk_SSL_CIPHER_free(*cipher_list);
  ------------------
  |  | 1011|  3.33k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1665|  3.33k|    *cipher_list = cipherstack;
 1666|       |
 1667|  3.33k|    return cipherstack;
 1668|  3.33k|}
SSL_COMP_get_compression_methods:
 1978|  2.70k|{
 1979|  2.70k|    STACK_OF(SSL_COMP) **rv;
  ------------------
  |  |   33|  2.70k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1980|       |
 1981|  2.70k|    rv = (STACK_OF(SSL_COMP) **)OSSL_LIB_CTX_get_data(NULL,
 1982|  2.70k|        OSSL_LIB_CTX_COMP_METHODS);
  ------------------
  |  |  119|  2.70k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
 1983|  2.70k|    if (rv != NULL)
  ------------------
  |  Branch (1983:9): [True: 2.70k, False: 0]
  ------------------
 1984|  2.70k|        return *rv;
 1985|      0|    else
 1986|      0|        return NULL;
 1987|  2.70k|}
ssl_get_cipher_by_char:
 2083|     41|{
 2084|     41|    const SSL_CIPHER *c = SSL_CONNECTION_GET_SSL(s)->method->get_cipher_by_char(ptr);
  ------------------
  |  |   27|     41|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2085|       |
 2086|     41|    if (c == NULL || (!all && c->valid == 0))
  ------------------
  |  Branch (2086:9): [True: 12, False: 29]
  |  Branch (2086:23): [True: 29, False: 0]
  |  Branch (2086:31): [True: 1, False: 28]
  ------------------
 2087|     13|        return NULL;
 2088|     28|    return c;
 2089|     41|}
ssl_get_md_idx:
 2135|  8.11k|{
 2136|  8.11k|    int i;
 2137|       |
 2138|   121k|    for (i = 0; i < SSL_MD_NUM_IDX; i++) {
  ------------------
  |  |  203|   121k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  201|   121k|#define SSL_MAX_DIGEST 14
  |  |  ------------------
  ------------------
  |  Branch (2138:17): [True: 113k, False: 8.11k]
  ------------------
 2139|   113k|        if (md_nid == ssl_cipher_table_mac[i].nid)
  ------------------
  |  Branch (2139:13): [True: 0, False: 113k]
  ------------------
 2140|      0|            return i;
 2141|   113k|    }
 2142|  8.11k|    return -1;
 2143|  8.11k|}
ssl_cert_is_disabled:
 2217|  69.5k|{
 2218|  69.5k|    const SSL_CERT_LOOKUP *cl;
 2219|       |
 2220|       |    /* A provider-loaded key type is always enabled */
 2221|  69.5k|    if (idx >= SSL_PKEY_NUM)
  ------------------
  |  |  328|  69.5k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2221:9): [True: 5.38k, False: 64.2k]
  ------------------
 2222|  5.38k|        return 0;
 2223|       |
 2224|  64.2k|    cl = ssl_cert_lookup_by_idx(idx, ctx);
 2225|  64.2k|    if (cl == NULL || (cl->amask & ctx->disabled_auth_mask) != 0)
  ------------------
  |  Branch (2225:9): [True: 0, False: 64.2k]
  |  Branch (2225:23): [True: 0, False: 64.2k]
  ------------------
 2226|      0|        return 1;
 2227|  64.2k|    return 0;
 2228|  64.2k|}
OSSL_default_cipher_list:
 2236|  2.80k|{
 2237|  2.80k|    return "ALL:!COMPLEMENTOFDEFAULT:!eNULL";
 2238|  2.80k|}
OSSL_default_ciphersuites:
 2246|  2.78k|{
 2247|  2.78k|    return "TLS_AES_256_GCM_SHA384:"
 2248|  2.78k|           "TLS_CHACHA20_POLY1305_SHA256:"
 2249|  2.78k|           "TLS_AES_128_GCM_SHA256";
 2250|  2.78k|}
ssl_ciph.c:get_optional_pkey_id:
  303|  19.4k|{
  304|  19.4k|    const EVP_PKEY_ASN1_METHOD *ameth;
  305|  19.4k|    ENGINE *tmpeng = NULL;
  306|  19.4k|    int pkey_id = 0;
  307|  19.4k|    ameth = EVP_PKEY_asn1_find_str(&tmpeng, pkey_name, -1);
  308|  19.4k|    if (ameth) {
  ------------------
  |  Branch (308:9): [True: 0, False: 19.4k]
  ------------------
  309|      0|        if (EVP_PKEY_asn1_get0_info(&pkey_id, NULL, NULL, NULL, NULL,
  ------------------
  |  Branch (309:13): [True: 0, False: 0]
  ------------------
  310|      0|                ameth)
  311|      0|            <= 0)
  312|      0|            pkey_id = 0;
  313|      0|    }
  314|  19.4k|    tls_engine_finish(tmpeng);
  315|  19.4k|    return pkey_id;
  316|  19.4k|}
ssl_ciph.c:set_ciphersuites:
 1301|  2.93k|{
 1302|  2.93k|    STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  |   33|  2.93k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1008|  2.93k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_new_null())
  ------------------
 1303|       |
 1304|  2.93k|    if (newciphers == NULL)
  ------------------
  |  Branch (1304:9): [True: 0, False: 2.93k]
  ------------------
 1305|      0|        return 0;
 1306|       |
 1307|       |    /* Parse the list. We explicitly allow an empty list */
 1308|  2.93k|    if (*str != '\0'
  ------------------
  |  Branch (1308:9): [True: 2.89k, False: 43]
  ------------------
 1309|  2.89k|        && (CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers) <= 0
  ------------------
  |  Branch (1309:13): [True: 0, False: 2.89k]
  ------------------
 1310|  2.89k|            || sk_SSL_CIPHER_num(newciphers) == 0)) {
  ------------------
  |  | 1005|  2.89k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1310:16): [True: 83, False: 2.80k]
  ------------------
 1311|     83|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
  ------------------
  |  |  404|     83|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     83|    (ERR_new(),                                                  \
  |  |  |  |  407|     83|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     83|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     83|        ERR_set_error)
  |  |  ------------------
  ------------------
 1312|     83|        sk_SSL_CIPHER_free(newciphers);
  ------------------
  |  | 1011|     83|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1313|     83|        return 0;
 1314|     83|    }
 1315|  2.85k|    sk_SSL_CIPHER_free(*currciphers);
  ------------------
  |  | 1011|  2.85k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1316|  2.85k|    *currciphers = newciphers;
 1317|       |
 1318|  2.85k|    return 1;
 1319|  2.93k|}
ssl_ciph.c:ciphersuite_cb:
 1274|  13.9k|{
 1275|  13.9k|    STACK_OF(SSL_CIPHER) *ciphersuites = (STACK_OF(SSL_CIPHER) *)arg;
  ------------------
  |  |   33|  13.9k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1276|  13.9k|    const SSL_CIPHER *cipher;
 1277|       |    /* Arbitrary sized temp buffer for the cipher name. Should be big enough */
 1278|  13.9k|    char name[80];
 1279|       |
 1280|  13.9k|    if (len > (int)(sizeof(name) - 1))
  ------------------
  |  Branch (1280:9): [True: 22, False: 13.8k]
  ------------------
 1281|       |        /* Anyway return 1 so we can parse rest of the list */
 1282|     22|        return 1;
 1283|       |
 1284|  13.8k|    memcpy(name, elem, len);
 1285|  13.8k|    name[len] = '\0';
 1286|       |
 1287|  13.8k|    cipher = ssl3_get_cipher_by_std_name(name);
 1288|  13.8k|    if (cipher == NULL)
  ------------------
  |  Branch (1288:9): [True: 5.44k, False: 8.43k]
  ------------------
 1289|       |        /* Ciphersuite not found but return 1 to parse rest of the list */
 1290|  5.44k|        return 1;
 1291|       |
 1292|  8.43k|    if (!sk_SSL_CIPHER_push(ciphersuites, cipher)) {
  ------------------
  |  | 1015|  8.43k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1292:9): [True: 0, False: 8.43k]
  ------------------
 1293|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1294|      0|        return 0;
 1295|      0|    }
 1296|       |
 1297|  8.43k|    return 1;
 1298|  8.43k|}
ssl_ciph.c:update_cipher_list:
 1343|     67|{
 1344|     67|    int i;
 1345|     67|    STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(*cipher_list);
  ------------------
  |  |   33|     67|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(*cipher_list);
  ------------------
  |  | 1027|     67|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 1346|       |
 1347|     67|    if (tmp_cipher_list == NULL)
  ------------------
  |  Branch (1347:9): [True: 0, False: 67]
  ------------------
 1348|      0|        return 0;
 1349|       |
 1350|       |    /*
 1351|       |     * Delete any existing TLSv1.3 ciphersuites. These are always first in the
 1352|       |     * list.
 1353|       |     */
 1354|    268|    while (sk_SSL_CIPHER_num(tmp_cipher_list) > 0
  ------------------
  |  | 1005|    268|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1354:12): [True: 268, False: 0]
  ------------------
 1355|    268|        && sk_SSL_CIPHER_value(tmp_cipher_list, 0)->min_tls
  ------------------
  |  | 1006|    268|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  |  Branch (1355:12): [True: 201, False: 67]
  ------------------
 1356|    268|            == TLS1_3_VERSION)
  ------------------
  |  |   27|    268|#define TLS1_3_VERSION 0x0304
  ------------------
 1357|    201|        (void)sk_SSL_CIPHER_delete(tmp_cipher_list, 0);
  ------------------
  |  | 1013|    268|#define sk_SSL_CIPHER_delete(sk, i) ((const SSL_CIPHER *)OPENSSL_sk_delete(ossl_check_SSL_CIPHER_sk_type(sk), (i)))
  ------------------
 1358|       |
 1359|       |    /* Insert the new TLSv1.3 ciphersuites */
 1360|    152|    for (i = sk_SSL_CIPHER_num(tls13_ciphersuites) - 1; i >= 0; i--) {
  ------------------
  |  | 1005|     67|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1360:57): [True: 85, False: 67]
  ------------------
 1361|     85|        const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
  ------------------
  |  | 1006|     85|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 1362|       |
 1363|       |        /* Don't include any TLSv1.3 ciphersuites that are disabled */
 1364|     85|        if ((sslc->algorithm_enc & ctx->disabled_enc_mask) == 0
  ------------------
  |  Branch (1364:13): [True: 82, False: 3]
  ------------------
 1365|     82|            && (ssl_cipher_table_mac[sslc->algorithm2
  ------------------
  |  Branch (1365:16): [True: 82, False: 0]
  ------------------
 1366|     82|                    & SSL_HANDSHAKE_MAC_MASK]
  ------------------
  |  |  208|     82|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
 1367|     82|                       .mask
 1368|     82|                   & ctx->disabled_mac_mask)
 1369|     82|                == 0) {
 1370|     82|            sk_SSL_CIPHER_unshift(tmp_cipher_list, sslc);
  ------------------
  |  | 1016|     82|#define sk_SSL_CIPHER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 1371|     82|        }
 1372|     85|    }
 1373|       |
 1374|     67|    if (!update_cipher_list_by_id(cipher_list_by_id, tmp_cipher_list)) {
  ------------------
  |  Branch (1374:9): [True: 0, False: 67]
  ------------------
 1375|      0|        sk_SSL_CIPHER_free(tmp_cipher_list);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1376|      0|        return 0;
 1377|      0|    }
 1378|       |
 1379|     67|    sk_SSL_CIPHER_free(*cipher_list);
  ------------------
  |  | 1011|     67|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1380|     67|    *cipher_list = tmp_cipher_list;
 1381|       |
 1382|     67|    return 1;
 1383|     67|}
ssl_ciph.c:check_suiteb_cipher_list:
 1227|  3.61k|{
 1228|  3.61k|    unsigned int suiteb_flags = 0, suiteb_comb2 = 0;
 1229|  3.61k|    if (HAS_PREFIX(*prule_str, "SUITEB128ONLY")) {
  ------------------
  |  |   58|  3.61k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 2, False: 3.61k]
  |  |  ------------------
  ------------------
 1230|      2|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS_ONLY;
  ------------------
  |  |  558|      2|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
 1231|  3.61k|    } else if (HAS_PREFIX(*prule_str, "SUITEB128C2")) {
  ------------------
  |  |   58|  3.61k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 3.61k]
  |  |  ------------------
  ------------------
 1232|      1|        suiteb_comb2 = 1;
 1233|      1|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  562|      1|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1234|  3.61k|    } else if (HAS_PREFIX(*prule_str, "SUITEB128")) {
  ------------------
  |  |   58|  3.61k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 27, False: 3.58k]
  |  |  ------------------
  ------------------
 1235|     27|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  562|     27|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1236|  3.58k|    } else if (HAS_PREFIX(*prule_str, "SUITEB192")) {
  ------------------
  |  |   58|  3.58k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 4, False: 3.58k]
  |  |  ------------------
  ------------------
 1237|      4|        suiteb_flags = SSL_CERT_FLAG_SUITEB_192_LOS;
  ------------------
  |  |  560|      4|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
 1238|      4|    }
 1239|       |
 1240|  3.61k|    if (suiteb_flags) {
  ------------------
  |  Branch (1240:9): [True: 34, False: 3.58k]
  ------------------
 1241|     34|        c->cert_flags &= ~SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  562|     34|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1242|     34|        c->cert_flags |= suiteb_flags;
 1243|  3.58k|    } else {
 1244|  3.58k|        suiteb_flags = c->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  562|  3.58k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1245|  3.58k|    }
 1246|       |
 1247|  3.61k|    if (!suiteb_flags)
  ------------------
  |  Branch (1247:9): [True: 3.58k, False: 34]
  ------------------
 1248|  3.58k|        return 1;
 1249|       |    /* Check version: if TLS 1.2 ciphers allowed we can use Suite B */
 1250|       |
 1251|     34|    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS)) {
  ------------------
  |  | 2195|     34|#define SSL_ENC_FLAG_TLS1_2_CIPHERS 0x10
  ------------------
  |  Branch (1251:9): [True: 0, False: 34]
  ------------------
 1252|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1253|      0|        return 0;
 1254|      0|    }
 1255|       |
 1256|     34|    switch (suiteb_flags) {
  ------------------
  |  Branch (1256:13): [True: 34, False: 0]
  ------------------
 1257|     28|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  562|     28|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (1257:5): [True: 28, False: 6]
  ------------------
 1258|     28|        if (suiteb_comb2)
  ------------------
  |  Branch (1258:13): [True: 1, False: 27]
  ------------------
 1259|      1|            *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1260|     27|        else
 1261|     27|            *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384";
 1262|     28|        break;
 1263|      2|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  558|      2|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (1263:5): [True: 2, False: 32]
  ------------------
 1264|      2|        *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256";
 1265|      2|        break;
 1266|      4|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  560|      4|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (1266:5): [True: 4, False: 30]
  ------------------
 1267|      4|        *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1268|      4|        break;
 1269|     34|    }
 1270|     34|    return 1;
 1271|     34|}
ssl_ciph.c:ssl_cipher_collect_ciphers:
  659|  3.61k|{
  660|  3.61k|    int i, co_list_num;
  661|  3.61k|    const SSL_CIPHER *c;
  662|       |
  663|       |    /*
  664|       |     * We have num_of_ciphers descriptions compiled in, depending on the
  665|       |     * method selected (SSLv3, TLSv1 etc).
  666|       |     * These will later be sorted in a linked list with at most num
  667|       |     * entries.
  668|       |     */
  669|       |
  670|       |    /* Get the initial list of ciphers */
  671|  3.61k|    co_list_num = 0; /* actual count of ciphers */
  672|   694k|    for (i = 0; i < num_of_ciphers; i++) {
  ------------------
  |  Branch (672:17): [True: 691k, False: 3.61k]
  ------------------
  673|   691k|        c = ssl_method->get_cipher(i);
  674|       |        /* drop those that use any of that is not available */
  675|   691k|        if (c == NULL || !c->valid)
  ------------------
  |  Branch (675:13): [True: 0, False: 691k]
  |  Branch (675:26): [True: 0, False: 691k]
  ------------------
  676|      0|            continue;
  677|   691k|        if ((c->algorithm_mkey & disabled_mkey) || (c->algorithm_auth & disabled_auth) || (c->algorithm_enc & disabled_enc) || (c->algorithm_mac & disabled_mac))
  ------------------
  |  Branch (677:13): [True: 34.4k, False: 656k]
  |  Branch (677:52): [True: 237, False: 656k]
  |  Branch (677:91): [True: 57.6k, False: 598k]
  |  Branch (677:128): [True: 711, False: 598k]
  ------------------
  678|  92.9k|            continue;
  679|   598k|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) == 0) && c->min_tls == 0)
  ------------------
  |  | 2190|   598k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (679:13): [True: 598k, False: 0]
  |  Branch (679:77): [True: 0, False: 598k]
  ------------------
  680|      0|            continue;
  681|   598k|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) != 0) && c->min_dtls == 0)
  ------------------
  |  | 2190|   598k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (681:13): [True: 0, False: 598k]
  |  Branch (681:77): [True: 0, False: 0]
  ------------------
  682|      0|            continue;
  683|       |
  684|   598k|        co_list[co_list_num].cipher = c;
  685|   598k|        co_list[co_list_num].next = NULL;
  686|   598k|        co_list[co_list_num].prev = NULL;
  687|   598k|        co_list[co_list_num].active = 0;
  688|   598k|        co_list_num++;
  689|   598k|    }
  690|       |
  691|       |    /*
  692|       |     * Prepare linked list from list entries
  693|       |     */
  694|  3.61k|    if (co_list_num > 0) {
  ------------------
  |  Branch (694:9): [True: 3.54k, False: 79]
  ------------------
  695|  3.54k|        co_list[0].prev = NULL;
  696|       |
  697|  3.54k|        if (co_list_num > 1) {
  ------------------
  |  Branch (697:13): [True: 3.54k, False: 0]
  ------------------
  698|  3.54k|            co_list[0].next = &co_list[1];
  699|       |
  700|   594k|            for (i = 1; i < co_list_num - 1; i++) {
  ------------------
  |  Branch (700:25): [True: 591k, False: 3.54k]
  ------------------
  701|   591k|                co_list[i].prev = &co_list[i - 1];
  702|   591k|                co_list[i].next = &co_list[i + 1];
  703|   591k|            }
  704|       |
  705|  3.54k|            co_list[co_list_num - 1].prev = &co_list[co_list_num - 2];
  706|  3.54k|        }
  707|       |
  708|  3.54k|        co_list[co_list_num - 1].next = NULL;
  709|       |
  710|  3.54k|        *head_p = &co_list[0];
  711|  3.54k|        *tail_p = &co_list[co_list_num - 1];
  712|  3.54k|    }
  713|  3.61k|}
ssl_ciph.c:ssl_cipher_apply_rule:
  783|  90.0k|{
  784|  90.0k|    CIPHER_ORDER *head, *tail, *curr, *next, *last;
  785|  90.0k|    const SSL_CIPHER *cp;
  786|  90.0k|    int reverse = 0;
  787|       |
  788|  90.0k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  221|  90.0k|    do {                           \
  |  |  222|  90.0k|        BIO *trc_out = NULL;       \
  |  |  223|  90.0k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 90.0k]
  |  |  ------------------
  ------------------
  789|      0|    {
  790|      0|        BIO_printf(trc_out,
  791|      0|            "Applying rule %d with %08x/%08x/%08x/%08x/%08x %08x (%d)\n",
  792|      0|            rule, (unsigned int)alg_mkey, (unsigned int)alg_auth,
  793|      0|            (unsigned int)alg_enc, (unsigned int)alg_mac, min_tls,
  794|      0|            (unsigned int)algo_strength, (int)strength_bits);
  795|      0|    }
  796|       |
  797|  90.0k|    if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  146|   180k|#define CIPHER_DEL 3
  ------------------
                  if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  153|  82.7k|#define CIPHER_BUMP 6
  ------------------
  |  Branch (797:9): [True: 7.33k, False: 82.7k]
  |  Branch (797:31): [True: 14.4k, False: 68.2k]
  ------------------
  798|  21.8k|        reverse = 1; /* needed to maintain sorting between currently
  799|       |                      * deleted ciphers */
  800|       |
  801|  90.0k|    head = *head_p;
  802|  90.0k|    tail = *tail_p;
  803|       |
  804|  90.0k|    if (reverse) {
  ------------------
  |  Branch (804:9): [True: 21.8k, False: 68.2k]
  ------------------
  805|  21.8k|        next = tail;
  806|  21.8k|        last = head;
  807|  68.2k|    } else {
  808|  68.2k|        next = head;
  809|  68.2k|        last = tail;
  810|  68.2k|    }
  811|       |
  812|  90.0k|    curr = NULL;
  813|  14.6M|    for (;;) {
  814|  14.6M|        if (curr == last)
  ------------------
  |  Branch (814:13): [True: 90.0k, False: 14.5M]
  ------------------
  815|  90.0k|            break;
  816|       |
  817|  14.5M|        curr = next;
  818|       |
  819|  14.5M|        if (curr == NULL)
  ------------------
  |  Branch (819:13): [True: 0, False: 14.5M]
  ------------------
  820|      0|            break;
  821|       |
  822|  14.5M|        next = reverse ? curr->prev : curr->next;
  ------------------
  |  Branch (822:16): [True: 3.60M, False: 10.9M]
  ------------------
  823|       |
  824|  14.5M|        cp = curr->cipher;
  825|       |
  826|       |        /*
  827|       |         * Selection criteria is either the value of strength_bits
  828|       |         * or the algorithms used.
  829|       |         */
  830|  14.5M|        if (strength_bits >= 0) {
  ------------------
  |  Branch (830:13): [True: 3.06M, False: 11.5M]
  ------------------
  831|  3.06M|            if (strength_bits != cp->strength_bits)
  ------------------
  |  Branch (831:17): [True: 2.44M, False: 618k]
  ------------------
  832|  2.44M|                continue;
  833|  11.5M|        } else {
  834|  11.5M|            if (trc_out != NULL) {
  ------------------
  |  Branch (834:17): [True: 0, False: 11.5M]
  ------------------
  835|      0|                BIO_printf(trc_out,
  836|      0|                    "\nName: %s:"
  837|      0|                    "\nAlgo = %08x/%08x/%08x/%08x/%08x Algo_strength = %08x\n",
  838|      0|                    cp->name,
  839|      0|                    (unsigned int)cp->algorithm_mkey,
  840|      0|                    (unsigned int)cp->algorithm_auth,
  841|      0|                    (unsigned int)cp->algorithm_enc,
  842|      0|                    (unsigned int)cp->algorithm_mac,
  843|      0|                    cp->min_tls,
  844|      0|                    (unsigned int)cp->algo_strength);
  845|      0|            }
  846|  11.5M|            if (cipher_id != 0 && (cipher_id != cp->id))
  ------------------
  |  Branch (846:17): [True: 19.2k, False: 11.4M]
  |  Branch (846:35): [True: 19.1k, False: 111]
  ------------------
  847|  19.1k|                continue;
  848|  11.4M|            if (alg_mkey && !(alg_mkey & cp->algorithm_mkey))
  ------------------
  |  Branch (848:17): [True: 4.24M, False: 7.24M]
  |  Branch (848:29): [True: 3.19M, False: 1.05M]
  ------------------
  849|  3.19M|                continue;
  850|  8.29M|            if (alg_auth && !(alg_auth & cp->algorithm_auth))
  ------------------
  |  Branch (850:17): [True: 750k, False: 7.54M]
  |  Branch (850:29): [True: 631k, False: 118k]
  ------------------
  851|   631k|                continue;
  852|  7.66M|            if (alg_enc && !(alg_enc & cp->algorithm_enc))
  ------------------
  |  Branch (852:17): [True: 3.11M, False: 4.54M]
  |  Branch (852:28): [True: 2.29M, False: 825k]
  ------------------
  853|  2.29M|                continue;
  854|  5.37M|            if (alg_mac && !(alg_mac & cp->algorithm_mac))
  ------------------
  |  Branch (854:17): [True: 1.49M, False: 3.87M]
  |  Branch (854:28): [True: 1.16M, False: 330k]
  ------------------
  855|  1.16M|                continue;
  856|  4.20M|            if (min_tls && (min_tls != cp->min_tls))
  ------------------
  |  Branch (856:17): [True: 604k, False: 3.60M]
  |  Branch (856:28): [True: 297k, False: 307k]
  ------------------
  857|   297k|                continue;
  858|  3.90M|            if ((algo_strength & SSL_STRONG_MASK)
  ------------------
  |  |  241|  3.90M|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (858:17): [True: 9.90k, False: 3.89M]
  ------------------
  859|  9.90k|                && !(algo_strength & SSL_STRONG_MASK & cp->algo_strength))
  ------------------
  |  |  241|  9.90k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (859:20): [True: 5.01k, False: 4.89k]
  ------------------
  860|  5.01k|                continue;
  861|  3.90M|            if ((algo_strength & SSL_DEFAULT_MASK)
  ------------------
  |  |  242|  3.90M|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (861:17): [True: 466k, False: 3.43M]
  ------------------
  862|   466k|                && !(algo_strength & SSL_DEFAULT_MASK & cp->algo_strength))
  ------------------
  |  |  242|   466k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (862:20): [True: 206k, False: 259k]
  ------------------
  863|   206k|                continue;
  864|  3.90M|        }
  865|       |
  866|  4.31M|        if (trc_out != NULL)
  ------------------
  |  Branch (866:13): [True: 0, False: 4.31M]
  ------------------
  867|      0|            BIO_printf(trc_out, "Action = %d\n", rule);
  868|       |
  869|       |        /* add the cipher if it has not been added yet. */
  870|  4.31M|        if (rule == CIPHER_ADD) {
  ------------------
  |  |  144|  4.31M|#define CIPHER_ADD 1
  ------------------
  |  Branch (870:13): [True: 1.56M, False: 2.75M]
  ------------------
  871|       |            /* reverse == 0 */
  872|  1.56M|            if (!curr->active) {
  ------------------
  |  Branch (872:17): [True: 1.15M, False: 406k]
  ------------------
  873|  1.15M|                ll_append_tail(&head, curr, &tail);
  874|  1.15M|                curr->active = 1;
  875|  1.15M|            }
  876|  1.56M|        }
  877|       |        /* Move the added cipher to this location */
  878|  2.75M|        else if (rule == CIPHER_ORD) {
  ------------------
  |  |  147|  2.75M|#define CIPHER_ORD 4
  ------------------
  |  Branch (878:18): [True: 815k, False: 1.93M]
  ------------------
  879|       |            /* reverse == 0 */
  880|   815k|            if (curr->active) {
  ------------------
  |  Branch (880:17): [True: 808k, False: 7.38k]
  ------------------
  881|   808k|                ll_append_tail(&head, curr, &tail);
  882|   808k|            }
  883|  1.93M|        } else if (rule == CIPHER_DEL) {
  ------------------
  |  |  146|  1.93M|#define CIPHER_DEL 3
  ------------------
  |  Branch (883:20): [True: 721k, False: 1.21M]
  ------------------
  884|       |            /* reverse == 1 */
  885|   721k|            if (curr->active) {
  ------------------
  |  Branch (885:17): [True: 720k, False: 1.57k]
  ------------------
  886|       |                /*
  887|       |                 * most recently deleted ciphersuites get best positions for
  888|       |                 * any future CIPHER_ADD (note that the CIPHER_DEL loop works
  889|       |                 * in reverse to maintain the order)
  890|       |                 */
  891|   720k|                ll_append_head(&head, curr, &tail);
  892|   720k|                curr->active = 0;
  893|   720k|            }
  894|  1.21M|        } else if (rule == CIPHER_BUMP) {
  ------------------
  |  |  153|  1.21M|#define CIPHER_BUMP 6
  ------------------
  |  Branch (894:20): [True: 892k, False: 321k]
  ------------------
  895|   892k|            if (curr->active)
  ------------------
  |  Branch (895:17): [True: 892k, False: 0]
  ------------------
  896|   892k|                ll_append_head(&head, curr, &tail);
  897|   892k|        } else if (rule == CIPHER_KILL) {
  ------------------
  |  |  145|   321k|#define CIPHER_KILL 2
  ------------------
  |  Branch (897:20): [True: 321k, False: 0]
  ------------------
  898|       |            /* reverse == 0 */
  899|   321k|            if (head == curr)
  ------------------
  |  Branch (899:17): [True: 54.0k, False: 267k]
  ------------------
  900|  54.0k|                head = curr->next;
  901|   267k|            else
  902|   267k|                curr->prev->next = curr->next;
  903|   321k|            if (tail == curr)
  ------------------
  |  Branch (903:17): [True: 2.87k, False: 319k]
  ------------------
  904|  2.87k|                tail = curr->prev;
  905|   321k|            curr->active = 0;
  906|   321k|            if (curr->next != NULL)
  ------------------
  |  Branch (906:17): [True: 319k, False: 2.87k]
  ------------------
  907|   319k|                curr->next->prev = curr->prev;
  908|   321k|            if (curr->prev != NULL)
  ------------------
  |  Branch (908:17): [True: 267k, False: 54.0k]
  ------------------
  909|   267k|                curr->prev->next = curr->next;
  910|   321k|            curr->next = NULL;
  911|   321k|            curr->prev = NULL;
  912|   321k|        }
  913|  4.31M|    }
  914|       |
  915|  90.0k|    *head_p = head;
  916|  90.0k|    *tail_p = tail;
  917|       |
  918|  90.0k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  226|  90.0k|    }                            \
  |  |  227|  90.0k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 90.0k]
  |  |  ------------------
  ------------------
  919|  90.0k|}
ssl_ciph.c:ll_append_tail:
  618|  1.96M|{
  619|  1.96M|    if (curr == *tail)
  ------------------
  |  Branch (619:9): [True: 3.61k, False: 1.96M]
  ------------------
  620|  3.61k|        return;
  621|  1.96M|    if (curr == *head)
  ------------------
  |  Branch (621:9): [True: 605k, False: 1.35M]
  ------------------
  622|   605k|        *head = curr->next;
  623|  1.96M|    if (curr->prev != NULL)
  ------------------
  |  Branch (623:9): [True: 1.35M, False: 605k]
  ------------------
  624|  1.35M|        curr->prev->next = curr->next;
  625|  1.96M|    if (curr->next != NULL)
  ------------------
  |  Branch (625:9): [True: 1.96M, False: 0]
  ------------------
  626|  1.96M|        curr->next->prev = curr->prev;
  627|  1.96M|    (*tail)->next = curr;
  628|  1.96M|    curr->prev = *tail;
  629|       |    curr->next = NULL;
  630|  1.96M|    *tail = curr;
  631|  1.96M|}
ssl_ciph.c:ll_append_head:
  635|  1.61M|{
  636|  1.61M|    if (curr == *head)
  ------------------
  |  Branch (636:9): [True: 12, False: 1.61M]
  ------------------
  637|     12|        return;
  638|  1.61M|    if (curr == *tail)
  ------------------
  |  Branch (638:9): [True: 719k, False: 892k]
  ------------------
  639|   719k|        *tail = curr->prev;
  640|  1.61M|    if (curr->next != NULL)
  ------------------
  |  Branch (640:9): [True: 892k, False: 719k]
  ------------------
  641|   892k|        curr->next->prev = curr->prev;
  642|  1.61M|    if (curr->prev != NULL)
  ------------------
  |  Branch (642:9): [True: 1.61M, False: 0]
  ------------------
  643|  1.61M|        curr->prev->next = curr->next;
  644|  1.61M|    (*head)->prev = curr;
  645|  1.61M|    curr->next = *head;
  646|       |    curr->prev = NULL;
  647|  1.61M|    *head = curr;
  648|  1.61M|}
ssl_ciph.c:ssl_cipher_strength_sort:
  923|  4.11k|{
  924|  4.11k|    int32_t max_strength_bits;
  925|  4.11k|    int i, *number_uses;
  926|  4.11k|    CIPHER_ORDER *curr;
  927|       |
  928|       |    /*
  929|       |     * This routine sorts the ciphers with descending strength. The sorting
  930|       |     * must keep the pre-sorted sequence, so we apply the normal sorting
  931|       |     * routine as '+' movement to the end of the list.
  932|       |     */
  933|  4.11k|    max_strength_bits = 0;
  934|  4.11k|    curr = *head_p;
  935|   655k|    while (curr != NULL) {
  ------------------
  |  Branch (935:12): [True: 651k, False: 4.11k]
  ------------------
  936|   651k|        if (curr->active && (curr->cipher->strength_bits > max_strength_bits))
  ------------------
  |  Branch (936:13): [True: 612k, False: 39.1k]
  |  Branch (936:29): [True: 3.78k, False: 608k]
  ------------------
  937|  3.78k|            max_strength_bits = curr->cipher->strength_bits;
  938|   651k|        curr = curr->next;
  939|   651k|    }
  940|       |
  941|  4.11k|    number_uses = OPENSSL_calloc(max_strength_bits + 1, sizeof(int));
  ------------------
  |  |  112|  4.11k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  942|  4.11k|    if (number_uses == NULL)
  ------------------
  |  Branch (942:9): [True: 0, False: 4.11k]
  ------------------
  943|      0|        return 0;
  944|       |
  945|       |    /*
  946|       |     * Now find the strength_bits values actually used
  947|       |     */
  948|  4.11k|    curr = *head_p;
  949|   655k|    while (curr != NULL) {
  ------------------
  |  Branch (949:12): [True: 651k, False: 4.11k]
  ------------------
  950|   651k|        if (curr->active)
  ------------------
  |  Branch (950:13): [True: 612k, False: 39.1k]
  ------------------
  951|   612k|            number_uses[curr->cipher->strength_bits]++;
  952|   651k|        curr = curr->next;
  953|   651k|    }
  954|       |    /*
  955|       |     * Go through the list of used strength_bits values in descending
  956|       |     * order.
  957|       |     */
  958|   974k|    for (i = max_strength_bits; i >= 0; i--)
  ------------------
  |  Branch (958:33): [True: 970k, False: 4.11k]
  ------------------
  959|   970k|        if (number_uses[i] > 0)
  ------------------
  |  Branch (959:13): [True: 18.3k, False: 952k]
  ------------------
  960|  18.3k|            ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ORD, i, head_p,
  ------------------
  |  |  147|  18.3k|#define CIPHER_ORD 4
  ------------------
  961|  18.3k|                tail_p);
  962|       |
  963|  4.11k|    OPENSSL_free(number_uses);
  ------------------
  |  |  131|  4.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  964|  4.11k|    return 1;
  965|  4.11k|}
ssl_ciph.c:ssl_cipher_collect_aliases:
  722|  3.61k|{
  723|  3.61k|    CIPHER_ORDER *ciph_curr;
  724|  3.61k|    const SSL_CIPHER **ca_curr;
  725|  3.61k|    int i;
  726|  3.61k|    uint32_t mask_mkey = ~disabled_mkey;
  727|  3.61k|    uint32_t mask_auth = ~disabled_auth;
  728|  3.61k|    uint32_t mask_enc = ~disabled_enc;
  729|  3.61k|    uint32_t mask_mac = ~disabled_mac;
  730|       |
  731|       |    /*
  732|       |     * First, add the real ciphers as already collected
  733|       |     */
  734|  3.61k|    ciph_curr = head;
  735|  3.61k|    ca_curr = ca_list;
  736|   601k|    while (ciph_curr != NULL) {
  ------------------
  |  Branch (736:12): [True: 598k, False: 3.61k]
  ------------------
  737|   598k|        *ca_curr = ciph_curr->cipher;
  738|   598k|        ca_curr++;
  739|   598k|        ciph_curr = ciph_curr->next;
  740|   598k|    }
  741|       |
  742|       |    /*
  743|       |     * Now we add the available ones from the cipher_aliases[] table.
  744|       |     * They represent either one or more algorithms, some of which
  745|       |     * in any affected category must be supported (set in enabled_mask),
  746|       |     * or represent a cipher strength value (will be added in any case because algorithms=0).
  747|       |     */
  748|   289k|    for (i = 0; i < num_of_group_aliases; i++) {
  ------------------
  |  Branch (748:17): [True: 285k, False: 3.61k]
  ------------------
  749|   285k|        uint32_t algorithm_mkey = cipher_aliases[i].algorithm_mkey;
  750|   285k|        uint32_t algorithm_auth = cipher_aliases[i].algorithm_auth;
  751|   285k|        uint32_t algorithm_enc = cipher_aliases[i].algorithm_enc;
  752|   285k|        uint32_t algorithm_mac = cipher_aliases[i].algorithm_mac;
  753|       |
  754|   285k|        if (algorithm_mkey)
  ------------------
  |  Branch (754:13): [True: 90.4k, False: 195k]
  ------------------
  755|  90.4k|            if ((algorithm_mkey & mask_mkey) == 0)
  ------------------
  |  Branch (755:17): [True: 8.50k, False: 81.9k]
  ------------------
  756|  8.50k|                continue;
  757|       |
  758|   277k|        if (algorithm_auth)
  ------------------
  |  Branch (758:13): [True: 71.7k, False: 205k]
  ------------------
  759|  71.7k|            if ((algorithm_auth & mask_auth) == 0)
  ------------------
  |  Branch (759:17): [True: 11.1k, False: 60.5k]
  ------------------
  760|  11.1k|                continue;
  761|       |
  762|   266k|        if (algorithm_enc)
  ------------------
  |  Branch (762:13): [True: 104k, False: 161k]
  ------------------
  763|   104k|            if ((algorithm_enc & mask_enc) == 0)
  ------------------
  |  Branch (763:17): [True: 22.9k, False: 81.8k]
  ------------------
  764|  22.9k|                continue;
  765|       |
  766|   243k|        if (algorithm_mac)
  ------------------
  |  Branch (766:13): [True: 36.0k, False: 207k]
  ------------------
  767|  36.0k|            if ((algorithm_mac & mask_mac) == 0)
  ------------------
  |  Branch (767:17): [True: 11.2k, False: 24.7k]
  ------------------
  768|  11.2k|                continue;
  769|       |
  770|   231k|        *ca_curr = (SSL_CIPHER *)(cipher_aliases + i);
  771|   231k|        ca_curr++;
  772|   231k|    }
  773|       |
  774|       |    *ca_curr = NULL; /* end of list */
  775|  3.61k|}
ssl_ciph.c:ssl_cipher_process_rulestr:
  971|  3.64k|{
  972|  3.64k|    uint32_t alg_mkey, alg_auth, alg_enc, alg_mac, algo_strength;
  973|  3.64k|    int min_tls;
  974|  3.64k|    const char *l, *buf;
  975|  3.64k|    int j, multi, found, rule, retval, ok, buflen;
  976|  3.64k|    uint32_t cipher_id = 0;
  977|  3.64k|    char ch;
  978|       |
  979|  3.64k|    retval = 1;
  980|  3.64k|    l = rule_str;
  981|  35.4k|    for (;;) {
  982|  35.4k|        ch = *l;
  983|       |
  984|  35.4k|        if (ch == '\0')
  ------------------
  |  Branch (984:13): [True: 89, False: 35.4k]
  ------------------
  985|     89|            break; /* done */
  986|  35.4k|        if (ch == '-') {
  ------------------
  |  Branch (986:13): [True: 266, False: 35.1k]
  ------------------
  987|    266|            rule = CIPHER_DEL;
  ------------------
  |  |  146|    266|#define CIPHER_DEL 3
  ------------------
  988|    266|            l++;
  989|  35.1k|        } else if (ch == '+') {
  ------------------
  |  Branch (989:20): [True: 113, False: 35.0k]
  ------------------
  990|    113|            rule = CIPHER_ORD;
  ------------------
  |  |  147|    113|#define CIPHER_ORD 4
  ------------------
  991|    113|            l++;
  992|  35.0k|        } else if (ch == '!') {
  ------------------
  |  Branch (992:20): [True: 6.54k, False: 28.4k]
  ------------------
  993|  6.54k|            rule = CIPHER_KILL;
  ------------------
  |  |  145|  6.54k|#define CIPHER_KILL 2
  ------------------
  994|  6.54k|            l++;
  995|  28.4k|        } else if (ch == '@') {
  ------------------
  |  Branch (995:20): [True: 1.94k, False: 26.5k]
  ------------------
  996|  1.94k|            rule = CIPHER_SPECIAL;
  ------------------
  |  |  148|  1.94k|#define CIPHER_SPECIAL 5
  ------------------
  997|  1.94k|            l++;
  998|  26.5k|        } else {
  999|  26.5k|            rule = CIPHER_ADD;
  ------------------
  |  |  144|  26.5k|#define CIPHER_ADD 1
  ------------------
 1000|  26.5k|        }
 1001|       |
 1002|  35.4k|        if (ITEM_SEP(ch)) {
  ------------------
  |  |  614|  35.4k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (614:6): [True: 8.54k, False: 26.8k]
  |  |  |  Branch (614:22): [True: 4.09k, False: 22.7k]
  |  |  |  Branch (614:38): [True: 1.64k, False: 21.1k]
  |  |  |  Branch (614:54): [True: 3.47k, False: 17.6k]
  |  |  ------------------
  ------------------
 1003|  17.7k|            l++;
 1004|  17.7k|            continue;
 1005|  17.7k|        }
 1006|       |
 1007|  17.6k|        alg_mkey = 0;
 1008|  17.6k|        alg_auth = 0;
 1009|  17.6k|        alg_enc = 0;
 1010|  17.6k|        alg_mac = 0;
 1011|  17.6k|        min_tls = 0;
 1012|  17.6k|        algo_strength = 0;
 1013|       |
 1014|  17.8k|        for (;;) {
 1015|  17.8k|            ch = *l;
 1016|  17.8k|            buf = l;
 1017|  17.8k|            buflen = 0;
 1018|  17.8k|#ifndef CHARSET_EBCDIC
 1019|   137k|            while (((ch >= 'A') && (ch <= 'Z')) || ((ch >= '0') && (ch <= '9')) || ((ch >= 'a') && (ch <= 'z')) || (ch == '-') || (ch == '_') || (ch == '.') || (ch == '='))
  ------------------
  |  Branch (1019:21): [True: 112k, False: 25.0k]
  |  Branch (1019:36): [True: 105k, False: 7.22k]
  |  Branch (1019:53): [True: 20.2k, False: 12.0k]
  |  Branch (1019:68): [True: 3.87k, False: 16.3k]
  |  Branch (1019:85): [True: 5.95k, False: 22.4k]
  |  Branch (1019:100): [True: 5.79k, False: 160]
  |  Branch (1019:116): [True: 1.11k, False: 21.5k]
  |  Branch (1019:131): [True: 1.20k, False: 20.3k]
  |  Branch (1019:146): [True: 1.10k, False: 19.2k]
  |  Branch (1019:161): [True: 1.39k, False: 17.8k]
  ------------------
 1020|       |#else
 1021|       |            while (isalnum((unsigned char)ch) || (ch == '-') || (ch == '_') || (ch == '.')
 1022|       |                || (ch == '='))
 1023|       |#endif
 1024|   120k|            {
 1025|   120k|                ch = *(++l);
 1026|   120k|                buflen++;
 1027|   120k|            }
 1028|       |
 1029|  17.8k|            if (buflen == 0) {
  ------------------
  |  Branch (1029:17): [True: 147, False: 17.6k]
  ------------------
 1030|       |                /*
 1031|       |                 * We hit something we cannot deal with,
 1032|       |                 * it is no command or separator nor
 1033|       |                 * alphanumeric, so we call this an error.
 1034|       |                 */
 1035|    147|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  404|    147|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|    147|    (ERR_new(),                                                  \
  |  |  |  |  407|    147|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    147|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|    147|        ERR_set_error)
  |  |  ------------------
  ------------------
 1036|    147|                return 0;
 1037|    147|            }
 1038|       |
 1039|  17.6k|            if (rule == CIPHER_SPECIAL) {
  ------------------
  |  |  148|  17.6k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (1039:17): [True: 1.93k, False: 15.7k]
  ------------------
 1040|  1.93k|                found = 0; /* unused -- avoid compiler warning */
 1041|  1.93k|                break; /* special treatment */
 1042|  1.93k|            }
 1043|       |
 1044|       |            /* check for multi-part specification */
 1045|  15.7k|            if (ch == '+') {
  ------------------
  |  Branch (1045:17): [True: 267, False: 15.4k]
  ------------------
 1046|    267|                multi = 1;
 1047|    267|                l++;
 1048|  15.4k|            } else {
 1049|  15.4k|                multi = 0;
 1050|  15.4k|            }
 1051|       |
 1052|       |            /*
 1053|       |             * Now search for the cipher alias in the ca_list. Be careful
 1054|       |             * with the strncmp, because the "buflen" limitation
 1055|       |             * will make the rule "ADH:SOME" and the cipher
 1056|       |             * "ADH-MY-CIPHER" look like a match for buflen=3.
 1057|       |             * So additionally check whether the cipher name found
 1058|       |             * has the correct length. We can save a strlen() call:
 1059|       |             * just checking for the '\0' at the right place is
 1060|       |             * sufficient, we have to strncmp() anyway. (We cannot
 1061|       |             * use strcmp(), because buf is not '\0' terminated.)
 1062|       |             */
 1063|  15.7k|            j = found = 0;
 1064|  15.7k|            cipher_id = 0;
 1065|  3.12M|            while (ca_list[j]) {
  ------------------
  |  Branch (1065:20): [True: 3.12M, False: 5.36k]
  ------------------
 1066|  3.12M|                if (strncmp(buf, ca_list[j]->name, buflen) == 0
  ------------------
  |  Branch (1066:21): [True: 54.6k, False: 3.06M]
  ------------------
 1067|  54.6k|                    && (ca_list[j]->name[buflen] == '\0')) {
  ------------------
  |  Branch (1067:24): [True: 10.3k, False: 44.2k]
  ------------------
 1068|  10.3k|                    found = 1;
 1069|  10.3k|                    break;
 1070|  3.11M|                } else if (ca_list[j]->stdname != NULL
  ------------------
  |  Branch (1070:28): [True: 2.60M, False: 509k]
  ------------------
 1071|  2.60M|                    && strncmp(buf, ca_list[j]->stdname, buflen) == 0
  ------------------
  |  Branch (1071:24): [True: 19.0k, False: 2.58M]
  ------------------
 1072|  19.0k|                    && ca_list[j]->stdname[buflen] == '\0') {
  ------------------
  |  Branch (1072:24): [True: 31, False: 19.0k]
  ------------------
 1073|     31|                    found = 1;
 1074|     31|                    break;
 1075|     31|                } else
 1076|  3.11M|                    j++;
 1077|  3.12M|            }
 1078|       |
 1079|  15.7k|            if (!found)
  ------------------
  |  Branch (1079:17): [True: 5.36k, False: 10.3k]
  ------------------
 1080|  5.36k|                break; /* ignore this entry */
 1081|       |
 1082|  10.3k|            if (ca_list[j]->algorithm_mkey) {
  ------------------
  |  Branch (1082:17): [True: 671, False: 9.70k]
  ------------------
 1083|    671|                if (alg_mkey) {
  ------------------
  |  Branch (1083:21): [True: 39, False: 632]
  ------------------
 1084|     39|                    alg_mkey &= ca_list[j]->algorithm_mkey;
 1085|     39|                    if (!alg_mkey) {
  ------------------
  |  Branch (1085:25): [True: 10, False: 29]
  ------------------
 1086|     10|                        found = 0;
 1087|     10|                        break;
 1088|     10|                    }
 1089|    632|                } else {
 1090|    632|                    alg_mkey = ca_list[j]->algorithm_mkey;
 1091|    632|                }
 1092|    671|            }
 1093|       |
 1094|  10.3k|            if (ca_list[j]->algorithm_auth) {
  ------------------
  |  Branch (1094:17): [True: 531, False: 9.83k]
  ------------------
 1095|    531|                if (alg_auth) {
  ------------------
  |  Branch (1095:21): [True: 33, False: 498]
  ------------------
 1096|     33|                    alg_auth &= ca_list[j]->algorithm_auth;
 1097|     33|                    if (!alg_auth) {
  ------------------
  |  Branch (1097:25): [True: 12, False: 21]
  ------------------
 1098|     12|                        found = 0;
 1099|     12|                        break;
 1100|     12|                    }
 1101|    498|                } else {
 1102|    498|                    alg_auth = ca_list[j]->algorithm_auth;
 1103|    498|                }
 1104|    531|            }
 1105|       |
 1106|  10.3k|            if (ca_list[j]->algorithm_enc) {
  ------------------
  |  Branch (1106:17): [True: 6.31k, False: 4.04k]
  ------------------
 1107|  6.31k|                if (alg_enc) {
  ------------------
  |  Branch (1107:21): [True: 26, False: 6.28k]
  ------------------
 1108|     26|                    alg_enc &= ca_list[j]->algorithm_enc;
 1109|     26|                    if (!alg_enc) {
  ------------------
  |  Branch (1109:25): [True: 10, False: 16]
  ------------------
 1110|     10|                        found = 0;
 1111|     10|                        break;
 1112|     10|                    }
 1113|  6.28k|                } else {
 1114|  6.28k|                    alg_enc = ca_list[j]->algorithm_enc;
 1115|  6.28k|                }
 1116|  6.31k|            }
 1117|       |
 1118|  10.3k|            if (ca_list[j]->algorithm_mac) {
  ------------------
  |  Branch (1118:17): [True: 502, False: 9.84k]
  ------------------
 1119|    502|                if (alg_mac) {
  ------------------
  |  Branch (1119:21): [True: 18, False: 484]
  ------------------
 1120|     18|                    alg_mac &= ca_list[j]->algorithm_mac;
 1121|     18|                    if (!alg_mac) {
  ------------------
  |  Branch (1121:25): [True: 11, False: 7]
  ------------------
 1122|     11|                        found = 0;
 1123|     11|                        break;
 1124|     11|                    }
 1125|    484|                } else {
 1126|    484|                    alg_mac = ca_list[j]->algorithm_mac;
 1127|    484|                }
 1128|    502|            }
 1129|       |
 1130|  10.3k|            if (ca_list[j]->algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  241|  10.3k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1130:17): [True: 258, False: 10.0k]
  ------------------
 1131|    258|                if (algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  241|    258|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1131:21): [True: 31, False: 227]
  ------------------
 1132|     31|                    algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  241|     31|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  241|     31|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1133|     31|                    if (!(algo_strength & SSL_STRONG_MASK)) {
  ------------------
  |  |  241|     31|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1133:25): [True: 15, False: 16]
  ------------------
 1134|     15|                        found = 0;
 1135|     15|                        break;
 1136|     15|                    }
 1137|    227|                } else {
 1138|    227|                    algo_strength = ca_list[j]->algo_strength & SSL_STRONG_MASK;
  ------------------
  |  |  241|    227|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1139|    227|                }
 1140|    258|            }
 1141|       |
 1142|  10.3k|            if (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  242|  10.3k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1142:17): [True: 2.89k, False: 7.42k]
  ------------------
 1143|  2.89k|                if (algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  242|  2.89k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1143:21): [True: 6, False: 2.89k]
  ------------------
 1144|      6|                    algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  242|      6|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  242|      6|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1145|      6|                    if (!(algo_strength & SSL_DEFAULT_MASK)) {
  ------------------
  |  |  242|      6|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1145:25): [True: 0, False: 6]
  ------------------
 1146|      0|                        found = 0;
 1147|      0|                        break;
 1148|      0|                    }
 1149|  2.89k|                } else {
 1150|  2.89k|                    algo_strength |= ca_list[j]->algo_strength & SSL_DEFAULT_MASK;
  ------------------
  |  |  242|  2.89k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1151|  2.89k|                }
 1152|  2.89k|            }
 1153|       |
 1154|  10.3k|            if (ca_list[j]->valid) {
  ------------------
  |  Branch (1154:17): [True: 133, False: 10.1k]
  ------------------
 1155|       |                /*
 1156|       |                 * explicit ciphersuite found; its protocol version does not
 1157|       |                 * become part of the search pattern!
 1158|       |                 */
 1159|       |
 1160|    133|                cipher_id = ca_list[j]->id;
 1161|  10.1k|            } else {
 1162|       |                /*
 1163|       |                 * not an explicit ciphersuite; only in this case, the
 1164|       |                 * protocol version is considered part of the search pattern
 1165|       |                 */
 1166|       |
 1167|  10.1k|                if (ca_list[j]->min_tls) {
  ------------------
  |  Branch (1167:21): [True: 83, False: 10.1k]
  ------------------
 1168|     83|                    if (min_tls != 0 && min_tls != ca_list[j]->min_tls) {
  ------------------
  |  Branch (1168:25): [True: 20, False: 63]
  |  Branch (1168:41): [True: 10, False: 10]
  ------------------
 1169|     10|                        found = 0;
 1170|     10|                        break;
 1171|     73|                    } else {
 1172|     73|                        min_tls = ca_list[j]->min_tls;
 1173|     73|                    }
 1174|     83|                }
 1175|  10.1k|            }
 1176|       |
 1177|  10.3k|            if (!multi)
  ------------------
  |  Branch (1177:17): [True: 10.1k, False: 169]
  ------------------
 1178|  10.1k|                break;
 1179|  10.3k|        }
 1180|       |
 1181|       |        /*
 1182|       |         * Ok, we have the rule, now apply it
 1183|       |         */
 1184|  17.5k|        if (rule == CIPHER_SPECIAL) { /* special command */
  ------------------
  |  |  148|  17.5k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (1184:13): [True: 1.93k, False: 15.5k]
  ------------------
 1185|  1.93k|            ok = 0;
 1186|  1.93k|            if ((buflen == 8) && HAS_PREFIX(buf, "STRENGTH")) {
  ------------------
  |  |   58|    674|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 493, False: 181]
  |  |  ------------------
  ------------------
  |  Branch (1186:17): [True: 674, False: 1.26k]
  ------------------
 1187|    493|                ok = ssl_cipher_strength_sort(head_p, tail_p);
 1188|  1.44k|            } else if (buflen == 10 && CHECK_AND_SKIP_PREFIX(buf, "SECLEVEL=")) {
  ------------------
  |  |   61|    220|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|    220|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 104, False: 116]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 104, False: 116]
  |  |  ------------------
  ------------------
  |  Branch (1188:24): [True: 220, False: 1.22k]
  ------------------
 1189|    104|                int level = *buf - '0';
 1190|    104|                if (level < 0 || level > 5) {
  ------------------
  |  Branch (1190:21): [True: 10, False: 94]
  |  Branch (1190:34): [True: 11, False: 83]
  ------------------
 1191|     21|                    ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  404|     21|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     21|    (ERR_new(),                                                  \
  |  |  |  |  407|     21|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     21|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     21|        ERR_set_error)
  |  |  ------------------
  ------------------
 1192|     83|                } else {
 1193|     83|                    c->sec_level = level;
 1194|     83|                    ok = 1;
 1195|     83|                }
 1196|  1.34k|            } else {
 1197|  1.34k|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  404|  1.34k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|  1.34k|    (ERR_new(),                                                  \
  |  |  |  |  407|  1.34k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  1.34k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|  1.34k|        ERR_set_error)
  |  |  ------------------
  ------------------
 1198|  1.34k|            }
 1199|  1.93k|            if (ok == 0)
  ------------------
  |  Branch (1199:17): [True: 1.36k, False: 576]
  ------------------
 1200|  1.36k|                retval = 0;
 1201|       |            /*
 1202|       |             * We do not support any "multi" options
 1203|       |             * together with "@", so throw away the
 1204|       |             * rest of the command, if any left, until
 1205|       |             * end or ':' is found.
 1206|       |             */
 1207|  8.40k|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  614|  8.32k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (614:6): [True: 289, False: 8.03k]
  |  |  |  Branch (614:22): [True: 1.05k, False: 6.97k]
  |  |  |  Branch (614:38): [True: 176, False: 6.79k]
  |  |  |  Branch (614:54): [True: 327, False: 6.47k]
  |  |  ------------------
  ------------------
  |  Branch (1207:20): [True: 8.32k, False: 89]
  ------------------
 1208|  6.47k|                l++;
 1209|  15.5k|        } else if (found) {
  ------------------
  |  Branch (1209:20): [True: 10.1k, False: 5.42k]
  ------------------
 1210|  10.1k|            ssl_cipher_apply_rule(cipher_id,
 1211|  10.1k|                alg_mkey, alg_auth, alg_enc, alg_mac,
 1212|  10.1k|                min_tls, algo_strength, rule, -1, head_p,
 1213|  10.1k|                tail_p);
 1214|  10.1k|        } else {
 1215|  21.1k|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  614|  20.7k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (614:6): [True: 1.25k, False: 19.4k]
  |  |  |  Branch (614:22): [True: 1.21k, False: 18.2k]
  |  |  |  Branch (614:38): [True: 807, False: 17.4k]
  |  |  |  Branch (614:54): [True: 1.74k, False: 15.7k]
  |  |  ------------------
  ------------------
  |  Branch (1215:20): [True: 20.7k, False: 407]
  ------------------
 1216|  15.7k|                l++;
 1217|  5.42k|        }
 1218|  17.5k|        if (*l == '\0')
  ------------------
  |  Branch (1218:13): [True: 3.40k, False: 14.0k]
  ------------------
 1219|  3.40k|            break; /* done */
 1220|  17.5k|    }
 1221|       |
 1222|  3.49k|    return retval;
 1223|  3.64k|}
ssl_ciph.c:update_cipher_list_by_id:
 1323|  3.40k|{
 1324|  3.40k|    STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  |   33|  3.40k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  | 1027|  3.40k|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 1325|       |
 1326|  3.40k|    if (tmp_cipher_list == NULL) {
  ------------------
  |  Branch (1326:9): [True: 0, False: 3.40k]
  ------------------
 1327|      0|        return 0;
 1328|      0|    }
 1329|       |
 1330|  3.40k|    sk_SSL_CIPHER_free(*cipher_list_by_id);
  ------------------
  |  | 1011|  3.40k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1331|  3.40k|    *cipher_list_by_id = tmp_cipher_list;
 1332|       |
 1333|  3.40k|    (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id, ssl_cipher_ptr_id_cmp);
  ------------------
  |  | 1029|  3.40k|#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)))
  ------------------
 1334|  3.40k|    sk_SSL_CIPHER_sort(*cipher_list_by_id);
  ------------------
  |  | 1025|  3.40k|#define sk_SSL_CIPHER_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1335|       |
 1336|  3.40k|    return 1;
 1337|  3.40k|}

SSL_CONF_CTX_free:
 1115|  2.70k|{
 1116|  2.70k|    if (cctx) {
  ------------------
  |  Branch (1116:9): [True: 0, False: 2.70k]
  ------------------
 1117|      0|        free_cert_filename(cctx);
 1118|      0|        OPENSSL_free(cctx->prefix);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1121|      0|    }
 1122|  2.70k|}

OPENSSL_init_ssl:
   47|  4.73k|{
   48|  4.73k|    static int stoperrset = 0;
   49|       |
   50|  4.73k|    if (stopped) {
  ------------------
  |  Branch (50:9): [True: 0, False: 4.73k]
  ------------------
   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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   59|      0|        }
   60|      0|        return 0;
   61|      0|    }
   62|       |
   63|  4.73k|    opts |= OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  506|  4.73k|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
   64|  4.73k|        | OPENSSL_INIT_ADD_ALL_DIGESTS;
  ------------------
  |  |  507|  4.73k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
   65|  4.73k|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
   66|  4.73k|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG) == 0)
  ------------------
  |  |  511|  4.73k|#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
  ------------------
  |  Branch (66:9): [True: 4.73k, False: 0]
  ------------------
   67|  4.73k|        opts |= OPENSSL_INIT_LOAD_CONFIG;
  ------------------
  |  |  510|  4.73k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
   68|  4.73k|#endif
   69|       |
   70|  4.73k|    if (!OPENSSL_init_crypto(opts, settings))
  ------------------
  |  Branch (70:9): [True: 0, False: 4.73k]
  ------------------
   71|      0|        return 0;
   72|       |
   73|  4.73k|    if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base))
  ------------------
  |  |  130|  4.73k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 4.73k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (73:9): [True: 0, False: 4.73k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|  4.73k|    return 1;
   77|  4.73k|}
ssl_init.c:ossl_init_ssl_base:
   25|      1|{
   26|      1|#ifndef OPENSSL_NO_COMP
   27|      1|    OSSL_TRACE(INIT, "ossl_init_ssl_base: "
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      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");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   37|      1|    ssl_base_inited = 1;
   38|      1|    return 1;
   39|      1|}

SSL_clear:
  568|  1.95k|{
  569|  1.95k|    if (s->method == NULL) {
  ------------------
  |  Branch (569:9): [True: 0, False: 1.95k]
  ------------------
  570|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_METHOD_SPECIFIED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  571|      0|        return 0;
  572|      0|    }
  573|       |
  574|  1.95k|    return s->method->ssl_reset(s);
  575|  1.95k|}
ossl_ssl_connection_reset:
  578|  3.91k|{
  579|  3.91k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  3.91k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  3.91k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.91k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.91k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  3.91k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.91k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.91k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.91k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  580|       |
  581|  3.91k|    if (sc == NULL)
  ------------------
  |  Branch (581:9): [True: 0, False: 3.91k]
  ------------------
  582|      0|        return 0;
  583|       |
  584|  3.91k|    if (ssl_clear_bad_session(sc)) {
  ------------------
  |  Branch (584:9): [True: 0, False: 3.91k]
  ------------------
  585|      0|        SSL_SESSION_free(sc->session);
  586|      0|        sc->session = NULL;
  587|      0|    }
  588|  3.91k|    SSL_SESSION_free(sc->psksession);
  589|  3.91k|    sc->psksession = NULL;
  590|  3.91k|    OPENSSL_free(sc->psksession_id);
  ------------------
  |  |  131|  3.91k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  591|  3.91k|    sc->psksession_id = NULL;
  592|  3.91k|    sc->psksession_id_len = 0;
  593|  3.91k|    sc->hello_retry_request = SSL_HRR_NONE;
  594|  3.91k|    sc->sent_tickets = 0;
  595|       |
  596|  3.91k|    sc->error = 0;
  597|  3.91k|    sc->hit = 0;
  598|  3.91k|    sc->shutdown = 0;
  599|       |
  600|  3.91k|    if (sc->renegotiate) {
  ------------------
  |  Branch (600:9): [True: 0, False: 3.91k]
  ------------------
  601|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  602|      0|        return 0;
  603|      0|    }
  604|       |
  605|  3.91k|    ossl_statem_clear(sc);
  606|       |
  607|  3.91k|    sc->version = s->method->version;
  608|  3.91k|    sc->client_version = sc->version;
  609|  3.91k|    sc->rwstate = SSL_NOTHING;
  ------------------
  |  |  932|  3.91k|#define SSL_NOTHING 1
  ------------------
  610|       |
  611|  3.91k|    BUF_MEM_free(sc->init_buf);
  612|  3.91k|    sc->init_buf = NULL;
  613|  3.91k|    sc->first_packet = 0;
  614|       |
  615|  3.91k|    sc->key_update = SSL_KEY_UPDATE_NONE;
  ------------------
  |  | 1048|  3.91k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  616|  3.91k|    memset(sc->ext.compress_certificate_from_peer, 0,
  617|  3.91k|        sizeof(sc->ext.compress_certificate_from_peer));
  618|  3.91k|    sc->ext.compress_certificate_sent = 0;
  619|       |
  620|  3.91k|    EVP_MD_CTX_free(sc->pha_dgst);
  621|  3.91k|    sc->pha_dgst = NULL;
  622|       |
  623|       |    /* Reset DANE verification result state */
  624|  3.91k|    sc->dane.mdpth = -1;
  625|  3.91k|    sc->dane.pdpth = -1;
  626|  3.91k|    X509_free(sc->dane.mcert);
  627|  3.91k|    sc->dane.mcert = NULL;
  628|  3.91k|    sc->dane.mtlsa = NULL;
  629|       |
  630|       |    /* Clear the verification result peername */
  631|  3.91k|    X509_VERIFY_PARAM_move_peername(sc->param, NULL);
  632|       |
  633|       |    /* Clear any shared connection state */
  634|  3.91k|    OPENSSL_free(sc->shared_sigalgs);
  ------------------
  |  |  131|  3.91k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  635|  3.91k|    sc->shared_sigalgs = NULL;
  636|  3.91k|    sc->shared_sigalgslen = 0;
  637|       |
  638|       |    /*
  639|       |     * Check to see if we were changed into a different method, if so, revert
  640|       |     * back.
  641|       |     */
  642|  3.91k|    if (s->method != s->defltmeth) {
  ------------------
  |  Branch (642:9): [True: 0, False: 3.91k]
  ------------------
  643|      0|        s->method->ssl_deinit(s);
  644|      0|        s->method = s->defltmeth;
  645|      0|        if (!s->method->ssl_init(s))
  ------------------
  |  Branch (645:13): [True: 0, False: 0]
  ------------------
  646|      0|            return 0;
  647|  3.91k|    } else {
  648|  3.91k|        if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (648:13): [True: 0, False: 3.91k]
  ------------------
  649|      0|            return 0;
  650|  3.91k|    }
  651|       |
  652|  3.91k|    ossl_quic_tls_clear(sc->qtls);
  653|       |
  654|  3.91k|    if (!RECORD_LAYER_reset(&sc->rlayer))
  ------------------
  |  Branch (654:9): [True: 0, False: 3.91k]
  ------------------
  655|      0|        return 0;
  656|       |
  657|  3.91k|    return 1;
  658|  3.91k|}
SSL_new:
  691|  1.95k|{
  692|  1.95k|    if (ctx == NULL) {
  ------------------
  |  Branch (692:9): [True: 0, False: 1.95k]
  ------------------
  693|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NULL_SSL_CTX);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  694|      0|        return NULL;
  695|      0|    }
  696|  1.95k|    if (ctx->method == NULL) {
  ------------------
  |  Branch (696:9): [True: 0, False: 1.95k]
  ------------------
  697|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  698|      0|        return NULL;
  699|      0|    }
  700|  1.95k|    return ctx->method->ssl_new(ctx);
  701|  1.95k|}
ossl_ssl_init:
  704|  1.95k|{
  705|  1.95k|    if (!SSL_CTX_up_ref(ctx))
  ------------------
  |  Branch (705:9): [True: 0, False: 1.95k]
  ------------------
  706|      0|        return 0;
  707|       |
  708|  1.95k|    ssl->lock = CRYPTO_THREAD_lock_new();
  709|       |
  710|  1.95k|    if (ssl->lock == NULL || !CRYPTO_NEW_REF(&ssl->references, 1))
  ------------------
  |  Branch (710:9): [True: 0, False: 1.95k]
  |  Branch (710:30): [True: 0, False: 1.95k]
  ------------------
  711|      0|        goto err;
  712|       |
  713|  1.95k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL, ssl, &ssl->ex_data)) {
  ------------------
  |  |  250|  1.95k|#define CRYPTO_EX_INDEX_SSL 0
  ------------------
  |  Branch (713:9): [True: 0, False: 1.95k]
  ------------------
  714|      0|        CRYPTO_FREE_REF(&ssl->references);
  715|      0|        goto err;
  716|      0|    }
  717|       |
  718|  1.95k|    ssl->ctx = ctx;
  719|  1.95k|    ssl->type = type;
  720|  1.95k|    ssl->defltmeth = ssl->method = method;
  721|       |
  722|  1.95k|    return 1;
  723|       |
  724|      0|err:
  725|      0|    CRYPTO_THREAD_lock_free(ssl->lock);
  726|       |    ssl->lock = NULL;
  727|      0|    SSL_CTX_free(ctx);
  728|      0|    return 0;
  729|  1.95k|}
ossl_ssl_connection_new_int:
  733|  1.95k|{
  734|  1.95k|    SSL_CONNECTION *s;
  735|  1.95k|    SSL *ssl;
  736|       |
  737|  1.95k|    s = OPENSSL_zalloc(sizeof(*s));
  ------------------
  |  |  108|  1.95k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  738|  1.95k|    if (s == NULL)
  ------------------
  |  Branch (738:9): [True: 0, False: 1.95k]
  ------------------
  739|      0|        return NULL;
  740|       |
  741|  1.95k|    ssl = &s->ssl;
  742|  1.95k|    s->user_ssl = (user_ssl == NULL) ? ssl : user_ssl;
  ------------------
  |  Branch (742:19): [True: 1.95k, False: 0]
  ------------------
  743|       |
  744|  1.95k|    if (!ossl_ssl_init(ssl, ctx, method, SSL_TYPE_SSL_CONNECTION)) {
  ------------------
  |  | 1223|  1.95k|#define SSL_TYPE_SSL_CONNECTION 0
  ------------------
  |  Branch (744:9): [True: 0, False: 1.95k]
  ------------------
  745|      0|        OPENSSL_free(s);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  746|      0|        s = NULL;
  747|      0|        ssl = NULL;
  748|      0|        goto sslerr;
  749|      0|    }
  750|       |
  751|  1.95k|    RECORD_LAYER_init(&s->rlayer, s);
  752|       |
  753|  1.95k|    s->options = ctx->options;
  754|       |
  755|  1.95k|    s->dane.flags = ctx->dane.flags;
  756|  1.95k|    if (method->version == ctx->method->version) {
  ------------------
  |  Branch (756:9): [True: 1.95k, False: 0]
  ------------------
  757|  1.95k|        s->min_proto_version = ctx->min_proto_version;
  758|  1.95k|        s->max_proto_version = ctx->max_proto_version;
  759|  1.95k|    }
  760|       |
  761|  1.95k|    s->mode = ctx->mode;
  762|  1.95k|    s->max_cert_list = ctx->max_cert_list;
  763|  1.95k|    s->max_early_data = ctx->max_early_data;
  764|  1.95k|    s->recv_max_early_data = ctx->recv_max_early_data;
  765|       |
  766|  1.95k|    s->num_tickets = ctx->num_tickets;
  767|  1.95k|    s->pha_enabled = ctx->pha_enabled;
  768|       |
  769|       |    /* Shallow copy of the ciphersuites stack */
  770|  1.95k|    s->tls13_ciphersuites = sk_SSL_CIPHER_dup(ctx->tls13_ciphersuites);
  ------------------
  |  | 1027|  1.95k|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
  771|  1.95k|    if (s->tls13_ciphersuites == NULL)
  ------------------
  |  Branch (771:9): [True: 0, False: 1.95k]
  ------------------
  772|      0|        goto cerr;
  773|       |
  774|       |    /*
  775|       |     * Earlier library versions used to copy the pointer to the CERT, not
  776|       |     * its contents; only when setting new parameters for the per-SSL
  777|       |     * copy, ssl_cert_new would be called (and the direct reference to
  778|       |     * the per-SSL_CTX settings would be lost, but those still were
  779|       |     * indirectly accessed for various purposes, and for that reason they
  780|       |     * used to be known as s->ctx->default_cert). Now we don't look at the
  781|       |     * SSL_CTX's CERT after having duplicated it once.
  782|       |     */
  783|  1.95k|    s->cert = ssl_cert_dup(ctx->cert);
  784|  1.95k|    if (s->cert == NULL)
  ------------------
  |  Branch (784:9): [True: 0, False: 1.95k]
  ------------------
  785|      0|        goto sslerr;
  786|       |
  787|  1.95k|    RECORD_LAYER_set_read_ahead(&s->rlayer, ctx->read_ahead);
  ------------------
  |  |  134|  1.95k|#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
  ------------------
  788|  1.95k|    s->msg_callback = ctx->msg_callback;
  789|  1.95k|    s->msg_callback_arg = ctx->msg_callback_arg;
  790|  1.95k|    s->verify_mode = ctx->verify_mode;
  791|  1.95k|    s->not_resumable_session_cb = ctx->not_resumable_session_cb;
  792|  1.95k|    s->rlayer.record_padding_cb = ctx->record_padding_cb;
  793|  1.95k|    s->rlayer.record_padding_arg = ctx->record_padding_arg;
  794|  1.95k|    s->rlayer.block_padding = ctx->block_padding;
  795|  1.95k|    s->rlayer.hs_padding = ctx->hs_padding;
  796|  1.95k|    s->sid_ctx_length = ctx->sid_ctx_length;
  797|  1.95k|    if (!ossl_assert(s->sid_ctx_length <= sizeof(s->sid_ctx)))
  ------------------
  |  |   52|  1.95k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.95k|    __FILE__, __LINE__)
  ------------------
  |  Branch (797:9): [True: 0, False: 1.95k]
  ------------------
  798|      0|        goto err;
  799|  1.95k|    memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx));
  800|  1.95k|    s->verify_callback = ctx->default_verify_callback;
  801|  1.95k|    s->generate_session_id = ctx->generate_session_id;
  802|       |
  803|  1.95k|    s->param = X509_VERIFY_PARAM_new();
  804|  1.95k|    if (s->param == NULL)
  ------------------
  |  Branch (804:9): [True: 0, False: 1.95k]
  ------------------
  805|      0|        goto asn1err;
  806|  1.95k|    X509_VERIFY_PARAM_inherit(s->param, ctx->param);
  807|  1.95k|    s->quiet_shutdown = IS_QUIC_CTX(ctx) ? 0 : ctx->quiet_shutdown;
  ------------------
  |  |   54|  1.95k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  1.95k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  808|       |
  809|  1.95k|    if (!IS_QUIC_CTX(ctx))
  ------------------
  |  |   54|  1.95k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  1.95k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  810|  1.95k|        s->ext.max_fragment_len_mode = ctx->ext.max_fragment_len_mode;
  811|       |
  812|  1.95k|    s->max_send_fragment = ctx->max_send_fragment;
  813|  1.95k|    s->split_send_fragment = ctx->split_send_fragment;
  814|  1.95k|    s->max_pipelines = ctx->max_pipelines;
  815|  1.95k|    s->rlayer.default_read_buf_len = ctx->default_read_buf_len;
  816|       |
  817|  1.95k|    s->ext.debug_cb = 0;
  818|  1.95k|    s->ext.debug_arg = NULL;
  819|  1.95k|    s->ext.ticket_expected = 0;
  820|  1.95k|    s->ext.status_type = ctx->ext.status_type;
  821|  1.95k|    s->ext.status_expected = 0;
  822|  1.95k|    s->ext.ocsp.ids = NULL;
  823|  1.95k|    s->ext.ocsp.exts = NULL;
  824|  1.95k|    s->ext.ocsp.resp = NULL;
  825|  1.95k|    s->ext.ocsp.resp_len = 0;
  826|  1.95k|    s->ext.ocsp.resp_ex = NULL;
  827|       |
  828|  1.95k|    if (!SSL_CTX_up_ref(ctx))
  ------------------
  |  Branch (828:9): [True: 0, False: 1.95k]
  ------------------
  829|      0|        goto err;
  830|       |
  831|  1.95k|    s->session_ctx = ctx;
  832|  1.95k|    if (ctx->ext.ecpointformats != NULL) {
  ------------------
  |  Branch (832:9): [True: 0, False: 1.95k]
  ------------------
  833|      0|        s->ext.ecpointformats = OPENSSL_memdup(ctx->ext.ecpointformats,
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  834|      0|            ctx->ext.ecpointformats_len);
  835|      0|        if (s->ext.ecpointformats == NULL) {
  ------------------
  |  Branch (835:13): [True: 0, False: 0]
  ------------------
  836|      0|            s->ext.ecpointformats_len = 0;
  837|      0|            goto err;
  838|      0|        }
  839|      0|        s->ext.ecpointformats_len = ctx->ext.ecpointformats_len;
  840|      0|    }
  841|  1.95k|    if (ctx->ext.supportedgroups != NULL) {
  ------------------
  |  Branch (841:9): [True: 1.95k, False: 0]
  ------------------
  842|  1.95k|        size_t add = 0;
  843|       |
  844|  1.95k|        if (ctx->ext.supportedgroups_len == 0)
  ------------------
  |  Branch (844:13): [True: 41, False: 1.91k]
  ------------------
  845|       |            /* Add 1 so allocation won't fail */
  846|     41|            add = 1;
  847|  1.95k|        s->ext.supportedgroups = OPENSSL_memdup(ctx->ext.supportedgroups,
  ------------------
  |  |  133|  1.95k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  848|  1.95k|            (ctx->ext.supportedgroups_len + add)
  849|  1.95k|                * sizeof(*ctx->ext.supportedgroups));
  850|  1.95k|        if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (850:13): [True: 0, False: 1.95k]
  ------------------
  851|      0|            s->ext.supportedgroups_len = 0;
  852|      0|            goto err;
  853|      0|        }
  854|  1.95k|        s->ext.supportedgroups_len = ctx->ext.supportedgroups_len;
  855|  1.95k|    }
  856|  1.95k|    if (ctx->ext.keyshares != NULL) {
  ------------------
  |  Branch (856:9): [True: 1.95k, False: 0]
  ------------------
  857|  1.95k|        size_t add = 0;
  858|       |
  859|  1.95k|        if (ctx->ext.keyshares_len == 0)
  ------------------
  |  Branch (859:13): [True: 41, False: 1.91k]
  ------------------
  860|       |            /* Add 1 so allocation won't fail */
  861|     41|            add = 1;
  862|  1.95k|        s->ext.keyshares = OPENSSL_memdup(ctx->ext.keyshares,
  ------------------
  |  |  133|  1.95k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  863|  1.95k|            (ctx->ext.keyshares_len + add)
  864|  1.95k|                * sizeof(*ctx->ext.keyshares));
  865|  1.95k|        if (s->ext.keyshares == NULL) {
  ------------------
  |  Branch (865:13): [True: 0, False: 1.95k]
  ------------------
  866|      0|            s->ext.keyshares_len = 0;
  867|      0|            goto err;
  868|      0|        }
  869|  1.95k|        s->ext.keyshares_len = ctx->ext.keyshares_len;
  870|  1.95k|    }
  871|  1.95k|    if (ctx->ext.tuples != NULL) {
  ------------------
  |  Branch (871:9): [True: 1.95k, False: 0]
  ------------------
  872|  1.95k|        size_t add = 0;
  873|       |
  874|  1.95k|        if (ctx->ext.tuples_len == 0)
  ------------------
  |  Branch (874:13): [True: 41, False: 1.91k]
  ------------------
  875|       |            /* Add 1 so allocation won't fail */
  876|     41|            add = 1;
  877|  1.95k|        s->ext.tuples = OPENSSL_memdup(ctx->ext.tuples,
  ------------------
  |  |  133|  1.95k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  878|  1.95k|            (ctx->ext.tuples_len + add)
  879|  1.95k|                * sizeof(*ctx->ext.tuples));
  880|  1.95k|        if (s->ext.tuples == NULL) {
  ------------------
  |  Branch (880:13): [True: 0, False: 1.95k]
  ------------------
  881|      0|            s->ext.tuples_len = 0;
  882|      0|            goto err;
  883|      0|        }
  884|  1.95k|        s->ext.tuples_len = ctx->ext.tuples_len;
  885|  1.95k|    }
  886|       |
  887|  1.95k|#ifndef OPENSSL_NO_NEXTPROTONEG
  888|  1.95k|    s->ext.npn = NULL;
  889|  1.95k|#endif
  890|       |
  891|  1.95k|    if (ctx->ext.alpn != NULL) {
  ------------------
  |  Branch (891:9): [True: 0, False: 1.95k]
  ------------------
  892|      0|        s->ext.alpn = OPENSSL_malloc(ctx->ext.alpn_len);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  893|      0|        if (s->ext.alpn == NULL) {
  ------------------
  |  Branch (893:13): [True: 0, False: 0]
  ------------------
  894|      0|            s->ext.alpn_len = 0;
  895|      0|            goto err;
  896|      0|        }
  897|      0|        memcpy(s->ext.alpn, ctx->ext.alpn, ctx->ext.alpn_len);
  898|      0|        s->ext.alpn_len = ctx->ext.alpn_len;
  899|      0|    }
  900|       |
  901|  1.95k|    s->verified_chain = NULL;
  902|  1.95k|    s->verify_result = X509_V_OK;
  ------------------
  |  |  312|  1.95k|#define X509_V_OK 0
  ------------------
  903|       |
  904|  1.95k|    s->default_passwd_callback = ctx->default_passwd_callback;
  905|  1.95k|    s->default_passwd_callback_userdata = ctx->default_passwd_callback_userdata;
  906|       |
  907|  1.95k|    s->key_update = SSL_KEY_UPDATE_NONE;
  ------------------
  |  | 1048|  1.95k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  908|       |
  909|  1.95k|    if (!IS_QUIC_CTX(ctx)) {
  ------------------
  |  |   54|  1.95k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  1.95k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 1.95k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  910|  1.95k|        s->allow_early_data_cb = ctx->allow_early_data_cb;
  911|  1.95k|        s->allow_early_data_cb_data = ctx->allow_early_data_cb_data;
  912|  1.95k|    }
  913|       |
  914|  1.95k|    if (!method->ssl_init(ssl))
  ------------------
  |  Branch (914:9): [True: 0, False: 1.95k]
  ------------------
  915|      0|        goto sslerr;
  916|       |
  917|  1.95k|    s->server = (method->ssl_accept == ssl_undefined_function) ? 0 : 1;
  ------------------
  |  Branch (917:17): [True: 1.95k, False: 0]
  ------------------
  918|       |
  919|  1.95k|    if (!method->ssl_reset(ssl))
  ------------------
  |  Branch (919:9): [True: 0, False: 1.95k]
  ------------------
  920|      0|        goto sslerr;
  921|       |
  922|  1.95k|#ifndef OPENSSL_NO_PSK
  923|  1.95k|    s->psk_client_callback = ctx->psk_client_callback;
  924|  1.95k|    s->psk_server_callback = ctx->psk_server_callback;
  925|  1.95k|#endif
  926|  1.95k|    s->psk_find_session_cb = ctx->psk_find_session_cb;
  927|  1.95k|    s->psk_use_session_cb = ctx->psk_use_session_cb;
  928|       |
  929|  1.95k|    s->async_cb = ctx->async_cb;
  930|  1.95k|    s->async_cb_arg = ctx->async_cb_arg;
  931|       |
  932|  1.95k|    s->job = NULL;
  933|       |
  934|       |#ifndef OPENSSL_NO_COMP_ALG
  935|       |    memcpy(s->cert_comp_prefs, ctx->cert_comp_prefs, sizeof(s->cert_comp_prefs));
  936|       |#endif
  937|  1.95k|    if (ctx->client_cert_type != NULL) {
  ------------------
  |  Branch (937:9): [True: 0, False: 1.95k]
  ------------------
  938|      0|        s->client_cert_type = OPENSSL_memdup(ctx->client_cert_type,
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  939|      0|            ctx->client_cert_type_len);
  940|      0|        if (s->client_cert_type == NULL)
  ------------------
  |  Branch (940:13): [True: 0, False: 0]
  ------------------
  941|      0|            goto sslerr;
  942|      0|        s->client_cert_type_len = ctx->client_cert_type_len;
  943|      0|    }
  944|  1.95k|    if (ctx->server_cert_type != NULL) {
  ------------------
  |  Branch (944:9): [True: 0, False: 1.95k]
  ------------------
  945|      0|        s->server_cert_type = OPENSSL_memdup(ctx->server_cert_type,
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  946|      0|            ctx->server_cert_type_len);
  947|      0|        if (s->server_cert_type == NULL)
  ------------------
  |  Branch (947:13): [True: 0, False: 0]
  ------------------
  948|      0|            goto sslerr;
  949|      0|        s->server_cert_type_len = ctx->server_cert_type_len;
  950|      0|    }
  951|       |
  952|  1.95k|#ifndef OPENSSL_NO_CT
  953|  1.95k|    if (!SSL_set_ct_validation_callback(ssl, ctx->ct_validation_callback,
  ------------------
  |  Branch (953:9): [True: 0, False: 1.95k]
  ------------------
  954|  1.95k|            ctx->ct_validation_callback_arg))
  955|      0|        goto sslerr;
  956|  1.95k|#endif
  957|       |
  958|  1.95k|    s->ssl_pkey_num = SSL_PKEY_NUM + ctx->sigalg_list_len;
  ------------------
  |  |  328|  1.95k|#define SSL_PKEY_NUM 9
  ------------------
  959|  1.95k|    return ssl;
  960|      0|cerr:
  961|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  962|      0|    goto err;
  963|      0|asn1err:
  964|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  965|      0|    goto err;
  966|      0|sslerr:
  967|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  968|      0|err:
  969|      0|    SSL_free(ssl);
  970|       |    return NULL;
  971|      0|}
ossl_ssl_connection_new:
  974|  1.95k|{
  975|       |    return ossl_ssl_connection_new_int(ctx, NULL, ctx->method);
  976|  1.95k|}
SSL_free:
 1423|  1.95k|{
 1424|  1.95k|    int i;
 1425|       |
 1426|  1.95k|    if (s == NULL)
  ------------------
  |  Branch (1426:9): [True: 0, False: 1.95k]
  ------------------
 1427|      0|        return;
 1428|  1.95k|    CRYPTO_DOWN_REF(&s->references, &i);
 1429|  1.95k|    REF_PRINT_COUNT("SSL", i, s);
  ------------------
  |  |  301|  1.95k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  1.95k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  1.95k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  1.95k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1430|  1.95k|    if (i > 0)
  ------------------
  |  Branch (1430:9): [True: 0, False: 1.95k]
  ------------------
 1431|      0|        return;
 1432|  1.95k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  1.95k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 1.95k]
  |  |  ------------------
  ------------------
 1433|       |
 1434|  1.95k|    if (s->method != NULL)
  ------------------
  |  Branch (1434:9): [True: 1.95k, False: 0]
  ------------------
 1435|  1.95k|        s->method->ssl_free(s);
 1436|       |
 1437|  1.95k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data);
  ------------------
  |  |  250|  1.95k|#define CRYPTO_EX_INDEX_SSL 0
  ------------------
 1438|  1.95k|    SSL_CTX_free(s->ctx);
 1439|  1.95k|    CRYPTO_THREAD_lock_free(s->lock);
 1440|  1.95k|    CRYPTO_FREE_REF(&s->references);
 1441|       |
 1442|  1.95k|    OPENSSL_free(s);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1443|  1.95k|}
ossl_ssl_connection_free:
 1446|  1.95k|{
 1447|  1.95k|    SSL_CONNECTION *s;
 1448|       |
 1449|  1.95k|    s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  1.95k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  1.95k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  |  |   18|  1.95k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.95k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 1.95k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  1.95k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  1.95k|                             : NULL))
  |  |  ------------------
  ------------------
 1450|  1.95k|    if (s == NULL)
  ------------------
  |  Branch (1450:9): [True: 0, False: 1.95k]
  ------------------
 1451|      0|        return;
 1452|       |
 1453|       |    /*
 1454|       |     * Ignore return values. This could result in user callbacks being called
 1455|       |     * e.g. for the QUIC TLS record layer. So we do this early before we have
 1456|       |     * freed other things.
 1457|       |     */
 1458|  1.95k|    ssl_free_wbio_buffer(s);
 1459|  1.95k|    RECORD_LAYER_clear(&s->rlayer);
 1460|       |
 1461|  1.95k|    X509_VERIFY_PARAM_free(s->param);
 1462|  1.95k|    dane_final(&s->dane);
 1463|       |
 1464|  1.95k|    BUF_MEM_free(s->init_buf);
 1465|       |
 1466|       |    /* add extra stuff */
 1467|  1.95k|    sk_SSL_CIPHER_free(s->cipher_list);
  ------------------
  |  | 1011|  1.95k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1468|  1.95k|    sk_SSL_CIPHER_free(s->cipher_list_by_id);
  ------------------
  |  | 1011|  1.95k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1469|  1.95k|    sk_SSL_CIPHER_free(s->tls13_ciphersuites);
  ------------------
  |  | 1011|  1.95k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1470|  1.95k|    sk_SSL_CIPHER_free(s->peer_ciphers);
  ------------------
  |  | 1011|  1.95k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1471|       |
 1472|       |    /* Make the next call work :-) */
 1473|  1.95k|    if (s->session != NULL) {
  ------------------
  |  Branch (1473:9): [True: 1.95k, False: 5]
  ------------------
 1474|  1.95k|        ssl_clear_bad_session(s);
 1475|  1.95k|        SSL_SESSION_free(s->session);
 1476|  1.95k|    }
 1477|  1.95k|    SSL_SESSION_free(s->psksession);
 1478|  1.95k|    OPENSSL_free(s->psksession_id);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1479|       |
 1480|  1.95k|    ssl_cert_free(s->cert);
 1481|  1.95k|    OPENSSL_free(s->shared_sigalgs);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1482|       |    /* Free up if allocated */
 1483|       |
 1484|  1.95k|    OPENSSL_free(s->ext.hostname);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1485|  1.95k|    SSL_CTX_free(s->session_ctx);
 1486|  1.95k|    OPENSSL_free(s->ext.ecpointformats);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1487|  1.95k|    OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1488|  1.95k|    OPENSSL_free(s->ext.supportedgroups);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1489|  1.95k|    OPENSSL_free(s->ext.keyshares);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1490|  1.95k|    OPENSSL_free(s->ext.tuples);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1491|  1.95k|    OPENSSL_free(s->ext.peer_supportedgroups);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1492|  1.95k|    sk_X509_EXTENSION_pop_free(s->ext.ocsp.exts, X509_EXTENSION_free);
  ------------------
  |  |  256|  1.95k|#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))
  ------------------
 1493|       |
 1494|  1.95k|#ifndef OPENSSL_NO_OCSP
 1495|  1.95k|    OPENSSL_free(s->ext.ocsp.resp);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1496|  1.95k|    s->ext.ocsp.resp = NULL;
 1497|  1.95k|    s->ext.ocsp.resp_len = 0;
 1498|       |
 1499|  1.95k|    sk_OCSP_RESPID_pop_free(s->ext.ocsp.ids, OCSP_RESPID_free);
  ------------------
  |  |  180|  1.95k|#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))
  ------------------
 1500|  1.95k|    sk_OCSP_RESPONSE_pop_free(s->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 1501|  1.95k|    s->ext.ocsp.resp_ex = NULL;
 1502|  1.95k|#endif
 1503|  1.95k|#ifndef OPENSSL_NO_CT
 1504|  1.95k|    SCT_LIST_free(s->scts);
 1505|  1.95k|    OPENSSL_free(s->ext.scts);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1506|  1.95k|#endif
 1507|  1.95k|    OPENSSL_free(s->ext.alpn);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1508|  1.95k|    OPENSSL_free(s->ext.tls13_cookie);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1509|  1.95k|    if (s->clienthello != NULL)
  ------------------
  |  Branch (1509:9): [True: 0, False: 1.95k]
  ------------------
 1510|      0|        OPENSSL_free(s->clienthello->pre_proc_exts);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1511|  1.95k|    OPENSSL_free(s->clienthello);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1512|  1.95k|    OPENSSL_free(s->pha_context);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1513|  1.95k|    EVP_MD_CTX_free(s->pha_dgst);
 1514|       |
 1515|  1.95k|    sk_X509_NAME_pop_free(s->ca_names, X509_NAME_free);
  ------------------
  |  |   70|  1.95k|#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))
  ------------------
 1516|  1.95k|    sk_X509_NAME_pop_free(s->client_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  1.95k|#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))
  ------------------
 1517|       |
 1518|  1.95k|    OPENSSL_free(s->client_cert_type);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1519|  1.95k|    OPENSSL_free(s->server_cert_type);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1520|       |
 1521|  1.95k|    OSSL_STACK_OF_X509_free(s->verified_chain);
 1522|       |
 1523|  1.95k|    if (ssl->method != NULL)
  ------------------
  |  Branch (1523:9): [True: 1.95k, False: 0]
  ------------------
 1524|  1.95k|        ssl->method->ssl_deinit(ssl);
 1525|       |
 1526|  1.95k|    ASYNC_WAIT_CTX_free(s->waitctx);
 1527|       |
 1528|  1.95k|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 1529|  1.95k|    OPENSSL_free(s->ext.npn);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1530|  1.95k|#endif
 1531|       |
 1532|  1.95k|#ifndef OPENSSL_NO_SRTP
 1533|  1.95k|    sk_SRTP_PROTECTION_PROFILE_free(s->srtp_profiles);
  ------------------
  |  |  256|  1.95k|#define sk_SRTP_PROTECTION_PROFILE_free(sk) OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
 1534|  1.95k|#endif
 1535|       |
 1536|       |    /*
 1537|       |     * We do this late. We want to ensure that any other references we held to
 1538|       |     * these BIOs are freed first *before* we call BIO_free_all(), because
 1539|       |     * BIO_free_all() will only free each BIO in the chain if the number of
 1540|       |     * references to the first BIO have dropped to 0
 1541|       |     */
 1542|  1.95k|    BIO_free_all(s->wbio);
 1543|  1.95k|    s->wbio = NULL;
 1544|  1.95k|    BIO_free_all(s->rbio);
 1545|  1.95k|    s->rbio = NULL;
 1546|  1.95k|    OPENSSL_free(s->s3.tmp.valid_flags);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1547|  1.95k|}
SSL_set0_rbio:
 1550|  1.95k|{
 1551|  1.95k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.95k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.95k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.95k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.95k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.95k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.95k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.95k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1552|       |
 1553|  1.95k|#ifndef OPENSSL_NO_QUIC
 1554|  1.95k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  1.95k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.95k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.95k, False: 0]
  |  |  ------------------
  ------------------
 1555|      0|        ossl_quic_conn_set0_net_rbio(s, rbio);
 1556|      0|        return;
 1557|      0|    }
 1558|  1.95k|#endif
 1559|       |
 1560|  1.95k|    if (sc == NULL)
  ------------------
  |  Branch (1560:9): [True: 0, False: 1.95k]
  ------------------
 1561|      0|        return;
 1562|       |
 1563|  1.95k|    BIO_free_all(sc->rbio);
 1564|  1.95k|    sc->rbio = rbio;
 1565|  1.95k|    sc->rlayer.rrlmethod->set1_bio(sc->rlayer.rrl, sc->rbio);
 1566|  1.95k|}
SSL_set0_wbio:
 1569|  1.95k|{
 1570|  1.95k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.95k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.95k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.95k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.95k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.95k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.95k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.95k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1571|       |
 1572|  1.95k|#ifndef OPENSSL_NO_QUIC
 1573|  1.95k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  1.95k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.95k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.95k, False: 0]
  |  |  ------------------
  ------------------
 1574|      0|        ossl_quic_conn_set0_net_wbio(s, wbio);
 1575|      0|        return;
 1576|      0|    }
 1577|  1.95k|#endif
 1578|       |
 1579|  1.95k|    if (sc == NULL)
  ------------------
  |  Branch (1579:9): [True: 0, False: 1.95k]
  ------------------
 1580|      0|        return;
 1581|       |
 1582|       |    /*
 1583|       |     * If the output buffering BIO is still in place, remove it
 1584|       |     */
 1585|  1.95k|    if (sc->bbio != NULL)
  ------------------
  |  Branch (1585:9): [True: 0, False: 1.95k]
  ------------------
 1586|      0|        sc->wbio = BIO_pop(sc->wbio);
 1587|       |
 1588|  1.95k|    BIO_free_all(sc->wbio);
 1589|  1.95k|    sc->wbio = wbio;
 1590|       |
 1591|       |    /* Re-attach |bbio| to the new |wbio|. */
 1592|  1.95k|    if (sc->bbio != NULL)
  ------------------
  |  Branch (1592:9): [True: 0, False: 1.95k]
  ------------------
 1593|      0|        sc->wbio = BIO_push(sc->bbio, sc->wbio);
 1594|       |
 1595|  1.95k|    sc->rlayer.wrlmethod->set1_bio(sc->rlayer.wrl, sc->wbio);
 1596|  1.95k|}
SSL_get_rbio:
 1641|    307|{
 1642|    307|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|    307|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|    307|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 307]
  |  |  |  |  ------------------
  |  |  |  |   33|    307|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|    307|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 307, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    307|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    307|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1643|       |
 1644|    307|#ifndef OPENSSL_NO_QUIC
 1645|    307|    if (IS_QUIC(s))
  ------------------
  |  |   96|    307|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|    307|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 307]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 307, False: 0]
  |  |  ------------------
  ------------------
 1646|      0|        return ossl_quic_conn_get_net_rbio(s);
 1647|    307|#endif
 1648|       |
 1649|    307|    if (sc == NULL)
  ------------------
  |  Branch (1649:9): [True: 0, False: 307]
  ------------------
 1650|      0|        return NULL;
 1651|       |
 1652|    307|    return sc->rbio;
 1653|    307|}
SSL_connect:
 2209|  2.25k|{
 2210|  2.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  2.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2211|       |
 2212|  2.25k|#ifndef OPENSSL_NO_QUIC
 2213|  2.25k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  2.25k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  2.25k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 2.25k, False: 0]
  |  |  ------------------
  ------------------
 2214|      0|        return s->method->ssl_connect(s);
 2215|  2.25k|#endif
 2216|       |
 2217|  2.25k|    if (sc == NULL)
  ------------------
  |  Branch (2217:9): [True: 0, False: 2.25k]
  ------------------
 2218|      0|        return 0;
 2219|       |
 2220|  2.25k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (2220:9): [True: 0, False: 2.25k]
  ------------------
 2221|       |        /* Not properly initialized yet */
 2222|      0|        SSL_set_connect_state(s);
 2223|      0|    }
 2224|       |
 2225|  2.25k|    return SSL_do_handshake(s);
 2226|  2.25k|}
SSL_ctrl:
 2944|  1.05k|{
 2945|  1.05k|    return ossl_ctrl_internal(s, cmd, larg, parg, /*no_quic=*/0);
 2946|  1.05k|}
ossl_ctrl_internal:
 2949|  1.05k|{
 2950|  1.05k|    long l;
 2951|  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                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  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)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2952|       |
 2953|       |    /*
 2954|       |     * Routing of ctrl calls for QUIC is a little counterintuitive:
 2955|       |     *
 2956|       |     *   - Firstly (no_quic=0), we pass the ctrl directly to our QUIC
 2957|       |     *     implementation in case it wants to handle the ctrl specially.
 2958|       |     *
 2959|       |     *   - If our QUIC implementation does not care about the ctrl, it
 2960|       |     *     will reenter this function with no_quic=1 and we will try to handle
 2961|       |     *     it directly using the QCSO SSL object stub (not the handshake layer
 2962|       |     *     SSL object). This is important for e.g. the version configuration
 2963|       |     *     ctrls below, which must use s->defltmeth (and not sc->defltmeth).
 2964|       |     *
 2965|       |     *   - If we don't handle a ctrl here specially, then processing is
 2966|       |     *     redirected to the handshake layer SSL object.
 2967|       |     */
 2968|  1.05k|    if (!no_quic && IS_QUIC(s))
  ------------------
  |  |   96|  1.05k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.05k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.05k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2968:9): [True: 1.05k, False: 0]
  ------------------
 2969|      0|        return s->method->ssl_ctrl(s, cmd, larg, parg);
 2970|       |
 2971|  1.05k|    if (sc == NULL)
  ------------------
  |  Branch (2971:9): [True: 0, False: 1.05k]
  ------------------
 2972|      0|        return 0;
 2973|       |
 2974|  1.05k|    switch (cmd) {
 2975|      0|    case SSL_CTRL_GET_READ_AHEAD:
  ------------------
  |  | 1303|      0|#define SSL_CTRL_GET_READ_AHEAD 40
  ------------------
  |  Branch (2975:5): [True: 0, False: 1.05k]
  ------------------
 2976|      0|        return RECORD_LAYER_get_read_ahead(&sc->rlayer);
  ------------------
  |  |  135|      0|#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
  ------------------
 2977|      0|    case SSL_CTRL_SET_READ_AHEAD:
  ------------------
  |  | 1304|      0|#define SSL_CTRL_SET_READ_AHEAD 41
  ------------------
  |  Branch (2977:5): [True: 0, False: 1.05k]
  ------------------
 2978|      0|        l = RECORD_LAYER_get_read_ahead(&sc->rlayer);
  ------------------
  |  |  135|      0|#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
  ------------------
 2979|      0|        RECORD_LAYER_set_read_ahead(&sc->rlayer, larg);
  ------------------
  |  |  134|      0|#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
  ------------------
 2980|      0|        return l;
 2981|       |
 2982|      0|    case SSL_CTRL_MODE: {
  ------------------
  |  | 1302|      0|#define SSL_CTRL_MODE 33
  ------------------
  |  Branch (2982:5): [True: 0, False: 1.05k]
  ------------------
 2983|      0|        OSSL_PARAM options[2], *opts = options;
 2984|       |
 2985|      0|        sc->mode |= larg;
 2986|       |
 2987|      0|        *opts++ = OSSL_PARAM_construct_uint32(OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE,
  ------------------
  |  |  331|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 2988|      0|            &sc->mode);
 2989|      0|        *opts = OSSL_PARAM_construct_end();
 2990|       |
 2991|       |        /* Ignore return value */
 2992|      0|        sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
 2993|       |
 2994|      0|        return sc->mode;
 2995|      0|    }
 2996|      0|    case SSL_CTRL_CLEAR_MODE:
  ------------------
  |  | 1345|      0|#define SSL_CTRL_CLEAR_MODE 78
  ------------------
  |  Branch (2996:5): [True: 0, False: 1.05k]
  ------------------
 2997|      0|        return (sc->mode &= ~larg);
 2998|      0|    case SSL_CTRL_GET_MAX_CERT_LIST:
  ------------------
  |  | 1309|      0|#define SSL_CTRL_GET_MAX_CERT_LIST 50
  ------------------
  |  Branch (2998:5): [True: 0, False: 1.05k]
  ------------------
 2999|      0|        return (long)sc->max_cert_list;
 3000|      0|    case SSL_CTRL_SET_MAX_CERT_LIST:
  ------------------
  |  | 1310|      0|#define SSL_CTRL_SET_MAX_CERT_LIST 51
  ------------------
  |  Branch (3000:5): [True: 0, False: 1.05k]
  ------------------
 3001|      0|        if (larg < 0)
  ------------------
  |  Branch (3001:13): [True: 0, False: 0]
  ------------------
 3002|      0|            return 0;
 3003|      0|        l = (long)sc->max_cert_list;
 3004|      0|        sc->max_cert_list = (size_t)larg;
 3005|      0|        return l;
 3006|      0|    case SSL_CTRL_SET_MAX_SEND_FRAGMENT:
  ------------------
  |  | 1311|      0|#define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52
  ------------------
  |  Branch (3006:5): [True: 0, False: 1.05k]
  ------------------
 3007|      0|        if (larg < 512 || larg > SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (3007:13): [True: 0, False: 0]
  |  Branch (3007:27): [True: 0, False: 0]
  ------------------
 3008|      0|            return 0;
 3009|       |#ifndef OPENSSL_NO_KTLS
 3010|       |        if (sc->wbio != NULL && BIO_get_ktls_send(sc->wbio))
 3011|       |            return 0;
 3012|       |#endif /* OPENSSL_NO_KTLS */
 3013|      0|        sc->max_send_fragment = larg;
 3014|      0|        if (sc->max_send_fragment < sc->split_send_fragment)
  ------------------
  |  Branch (3014:13): [True: 0, False: 0]
  ------------------
 3015|      0|            sc->split_send_fragment = sc->max_send_fragment;
 3016|      0|        sc->rlayer.wrlmethod->set_max_frag_len(sc->rlayer.wrl, larg);
 3017|      0|        return 1;
 3018|      0|    case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
  ------------------
  |  | 1379|      0|#define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125
  ------------------
  |  Branch (3018:5): [True: 0, False: 1.05k]
  ------------------
 3019|      0|        if ((size_t)larg > sc->max_send_fragment || larg == 0)
  ------------------
  |  Branch (3019:13): [True: 0, False: 0]
  |  Branch (3019:53): [True: 0, False: 0]
  ------------------
 3020|      0|            return 0;
 3021|      0|        sc->split_send_fragment = larg;
 3022|      0|        return 1;
 3023|      0|    case SSL_CTRL_SET_MAX_PIPELINES:
  ------------------
  |  | 1380|      0|#define SSL_CTRL_SET_MAX_PIPELINES 126
  ------------------
  |  Branch (3023:5): [True: 0, False: 1.05k]
  ------------------
 3024|      0|        if (larg < 1 || larg > SSL_MAX_PIPELINES)
  ------------------
  |  |   71|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (3024:13): [True: 0, False: 0]
  |  Branch (3024:25): [True: 0, False: 0]
  ------------------
 3025|      0|            return 0;
 3026|      0|        sc->max_pipelines = larg;
 3027|      0|        if (sc->rlayer.rrlmethod->set_max_pipelines != NULL)
  ------------------
  |  Branch (3027:13): [True: 0, False: 0]
  ------------------
 3028|      0|            sc->rlayer.rrlmethod->set_max_pipelines(sc->rlayer.rrl, (size_t)larg);
 3029|      0|        return 1;
 3030|      0|    case SSL_CTRL_GET_RI_SUPPORT:
  ------------------
  |  | 1344|      0|#define SSL_CTRL_GET_RI_SUPPORT 76
  ------------------
  |  Branch (3030:5): [True: 0, False: 1.05k]
  ------------------
 3031|      0|        return sc->s3.send_connection_binding;
 3032|      0|    case SSL_CTRL_SET_RETRY_VERIFY:
  ------------------
  |  | 1390|      0|#define SSL_CTRL_SET_RETRY_VERIFY 136
  ------------------
  |  Branch (3032:5): [True: 0, False: 1.05k]
  ------------------
 3033|      0|        sc->rwstate = SSL_RETRY_VERIFY;
  ------------------
  |  |  939|      0|#define SSL_RETRY_VERIFY 8
  ------------------
 3034|      0|        return 1;
 3035|      0|    case SSL_CTRL_CERT_FLAGS:
  ------------------
  |  | 1357|      0|#define SSL_CTRL_CERT_FLAGS 99
  ------------------
  |  Branch (3035:5): [True: 0, False: 1.05k]
  ------------------
 3036|      0|        return (sc->cert->cert_flags |= larg);
 3037|      0|    case SSL_CTRL_CLEAR_CERT_FLAGS:
  ------------------
  |  | 1358|      0|#define SSL_CTRL_CLEAR_CERT_FLAGS 100
  ------------------
  |  Branch (3037:5): [True: 0, False: 1.05k]
  ------------------
 3038|      0|        return (sc->cert->cert_flags &= ~larg);
 3039|       |
 3040|      0|    case SSL_CTRL_GET_RAW_CIPHERLIST:
  ------------------
  |  | 1368|      0|#define SSL_CTRL_GET_RAW_CIPHERLIST 110
  ------------------
  |  Branch (3040:5): [True: 0, False: 1.05k]
  ------------------
 3041|      0|        if (parg) {
  ------------------
  |  Branch (3041:13): [True: 0, False: 0]
  ------------------
 3042|      0|            if (sc->s3.tmp.ciphers_raw == NULL)
  ------------------
  |  Branch (3042:17): [True: 0, False: 0]
  ------------------
 3043|      0|                return 0;
 3044|      0|            *(unsigned char **)parg = sc->s3.tmp.ciphers_raw;
 3045|      0|            return (int)sc->s3.tmp.ciphers_rawlen;
 3046|      0|        } else {
 3047|      0|            return TLS_CIPHER_LEN;
  ------------------
  |  |  379|      0|#define TLS_CIPHER_LEN 2
  ------------------
 3048|      0|        }
 3049|      0|    case SSL_CTRL_GET_EXTMS_SUPPORT:
  ------------------
  |  | 1376|      0|#define SSL_CTRL_GET_EXTMS_SUPPORT 122
  ------------------
  |  Branch (3049:5): [True: 0, False: 1.05k]
  ------------------
 3050|      0|        if (!sc->session || SSL_in_init(s) || ossl_statem_get_in_handshake(sc))
  ------------------
  |  Branch (3050:13): [True: 0, False: 0]
  |  Branch (3050:29): [True: 0, False: 0]
  |  Branch (3050:47): [True: 0, False: 0]
  ------------------
 3051|      0|            return -1;
 3052|      0|        if (sc->session->flags & SSL_SESS_FLAG_EXTMS)
  ------------------
  |  |  567|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  |  Branch (3052:13): [True: 0, False: 0]
  ------------------
 3053|      0|            return 1;
 3054|      0|        else
 3055|      0|            return 0;
 3056|      0|    case SSL_CTRL_SET_MIN_PROTO_VERSION:
  ------------------
  |  | 1377|      0|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  ------------------
  |  Branch (3056:5): [True: 0, False: 1.05k]
  ------------------
 3057|      0|        return ssl_check_allowed_versions(larg, sc->max_proto_version)
  ------------------
  |  Branch (3057:16): [True: 0, False: 0]
  ------------------
 3058|      0|            && ssl_set_version_bound(s->defltmeth->version, (int)larg,
  ------------------
  |  Branch (3058:16): [True: 0, False: 0]
  ------------------
 3059|      0|                &sc->min_proto_version);
 3060|      0|    case SSL_CTRL_GET_MIN_PROTO_VERSION:
  ------------------
  |  | 1384|      0|#define SSL_CTRL_GET_MIN_PROTO_VERSION 130
  ------------------
  |  Branch (3060:5): [True: 0, False: 1.05k]
  ------------------
 3061|      0|        return sc->min_proto_version;
 3062|      0|    case SSL_CTRL_SET_MAX_PROTO_VERSION:
  ------------------
  |  | 1378|      0|#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
  ------------------
  |  Branch (3062:5): [True: 0, False: 1.05k]
  ------------------
 3063|      0|        return ssl_check_allowed_versions(sc->min_proto_version, larg)
  ------------------
  |  Branch (3063:16): [True: 0, False: 0]
  ------------------
 3064|      0|            && ssl_set_version_bound(s->defltmeth->version, (int)larg,
  ------------------
  |  Branch (3064:16): [True: 0, False: 0]
  ------------------
 3065|      0|                &sc->max_proto_version);
 3066|      0|    case SSL_CTRL_GET_MAX_PROTO_VERSION:
  ------------------
  |  | 1385|      0|#define SSL_CTRL_GET_MAX_PROTO_VERSION 131
  ------------------
  |  Branch (3066:5): [True: 0, False: 1.05k]
  ------------------
 3067|      0|        return sc->max_proto_version;
 3068|  1.05k|    default:
  ------------------
  |  Branch (3068:5): [True: 1.05k, False: 0]
  ------------------
 3069|  1.05k|        if (IS_QUIC(s))
  ------------------
  |  |   96|  1.05k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.05k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.05k, False: 0]
  |  |  ------------------
  ------------------
 3070|      0|            return SSL_ctrl((SSL *)sc, cmd, larg, parg);
 3071|  1.05k|        else
 3072|  1.05k|            return s->method->ssl_ctrl(s, cmd, larg, parg);
 3073|  1.05k|    }
 3074|  1.05k|}
SSL_CTX_ctrl:
 3098|  16.1k|{
 3099|  16.1k|    long l;
 3100|       |
 3101|       |    /* For some cases with ctx == NULL or larg == 1 perform syntax checks */
 3102|  16.1k|    if (cmd == SSL_CTRL_SET_GROUPS_LIST && larg == 1)
  ------------------
  |  | 1353|  32.2k|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (3102:9): [True: 3.34k, False: 12.7k]
  |  Branch (3102:44): [True: 0, False: 3.34k]
  ------------------
 3103|      0|        return tls1_set_groups_list(ctx, NULL, NULL, NULL, NULL, NULL, NULL, parg);
 3104|  16.1k|    if (ctx == NULL) {
  ------------------
  |  Branch (3104:9): [True: 0, False: 16.1k]
  ------------------
 3105|      0|        switch (cmd) {
 3106|      0|        case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1356|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (3106:9): [True: 0, False: 0]
  ------------------
 3107|      0|        case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1360|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (3107:9): [True: 0, False: 0]
  ------------------
 3108|      0|            return tls1_set_sigalgs_list(ctx, NULL, parg, 0);
 3109|      0|        default:
  ------------------
  |  Branch (3109:9): [True: 0, False: 0]
  ------------------
 3110|      0|            return 0;
 3111|      0|        }
 3112|      0|    }
 3113|       |
 3114|  16.1k|    switch (cmd) {
 3115|      0|    case SSL_CTRL_GET_READ_AHEAD:
  ------------------
  |  | 1303|      0|#define SSL_CTRL_GET_READ_AHEAD 40
  ------------------
  |  Branch (3115:5): [True: 0, False: 16.1k]
  ------------------
 3116|      0|        return ctx->read_ahead;
 3117|  2.70k|    case SSL_CTRL_SET_READ_AHEAD:
  ------------------
  |  | 1304|  2.70k|#define SSL_CTRL_SET_READ_AHEAD 41
  ------------------
  |  Branch (3117:5): [True: 2.70k, False: 13.4k]
  ------------------
 3118|  2.70k|        l = ctx->read_ahead;
 3119|  2.70k|        ctx->read_ahead = larg;
 3120|  2.70k|        return l;
 3121|       |
 3122|      0|    case SSL_CTRL_SET_MSG_CALLBACK_ARG:
  ------------------
  |  | 1286|      0|#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
  ------------------
  |  Branch (3122:5): [True: 0, False: 16.1k]
  ------------------
 3123|      0|        ctx->msg_callback_arg = parg;
 3124|      0|        return 1;
 3125|       |
 3126|      0|    case SSL_CTRL_GET_MAX_CERT_LIST:
  ------------------
  |  | 1309|      0|#define SSL_CTRL_GET_MAX_CERT_LIST 50
  ------------------
  |  Branch (3126:5): [True: 0, False: 16.1k]
  ------------------
 3127|      0|        return (long)ctx->max_cert_list;
 3128|      0|    case SSL_CTRL_SET_MAX_CERT_LIST:
  ------------------
  |  | 1310|      0|#define SSL_CTRL_SET_MAX_CERT_LIST 51
  ------------------
  |  Branch (3128:5): [True: 0, False: 16.1k]
  ------------------
 3129|      0|        if (larg < 0)
  ------------------
  |  Branch (3129:13): [True: 0, False: 0]
  ------------------
 3130|      0|            return 0;
 3131|      0|        l = (long)ctx->max_cert_list;
 3132|      0|        ctx->max_cert_list = (size_t)larg;
 3133|      0|        return l;
 3134|       |
 3135|      0|    case SSL_CTRL_SET_SESS_CACHE_SIZE:
  ------------------
  |  | 1305|      0|#define SSL_CTRL_SET_SESS_CACHE_SIZE 42
  ------------------
  |  Branch (3135:5): [True: 0, False: 16.1k]
  ------------------
 3136|      0|        if (larg < 0)
  ------------------
  |  Branch (3136:13): [True: 0, False: 0]
  ------------------
 3137|      0|            return 0;
 3138|      0|        l = (long)ctx->session_cache_size;
 3139|      0|        ctx->session_cache_size = (size_t)larg;
 3140|      0|        return l;
 3141|      0|    case SSL_CTRL_GET_SESS_CACHE_SIZE:
  ------------------
  |  | 1306|      0|#define SSL_CTRL_GET_SESS_CACHE_SIZE 43
  ------------------
  |  Branch (3141:5): [True: 0, False: 16.1k]
  ------------------
 3142|      0|        return (long)ctx->session_cache_size;
 3143|  1.95k|    case SSL_CTRL_SET_SESS_CACHE_MODE:
  ------------------
  |  | 1307|  1.95k|#define SSL_CTRL_SET_SESS_CACHE_MODE 44
  ------------------
  |  Branch (3143:5): [True: 1.95k, False: 14.1k]
  ------------------
 3144|  1.95k|        l = ctx->session_cache_mode;
 3145|  1.95k|        ctx->session_cache_mode = larg;
 3146|  1.95k|        return l;
 3147|      0|    case SSL_CTRL_GET_SESS_CACHE_MODE:
  ------------------
  |  | 1308|      0|#define SSL_CTRL_GET_SESS_CACHE_MODE 45
  ------------------
  |  Branch (3147:5): [True: 0, False: 16.1k]
  ------------------
 3148|      0|        return ctx->session_cache_mode;
 3149|       |
 3150|      0|    case SSL_CTRL_SESS_NUMBER:
  ------------------
  |  | 1290|      0|#define SSL_CTRL_SESS_NUMBER 20
  ------------------
  |  Branch (3150:5): [True: 0, False: 16.1k]
  ------------------
 3151|      0|        return lh_SSL_SESSION_num_items(ctx->sessions);
 3152|      0|    case SSL_CTRL_SESS_CONNECT:
  ------------------
  |  | 1291|      0|#define SSL_CTRL_SESS_CONNECT 21
  ------------------
  |  Branch (3152:5): [True: 0, False: 16.1k]
  ------------------
 3153|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect);
 3154|      0|    case SSL_CTRL_SESS_CONNECT_GOOD:
  ------------------
  |  | 1292|      0|#define SSL_CTRL_SESS_CONNECT_GOOD 22
  ------------------
  |  Branch (3154:5): [True: 0, False: 16.1k]
  ------------------
 3155|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect_good);
 3156|      0|    case SSL_CTRL_SESS_CONNECT_RENEGOTIATE:
  ------------------
  |  | 1293|      0|#define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23
  ------------------
  |  Branch (3156:5): [True: 0, False: 16.1k]
  ------------------
 3157|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect_renegotiate);
 3158|      0|    case SSL_CTRL_SESS_ACCEPT:
  ------------------
  |  | 1294|      0|#define SSL_CTRL_SESS_ACCEPT 24
  ------------------
  |  Branch (3158:5): [True: 0, False: 16.1k]
  ------------------
 3159|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept);
 3160|      0|    case SSL_CTRL_SESS_ACCEPT_GOOD:
  ------------------
  |  | 1295|      0|#define SSL_CTRL_SESS_ACCEPT_GOOD 25
  ------------------
  |  Branch (3160:5): [True: 0, False: 16.1k]
  ------------------
 3161|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept_good);
 3162|      0|    case SSL_CTRL_SESS_ACCEPT_RENEGOTIATE:
  ------------------
  |  | 1296|      0|#define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26
  ------------------
  |  Branch (3162:5): [True: 0, False: 16.1k]
  ------------------
 3163|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept_renegotiate);
 3164|      0|    case SSL_CTRL_SESS_HIT:
  ------------------
  |  | 1297|      0|#define SSL_CTRL_SESS_HIT 27
  ------------------
  |  Branch (3164:5): [True: 0, False: 16.1k]
  ------------------
 3165|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_hit);
 3166|      0|    case SSL_CTRL_SESS_CB_HIT:
  ------------------
  |  | 1298|      0|#define SSL_CTRL_SESS_CB_HIT 28
  ------------------
  |  Branch (3166:5): [True: 0, False: 16.1k]
  ------------------
 3167|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_cb_hit);
 3168|      0|    case SSL_CTRL_SESS_MISSES:
  ------------------
  |  | 1299|      0|#define SSL_CTRL_SESS_MISSES 29
  ------------------
  |  Branch (3168:5): [True: 0, False: 16.1k]
  ------------------
 3169|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_miss);
 3170|      0|    case SSL_CTRL_SESS_TIMEOUTS:
  ------------------
  |  | 1300|      0|#define SSL_CTRL_SESS_TIMEOUTS 30
  ------------------
  |  Branch (3170:5): [True: 0, False: 16.1k]
  ------------------
 3171|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_timeout);
 3172|      0|    case SSL_CTRL_SESS_CACHE_FULL:
  ------------------
  |  | 1301|      0|#define SSL_CTRL_SESS_CACHE_FULL 31
  ------------------
  |  Branch (3172:5): [True: 0, False: 16.1k]
  ------------------
 3173|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_cache_full);
 3174|  2.70k|    case SSL_CTRL_MODE:
  ------------------
  |  | 1302|  2.70k|#define SSL_CTRL_MODE 33
  ------------------
  |  Branch (3174:5): [True: 2.70k, False: 13.4k]
  ------------------
 3175|  2.70k|        return (ctx->mode |= larg);
 3176|      0|    case SSL_CTRL_CLEAR_MODE:
  ------------------
  |  | 1345|      0|#define SSL_CTRL_CLEAR_MODE 78
  ------------------
  |  Branch (3176:5): [True: 0, False: 16.1k]
  ------------------
 3177|      0|        return (ctx->mode &= ~larg);
 3178|      0|    case SSL_CTRL_SET_MAX_SEND_FRAGMENT:
  ------------------
  |  | 1311|      0|#define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52
  ------------------
  |  Branch (3178:5): [True: 0, False: 16.1k]
  ------------------
 3179|      0|        if (larg < 512 || larg > SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (3179:13): [True: 0, False: 0]
  |  Branch (3179:27): [True: 0, False: 0]
  ------------------
 3180|      0|            return 0;
 3181|      0|        ctx->max_send_fragment = larg;
 3182|      0|        if (ctx->max_send_fragment < ctx->split_send_fragment)
  ------------------
  |  Branch (3182:13): [True: 0, False: 0]
  ------------------
 3183|      0|            ctx->split_send_fragment = ctx->max_send_fragment;
 3184|      0|        return 1;
 3185|      0|    case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
  ------------------
  |  | 1379|      0|#define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125
  ------------------
  |  Branch (3185:5): [True: 0, False: 16.1k]
  ------------------
 3186|      0|        if ((size_t)larg > ctx->max_send_fragment || larg == 0)
  ------------------
  |  Branch (3186:13): [True: 0, False: 0]
  |  Branch (3186:54): [True: 0, False: 0]
  ------------------
 3187|      0|            return 0;
 3188|      0|        ctx->split_send_fragment = larg;
 3189|      0|        return 1;
 3190|      0|    case SSL_CTRL_SET_MAX_PIPELINES:
  ------------------
  |  | 1380|      0|#define SSL_CTRL_SET_MAX_PIPELINES 126
  ------------------
  |  Branch (3190:5): [True: 0, False: 16.1k]
  ------------------
 3191|      0|        if (larg < 1 || larg > SSL_MAX_PIPELINES)
  ------------------
  |  |   71|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (3191:13): [True: 0, False: 0]
  |  Branch (3191:25): [True: 0, False: 0]
  ------------------
 3192|      0|            return 0;
 3193|      0|        ctx->max_pipelines = larg;
 3194|      0|        return 1;
 3195|      0|    case SSL_CTRL_CERT_FLAGS:
  ------------------
  |  | 1357|      0|#define SSL_CTRL_CERT_FLAGS 99
  ------------------
  |  Branch (3195:5): [True: 0, False: 16.1k]
  ------------------
 3196|      0|        return (ctx->cert->cert_flags |= larg);
 3197|      0|    case SSL_CTRL_CLEAR_CERT_FLAGS:
  ------------------
  |  | 1358|      0|#define SSL_CTRL_CLEAR_CERT_FLAGS 100
  ------------------
  |  Branch (3197:5): [True: 0, False: 16.1k]
  ------------------
 3198|      0|        return (ctx->cert->cert_flags &= ~larg);
 3199|  2.70k|    case SSL_CTRL_SET_MIN_PROTO_VERSION:
  ------------------
  |  | 1377|  2.70k|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  ------------------
  |  Branch (3199:5): [True: 2.70k, False: 13.4k]
  ------------------
 3200|  2.70k|        return ssl_check_allowed_versions(larg, ctx->max_proto_version)
  ------------------
  |  Branch (3200:16): [True: 2.70k, False: 0]
  ------------------
 3201|  2.70k|            && ssl_set_version_bound(ctx->method->version, (int)larg,
  ------------------
  |  Branch (3201:16): [True: 2.70k, False: 0]
  ------------------
 3202|  2.70k|                &ctx->min_proto_version);
 3203|      0|    case SSL_CTRL_GET_MIN_PROTO_VERSION:
  ------------------
  |  | 1384|      0|#define SSL_CTRL_GET_MIN_PROTO_VERSION 130
  ------------------
  |  Branch (3203:5): [True: 0, False: 16.1k]
  ------------------
 3204|      0|        return ctx->min_proto_version;
 3205|  2.70k|    case SSL_CTRL_SET_MAX_PROTO_VERSION:
  ------------------
  |  | 1378|  2.70k|#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
  ------------------
  |  Branch (3205:5): [True: 2.70k, False: 13.4k]
  ------------------
 3206|  2.70k|        return ssl_check_allowed_versions(ctx->min_proto_version, larg)
  ------------------
  |  Branch (3206:16): [True: 2.70k, False: 0]
  ------------------
 3207|  2.70k|            && ssl_set_version_bound(ctx->method->version, (int)larg,
  ------------------
  |  Branch (3207:16): [True: 2.70k, False: 0]
  ------------------
 3208|  2.70k|                &ctx->max_proto_version);
 3209|      0|    case SSL_CTRL_GET_MAX_PROTO_VERSION:
  ------------------
  |  | 1385|      0|#define SSL_CTRL_GET_MAX_PROTO_VERSION 131
  ------------------
  |  Branch (3209:5): [True: 0, False: 16.1k]
  ------------------
 3210|      0|        return ctx->max_proto_version;
 3211|  3.34k|    default:
  ------------------
  |  Branch (3211:5): [True: 3.34k, False: 12.7k]
  ------------------
 3212|  3.34k|        return ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg);
 3213|  16.1k|    }
 3214|  16.1k|}
ssl_cipher_id_cmp:
 3231|    405|{
 3232|    405|    if (a->id > b->id)
  ------------------
  |  Branch (3232:9): [True: 140, False: 265]
  ------------------
 3233|    140|        return 1;
 3234|    265|    if (a->id < b->id)
  ------------------
  |  Branch (3234:9): [True: 236, False: 29]
  ------------------
 3235|    236|        return -1;
 3236|     29|    return 0;
 3237|    265|}
ssl_cipher_ptr_id_cmp:
 3241|   793k|{
 3242|   793k|    if ((*ap)->id > (*bp)->id)
  ------------------
  |  Branch (3242:9): [True: 445k, False: 347k]
  ------------------
 3243|   445k|        return 1;
 3244|   347k|    if ((*ap)->id < (*bp)->id)
  ------------------
  |  Branch (3244:9): [True: 347k, False: 133]
  ------------------
 3245|   347k|        return -1;
 3246|    133|    return 0;
 3247|   347k|}
SSL_get_ciphers:
 3254|  5.72k|{
 3255|  5.72k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  5.72k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  5.72k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 5.72k]
  |  |  |  |  ------------------
  |  |  |  |   33|  5.72k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  5.72k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 5.72k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  5.72k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  5.72k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3256|       |
 3257|  5.72k|    if (sc != NULL) {
  ------------------
  |  Branch (3257:9): [True: 5.72k, False: 0]
  ------------------
 3258|  5.72k|        if (sc->cipher_list != NULL) {
  ------------------
  |  Branch (3258:13): [True: 0, False: 5.72k]
  ------------------
 3259|      0|            return sc->cipher_list;
 3260|  5.72k|        } else if ((s->ctx != NULL) && (s->ctx->cipher_list != NULL)) {
  ------------------
  |  Branch (3260:20): [True: 5.72k, False: 0]
  |  Branch (3260:40): [True: 5.72k, False: 0]
  ------------------
 3261|  5.72k|            return s->ctx->cipher_list;
 3262|  5.72k|        }
 3263|  5.72k|    }
 3264|      0|    return NULL;
 3265|  5.72k|}
SSL_get1_supported_ciphers:
 3277|  3.77k|{
 3278|  3.77k|    STACK_OF(SSL_CIPHER) *sk = NULL, *ciphers;
  ------------------
  |  |   33|  3.77k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3279|  3.77k|    int i;
 3280|  3.77k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  3.77k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  3.77k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.77k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.77k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  3.77k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.77k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.77k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.77k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3281|       |
 3282|  3.77k|    if (sc == NULL)
  ------------------
  |  Branch (3282:9): [True: 0, False: 3.77k]
  ------------------
 3283|      0|        return NULL;
 3284|       |
 3285|  3.77k|    ciphers = SSL_get_ciphers(s);
 3286|  3.77k|    if (!ciphers)
  ------------------
  |  Branch (3286:9): [True: 0, False: 3.77k]
  ------------------
 3287|      0|        return NULL;
 3288|  3.77k|    if (!ssl_set_client_disabled(sc))
  ------------------
  |  Branch (3288:9): [True: 0, False: 3.77k]
  ------------------
 3289|      0|        return NULL;
 3290|   224k|    for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1005|   224k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3290:17): [True: 221k, False: 3.77k]
  ------------------
 3291|   221k|        const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1006|   221k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3292|   221k|        if (!ssl_cipher_disabled(sc, c, SSL_SECOP_CIPHER_SUPPORTED, 0)) {
  ------------------
  |  | 2752|   221k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|   221k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (3292:13): [True: 108k, False: 112k]
  ------------------
 3293|   108k|            if (!sk)
  ------------------
  |  Branch (3293:17): [True: 3.77k, False: 105k]
  ------------------
 3294|  3.77k|                sk = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1008|  3.77k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_new_null())
  ------------------
 3295|   108k|            if (!sk)
  ------------------
  |  Branch (3295:17): [True: 0, False: 108k]
  ------------------
 3296|      0|                return NULL;
 3297|   108k|            if (!sk_SSL_CIPHER_push(sk, c)) {
  ------------------
  |  | 1015|   108k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (3297:17): [True: 0, False: 108k]
  ------------------
 3298|      0|                sk_SSL_CIPHER_free(sk);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 3299|      0|                return NULL;
 3300|      0|            }
 3301|   108k|        }
 3302|   221k|    }
 3303|  3.77k|    return sk;
 3304|  3.77k|}
ssl_get_ciphers_by_id:
 3309|     22|{
 3310|     22|    if (s != NULL) {
  ------------------
  |  Branch (3310:9): [True: 22, False: 0]
  ------------------
 3311|     22|        if (s->cipher_list_by_id != NULL)
  ------------------
  |  Branch (3311:13): [True: 0, False: 22]
  ------------------
 3312|      0|            return s->cipher_list_by_id;
 3313|     22|        else if (s->ssl.ctx != NULL
  ------------------
  |  Branch (3313:18): [True: 22, False: 0]
  ------------------
 3314|     22|            && s->ssl.ctx->cipher_list_by_id != NULL)
  ------------------
  |  Branch (3314:16): [True: 22, False: 0]
  ------------------
 3315|     22|            return s->ssl.ctx->cipher_list_by_id;
 3316|     22|    }
 3317|      0|    return NULL;
 3318|     22|}
SSL_CTX_set_cipher_list:
 3368|    835|{
 3369|    835|    STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|    835|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3370|       |
 3371|    835|    sk = ssl_create_cipher_list(ctx, ctx->tls13_ciphersuites,
 3372|    835|        &ctx->cipher_list, &ctx->cipher_list_by_id, str,
 3373|    835|        ctx->cert);
 3374|       |    /*
 3375|       |     * ssl_create_cipher_list may return an empty stack if it was unable to
 3376|       |     * find a cipher matching the given rule string (for example if the rule
 3377|       |     * string specifies a cipher which has been disabled). This is not an
 3378|       |     * error as far as ssl_create_cipher_list is concerned, and hence
 3379|       |     * ctx->cipher_list and ctx->cipher_list_by_id has been updated.
 3380|       |     */
 3381|    835|    if (sk == NULL)
  ------------------
  |  Branch (3381:9): [True: 282, False: 553]
  ------------------
 3382|    282|        return 0;
 3383|    553|    if (ctx->method->num_ciphers() > 0 && cipher_list_tls12_num(sk) == 0) {
  ------------------
  |  Branch (3383:9): [True: 553, False: 0]
  |  Branch (3383:43): [True: 297, False: 256]
  ------------------
 3384|    297|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
  ------------------
  |  |  404|    297|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|    297|    (ERR_new(),                                                  \
  |  |  |  |  407|    297|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    297|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|    297|        ERR_set_error)
  |  |  ------------------
  ------------------
 3385|    297|        return 0;
 3386|    297|    }
 3387|    256|    return 1;
 3388|    553|}
SSL_set_alpn_protos:
 3752|    294|{
 3753|    294|    unsigned char *alpn;
 3754|    294|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(ssl);
  ------------------
  |  |   39|    294|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|    294|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 294]
  |  |  |  |  ------------------
  |  |  |  |   33|    294|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|    294|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 294, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    294|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    294|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3755|       |
 3756|    294|    if (sc == NULL)
  ------------------
  |  Branch (3756:9): [True: 0, False: 294]
  ------------------
 3757|      0|        return 1;
 3758|       |
 3759|    294|    if (protos_len == 0 || protos == NULL) {
  ------------------
  |  Branch (3759:9): [True: 0, False: 294]
  |  Branch (3759:28): [True: 0, False: 294]
  ------------------
 3760|      0|        OPENSSL_free(sc->ext.alpn);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3761|      0|        sc->ext.alpn = NULL;
 3762|      0|        sc->ext.alpn_len = 0;
 3763|      0|        return 0;
 3764|      0|    }
 3765|       |    /* Not valid per RFC */
 3766|    294|    if (!alpn_value_ok(protos, protos_len))
  ------------------
  |  Branch (3766:9): [True: 0, False: 294]
  ------------------
 3767|      0|        return 1;
 3768|       |
 3769|    294|    alpn = OPENSSL_memdup(protos, protos_len);
  ------------------
  |  |  133|    294|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3770|    294|    if (alpn == NULL)
  ------------------
  |  Branch (3770:9): [True: 0, False: 294]
  ------------------
 3771|      0|        return 1;
 3772|    294|    OPENSSL_free(sc->ext.alpn);
  ------------------
  |  |  131|    294|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3773|    294|    sc->ext.alpn = alpn;
 3774|    294|    sc->ext.alpn_len = protos_len;
 3775|       |
 3776|    294|    return 0;
 3777|    294|}
SSL_CTX_new_ex:
 3991|  2.78k|{
 3992|  2.78k|    SSL_CTX *ret = NULL;
 3993|       |#ifndef OPENSSL_NO_SSLKEYLOG
 3994|       |    const char *keylogfile = ossl_safe_getenv("SSLKEYLOGFILE");
 3995|       |#endif
 3996|       |#ifndef OPENSSL_NO_COMP_ALG
 3997|       |    int i;
 3998|       |#endif
 3999|       |
 4000|  2.78k|    if (meth == NULL) {
  ------------------
  |  Branch (4000:9): [True: 0, False: 2.78k]
  ------------------
 4001|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NULL_SSL_METHOD_PASSED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4002|      0|        return NULL;
 4003|      0|    }
 4004|       |
 4005|  2.78k|    if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))
  ------------------
  |  | 2822|  2.78k|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (4005:9): [True: 0, False: 2.78k]
  ------------------
 4006|      0|        return NULL;
 4007|       |
 4008|       |    /* Doing this for the run once effect */
 4009|  2.78k|    if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) {
  ------------------
  |  Branch (4009:9): [True: 0, False: 2.78k]
  ------------------
 4010|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4011|      0|        goto err;
 4012|      0|    }
 4013|       |
 4014|  2.78k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.78k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4015|  2.78k|    if (ret == NULL)
  ------------------
  |  Branch (4015:9): [True: 0, False: 2.78k]
  ------------------
 4016|      0|        return NULL;
 4017|       |
 4018|       |    /* Init the reference counting before any call to SSL_CTX_free */
 4019|  2.78k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (4019:9): [True: 0, False: 2.78k]
  ------------------
 4020|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4021|      0|        return NULL;
 4022|      0|    }
 4023|       |
 4024|  2.78k|    ret->lock = CRYPTO_THREAD_lock_new();
 4025|  2.78k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (4025:9): [True: 0, False: 2.78k]
  ------------------
 4026|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4027|      0|        goto err;
 4028|      0|    }
 4029|       |
 4030|       |#ifdef TSAN_REQUIRES_LOCKING
 4031|       |    ret->tsan_lock = CRYPTO_THREAD_lock_new();
 4032|       |    if (ret->tsan_lock == NULL) {
 4033|       |        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
 4034|       |        goto err;
 4035|       |    }
 4036|       |#endif
 4037|       |
 4038|  2.78k|    ret->libctx = libctx;
 4039|  2.78k|    if (propq != NULL) {
  ------------------
  |  Branch (4039:9): [True: 614, False: 2.17k]
  ------------------
 4040|    614|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|    614|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4041|    614|        if (ret->propq == NULL)
  ------------------
  |  Branch (4041:13): [True: 0, False: 614]
  ------------------
 4042|      0|            goto err;
 4043|    614|    }
 4044|       |
 4045|  2.78k|    ret->method = meth;
 4046|  2.78k|    ret->min_proto_version = 0;
 4047|  2.78k|    ret->max_proto_version = 0;
 4048|  2.78k|    ret->mode = SSL_MODE_AUTO_RETRY;
  ------------------
  |  |  508|  2.78k|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
 4049|  2.78k|    ret->session_cache_mode = SSL_SESS_CACHE_SERVER;
  ------------------
  |  |  713|  2.78k|#define SSL_SESS_CACHE_SERVER 0x0002
  ------------------
 4050|  2.78k|    ret->session_cache_size = SSL_SESSION_CACHE_MAX_SIZE_DEFAULT;
  ------------------
  |  |  694|  2.78k|#define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024 * 20)
  ------------------
 4051|       |    /* We take the system default. */
 4052|  2.78k|    ret->session_timeout = meth->get_timeout();
 4053|  2.78k|    ret->max_cert_list = SSL_MAX_CERT_LIST_DEFAULT;
  ------------------
  |  |  692|  2.78k|#define SSL_MAX_CERT_LIST_DEFAULT (1024 * 100)
  ------------------
 4054|  2.78k|    ret->verify_mode = SSL_VERIFY_NONE;
  ------------------
  |  | 1177|  2.78k|#define SSL_VERIFY_NONE 0x00
  ------------------
 4055|       |
 4056|  2.78k|    ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
 4057|  2.78k|    if (ret->sessions == NULL) {
  ------------------
  |  Branch (4057:9): [True: 0, False: 2.78k]
  ------------------
 4058|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4059|      0|        goto err;
 4060|      0|    }
 4061|  2.78k|    ret->cert_store = X509_STORE_new();
 4062|  2.78k|    if (ret->cert_store == NULL) {
  ------------------
  |  Branch (4062:9): [True: 0, False: 2.78k]
  ------------------
 4063|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4064|      0|        goto err;
 4065|      0|    }
 4066|  2.78k|#ifndef OPENSSL_NO_CT
 4067|  2.78k|    ret->ctlog_store = CTLOG_STORE_new_ex(libctx, propq);
 4068|  2.78k|    if (ret->ctlog_store == NULL) {
  ------------------
  |  Branch (4068:9): [True: 0, False: 2.78k]
  ------------------
 4069|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CT_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4070|      0|        goto err;
 4071|      0|    }
 4072|  2.78k|#endif
 4073|       |
 4074|       |    /* initialize cipher/digest methods table */
 4075|  2.78k|    if (!ssl_load_ciphers(ret)) {
  ------------------
  |  Branch (4075:9): [True: 0, False: 2.78k]
  ------------------
 4076|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4077|      0|        goto err;
 4078|      0|    }
 4079|       |
 4080|  2.78k|    if (!ssl_load_groups(ret)) {
  ------------------
  |  Branch (4080:9): [True: 0, False: 2.78k]
  ------------------
 4081|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4082|      0|        goto err;
 4083|      0|    }
 4084|       |
 4085|       |    /* load provider sigalgs */
 4086|  2.78k|    if (!ssl_load_sigalgs(ret)) {
  ------------------
  |  Branch (4086:9): [True: 0, False: 2.78k]
  ------------------
 4087|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4088|      0|        goto err;
 4089|      0|    }
 4090|       |
 4091|       |    /* initialise sig algs */
 4092|  2.78k|    if (!ssl_setup_sigalgs(ret)) {
  ------------------
  |  Branch (4092:9): [True: 0, False: 2.78k]
  ------------------
 4093|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4094|      0|        goto err;
 4095|      0|    }
 4096|       |
 4097|  2.78k|    if (!SSL_CTX_set_ciphersuites(ret, OSSL_default_ciphersuites())) {
  ------------------
  |  Branch (4097:9): [True: 0, False: 2.78k]
  ------------------
 4098|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4099|      0|        goto err;
 4100|      0|    }
 4101|       |
 4102|  2.78k|    if ((ret->cert = ssl_cert_new(SSL_PKEY_NUM + ret->sigalg_list_len)) == NULL) {
  ------------------
  |  |  328|  2.78k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (4102:9): [True: 0, False: 2.78k]
  ------------------
 4103|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4104|      0|        goto err;
 4105|      0|    }
 4106|       |
 4107|  2.78k|    if (!ssl_create_cipher_list(ret,
  ------------------
  |  Branch (4107:9): [True: 0, False: 2.78k]
  ------------------
 4108|  2.78k|            ret->tls13_ciphersuites,
 4109|  2.78k|            &ret->cipher_list, &ret->cipher_list_by_id,
 4110|  2.78k|            OSSL_default_cipher_list(), ret->cert)
 4111|  2.78k|        || sk_SSL_CIPHER_num(ret->cipher_list) <= 0) {
  ------------------
  |  | 1005|  2.78k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4111:12): [True: 79, False: 2.70k]
  ------------------
 4112|     79|        ERR_raise(ERR_LIB_SSL, SSL_R_LIBRARY_HAS_NO_CIPHERS);
  ------------------
  |  |  404|     79|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     79|    (ERR_new(),                                                  \
  |  |  |  |  407|     79|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     79|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     79|        ERR_set_error)
  |  |  ------------------
  ------------------
 4113|     79|        goto err;
 4114|     79|    }
 4115|       |
 4116|  2.70k|    ret->param = X509_VERIFY_PARAM_new();
 4117|  2.70k|    if (ret->param == NULL) {
  ------------------
  |  Branch (4117:9): [True: 0, False: 2.70k]
  ------------------
 4118|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4119|      0|        goto err;
 4120|      0|    }
 4121|       |
 4122|       |    /*
 4123|       |     * If these aren't available from the provider we'll get NULL returns.
 4124|       |     * That's fine but will cause errors later if SSLv3 is negotiated
 4125|       |     */
 4126|  2.70k|    ret->md5 = ssl_evp_md_fetch(libctx, NID_md5, propq);
  ------------------
  |  | 1238|  2.70k|#define NID_md5         4
  ------------------
 4127|  2.70k|    ret->sha1 = ssl_evp_md_fetch(libctx, NID_sha1, propq);
  ------------------
  |  | 2344|  2.70k|#define NID_sha1                64
  ------------------
 4128|       |
 4129|  2.70k|    if ((ret->ca_names = sk_X509_NAME_new_null()) == NULL) {
  ------------------
  |  |   59|  2.70k|#define sk_X509_NAME_new_null() ((STACK_OF(X509_NAME) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (4129:9): [True: 0, False: 2.70k]
  ------------------
 4130|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4131|      0|        goto err;
 4132|      0|    }
 4133|       |
 4134|  2.70k|    if ((ret->client_ca_names = sk_X509_NAME_new_null()) == NULL) {
  ------------------
  |  |   59|  2.70k|#define sk_X509_NAME_new_null() ((STACK_OF(X509_NAME) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (4134:9): [True: 0, False: 2.70k]
  ------------------
 4135|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4136|      0|        goto err;
 4137|      0|    }
 4138|       |
 4139|  2.70k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data)) {
  ------------------
  |  |  251|  2.70k|#define CRYPTO_EX_INDEX_SSL_CTX 1
  ------------------
  |  Branch (4139:9): [True: 0, False: 2.70k]
  ------------------
 4140|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4141|      0|        goto err;
 4142|      0|    }
 4143|       |
 4144|  2.70k|    if ((ret->ext.secure = OPENSSL_secure_zalloc(sizeof(*ret->ext.secure))) == NULL)
  ------------------
  |  |  141|  2.70k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4144:9): [True: 0, False: 2.70k]
  ------------------
 4145|      0|        goto err;
 4146|       |
 4147|       |    /* No compression for DTLS */
 4148|  2.70k|    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS))
  ------------------
  |  | 2190|  2.70k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (4148:9): [True: 2.70k, False: 0]
  ------------------
 4149|  2.70k|        ret->comp_methods = SSL_COMP_get_compression_methods();
 4150|       |
 4151|  2.70k|    ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  2.70k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4152|  2.70k|    ret->split_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  2.70k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4153|       |
 4154|       |    /* Setup RFC5077 ticket keys */
 4155|  2.70k|    if ((RAND_bytes_ex(libctx, ret->ext.tick_key_name,
  ------------------
  |  Branch (4155:9): [True: 0, False: 2.70k]
  ------------------
 4156|  2.70k|             sizeof(ret->ext.tick_key_name), 0)
 4157|  2.70k|            <= 0)
 4158|  2.70k|        || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_hmac_key,
  ------------------
  |  Branch (4158:12): [True: 0, False: 2.70k]
  ------------------
 4159|  2.70k|                sizeof(ret->ext.secure->tick_hmac_key), 0)
 4160|  2.70k|            <= 0)
 4161|  2.70k|        || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_aes_key,
  ------------------
  |  Branch (4161:12): [True: 0, False: 2.70k]
  ------------------
 4162|  2.70k|                sizeof(ret->ext.secure->tick_aes_key), 0)
 4163|  2.70k|            <= 0))
 4164|      0|        ret->options |= SSL_OP_NO_TICKET;
  ------------------
  |  |  383|      0|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 4165|       |
 4166|  2.70k|    if (RAND_priv_bytes_ex(libctx, ret->ext.cookie_hmac_key,
  ------------------
  |  Branch (4166:9): [True: 0, False: 2.70k]
  ------------------
 4167|  2.70k|            sizeof(ret->ext.cookie_hmac_key), 0)
 4168|  2.70k|        <= 0) {
 4169|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_RAND_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4170|      0|        goto err;
 4171|      0|    }
 4172|       |
 4173|  2.70k|#ifndef OPENSSL_NO_SRP
 4174|  2.70k|    if (!ssl_ctx_srp_ctx_init_intern(ret)) {
  ------------------
  |  Branch (4174:9): [True: 0, False: 2.70k]
  ------------------
 4175|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4176|      0|        goto err;
 4177|      0|    }
 4178|  2.70k|#endif
 4179|  2.70k|#ifndef OPENSSL_NO_ENGINE
 4180|       |#ifdef OPENSSL_SSL_CLIENT_ENGINE_AUTO
 4181|       |#define eng_strx(x) #x
 4182|       |#define eng_str(x) eng_strx(x)
 4183|       |    /* Use specific client engine automatically... ignore errors */
 4184|       |    {
 4185|       |        ENGINE *eng;
 4186|       |        eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO));
 4187|       |        if (!eng) {
 4188|       |            ERR_clear_error();
 4189|       |            ENGINE_load_builtin_engines();
 4190|       |            eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO));
 4191|       |        }
 4192|       |        if (!eng || !SSL_CTX_set_client_cert_engine(ret, eng))
 4193|       |            ERR_clear_error();
 4194|       |    }
 4195|       |#endif
 4196|  2.70k|#endif
 4197|       |
 4198|       |#ifndef OPENSSL_NO_COMP_ALG
 4199|       |    /*
 4200|       |     * Set the default order: brotli, zlib, zstd
 4201|       |     * Including only those enabled algorithms
 4202|       |     */
 4203|       |    memset(ret->cert_comp_prefs, 0, sizeof(ret->cert_comp_prefs));
 4204|       |    i = 0;
 4205|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_brotli))
 4206|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_brotli;
 4207|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_zlib))
 4208|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_zlib;
 4209|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_zstd))
 4210|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_zstd;
 4211|       |#endif
 4212|       |    /*
 4213|       |     * Disable compression by default to prevent CRIME. Applications can
 4214|       |     * re-enable compression by configuring
 4215|       |     * SSL_CTX_clear_options(ctx, SSL_OP_NO_COMPRESSION);
 4216|       |     * or by using the SSL_CONF library. Similarly we also enable TLSv1.3
 4217|       |     * middlebox compatibility by default. This may be disabled by default in
 4218|       |     * a later OpenSSL version.
 4219|       |     */
 4220|  2.70k|    ret->options |= SSL_OP_NO_COMPRESSION | SSL_OP_ENABLE_MIDDLEBOX_COMPAT;
  ------------------
  |  |  394|  2.70k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  350|  2.70k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
                  ret->options |= SSL_OP_NO_COMPRESSION | SSL_OP_ENABLE_MIDDLEBOX_COMPAT;
  ------------------
  |  |  403|  2.70k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|  2.70k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 4221|       |
 4222|  2.70k|    ret->ext.status_type = TLSEXT_STATUSTYPE_nothing;
  ------------------
  |  | 2207|  2.70k|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
 4223|       |
 4224|       |    /*
 4225|       |     * We cannot usefully set a default max_early_data here (which gets
 4226|       |     * propagated in SSL_new(), for the following reason: setting the
 4227|       |     * SSL field causes tls_construct_stoc_early_data() to tell the
 4228|       |     * client that early data will be accepted when constructing a TLS 1.3
 4229|       |     * session ticket, and the client will accordingly send us early data
 4230|       |     * when using that ticket (if the client has early data to send).
 4231|       |     * However, in order for the early data to actually be consumed by
 4232|       |     * the application, the application must also have calls to
 4233|       |     * SSL_read_early_data(); otherwise we'll just skip past the early data
 4234|       |     * and ignore it.  So, since the application must add calls to
 4235|       |     * SSL_read_early_data(), we also require them to add
 4236|       |     * calls to SSL_CTX_set_max_early_data() in order to use early data,
 4237|       |     * eliminating the bandwidth-wasting early data in the case described
 4238|       |     * above.
 4239|       |     */
 4240|  2.70k|    ret->max_early_data = 0;
 4241|       |
 4242|       |    /*
 4243|       |     * Default recv_max_early_data is a fully loaded single record. Could be
 4244|       |     * split across multiple records in practice. We set this differently to
 4245|       |     * max_early_data so that, in the default case, we do not advertise any
 4246|       |     * support for early_data, but if a client were to send us some (e.g.
 4247|       |     * because of an old, stale ticket) then we will tolerate it and skip over
 4248|       |     * it.
 4249|       |     */
 4250|  2.70k|    ret->recv_max_early_data = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  2.70k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4251|       |
 4252|       |    /* By default we send two session tickets automatically in TLSv1.3 */
 4253|  2.70k|    ret->num_tickets = 2;
 4254|       |
 4255|  2.70k|#ifndef OPENSSL_NO_QUIC
 4256|       |    /* only create a cache for client CTX-es */
 4257|  2.70k|    if (meth == OSSL_QUIC_client_method())
  ------------------
  |  Branch (4257:9): [True: 0, False: 2.70k]
  ------------------
 4258|      0|        if ((ret->tokencache = ossl_quic_new_token_store()) == NULL)
  ------------------
  |  Branch (4258:13): [True: 0, False: 0]
  ------------------
 4259|      0|            goto err;
 4260|  2.70k|    ret->domain_flags = 0;
 4261|  2.70k|    if (IS_QUIC_METHOD(meth)) {
  ------------------
  |  |   52|  2.70k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method())
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 0, False: 2.70k]
  |  |  |  Branch (52:42): [True: 0, False: 2.70k]
  |  |  |  Branch (52:85): [True: 0, False: 2.70k]
  |  |  ------------------
  ------------------
 4262|      0|#if defined(OPENSSL_THREADS)
 4263|      0|        if (meth == OSSL_QUIC_client_thread_method())
  ------------------
  |  Branch (4263:13): [True: 0, False: 0]
  ------------------
 4264|      0|            ret->domain_flags
 4265|      0|                = SSL_DOMAIN_FLAG_MULTI_THREAD
  ------------------
  |  | 2386|      0|#define SSL_DOMAIN_FLAG_MULTI_THREAD (1U << 1)
  ------------------
 4266|      0|                | SSL_DOMAIN_FLAG_THREAD_ASSISTED
  ------------------
  |  | 2387|      0|#define SSL_DOMAIN_FLAG_THREAD_ASSISTED (1U << 2)
  ------------------
 4267|      0|                | SSL_DOMAIN_FLAG_BLOCKING;
  ------------------
  |  | 2388|      0|#define SSL_DOMAIN_FLAG_BLOCKING (1U << 3)
  ------------------
 4268|      0|        else
 4269|      0|            ret->domain_flags
 4270|      0|                = SSL_DOMAIN_FLAG_MULTI_THREAD
  ------------------
  |  | 2386|      0|#define SSL_DOMAIN_FLAG_MULTI_THREAD (1U << 1)
  ------------------
 4271|      0|                | SSL_DOMAIN_FLAG_LEGACY_BLOCKING;
  ------------------
  |  | 2389|      0|#define SSL_DOMAIN_FLAG_LEGACY_BLOCKING (1U << 4)
  ------------------
 4272|       |#else
 4273|       |        ret->domain_flags
 4274|       |            = SSL_DOMAIN_FLAG_SINGLE_THREAD
 4275|       |            | SSL_DOMAIN_FLAG_LEGACY_BLOCKING;
 4276|       |#endif
 4277|      0|    }
 4278|  2.70k|#endif
 4279|       |
 4280|  2.70k|    if (!ssl_ctx_system_config(ret)) {
  ------------------
  |  Branch (4280:9): [True: 0, False: 2.70k]
  ------------------
 4281|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_ERROR_IN_SYSTEM_DEFAULT_CONFIG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4282|      0|        goto err;
 4283|      0|    }
 4284|       |
 4285|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4286|       |    if (keylogfile != NULL && strlen(keylogfile) != 0) {
 4287|       |        /* Make sure we have a global lock allocated */
 4288|       |        if (!RUN_ONCE(&ssl_keylog_once, ssl_keylog_init)) {
 4289|       |            /* use a trace message as a warning */
 4290|       |            OSSL_TRACE(TLS, "Unable to initialize keylog data\n");
 4291|       |            goto out;
 4292|       |        }
 4293|       |
 4294|       |        /* Grab our global lock */
 4295|       |        if (!CRYPTO_THREAD_write_lock(keylog_lock)) {
 4296|       |            OSSL_TRACE(TLS, "Unable to acquire keylog write lock\n");
 4297|       |            goto out;
 4298|       |        } else {
 4299|       |            /*
 4300|       |             * If the bio for the requested keylog file hasn't been
 4301|       |             * created yet, go ahead and create it, and set it to append
 4302|       |             * if its already there.
 4303|       |             */
 4304|       |            if (keylog_bio == NULL) {
 4305|       |                keylog_bio = get_sslkeylog_bio(keylogfile);
 4306|       |                if (keylog_bio == NULL) {
 4307|       |                    OSSL_TRACE(TLS, "Unable to create keylog bio\n");
 4308|       |                    goto out;
 4309|       |                }
 4310|       |                BIO_set_callback_ex(keylog_bio, check_keylog_bio_free);
 4311|       |            } else {
 4312|       |                /* up our refcount for the already-created case */
 4313|       |                BIO_up_ref(keylog_bio);
 4314|       |            }
 4315|       |            /* If we have a bio now, assign the callback handler */
 4316|       |            if (keylog_bio != NULL)
 4317|       |                ret->do_sslkeylog = 1;
 4318|       |            /* unlock, and we're done */
 4319|       |            CRYPTO_THREAD_unlock(keylog_lock);
 4320|       |        }
 4321|       |    }
 4322|       |out:
 4323|       |#endif
 4324|  2.70k|    return ret;
 4325|     79|err:
 4326|     79|    SSL_CTX_free(ret);
 4327|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4328|       |    BIO_free(keylog_bio);
 4329|       |#endif
 4330|       |    return NULL;
 4331|  2.70k|}
SSL_CTX_new:
 4334|  2.15k|{
 4335|  2.15k|    return SSL_CTX_new_ex(NULL, NULL, meth);
 4336|  2.15k|}
SSL_CTX_up_ref:
 4339|  3.91k|{
 4340|  3.91k|    int i;
 4341|       |
 4342|  3.91k|    if (CRYPTO_UP_REF(&ctx->references, &i) <= 0)
  ------------------
  |  Branch (4342:9): [True: 0, False: 3.91k]
  ------------------
 4343|      0|        return 0;
 4344|       |
 4345|  3.91k|    REF_PRINT_COUNT("SSL_CTX", i, ctx);
  ------------------
  |  |  301|  3.91k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  3.91k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  3.91k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  3.91k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4346|  3.91k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|  3.91k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 3.91k]
  |  |  ------------------
  ------------------
 4347|  3.91k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (4347:13): [True: 3.91k, False: 0]
  ------------------
 4348|  3.91k|}
SSL_CTX_free:
 4351|  6.69k|{
 4352|  6.69k|    int i;
 4353|  6.69k|    size_t j;
 4354|       |
 4355|  6.69k|    if (a == NULL)
  ------------------
  |  Branch (4355:9): [True: 0, False: 6.69k]
  ------------------
 4356|      0|        return;
 4357|       |
 4358|  6.69k|    CRYPTO_DOWN_REF(&a->references, &i);
 4359|  6.69k|    REF_PRINT_COUNT("SSL_CTX", i, a);
  ------------------
  |  |  301|  6.69k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  6.69k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  6.69k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  6.69k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4360|  6.69k|    if (i > 0)
  ------------------
  |  Branch (4360:9): [True: 3.91k, False: 2.78k]
  ------------------
 4361|  3.91k|        return;
 4362|  2.78k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  2.78k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.78k]
  |  |  ------------------
  ------------------
 4363|       |
 4364|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4365|       |    if (keylog_lock != NULL && CRYPTO_THREAD_write_lock(keylog_lock)) {
 4366|       |        if (a->do_sslkeylog == 1)
 4367|       |            BIO_free(keylog_bio);
 4368|       |        a->do_sslkeylog = 0;
 4369|       |        CRYPTO_THREAD_unlock(keylog_lock);
 4370|       |    }
 4371|       |#endif
 4372|       |
 4373|  2.78k|    X509_VERIFY_PARAM_free(a->param);
 4374|  2.78k|    dane_ctx_final(&a->dane);
 4375|       |
 4376|       |    /*
 4377|       |     * Free internal session cache. However: the remove_cb() may reference
 4378|       |     * the ex_data of SSL_CTX, thus the ex_data store can only be removed
 4379|       |     * after the sessions were flushed.
 4380|       |     * As the ex_data handling routines might also touch the session cache,
 4381|       |     * the most secure solution seems to be: empty (flush) the cache, then
 4382|       |     * free ex_data, then finally free the cache.
 4383|       |     * (See ticket [openssl.org #212].)
 4384|       |     */
 4385|  2.78k|    if (a->sessions != NULL)
  ------------------
  |  Branch (4385:9): [True: 2.78k, False: 0]
  ------------------
 4386|  2.78k|        SSL_CTX_flush_sessions_ex(a, 0);
 4387|       |
 4388|  2.78k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);
  ------------------
  |  |  251|  2.78k|#define CRYPTO_EX_INDEX_SSL_CTX 1
  ------------------
 4389|  2.78k|    lh_SSL_SESSION_free(a->sessions);
 4390|  2.78k|    X509_STORE_free(a->cert_store);
 4391|  2.78k|#ifndef OPENSSL_NO_CT
 4392|  2.78k|    CTLOG_STORE_free(a->ctlog_store);
 4393|  2.78k|#endif
 4394|  2.78k|    sk_SSL_CIPHER_free(a->cipher_list);
  ------------------
  |  | 1011|  2.78k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4395|  2.78k|    sk_SSL_CIPHER_free(a->cipher_list_by_id);
  ------------------
  |  | 1011|  2.78k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4396|  2.78k|    sk_SSL_CIPHER_free(a->tls13_ciphersuites);
  ------------------
  |  | 1011|  2.78k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4397|  2.78k|    ssl_cert_free(a->cert);
 4398|  2.78k|    sk_X509_NAME_pop_free(a->ca_names, X509_NAME_free);
  ------------------
  |  |   70|  2.78k|#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))
  ------------------
 4399|  2.78k|    sk_X509_NAME_pop_free(a->client_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  2.78k|#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))
  ------------------
 4400|  2.78k|    OSSL_STACK_OF_X509_free(a->extra_certs);
 4401|  2.78k|    a->comp_methods = NULL;
 4402|  2.78k|#ifndef OPENSSL_NO_SRTP
 4403|  2.78k|    sk_SRTP_PROTECTION_PROFILE_free(a->srtp_profiles);
  ------------------
  |  |  256|  2.78k|#define sk_SRTP_PROTECTION_PROFILE_free(sk) OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
 4404|  2.78k|#endif
 4405|  2.78k|#ifndef OPENSSL_NO_SRP
 4406|  2.78k|    ssl_ctx_srp_ctx_free_intern(a);
 4407|  2.78k|#endif
 4408|  2.78k|#ifndef OPENSSL_NO_ENGINE
 4409|  2.78k|    tls_engine_finish(a->client_cert_engine);
 4410|  2.78k|#endif
 4411|       |
 4412|  2.78k|    OPENSSL_free(a->ext.ecpointformats);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4413|  2.78k|    OPENSSL_free(a->ext.supportedgroups);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4414|  2.78k|    OPENSSL_free(a->ext.keyshares);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4415|  2.78k|    OPENSSL_free(a->ext.tuples);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4416|  2.78k|    OPENSSL_free(a->ext.alpn);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4417|  2.78k|    OPENSSL_secure_free(a->ext.secure);
  ------------------
  |  |  147|  2.78k|    CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4418|       |
 4419|  2.78k|    ssl_evp_md_free(a->md5);
 4420|  2.78k|    ssl_evp_md_free(a->sha1);
 4421|       |
 4422|  69.6k|    for (j = 0; j < SSL_ENC_NUM_IDX; j++)
  ------------------
  |  |  354|  69.6k|#define SSL_ENC_NUM_IDX 24
  ------------------
  |  Branch (4422:17): [True: 66.8k, False: 2.78k]
  ------------------
 4423|  66.8k|        ssl_evp_cipher_free(a->ssl_cipher_methods[j]);
 4424|  41.7k|    for (j = 0; j < SSL_MD_NUM_IDX; j++)
  ------------------
  |  |  203|  41.7k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  201|  41.7k|#define SSL_MAX_DIGEST 14
  |  |  ------------------
  ------------------
  |  Branch (4424:17): [True: 38.9k, False: 2.78k]
  ------------------
 4425|  38.9k|        ssl_evp_md_free(a->ssl_digest_methods[j]);
 4426|   162k|    for (j = 0; j < a->group_list_len; j++) {
  ------------------
  |  Branch (4426:17): [True: 159k, False: 2.78k]
  ------------------
 4427|   159k|        OPENSSL_free(a->group_list[j].tlsname);
  ------------------
  |  |  131|   159k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4428|   159k|        OPENSSL_free(a->group_list[j].realname);
  ------------------
  |  |  131|   159k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4429|   159k|        OPENSSL_free(a->group_list[j].algorithm);
  ------------------
  |  |  131|   159k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4430|   159k|    }
 4431|  2.78k|    OPENSSL_free(a->group_list);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4432|  10.8k|    for (j = 0; j < a->sigalg_list_len; j++) {
  ------------------
  |  Branch (4432:17): [True: 8.11k, False: 2.78k]
  ------------------
 4433|  8.11k|        OPENSSL_free(a->sigalg_list[j].name);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4434|  8.11k|        OPENSSL_free(a->sigalg_list[j].sigalg_name);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4435|  8.11k|        OPENSSL_free(a->sigalg_list[j].sigalg_oid);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4436|  8.11k|        OPENSSL_free(a->sigalg_list[j].sig_name);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4437|  8.11k|        OPENSSL_free(a->sigalg_list[j].sig_oid);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4438|  8.11k|        OPENSSL_free(a->sigalg_list[j].hash_name);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4439|  8.11k|        OPENSSL_free(a->sigalg_list[j].hash_oid);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4440|  8.11k|        OPENSSL_free(a->sigalg_list[j].keytype);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4441|  8.11k|        OPENSSL_free(a->sigalg_list[j].keytype_oid);
  ------------------
  |  |  131|  8.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4442|  8.11k|    }
 4443|  2.78k|    OPENSSL_free(a->sigalg_list);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4444|  2.78k|    OPENSSL_free(a->ssl_cert_info);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4445|       |
 4446|  2.78k|    OPENSSL_free(a->sigalg_lookup_cache);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4447|  2.78k|    OPENSSL_free(a->tls12_sigalgs);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4448|       |
 4449|  2.78k|    OPENSSL_free(a->client_cert_type);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4450|  2.78k|    OPENSSL_free(a->server_cert_type);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4451|       |
 4452|  2.78k|    CRYPTO_THREAD_lock_free(a->lock);
 4453|  2.78k|    CRYPTO_FREE_REF(&a->references);
 4454|       |#ifdef TSAN_REQUIRES_LOCKING
 4455|       |    CRYPTO_THREAD_lock_free(a->tsan_lock);
 4456|       |#endif
 4457|       |
 4458|  2.78k|    OPENSSL_free(a->propq);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4459|  2.78k|#ifndef OPENSSL_NO_QLOG
 4460|  2.78k|    OPENSSL_free(a->qlog_title);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4461|  2.78k|#endif
 4462|       |
 4463|  2.78k|#ifndef OPENSSL_NO_QUIC
 4464|  2.78k|    ossl_quic_free_token_store(a->tokencache);
 4465|  2.78k|#endif
 4466|       |
 4467|  2.78k|    OPENSSL_free(a);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4468|  2.78k|}
SSL_CTX_set_default_passwd_cb:
 4471|      1|{
 4472|      1|    ctx->default_passwd_callback = cb;
 4473|      1|}
SSL_CTX_set_default_passwd_cb_userdata:
 4476|      1|{
 4477|      1|    ctx->default_passwd_callback_userdata = u;
 4478|      1|}
SSL_CTX_set_verify:
 4540|  1.95k|{
 4541|  1.95k|    ctx->verify_mode = mode;
 4542|  1.95k|    ctx->default_verify_callback = cb;
 4543|  1.95k|}
SSL_get_error:
 4827|    721|{
 4828|    721|    return ossl_ssl_get_error(s, i, /*check_err=*/1);
 4829|    721|}
ossl_ssl_get_error:
 4832|    721|{
 4833|    721|    int reason;
 4834|    721|    unsigned long l;
 4835|    721|    BIO *bio;
 4836|    721|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|    721|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|    721|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 721]
  |  |  |  |  ------------------
  |  |  |  |   33|    721|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|    721|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 721, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    721|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    721|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 4837|       |
 4838|    721|    if (i > 0)
  ------------------
  |  Branch (4838:9): [True: 0, False: 721]
  ------------------
 4839|      0|        return SSL_ERROR_NONE;
  ------------------
  |  | 1258|      0|#define SSL_ERROR_NONE 0
  ------------------
 4840|       |
 4841|    721|#ifndef OPENSSL_NO_QUIC
 4842|    721|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|    721|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|    721|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 721]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 721, False: 0]
  |  |  ------------------
  ------------------
 4843|      0|        reason = ossl_quic_get_error(s, i);
 4844|      0|        if (reason != SSL_ERROR_NONE)
  ------------------
  |  | 1258|      0|#define SSL_ERROR_NONE 0
  ------------------
  |  Branch (4844:13): [True: 0, False: 0]
  ------------------
 4845|      0|            return reason;
 4846|      0|    }
 4847|    721|#endif
 4848|       |
 4849|    721|    if (sc == NULL)
  ------------------
  |  Branch (4849:9): [True: 0, False: 721]
  ------------------
 4850|      0|        return SSL_ERROR_SSL;
  ------------------
  |  | 1259|      0|#define SSL_ERROR_SSL 1
  ------------------
 4851|       |
 4852|       |    /*
 4853|       |     * Make things return SSL_ERROR_SYSCALL when doing SSL_do_handshake etc,
 4854|       |     * where we do encode the error
 4855|       |     */
 4856|    721|    if (check_err && (l = ERR_peek_error()) != 0) {
  ------------------
  |  Branch (4856:9): [True: 721, False: 0]
  |  Branch (4856:22): [True: 414, False: 307]
  ------------------
 4857|    414|        if (ERR_GET_LIB(l) == ERR_LIB_SYS)
  ------------------
  |  |   74|    414|#define ERR_LIB_SYS 2
  ------------------
  |  Branch (4857:13): [True: 0, False: 414]
  ------------------
 4858|      0|            return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1263|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 4859|    414|        else
 4860|    414|            return SSL_ERROR_SSL;
  ------------------
  |  | 1259|    414|#define SSL_ERROR_SSL 1
  ------------------
 4861|    414|    }
 4862|       |
 4863|    307|#ifndef OPENSSL_NO_QUIC
 4864|    307|    if (!IS_QUIC(s))
  ------------------
  |  |   96|    307|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|    307|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 307]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 307, False: 0]
  |  |  ------------------
  ------------------
 4865|    307|#endif
 4866|    307|    {
 4867|    307|        if (SSL_want_read(s)) {
  ------------------
  |  |  943|    307|#define SSL_want_read(s) (SSL_want(s) == SSL_READING)
  |  |  ------------------
  |  |  |  |  934|    307|#define SSL_READING 3
  |  |  ------------------
  |  |  |  Branch (943:26): [True: 307, False: 0]
  |  |  ------------------
  ------------------
 4868|    307|            bio = SSL_get_rbio(s);
 4869|    307|            if (BIO_should_read(bio))
  ------------------
  |  |  268|    307|#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
  |  |  ------------------
  |  |  |  |  222|    307|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |  |  Branch (268:28): [True: 306, False: 1]
  |  |  ------------------
  ------------------
 4870|    306|                return SSL_ERROR_WANT_READ;
  ------------------
  |  | 1260|    306|#define SSL_ERROR_WANT_READ 2
  ------------------
 4871|      1|            else if (BIO_should_write(bio))
  ------------------
  |  |  269|      1|#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
  |  |  ------------------
  |  |  |  |  223|      1|#define BIO_FLAGS_WRITE 0x02
  |  |  ------------------
  |  |  |  Branch (269:29): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4872|       |                /*
 4873|       |                 * This one doesn't make too much sense ... We never try to
 4874|       |                 * write to the rbio, and an application program where rbio and
 4875|       |                 * wbio are separate couldn't even know what it should wait for.
 4876|       |                 * However if we ever set s->rwstate incorrectly (so that we
 4877|       |                 * have SSL_want_read(s) instead of SSL_want_write(s)) and rbio
 4878|       |                 * and wbio *are* the same, this test works around that bug; so
 4879|       |                 * it might be safer to keep it.
 4880|       |                 */
 4881|      0|                return SSL_ERROR_WANT_WRITE;
  ------------------
  |  | 1261|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
 4882|      1|            else if (BIO_should_io_special(bio)) {
  ------------------
  |  |  270|      1|#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
  |  |  ------------------
  |  |  |  |  224|      1|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  ------------------
  |  |  |  Branch (270:34): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4883|      0|                reason = BIO_get_retry_reason(bio);
 4884|      0|                if (reason == BIO_RR_CONNECT)
  ------------------
  |  |  286|      0|#define BIO_RR_CONNECT 0x02
  ------------------
  |  Branch (4884:21): [True: 0, False: 0]
  ------------------
 4885|      0|                    return SSL_ERROR_WANT_CONNECT;
  ------------------
  |  | 1266|      0|#define SSL_ERROR_WANT_CONNECT 7
  ------------------
 4886|      0|                else if (reason == BIO_RR_ACCEPT)
  ------------------
  |  |  288|      0|#define BIO_RR_ACCEPT 0x03
  ------------------
  |  Branch (4886:26): [True: 0, False: 0]
  ------------------
 4887|      0|                    return SSL_ERROR_WANT_ACCEPT;
  ------------------
  |  | 1267|      0|#define SSL_ERROR_WANT_ACCEPT 8
  ------------------
 4888|      0|                else
 4889|      0|                    return SSL_ERROR_SYSCALL; /* unknown */
  ------------------
  |  | 1263|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 4890|      0|            }
 4891|    307|        }
 4892|       |
 4893|      1|        if (SSL_want_write(s)) {
  ------------------
  |  |  944|      1|#define SSL_want_write(s) (SSL_want(s) == SSL_WRITING)
  |  |  ------------------
  |  |  |  |  933|      1|#define SSL_WRITING 2
  |  |  ------------------
  |  |  |  Branch (944:27): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4894|       |            /*
 4895|       |             * Access wbio directly - in order to use the buffered bio if
 4896|       |             * present
 4897|       |             */
 4898|      0|            bio = sc->wbio;
 4899|      0|            if (BIO_should_write(bio))
  ------------------
  |  |  269|      0|#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
  |  |  ------------------
  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  ------------------
  |  |  |  Branch (269:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4900|      0|                return SSL_ERROR_WANT_WRITE;
  ------------------
  |  | 1261|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
 4901|      0|            else if (BIO_should_read(bio))
  ------------------
  |  |  268|      0|#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |  |  Branch (268:28): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4902|       |                /*
 4903|       |                 * See above (SSL_want_read(s) with BIO_should_write(bio))
 4904|       |                 */
 4905|      0|                return SSL_ERROR_WANT_READ;
  ------------------
  |  | 1260|      0|#define SSL_ERROR_WANT_READ 2
  ------------------
 4906|      0|            else if (BIO_should_io_special(bio)) {
  ------------------
  |  |  270|      0|#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
  |  |  ------------------
  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  ------------------
  |  |  |  Branch (270:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4907|      0|                reason = BIO_get_retry_reason(bio);
 4908|      0|                if (reason == BIO_RR_CONNECT)
  ------------------
  |  |  286|      0|#define BIO_RR_CONNECT 0x02
  ------------------
  |  Branch (4908:21): [True: 0, False: 0]
  ------------------
 4909|      0|                    return SSL_ERROR_WANT_CONNECT;
  ------------------
  |  | 1266|      0|#define SSL_ERROR_WANT_CONNECT 7
  ------------------
 4910|      0|                else if (reason == BIO_RR_ACCEPT)
  ------------------
  |  |  288|      0|#define BIO_RR_ACCEPT 0x03
  ------------------
  |  Branch (4910:26): [True: 0, False: 0]
  ------------------
 4911|      0|                    return SSL_ERROR_WANT_ACCEPT;
  ------------------
  |  | 1267|      0|#define SSL_ERROR_WANT_ACCEPT 8
  ------------------
 4912|      0|                else
 4913|      0|                    return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1263|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 4914|      0|            }
 4915|      0|        }
 4916|      1|    }
 4917|       |
 4918|      1|    if (SSL_want_x509_lookup(s))
  ------------------
  |  |  945|      1|#define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP)
  |  |  ------------------
  |  |  |  |  935|      1|#define SSL_X509_LOOKUP 4
  |  |  ------------------
  |  |  |  Branch (945:33): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4919|      0|        return SSL_ERROR_WANT_X509_LOOKUP;
  ------------------
  |  | 1262|      0|#define SSL_ERROR_WANT_X509_LOOKUP 4
  ------------------
 4920|      1|    if (SSL_want_retry_verify(s))
  ------------------
  |  |  946|      1|#define SSL_want_retry_verify(s) (SSL_want(s) == SSL_RETRY_VERIFY)
  |  |  ------------------
  |  |  |  |  939|      1|#define SSL_RETRY_VERIFY 8
  |  |  ------------------
  |  |  |  Branch (946:34): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4921|      0|        return SSL_ERROR_WANT_RETRY_VERIFY;
  ------------------
  |  | 1271|      0|#define SSL_ERROR_WANT_RETRY_VERIFY 12
  ------------------
 4922|      1|    if (SSL_want_async(s))
  ------------------
  |  |  947|      1|#define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED)
  |  |  ------------------
  |  |  |  |  936|      1|#define SSL_ASYNC_PAUSED 5
  |  |  ------------------
  |  |  |  Branch (947:27): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4923|      0|        return SSL_ERROR_WANT_ASYNC;
  ------------------
  |  | 1268|      0|#define SSL_ERROR_WANT_ASYNC 9
  ------------------
 4924|      1|    if (SSL_want_async_job(s))
  ------------------
  |  |  948|      1|#define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS)
  |  |  ------------------
  |  |  |  |  937|      1|#define SSL_ASYNC_NO_JOBS 6
  |  |  ------------------
  |  |  |  Branch (948:31): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4925|      0|        return SSL_ERROR_WANT_ASYNC_JOB;
  ------------------
  |  | 1269|      0|#define SSL_ERROR_WANT_ASYNC_JOB 10
  ------------------
 4926|      1|    if (SSL_want_client_hello_cb(s))
  ------------------
  |  |  949|      1|#define SSL_want_client_hello_cb(s) (SSL_want(s) == SSL_CLIENT_HELLO_CB)
  |  |  ------------------
  |  |  |  |  938|      1|#define SSL_CLIENT_HELLO_CB 7
  |  |  ------------------
  |  |  |  Branch (949:37): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4927|      0|        return SSL_ERROR_WANT_CLIENT_HELLO_CB;
  ------------------
  |  | 1270|      0|#define SSL_ERROR_WANT_CLIENT_HELLO_CB 11
  ------------------
 4928|       |
 4929|      1|    if ((sc->shutdown & SSL_RECEIVED_SHUTDOWN) && (sc->s3.warn_alert == SSL_AD_CLOSE_NOTIFY))
  ------------------
  |  |  216|      1|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
                  if ((sc->shutdown & SSL_RECEIVED_SHUTDOWN) && (sc->s3.warn_alert == SSL_AD_CLOSE_NOTIFY))
  ------------------
  |  | 1209|      1|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      1|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (4929:9): [True: 1, False: 0]
  |  Branch (4929:51): [True: 1, False: 0]
  ------------------
 4930|      1|        return SSL_ERROR_ZERO_RETURN;
  ------------------
  |  | 1265|      1|#define SSL_ERROR_ZERO_RETURN 6
  ------------------
 4931|       |
 4932|      0|    return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1263|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 4933|      1|}
SSL_do_handshake:
 4948|  2.25k|{
 4949|  2.25k|    int ret = 1;
 4950|  2.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  2.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 4951|       |
 4952|  2.25k|#ifndef OPENSSL_NO_QUIC
 4953|  2.25k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  2.25k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  2.25k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 2.25k, False: 0]
  |  |  ------------------
  ------------------
 4954|      0|        return ossl_quic_do_handshake(s);
 4955|  2.25k|#endif
 4956|       |
 4957|  2.25k|    if (sc == NULL)
  ------------------
  |  Branch (4957:9): [True: 0, False: 2.25k]
  ------------------
 4958|      0|        return -1;
 4959|       |
 4960|  2.25k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (4960:9): [True: 0, False: 2.25k]
  ------------------
 4961|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CONNECTION_TYPE_NOT_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4962|      0|        return -1;
 4963|      0|    }
 4964|       |
 4965|  2.25k|    if (!ossl_statem_check_finish_init(sc, -1))
  ------------------
  |  Branch (4965:9): [True: 0, False: 2.25k]
  ------------------
 4966|      0|        return -1;
 4967|       |
 4968|  2.25k|    s->method->ssl_renegotiate_check(s, 0);
 4969|       |
 4970|  2.25k|    if (SSL_in_init(s) || SSL_in_before(s)) {
  ------------------
  |  Branch (4970:9): [True: 2.25k, False: 0]
  |  Branch (4970:27): [True: 0, False: 0]
  ------------------
 4971|  2.25k|        if ((sc->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
  ------------------
  |  |  535|  2.25k|#define SSL_MODE_ASYNC 0x00000100U
  ------------------
  |  Branch (4971:13): [True: 0, False: 2.25k]
  |  Branch (4971:44): [True: 0, False: 0]
  ------------------
 4972|      0|            struct ssl_async_args args;
 4973|       |
 4974|      0|            memset(&args, 0, sizeof(args));
 4975|      0|            args.s = s;
 4976|       |
 4977|      0|            ret = ssl_start_async_job(s, &args, ssl_do_handshake_intern);
 4978|  2.25k|        } else {
 4979|  2.25k|            ret = sc->handshake_func(s);
 4980|  2.25k|        }
 4981|  2.25k|    }
 4982|       |
 4983|  2.25k|    return ret;
 4984|  2.25k|}
SSL_set_connect_state:
 5007|  1.95k|{
 5008|  1.95k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  1.95k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  1.95k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  |  |   18|  1.95k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.95k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 1.95k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  1.95k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  1.95k|                             : NULL))
  |  |  ------------------
  ------------------
 5009|       |
 5010|  1.95k|#ifndef OPENSSL_NO_QUIC
 5011|  1.95k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  1.95k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.95k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.95k, False: 0]
  |  |  ------------------
  ------------------
 5012|       |        /* We suppress errors because this is a void function */
 5013|      0|        (void)ossl_quic_set_connect_state(s, 0 /* suppress errors */);
 5014|      0|        return;
 5015|      0|    }
 5016|  1.95k|#endif
 5017|       |
 5018|  1.95k|    sc->server = 0;
 5019|  1.95k|    sc->shutdown = 0;
 5020|  1.95k|    ossl_statem_clear(sc);
 5021|  1.95k|    sc->handshake_func = s->method->ssl_connect;
 5022|       |    /* Ignore return value. Its a void public API function */
 5023|  1.95k|    RECORD_LAYER_reset(&sc->rlayer);
 5024|  1.95k|}
ssl_init_wbio_buffer:
 5336|  1.95k|{
 5337|  1.95k|    BIO *bbio;
 5338|       |
 5339|  1.95k|    if (s->bbio != NULL) {
  ------------------
  |  Branch (5339:9): [True: 0, False: 1.95k]
  ------------------
 5340|       |        /* Already buffered. */
 5341|      0|        return 1;
 5342|      0|    }
 5343|       |
 5344|  1.95k|    bbio = BIO_new(BIO_f_buffer());
 5345|  1.95k|    if (bbio == NULL || BIO_set_read_buffer_size(bbio, 1) <= 0) {
  ------------------
  |  |  625|  1.95k|#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
  |  |  ------------------
  |  |  |  |  451|  1.95k|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
  |  Branch (5345:9): [True: 0, False: 1.95k]
  |  Branch (5345:25): [True: 0, False: 1.95k]
  ------------------
 5346|      0|        BIO_free(bbio);
 5347|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 5348|      0|        return 0;
 5349|      0|    }
 5350|  1.95k|    s->bbio = bbio;
 5351|  1.95k|    s->wbio = BIO_push(bbio, s->wbio);
 5352|       |
 5353|  1.95k|    s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
 5354|       |
 5355|  1.95k|    return 1;
 5356|  1.95k|}
ssl_free_wbio_buffer:
 5359|  9.78k|{
 5360|       |    /* callers ensure s is never null */
 5361|  9.78k|    if (s->bbio == NULL)
  ------------------
  |  Branch (5361:9): [True: 7.82k, False: 1.95k]
  ------------------
 5362|  7.82k|        return 1;
 5363|       |
 5364|  1.95k|    s->wbio = BIO_pop(s->wbio);
 5365|  1.95k|    s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
 5366|       |
 5367|  1.95k|    BIO_free(s->bbio);
 5368|  1.95k|    s->bbio = NULL;
 5369|       |
 5370|  1.95k|    return 1;
 5371|  9.78k|}
SSL_version:
 5433|  6.86k|{
 5434|  6.86k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  6.86k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  6.86k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 6.86k]
  |  |  |  |  ------------------
  |  |  |  |   33|  6.86k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  6.86k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 6.86k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  6.86k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  6.86k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5435|       |
 5436|  6.86k|#ifndef OPENSSL_NO_QUIC
 5437|       |    /* We only support QUICv1 - so if its QUIC its QUICv1 */
 5438|  6.86k|    if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1224|  13.7k|#define SSL_TYPE_QUIC_CONNECTION 0x80
  ------------------
                  if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1225|  6.86k|#define SSL_TYPE_QUIC_XSO 0x81
  ------------------
  |  Branch (5438:9): [True: 0, False: 6.86k]
  |  Branch (5438:48): [True: 0, False: 6.86k]
  ------------------
 5439|      0|        return OSSL_QUIC1_VERSION;
  ------------------
  |  |   33|      0|#define OSSL_QUIC1_VERSION 0x0000001
  ------------------
 5440|  6.86k|#endif
 5441|  6.86k|    if (sc == NULL)
  ------------------
  |  Branch (5441:9): [True: 0, False: 6.86k]
  ------------------
 5442|      0|        return 0;
 5443|       |
 5444|  6.86k|    return sc->version;
 5445|  6.86k|}
SSL_set_ex_data:
 5710|  1.95k|{
 5711|  1.95k|    return CRYPTO_set_ex_data(&s->ex_data, idx, arg);
 5712|  1.95k|}
SSL_CTX_get_cert_store:
 5730|  3.36k|{
 5731|  3.36k|    return ctx->cert_store;
 5732|  3.36k|}
SSL_want:
 5749|    313|{
 5750|    313|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|    313|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|    313|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 313]
  |  |  |  |  ------------------
  |  |  |  |   33|    313|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|    313|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 313, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    313|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    313|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5751|       |
 5752|    313|#ifndef OPENSSL_NO_QUIC
 5753|    313|    if (IS_QUIC(s))
  ------------------
  |  |   96|    313|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|    313|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 313]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 313, False: 0]
  |  |  ------------------
  ------------------
 5754|      0|        return ossl_quic_want(s);
 5755|    313|#endif
 5756|       |
 5757|    313|    if (sc == NULL)
  ------------------
  |  Branch (5757:9): [True: 0, False: 313]
  ------------------
 5758|      0|        return SSL_NOTHING;
  ------------------
  |  |  932|      0|#define SSL_NOTHING 1
  ------------------
 5759|       |
 5760|    313|    return sc->rwstate;
 5761|    313|}
SSL_get_security_level:
 6143|   299k|{
 6144|   299k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|   299k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|   299k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 299k]
  |  |  |  |  ------------------
  |  |  |  |   33|   299k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|   299k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 299k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|   299k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|   299k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6145|       |
 6146|   299k|    if (sc == NULL)
  ------------------
  |  Branch (6146:9): [True: 0, False: 299k]
  ------------------
 6147|      0|        return 0;
 6148|       |
 6149|   299k|    return sc->cert->sec_level;
 6150|   299k|}
SSL_CTX_set_options:
 6257|  2.70k|{
 6258|  2.70k|    return ctx->options |= op;
 6259|  2.70k|}
SSL_set_ct_validation_callback:
 6529|  1.95k|{
 6530|  1.95k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.95k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.95k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.95k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.95k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.95k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.95k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.95k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6531|       |
 6532|  1.95k|    if (sc == NULL)
  ------------------
  |  Branch (6532:9): [True: 0, False: 1.95k]
  ------------------
 6533|      0|        return 0;
 6534|       |
 6535|       |    /*
 6536|       |     * Since code exists that uses the custom extension handler for CT, look
 6537|       |     * for this and throw an error if they have already registered to use CT.
 6538|       |     */
 6539|  1.95k|    if (callback != NULL && SSL_CTX_has_client_custom_ext(s->ctx, TLSEXT_TYPE_signed_certificate_timestamp)) {
  ------------------
  |  |  122|      0|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
  |  Branch (6539:9): [True: 0, False: 1.95k]
  |  Branch (6539:29): [True: 0, False: 0]
  ------------------
 6540|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 6541|      0|        return 0;
 6542|      0|    }
 6543|       |
 6544|  1.95k|    if (callback != NULL) {
  ------------------
  |  Branch (6544:9): [True: 0, False: 1.95k]
  ------------------
 6545|       |        /*
 6546|       |         * If we are validating CT, then we MUST accept SCTs served via OCSP
 6547|       |         */
 6548|      0|        if (!SSL_set_tlsext_status_type(s, TLSEXT_STATUSTYPE_ocsp))
  ------------------
  |  |  307|      0|    SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, type, NULL)
  |  |  ------------------
  |  |  |  | 1325|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  |  |  ------------------
  ------------------
  |  Branch (6548:13): [True: 0, False: 0]
  ------------------
 6549|      0|            return 0;
 6550|      0|    }
 6551|       |
 6552|  1.95k|    sc->ct_validation_callback = callback;
 6553|  1.95k|    sc->ct_validation_callback_arg = arg;
 6554|       |
 6555|  1.95k|    return 1;
 6556|  1.95k|}
ssl_get_max_send_fragment:
 7301|  7.70k|{
 7302|       |    /* Return any active Max Fragment Len extension */
 7303|  7.70k|    if (sc->session != NULL && USE_MAX_FRAGMENT_LENGTH_EXT(sc->session))
  ------------------
  |  |  296|  1.83k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  294|  1.83k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  229|  1.83k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  232|  1.83k|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (294:6): [True: 1.83k, False: 0]
  |  |  |  |  |  Branch (294:53): [True: 0, False: 1.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7303:9): [True: 1.83k, False: 5.86k]
  ------------------
 7304|      0|        return GET_MAX_FRAGMENT_LENGTH(sc->session);
  ------------------
  |  |  298|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 7305|       |
 7306|       |    /* return current SSL connection setting */
 7307|  7.70k|    return (unsigned int)sc->max_send_fragment;
 7308|  7.70k|}
ssl_get_split_send_fragment:
 7311|  1.83k|{
 7312|       |    /* Return a value regarding an active Max Fragment Len extension */
 7313|  1.83k|    if (sc->session != NULL && USE_MAX_FRAGMENT_LENGTH_EXT(sc->session)
  ------------------
  |  |  296|  1.83k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  294|  3.66k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  229|  1.83k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  232|  1.83k|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (294:6): [True: 1.83k, False: 0]
  |  |  |  |  |  Branch (294:53): [True: 0, False: 1.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7313:9): [True: 1.83k, False: 0]
  ------------------
 7314|      0|        && sc->split_send_fragment > GET_MAX_FRAGMENT_LENGTH(sc->session))
  ------------------
  |  |  298|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
  |  Branch (7314:12): [True: 0, False: 0]
  ------------------
 7315|      0|        return GET_MAX_FRAGMENT_LENGTH(sc->session);
  ------------------
  |  |  298|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 7316|       |
 7317|       |    /* else limit |split_send_fragment| to current |max_send_fragment| */
 7318|  1.83k|    if (sc->split_send_fragment > sc->max_send_fragment)
  ------------------
  |  Branch (7318:9): [True: 0, False: 1.83k]
  ------------------
 7319|      0|        return (unsigned int)sc->max_send_fragment;
 7320|       |
 7321|       |    /* return current SSL connection setting */
 7322|  1.83k|    return (unsigned int)sc->split_send_fragment;
 7323|  1.83k|}
SSL_CTX_set_post_handshake_auth:
 7353|  2.03k|{
 7354|  2.03k|    ctx->pha_enabled = val;
 7355|  2.03k|}
ssl_evp_cipher_fetch:
 7461|  64.0k|{
 7462|  64.0k|    const EVP_CIPHER *ciph;
 7463|       |
 7464|  64.0k|    ciph = tls_get_cipher_from_engine(nid);
 7465|  64.0k|    if (ciph != NULL)
  ------------------
  |  Branch (7465:9): [True: 0, False: 64.0k]
  ------------------
 7466|      0|        return ciph;
 7467|       |
 7468|       |    /*
 7469|       |     * If there is no engine cipher then we do an explicit fetch. This may fail
 7470|       |     * and that could be ok
 7471|       |     */
 7472|  64.0k|    ERR_set_mark();
 7473|  64.0k|    ciph = EVP_CIPHER_fetch(libctx, OBJ_nid2sn(nid), properties);
 7474|  64.0k|    if (ciph != NULL) {
  ------------------
  |  Branch (7474:9): [True: 37.8k, False: 26.1k]
  ------------------
 7475|  37.8k|        OSSL_PARAM params[2];
 7476|  37.8k|        int decrypt_only = 0;
 7477|       |
 7478|  37.8k|        params[0] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_DECRYPT_ONLY,
  ------------------
  |  |  193|  37.8k|# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
  ------------------
 7479|  37.8k|            &decrypt_only);
 7480|  37.8k|        params[1] = OSSL_PARAM_construct_end();
 7481|  37.8k|        if (EVP_CIPHER_get_params((EVP_CIPHER *)ciph, params)
  ------------------
  |  Branch (7481:13): [True: 37.8k, False: 0]
  ------------------
 7482|  37.8k|            && decrypt_only) {
  ------------------
  |  Branch (7482:16): [True: 0, False: 37.8k]
  ------------------
 7483|       |            /* If a cipher is decrypt-only, it is unusable */
 7484|      0|            EVP_CIPHER_free((EVP_CIPHER *)ciph);
 7485|       |            ciph = NULL;
 7486|      0|        }
 7487|  37.8k|    }
 7488|  64.0k|    ERR_pop_to_mark();
 7489|  64.0k|    return ciph;
 7490|  64.0k|}
ssl_evp_cipher_free:
 7506|  68.7k|{
 7507|  68.7k|    if (cipher == NULL)
  ------------------
  |  Branch (7507:9): [True: 30.9k, False: 37.8k]
  ------------------
 7508|  30.9k|        return;
 7509|       |
 7510|  37.8k|    if (EVP_CIPHER_get0_provider(cipher) != NULL) {
  ------------------
  |  Branch (7510:9): [True: 37.8k, False: 0]
  ------------------
 7511|       |        /*
 7512|       |         * The cipher was explicitly fetched and therefore it is safe to cast
 7513|       |         * away the const
 7514|       |         */
 7515|  37.8k|        EVP_CIPHER_free((EVP_CIPHER *)cipher);
 7516|  37.8k|    }
 7517|  37.8k|}
ssl_evp_md_fetch:
 7522|  44.3k|{
 7523|  44.3k|    const EVP_MD *md;
 7524|       |
 7525|  44.3k|    md = tls_get_digest_from_engine(nid);
 7526|  44.3k|    if (md != NULL)
  ------------------
  |  Branch (7526:9): [True: 0, False: 44.3k]
  ------------------
 7527|      0|        return md;
 7528|       |
 7529|       |    /* Otherwise we do an explicit fetch */
 7530|  44.3k|    ERR_set_mark();
 7531|  44.3k|    md = EVP_MD_fetch(libctx, OBJ_nid2sn(nid), properties);
 7532|  44.3k|    ERR_pop_to_mark();
 7533|  44.3k|    return md;
 7534|  44.3k|}
ssl_evp_md_free:
 7550|  46.5k|{
 7551|  46.5k|    if (md == NULL)
  ------------------
  |  Branch (7551:9): [True: 22.1k, False: 24.3k]
  ------------------
 7552|  22.1k|        return;
 7553|       |
 7554|  24.3k|    if (EVP_MD_get0_provider(md) != NULL) {
  ------------------
  |  Branch (7554:9): [True: 24.3k, False: 0]
  ------------------
 7555|       |        /*
 7556|       |         * The digest was explicitly fetched and therefore it is safe to cast
 7557|       |         * away the const
 7558|       |         */
 7559|  24.3k|        EVP_MD_free((EVP_MD *)md);
 7560|  24.3k|    }
 7561|  24.3k|}
ssl_lib.c:dane_final:
  169|  1.95k|{
  170|  1.95k|    sk_danetls_record_pop_free(dane->trecs, tlsa_free);
  171|  1.95k|    dane->trecs = NULL;
  172|       |
  173|  1.95k|    OSSL_STACK_OF_X509_free(dane->certs);
  174|  1.95k|    dane->certs = NULL;
  175|       |
  176|  1.95k|    X509_free(dane->mcert);
  177|  1.95k|    dane->mcert = NULL;
  178|       |    dane->mtlsa = NULL;
  179|  1.95k|    dane->mdpth = -1;
  180|  1.95k|    dane->pdpth = -1;
  181|  1.95k|}
ssl_lib.c:ssl_check_allowed_versions:
  450|  5.41k|{
  451|  5.41k|    int minisdtls = 0, maxisdtls = 0;
  452|       |
  453|       |    /* Figure out if we're doing DTLS versions or TLS versions */
  454|  5.41k|    if (min_version == DTLS1_BAD_VER
  ------------------
  |  |   30|  10.8k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (454:9): [True: 0, False: 5.41k]
  ------------------
  455|  5.41k|        || min_version >> 8 == DTLS1_VERSION_MAJOR)
  ------------------
  |  |   32|  5.41k|#define DTLS1_VERSION_MAJOR 0xFE
  ------------------
  |  Branch (455:12): [True: 0, False: 5.41k]
  ------------------
  456|      0|        minisdtls = 1;
  457|  5.41k|    if (max_version == DTLS1_BAD_VER
  ------------------
  |  |   30|  10.8k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (457:9): [True: 0, False: 5.41k]
  ------------------
  458|  5.41k|        || max_version >> 8 == DTLS1_VERSION_MAJOR)
  ------------------
  |  |   32|  5.41k|#define DTLS1_VERSION_MAJOR 0xFE
  ------------------
  |  Branch (458:12): [True: 0, False: 5.41k]
  ------------------
  459|      0|        maxisdtls = 1;
  460|       |    /* A wildcard version of 0 could be DTLS or TLS. */
  461|  5.41k|    if ((minisdtls && !maxisdtls && max_version != 0)
  ------------------
  |  Branch (461:10): [True: 0, False: 5.41k]
  |  Branch (461:23): [True: 0, False: 0]
  |  Branch (461:37): [True: 0, False: 0]
  ------------------
  462|  5.41k|        || (maxisdtls && !minisdtls && min_version != 0)) {
  ------------------
  |  Branch (462:13): [True: 0, False: 5.41k]
  |  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|  5.41k|    if (minisdtls || maxisdtls) {
  ------------------
  |  Branch (467:9): [True: 0, False: 5.41k]
  |  Branch (467:22): [True: 0, False: 5.41k]
  ------------------
  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|  5.41k|    } else {
  495|       |        /* Regular TLS version checks. */
  496|  5.41k|        if (min_version == 0)
  ------------------
  |  Branch (496:13): [True: 0, False: 5.41k]
  ------------------
  497|      0|            min_version = SSL3_VERSION;
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
  498|  5.41k|        if (max_version == 0)
  ------------------
  |  Branch (498:13): [True: 5.38k, False: 30]
  ------------------
  499|  5.38k|            max_version = TLS1_3_VERSION;
  ------------------
  |  |   27|  5.38k|#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_SSL3
  517|       |        if (min_version == SSL3_VERSION)
  518|       |            min_version = TLS1_VERSION;
  519|       |#endif
  520|       |#ifdef OPENSSL_NO_TLS1
  521|       |        if (min_version == TLS1_VERSION)
  522|       |            min_version = TLS1_1_VERSION;
  523|       |#endif
  524|       |#ifdef OPENSSL_NO_TLS1_1
  525|       |        if (min_version == TLS1_1_VERSION)
  526|       |            min_version = TLS1_2_VERSION;
  527|       |#endif
  528|       |#ifdef OPENSSL_NO_TLS1_2
  529|       |        if (min_version == TLS1_2_VERSION)
  530|       |            min_version = TLS1_3_VERSION;
  531|       |#endif
  532|       |        /* Done massaging versions; do the check. */
  533|  5.41k|        if (0
  ------------------
  |  Branch (533:13): [Folded, False: 5.41k]
  ------------------
  534|       |#ifdef OPENSSL_NO_SSL3
  535|       |            || (min_version <= SSL3_VERSION && SSL3_VERSION <= max_version)
  536|       |#endif
  537|       |#ifdef OPENSSL_NO_TLS1
  538|       |            || (min_version <= TLS1_VERSION && TLS1_VERSION <= max_version)
  539|       |#endif
  540|       |#ifdef OPENSSL_NO_TLS1_1
  541|       |            || (min_version <= TLS1_1_VERSION && TLS1_1_VERSION <= max_version)
  542|       |#endif
  543|       |#ifdef OPENSSL_NO_TLS1_2
  544|       |            || (min_version <= TLS1_2_VERSION && TLS1_2_VERSION <= max_version)
  545|       |#endif
  546|       |#ifdef OPENSSL_NO_TLS1_3
  547|       |            || (min_version <= TLS1_3_VERSION && TLS1_3_VERSION <= max_version)
  548|       |#endif
  549|  5.41k|        )
  550|      0|            return 0;
  551|  5.41k|    }
  552|  5.41k|    return 1;
  553|  5.41k|}
ssl_lib.c:cipher_list_tls12_num:
 3351|    553|{
 3352|    553|    int i, num = 0;
 3353|    553|    const SSL_CIPHER *c;
 3354|       |
 3355|    553|    if (sk == NULL)
  ------------------
  |  Branch (3355:9): [True: 0, False: 553]
  ------------------
 3356|      0|        return 0;
 3357|  13.4k|    for (i = 0; i < sk_SSL_CIPHER_num(sk); ++i) {
  ------------------
  |  | 1005|  13.4k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3357:17): [True: 12.8k, False: 553]
  ------------------
 3358|  12.8k|        c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1006|  12.8k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3359|  12.8k|        if (c->min_tls >= TLS1_3_VERSION)
  ------------------
  |  |   27|  12.8k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3359:13): [True: 1.65k, False: 11.2k]
  ------------------
 3360|  1.65k|            continue;
 3361|  11.2k|        num++;
 3362|  11.2k|    }
 3363|    553|    return num;
 3364|    553|}
ssl_lib.c:alpn_value_ok:
 3703|    294|{
 3704|    294|    unsigned int idx;
 3705|       |
 3706|    294|    if (protos_len < 2 || protos == NULL)
  ------------------
  |  Branch (3706:9): [True: 0, False: 294]
  |  Branch (3706:27): [True: 0, False: 294]
  ------------------
 3707|      0|        return 0;
 3708|       |
 3709|    745|    for (idx = 0; idx < protos_len; idx += protos[idx] + 1) {
  ------------------
  |  Branch (3709:19): [True: 451, False: 294]
  ------------------
 3710|    451|        if (protos[idx] == 0)
  ------------------
  |  Branch (3710:13): [True: 0, False: 451]
  ------------------
 3711|      0|            return 0;
 3712|    451|    }
 3713|    294|    return idx == protos_len;
 3714|    294|}
ssl_lib.c:ssl_session_hash:
 3855|      9|{
 3856|      9|    const unsigned char *session_id = a->session_id;
 3857|      9|    unsigned long l;
 3858|      9|    unsigned char tmp_storage[4];
 3859|       |
 3860|      9|    if (a->session_id_length < sizeof(tmp_storage)) {
  ------------------
  |  Branch (3860:9): [True: 1, False: 8]
  ------------------
 3861|      1|        memset(tmp_storage, 0, sizeof(tmp_storage));
 3862|      1|        memcpy(tmp_storage, a->session_id, a->session_id_length);
 3863|      1|        session_id = tmp_storage;
 3864|      1|    }
 3865|       |
 3866|      9|    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);
 3867|      9|    return l;
 3868|      9|}
ssl_lib.c:dane_ctx_final:
  150|  2.78k|{
  151|  2.78k|    OPENSSL_free(dctx->mdevp);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|  2.78k|    dctx->mdevp = NULL;
  153|       |
  154|  2.78k|    OPENSSL_free(dctx->mdord);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  155|       |    dctx->mdord = NULL;
  156|  2.78k|    dctx->mdmax = 0;
  157|  2.78k|}

TLS_client_method:
 2347|  2.78k|    {                                                                      \
 2348|  2.78k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  2.78k|            version,                                                       \
 2350|  2.78k|            flags,                                                         \
 2351|  2.78k|            mask,                                                          \
 2352|  2.78k|            ossl_ssl_connection_new,                                       \
 2353|  2.78k|            ossl_ssl_connection_free,                                      \
 2354|  2.78k|            ossl_ssl_connection_reset,                                     \
 2355|  2.78k|            tls1_new,                                                      \
 2356|  2.78k|            tls1_clear,                                                    \
 2357|  2.78k|            tls1_free,                                                     \
 2358|  2.78k|            s_accept,                                                      \
 2359|  2.78k|            s_connect,                                                     \
 2360|  2.78k|            ssl3_read,                                                     \
 2361|  2.78k|            ssl3_peek,                                                     \
 2362|  2.78k|            ssl3_write,                                                    \
 2363|  2.78k|            ssl3_shutdown,                                                 \
 2364|  2.78k|            ssl3_renegotiate,                                              \
 2365|  2.78k|            ssl3_renegotiate_check,                                        \
 2366|  2.78k|            ssl3_read_bytes,                                               \
 2367|  2.78k|            ssl3_write_bytes,                                              \
 2368|  2.78k|            ssl3_dispatch_alert,                                           \
 2369|  2.78k|            ssl3_ctrl,                                                     \
 2370|  2.78k|            ssl3_ctx_ctrl,                                                 \
 2371|  2.78k|            ssl3_get_cipher_by_char,                                       \
 2372|  2.78k|            ssl3_put_cipher_by_char,                                       \
 2373|  2.78k|            ssl3_pending,                                                  \
 2374|  2.78k|            ssl3_num_ciphers,                                              \
 2375|  2.78k|            ssl3_get_cipher,                                               \
 2376|  2.78k|            tls1_default_timeout,                                          \
 2377|  2.78k|            &enc_data,                                                     \
 2378|  2.78k|            ssl_undefined_void_function,                                   \
 2379|  2.78k|            ssl3_callback_ctrl,                                            \
 2380|  2.78k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  2.78k|        };                                                                 \
 2382|  2.78k|        return &func_name##_data;                                          \
 2383|  2.78k|    }
tlsv1_3_client_method:
 2347|  17.1k|    {                                                                      \
 2348|  17.1k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  17.1k|            version,                                                       \
 2350|  17.1k|            flags,                                                         \
 2351|  17.1k|            mask,                                                          \
 2352|  17.1k|            ossl_ssl_connection_new,                                       \
 2353|  17.1k|            ossl_ssl_connection_free,                                      \
 2354|  17.1k|            ossl_ssl_connection_reset,                                     \
 2355|  17.1k|            tls1_new,                                                      \
 2356|  17.1k|            tls1_clear,                                                    \
 2357|  17.1k|            tls1_free,                                                     \
 2358|  17.1k|            s_accept,                                                      \
 2359|  17.1k|            s_connect,                                                     \
 2360|  17.1k|            ssl3_read,                                                     \
 2361|  17.1k|            ssl3_peek,                                                     \
 2362|  17.1k|            ssl3_write,                                                    \
 2363|  17.1k|            ssl3_shutdown,                                                 \
 2364|  17.1k|            ssl3_renegotiate,                                              \
 2365|  17.1k|            ssl3_renegotiate_check,                                        \
 2366|  17.1k|            ssl3_read_bytes,                                               \
 2367|  17.1k|            ssl3_write_bytes,                                              \
 2368|  17.1k|            ssl3_dispatch_alert,                                           \
 2369|  17.1k|            ssl3_ctrl,                                                     \
 2370|  17.1k|            ssl3_ctx_ctrl,                                                 \
 2371|  17.1k|            ssl3_get_cipher_by_char,                                       \
 2372|  17.1k|            ssl3_put_cipher_by_char,                                       \
 2373|  17.1k|            ssl3_pending,                                                  \
 2374|  17.1k|            ssl3_num_ciphers,                                              \
 2375|  17.1k|            ssl3_get_cipher,                                               \
 2376|  17.1k|            tls1_default_timeout,                                          \
 2377|  17.1k|            &enc_data,                                                     \
 2378|  17.1k|            ssl_undefined_void_function,                                   \
 2379|  17.1k|            ssl3_callback_ctrl,                                            \
 2380|  17.1k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  17.1k|        };                                                                 \
 2382|  17.1k|        return &func_name##_data;                                          \
 2383|  17.1k|    }
tlsv1_2_client_method:
 2347|  17.2k|    {                                                                      \
 2348|  17.2k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  17.2k|            version,                                                       \
 2350|  17.2k|            flags,                                                         \
 2351|  17.2k|            mask,                                                          \
 2352|  17.2k|            ossl_ssl_connection_new,                                       \
 2353|  17.2k|            ossl_ssl_connection_free,                                      \
 2354|  17.2k|            ossl_ssl_connection_reset,                                     \
 2355|  17.2k|            tls1_new,                                                      \
 2356|  17.2k|            tls1_clear,                                                    \
 2357|  17.2k|            tls1_free,                                                     \
 2358|  17.2k|            s_accept,                                                      \
 2359|  17.2k|            s_connect,                                                     \
 2360|  17.2k|            ssl3_read,                                                     \
 2361|  17.2k|            ssl3_peek,                                                     \
 2362|  17.2k|            ssl3_write,                                                    \
 2363|  17.2k|            ssl3_shutdown,                                                 \
 2364|  17.2k|            ssl3_renegotiate,                                              \
 2365|  17.2k|            ssl3_renegotiate_check,                                        \
 2366|  17.2k|            ssl3_read_bytes,                                               \
 2367|  17.2k|            ssl3_write_bytes,                                              \
 2368|  17.2k|            ssl3_dispatch_alert,                                           \
 2369|  17.2k|            ssl3_ctrl,                                                     \
 2370|  17.2k|            ssl3_ctx_ctrl,                                                 \
 2371|  17.2k|            ssl3_get_cipher_by_char,                                       \
 2372|  17.2k|            ssl3_put_cipher_by_char,                                       \
 2373|  17.2k|            ssl3_pending,                                                  \
 2374|  17.2k|            ssl3_num_ciphers,                                              \
 2375|  17.2k|            ssl3_get_cipher,                                               \
 2376|  17.2k|            tls1_default_timeout,                                          \
 2377|  17.2k|            &enc_data,                                                     \
 2378|  17.2k|            ssl_undefined_void_function,                                   \
 2379|  17.2k|            ssl3_callback_ctrl,                                            \
 2380|  17.2k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  17.2k|        };                                                                 \
 2382|  17.2k|        return &func_name##_data;                                          \
 2383|  17.2k|    }
tlsv1_1_client_method:
 2347|  17.1k|    {                                                                      \
 2348|  17.1k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  17.1k|            version,                                                       \
 2350|  17.1k|            flags,                                                         \
 2351|  17.1k|            mask,                                                          \
 2352|  17.1k|            ossl_ssl_connection_new,                                       \
 2353|  17.1k|            ossl_ssl_connection_free,                                      \
 2354|  17.1k|            ossl_ssl_connection_reset,                                     \
 2355|  17.1k|            tls1_new,                                                      \
 2356|  17.1k|            tls1_clear,                                                    \
 2357|  17.1k|            tls1_free,                                                     \
 2358|  17.1k|            s_accept,                                                      \
 2359|  17.1k|            s_connect,                                                     \
 2360|  17.1k|            ssl3_read,                                                     \
 2361|  17.1k|            ssl3_peek,                                                     \
 2362|  17.1k|            ssl3_write,                                                    \
 2363|  17.1k|            ssl3_shutdown,                                                 \
 2364|  17.1k|            ssl3_renegotiate,                                              \
 2365|  17.1k|            ssl3_renegotiate_check,                                        \
 2366|  17.1k|            ssl3_read_bytes,                                               \
 2367|  17.1k|            ssl3_write_bytes,                                              \
 2368|  17.1k|            ssl3_dispatch_alert,                                           \
 2369|  17.1k|            ssl3_ctrl,                                                     \
 2370|  17.1k|            ssl3_ctx_ctrl,                                                 \
 2371|  17.1k|            ssl3_get_cipher_by_char,                                       \
 2372|  17.1k|            ssl3_put_cipher_by_char,                                       \
 2373|  17.1k|            ssl3_pending,                                                  \
 2374|  17.1k|            ssl3_num_ciphers,                                              \
 2375|  17.1k|            ssl3_get_cipher,                                               \
 2376|  17.1k|            tls1_default_timeout,                                          \
 2377|  17.1k|            &enc_data,                                                     \
 2378|  17.1k|            ssl_undefined_void_function,                                   \
 2379|  17.1k|            ssl3_callback_ctrl,                                            \
 2380|  17.1k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  17.1k|        };                                                                 \
 2382|  17.1k|        return &func_name##_data;                                          \
 2383|  17.1k|    }
tlsv1_client_method:
 2347|  17.1k|    {                                                                      \
 2348|  17.1k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  17.1k|            version,                                                       \
 2350|  17.1k|            flags,                                                         \
 2351|  17.1k|            mask,                                                          \
 2352|  17.1k|            ossl_ssl_connection_new,                                       \
 2353|  17.1k|            ossl_ssl_connection_free,                                      \
 2354|  17.1k|            ossl_ssl_connection_reset,                                     \
 2355|  17.1k|            tls1_new,                                                      \
 2356|  17.1k|            tls1_clear,                                                    \
 2357|  17.1k|            tls1_free,                                                     \
 2358|  17.1k|            s_accept,                                                      \
 2359|  17.1k|            s_connect,                                                     \
 2360|  17.1k|            ssl3_read,                                                     \
 2361|  17.1k|            ssl3_peek,                                                     \
 2362|  17.1k|            ssl3_write,                                                    \
 2363|  17.1k|            ssl3_shutdown,                                                 \
 2364|  17.1k|            ssl3_renegotiate,                                              \
 2365|  17.1k|            ssl3_renegotiate_check,                                        \
 2366|  17.1k|            ssl3_read_bytes,                                               \
 2367|  17.1k|            ssl3_write_bytes,                                              \
 2368|  17.1k|            ssl3_dispatch_alert,                                           \
 2369|  17.1k|            ssl3_ctrl,                                                     \
 2370|  17.1k|            ssl3_ctx_ctrl,                                                 \
 2371|  17.1k|            ssl3_get_cipher_by_char,                                       \
 2372|  17.1k|            ssl3_put_cipher_by_char,                                       \
 2373|  17.1k|            ssl3_pending,                                                  \
 2374|  17.1k|            ssl3_num_ciphers,                                              \
 2375|  17.1k|            ssl3_get_cipher,                                               \
 2376|  17.1k|            tls1_default_timeout,                                          \
 2377|  17.1k|            &enc_data,                                                     \
 2378|  17.1k|            ssl_undefined_void_function,                                   \
 2379|  17.1k|            ssl3_callback_ctrl,                                            \
 2380|  17.1k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  17.1k|        };                                                                 \
 2382|  17.1k|        return &func_name##_data;                                          \
 2383|  17.1k|    }
sslv3_client_method:
 2387|  17.1k|    {                                                            \
 2388|  17.1k|        static const SSL_METHOD func_name##_data = {             \
 2389|  17.1k|            SSL3_VERSION,                                        \
  ------------------
  |  |   23|  17.1k|#define SSL3_VERSION 0x0300
  ------------------
 2390|  17.1k|            SSL_METHOD_NO_FIPS | SSL_METHOD_NO_SUITEB,           \
  ------------------
  |  | 2341|  17.1k|#define SSL_METHOD_NO_FIPS (1U << 0)
  ------------------
                          SSL_METHOD_NO_FIPS | SSL_METHOD_NO_SUITEB,           \
  ------------------
  |  | 2342|  17.1k|#define SSL_METHOD_NO_SUITEB (1U << 1)
  ------------------
 2391|  17.1k|            SSL_OP_NO_SSLv3,                                     \
  ------------------
  |  |  428|  17.1k|#define SSL_OP_NO_SSLv3 SSL_OP_BIT(25)
  |  |  ------------------
  |  |  |  |  350|  17.1k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 2392|  17.1k|            ossl_ssl_connection_new,                             \
 2393|  17.1k|            ossl_ssl_connection_free,                            \
 2394|  17.1k|            ossl_ssl_connection_reset,                           \
 2395|  17.1k|            ssl3_new,                                            \
 2396|  17.1k|            ssl3_clear,                                          \
 2397|  17.1k|            ssl3_free,                                           \
 2398|  17.1k|            s_accept,                                            \
 2399|  17.1k|            s_connect,                                           \
 2400|  17.1k|            ssl3_read,                                           \
 2401|  17.1k|            ssl3_peek,                                           \
 2402|  17.1k|            ssl3_write,                                          \
 2403|  17.1k|            ssl3_shutdown,                                       \
 2404|  17.1k|            ssl3_renegotiate,                                    \
 2405|  17.1k|            ssl3_renegotiate_check,                              \
 2406|  17.1k|            ssl3_read_bytes,                                     \
 2407|  17.1k|            ssl3_write_bytes,                                    \
 2408|  17.1k|            ssl3_dispatch_alert,                                 \
 2409|  17.1k|            ssl3_ctrl,                                           \
 2410|  17.1k|            ssl3_ctx_ctrl,                                       \
 2411|  17.1k|            ssl3_get_cipher_by_char,                             \
 2412|  17.1k|            ssl3_put_cipher_by_char,                             \
 2413|  17.1k|            ssl3_pending,                                        \
 2414|  17.1k|            ssl3_num_ciphers,                                    \
 2415|  17.1k|            ssl3_get_cipher,                                     \
 2416|  17.1k|            ssl3_default_timeout,                                \
 2417|  17.1k|            &SSLv3_enc_data,                                     \
 2418|  17.1k|            ssl_undefined_void_function,                         \
 2419|  17.1k|            ssl3_callback_ctrl,                                  \
 2420|  17.1k|            ssl3_ctx_callback_ctrl,                              \
 2421|  17.1k|        };                                                       \
 2422|  17.1k|        return &func_name##_data;                                \
 2423|  17.1k|    }
statem_lib.c:ssl_tsan_counter:
 3074|  1.95k|{
 3075|  1.95k|    if (ssl_tsan_lock(ctx)) {
  ------------------
  |  Branch (3075:9): [True: 1.95k, False: 0]
  ------------------
 3076|       |        tsan_counter(stat);
  ------------------
  |  |  149|  1.95k|#define tsan_counter(ptr) tsan_add((ptr), 1)
  |  |  ------------------
  |  |  |  |   63|  1.95k|#define tsan_add(ptr, n) atomic_fetch_add_explicit((ptr), (n), memory_order_relaxed)
  |  |  ------------------
  ------------------
 3077|  1.95k|        ssl_tsan_unlock(ctx);
 3078|  1.95k|    }
 3079|  1.95k|}
statem_lib.c:ssl_tsan_lock:
 3057|  1.95k|{
 3058|       |#ifdef TSAN_REQUIRES_LOCKING
 3059|       |    if (!CRYPTO_THREAD_write_lock(ctx->tsan_lock))
 3060|       |        return 0;
 3061|       |#endif
 3062|  1.95k|    return 1;
 3063|  1.95k|}
statem_lib.c:ssl_tsan_unlock:
 3066|  1.95k|{
 3067|       |#ifdef TSAN_REQUIRES_LOCKING
 3068|       |    CRYPTO_THREAD_unlock(ctx->tsan_lock);
 3069|       |#endif
 3070|  1.95k|}

ssl_ctx_system_config:
  105|  2.70k|{
  106|  2.70k|    return ssl_do_config(NULL, ctx, NULL, 1);
  107|  2.70k|}
ssl_mcnf.c:ssl_do_config:
   24|  2.70k|{
   25|  2.70k|    SSL_CONF_CTX *cctx = NULL;
   26|  2.70k|    size_t i, idx, cmd_count;
   27|  2.70k|    int err = 1;
   28|  2.70k|    unsigned int flags;
   29|  2.70k|    unsigned int conf_diagnostics = 0;
   30|  2.70k|    const SSL_METHOD *meth;
   31|  2.70k|    const SSL_CONF_CMD *cmds;
   32|  2.70k|    OSSL_LIB_CTX *prev_libctx = NULL;
   33|  2.70k|    OSSL_LIB_CTX *libctx = NULL;
   34|       |
   35|  2.70k|    if (s == NULL && ctx == NULL) {
  ------------------
  |  Branch (35:9): [True: 2.70k, False: 0]
  |  Branch (35:22): [True: 0, False: 2.70k]
  ------------------
   36|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   37|      0|        goto err;
   38|      0|    }
   39|       |
   40|  2.70k|    if (name == NULL && system)
  ------------------
  |  Branch (40:9): [True: 2.70k, False: 0]
  |  Branch (40:25): [True: 2.70k, False: 0]
  ------------------
   41|  2.70k|        name = "system_default";
   42|  2.70k|    if (!conf_ssl_name_find(name, &idx)) {
  ------------------
  |  Branch (42:9): [True: 2.70k, False: 0]
  ------------------
   43|  2.70k|        if (!system)
  ------------------
  |  Branch (43:13): [True: 0, False: 2.70k]
  ------------------
   44|      0|            ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |   89|      0|#define ERR_LIB_SSL 20
  ------------------
                          ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  148|      0|#define SSL_R_INVALID_CONFIGURATION_NAME 113
  ------------------
   45|      0|                "name=%s", name);
   46|  2.70k|        goto err;
   47|  2.70k|    }
   48|      0|    cmds = conf_ssl_get(idx, &name, &cmd_count);
   49|      0|    cctx = SSL_CONF_CTX_new();
   50|      0|    if (cctx == NULL) {
  ------------------
  |  Branch (50:9): [True: 0, False: 0]
  ------------------
   51|       |        /* this is a fatal error, always report */
   52|      0|        system = 0;
   53|      0|        goto err;
   54|      0|    }
   55|      0|    flags = SSL_CONF_FLAG_FILE;
  ------------------
  |  |  604|      0|#define SSL_CONF_FLAG_FILE 0x2
  ------------------
   56|      0|    if (!system)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|        flags |= SSL_CONF_FLAG_CERTIFICATE | SSL_CONF_FLAG_REQUIRE_PRIVATE;
  ------------------
  |  |  608|      0|#define SSL_CONF_FLAG_CERTIFICATE 0x20
  ------------------
                      flags |= SSL_CONF_FLAG_CERTIFICATE | SSL_CONF_FLAG_REQUIRE_PRIVATE;
  ------------------
  |  |  609|      0|#define SSL_CONF_FLAG_REQUIRE_PRIVATE 0x40
  ------------------
   58|      0|    if (s != NULL) {
  ------------------
  |  Branch (58:9): [True: 0, False: 0]
  ------------------
   59|      0|        meth = s->method;
   60|      0|        SSL_CONF_CTX_set_ssl(cctx, s);
   61|      0|        libctx = s->ctx->libctx;
   62|      0|    } else {
   63|      0|        meth = ctx->method;
   64|      0|        SSL_CONF_CTX_set_ssl_ctx(cctx, ctx);
   65|      0|        libctx = ctx->libctx;
   66|      0|    }
   67|      0|    conf_diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
   68|      0|    if (conf_diagnostics)
  ------------------
  |  Branch (68:9): [True: 0, False: 0]
  ------------------
   69|      0|        flags |= SSL_CONF_FLAG_SHOW_ERRORS;
  ------------------
  |  |  607|      0|#define SSL_CONF_FLAG_SHOW_ERRORS 0x10
  ------------------
   70|      0|    if (meth->ssl_accept != ssl_undefined_function)
  ------------------
  |  Branch (70:9): [True: 0, False: 0]
  ------------------
   71|      0|        flags |= SSL_CONF_FLAG_SERVER;
  ------------------
  |  |  606|      0|#define SSL_CONF_FLAG_SERVER 0x8
  ------------------
   72|      0|    if (meth->ssl_connect != ssl_undefined_function)
  ------------------
  |  Branch (72:9): [True: 0, False: 0]
  ------------------
   73|      0|        flags |= SSL_CONF_FLAG_CLIENT;
  ------------------
  |  |  605|      0|#define SSL_CONF_FLAG_CLIENT 0x4
  ------------------
   74|      0|    SSL_CONF_CTX_set_flags(cctx, flags);
   75|      0|    prev_libctx = OSSL_LIB_CTX_set0_default(libctx);
   76|      0|    err = 0;
   77|      0|    for (i = 0; i < cmd_count; i++) {
  ------------------
  |  Branch (77:17): [True: 0, False: 0]
  ------------------
   78|      0|        char *cmdstr, *arg;
   79|      0|        int rv;
   80|       |
   81|      0|        conf_ssl_get_cmd(cmds, i, &cmdstr, &arg);
   82|      0|        rv = SSL_CONF_cmd(cctx, cmdstr, arg);
   83|      0|        if (rv <= 0)
  ------------------
  |  Branch (83:13): [True: 0, False: 0]
  ------------------
   84|      0|            ++err;
   85|      0|    }
   86|      0|    if (!SSL_CONF_CTX_finish(cctx))
  ------------------
  |  Branch (86:9): [True: 0, False: 0]
  ------------------
   87|      0|        ++err;
   88|  2.70k|err:
   89|  2.70k|    OSSL_LIB_CTX_set0_default(prev_libctx);
   90|  2.70k|    SSL_CONF_CTX_free(cctx);
   91|  2.70k|    return err == 0 || (system && !conf_diagnostics);
  ------------------
  |  Branch (91:12): [True: 0, False: 2.70k]
  |  Branch (91:25): [True: 2.70k, False: 0]
  |  Branch (91:35): [True: 2.70k, False: 0]
  ------------------
   92|      0|}

SSL_CTX_use_certificate_chain_file:
  590|      8|{
  591|       |    return use_certificate_chain_file(ctx, NULL, file);
  592|      8|}
ssl_rsa.c:use_certificate_chain_file:
  464|      8|{
  465|      8|    BIO *in = NULL;
  466|      8|    int ret = 0;
  467|      8|    X509 *x = NULL;
  468|      8|    pem_password_cb *passwd_callback;
  469|      8|    void *passwd_callback_userdata;
  470|      8|    SSL_CTX *real_ctx = (ssl == NULL) ? ctx : ssl->ctx;
  ------------------
  |  Branch (470:25): [True: 8, False: 0]
  ------------------
  471|       |
  472|      8|    if (ctx == NULL && ssl == NULL)
  ------------------
  |  Branch (472:9): [True: 0, False: 8]
  |  Branch (472:24): [True: 0, False: 0]
  ------------------
  473|      0|        return 0;
  474|       |
  475|      8|    ERR_clear_error(); /* clear error stack for
  476|       |                        * SSL_CTX_use_certificate() */
  477|       |
  478|      8|    if (ctx != NULL) {
  ------------------
  |  Branch (478:9): [True: 8, False: 0]
  ------------------
  479|      8|        passwd_callback = ctx->default_passwd_callback;
  480|      8|        passwd_callback_userdata = ctx->default_passwd_callback_userdata;
  481|      8|    } 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                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|      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)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229: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|      8|    if (file == NULL) {
  ------------------
  |  Branch (491:9): [True: 0, False: 8]
  ------------------
  492|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  493|      0|        goto end;
  494|      0|    }
  495|       |
  496|      8|    in = BIO_new(BIO_s_file());
  497|      8|    if (in == NULL) {
  ------------------
  |  Branch (497:9): [True: 0, False: 8]
  ------------------
  498|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|      0|        goto end;
  500|      0|    }
  501|       |
  502|      8|    if (BIO_read_filename(in, file) <= 0) {
  ------------------
  |  |  586|      8|#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
  |  |  ------------------
  |  |  |  |  442|      8|#define BIO_C_SET_FILENAME 108
  |  |  ------------------
  |  |  587|      8|    BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |   85|      8|#define BIO_CLOSE 0x01
  |  |  ------------------
  |  |                   BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |  217|      8|#define BIO_FP_READ 0x02
  |  |  ------------------
  ------------------
  |  Branch (502:9): [True: 4, False: 4]
  ------------------
  503|      4|        ERR_raise(ERR_LIB_SSL, ERR_R_SYS_LIB);
  ------------------
  |  |  404|      4|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      4|    (ERR_new(),                                                  \
  |  |  |  |  407|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      4|        ERR_set_error)
  |  |  ------------------
  ------------------
  504|      4|        goto end;
  505|      4|    }
  506|       |
  507|      4|    x = X509_new_ex(real_ctx->libctx, real_ctx->propq);
  508|      4|    if (x == NULL) {
  ------------------
  |  Branch (508:9): [True: 0, False: 4]
  ------------------
  509|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  510|      0|        goto end;
  511|      0|    }
  512|      4|    if (PEM_read_bio_X509_AUX(in, &x, passwd_callback,
  ------------------
  |  Branch (512:9): [True: 4, False: 0]
  ------------------
  513|      4|            passwd_callback_userdata)
  514|      4|        == NULL) {
  515|      4|        ERR_raise(ERR_LIB_SSL, ERR_R_PEM_LIB);
  ------------------
  |  |  404|      4|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      4|    (ERR_new(),                                                  \
  |  |  |  |  407|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      4|        ERR_set_error)
  |  |  ------------------
  ------------------
  516|      4|        goto end;
  517|      4|    }
  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);
  ------------------
  |  | 1448|      0|    SSL_CTX_set0_chain(ctx, NULL)
  |  |  ------------------
  |  |  |  | 1438|      0|    SSL_CTX_ctrl(ctx, SSL_CTRL_CHAIN, 0, (char *)(sk))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|      0|#define SSL_CTRL_CHAIN 88
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|      0|        else
  539|      0|            r = SSL_clear_chain_certs(ssl);
  ------------------
  |  | 1478|      0|    SSL_set0_chain(s, NULL)
  |  |  ------------------
  |  |  |  | 1468|      0|    SSL_ctrl(s, SSL_CTRL_CHAIN, 0, (char *)(sk))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|      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);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      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);
  ------------------
  |  | 1442|      0|    SSL_CTX_ctrl(ctx, SSL_CTRL_CHAIN_CERT, 0, (char *)(x509))
  |  |  ------------------
  |  |  |  | 1350|      0|#define SSL_CTRL_CHAIN_CERT 89
  |  |  ------------------
  ------------------
  557|      0|                else
  558|      0|                    r = SSL_add0_chain_cert(ssl, ca);
  ------------------
  |  | 1472|      0|    SSL_ctrl(s, SSL_CTRL_CHAIN_CERT, 0, (char *)(x509))
  |  |  ------------------
  |  |  |  | 1350|      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
  ------------------
  |  |   81|      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|      8|end:
  584|      8|    X509_free(x);
  585|      8|    BIO_free(in);
  586|      8|    return ret;
  587|      0|}

ssl_session_calculate_timeout:
   49|  3.90k|{
   50|  3.90k|    ss->calc_timeout = ossl_time_add(ss->time, ss->timeout);
   51|  3.90k|}
SSL_SESSION_new:
  103|  1.95k|{
  104|  1.95k|    SSL_SESSION *ss;
  105|       |
  106|  1.95k|    if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))
  ------------------
  |  | 2822|  1.95k|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (106:9): [True: 0, False: 1.95k]
  ------------------
  107|      0|        return NULL;
  108|       |
  109|  1.95k|    ss = OPENSSL_zalloc(sizeof(*ss));
  ------------------
  |  |  108|  1.95k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|  1.95k|    if (ss == NULL)
  ------------------
  |  Branch (110:9): [True: 0, False: 1.95k]
  ------------------
  111|      0|        return NULL;
  112|       |
  113|  1.95k|    ss->ext.max_fragment_len_mode = TLSEXT_max_fragment_length_UNSPECIFIED;
  ------------------
  |  |  234|  1.95k|#define TLSEXT_max_fragment_length_UNSPECIFIED 255
  ------------------
  114|  1.95k|    ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */
  115|       |    /* 5 minute timeout by default */
  116|  1.95k|    ss->timeout = ossl_seconds2time(60 * 5 + 4);
  ------------------
  |  |   42|  1.95k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  1.95k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  117|  1.95k|    ss->time = ossl_time_now();
  118|  1.95k|    ssl_session_calculate_timeout(ss);
  119|  1.95k|    if (!CRYPTO_NEW_REF(&ss->references, 1)) {
  ------------------
  |  Branch (119:9): [True: 0, False: 1.95k]
  ------------------
  120|      0|        OPENSSL_free(ss);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|      0|        return NULL;
  122|      0|    }
  123|       |
  124|  1.95k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data)) {
  ------------------
  |  |  252|  1.95k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  |  Branch (124:9): [True: 0, False: 1.95k]
  ------------------
  125|      0|        CRYPTO_FREE_REF(&ss->references);
  126|      0|        OPENSSL_free(ss);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  127|      0|        return NULL;
  128|      0|    }
  129|  1.95k|    return ss;
  130|  1.95k|}
ssl_get_new_session:
  436|  1.95k|{
  437|       |    /* This gets used by clients and servers. */
  438|       |
  439|  1.95k|    SSL_SESSION *ss = NULL;
  440|       |
  441|  1.95k|    if ((ss = SSL_SESSION_new()) == NULL) {
  ------------------
  |  Branch (441:9): [True: 0, False: 1.95k]
  ------------------
  442|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_SSL_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  443|      0|        return 0;
  444|      0|    }
  445|       |
  446|       |    /* If the context has a default timeout, use it */
  447|  1.95k|    if (ossl_time_is_zero(s->session_ctx->session_timeout))
  ------------------
  |  Branch (447:9): [True: 0, False: 1.95k]
  ------------------
  448|      0|        ss->timeout = SSL_CONNECTION_GET_SSL(s)->method->get_timeout();
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  449|  1.95k|    else
  450|  1.95k|        ss->timeout = s->session_ctx->session_timeout;
  451|  1.95k|    ssl_session_calculate_timeout(ss);
  452|       |
  453|  1.95k|    SSL_SESSION_free(s->session);
  454|  1.95k|    s->session = NULL;
  455|       |
  456|  1.95k|    if (session) {
  ------------------
  |  Branch (456:9): [True: 0, False: 1.95k]
  ------------------
  457|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      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 (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  458|       |            /*
  459|       |             * We generate the session id while constructing the
  460|       |             * NewSessionTicket in TLSv1.3.
  461|       |             */
  462|      0|            ss->session_id_length = 0;
  463|      0|        } else if (!ssl_generate_session_id(s, ss)) {
  ------------------
  |  Branch (463:20): [True: 0, False: 0]
  ------------------
  464|       |            /* SSLfatal() already called */
  465|      0|            SSL_SESSION_free(ss);
  466|      0|            return 0;
  467|      0|        }
  468|       |
  469|  1.95k|    } else {
  470|  1.95k|        ss->session_id_length = 0;
  471|  1.95k|    }
  472|       |
  473|  1.95k|    if (s->sid_ctx_length > sizeof(ss->sid_ctx)) {
  ------------------
  |  Branch (473:9): [True: 0, False: 1.95k]
  ------------------
  474|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  475|      0|        SSL_SESSION_free(ss);
  476|      0|        return 0;
  477|      0|    }
  478|  1.95k|    memcpy(ss->sid_ctx, s->sid_ctx, s->sid_ctx_length);
  479|  1.95k|    ss->sid_ctx_length = s->sid_ctx_length;
  480|  1.95k|    s->session = ss;
  481|  1.95k|    ss->ssl_version = s->version;
  482|  1.95k|    ss->verify_result = X509_V_OK;
  ------------------
  |  |  312|  1.95k|#define X509_V_OK 0
  ------------------
  483|       |
  484|       |    /* If client supports extended master secret set it in session */
  485|  1.95k|    if (s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS)
  ------------------
  |  |  300|  1.95k|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (485:9): [True: 0, False: 1.95k]
  ------------------
  486|      0|        ss->flags |= SSL_SESS_FLAG_EXTMS;
  ------------------
  |  |  567|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  487|       |
  488|  1.95k|    return 1;
  489|  1.95k|}
SSL_CTX_remove_session:
  811|  1.79k|{
  812|  1.79k|    return remove_session_lock(ctx, c, 1);
  813|  1.79k|}
SSL_SESSION_free:
  845|  11.5k|{
  846|  11.5k|    int i;
  847|       |
  848|  11.5k|    if (ss == NULL)
  ------------------
  |  Branch (848:9): [True: 9.63k, False: 1.95k]
  ------------------
  849|  9.63k|        return;
  850|  1.95k|    CRYPTO_DOWN_REF(&ss->references, &i);
  851|  1.95k|    REF_PRINT_COUNT("SSL_SESSION", i, ss);
  ------------------
  |  |  301|  1.95k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  1.95k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  1.95k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  1.95k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  852|  1.95k|    if (i > 0)
  ------------------
  |  Branch (852:9): [True: 0, False: 1.95k]
  ------------------
  853|      0|        return;
  854|  1.95k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  1.95k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 1.95k]
  |  |  ------------------
  ------------------
  855|       |
  856|  1.95k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data);
  ------------------
  |  |  252|  1.95k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  857|       |
  858|  1.95k|    OPENSSL_cleanse(ss->master_key, sizeof(ss->master_key));
  859|  1.95k|    OPENSSL_cleanse(ss->session_id, sizeof(ss->session_id));
  860|  1.95k|    X509_free(ss->peer);
  861|  1.95k|    EVP_PKEY_free(ss->peer_rpk);
  862|  1.95k|    OSSL_STACK_OF_X509_free(ss->peer_chain);
  863|  1.95k|    OPENSSL_free(ss->ext.hostname);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  864|  1.95k|    OPENSSL_free(ss->ext.tick);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  865|  1.95k|#ifndef OPENSSL_NO_PSK
  866|  1.95k|    OPENSSL_free(ss->psk_identity_hint);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  867|  1.95k|    OPENSSL_free(ss->psk_identity);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  868|  1.95k|#endif
  869|  1.95k|#ifndef OPENSSL_NO_SRP
  870|  1.95k|    OPENSSL_free(ss->srp_username);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  871|  1.95k|#endif
  872|  1.95k|    OPENSSL_free(ss->ext.alpn_selected);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  873|  1.95k|    OPENSSL_free(ss->ticket_appdata);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  874|  1.95k|    CRYPTO_FREE_REF(&ss->references);
  875|  1.95k|    OPENSSL_clear_free(ss, sizeof(*ss));
  ------------------
  |  |  129|  1.95k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  876|  1.95k|}
SSL_CTX_flush_sessions_ex:
 1211|  2.78k|{
 1212|  2.78k|    STACK_OF(SSL_SESSION) *sk;
  ------------------
  |  |   33|  2.78k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1213|  2.78k|    SSL_SESSION *current;
 1214|  2.78k|    unsigned long i;
 1215|  2.78k|    const OSSL_TIME timeout = ossl_time_from_time_t(t);
 1216|       |
 1217|  2.78k|    if (!CRYPTO_THREAD_write_lock(s->lock))
  ------------------
  |  Branch (1217:9): [True: 0, False: 2.78k]
  ------------------
 1218|      0|        return;
 1219|       |
 1220|  2.78k|    sk = sk_SSL_SESSION_new_null();
 1221|  2.78k|    i = lh_SSL_SESSION_get_down_load(s->sessions);
 1222|  2.78k|    lh_SSL_SESSION_set_down_load(s->sessions, 0);
 1223|       |
 1224|       |    /*
 1225|       |     * Iterate over the list from the back (oldest), and stop
 1226|       |     * when a session can no longer be removed.
 1227|       |     * Add the session to a temporary list to be freed outside
 1228|       |     * the SSL_CTX lock.
 1229|       |     * But still do the remove_session_cb() within the lock.
 1230|       |     */
 1231|  2.78k|    while (s->session_cache_tail != NULL) {
  ------------------
  |  Branch (1231:12): [True: 0, False: 2.78k]
  ------------------
 1232|      0|        current = s->session_cache_tail;
 1233|      0|        if (t == 0 || sess_timedout(timeout, current)) {
  ------------------
  |  Branch (1233:13): [True: 0, False: 0]
  |  Branch (1233:23): [True: 0, False: 0]
  ------------------
 1234|      0|            lh_SSL_SESSION_delete(s->sessions, current);
 1235|      0|            SSL_SESSION_list_remove(s, current);
 1236|      0|            current->not_resumable = 1;
 1237|      0|            if (s->remove_session_cb != NULL)
  ------------------
  |  Branch (1237:17): [True: 0, False: 0]
  ------------------
 1238|      0|                s->remove_session_cb(s, current);
 1239|       |            /*
 1240|       |             * Throw the session on a stack, it's entirely plausible
 1241|       |             * that while freeing outside the critical section, the
 1242|       |             * session could be re-added, so avoid using the next/prev
 1243|       |             * pointers. If the stack failed to create, or the session
 1244|       |             * couldn't be put on the stack, just free it here
 1245|       |             */
 1246|      0|            if (sk == NULL || !sk_SSL_SESSION_push(sk, current))
  ------------------
  |  Branch (1246:17): [True: 0, False: 0]
  |  Branch (1246:31): [True: 0, False: 0]
  ------------------
 1247|      0|                SSL_SESSION_free(current);
 1248|      0|        } else {
 1249|      0|            break;
 1250|      0|        }
 1251|      0|    }
 1252|       |
 1253|  2.78k|    lh_SSL_SESSION_set_down_load(s->sessions, i);
 1254|  2.78k|    CRYPTO_THREAD_unlock(s->lock);
 1255|       |
 1256|  2.78k|    sk_SSL_SESSION_pop_free(sk, SSL_SESSION_free);
 1257|  2.78k|}
ssl_clear_bad_session:
 1260|  5.86k|{
 1261|  5.86k|    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)))) {
  ------------------
  |  |  215|  1.95k|#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|  1.95k|#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 (1261:9): [True: 1.95k, False: 3.91k]
  |  Branch (1261:33): [True: 1.95k, False: 0]
  |  Branch (1261:73): [True: 1.95k, False: 0]
  |  Branch (1261:115): [True: 0, False: 0]
  ------------------
 1262|      0|        SSL_CTX_remove_session(s->session_ctx, s->session);
 1263|      0|        return 1;
 1264|      0|    } else
 1265|  5.86k|        return 0;
 1266|  5.86k|}
SSL_CTX_sess_set_new_cb:
 1350|  1.95k|{
 1351|  1.95k|    ctx->new_session_cb = cb;
 1352|  1.95k|}
ssl_sess.c:remove_session_lock:
  816|  1.79k|{
  817|  1.79k|    SSL_SESSION *r;
  818|  1.79k|    int ret = 0;
  819|       |
  820|  1.79k|    if ((c != NULL) && (c->session_id_length != 0)) {
  ------------------
  |  Branch (820:9): [True: 1.79k, False: 0]
  |  Branch (820:24): [True: 9, False: 1.79k]
  ------------------
  821|      9|        if (lck) {
  ------------------
  |  Branch (821:13): [True: 9, False: 0]
  ------------------
  822|      9|            if (!CRYPTO_THREAD_write_lock(ctx->lock))
  ------------------
  |  Branch (822:17): [True: 0, False: 9]
  ------------------
  823|      0|                return 0;
  824|      9|        }
  825|      9|        if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) != NULL) {
  ------------------
  |  Branch (825:13): [True: 0, False: 9]
  ------------------
  826|      0|            ret = 1;
  827|      0|            r = lh_SSL_SESSION_delete(ctx->sessions, r);
  828|      0|            SSL_SESSION_list_remove(ctx, r);
  829|      0|        }
  830|      9|        c->not_resumable = 1;
  831|       |
  832|      9|        if (lck)
  ------------------
  |  Branch (832:13): [True: 9, False: 0]
  ------------------
  833|      9|            CRYPTO_THREAD_unlock(ctx->lock);
  834|       |
  835|      9|        if (ctx->remove_session_cb != NULL)
  ------------------
  |  Branch (835:13): [True: 0, False: 9]
  ------------------
  836|      0|            ctx->remove_session_cb(ctx, c);
  837|       |
  838|      9|        if (ret)
  ------------------
  |  Branch (838:13): [True: 0, False: 9]
  ------------------
  839|      0|            SSL_SESSION_free(r);
  840|      9|    }
  841|  1.79k|    return ret;
  842|  1.79k|}

tls_validate_all_contexts:
  417|     43|{
  418|     43|    size_t i, num_exts, builtin_num = OSSL_NELEM(ext_defs), offset;
  ------------------
  |  |   14|     43|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  419|     43|    RAW_EXTENSION *thisext;
  420|     43|    unsigned int context;
  421|     43|    ENDPOINT role = ENDPOINT_BOTH;
  422|       |
  423|     43|    if ((thisctx & SSL_EXT_CLIENT_HELLO) != 0)
  ------------------
  |  |  299|     43|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (423:9): [True: 0, False: 43]
  ------------------
  424|      0|        role = ENDPOINT_SERVER;
  425|     43|    else if ((thisctx & SSL_EXT_TLS1_2_SERVER_HELLO) != 0)
  ------------------
  |  |  301|     43|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (425:14): [True: 43, False: 0]
  ------------------
  426|     43|        role = ENDPOINT_CLIENT;
  427|       |
  428|       |    /* Calculate the number of extensions in the extensions list */
  429|     43|    num_exts = builtin_num + s->cert->custext.meths_count;
  430|       |
  431|  1.27k|    for (thisext = exts, i = 0; i < num_exts; i++, thisext++) {
  ------------------
  |  Branch (431:33): [True: 1.23k, False: 41]
  ------------------
  432|  1.23k|        if (!thisext->present)
  ------------------
  |  Branch (432:13): [True: 1.18k, False: 48]
  ------------------
  433|  1.18k|            continue;
  434|       |
  435|     48|        if (i < builtin_num) {
  ------------------
  |  Branch (435:13): [True: 48, False: 0]
  ------------------
  436|     48|            context = ext_defs[i].context;
  437|     48|        } else {
  438|      0|            custom_ext_method *meth = NULL;
  439|       |
  440|      0|            meth = custom_ext_find(&s->cert->custext, role, thisext->type,
  441|      0|                &offset);
  442|      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 (442:17): [True: 0, False: 0]
  ------------------
  443|      0|                return 0;
  444|      0|            context = meth->context;
  445|      0|        }
  446|       |
  447|     48|        if (!validate_context(s, context, thisctx))
  ------------------
  |  Branch (447:13): [True: 2, False: 46]
  ------------------
  448|      2|            return 0;
  449|     48|    }
  450|       |
  451|     41|    return 1;
  452|     43|}
extension_is_relevant:
  510|  54.4k|{
  511|  54.4k|    int is_tls13;
  512|       |
  513|       |    /*
  514|       |     * For HRR we haven't selected the version yet but we know it will be
  515|       |     * TLSv1.3
  516|       |     */
  517|  54.4k|    if ((thisctx & SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST) != 0)
  ------------------
  |  |  304|  54.4k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (517:9): [True: 0, False: 54.4k]
  ------------------
  518|      0|        is_tls13 = 1;
  519|  54.4k|    else
  520|  54.4k|        is_tls13 = SSL_CONNECTION_IS_TLS13(s);
  ------------------
  |  |  265|  54.4k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|   108k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  54.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  54.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 54.4k, False: 0]
  |  |  ------------------
  |  |  266|  54.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  54.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   108k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 54.4k, False: 27]
  |  |  ------------------
  |  |  267|  54.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  54.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  54.4k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 54.4k]
  |  |  ------------------
  ------------------
  521|       |
  522|  54.4k|    if ((SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|   108k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  54.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  54.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 54.4k]
  |  |  ------------------
  ------------------
  523|      0|            && (extctx & SSL_EXT_TLS_IMPLEMENTATION_ONLY) != 0)
  ------------------
  |  |  290|      0|#define SSL_EXT_TLS_IMPLEMENTATION_ONLY 0x00004
  ------------------
  |  Branch (523:16): [True: 0, False: 0]
  ------------------
  524|  54.4k|        || (s->version == SSL3_VERSION
  ------------------
  |  |   23|   108k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (524:13): [True: 1, False: 54.4k]
  ------------------
  525|      1|            && (extctx & SSL_EXT_SSL3_ALLOWED) == 0)
  ------------------
  |  |  292|      1|#define SSL_EXT_SSL3_ALLOWED 0x00008
  ------------------
  |  Branch (525:16): [True: 1, False: 0]
  ------------------
  526|       |        /*
  527|       |         * Note that SSL_IS_TLS13() means "TLS 1.3 has been negotiated",
  528|       |         * which is never true when generating the ClientHello.
  529|       |         * However, version negotiation *has* occurred by the time the
  530|       |         * ClientHello extensions are being parsed.
  531|       |         * Be careful to allow TLS 1.3-only extensions when generating
  532|       |         * the ClientHello.
  533|       |         */
  534|  54.4k|        || (is_tls13 && (extctx & SSL_EXT_TLS1_2_AND_BELOW_ONLY) != 0)
  ------------------
  |  |  294|      0|#define SSL_EXT_TLS1_2_AND_BELOW_ONLY 0x00010
  ------------------
  |  Branch (534:13): [True: 0, False: 54.4k]
  |  Branch (534:25): [True: 0, False: 0]
  ------------------
  535|  54.4k|        || (!is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  296|  54.4k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (535:13): [True: 54.4k, False: 0]
  |  Branch (535:26): [True: 14.6k, False: 39.8k]
  ------------------
  536|  14.6k|            && (thisctx & SSL_EXT_CLIENT_HELLO) == 0)
  ------------------
  |  |  299|  14.6k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (536:16): [True: 0, False: 14.6k]
  ------------------
  537|  54.4k|        || (s->server && !is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0)
  ------------------
  |  |  296|      0|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (537:13): [True: 0, False: 54.4k]
  |  Branch (537:26): [True: 0, False: 0]
  |  Branch (537:39): [True: 0, False: 0]
  ------------------
  538|  54.4k|        || (s->hit && (extctx & SSL_EXT_IGNORE_ON_RESUMPTION) != 0))
  ------------------
  |  |  298|      0|#define SSL_EXT_IGNORE_ON_RESUMPTION 0x00040
  ------------------
  |  Branch (538:13): [True: 0, False: 54.4k]
  |  Branch (538:23): [True: 0, False: 0]
  ------------------
  539|      1|        return 0;
  540|  54.4k|    return 1;
  541|  54.4k|}
tls_collect_extensions:
  562|    101|{
  563|    101|    PACKET extensions = *packet;
  564|    101|    size_t i = 0;
  565|    101|    size_t num_exts;
  566|    101|    custom_ext_methods *exts = &s->cert->custext;
  567|    101|    RAW_EXTENSION *raw_extensions = NULL;
  568|    101|    const EXTENSION_DEFINITION *thisexd;
  569|       |
  570|    101|    *res = NULL;
  571|       |
  572|       |    /*
  573|       |     * Initialise server side custom extensions. Client side is done during
  574|       |     * construction of extensions for the ClientHello.
  575|       |     */
  576|    101|    if ((context & SSL_EXT_CLIENT_HELLO) != 0)
  ------------------
  |  |  299|    101|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (576:9): [True: 0, False: 101]
  ------------------
  577|      0|        custom_ext_init(&s->cert->custext);
  578|       |
  579|    101|    num_exts = OSSL_NELEM(ext_defs) + (exts != NULL ? exts->meths_count : 0);
  ------------------
  |  |   14|    101|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (579:40): [True: 101, False: 0]
  ------------------
  580|    101|    raw_extensions = OPENSSL_calloc(num_exts, sizeof(*raw_extensions));
  ------------------
  |  |  112|    101|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  581|    101|    if (raw_extensions == NULL) {
  ------------------
  |  Branch (581:9): [True: 0, False: 101]
  ------------------
  582|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  583|      0|        return 0;
  584|      0|    }
  585|       |
  586|    101|    i = 0;
  587|    302|    while (PACKET_remaining(&extensions) > 0) {
  ------------------
  |  Branch (587:12): [True: 221, False: 81]
  ------------------
  588|    221|        unsigned int type, idx;
  589|    221|        PACKET extension;
  590|    221|        RAW_EXTENSION *thisex;
  591|       |
  592|    221|        if (!PACKET_get_net_2(&extensions, &type) || !PACKET_get_length_prefixed_2(&extensions, &extension)) {
  ------------------
  |  Branch (592:13): [True: 1, False: 220]
  |  Branch (592:54): [True: 2, False: 218]
  ------------------
  593|      3|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      3|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      3|    (ERR_new(),                                                  \
  |  |  |  |  151|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      3|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      3|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  594|      3|            goto err;
  595|      3|        }
  596|       |        /*
  597|       |         * Verify this extension is allowed. We only check duplicates for
  598|       |         * extensions that we recognise. We also have a special case for the
  599|       |         * PSK extension, which must be the last one in the ClientHello.
  600|       |         */
  601|    218|        if (!verify_extension(s, context, type, exts, raw_extensions, &thisex)
  ------------------
  |  Branch (601:13): [True: 5, False: 213]
  ------------------
  602|    213|            || (thisex != NULL && thisex->present == 1)
  ------------------
  |  Branch (602:17): [True: 114, False: 99]
  |  Branch (602:35): [True: 4, False: 110]
  ------------------
  603|    209|            || (type == TLSEXT_TYPE_psk
  ------------------
  |  |  151|    418|#define TLSEXT_TYPE_psk 41
  ------------------
  |  Branch (603:17): [True: 1, False: 208]
  ------------------
  604|      1|                && (context & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  299|      1|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (604:20): [True: 0, False: 1]
  ------------------
  605|      9|                && PACKET_remaining(&extensions) != 0)) {
  ------------------
  |  Branch (605:20): [True: 0, False: 0]
  ------------------
  606|      9|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      9|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      9|    (ERR_new(),                                                  \
  |  |  |  |  151|      9|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      9|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      9|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  607|      9|            goto err;
  608|      9|        }
  609|    209|        idx = (unsigned int)(thisex - raw_extensions);
  610|       |        /*-
  611|       |         * Check that we requested this extension (if appropriate). Requests can
  612|       |         * be sent in the ClientHello and CertificateRequest. Unsolicited
  613|       |         * extensions can be sent in the NewSessionTicket. We only do this for
  614|       |         * the built-in extensions. Custom extensions have a different but
  615|       |         * similar check elsewhere.
  616|       |         * Special cases:
  617|       |         * - The HRR cookie extension is unsolicited
  618|       |         * - The renegotiate extension is unsolicited (the client signals
  619|       |         *   support via an SCSV)
  620|       |         * - The signed_certificate_timestamp extension can be provided by a
  621|       |         * custom extension or by the built-in version. We let the extension
  622|       |         * itself handle unsolicited response checks.
  623|       |         */
  624|    209|        if (idx < OSSL_NELEM(ext_defs)
  ------------------
  |  |   14|    418|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (624:13): [True: 110, False: 99]
  ------------------
  625|    110|            && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) == 0
  ------------------
  |  |  299|    110|#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
  ------------------
  |  |  307|    110|#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
  ------------------
  |  |  306|    110|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (625:16): [True: 110, False: 0]
  ------------------
  626|    110|            && type != TLSEXT_TYPE_cookie
  ------------------
  |  |  154|    319|#define TLSEXT_TYPE_cookie 44
  ------------------
  |  Branch (626:16): [True: 110, False: 0]
  ------------------
  627|    110|            && type != TLSEXT_TYPE_renegotiate
  ------------------
  |  |  163|    319|#define TLSEXT_TYPE_renegotiate 0xff01
  ------------------
  |  Branch (627:16): [True: 107, False: 3]
  ------------------
  628|    107|            && type != TLSEXT_TYPE_signed_certificate_timestamp
  ------------------
  |  |  122|    316|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
  |  Branch (628:16): [True: 102, False: 5]
  ------------------
  629|    102|            && (s->ext.extflags[idx] & SSL_EXT_FLAG_SENT) == 0
  ------------------
  |  | 2068|    102|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  |  Branch (629:16): [True: 8, False: 94]
  ------------------
  630|      8|#ifndef OPENSSL_NO_GOST
  631|      8|            && !((context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0
  ------------------
  |  |  301|      8|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (631:18): [True: 8, False: 0]
  ------------------
  632|      8|                && type == TLSEXT_TYPE_cryptopro_bug)
  ------------------
  |  |  401|      8|#define TLSEXT_TYPE_cryptopro_bug 0xfde8
  ------------------
  |  Branch (632:20): [True: 0, False: 8]
  ------------------
  633|    209|#endif
  634|    209|        ) {
  635|      8|            SSLfatal(s, SSL_AD_UNSUPPORTED_EXTENSION,
  ------------------
  |  |  148|      8|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      8|    (ERR_new(),                                                  \
  |  |  |  |  151|      8|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      8|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      8|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  636|      8|                SSL_R_UNSOLICITED_EXTENSION);
  637|      8|            goto err;
  638|      8|        }
  639|    201|        if (thisex != NULL) {
  ------------------
  |  Branch (639:13): [True: 102, False: 99]
  ------------------
  640|    102|            thisex->data = extension;
  641|    102|            thisex->present = 1;
  642|    102|            thisex->type = type;
  643|    102|            thisex->received_order = i++;
  644|    102|            if (s->ext.debug_cb)
  ------------------
  |  Branch (644:17): [True: 0, False: 102]
  ------------------
  645|      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)
  ------------------
  646|      0|                    thisex->type, PACKET_data(&thisex->data),
  647|      0|                    (int)PACKET_remaining(&thisex->data),
  648|      0|                    s->ext.debug_arg);
  649|    102|        }
  650|    201|    }
  651|       |
  652|     81|    if (init) {
  ------------------
  |  Branch (652:9): [True: 81, False: 0]
  ------------------
  653|       |        /*
  654|       |         * Initialise all known extensions relevant to this context,
  655|       |         * whether we have found them or not
  656|       |         */
  657|  2.43k|        for (thisexd = ext_defs, i = 0; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|  2.43k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (657:41): [True: 2.34k, False: 81]
  ------------------
  658|  2.34k|            i++, thisexd++) {
  659|  2.34k|            if (thisexd->init != NULL && (thisexd->context & context) != 0
  ------------------
  |  Branch (659:17): [True: 1.45k, False: 891]
  |  Branch (659:42): [True: 891, False: 567]
  ------------------
  660|    891|                && extension_is_relevant(s, thisexd->context, context)
  ------------------
  |  Branch (660:20): [True: 891, False: 0]
  ------------------
  661|    891|                && !thisexd->init(s, context)) {
  ------------------
  |  Branch (661:20): [True: 0, False: 891]
  ------------------
  662|       |                /* SSLfatal() already called */
  663|      0|                goto err;
  664|      0|            }
  665|  2.34k|        }
  666|     81|    }
  667|       |
  668|     81|    *res = raw_extensions;
  669|     81|    if (len != NULL)
  ------------------
  |  Branch (669:9): [True: 0, False: 81]
  ------------------
  670|      0|        *len = num_exts;
  671|     81|    return 1;
  672|       |
  673|     20|err:
  674|     20|    OPENSSL_free(raw_extensions);
  ------------------
  |  |  131|     20|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  675|     20|    return 0;
  676|     81|}
tls_parse_extension:
  690|    356|{
  691|    356|    RAW_EXTENSION *currext = &exts[idx];
  692|    356|    int (*parser)(SSL_CONNECTION *s, PACKET *pkt, unsigned int context, X509 *x,
  693|    356|        size_t chainidx)
  694|    356|        = NULL;
  695|       |
  696|       |    /* Skip if the extension is not present */
  697|    356|    if (!currext->present)
  ------------------
  |  Branch (697:9): [True: 318, False: 38]
  ------------------
  698|    318|        return 1;
  699|       |
  700|       |    /* Skip if we've already parsed this extension */
  701|     38|    if (currext->parsed)
  ------------------
  |  Branch (701:9): [True: 0, False: 38]
  ------------------
  702|      0|        return 1;
  703|       |
  704|     38|    currext->parsed = 1;
  705|       |
  706|     38|    if (idx < OSSL_NELEM(ext_defs)) {
  ------------------
  |  |   14|     38|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (706:9): [True: 38, False: 0]
  ------------------
  707|       |        /* We are handling a built-in extension */
  708|     38|        const EXTENSION_DEFINITION *extdef = &ext_defs[idx];
  709|       |
  710|       |        /* Check if extension is defined for our protocol. If not, skip */
  711|     38|        if (!extension_is_relevant(s, extdef->context, context))
  ------------------
  |  Branch (711:13): [True: 1, False: 37]
  ------------------
  712|      1|            return 1;
  713|       |
  714|     37|        parser = s->server ? extdef->parse_ctos : extdef->parse_stoc;
  ------------------
  |  Branch (714:18): [True: 0, False: 37]
  ------------------
  715|       |
  716|     37|        if (parser != NULL)
  ------------------
  |  Branch (716:13): [True: 34, False: 3]
  ------------------
  717|     34|            return parser(s, &currext->data, context, x, chainidx);
  718|       |
  719|       |        /*
  720|       |         * If the parser is NULL we fall through to the custom extension
  721|       |         * processing
  722|       |         */
  723|     37|    }
  724|       |
  725|       |    /* Parse custom extensions */
  726|      3|    return custom_ext_parse(s, context, currext->type,
  727|      3|        PACKET_data(&currext->data),
  728|      3|        PACKET_remaining(&currext->data),
  729|      3|        x, chainidx);
  730|     38|}
tls_parse_all_extensions:
  742|     19|{
  743|     19|    size_t i, numexts = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|     19|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  744|     19|    const EXTENSION_DEFINITION *thisexd;
  745|       |
  746|       |    /* Calculate the number of extensions in the extensions list */
  747|     19|    numexts += s->cert->custext.meths_count;
  748|       |
  749|       |    /* Parse each extension in turn */
  750|    281|    for (i = 0; i < numexts; i++) {
  ------------------
  |  Branch (750:17): [True: 275, False: 6]
  ------------------
  751|    275|        if (!tls_parse_extension(s, i, context, exts, x, chainidx)) {
  ------------------
  |  Branch (751:13): [True: 13, False: 262]
  ------------------
  752|       |            /* SSLfatal() already called */
  753|     13|            return 0;
  754|     13|        }
  755|    275|    }
  756|       |
  757|      6|    if (fin) {
  ------------------
  |  Branch (757:9): [True: 6, False: 0]
  ------------------
  758|       |        /*
  759|       |         * Finalise all known extensions relevant to this context,
  760|       |         * whether we have found them or not
  761|       |         */
  762|      6|        for (i = 0, thisexd = ext_defs; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|      6|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (762:41): [True: 6, False: 0]
  ------------------
  763|      6|            i++, thisexd++) {
  764|      6|            if (thisexd->final != NULL && (thisexd->context & context) != 0
  ------------------
  |  Branch (764:17): [True: 6, False: 0]
  |  Branch (764:43): [True: 6, False: 0]
  ------------------
  765|      6|                && !thisexd->final(s, context, exts[i].present)) {
  ------------------
  |  Branch (765:20): [True: 6, False: 0]
  ------------------
  766|       |                /* SSLfatal() already called */
  767|      6|                return 0;
  768|      6|            }
  769|      6|        }
  770|      6|    }
  771|       |
  772|      0|    return 1;
  773|      6|}
should_add_extension:
  777|  53.5k|{
  778|       |    /* Skip if not relevant for our context */
  779|  53.5k|    if ((extctx & thisctx) == 0)
  ------------------
  |  Branch (779:9): [True: 0, False: 53.5k]
  ------------------
  780|      0|        return 0;
  781|       |
  782|       |    /* Check if this extension is defined for our protocol. If not, skip */
  783|  53.5k|    if (!extension_is_relevant(s, extctx, thisctx)
  ------------------
  |  Branch (783:9): [True: 0, False: 53.5k]
  ------------------
  784|  53.5k|        || ((extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  296|  53.5k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (784:13): [True: 14.6k, False: 38.8k]
  ------------------
  785|  14.6k|            && (thisctx & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  299|  14.6k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (785:16): [True: 14.6k, False: 0]
  ------------------
  786|  14.6k|            && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |  258|  29.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  14.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  14.6k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 14.6k]
  |  |  ------------------
  ------------------
                          && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |   27|  14.6k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (786:46): [True: 112, False: 14.5k]
  ------------------
  787|    112|        return 0;
  788|       |
  789|  53.4k|    return 1;
  790|  53.5k|}
tls_construct_extensions:
  803|  1.88k|{
  804|  1.88k|    size_t i;
  805|  1.88k|    int min_version, max_version = 0, reason;
  806|  1.88k|    const EXTENSION_DEFINITION *thisexd;
  807|  1.88k|    int for_comp = (context & SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION) != 0;
  ------------------
  |  |  308|  1.88k|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
  808|       |
  809|  1.88k|    if (!WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.77k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (809:9): [True: 0, False: 1.88k]
  ------------------
  810|       |        /*
  811|       |         * If extensions are of zero length then we don't even add the
  812|       |         * extensions length bytes to a ClientHello/ServerHello
  813|       |         * (for non-TLSv1.3).
  814|       |         */
  815|  1.88k|        || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  299|  1.88k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                      || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  301|  1.88k|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (815:13): [True: 1.88k, False: 0]
  ------------------
  816|  1.88k|            && !WPACKET_set_flags(pkt,
  ------------------
  |  Branch (816:16): [True: 0, False: 1.88k]
  ------------------
  817|  1.88k|                WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH))) {
  ------------------
  |  |  703|  1.88k|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  818|      0|        if (!for_comp)
  ------------------
  |  Branch (818:13): [True: 0, False: 0]
  ------------------
  819|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  820|      0|        return 0;
  821|      0|    }
  822|       |
  823|  1.88k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  299|  1.88k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (823:9): [True: 1.88k, False: 0]
  ------------------
  824|  1.88k|        reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  825|  1.88k|        if (reason != 0) {
  ------------------
  |  Branch (825:13): [True: 0, False: 1.88k]
  ------------------
  826|      0|            if (!for_comp)
  ------------------
  |  Branch (826:17): [True: 0, False: 0]
  ------------------
  827|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  828|      0|            return 0;
  829|      0|        }
  830|  1.88k|    }
  831|       |
  832|       |    /* Add custom extensions first */
  833|  1.88k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  299|  1.88k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (833:9): [True: 1.88k, False: 0]
  ------------------
  834|       |        /* On the server side with initialise during ClientHello parsing */
  835|  1.88k|        custom_ext_init(&s->cert->custext);
  836|  1.88k|    }
  837|  1.88k|    if (!custom_ext_add(s, context, pkt, x, chainidx, max_version)) {
  ------------------
  |  Branch (837:9): [True: 0, False: 1.88k]
  ------------------
  838|       |        /* SSLfatal() already called */
  839|      0|        return 0;
  840|      0|    }
  841|       |
  842|  55.3k|    for (i = 0, thisexd = ext_defs; i < OSSL_NELEM(ext_defs); i++, thisexd++) {
  ------------------
  |  |   14|  55.3k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (842:37): [True: 53.5k, False: 1.83k]
  ------------------
  843|  53.5k|        EXT_RETURN (*construct)(SSL_CONNECTION *s, WPACKET *pkt,
  844|  53.5k|            unsigned int context,
  845|  53.5k|            X509 *x, size_t chainidx);
  846|  53.5k|        EXT_RETURN ret;
  847|       |
  848|       |        /* Skip if not relevant for our context */
  849|  53.5k|        if (!should_add_extension(s, thisexd->context, context, max_version))
  ------------------
  |  Branch (849:13): [True: 112, False: 53.4k]
  ------------------
  850|    112|            continue;
  851|       |
  852|  53.4k|        construct = s->server ? thisexd->construct_stoc
  ------------------
  |  Branch (852:21): [True: 0, False: 53.4k]
  ------------------
  853|  53.4k|                              : thisexd->construct_ctos;
  854|       |
  855|  53.4k|        if (construct == NULL)
  ------------------
  |  Branch (855:13): [True: 3.67k, False: 49.7k]
  ------------------
  856|  3.67k|            continue;
  857|       |
  858|  49.7k|        ret = construct(s, pkt, context, x, chainidx);
  859|  49.7k|        if (ret == EXT_RETURN_FAIL) {
  ------------------
  |  Branch (859:13): [True: 52, False: 49.7k]
  ------------------
  860|       |            /* SSLfatal() already called */
  861|     52|            return 0;
  862|     52|        }
  863|  49.7k|        if (ret == EXT_RETURN_SENT
  ------------------
  |  Branch (863:13): [True: 21.4k, False: 28.3k]
  ------------------
  864|  21.4k|            && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  299|  21.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)
  ------------------
  |  |  307|  21.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)
  ------------------
  |  |  306|  21.4k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (864:16): [True: 21.4k, False: 0]
  ------------------
  865|  21.4k|            s->ext.extflags[i] |= SSL_EXT_FLAG_SENT;
  ------------------
  |  | 2068|  21.4k|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  866|  49.7k|    }
  867|       |
  868|  1.83k|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (868:9): [True: 0, False: 1.83k]
  ------------------
  869|      0|        if (!for_comp)
  ------------------
  |  Branch (869:13): [True: 0, False: 0]
  ------------------
  870|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  871|      0|        return 0;
  872|      0|    }
  873|       |
  874|  1.83k|    return 1;
  875|  1.83k|}
extensions.c:final_renegotiate:
  885|      6|{
  886|      6|    if (!s->server) {
  ------------------
  |  Branch (886:9): [True: 6, False: 0]
  ------------------
  887|       |        /*
  888|       |         * Check if we can connect to a server that doesn't support safe
  889|       |         * renegotiation
  890|       |         */
  891|      6|        if (!(s->options & SSL_OP_LEGACY_SERVER_CONNECT)
  ------------------
  |  |  360|      6|#define SSL_OP_LEGACY_SERVER_CONNECT SSL_OP_BIT(2)
  |  |  ------------------
  |  |  |  |  350|      6|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (891:13): [True: 6, False: 0]
  ------------------
  892|      6|            && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)
  ------------------
  |  |  396|      6|#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_BIT(18)
  |  |  ------------------
  |  |  |  |  350|      6|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (892:16): [True: 6, False: 0]
  ------------------
  893|      6|            && !sent) {
  ------------------
  |  Branch (893:16): [True: 6, False: 0]
  ------------------
  894|      6|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  148|      6|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      6|    (ERR_new(),                                                  \
  |  |  |  |  151|      6|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      6|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      6|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  895|      6|                SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED);
  896|      6|            return 0;
  897|      6|        }
  898|       |
  899|      0|        return 1;
  900|      6|    }
  901|       |
  902|       |    /* Need RI if renegotiating */
  903|      0|    if (s->renegotiate
  ------------------
  |  Branch (903:9): [True: 0, False: 0]
  ------------------
  904|      0|        && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)
  ------------------
  |  |  396|      0|#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_BIT(18)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (904:12): [True: 0, False: 0]
  ------------------
  905|      0|        && !sent) {
  ------------------
  |  Branch (905:12): [True: 0, False: 0]
  ------------------
  906|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  907|      0|            SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED);
  908|      0|        return 0;
  909|      0|    }
  910|       |
  911|      0|    return 1;
  912|      0|}
extensions.c:init_server_name:
  924|     81|{
  925|     81|    if (s->server) {
  ------------------
  |  Branch (925:9): [True: 0, False: 81]
  ------------------
  926|      0|        s->servername_done = 0;
  927|       |
  928|      0|        OPENSSL_free(s->ext.hostname);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  929|      0|        s->ext.hostname = NULL;
  930|      0|    }
  931|       |
  932|     81|    return 1;
  933|     81|}
extensions.c:init_ec_point_formats:
 1179|     81|{
 1180|     81|    OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  131|     81|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1181|     81|    s->ext.peer_ecpointformats = NULL;
 1182|     81|    s->ext.peer_ecpointformats_len = 0;
 1183|       |
 1184|     81|    return 1;
 1185|     81|}
extensions.c:init_session_ticket:
 1076|     81|{
 1077|     81|    if (!s->server)
  ------------------
  |  Branch (1077:9): [True: 81, False: 0]
  ------------------
 1078|     81|        s->ext.ticket_expected = 0;
 1079|       |
 1080|     81|    return 1;
 1081|     81|}
extensions.c:init_status_request:
 1085|     81|{
 1086|     81|    if (s->server) {
  ------------------
  |  Branch (1086:9): [True: 0, False: 81]
  ------------------
 1087|      0|        s->ext.status_type = TLSEXT_STATUSTYPE_nothing;
  ------------------
  |  | 2207|      0|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
 1088|     81|    } else {
 1089|       |        /*
 1090|       |         * Ensure we get sensible values passed to tlsext_status_cb in the event
 1091|       |         * that we don't receive a status message
 1092|       |         */
 1093|     81|        OPENSSL_free(s->ext.ocsp.resp);
  ------------------
  |  |  131|     81|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1094|     81|        s->ext.ocsp.resp = NULL;
 1095|     81|        s->ext.ocsp.resp_len = 0;
 1096|       |
 1097|     81|        sk_OCSP_RESPONSE_pop_free(s->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 1098|     81|        s->ext.ocsp.resp_ex = NULL;
 1099|     81|    }
 1100|       |
 1101|     81|    return 1;
 1102|     81|}
extensions.c:init_npn:
 1107|     81|{
 1108|     81|    s->s3.npn_seen = 0;
 1109|       |
 1110|     81|    return 1;
 1111|     81|}
extensions.c:init_alpn:
 1115|     81|{
 1116|     81|    OPENSSL_free(s->s3.alpn_selected);
  ------------------
  |  |  131|     81|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1117|     81|    s->s3.alpn_selected = NULL;
 1118|     81|    s->s3.alpn_selected_len = 0;
 1119|     81|    if (s->server) {
  ------------------
  |  Branch (1119:9): [True: 0, False: 81]
  ------------------
 1120|      0|        OPENSSL_free(s->s3.alpn_proposed);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1121|       |        s->s3.alpn_proposed = NULL;
 1122|      0|        s->s3.alpn_proposed_len = 0;
 1123|      0|    }
 1124|     81|    return 1;
 1125|     81|}
extensions.c:init_srtp:
 1281|     81|{
 1282|     81|    if (s->server)
  ------------------
  |  Branch (1282:9): [True: 0, False: 81]
  ------------------
 1283|      0|        s->srtp_profile = NULL;
 1284|       |
 1285|     81|    return 1;
 1286|     81|}
extensions.c:init_etm:
 1188|     81|{
 1189|     81|    s->ext.use_etm = 0;
 1190|       |
 1191|     81|    return 1;
 1192|     81|}
extensions.c:init_ems:
 1195|     81|{
 1196|     81|    if (s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS) {
  ------------------
  |  |  300|     81|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (1196:9): [True: 0, False: 81]
  ------------------
 1197|      0|        s->s3.flags &= ~TLS1_FLAGS_RECEIVED_EXTMS;
  ------------------
  |  |  300|      0|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
 1198|      0|        s->s3.flags |= TLS1_FLAGS_REQUIRED_EXTMS;
  ------------------
  |  |  307|      0|#define TLS1_FLAGS_REQUIRED_EXTMS 0x1000
  ------------------
 1199|      0|    }
 1200|       |
 1201|     81|    return 1;
 1202|     81|}
extensions.c:init_client_cert_type:
 1868|     81|{
 1869|       |    /* Only reset when parsing client hello */
 1870|     81|    if (sc->server) {
  ------------------
  |  Branch (1870:9): [True: 0, False: 81]
  ------------------
 1871|      0|        sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  365|      0|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 1872|      0|        sc->ext.client_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  240|      0|#define TLSEXT_cert_type_x509 0
  ------------------
 1873|      0|    }
 1874|     81|    return 1;
 1875|     81|}
extensions.c:init_server_cert_type:
 1858|     81|{
 1859|       |    /* Only reset when parsing client hello */
 1860|     81|    if (sc->server) {
  ------------------
  |  Branch (1860:9): [True: 0, False: 81]
  ------------------
 1861|      0|        sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  365|      0|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 1862|      0|        sc->ext.server_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  240|      0|#define TLSEXT_cert_type_x509 0
  ------------------
 1863|      0|    }
 1864|     81|    return 1;
 1865|     81|}
extensions.c:tls_construct_compress_certificate:
 1737|  1.81k|{
 1738|       |#ifndef OPENSSL_NO_COMP_ALG
 1739|       |    int i;
 1740|       |
 1741|       |    if (!ossl_comp_has_alg(0))
 1742|       |        return EXT_RETURN_NOT_SENT;
 1743|       |
 1744|       |    /* Server: Don't attempt to compress a non-X509 (i.e. an RPK) */
 1745|       |    if (sc->server && sc->ext.server_cert_type != TLSEXT_cert_type_x509) {
 1746|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 1747|       |        return EXT_RETURN_NOT_SENT;
 1748|       |    }
 1749|       |
 1750|       |    /* Client: If we sent a client cert-type extension, don't indicate compression */
 1751|       |    if (!sc->server && sc->ext.client_cert_type_ctos) {
 1752|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 1753|       |        return EXT_RETURN_NOT_SENT;
 1754|       |    }
 1755|       |
 1756|       |    /* Do not indicate we support receiving compressed certificates */
 1757|       |    if ((sc->options & SSL_OP_NO_RX_CERTIFICATE_COMPRESSION) != 0)
 1758|       |        return EXT_RETURN_NOT_SENT;
 1759|       |
 1760|       |    if (sc->cert_comp_prefs[0] == TLSEXT_comp_cert_none)
 1761|       |        return EXT_RETURN_NOT_SENT;
 1762|       |
 1763|       |    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_compress_certificate)
 1764|       |        || !WPACKET_start_sub_packet_u16(pkt)
 1765|       |        || !WPACKET_start_sub_packet_u8(pkt))
 1766|       |        goto err;
 1767|       |
 1768|       |    for (i = 0; sc->cert_comp_prefs[i] != TLSEXT_comp_cert_none; i++) {
 1769|       |        if (!WPACKET_put_bytes_u16(pkt, sc->cert_comp_prefs[i]))
 1770|       |            goto err;
 1771|       |    }
 1772|       |    if (!WPACKET_close(pkt) || !WPACKET_close(pkt))
 1773|       |        goto err;
 1774|       |
 1775|       |    sc->ext.compress_certificate_sent = 1;
 1776|       |    return EXT_RETURN_SENT;
 1777|       |err:
 1778|       |    SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 1779|       |    return EXT_RETURN_FAIL;
 1780|       |#else
 1781|  1.81k|    return EXT_RETURN_NOT_SENT;
 1782|  1.81k|#endif
 1783|  1.81k|}
extensions.c:tls_construct_certificate_authorities:
 1241|  1.81k|{
 1242|  1.81k|    const STACK_OF(X509_NAME) *ca_sk = get_ca_names(s);
 1243|       |
 1244|  1.81k|    if (ca_sk == NULL || sk_X509_NAME_num(ca_sk) == 0)
  ------------------
  |  |   56|  1.81k|#define sk_X509_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(sk))
  ------------------
  |  Branch (1244:9): [True: 0, False: 1.81k]
  |  Branch (1244:26): [True: 1.81k, False: 0]
  ------------------
 1245|  1.81k|        return EXT_RETURN_NOT_SENT;
 1246|       |
 1247|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_certificate_authorities)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1247:9): [True: 0, False: 0]
  ------------------
 1248|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1248:12): [True: 0, False: 0]
  ------------------
 1249|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1250|      0|        return EXT_RETURN_FAIL;
 1251|      0|    }
 1252|       |
 1253|      0|    if (!construct_ca_names(s, ca_sk, pkt)) {
  ------------------
  |  Branch (1253:9): [True: 0, False: 0]
  ------------------
 1254|       |        /* SSLfatal() already called */
 1255|      0|        return EXT_RETURN_FAIL;
 1256|      0|    }
 1257|       |
 1258|      0|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1258:9): [True: 0, False: 0]
  ------------------
 1259|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1260|      0|        return EXT_RETURN_FAIL;
 1261|      0|    }
 1262|       |
 1263|      0|    return EXT_RETURN_SENT;
 1264|      0|}
extensions.c:validate_context:
  400|    167|{
  401|       |    /* Check we're allowed to use this extension in this context */
  402|    167|    if ((thisctx & extctx) == 0)
  ------------------
  |  Branch (402:9): [True: 6, False: 161]
  ------------------
  403|      6|        return 0;
  404|       |
  405|    161|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|    161|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|    161|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|    161|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 161]
  |  |  ------------------
  ------------------
  406|      0|        if ((extctx & SSL_EXT_TLS_ONLY) != 0)
  ------------------
  |  |  286|      0|#define SSL_EXT_TLS_ONLY 0x00001
  ------------------
  |  Branch (406:13): [True: 0, False: 0]
  ------------------
  407|      0|            return 0;
  408|    161|    } else if ((extctx & SSL_EXT_DTLS_ONLY) != 0) {
  ------------------
  |  |  288|    161|#define SSL_EXT_DTLS_ONLY 0x00002
  ------------------
  |  Branch (408:16): [True: 1, False: 160]
  ------------------
  409|      1|        return 0;
  410|      1|    }
  411|       |
  412|    160|    return 1;
  413|    161|}
extensions.c:verify_extension:
  463|    218|{
  464|    218|    size_t i;
  465|    218|    size_t builtin_num = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|    218|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  466|    218|    const EXTENSION_DEFINITION *thisext;
  467|       |
  468|  4.03k|    for (i = 0, thisext = ext_defs; i < builtin_num; i++, thisext++) {
  ------------------
  |  Branch (468:37): [True: 3.93k, False: 99]
  ------------------
  469|  3.93k|        if (type == thisext->type) {
  ------------------
  |  Branch (469:13): [True: 119, False: 3.81k]
  ------------------
  470|    119|            if (!validate_context(s, thisext->context, context))
  ------------------
  |  Branch (470:17): [True: 5, False: 114]
  ------------------
  471|      5|                return 0;
  472|       |
  473|    114|            *found = &rawexlist[i];
  474|    114|            return 1;
  475|    119|        }
  476|  3.93k|    }
  477|       |
  478|       |    /* Check the custom extensions */
  479|     99|    if (meths != NULL) {
  ------------------
  |  Branch (479:9): [True: 99, False: 0]
  ------------------
  480|     99|        size_t offset = 0;
  481|     99|        ENDPOINT role = ENDPOINT_BOTH;
  482|     99|        custom_ext_method *meth = NULL;
  483|       |
  484|     99|        if ((context & SSL_EXT_CLIENT_HELLO) != 0)
  ------------------
  |  |  299|     99|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (484:13): [True: 0, False: 99]
  ------------------
  485|      0|            role = ENDPOINT_SERVER;
  486|     99|        else if ((context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0)
  ------------------
  |  |  301|     99|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (486:18): [True: 99, False: 0]
  ------------------
  487|     99|            role = ENDPOINT_CLIENT;
  488|       |
  489|     99|        meth = custom_ext_find(meths, role, type, &offset);
  490|     99|        if (meth != NULL) {
  ------------------
  |  Branch (490:13): [True: 0, False: 99]
  ------------------
  491|      0|            if (!validate_context(s, meth->context, context))
  ------------------
  |  Branch (491:17): [True: 0, False: 0]
  ------------------
  492|      0|                return 0;
  493|      0|            *found = &rawexlist[offset + builtin_num];
  494|      0|            return 1;
  495|      0|        }
  496|     99|    }
  497|       |
  498|       |    /* Unknown extension. We allow it */
  499|     99|    *found = NULL;
  500|     99|    return 1;
  501|     99|}

tls_construct_ctos_renegotiate:
   19|  1.88k|{
   20|  1.88k|    if (!s->renegotiate) {
  ------------------
  |  Branch (20:9): [True: 1.88k, False: 0]
  ------------------
   21|       |        /* If not renegotiating, send an empty RI extension to indicate support */
   22|       |
   23|       |#if DTLS_MAX_VERSION_INTERNAL != DTLS1_2_VERSION
   24|       |#error Internal DTLS version error
   25|       |#endif
   26|       |
   27|  1.88k|        if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|  3.77k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.88k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.88k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (27:13): [True: 1.88k, False: 0]
  ------------------
   28|  1.88k|            && (s->min_proto_version >= TLS1_3_VERSION
  ------------------
  |  |   27|  3.77k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (28:17): [True: 6, False: 1.87k]
  ------------------
   29|  1.87k|                || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2766|  1.87k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|  1.87k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                              || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  1.87k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (29:21): [True: 13, False: 1.86k]
  ------------------
   30|     13|                    && s->min_proto_version <= TLS1_VERSION))) {
  ------------------
  |  |   24|     13|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (30:24): [True: 5, False: 8]
  ------------------
   31|       |            /*
   32|       |             * For TLS <= 1.0 SCSV is used instead, and for TLS 1.3 this
   33|       |             * extension isn't used at all.
   34|       |             */
   35|     11|            return EXT_RETURN_NOT_SENT;
   36|     11|        }
   37|       |
   38|  1.87k|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  891|  3.74k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (38:13): [True: 0, False: 1.87k]
  ------------------
   39|  1.87k|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.74k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (39:16): [True: 0, False: 1.87k]
  ------------------
   40|  1.87k|            || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  889|  3.74k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (40:16): [True: 0, False: 1.87k]
  ------------------
   41|  1.87k|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (41:16): [True: 0, False: 1.87k]
  ------------------
   42|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   43|      0|            return EXT_RETURN_FAIL;
   44|      0|        }
   45|       |
   46|  1.87k|        return EXT_RETURN_SENT;
   47|  1.87k|    }
   48|       |
   49|       |    /* Add a complete RI extension if renegotiating */
   50|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (50:9): [True: 0, False: 0]
  ------------------
   51|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (51:12): [True: 0, False: 0]
  ------------------
   52|      0|        || !WPACKET_sub_memcpy_u8(pkt, s->s3.previous_client_finished,
  ------------------
  |  |  918|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (52:12): [True: 0, False: 0]
  ------------------
   53|      0|            s->s3.previous_client_finished_len)
   54|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (54:12): [True: 0, False: 0]
  ------------------
   55|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   56|      0|        return EXT_RETURN_FAIL;
   57|      0|    }
   58|       |
   59|      0|    return EXT_RETURN_SENT;
   60|      0|}
tls_construct_ctos_server_name:
   65|  1.88k|{
   66|  1.88k|    if (s->ext.hostname == NULL)
  ------------------
  |  Branch (66:9): [True: 863, False: 1.02k]
  ------------------
   67|    863|        return EXT_RETURN_NOT_SENT;
   68|       |
   69|       |    /* Add TLS extension servername to the Client Hello message */
   70|  1.02k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_name)
  ------------------
  |  |  891|  2.04k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (70:9): [True: 0, False: 1.02k]
  ------------------
   71|       |        /* Sub-packet for server_name extension */
   72|  1.02k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.04k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (72:12): [True: 0, False: 1.02k]
  ------------------
   73|       |        /* Sub-packet for servername list (always 1 hostname)*/
   74|  1.02k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.04k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (74:12): [True: 0, False: 1.02k]
  ------------------
   75|  1.02k|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_NAMETYPE_host_name)
  ------------------
  |  |  889|  2.04k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (75:12): [True: 0, False: 1.02k]
  ------------------
   76|  1.02k|        || !WPACKET_sub_memcpy_u16(pkt, s->ext.hostname,
  ------------------
  |  |  920|  2.04k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (76:12): [True: 0, False: 1.02k]
  ------------------
   77|  1.02k|            strlen(s->ext.hostname))
   78|  1.02k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (78:12): [True: 0, False: 1.02k]
  ------------------
   79|  1.02k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (79:12): [True: 0, False: 1.02k]
  ------------------
   80|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   81|      0|        return EXT_RETURN_FAIL;
   82|      0|    }
   83|       |
   84|  1.02k|    return EXT_RETURN_SENT;
   85|  1.02k|}
tls_construct_ctos_maxfragmentlen:
   91|  1.88k|{
   92|  1.88k|    if (s->ext.max_fragment_len_mode == TLSEXT_max_fragment_length_DISABLED)
  ------------------
  |  |  227|  1.88k|#define TLSEXT_max_fragment_length_DISABLED 0
  ------------------
  |  Branch (92:9): [True: 1.88k, False: 0]
  ------------------
   93|  1.88k|        return EXT_RETURN_NOT_SENT;
   94|       |
   95|       |    /* Add Max Fragment Length extension if client enabled it. */
   96|       |    /*-
   97|       |     * 4 bytes for this extension type and extension length
   98|       |     * 1 byte for the Max Fragment Length code value.
   99|       |     */
  100|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_max_fragment_length)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (100:9): [True: 0, False: 0]
  ------------------
  101|       |        /* Sub-packet for Max Fragment Length extension (1 byte) */
  102|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (102:12): [True: 0, False: 0]
  ------------------
  103|      0|        || !WPACKET_put_bytes_u8(pkt, s->ext.max_fragment_len_mode)
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (103:12): [True: 0, False: 0]
  ------------------
  104|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (104:12): [True: 0, False: 0]
  ------------------
  105|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  106|      0|        return EXT_RETURN_FAIL;
  107|      0|    }
  108|       |
  109|      0|    return EXT_RETURN_SENT;
  110|      0|}
tls_construct_ctos_srp:
  116|  1.88k|{
  117|       |    /* Add SRP username if there is one */
  118|  1.88k|    if (s->srp_ctx.login == NULL)
  ------------------
  |  Branch (118:9): [True: 1.88k, False: 2]
  ------------------
  119|  1.88k|        return EXT_RETURN_NOT_SENT;
  120|       |
  121|      2|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_srp)
  ------------------
  |  |  891|      4|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (121:9): [True: 0, False: 2]
  ------------------
  122|       |        /* Sub-packet for SRP extension */
  123|      2|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      4|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (123:12): [True: 0, False: 2]
  ------------------
  124|      2|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  790|      4|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (124:12): [True: 0, False: 2]
  ------------------
  125|       |        /* login must not be zero...internal error if so */
  126|      2|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)
  ------------------
  |  |  697|      2|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (126:12): [True: 0, False: 2]
  ------------------
  127|      2|        || !WPACKET_memcpy(pkt, s->srp_ctx.login,
  ------------------
  |  Branch (127:12): [True: 0, False: 2]
  ------------------
  128|      2|            strlen(s->srp_ctx.login))
  129|      2|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (129:12): [True: 0, False: 2]
  ------------------
  130|      2|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (130:12): [True: 0, False: 2]
  ------------------
  131|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  132|      0|        return EXT_RETURN_FAIL;
  133|      0|    }
  134|       |
  135|      2|    return EXT_RETURN_SENT;
  136|      2|}
tls_construct_ctos_ec_pt_formats:
  186|  1.88k|{
  187|  1.88k|    const unsigned char *pformats;
  188|  1.88k|    size_t num_formats;
  189|  1.88k|    int reason, min_version, max_version;
  190|       |
  191|  1.88k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  192|  1.88k|    if (reason != 0) {
  ------------------
  |  Branch (192:9): [True: 0, False: 1.88k]
  ------------------
  193|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  194|      0|        return EXT_RETURN_FAIL;
  195|      0|    }
  196|  1.88k|    if (!use_ecc(s, min_version, max_version))
  ------------------
  |  Branch (196:9): [True: 131, False: 1.75k]
  ------------------
  197|    131|        return EXT_RETURN_NOT_SENT;
  198|       |
  199|       |    /* Add TLS extension ECPointFormats to the ClientHello message */
  200|  1.75k|    tls1_get_formatlist(s, &pformats, &num_formats);
  201|       |
  202|  1.75k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ec_point_formats)
  ------------------
  |  |  891|  3.50k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (202:9): [True: 0, False: 1.75k]
  ------------------
  203|       |        /* Sub-packet for formats extension */
  204|  1.75k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.50k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (204:12): [True: 0, False: 1.75k]
  ------------------
  205|  1.75k|        || !WPACKET_sub_memcpy_u8(pkt, pformats, num_formats)
  ------------------
  |  |  918|  3.50k|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (205:12): [True: 0, False: 1.75k]
  ------------------
  206|  1.75k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (206:12): [True: 0, False: 1.75k]
  ------------------
  207|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  208|      0|        return EXT_RETURN_FAIL;
  209|      0|    }
  210|       |
  211|  1.75k|    return EXT_RETURN_SENT;
  212|  1.75k|}
tls_construct_ctos_supported_groups:
  217|  1.88k|{
  218|  1.88k|    const uint16_t *pgroups = NULL;
  219|  1.88k|    size_t num_groups = 0, i, tls13added = 0, added = 0;
  220|  1.88k|    int min_version, max_version, reason;
  221|       |
  222|  1.88k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  223|  1.88k|    if (reason != 0) {
  ------------------
  |  Branch (223:9): [True: 0, False: 1.88k]
  ------------------
  224|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  225|      0|        return EXT_RETURN_FAIL;
  226|      0|    }
  227|       |
  228|       |    /*
  229|       |     * We only support EC groups in TLSv1.2 or below, and in DTLS. Therefore
  230|       |     * if we don't have EC support then we don't send this extension.
  231|       |     */
  232|  1.88k|    if (!use_ecc(s, min_version, max_version)
  ------------------
  |  Branch (232:9): [True: 131, False: 1.75k]
  ------------------
  233|    131|        && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION))
  ------------------
  |  |  258|    262|    (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)
  |  |  ------------------
  |  |  |  | 2190|    131|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 131]
  |  |  ------------------
  ------------------
                      && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION))
  ------------------
  |  |   27|    131|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (233:42): [True: 5, False: 126]
  ------------------
  234|      5|        return EXT_RETURN_NOT_SENT;
  235|       |
  236|       |    /*
  237|       |     * Add TLS extension supported_groups to the ClientHello message
  238|       |     */
  239|  1.88k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  240|       |
  241|  1.88k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_groups)
  ------------------
  |  |  891|  3.76k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (241:9): [True: 0, False: 1.88k]
  ------------------
  242|       |        /* Sub-packet for supported_groups extension */
  243|  1.88k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.76k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (243:12): [True: 0, False: 1.88k]
  ------------------
  244|  1.88k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.76k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (244:12): [True: 0, False: 1.88k]
  ------------------
  245|  1.88k|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)) {
  ------------------
  |  |  697|  1.88k|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (245:12): [True: 0, False: 1.88k]
  ------------------
  246|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  247|      0|        return EXT_RETURN_FAIL;
  248|      0|    }
  249|       |    /* Copy group ID if supported */
  250|  13.9k|    for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (250:17): [True: 12.0k, False: 1.88k]
  ------------------
  251|  12.0k|        uint16_t ctmp = pgroups[i];
  252|  12.0k|        int okfortls13;
  253|       |
  254|  12.0k|        if (tls_valid_group(s, ctmp, min_version, max_version, 0, &okfortls13)
  ------------------
  |  Branch (254:13): [True: 12.0k, False: 28]
  ------------------
  255|  12.0k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED)) {
  ------------------
  |  | 2758|  12.0k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2739|  12.0k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (255:16): [True: 11.9k, False: 62]
  ------------------
  256|  11.9k|            if (!WPACKET_put_bytes_u16(pkt, ctmp)) {
  ------------------
  |  |  891|  11.9k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (256:17): [True: 0, False: 11.9k]
  ------------------
  257|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  258|      0|                return EXT_RETURN_FAIL;
  259|      0|            }
  260|  11.9k|            if (okfortls13 && max_version == TLS1_3_VERSION)
  ------------------
  |  |   27|  11.8k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (260:17): [True: 11.8k, False: 62]
  |  Branch (260:31): [True: 11.8k, False: 0]
  ------------------
  261|  11.8k|                tls13added++;
  262|  11.9k|            added++;
  263|  11.9k|        }
  264|  12.0k|    }
  265|  1.88k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (265:9): [True: 41, False: 1.83k]
  |  Branch (265:32): [True: 0, False: 1.83k]
  ------------------
  266|     41|        if (added == 0)
  ------------------
  |  Branch (266:13): [True: 41, False: 0]
  ------------------
  267|     41|            SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  150|     41|    (ERR_new(),                                                  \
  |  |  151|     41|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|     41|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|     41|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1243|     41|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|     41|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                          SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  214|     41|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  268|     41|                "No groups enabled for max supported SSL/TLS version");
  269|      0|        else
  270|     41|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  271|     41|        return EXT_RETURN_FAIL;
  272|     41|    }
  273|       |
  274|  1.83k|    if (tls13added == 0 && max_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|     14|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (274:9): [True: 14, False: 1.82k]
  |  Branch (274:28): [True: 5, False: 9]
  ------------------
  275|      5|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  150|      5|    (ERR_new(),                                                  \
  |  |  151|      5|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      5|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|      5|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1243|      5|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|      5|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  214|      5|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  276|      5|            "No groups enabled for max supported SSL/TLS version");
  277|      5|        return EXT_RETURN_FAIL;
  278|      5|    }
  279|       |
  280|  1.83k|    return EXT_RETURN_SENT;
  281|  1.83k|}
tls_construct_ctos_session_ticket:
  286|  1.83k|{
  287|  1.83k|    size_t ticklen;
  288|       |
  289|  1.83k|    if (!tls_use_ticket(s))
  ------------------
  |  Branch (289:9): [True: 1.83k, False: 0]
  ------------------
  290|  1.83k|        return EXT_RETURN_NOT_SENT;
  291|       |
  292|      0|    if (!s->new_session && s->session != NULL
  ------------------
  |  Branch (292:9): [True: 0, False: 0]
  |  Branch (292:28): [True: 0, False: 0]
  ------------------
  293|      0|        && s->session->ext.tick != NULL
  ------------------
  |  Branch (293:12): [True: 0, False: 0]
  ------------------
  294|      0|        && s->session->ssl_version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (294:12): [True: 0, False: 0]
  ------------------
  295|      0|        ticklen = s->session->ext.ticklen;
  296|      0|    } else if (s->session && s->ext.session_ticket != NULL
  ------------------
  |  Branch (296:16): [True: 0, False: 0]
  |  Branch (296:30): [True: 0, False: 0]
  ------------------
  297|      0|        && s->ext.session_ticket->data != NULL) {
  ------------------
  |  Branch (297:12): [True: 0, False: 0]
  ------------------
  298|      0|        ticklen = s->ext.session_ticket->length;
  299|      0|        s->session->ext.tick = OPENSSL_malloc(ticklen);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  300|      0|        if (s->session->ext.tick == NULL) {
  ------------------
  |  Branch (300:13): [True: 0, False: 0]
  ------------------
  301|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  302|      0|            return EXT_RETURN_FAIL;
  303|      0|        }
  304|      0|        memcpy(s->session->ext.tick,
  305|      0|            s->ext.session_ticket->data, ticklen);
  306|      0|        s->session->ext.ticklen = ticklen;
  307|      0|    } else {
  308|      0|        ticklen = 0;
  309|      0|    }
  310|       |
  311|      0|    if (ticklen == 0 && s->ext.session_ticket != NULL && s->ext.session_ticket->data == NULL)
  ------------------
  |  Branch (311:9): [True: 0, False: 0]
  |  Branch (311:25): [True: 0, False: 0]
  |  Branch (311:58): [True: 0, False: 0]
  ------------------
  312|      0|        return EXT_RETURN_NOT_SENT;
  313|       |
  314|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_session_ticket)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (314:9): [True: 0, False: 0]
  ------------------
  315|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick, ticklen)) {
  ------------------
  |  |  920|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (315:12): [True: 0, False: 0]
  ------------------
  316|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  317|      0|        return EXT_RETURN_FAIL;
  318|      0|    }
  319|       |
  320|      0|    return EXT_RETURN_SENT;
  321|      0|}
tls_construct_ctos_sig_algs:
  326|  1.83k|{
  327|  1.83k|    size_t salglen;
  328|  1.83k|    const uint16_t *salg;
  329|       |
  330|       |    /*
  331|       |     * This used both in the initial hello and as part of renegotiation,
  332|       |     * in the latter case, the client version may be already set and may
  333|       |     * be lower than that initially offered in `client_version`.
  334|       |     */
  335|  1.83k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.83k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.83k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (335:9): [True: 1.83k, False: 0]
  ------------------
  336|  1.83k|        if (s->client_version < TLS1_2_VERSION
  ------------------
  |  |   26|  3.67k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (336:13): [True: 3, False: 1.83k]
  ------------------
  337|  1.83k|            || (s->ssl.method->version != TLS_ANY_VERSION
  ------------------
  |  |   40|  3.67k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (337:17): [True: 0, False: 1.83k]
  ------------------
  338|      0|                && s->version < TLS1_2_VERSION))
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (338:20): [True: 0, False: 0]
  ------------------
  339|      3|            return EXT_RETURN_NOT_SENT;
  340|  1.83k|    } else {
  341|      0|        if (DTLS_VERSION_LT(s->client_version, DTLS1_2_VERSION)
  ------------------
  |  |   60|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (60:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  342|      0|            || (s->ssl.method->version != DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (342:17): [True: 0, False: 0]
  ------------------
  343|      0|                && DTLS_VERSION_LT(s->version, DTLS1_2_VERSION)))
  ------------------
  |  |   60|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (60:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  344|      0|            return EXT_RETURN_NOT_SENT;
  345|      0|    }
  346|       |
  347|  1.83k|    salglen = tls12_get_psigalgs(s, 1, &salg);
  348|  1.83k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signature_algorithms)
  ------------------
  |  |  891|  3.67k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (348:9): [True: 0, False: 1.83k]
  ------------------
  349|       |        /* Sub-packet for sig-algs extension */
  350|  1.83k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.67k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (350:12): [True: 0, False: 1.83k]
  ------------------
  351|       |        /* Sub-packet for the actual list */
  352|  1.83k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.67k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (352:12): [True: 0, False: 1.83k]
  ------------------
  353|  1.83k|        || !tls12_copy_sigalgs(s, pkt, salg, salglen)
  ------------------
  |  Branch (353:12): [True: 0, False: 1.83k]
  ------------------
  354|  1.83k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (354:12): [True: 0, False: 1.83k]
  ------------------
  355|  1.83k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (355:12): [True: 0, False: 1.83k]
  ------------------
  356|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  357|      0|        return EXT_RETURN_FAIL;
  358|      0|    }
  359|       |
  360|  1.83k|    return EXT_RETURN_SENT;
  361|  1.83k|}
tls_construct_ctos_status_request:
  367|  1.83k|{
  368|  1.83k|    int i;
  369|       |
  370|       |    /* This extension isn't defined for client Certificates */
  371|  1.83k|    if (x != NULL)
  ------------------
  |  Branch (371:9): [True: 0, False: 1.83k]
  ------------------
  372|      0|        return EXT_RETURN_NOT_SENT;
  373|       |
  374|  1.83k|    if (s->ext.status_type != TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  173|  1.83k|#define TLSEXT_STATUSTYPE_ocsp 1
  ------------------
  |  Branch (374:9): [True: 1.83k, False: 1]
  ------------------
  375|  1.83k|        return EXT_RETURN_NOT_SENT;
  376|       |
  377|      1|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_status_request)
  ------------------
  |  |  891|      2|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (377:9): [True: 0, False: 1]
  ------------------
  378|       |        /* Sub-packet for status request extension */
  379|      1|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      2|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (379:12): [True: 0, False: 1]
  ------------------
  380|      1|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  889|      2|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (380:12): [True: 0, False: 1]
  ------------------
  381|       |        /* Sub-packet for the ids */
  382|      1|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      1|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (382:12): [True: 0, False: 1]
  ------------------
  383|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  384|      0|        return EXT_RETURN_FAIL;
  385|      0|    }
  386|      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 (386:17): [True: 0, False: 1]
  ------------------
  387|      0|        unsigned char *idbytes;
  388|      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)))
  ------------------
  389|      0|        int idlen = i2d_OCSP_RESPID(id, NULL);
  390|       |
  391|      0|        if (idlen <= 0
  ------------------
  |  Branch (391:13): [True: 0, False: 0]
  ------------------
  392|       |            /* Sub-packet for an individual id */
  393|      0|            || !WPACKET_sub_allocate_bytes_u16(pkt, idlen, &idbytes)
  ------------------
  |  |  831|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (393:16): [True: 0, False: 0]
  ------------------
  394|      0|            || i2d_OCSP_RESPID(id, &idbytes) != idlen) {
  ------------------
  |  Branch (394:16): [True: 0, False: 0]
  ------------------
  395|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  396|      0|            return EXT_RETURN_FAIL;
  397|      0|        }
  398|      0|    }
  399|      1|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (399:9): [True: 0, False: 1]
  ------------------
  400|      1|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      1|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (400:12): [True: 0, False: 1]
  ------------------
  401|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  402|      0|        return EXT_RETURN_FAIL;
  403|      0|    }
  404|      1|    if (s->ext.ocsp.exts) {
  ------------------
  |  Branch (404:9): [True: 0, False: 1]
  ------------------
  405|      0|        unsigned char *extbytes;
  406|      0|        int extlen = i2d_X509_EXTENSIONS(s->ext.ocsp.exts, NULL);
  407|       |
  408|      0|        if (extlen < 0) {
  ------------------
  |  Branch (408:13): [True: 0, False: 0]
  ------------------
  409|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  410|      0|            return EXT_RETURN_FAIL;
  411|      0|        }
  412|      0|        if (!WPACKET_allocate_bytes(pkt, extlen, &extbytes)
  ------------------
  |  Branch (412:13): [True: 0, False: 0]
  ------------------
  413|      0|            || i2d_X509_EXTENSIONS(s->ext.ocsp.exts, &extbytes)
  ------------------
  |  Branch (413:16): [True: 0, False: 0]
  ------------------
  414|      0|                != extlen) {
  415|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  416|      0|            return EXT_RETURN_FAIL;
  417|      0|        }
  418|      0|    }
  419|      1|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (419:9): [True: 0, False: 1]
  |  Branch (419:32): [True: 0, False: 1]
  ------------------
  420|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  421|      0|        return EXT_RETURN_FAIL;
  422|      0|    }
  423|       |
  424|      1|    return EXT_RETURN_SENT;
  425|      1|}
tls_construct_ctos_npn:
  432|  1.83k|{
  433|  1.83k|    if (SSL_CONNECTION_GET_CTX(s)->ext.npn_select_cb == NULL
  ------------------
  |  |   26|  1.83k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (433:9): [True: 1.83k, False: 0]
  ------------------
  434|      0|        || !SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  277|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  278|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  435|  1.83k|        return EXT_RETURN_NOT_SENT;
  436|       |
  437|       |    /*
  438|       |     * The client advertises an empty extension to indicate its support
  439|       |     * for Next Protocol Negotiation
  440|       |     */
  441|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_next_proto_neg)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (441:9): [True: 0, False: 0]
  ------------------
  442|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (442:12): [True: 0, False: 0]
  ------------------
  443|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  444|      0|        return EXT_RETURN_FAIL;
  445|      0|    }
  446|       |
  447|      0|    return EXT_RETURN_SENT;
  448|      0|}
tls_construct_ctos_alpn:
  454|  1.83k|{
  455|  1.83k|    s->s3.alpn_sent = 0;
  456|       |
  457|  1.83k|    if (s->ext.alpn == NULL || !SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  277|    291|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 291, False: 0]
  |  |  ------------------
  |  |  278|    291|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (457:9): [True: 1.54k, False: 291]
  ------------------
  458|  1.54k|        return EXT_RETURN_NOT_SENT;
  459|       |
  460|    291|    if (!WPACKET_put_bytes_u16(pkt,
  ------------------
  |  |  891|    582|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (460:9): [True: 0, False: 291]
  ------------------
  461|    291|            TLSEXT_TYPE_application_layer_protocol_negotiation)
  462|       |        /* Sub-packet ALPN extension */
  463|    291|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|    582|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (463:12): [True: 0, False: 291]
  ------------------
  464|    291|        || !WPACKET_sub_memcpy_u16(pkt, s->ext.alpn, s->ext.alpn_len)
  ------------------
  |  |  920|    582|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (464:12): [True: 0, False: 291]
  ------------------
  465|    291|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (465:12): [True: 0, False: 291]
  ------------------
  466|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  467|      0|        return EXT_RETURN_FAIL;
  468|      0|    }
  469|    291|    s->s3.alpn_sent = 1;
  470|       |
  471|    291|    return EXT_RETURN_SENT;
  472|    291|}
tls_construct_ctos_use_srtp:
  478|  1.83k|{
  479|  1.83k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  480|  1.83k|    STACK_OF(SRTP_PROTECTION_PROFILE) *clnt = SSL_get_srtp_profiles(ssl);
  ------------------
  |  |   33|  1.83k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  481|  1.83k|    int i, end;
  482|       |
  483|  1.83k|    if (clnt == NULL)
  ------------------
  |  Branch (483:9): [True: 1.83k, False: 0]
  ------------------
  484|  1.83k|        return EXT_RETURN_NOT_SENT;
  485|       |
  486|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_use_srtp)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (486:9): [True: 0, False: 0]
  ------------------
  487|       |        /* Sub-packet for SRTP extension */
  488|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (488:12): [True: 0, False: 0]
  ------------------
  489|       |        /* Sub-packet for the protection profile list */
  490|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (490:12): [True: 0, False: 0]
  ------------------
  491|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  492|      0|        return EXT_RETURN_FAIL;
  493|      0|    }
  494|       |
  495|      0|    end = sk_SRTP_PROTECTION_PROFILE_num(clnt);
  ------------------
  |  |  250|      0|#define sk_SRTP_PROTECTION_PROFILE_num(sk) OPENSSL_sk_num(ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
  496|      0|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (496:17): [True: 0, False: 0]
  ------------------
  497|      0|        const SRTP_PROTECTION_PROFILE *prof = sk_SRTP_PROTECTION_PROFILE_value(clnt, i);
  ------------------
  |  |  251|      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)))
  ------------------
  498|       |
  499|      0|        if (prof == NULL || !WPACKET_put_bytes_u16(pkt, prof->id)) {
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (499:13): [True: 0, False: 0]
  |  Branch (499:29): [True: 0, False: 0]
  ------------------
  500|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  501|      0|            return EXT_RETURN_FAIL;
  502|      0|        }
  503|      0|    }
  504|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (504:9): [True: 0, False: 0]
  ------------------
  505|       |        /* Add an empty use_mki value */
  506|      0|        || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (506:12): [True: 0, False: 0]
  ------------------
  507|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (507:12): [True: 0, False: 0]
  ------------------
  508|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  509|      0|        return EXT_RETURN_FAIL;
  510|      0|    }
  511|       |
  512|      0|    return EXT_RETURN_SENT;
  513|      0|}
tls_construct_ctos_etm:
  519|  1.83k|{
  520|  1.83k|    if (s->options & SSL_OP_NO_ENCRYPT_THEN_MAC)
  ------------------
  |  |  398|  1.83k|#define SSL_OP_NO_ENCRYPT_THEN_MAC SSL_OP_BIT(19)
  |  |  ------------------
  |  |  |  |  350|  1.83k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (520:9): [True: 0, False: 1.83k]
  ------------------
  521|      0|        return EXT_RETURN_NOT_SENT;
  522|       |
  523|  1.83k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_encrypt_then_mac)
  ------------------
  |  |  891|  3.67k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (523:9): [True: 0, False: 1.83k]
  ------------------
  524|  1.83k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  891|  1.83k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (524:12): [True: 0, False: 1.83k]
  ------------------
  525|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  526|      0|        return EXT_RETURN_FAIL;
  527|      0|    }
  528|       |
  529|  1.83k|    return EXT_RETURN_SENT;
  530|  1.83k|}
tls_construct_ctos_sct:
  536|  1.83k|{
  537|  1.83k|    if (s->ct_validation_callback == NULL)
  ------------------
  |  Branch (537:9): [True: 1.83k, False: 0]
  ------------------
  538|  1.83k|        return EXT_RETURN_NOT_SENT;
  539|       |
  540|       |    /* Not defined for client Certificates */
  541|      0|    if (x != NULL)
  ------------------
  |  Branch (541:9): [True: 0, False: 0]
  ------------------
  542|      0|        return EXT_RETURN_NOT_SENT;
  543|       |
  544|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signed_certificate_timestamp)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (544:9): [True: 0, False: 0]
  ------------------
  545|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (545:12): [True: 0, False: 0]
  ------------------
  546|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  547|      0|        return EXT_RETURN_FAIL;
  548|      0|    }
  549|       |
  550|      0|    return EXT_RETURN_SENT;
  551|      0|}
tls_construct_ctos_ems:
  557|  1.83k|{
  558|  1.83k|    if (s->options & SSL_OP_NO_EXTENDED_MASTER_SECRET)
  ------------------
  |  |  356|  1.83k|#define SSL_OP_NO_EXTENDED_MASTER_SECRET SSL_OP_BIT(0)
  |  |  ------------------
  |  |  |  |  350|  1.83k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (558:9): [True: 0, False: 1.83k]
  ------------------
  559|      0|        return EXT_RETURN_NOT_SENT;
  560|       |
  561|  1.83k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_extended_master_secret)
  ------------------
  |  |  891|  3.67k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (561:9): [True: 0, False: 1.83k]
  ------------------
  562|  1.83k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  891|  1.83k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (562:12): [True: 0, False: 1.83k]
  ------------------
  563|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  564|      0|        return EXT_RETURN_FAIL;
  565|      0|    }
  566|       |
  567|  1.83k|    return EXT_RETURN_SENT;
  568|  1.83k|}
tls_construct_ctos_supported_versions:
  573|  1.83k|{
  574|  1.83k|    int currv, min_version, max_version, reason;
  575|       |
  576|  1.83k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  577|  1.83k|    if (reason != 0) {
  ------------------
  |  Branch (577:9): [True: 0, False: 1.83k]
  ------------------
  578|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  579|      0|        return EXT_RETURN_FAIL;
  580|      0|    }
  581|       |
  582|       |    /*
  583|       |     * Don't include this if we can't negotiate TLSv1.3. We can do a straight
  584|       |     * comparison here because we will never be called in DTLS.
  585|       |     */
  586|  1.83k|    if (max_version < TLS1_3_VERSION)
  ------------------
  |  |   27|  1.83k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (586:9): [True: 14, False: 1.82k]
  ------------------
  587|     14|        return EXT_RETURN_NOT_SENT;
  588|       |
  589|  1.82k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_versions)
  ------------------
  |  |  891|  3.65k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (589:9): [True: 0, False: 1.82k]
  ------------------
  590|  1.82k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.65k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (590:12): [True: 0, False: 1.82k]
  ------------------
  591|  1.82k|        || !WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  790|  1.82k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (591:12): [True: 0, False: 1.82k]
  ------------------
  592|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  593|      0|        return EXT_RETURN_FAIL;
  594|      0|    }
  595|       |
  596|  5.47k|    for (currv = max_version; currv >= min_version; currv--) {
  ------------------
  |  Branch (596:31): [True: 3.65k, False: 1.82k]
  ------------------
  597|  3.65k|        if (!WPACKET_put_bytes_u16(pkt, currv)) {
  ------------------
  |  |  891|  3.65k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (597:13): [True: 0, False: 3.65k]
  ------------------
  598|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  599|      0|            return EXT_RETURN_FAIL;
  600|      0|        }
  601|  3.65k|    }
  602|  1.82k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (602:9): [True: 0, False: 1.82k]
  |  Branch (602:32): [True: 0, False: 1.82k]
  ------------------
  603|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  604|      0|        return EXT_RETURN_FAIL;
  605|      0|    }
  606|       |
  607|  1.82k|    return EXT_RETURN_SENT;
  608|  1.82k|}
tls_construct_ctos_psk_kex_modes:
  616|  1.82k|{
  617|  1.82k|#ifndef OPENSSL_NO_TLS1_3
  618|  1.82k|    int nodhe = s->options & SSL_OP_ALLOW_NO_DHE_KEX;
  ------------------
  |  |  369|  1.82k|#define SSL_OP_ALLOW_NO_DHE_KEX SSL_OP_BIT(10)
  |  |  ------------------
  |  |  |  |  350|  1.82k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  619|       |
  620|  1.82k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk_kex_modes)
  ------------------
  |  |  891|  3.65k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (620:9): [True: 0, False: 1.82k]
  ------------------
  621|  1.82k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.65k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (621:12): [True: 0, False: 1.82k]
  ------------------
  622|  1.82k|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  790|  3.65k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (622:12): [True: 0, False: 1.82k]
  ------------------
  623|  1.82k|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE_DHE)
  ------------------
  |  |  889|  3.65k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (623:12): [True: 0, False: 1.82k]
  ------------------
  624|  1.82k|        || (nodhe && !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE))
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (624:13): [True: 0, False: 1.82k]
  |  Branch (624:22): [True: 0, False: 0]
  ------------------
  625|  1.82k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (625:12): [True: 0, False: 1.82k]
  ------------------
  626|  1.82k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (626:12): [True: 0, False: 1.82k]
  ------------------
  627|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  628|      0|        return EXT_RETURN_FAIL;
  629|      0|    }
  630|       |
  631|  1.82k|    s->ext.psk_kex_mode = TLSEXT_KEX_MODE_FLAG_KE_DHE;
  ------------------
  |  | 2297|  1.82k|#define TLSEXT_KEX_MODE_FLAG_KE_DHE 2
  ------------------
  632|  1.82k|    if (nodhe)
  ------------------
  |  Branch (632:9): [True: 0, False: 1.82k]
  ------------------
  633|      0|        s->ext.psk_kex_mode |= TLSEXT_KEX_MODE_FLAG_KE;
  ------------------
  |  | 2296|      0|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  634|  1.82k|#endif
  635|       |
  636|  1.82k|    return EXT_RETURN_SENT;
  637|  1.82k|}
tls_construct_ctos_key_share:
  704|  1.82k|{
  705|  1.82k|#ifndef OPENSSL_NO_TLS1_3
  706|  1.82k|    size_t i, num_groups = 0;
  707|  1.82k|    const uint16_t *pgroups = NULL;
  708|  1.82k|    uint16_t group_id = 0;
  709|  1.82k|    int add_only_one = 0;
  710|  1.82k|    size_t valid_keyshare = 0;
  711|       |
  712|       |    /* key_share extension */
  713|  1.82k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
  ------------------
  |  |  891|  3.65k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (713:9): [True: 0, False: 1.82k]
  ------------------
  714|       |        /* Extension data sub-packet */
  715|  1.82k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.65k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (715:12): [True: 0, False: 1.82k]
  ------------------
  716|       |        /* KeyShare list sub-packet */
  717|  1.82k|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|  1.82k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (717:12): [True: 0, False: 1.82k]
  ------------------
  718|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  719|      0|        return EXT_RETURN_FAIL;
  720|      0|    }
  721|       |
  722|  1.82k|    tls1_get_requested_keyshare_groups(s, &pgroups, &num_groups);
  723|  1.82k|    if (num_groups == 1 && pgroups[0] == 0) { /* Indication that no * prefix was used */
  ------------------
  |  Branch (723:9): [True: 212, False: 1.61k]
  |  Branch (723:28): [True: 152, False: 60]
  ------------------
  724|    152|        tls1_get_supported_groups(s, &pgroups, &num_groups);
  725|    152|        add_only_one = 1;
  726|    152|    }
  727|       |
  728|       |    /* If neither the default nor the keyshares have any entry --> fatal */
  729|  1.82k|    if (num_groups == 0) {
  ------------------
  |  Branch (729:9): [True: 1, False: 1.82k]
  ------------------
  730|      1|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  731|      1|        return EXT_RETURN_FAIL;
  732|      1|    }
  733|       |
  734|       |    /* Add key shares */
  735|       |
  736|  1.82k|    if (s->s3.group_id != 0 && s->s3.tmp.pkey == NULL) {
  ------------------
  |  Branch (736:9): [True: 0, False: 1.82k]
  |  Branch (736:32): [True: 0, False: 0]
  ------------------
  737|       |        /* new, single key share */
  738|      0|        group_id = s->s3.group_id;
  739|      0|        s->s3.tmp.num_ks_pkey = 0;
  740|      0|        if (!add_key_share(s, pkt, group_id, 0)) {
  ------------------
  |  Branch (740:13): [True: 0, False: 0]
  ------------------
  741|       |            /* SSLfatal() already called */
  742|      0|            return EXT_RETURN_FAIL;
  743|      0|        }
  744|      0|        valid_keyshare++;
  745|  1.82k|    } else {
  746|  1.82k|        if (s->ext.supportedgroups == NULL) /* use default */
  ------------------
  |  Branch (746:13): [True: 0, False: 1.82k]
  ------------------
  747|      0|            add_only_one = 1;
  748|       |
  749|  5.26k|        for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (749:21): [True: 3.59k, False: 1.67k]
  ------------------
  750|  3.59k|            if (!tls_group_allowed(s, pgroups[i], SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2758|  3.59k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2739|  3.59k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (750:17): [True: 16, False: 3.57k]
  ------------------
  751|     16|                continue;
  752|  3.57k|            if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  3.57k|#define TLS1_3_VERSION 0x0304
  ------------------
                          if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  3.57k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (752:17): [True: 11, False: 3.56k]
  ------------------
  753|  3.57k|                    0, NULL))
  754|     11|                continue;
  755|       |
  756|  3.56k|            group_id = pgroups[i];
  757|       |
  758|  3.56k|            if (group_id == 0) {
  ------------------
  |  Branch (758:17): [True: 0, False: 3.56k]
  ------------------
  759|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  760|      0|                return EXT_RETURN_FAIL;
  761|      0|            }
  762|  3.56k|            if (!add_key_share(s, pkt, group_id, valid_keyshare)) {
  ------------------
  |  Branch (762:17): [True: 0, False: 3.56k]
  ------------------
  763|       |                /* SSLfatal() already called */
  764|      0|                return EXT_RETURN_FAIL;
  765|      0|            }
  766|  3.56k|            valid_keyshare++;
  767|  3.56k|            if (add_only_one)
  ------------------
  |  Branch (767:17): [True: 152, False: 3.41k]
  ------------------
  768|    152|                break;
  769|  3.56k|        }
  770|  1.82k|    }
  771|       |
  772|  1.82k|    if (valid_keyshare == 0) {
  ------------------
  |  Branch (772:9): [True: 5, False: 1.81k]
  ------------------
  773|       |        /* No key shares were allowed */
  774|      5|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  148|      5|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      5|    (ERR_new(),                                                  \
  |  |  |  |  151|      5|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      5|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      5|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  775|      5|        return EXT_RETURN_FAIL;
  776|      5|    }
  777|       |
  778|  1.81k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (778:9): [True: 0, False: 1.81k]
  |  Branch (778:32): [True: 0, False: 1.81k]
  ------------------
  779|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  780|      0|        return EXT_RETURN_FAIL;
  781|      0|    }
  782|  1.81k|    return EXT_RETURN_SENT;
  783|       |#else
  784|       |    return EXT_RETURN_NOT_SENT;
  785|       |#endif
  786|  1.81k|}
tls_construct_ctos_cookie:
  791|  1.81k|{
  792|  1.81k|    EXT_RETURN ret = EXT_RETURN_FAIL;
  793|       |
  794|       |    /* Should only be set if we've had an HRR */
  795|  1.81k|    if (s->ext.tls13_cookie_len == 0)
  ------------------
  |  Branch (795:9): [True: 1.81k, False: 0]
  ------------------
  796|  1.81k|        return EXT_RETURN_NOT_SENT;
  797|       |
  798|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_cookie)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (798:9): [True: 0, False: 0]
  ------------------
  799|       |        /* Extension data sub-packet */
  800|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (800:12): [True: 0, False: 0]
  ------------------
  801|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->ext.tls13_cookie,
  ------------------
  |  |  920|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (801:12): [True: 0, False: 0]
  ------------------
  802|      0|            s->ext.tls13_cookie_len)
  803|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (803:12): [True: 0, False: 0]
  ------------------
  804|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  805|      0|        goto end;
  806|      0|    }
  807|       |
  808|      0|    ret = EXT_RETURN_SENT;
  809|      0|end:
  810|      0|    OPENSSL_free(s->ext.tls13_cookie);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  811|      0|    s->ext.tls13_cookie = NULL;
  812|      0|    s->ext.tls13_cookie_len = 0;
  813|       |
  814|      0|    return ret;
  815|      0|}
tls_construct_ctos_early_data:
  820|  1.81k|{
  821|  1.81k|#ifndef OPENSSL_NO_PSK
  822|  1.81k|    char identity[PSK_MAX_IDENTITY_LEN + 1];
  823|  1.81k|#endif /* OPENSSL_NO_PSK */
  824|  1.81k|    const unsigned char *id = NULL;
  825|  1.81k|    size_t idlen = 0;
  826|  1.81k|    SSL_SESSION *psksess = NULL;
  827|  1.81k|    SSL_SESSION *edsess = NULL;
  828|  1.81k|    const EVP_MD *handmd = NULL;
  829|  1.81k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  1.81k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  830|       |
  831|  1.81k|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (831:9): [True: 0, False: 1.81k]
  ------------------
  832|      0|        handmd = ssl_handshake_md(s);
  833|       |
  834|  1.81k|    if (s->psk_use_session_cb != NULL
  ------------------
  |  Branch (834:9): [True: 0, False: 1.81k]
  ------------------
  835|      0|        && (!s->psk_use_session_cb(ussl, handmd, &id, &idlen, &psksess)
  ------------------
  |  Branch (835:13): [True: 0, False: 0]
  ------------------
  836|      0|            || (psksess != NULL
  ------------------
  |  Branch (836:17): [True: 0, False: 0]
  ------------------
  837|      0|                && psksess->ssl_version != TLS1_3_VERSION))) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (837:20): [True: 0, False: 0]
  ------------------
  838|      0|        SSL_SESSION_free(psksess);
  839|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  840|      0|        return EXT_RETURN_FAIL;
  841|      0|    }
  842|       |
  843|  1.81k|#ifndef OPENSSL_NO_PSK
  844|  1.81k|    if (psksess == NULL && s->psk_client_callback != NULL) {
  ------------------
  |  Branch (844:9): [True: 1.81k, False: 0]
  |  Branch (844:28): [True: 0, False: 1.81k]
  ------------------
  845|      0|        unsigned char psk[PSK_MAX_PSK_LEN];
  846|      0|        size_t psklen = 0;
  847|       |
  848|      0|        memset(identity, 0, sizeof(identity));
  849|      0|        psklen = s->psk_client_callback(ussl, NULL,
  850|      0|            identity, sizeof(identity) - 1,
  851|      0|            psk, sizeof(psk));
  852|       |
  853|      0|        if (psklen > PSK_MAX_PSK_LEN) {
  ------------------
  |  |  862|      0|#define PSK_MAX_PSK_LEN 512
  ------------------
  |  Branch (853:13): [True: 0, False: 0]
  ------------------
  854|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  855|      0|            return EXT_RETURN_FAIL;
  856|      0|        } else if (psklen > 0) {
  ------------------
  |  Branch (856:20): [True: 0, False: 0]
  ------------------
  857|      0|            const unsigned char tls13_aes128gcmsha256_id[] = { 0x13, 0x01 };
  858|      0|            const SSL_CIPHER *cipher;
  859|       |
  860|      0|            idlen = strlen(identity);
  861|      0|            if (idlen > PSK_MAX_IDENTITY_LEN) {
  ------------------
  |  |  861|      0|#define PSK_MAX_IDENTITY_LEN 256
  ------------------
  |  Branch (861:17): [True: 0, False: 0]
  ------------------
  862|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  863|      0|                return EXT_RETURN_FAIL;
  864|      0|            }
  865|      0|            id = (unsigned char *)identity;
  866|       |
  867|       |            /*
  868|       |             * We found a PSK using an old style callback. We don't know
  869|       |             * the digest so we default to SHA256 as per the TLSv1.3 spec
  870|       |             */
  871|      0|            cipher = SSL_CIPHER_find(SSL_CONNECTION_GET_SSL(s),
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  872|      0|                tls13_aes128gcmsha256_id);
  873|      0|            if (cipher == NULL) {
  ------------------
  |  Branch (873:17): [True: 0, False: 0]
  ------------------
  874|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  875|      0|                return EXT_RETURN_FAIL;
  876|      0|            }
  877|       |
  878|      0|            psksess = SSL_SESSION_new();
  879|      0|            if (psksess == NULL
  ------------------
  |  Branch (879:17): [True: 0, False: 0]
  ------------------
  880|      0|                || !SSL_SESSION_set1_master_key(psksess, psk, psklen)
  ------------------
  |  Branch (880:20): [True: 0, False: 0]
  ------------------
  881|      0|                || !SSL_SESSION_set_cipher(psksess, cipher)
  ------------------
  |  Branch (881:20): [True: 0, False: 0]
  ------------------
  882|      0|                || !SSL_SESSION_set_protocol_version(psksess, TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (882:20): [True: 0, False: 0]
  ------------------
  883|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  884|      0|                OPENSSL_cleanse(psk, psklen);
  885|      0|                return EXT_RETURN_FAIL;
  886|      0|            }
  887|      0|            OPENSSL_cleanse(psk, psklen);
  888|      0|        }
  889|      0|    }
  890|  1.81k|#endif /* OPENSSL_NO_PSK */
  891|       |
  892|  1.81k|    SSL_SESSION_free(s->psksession);
  893|  1.81k|    s->psksession = psksess;
  894|  1.81k|    if (psksess != NULL) {
  ------------------
  |  Branch (894:9): [True: 0, False: 1.81k]
  ------------------
  895|      0|        OPENSSL_free(s->psksession_id);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  896|      0|        s->psksession_id = OPENSSL_memdup(id, idlen);
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  897|      0|        if (s->psksession_id == NULL) {
  ------------------
  |  Branch (897:13): [True: 0, False: 0]
  ------------------
  898|      0|            s->psksession_id_len = 0;
  899|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  900|      0|            return EXT_RETURN_FAIL;
  901|      0|        }
  902|      0|        s->psksession_id_len = idlen;
  903|      0|    }
  904|       |
  905|  1.81k|    if (s->early_data_state != SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (905:9): [True: 1.81k, False: 0]
  ------------------
  906|      0|        || (s->session->ext.max_early_data == 0
  ------------------
  |  Branch (906:13): [True: 0, False: 0]
  ------------------
  907|  1.81k|            && (psksess == NULL || psksess->ext.max_early_data == 0))) {
  ------------------
  |  Branch (907:17): [True: 0, False: 0]
  |  Branch (907:36): [True: 0, False: 0]
  ------------------
  908|  1.81k|        s->max_early_data = 0;
  909|  1.81k|        return EXT_RETURN_NOT_SENT;
  910|  1.81k|    }
  911|      0|    edsess = s->session->ext.max_early_data != 0 ? s->session : psksess;
  ------------------
  |  Branch (911:14): [True: 0, False: 0]
  ------------------
  912|      0|    s->max_early_data = edsess->ext.max_early_data;
  913|       |
  914|      0|    if (edsess->ext.hostname != NULL) {
  ------------------
  |  Branch (914:9): [True: 0, False: 0]
  ------------------
  915|      0|        if (s->ext.hostname == NULL
  ------------------
  |  Branch (915:13): [True: 0, False: 0]
  ------------------
  916|      0|            || (s->ext.hostname != NULL
  ------------------
  |  Branch (916:17): [True: 0, False: 0]
  ------------------
  917|      0|                && strcmp(s->ext.hostname, edsess->ext.hostname) != 0)) {
  ------------------
  |  Branch (917:20): [True: 0, False: 0]
  ------------------
  918|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  919|      0|                SSL_R_INCONSISTENT_EARLY_DATA_SNI);
  920|      0|            return EXT_RETURN_FAIL;
  921|      0|        }
  922|      0|    }
  923|       |
  924|      0|    if ((s->ext.alpn == NULL && edsess->ext.alpn_selected != NULL)) {
  ------------------
  |  Branch (924:10): [True: 0, False: 0]
  |  Branch (924:33): [True: 0, False: 0]
  ------------------
  925|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  926|      0|        return EXT_RETURN_FAIL;
  927|      0|    }
  928|       |
  929|       |    /*
  930|       |     * Verify that we are offering an ALPN protocol consistent with the early
  931|       |     * data.
  932|       |     */
  933|      0|    if (edsess->ext.alpn_selected != NULL) {
  ------------------
  |  Branch (933:9): [True: 0, False: 0]
  ------------------
  934|      0|        PACKET prots, alpnpkt;
  935|      0|        int found = 0;
  936|       |
  937|      0|        if (!PACKET_buf_init(&prots, s->ext.alpn, s->ext.alpn_len)) {
  ------------------
  |  Branch (937:13): [True: 0, False: 0]
  ------------------
  938|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  939|      0|            return EXT_RETURN_FAIL;
  940|      0|        }
  941|      0|        while (PACKET_get_length_prefixed_1(&prots, &alpnpkt)) {
  ------------------
  |  Branch (941:16): [True: 0, False: 0]
  ------------------
  942|      0|            if (PACKET_equal(&alpnpkt, edsess->ext.alpn_selected,
  ------------------
  |  Branch (942:17): [True: 0, False: 0]
  ------------------
  943|      0|                    edsess->ext.alpn_selected_len)) {
  944|      0|                found = 1;
  945|      0|                break;
  946|      0|            }
  947|      0|        }
  948|      0|        if (!found) {
  ------------------
  |  Branch (948:13): [True: 0, False: 0]
  ------------------
  949|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  950|      0|                SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
  951|      0|            return EXT_RETURN_FAIL;
  952|      0|        }
  953|      0|    }
  954|       |
  955|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (955:9): [True: 0, False: 0]
  ------------------
  956|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (956:12): [True: 0, False: 0]
  ------------------
  957|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (957:12): [True: 0, False: 0]
  ------------------
  958|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  959|      0|        return EXT_RETURN_FAIL;
  960|      0|    }
  961|       |
  962|       |    /*
  963|       |     * We set this to rejected here. Later, if the server acknowledges the
  964|       |     * extension, we set it to accepted.
  965|       |     */
  966|      0|    s->ext.early_data = SSL_EARLY_DATA_REJECTED;
  ------------------
  |  | 2036|      0|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  967|      0|    s->ext.early_data_ok = 1;
  968|       |
  969|      0|    return EXT_RETURN_SENT;
  970|      0|}
tls_construct_ctos_padding:
  992|  1.83k|{
  993|  1.83k|    unsigned char *padbytes;
  994|  1.83k|    size_t hlen;
  995|       |
  996|  1.83k|    if ((s->options & SSL_OP_TLSEXT_PADDING) == 0)
  ------------------
  |  |  363|  1.83k|#define SSL_OP_TLSEXT_PADDING SSL_OP_BIT(4)
  |  |  ------------------
  |  |  |  |  350|  1.83k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (996:9): [True: 0, False: 1.83k]
  ------------------
  997|      0|        return EXT_RETURN_NOT_SENT;
  998|       |
  999|       |    /*
 1000|       |     * Add padding to workaround bugs in F5 terminators. See RFC7685.
 1001|       |     * This code calculates the length of all extensions added so far but
 1002|       |     * excludes the PSK extension (because that MUST be written last). Therefore
 1003|       |     * this extension MUST always appear second to last.
 1004|       |     */
 1005|  1.83k|    if (!WPACKET_get_total_written(pkt, &hlen)) {
  ------------------
  |  Branch (1005:9): [True: 0, False: 1.83k]
  ------------------
 1006|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1007|      0|        return EXT_RETURN_FAIL;
 1008|      0|    }
 1009|       |
 1010|       |    /*
 1011|       |     * If we're going to send a PSK then that will be written out after this
 1012|       |     * extension, so we need to calculate how long it is going to be.
 1013|       |     */
 1014|  1.83k|    if (s->session->ssl_version == TLS1_3_VERSION
  ------------------
  |  |   27|  3.66k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1014:9): [True: 1.81k, False: 14]
  ------------------
 1015|  1.81k|        && s->session->ext.ticklen != 0
  ------------------
  |  Branch (1015:12): [True: 0, False: 1.81k]
  ------------------
 1016|      0|        && s->session->cipher != NULL) {
  ------------------
  |  Branch (1016:12): [True: 0, False: 0]
  ------------------
 1017|      0|        const EVP_MD *md = ssl_md(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1018|      0|            s->session->cipher->algorithm2);
 1019|       |
 1020|      0|        if (md != NULL) {
  ------------------
  |  Branch (1020:13): [True: 0, False: 0]
  ------------------
 1021|       |            /*
 1022|       |             * Add the fixed PSK overhead, the identity length and the binder
 1023|       |             * length.
 1024|       |             */
 1025|      0|            int md_size = EVP_MD_get_size(md);
 1026|       |
 1027|      0|            if (md_size <= 0)
  ------------------
  |  Branch (1027:17): [True: 0, False: 0]
  ------------------
 1028|      0|                return EXT_RETURN_FAIL;
 1029|      0|            hlen += PSK_PRE_BINDER_OVERHEAD + s->session->ext.ticklen
  ------------------
  |  |  987|      0|#define PSK_PRE_BINDER_OVERHEAD (2 + 2 + 2 + 2 + 4 + 2 + 1)
  ------------------
 1030|      0|                + md_size;
 1031|      0|        }
 1032|      0|    }
 1033|       |
 1034|  1.83k|    if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  |  972|  3.66k|#define F5_WORKAROUND_MIN_MSG_LEN 0xff
  ------------------
                  if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  |  973|  1.81k|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
  |  Branch (1034:9): [True: 1.81k, False: 19]
  |  Branch (1034:45): [True: 246, False: 1.56k]
  ------------------
 1035|       |        /* Calculate the amount of padding we need to add */
 1036|    246|        hlen = F5_WORKAROUND_MAX_MSG_LEN - hlen;
  ------------------
  |  |  973|    246|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
 1037|       |
 1038|       |        /*
 1039|       |         * Take off the size of extension header itself (2 bytes for type and
 1040|       |         * 2 bytes for length bytes), but ensure that the extension is at least
 1041|       |         * 1 byte long so as not to have an empty extension last (WebSphere 7.x,
 1042|       |         * 8.x are intolerant of that condition)
 1043|       |         */
 1044|    246|        if (hlen > 4)
  ------------------
  |  Branch (1044:13): [True: 243, False: 3]
  ------------------
 1045|    243|            hlen -= 4;
 1046|      3|        else
 1047|      3|            hlen = 1;
 1048|       |
 1049|    246|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_padding)
  ------------------
  |  |  891|    492|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1049:13): [True: 0, False: 246]
  ------------------
 1050|    246|            || !WPACKET_sub_allocate_bytes_u16(pkt, hlen, &padbytes)) {
  ------------------
  |  |  831|    246|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (1050:16): [True: 0, False: 246]
  ------------------
 1051|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1052|      0|            return EXT_RETURN_FAIL;
 1053|      0|        }
 1054|    246|        memset(padbytes, 0, hlen);
 1055|    246|    }
 1056|       |
 1057|  1.83k|    return EXT_RETURN_SENT;
 1058|  1.83k|}
tls_construct_ctos_psk:
 1066|  1.81k|{
 1067|  1.81k|#ifndef OPENSSL_NO_TLS1_3
 1068|  1.81k|    uint32_t agesec, agems = 0;
 1069|  1.81k|    size_t binderoffset, msglen;
 1070|  1.81k|    int reshashsize = 0, pskhashsize = 0;
 1071|  1.81k|    unsigned char *resbinder = NULL, *pskbinder = NULL, *msgstart = NULL;
 1072|  1.81k|    const EVP_MD *handmd = NULL, *mdres = NULL, *mdpsk = NULL;
 1073|  1.81k|    int dores = 0;
 1074|  1.81k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.81k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1075|  1.81k|    OSSL_TIME t;
 1076|       |
 1077|  1.81k|    s->ext.tick_identity = 0;
 1078|       |
 1079|       |    /*
 1080|       |     * Note: At this stage of the code we only support adding a single
 1081|       |     * resumption PSK. If we add support for multiple PSKs then the length
 1082|       |     * calculations in the padding extension will need to be adjusted.
 1083|       |     */
 1084|       |
 1085|       |    /*
 1086|       |     * If this is an incompatible or new session then we have nothing to resume
 1087|       |     * so don't add this extension.
 1088|       |     */
 1089|  1.81k|    if (s->session->ssl_version != TLS1_3_VERSION
  ------------------
  |  |   27|  3.63k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1089:9): [True: 0, False: 1.81k]
  ------------------
 1090|  1.81k|        || (s->session->ext.ticklen == 0 && s->psksession == NULL))
  ------------------
  |  Branch (1090:13): [True: 1.81k, False: 0]
  |  Branch (1090:45): [True: 1.81k, False: 0]
  ------------------
 1091|  1.81k|        return EXT_RETURN_NOT_SENT;
 1092|       |
 1093|      0|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (1093:9): [True: 0, False: 0]
  ------------------
 1094|      0|        handmd = ssl_handshake_md(s);
 1095|       |
 1096|      0|    if (s->session->ext.ticklen != 0) {
  ------------------
  |  Branch (1096:9): [True: 0, False: 0]
  ------------------
 1097|       |        /* Get the digest associated with the ciphersuite in the session */
 1098|      0|        if (s->session->cipher == NULL) {
  ------------------
  |  Branch (1098:13): [True: 0, False: 0]
  ------------------
 1099|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1100|      0|            return EXT_RETURN_FAIL;
 1101|      0|        }
 1102|      0|        mdres = ssl_md(sctx, s->session->cipher->algorithm2);
 1103|      0|        if (mdres == NULL) {
  ------------------
  |  Branch (1103:13): [True: 0, False: 0]
  ------------------
 1104|       |            /*
 1105|       |             * Don't recognize this cipher so we can't use the session.
 1106|       |             * Ignore it
 1107|       |             */
 1108|      0|            goto dopsksess;
 1109|      0|        }
 1110|       |
 1111|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdres != handmd) {
  ------------------
  |  Branch (1111:13): [True: 0, False: 0]
  |  Branch (1111:58): [True: 0, False: 0]
  ------------------
 1112|       |            /*
 1113|       |             * Selected ciphersuite hash does not match the hash for the session
 1114|       |             * so we can't use it.
 1115|       |             */
 1116|      0|            goto dopsksess;
 1117|      0|        }
 1118|       |
 1119|       |        /*
 1120|       |         * Technically the C standard just says time() returns a time_t and says
 1121|       |         * nothing about the encoding of that type. In practice most
 1122|       |         * implementations follow POSIX which holds it as an integral type in
 1123|       |         * seconds since epoch. We've already made the assumption that we can do
 1124|       |         * this in multiple places in the code, so portability shouldn't be an
 1125|       |         * issue.
 1126|       |         */
 1127|      0|        t = ossl_time_subtract(ossl_time_now(), s->session->time);
 1128|      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)
  |  |  ------------------
  ------------------
 1129|       |        /*
 1130|       |         * We calculate the age in seconds but the server may work in ms. Due to
 1131|       |         * rounding errors we could overestimate the age by up to 1s. It is
 1132|       |         * better to underestimate it. Otherwise, if the RTT is very short, when
 1133|       |         * the server calculates the age reported by the client it could be
 1134|       |         * bigger than the age calculated on the server - which should never
 1135|       |         * happen.
 1136|       |         */
 1137|      0|        if (agesec > 0)
  ------------------
  |  Branch (1137:13): [True: 0, False: 0]
  ------------------
 1138|      0|            agesec--;
 1139|       |
 1140|      0|        if (s->session->ext.tick_lifetime_hint < agesec) {
  ------------------
  |  Branch (1140:13): [True: 0, False: 0]
  ------------------
 1141|       |            /* Ticket is too old. Ignore it. */
 1142|      0|            goto dopsksess;
 1143|      0|        }
 1144|       |
 1145|       |        /*
 1146|       |         * Calculate age in ms. We're just doing it to nearest second. Should be
 1147|       |         * good enough.
 1148|       |         */
 1149|      0|        agems = agesec * (uint32_t)1000;
 1150|       |
 1151|      0|        if (agesec != 0 && agems / (uint32_t)1000 != agesec) {
  ------------------
  |  Branch (1151:13): [True: 0, False: 0]
  |  Branch (1151:28): [True: 0, False: 0]
  ------------------
 1152|       |            /*
 1153|       |             * Overflow. Shouldn't happen unless this is a *really* old session.
 1154|       |             * If so we just ignore it.
 1155|       |             */
 1156|      0|            goto dopsksess;
 1157|      0|        }
 1158|       |
 1159|       |        /*
 1160|       |         * Obfuscate the age. Overflow here is fine, this addition is supposed
 1161|       |         * to be mod 2^32.
 1162|       |         */
 1163|      0|        agems += s->session->ext.tick_age_add;
 1164|       |
 1165|      0|        reshashsize = EVP_MD_get_size(mdres);
 1166|      0|        if (reshashsize <= 0)
  ------------------
  |  Branch (1166:13): [True: 0, False: 0]
  ------------------
 1167|      0|            goto dopsksess;
 1168|      0|        s->ext.tick_identity++;
 1169|      0|        dores = 1;
 1170|      0|    }
 1171|       |
 1172|      0|dopsksess:
 1173|      0|    if (!dores && s->psksession == NULL)
  ------------------
  |  Branch (1173:9): [True: 0, False: 0]
  |  Branch (1173:19): [True: 0, False: 0]
  ------------------
 1174|      0|        return EXT_RETURN_NOT_SENT;
 1175|       |
 1176|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1176:9): [True: 0, False: 0]
  ------------------
 1177|      0|        mdpsk = ssl_md(sctx, s->psksession->cipher->algorithm2);
 1178|      0|        if (mdpsk == NULL) {
  ------------------
  |  Branch (1178:13): [True: 0, False: 0]
  ------------------
 1179|       |            /*
 1180|       |             * Don't recognize this cipher so we can't use the session.
 1181|       |             * If this happens it's an application bug.
 1182|       |             */
 1183|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1184|      0|            return EXT_RETURN_FAIL;
 1185|      0|        }
 1186|       |
 1187|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdpsk != handmd) {
  ------------------
  |  Branch (1187:13): [True: 0, False: 0]
  |  Branch (1187:58): [True: 0, False: 0]
  ------------------
 1188|       |            /*
 1189|       |             * Selected ciphersuite hash does not match the hash for the PSK
 1190|       |             * session. This is an application bug.
 1191|       |             */
 1192|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1193|      0|            return EXT_RETURN_FAIL;
 1194|      0|        }
 1195|       |
 1196|      0|        pskhashsize = EVP_MD_get_size(mdpsk);
 1197|      0|        if (pskhashsize <= 0) {
  ------------------
  |  Branch (1197:13): [True: 0, False: 0]
  ------------------
 1198|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1199|      0|            return EXT_RETURN_FAIL;
 1200|      0|        }
 1201|      0|    }
 1202|       |
 1203|       |    /* Create the extension, but skip over the binder for now */
 1204|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1204:9): [True: 0, False: 0]
  ------------------
 1205|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1205:12): [True: 0, False: 0]
  ------------------
 1206|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1206:12): [True: 0, False: 0]
  ------------------
 1207|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1208|      0|        return EXT_RETURN_FAIL;
 1209|      0|    }
 1210|       |
 1211|      0|    if (dores) {
  ------------------
  |  Branch (1211:9): [True: 0, False: 0]
  ------------------
 1212|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick,
  ------------------
  |  |  920|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1212:13): [True: 0, False: 0]
  ------------------
 1213|      0|                s->session->ext.ticklen)
 1214|      0|            || !WPACKET_put_bytes_u32(pkt, agems)) {
  ------------------
  |  |  895|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1214:16): [True: 0, False: 0]
  ------------------
 1215|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1216|      0|            return EXT_RETURN_FAIL;
 1217|      0|        }
 1218|      0|    }
 1219|       |
 1220|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->psksession_id,
  ------------------
  |  |  920|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1221:13): [True: 0, False: 0]
  ------------------
 1222|      0|                s->psksession_id_len)
 1223|      0|            || !WPACKET_put_bytes_u32(pkt, 0)) {
  ------------------
  |  |  895|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1223:16): [True: 0, False: 0]
  ------------------
 1224|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1225|      0|            return EXT_RETURN_FAIL;
 1226|      0|        }
 1227|      0|        s->ext.tick_identity++;
 1228|      0|    }
 1229|       |
 1230|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (1230:9): [True: 0, False: 0]
  ------------------
 1231|      0|        || !WPACKET_get_total_written(pkt, &binderoffset)
  ------------------
  |  Branch (1231:12): [True: 0, False: 0]
  ------------------
 1232|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1232:12): [True: 0, False: 0]
  ------------------
 1233|      0|        || (dores
  ------------------
  |  Branch (1233:13): [True: 0, False: 0]
  ------------------
 1234|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, reshashsize, &resbinder))
  ------------------
  |  |  829|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1234:16): [True: 0, False: 0]
  ------------------
 1235|      0|        || (s->psksession != NULL
  ------------------
  |  Branch (1235:13): [True: 0, False: 0]
  ------------------
 1236|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, pskhashsize, &pskbinder))
  ------------------
  |  |  829|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1236:16): [True: 0, False: 0]
  ------------------
 1237|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1237:12): [True: 0, False: 0]
  ------------------
 1238|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1238:12): [True: 0, False: 0]
  ------------------
 1239|      0|        || !WPACKET_get_total_written(pkt, &msglen)
  ------------------
  |  Branch (1239:12): [True: 0, False: 0]
  ------------------
 1240|       |        /*
 1241|       |         * We need to fill in all the sub-packet lengths now so we can
 1242|       |         * calculate the HMAC of the message up to the binders
 1243|       |         */
 1244|      0|        || !WPACKET_fill_lengths(pkt)) {
  ------------------
  |  Branch (1244:12): [True: 0, False: 0]
  ------------------
 1245|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1246|      0|        return EXT_RETURN_FAIL;
 1247|      0|    }
 1248|       |
 1249|      0|    msgstart = WPACKET_get_curr(pkt) - msglen;
 1250|       |
 1251|      0|    if (dores
  ------------------
  |  Branch (1251:9): [True: 0, False: 0]
  ------------------
 1252|      0|        && tls_psk_do_binder(s, mdres, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1252:12): [True: 0, False: 0]
  ------------------
 1253|      0|               resbinder, s->session, 1, 0)
 1254|      0|            != 1) {
 1255|       |        /* SSLfatal() already called */
 1256|      0|        return EXT_RETURN_FAIL;
 1257|      0|    }
 1258|       |
 1259|      0|    if (s->psksession != NULL
  ------------------
  |  Branch (1259:9): [True: 0, False: 0]
  ------------------
 1260|      0|        && tls_psk_do_binder(s, mdpsk, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1260:12): [True: 0, False: 0]
  ------------------
 1261|      0|               pskbinder, s->psksession, 1, 1)
 1262|      0|            != 1) {
 1263|       |        /* SSLfatal() already called */
 1264|      0|        return EXT_RETURN_FAIL;
 1265|      0|    }
 1266|       |
 1267|      0|    return EXT_RETURN_SENT;
 1268|       |#else
 1269|       |    return EXT_RETURN_NOT_SENT;
 1270|       |#endif
 1271|      0|}
tls_construct_ctos_post_handshake_auth:
 1277|  1.82k|{
 1278|  1.82k|#ifndef OPENSSL_NO_TLS1_3
 1279|  1.82k|    if (!s->pha_enabled)
  ------------------
  |  Branch (1279:9): [True: 0, False: 1.82k]
  ------------------
 1280|      0|        return EXT_RETURN_NOT_SENT;
 1281|       |
 1282|       |    /* construct extension - 0 length, no contents */
 1283|  1.82k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_post_handshake_auth)
  ------------------
  |  |  891|  3.65k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1283:9): [True: 0, False: 1.82k]
  ------------------
 1284|  1.82k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  3.65k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1284:12): [True: 0, False: 1.82k]
  ------------------
 1285|  1.82k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1285:12): [True: 0, False: 1.82k]
  ------------------
 1286|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1287|      0|        return EXT_RETURN_FAIL;
 1288|      0|    }
 1289|       |
 1290|  1.82k|    s->post_handshake_auth = SSL_PHA_EXT_SENT;
 1291|       |
 1292|  1.82k|    return EXT_RETURN_SENT;
 1293|       |#else
 1294|       |    return EXT_RETURN_NOT_SENT;
 1295|       |#endif
 1296|  1.82k|}
tls_parse_stoc_renegotiate:
 1304|      1|{
 1305|      1|    size_t expected_len = s->s3.previous_client_finished_len
 1306|      1|        + s->s3.previous_server_finished_len;
 1307|      1|    size_t ilen;
 1308|      1|    const unsigned char *data;
 1309|       |
 1310|       |    /* Check for logic errors */
 1311|      1|    if (!ossl_assert(expected_len == 0
  ------------------
  |  |   52|      2|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 1, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      2|    __FILE__, __LINE__)
  ------------------
  |  Branch (1311:9): [True: 0, False: 1]
  ------------------
 1312|      1|            || s->s3.previous_client_finished_len != 0)
 1313|      1|        || !ossl_assert(expected_len == 0
  ------------------
  |  |   52|      1|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 1, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      1|    __FILE__, __LINE__)
  ------------------
  |  Branch (1313:12): [True: 0, False: 1]
  ------------------
 1314|      1|            || s->s3.previous_server_finished_len != 0)) {
 1315|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1316|      0|        return 0;
 1317|      0|    }
 1318|       |
 1319|       |    /* Parse the length byte */
 1320|      1|    if (!PACKET_get_1_len(pkt, &ilen)) {
  ------------------
  |  Branch (1320:9): [True: 1, False: 0]
  ------------------
 1321|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_RENEGOTIATION_ENCODING_ERR);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1322|      1|        return 0;
 1323|      1|    }
 1324|       |
 1325|       |    /* Consistency check */
 1326|      0|    if (PACKET_remaining(pkt) != ilen) {
  ------------------
  |  Branch (1326:9): [True: 0, False: 0]
  ------------------
 1327|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_RENEGOTIATION_ENCODING_ERR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1328|      0|        return 0;
 1329|      0|    }
 1330|       |
 1331|       |    /* Check that the extension matches */
 1332|      0|    if (ilen != expected_len) {
  ------------------
  |  Branch (1332:9): [True: 0, False: 0]
  ------------------
 1333|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_RENEGOTIATION_MISMATCH);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1334|      0|        return 0;
 1335|      0|    }
 1336|       |
 1337|      0|    if (!PACKET_get_bytes(pkt, &data, s->s3.previous_client_finished_len)
  ------------------
  |  Branch (1337:9): [True: 0, False: 0]
  ------------------
 1338|      0|        || memcmp(data, s->s3.previous_client_finished,
  ------------------
  |  Branch (1338:12): [True: 0, False: 0]
  ------------------
 1339|      0|               s->s3.previous_client_finished_len)
 1340|      0|            != 0) {
 1341|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_RENEGOTIATION_MISMATCH);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1342|      0|        return 0;
 1343|      0|    }
 1344|       |
 1345|      0|    if (!PACKET_get_bytes(pkt, &data, s->s3.previous_server_finished_len)
  ------------------
  |  Branch (1345:9): [True: 0, False: 0]
  ------------------
 1346|      0|        || memcmp(data, s->s3.previous_server_finished,
  ------------------
  |  Branch (1346:12): [True: 0, False: 0]
  ------------------
 1347|      0|               s->s3.previous_server_finished_len)
 1348|      0|            != 0) {
 1349|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_RENEGOTIATION_MISMATCH);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1350|      0|        return 0;
 1351|      0|    }
 1352|      0|    s->s3.send_connection_binding = 1;
 1353|       |
 1354|      0|    return 1;
 1355|      0|}
tls_parse_stoc_server_name:
 1400|      6|{
 1401|      6|    if (s->ext.hostname == NULL) {
  ------------------
  |  Branch (1401:9): [True: 0, False: 6]
  ------------------
 1402|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1403|      0|        return 0;
 1404|      0|    }
 1405|       |
 1406|      6|    if (PACKET_remaining(pkt) > 0) {
  ------------------
  |  Branch (1406:9): [True: 1, False: 5]
  ------------------
 1407|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1408|      1|        return 0;
 1409|      1|    }
 1410|       |
 1411|      5|    if (!s->hit) {
  ------------------
  |  Branch (1411:9): [True: 5, False: 0]
  ------------------
 1412|      5|        if (s->session->ext.hostname != NULL) {
  ------------------
  |  Branch (1412:13): [True: 0, False: 5]
  ------------------
 1413|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1414|      0|            return 0;
 1415|      0|        }
 1416|      5|        s->session->ext.hostname = OPENSSL_strdup(s->ext.hostname);
  ------------------
  |  |  135|      5|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1417|      5|        if (s->session->ext.hostname == NULL) {
  ------------------
  |  Branch (1417:13): [True: 0, False: 5]
  ------------------
 1418|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1419|      0|            return 0;
 1420|      0|        }
 1421|      5|    }
 1422|       |
 1423|      5|    return 1;
 1424|      5|}
tls_parse_stoc_ec_pt_formats:
 1429|      4|{
 1430|      4|    size_t ecpointformats_len;
 1431|      4|    PACKET ecptformatlist;
 1432|       |
 1433|      4|    if (!PACKET_as_length_prefixed_1(pkt, &ecptformatlist)) {
  ------------------
  |  Branch (1433:9): [True: 3, False: 1]
  ------------------
 1434|      3|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      3|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      3|    (ERR_new(),                                                  \
  |  |  |  |  151|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      3|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      3|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1435|      3|        return 0;
 1436|      3|    }
 1437|      1|    if (!s->hit) {
  ------------------
  |  Branch (1437:9): [True: 1, False: 0]
  ------------------
 1438|      1|        ecpointformats_len = PACKET_remaining(&ecptformatlist);
 1439|      1|        if (ecpointformats_len == 0) {
  ------------------
  |  Branch (1439:13): [True: 0, False: 1]
  ------------------
 1440|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1441|      0|            return 0;
 1442|      0|        }
 1443|       |
 1444|      1|        s->ext.peer_ecpointformats_len = 0;
 1445|      1|        OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1446|      1|        s->ext.peer_ecpointformats = OPENSSL_malloc(ecpointformats_len);
  ------------------
  |  |  106|      1|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1447|      1|        if (s->ext.peer_ecpointformats == NULL) {
  ------------------
  |  Branch (1447:13): [True: 0, False: 1]
  ------------------
 1448|      0|            s->ext.peer_ecpointformats_len = 0;
 1449|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1450|      0|            return 0;
 1451|      0|        }
 1452|       |
 1453|      1|        s->ext.peer_ecpointformats_len = ecpointformats_len;
 1454|       |
 1455|      1|        if (!PACKET_copy_bytes(&ecptformatlist,
  ------------------
  |  Branch (1455:13): [True: 0, False: 1]
  ------------------
 1456|      1|                s->ext.peer_ecpointformats,
 1457|      1|                ecpointformats_len)) {
 1458|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1459|      0|            return 0;
 1460|      0|        }
 1461|      1|    }
 1462|       |
 1463|      1|    return 1;
 1464|      1|}
tls_parse_stoc_sct:
 1529|      1|{
 1530|      1|    if (context == SSL_EXT_TLS1_3_CERTIFICATE_REQUEST) {
  ------------------
  |  |  307|      1|#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x04000
  ------------------
  |  Branch (1530:9): [True: 0, False: 1]
  ------------------
 1531|       |        /* We ignore this if the server sends it in a CertificateRequest */
 1532|      0|        return 1;
 1533|      0|    }
 1534|       |
 1535|       |    /*
 1536|       |     * Only take it if we asked for it - i.e if there is no CT validation
 1537|       |     * callback set, then a custom extension MAY be processing it, so we
 1538|       |     * need to let control continue to flow to that.
 1539|       |     */
 1540|      1|    if (s->ct_validation_callback != NULL) {
  ------------------
  |  Branch (1540:9): [True: 0, False: 1]
  ------------------
 1541|      0|        size_t size = PACKET_remaining(pkt);
 1542|       |
 1543|       |        /* Simply copy it off for later processing */
 1544|      0|        OPENSSL_free(s->ext.scts);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1545|      0|        s->ext.scts = NULL;
 1546|       |
 1547|      0|        s->ext.scts_len = (uint16_t)size;
 1548|      0|        if (size > 0) {
  ------------------
  |  Branch (1548:13): [True: 0, False: 0]
  ------------------
 1549|      0|            s->ext.scts = OPENSSL_malloc(size);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1550|      0|            if (s->ext.scts == NULL) {
  ------------------
  |  Branch (1550:17): [True: 0, False: 0]
  ------------------
 1551|      0|                s->ext.scts_len = 0;
 1552|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1553|      0|                return 0;
 1554|      0|            }
 1555|      0|            if (!PACKET_copy_bytes(pkt, s->ext.scts, size)) {
  ------------------
  |  Branch (1555:17): [True: 0, False: 0]
  ------------------
 1556|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1557|      0|                return 0;
 1558|      0|            }
 1559|      0|        }
 1560|      1|    } else {
 1561|      1|        ENDPOINT role = (context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0
  ------------------
  |  |  301|      1|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (1561:25): [True: 1, False: 0]
  ------------------
 1562|      1|            ? ENDPOINT_CLIENT
 1563|      1|            : ENDPOINT_BOTH;
 1564|       |
 1565|       |        /*
 1566|       |         * If we didn't ask for it then there must be a custom extension,
 1567|       |         * otherwise this is unsolicited.
 1568|       |         */
 1569|      1|        if (custom_ext_find(&s->cert->custext, role,
  ------------------
  |  Branch (1569:13): [True: 1, False: 0]
  ------------------
 1570|      1|                TLSEXT_TYPE_signed_certificate_timestamp,
  ------------------
  |  |  122|      1|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
 1571|      1|                NULL)
 1572|      1|            == NULL) {
 1573|      1|            SSLfatal(s, TLS1_AD_UNSUPPORTED_EXTENSION, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1574|      1|            return 0;
 1575|      1|        }
 1576|       |
 1577|      0|        if (!custom_ext_parse(s, context,
  ------------------
  |  Branch (1577:13): [True: 0, False: 0]
  ------------------
 1578|      0|                TLSEXT_TYPE_signed_certificate_timestamp,
  ------------------
  |  |  122|      0|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
 1579|      0|                PACKET_data(pkt), PACKET_remaining(pkt),
 1580|      0|                x, chainidx)) {
 1581|       |            /* SSLfatal already called */
 1582|      0|            return 0;
 1583|      0|        }
 1584|      0|    }
 1585|       |
 1586|      0|    return 1;
 1587|      1|}
tls_parse_stoc_alpn:
 1667|      7|{
 1668|      7|    size_t len;
 1669|      7|    PACKET confpkt, protpkt;
 1670|      7|    int valid = 0;
 1671|       |
 1672|       |    /* We must have requested it. */
 1673|      7|    if (!s->s3.alpn_sent) {
  ------------------
  |  Branch (1673:9): [True: 0, False: 7]
  ------------------
 1674|      0|        SSLfatal(s, SSL_AD_UNSUPPORTED_EXTENSION, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1675|      0|        return 0;
 1676|      0|    }
 1677|       |    /*-
 1678|       |     * The extension data consists of:
 1679|       |     *   uint16 list_length
 1680|       |     *   uint8 proto_length;
 1681|       |     *   uint8 proto[proto_length];
 1682|       |     */
 1683|      7|    if (!PACKET_get_net_2_len(pkt, &len)
  ------------------
  |  Branch (1683:9): [True: 1, False: 6]
  ------------------
 1684|      6|        || PACKET_remaining(pkt) != len || !PACKET_get_1_len(pkt, &len)
  ------------------
  |  Branch (1684:12): [True: 2, False: 4]
  |  Branch (1684:44): [True: 1, False: 3]
  ------------------
 1685|      5|        || PACKET_remaining(pkt) != len) {
  ------------------
  |  Branch (1685:12): [True: 1, False: 2]
  ------------------
 1686|      5|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      5|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      5|    (ERR_new(),                                                  \
  |  |  |  |  151|      5|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      5|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      5|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1687|      5|        return 0;
 1688|      5|    }
 1689|       |
 1690|       |    /* It must be a protocol that we sent */
 1691|      2|    if (!PACKET_buf_init(&confpkt, s->ext.alpn, s->ext.alpn_len)) {
  ------------------
  |  Branch (1691:9): [True: 0, False: 2]
  ------------------
 1692|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1693|      0|        return 0;
 1694|      0|    }
 1695|      5|    while (PACKET_get_length_prefixed_1(&confpkt, &protpkt)) {
  ------------------
  |  Branch (1695:12): [True: 3, False: 2]
  ------------------
 1696|      3|        if (PACKET_remaining(&protpkt) != len)
  ------------------
  |  Branch (1696:13): [True: 3, False: 0]
  ------------------
 1697|      3|            continue;
 1698|      0|        if (memcmp(PACKET_data(pkt), PACKET_data(&protpkt), len) == 0) {
  ------------------
  |  Branch (1698:13): [True: 0, False: 0]
  ------------------
 1699|       |            /* Valid protocol found */
 1700|      0|            valid = 1;
 1701|      0|            break;
 1702|      0|        }
 1703|      0|    }
 1704|       |
 1705|      2|    if (!valid) {
  ------------------
  |  Branch (1705:9): [True: 2, False: 0]
  ------------------
 1706|       |        /* The protocol sent from the server does not match one we advertised */
 1707|      2|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      2|    (ERR_new(),                                                  \
  |  |  |  |  151|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1708|      2|        return 0;
 1709|      2|    }
 1710|       |
 1711|      0|    OPENSSL_free(s->s3.alpn_selected);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1712|      0|    s->s3.alpn_selected = OPENSSL_malloc(len);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1713|      0|    if (s->s3.alpn_selected == NULL) {
  ------------------
  |  Branch (1713:9): [True: 0, False: 0]
  ------------------
 1714|      0|        s->s3.alpn_selected_len = 0;
 1715|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1716|      0|        return 0;
 1717|      0|    }
 1718|      0|    if (!PACKET_copy_bytes(pkt, s->s3.alpn_selected, len)) {
  ------------------
  |  Branch (1718:9): [True: 0, False: 0]
  ------------------
 1719|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1720|      0|        return 0;
 1721|      0|    }
 1722|      0|    s->s3.alpn_selected_len = len;
 1723|       |
 1724|      0|    if (s->session->ext.alpn_selected == NULL
  ------------------
  |  Branch (1724:9): [True: 0, False: 0]
  ------------------
 1725|      0|        || s->session->ext.alpn_selected_len != len
  ------------------
  |  Branch (1725:12): [True: 0, False: 0]
  ------------------
 1726|      0|        || memcmp(s->session->ext.alpn_selected, s->s3.alpn_selected, len)
  ------------------
  |  Branch (1726:12): [True: 0, False: 0]
  ------------------
 1727|      0|            != 0) {
 1728|       |        /* ALPN not consistent with the old session so cannot use early_data */
 1729|      0|        s->ext.early_data_ok = 0;
 1730|      0|    }
 1731|      0|    if (!s->hit) {
  ------------------
  |  Branch (1731:9): [True: 0, False: 0]
  ------------------
 1732|       |        /*
 1733|       |         * This is a new session and so alpn_selected should have been
 1734|       |         * initialised to NULL. We should update it with the selected ALPN.
 1735|       |         */
 1736|      0|        if (!ossl_assert(s->session->ext.alpn_selected == NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (1736:13): [True: 0, False: 0]
  ------------------
 1737|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1738|      0|            return 0;
 1739|      0|        }
 1740|      0|        s->session->ext.alpn_selected = OPENSSL_memdup(s->s3.alpn_selected, s->s3.alpn_selected_len);
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1741|      0|        if (s->session->ext.alpn_selected == NULL) {
  ------------------
  |  Branch (1741:13): [True: 0, False: 0]
  ------------------
 1742|      0|            s->session->ext.alpn_selected_len = 0;
 1743|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1744|      0|            return 0;
 1745|      0|        }
 1746|      0|        s->session->ext.alpn_selected_len = s->s3.alpn_selected_len;
 1747|      0|    }
 1748|       |
 1749|      0|    return 1;
 1750|      0|}
tls_parse_stoc_etm:
 1804|      3|{
 1805|       |    /* Ignore if inappropriate ciphersuite */
 1806|      3|    if (!(s->options & SSL_OP_NO_ENCRYPT_THEN_MAC)
  ------------------
  |  |  398|      3|#define SSL_OP_NO_ENCRYPT_THEN_MAC SSL_OP_BIT(19)
  |  |  ------------------
  |  |  |  |  350|      3|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1806:9): [True: 3, False: 0]
  ------------------
 1807|      3|        && s->s3.tmp.new_cipher->algorithm_mac != SSL_AEAD
  ------------------
  |  |  175|      6|#define SSL_AEAD 0x00000040U
  ------------------
  |  Branch (1807:12): [True: 1, False: 2]
  ------------------
 1808|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_RC4
  ------------------
  |  |  132|      4|#define SSL_RC4 0x00000004U
  ------------------
  |  Branch (1808:12): [True: 1, False: 0]
  ------------------
 1809|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_eGOST2814789CNT
  ------------------
  |  |  140|      4|#define SSL_eGOST2814789CNT 0x00000400U
  ------------------
  |  Branch (1809:12): [True: 1, False: 0]
  ------------------
 1810|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_eGOST2814789CNT12
  ------------------
  |  |  148|      4|#define SSL_eGOST2814789CNT12 0x00040000U
  ------------------
  |  Branch (1810:12): [True: 1, False: 0]
  ------------------
 1811|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_MAGMA
  ------------------
  |  |  152|      4|#define SSL_MAGMA 0x00400000U
  ------------------
  |  Branch (1811:12): [True: 1, False: 0]
  ------------------
 1812|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_KUZNYECHIK)
  ------------------
  |  |  153|      1|#define SSL_KUZNYECHIK 0x00800000U
  ------------------
  |  Branch (1812:12): [True: 1, False: 0]
  ------------------
 1813|      1|        s->ext.use_etm = 1;
 1814|       |
 1815|      3|    return 1;
 1816|      3|}
tls_parse_stoc_ems:
 1820|      2|{
 1821|      2|    if (s->options & SSL_OP_NO_EXTENDED_MASTER_SECRET)
  ------------------
  |  |  356|      2|#define SSL_OP_NO_EXTENDED_MASTER_SECRET SSL_OP_BIT(0)
  |  |  ------------------
  |  |  |  |  350|      2|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1821:9): [True: 0, False: 2]
  ------------------
 1822|      0|        return 1;
 1823|      2|    s->s3.flags |= TLS1_FLAGS_RECEIVED_EXTMS;
  ------------------
  |  |  300|      2|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
 1824|      2|    if (!s->hit)
  ------------------
  |  Branch (1824:9): [True: 2, False: 0]
  ------------------
 1825|      2|        s->session->flags |= SSL_SESS_FLAG_EXTMS;
  ------------------
  |  |  567|      2|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
 1826|       |
 1827|      2|    return 1;
 1828|      2|}
tls_parse_stoc_supported_versions:
 1833|     10|{
 1834|     10|    unsigned int version;
 1835|       |
 1836|     10|    if (!PACKET_get_net_2(pkt, &version)
  ------------------
  |  Branch (1836:9): [True: 1, False: 9]
  ------------------
 1837|      9|        || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (1837:12): [True: 1, False: 8]
  ------------------
 1838|      2|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      2|    (ERR_new(),                                                  \
  |  |  |  |  151|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1839|      2|        return 0;
 1840|      2|    }
 1841|       |
 1842|       |    /*
 1843|       |     * The only protocol version we support which is valid in this extension in
 1844|       |     * a ServerHello is TLSv1.3 therefore we shouldn't be getting anything else.
 1845|       |     */
 1846|      8|    if (version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      8|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1846:9): [True: 8, False: 0]
  ------------------
 1847|      8|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      8|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      8|    (ERR_new(),                                                  \
  |  |  |  |  151|      8|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      8|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      8|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1848|      8|            SSL_R_BAD_PROTOCOL_VERSION_NUMBER);
 1849|      8|        return 0;
 1850|      8|    }
 1851|       |
 1852|       |    /* We ignore this extension for HRRs except to sanity check it */
 1853|      0|    if (context == SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)
  ------------------
  |  |  304|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (1853:9): [True: 0, False: 0]
  ------------------
 1854|      0|        return 1;
 1855|       |
 1856|       |    /* We just set it here. We validate it in ssl_choose_client_version */
 1857|      0|    s->version = version;
 1858|      0|    if (!ssl_set_record_protocol_version(s, version)) {
  ------------------
  |  Branch (1858:9): [True: 0, False: 0]
  ------------------
 1859|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1860|      0|        return 0;
 1861|      0|    }
 1862|       |
 1863|      0|    return 1;
 1864|      0|}
tls_construct_ctos_client_cert_type:
 2167|  1.83k|{
 2168|  1.83k|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  365|  1.83k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2169|  1.83k|    if (sc->client_cert_type == NULL)
  ------------------
  |  Branch (2169:9): [True: 1.83k, False: 0]
  ------------------
 2170|  1.83k|        return EXT_RETURN_NOT_SENT;
 2171|       |
 2172|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_client_cert_type)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2172:9): [True: 0, False: 0]
  ------------------
 2173|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2173:12): [True: 0, False: 0]
  ------------------
 2174|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->client_cert_type, sc->client_cert_type_len)
  ------------------
  |  |  918|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2174:12): [True: 0, False: 0]
  ------------------
 2175|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2175:12): [True: 0, False: 0]
  ------------------
 2176|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2177|      0|        return EXT_RETURN_FAIL;
 2178|      0|    }
 2179|      0|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  366|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2180|      0|    return EXT_RETURN_SENT;
 2181|      0|}
tls_construct_ctos_server_cert_type:
 2219|  1.83k|{
 2220|  1.83k|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  365|  1.83k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2221|  1.83k|    if (sc->server_cert_type == NULL)
  ------------------
  |  Branch (2221:9): [True: 1.83k, False: 0]
  ------------------
 2222|  1.83k|        return EXT_RETURN_NOT_SENT;
 2223|       |
 2224|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_cert_type)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2224:9): [True: 0, False: 0]
  ------------------
 2225|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2225:12): [True: 0, False: 0]
  ------------------
 2226|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->server_cert_type, sc->server_cert_type_len)
  ------------------
  |  |  918|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2226:12): [True: 0, False: 0]
  ------------------
 2227|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2227:12): [True: 0, False: 0]
  ------------------
 2228|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2229|      0|        return EXT_RETURN_FAIL;
 2230|      0|    }
 2231|      0|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  366|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2232|      0|    return EXT_RETURN_SENT;
 2233|      0|}
extensions_clnt.c:use_ecc:
  140|  3.77k|{
  141|  3.77k|    int i, end, ret = 0;
  142|  3.77k|    unsigned long alg_k, alg_a;
  143|  3.77k|    STACK_OF(SSL_CIPHER) *cipher_stack = NULL;
  ------------------
  |  |   33|  3.77k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  144|  3.77k|    const uint16_t *pgroups = NULL;
  145|  3.77k|    size_t num_groups, j;
  146|  3.77k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.77k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  147|       |
  148|       |    /* See if we support any ECC ciphersuites */
  149|  3.77k|    if (s->version == SSL3_VERSION)
  ------------------
  |  |   23|  3.77k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (149:9): [True: 0, False: 3.77k]
  ------------------
  150|      0|        return 0;
  151|       |
  152|  3.77k|    cipher_stack = SSL_get1_supported_ciphers(ssl);
  153|  3.77k|    end = sk_SSL_CIPHER_num(cipher_stack);
  ------------------
  |  | 1005|  3.77k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  154|  3.87k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (154:17): [True: 3.86k, False: 8]
  ------------------
  155|  3.86k|        const SSL_CIPHER *c = sk_SSL_CIPHER_value(cipher_stack, i);
  ------------------
  |  | 1006|  3.86k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  156|       |
  157|  3.86k|        alg_k = c->algorithm_mkey;
  158|  3.86k|        alg_a = c->algorithm_auth;
  159|  3.86k|        if ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   85|  3.86k|#define SSL_kECDHE 0x00000004U
  ------------------
                      if ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   94|  3.86k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (159:13): [True: 20, False: 3.84k]
  ------------------
  160|  3.84k|            || (alg_a & SSL_aECDSA)
  ------------------
  |  |  114|  3.84k|#define SSL_aECDSA 0x00000008U
  ------------------
  |  Branch (160:16): [True: 0, False: 3.84k]
  ------------------
  161|  3.84k|            || c->min_tls >= TLS1_3_VERSION) {
  ------------------
  |  |   27|  3.84k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (161:16): [True: 3.74k, False: 100]
  ------------------
  162|  3.76k|            ret = 1;
  163|  3.76k|            break;
  164|  3.76k|        }
  165|  3.86k|    }
  166|  3.77k|    sk_SSL_CIPHER_free(cipher_stack);
  ------------------
  |  | 1011|  3.77k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
  167|  3.77k|    if (!ret)
  ------------------
  |  Branch (167:9): [True: 8, False: 3.76k]
  ------------------
  168|      8|        return 0;
  169|       |
  170|       |    /* Check we have at least one EC supported group */
  171|  3.76k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  172|  6.85k|    for (j = 0; j < num_groups; j++) {
  ------------------
  |  Branch (172:17): [True: 6.59k, False: 254]
  ------------------
  173|  6.59k|        uint16_t ctmp = pgroups[j];
  174|       |
  175|  6.59k|        if (tls_valid_group(s, ctmp, min_version, max_version, 1, NULL)
  ------------------
  |  Branch (175:13): [True: 3.56k, False: 3.03k]
  ------------------
  176|  3.56k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2758|  3.56k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2739|  3.56k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (176:16): [True: 3.50k, False: 58]
  ------------------
  177|  3.50k|            return 1;
  178|  6.59k|    }
  179|       |
  180|    254|    return 0;
  181|  3.76k|}
extensions_clnt.c:add_key_share:
  641|  3.56k|{
  642|  3.56k|    unsigned char *encoded_pubkey = NULL;
  643|  3.56k|    EVP_PKEY *key_share_key = NULL;
  644|  3.56k|    size_t encodedlen;
  645|       |
  646|  3.56k|    if (loop_num < s->s3.tmp.num_ks_pkey) {
  ------------------
  |  Branch (646:9): [True: 0, False: 3.56k]
  ------------------
  647|      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 (647:13): [True: 0, False: 0]
  ------------------
  648|      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 (648:16): [True: 0, False: 0]
  ------------------
  649|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  650|      0|            return 0;
  651|      0|        }
  652|       |        /*
  653|       |         * Could happen if we got an HRR that wasn't requesting a new key_share
  654|       |         */
  655|      0|        key_share_key = s->s3.tmp.ks_pkey[loop_num];
  656|  3.56k|    } else {
  657|  3.56k|        key_share_key = ssl_generate_pkey_group(s, group_id);
  658|  3.56k|        if (key_share_key == NULL) {
  ------------------
  |  Branch (658:13): [True: 0, False: 3.56k]
  ------------------
  659|       |            /* SSLfatal() already called */
  660|      0|            return 0;
  661|      0|        }
  662|  3.56k|    }
  663|       |
  664|       |    /* Encode the public key. */
  665|  3.56k|    encodedlen = EVP_PKEY_get1_encoded_public_key(key_share_key,
  666|  3.56k|        &encoded_pubkey);
  667|  3.56k|    if (encodedlen == 0) {
  ------------------
  |  Branch (667:9): [True: 0, False: 3.56k]
  ------------------
  668|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EC_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  669|      0|        goto err;
  670|      0|    }
  671|       |
  672|       |    /* Create KeyShareEntry */
  673|  3.56k|    if (!WPACKET_put_bytes_u16(pkt, group_id)
  ------------------
  |  |  891|  7.12k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (673:9): [True: 0, False: 3.56k]
  ------------------
  674|  3.56k|        || !WPACKET_sub_memcpy_u16(pkt, encoded_pubkey, encodedlen)) {
  ------------------
  |  |  920|  3.56k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (674:12): [True: 0, False: 3.56k]
  ------------------
  675|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  676|      0|        goto err;
  677|      0|    }
  678|       |
  679|       |    /* For backward compatibility, we use the first valid group to add a key share */
  680|  3.56k|    if (loop_num == 0) {
  ------------------
  |  Branch (680:9): [True: 1.81k, False: 1.74k]
  ------------------
  681|  1.81k|        s->s3.tmp.pkey = key_share_key;
  682|  1.81k|        s->s3.group_id = group_id;
  683|  1.81k|    }
  684|       |    /* We ensure in t1_lib.c that the loop number does not exceed OPENSSL_CLIENT_MAX_KEY_SHARES */
  685|  3.56k|    s->s3.tmp.ks_pkey[loop_num] = key_share_key;
  686|  3.56k|    s->s3.tmp.ks_group_id[loop_num] = group_id;
  687|  3.56k|    if (loop_num >= s->s3.tmp.num_ks_pkey)
  ------------------
  |  Branch (687:9): [True: 3.56k, False: 0]
  ------------------
  688|  3.56k|        s->s3.tmp.num_ks_pkey++;
  689|       |
  690|  3.56k|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  131|  3.56k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  691|       |
  692|  3.56k|    return 1;
  693|      0|err:
  694|      0|    if (key_share_key != s->s3.tmp.ks_pkey[loop_num])
  ------------------
  |  Branch (694:9): [True: 0, False: 0]
  ------------------
  695|      0|        EVP_PKEY_free(key_share_key);
  696|      0|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  697|      0|    return 0;
  698|  3.56k|}

custom_ext_find:
   84|    103|{
   85|    103|    size_t i;
   86|    103|    custom_ext_method *meth = exts->meths;
   87|       |
   88|    103|    for (i = 0; i < exts->meths_count; i++, meth++) {
  ------------------
  |  Branch (88:17): [True: 0, False: 103]
  ------------------
   89|      0|        if (ext_type == meth->ext_type
  ------------------
  |  Branch (89:13): [True: 0, False: 0]
  ------------------
   90|      0|            && (role == ENDPOINT_BOTH || role == meth->role
  ------------------
  |  Branch (90:17): [True: 0, False: 0]
  |  Branch (90:42): [True: 0, False: 0]
  ------------------
   91|      0|                || meth->role == ENDPOINT_BOTH)) {
  ------------------
  |  Branch (91:20): [True: 0, False: 0]
  ------------------
   92|      0|            if (idx != NULL)
  ------------------
  |  Branch (92:17): [True: 0, False: 0]
  ------------------
   93|      0|                *idx = i;
   94|      0|            return meth;
   95|      0|        }
   96|      0|    }
   97|    103|    return NULL;
   98|    103|}
custom_ext_init:
  104|  1.88k|{
  105|  1.88k|    size_t i;
  106|  1.88k|    custom_ext_method *meth = exts->meths;
  107|       |
  108|  1.88k|    for (i = 0; i < exts->meths_count; i++, meth++)
  ------------------
  |  Branch (108:17): [True: 0, False: 1.88k]
  ------------------
  109|      0|        meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED);
  ------------------
  |  | 2068|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
                      meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED);
  ------------------
  |  | 2063|      0|#define SSL_EXT_FLAG_RECEIVED 0x1
  ------------------
  110|  1.88k|}
custom_ext_parse:
  117|      3|{
  118|      3|    int al = 0;
  119|      3|    custom_ext_methods *exts = &s->cert->custext;
  120|      3|    custom_ext_method *meth;
  121|      3|    ENDPOINT role = ENDPOINT_BOTH;
  122|       |
  123|      3|    if ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0)
  ------------------
  |  |  299|      3|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                  if ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0)
  ------------------
  |  |  301|      3|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (123:9): [True: 3, False: 0]
  ------------------
  124|      3|        role = s->server ? ENDPOINT_SERVER : ENDPOINT_CLIENT;
  ------------------
  |  Branch (124:16): [True: 0, False: 3]
  ------------------
  125|       |
  126|      3|    meth = custom_ext_find(exts, role, ext_type, NULL);
  127|       |    /* If not found return success */
  128|      3|    if (!meth)
  ------------------
  |  Branch (128:9): [True: 3, False: 0]
  ------------------
  129|      3|        return 1;
  130|       |
  131|       |    /* Check if extension is defined for our protocol. If not, skip */
  132|      0|    if (!extension_is_relevant(s, meth->context, context))
  ------------------
  |  Branch (132:9): [True: 0, False: 0]
  ------------------
  133|      0|        return 1;
  134|       |
  135|      0|    if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS)) != 0) {
  ------------------
  |  |  301|      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)) != 0) {
  ------------------
  |  |  302|      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)) != 0) {
  ------------------
  |  |  303|      0|#define SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS 0x00400
  ------------------
  |  Branch (135:9): [True: 0, False: 0]
  ------------------
  136|       |        /*
  137|       |         * If it's ServerHello or EncryptedExtensions we can't have any
  138|       |         * extensions not sent in ClientHello.
  139|       |         */
  140|      0|        if ((meth->ext_flags & SSL_EXT_FLAG_SENT) == 0) {
  ------------------
  |  | 2068|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  |  Branch (140:13): [True: 0, False: 0]
  ------------------
  141|      0|            SSLfatal(s, TLS1_AD_UNSUPPORTED_EXTENSION, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  142|      0|            return 0;
  143|      0|        }
  144|      0|    }
  145|       |
  146|       |    /*
  147|       |     * Extensions received in the ClientHello or CertificateRequest are marked
  148|       |     * with the SSL_EXT_FLAG_RECEIVED. This is so we know to add the equivalent
  149|       |     * extensions in the response messages
  150|       |     */
  151|      0|    if ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST))
  ------------------
  |  |  299|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                  if ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST))
  ------------------
  |  |  307|      0|#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x04000
  ------------------
  |  Branch (151:9): [True: 0, False: 0]
  ------------------
  152|      0|        != 0)
  153|      0|        meth->ext_flags |= SSL_EXT_FLAG_RECEIVED;
  ------------------
  |  | 2063|      0|#define SSL_EXT_FLAG_RECEIVED 0x1
  ------------------
  154|       |
  155|       |    /* If no parse function set return success */
  156|      0|    if (meth->parse_cb == NULL)
  ------------------
  |  Branch (156:9): [True: 0, False: 0]
  ------------------
  157|      0|        return 1;
  158|       |
  159|      0|    if (meth->parse_cb(SSL_CONNECTION_GET_USER_SSL(s), ext_type, context, ext_data,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  |  Branch (159:9): [True: 0, False: 0]
  ------------------
  160|      0|            ext_size, x, chainidx, &al, meth->parse_arg)
  161|      0|        <= 0) {
  162|      0|        SSLfatal(s, al, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  163|      0|        return 0;
  164|      0|    }
  165|       |
  166|      0|    return 1;
  167|      0|}
custom_ext_add:
  175|  1.88k|{
  176|  1.88k|    custom_ext_methods *exts = &s->cert->custext;
  177|  1.88k|    custom_ext_method *meth;
  178|  1.88k|    size_t i;
  179|  1.88k|    int al;
  180|  1.88k|    int for_comp = (context & SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION) != 0;
  ------------------
  |  |  308|  1.88k|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
  181|       |
  182|  1.88k|    for (i = 0; i < exts->meths_count; i++) {
  ------------------
  |  Branch (182:17): [True: 0, False: 1.88k]
  ------------------
  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) {
  ------------------
  |  |  301|      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) {
  ------------------
  |  |  302|      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) {
  ------------------
  |  |  303|      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) {
  ------------------
  |  |  305|      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) {
  ------------------
  |  |  310|      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) {
  ------------------
  |  |  304|      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))
  ------------------
  |  | 2063|      0|#define SSL_EXT_FLAG_RECEIVED 0x1
  ------------------
  |  Branch (193:17): [True: 0, False: 0]
  ------------------
  194|      0|                continue;
  195|      0|        }
  196|       |        /*
  197|       |         * We skip it if the callback is absent - except for a ClientHello where
  198|       |         * we add an empty extension.
  199|       |         */
  200|      0|        if ((context & SSL_EXT_CLIENT_HELLO) == 0 && meth->add_cb == NULL)
  ------------------
  |  |  299|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (200:13): [True: 0, False: 0]
  |  Branch (200:54): [True: 0, False: 0]
  ------------------
  201|      0|            continue;
  202|       |
  203|      0|        if (meth->add_cb != NULL) {
  ------------------
  |  Branch (203:13): [True: 0, False: 0]
  ------------------
  204|      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)
  ------------------
  205|      0|                meth->ext_type, context, &out,
  206|      0|                &outlen, x, chainidx, &al,
  207|      0|                meth->add_arg);
  208|       |
  209|      0|            if (cb_retval < 0) {
  ------------------
  |  Branch (209:17): [True: 0, False: 0]
  ------------------
  210|      0|                if (!for_comp)
  ------------------
  |  Branch (210:21): [True: 0, False: 0]
  ------------------
  211|      0|                    SSLfatal(s, al, SSL_R_CALLBACK_FAILED);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  212|      0|                return 0; /* error */
  213|      0|            }
  214|      0|            if (cb_retval == 0)
  ------------------
  |  Branch (214:17): [True: 0, False: 0]
  ------------------
  215|      0|                continue; /* skip this extension */
  216|      0|        }
  217|       |
  218|      0|        if (!WPACKET_put_bytes_u16(pkt, meth->ext_type)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (218:13): [True: 0, False: 0]
  ------------------
  219|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (219:16): [True: 0, False: 0]
  ------------------
  220|      0|            || (outlen > 0 && !WPACKET_memcpy(pkt, out, outlen))
  ------------------
  |  Branch (220:17): [True: 0, False: 0]
  |  Branch (220:31): [True: 0, False: 0]
  ------------------
  221|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (221:16): [True: 0, False: 0]
  ------------------
  222|      0|            if (meth->free_cb != NULL)
  ------------------
  |  Branch (222:17): [True: 0, False: 0]
  ------------------
  223|      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)
  ------------------
  224|      0|                    context, out, meth->add_arg);
  225|      0|            if (!for_comp)
  ------------------
  |  Branch (225:17): [True: 0, False: 0]
  ------------------
  226|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  227|      0|            return 0;
  228|      0|        }
  229|      0|        if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  299|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (229:13): [True: 0, False: 0]
  ------------------
  230|       |            /*
  231|       |             * We can't send duplicates: code logic should prevent this.
  232|       |             */
  233|      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 (233:17): [True: 0, False: 0]
  ------------------
  234|      0|                if (meth->free_cb != NULL)
  ------------------
  |  Branch (234:21): [True: 0, False: 0]
  ------------------
  235|      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)
  ------------------
  236|      0|                        context, out, meth->add_arg);
  237|      0|                if (!for_comp)
  ------------------
  |  Branch (237:21): [True: 0, False: 0]
  ------------------
  238|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  239|      0|                return 0;
  240|      0|            }
  241|       |            /*
  242|       |             * Indicate extension has been sent: this is both a sanity check to
  243|       |             * ensure we don't send duplicate extensions and indicates that it
  244|       |             * is not an error if the extension is present in ServerHello.
  245|       |             */
  246|      0|            meth->ext_flags |= SSL_EXT_FLAG_SENT;
  ------------------
  |  | 2068|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  247|      0|        }
  248|      0|        if (meth->free_cb != NULL)
  ------------------
  |  Branch (248:13): [True: 0, False: 0]
  ------------------
  249|      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)
  ------------------
  250|      0|                context, out, meth->add_arg);
  251|      0|    }
  252|  1.88k|    return 1;
  253|  1.88k|}
custom_exts_copy:
  302|  1.95k|{
  303|  1.95k|    size_t i;
  304|  1.95k|    int err = 0;
  305|       |
  306|  1.95k|    if (src->meths_count > 0) {
  ------------------
  |  Branch (306:9): [True: 0, False: 1.95k]
  ------------------
  307|      0|        dst->meths = OPENSSL_memdup(src->meths,
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  308|      0|            sizeof(*src->meths) * src->meths_count);
  309|      0|        if (dst->meths == NULL)
  ------------------
  |  Branch (309:13): [True: 0, False: 0]
  ------------------
  310|      0|            return 0;
  311|      0|        dst->meths_count = src->meths_count;
  312|       |
  313|      0|        for (i = 0; i < src->meths_count; i++)
  ------------------
  |  Branch (313:21): [True: 0, False: 0]
  ------------------
  314|      0|            custom_ext_copy_old_cb(&dst->meths[i], &src->meths[i], &err);
  315|      0|    }
  316|       |
  317|  1.95k|    if (err) {
  ------------------
  |  Branch (317:9): [True: 0, False: 1.95k]
  ------------------
  318|      0|        custom_exts_free(dst);
  319|      0|        return 0;
  320|      0|    }
  321|       |
  322|  1.95k|    return 1;
  323|  1.95k|}
custom_exts_free:
  376|  4.74k|{
  377|  4.74k|    size_t i;
  378|  4.74k|    custom_ext_method *meth;
  379|       |
  380|  4.74k|    for (i = 0, meth = exts->meths; i < exts->meths_count; i++, meth++) {
  ------------------
  |  Branch (380:37): [True: 0, False: 4.74k]
  ------------------
  381|      0|        if (meth->add_cb != custom_ext_add_old_cb_wrap)
  ------------------
  |  Branch (381:13): [True: 0, False: 0]
  ------------------
  382|      0|            continue;
  383|       |
  384|       |        /* Old style API wrapper. Need to free the arguments too */
  385|      0|        OPENSSL_free(meth->add_arg);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  386|      0|        OPENSSL_free(meth->parse_arg);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  387|      0|    }
  388|  4.74k|    OPENSSL_free(exts->meths);
  ------------------
  |  |  131|  4.74k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|       |    exts->meths = NULL;
  390|  4.74k|    exts->meths_count = 0;
  391|  4.74k|}

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

ossl_statem_client_read_transition:
  232|    211|{
  233|    211|    OSSL_STATEM *st = &s->statem;
  234|    211|    int ske_expected;
  235|       |
  236|       |    /*
  237|       |     * Note that after writing the first ClientHello we don't know what version
  238|       |     * we are going to negotiate yet, so we don't take this branch until later.
  239|       |     */
  240|    211|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|    211|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|    422|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    211|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|    211|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 211, False: 0]
  |  |  ------------------
  |  |  266|    211|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    211|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    422|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 211, False: 0]
  |  |  ------------------
  |  |  267|    211|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|    211|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|    211|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  241|      0|        if (!ossl_statem_client13_read_transition(s, mt))
  ------------------
  |  Branch (241:13): [True: 0, False: 0]
  ------------------
  242|      0|            goto err;
  243|      0|        return 1;
  244|      0|    }
  245|       |
  246|    211|    switch (st->hand_state) {
  247|      0|    default:
  ------------------
  |  Branch (247:5): [True: 0, False: 211]
  ------------------
  248|      0|        break;
  249|       |
  250|    211|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (250:5): [True: 211, False: 0]
  ------------------
  251|    211|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|    211|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (251:13): [True: 199, False: 12]
  ------------------
  252|    199|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  253|    199|            return 1;
  254|    199|        }
  255|       |
  256|     12|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|     12|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|     12|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|     12|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 12]
  |  |  ------------------
  ------------------
  257|      0|            if (mt == DTLS1_MT_HELLO_VERIFY_REQUEST) {
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
  |  Branch (257:17): [True: 0, False: 0]
  ------------------
  258|      0|                st->hand_state = DTLS_ST_CR_HELLO_VERIFY_REQUEST;
  259|      0|                return 1;
  260|      0|            }
  261|      0|        }
  262|     12|        break;
  263|       |
  264|     12|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (264:5): [True: 0, False: 211]
  ------------------
  265|       |        /*
  266|       |         * We've not actually selected TLSv1.3 yet, but we have sent early
  267|       |         * data. The only thing allowed now is a ServerHello or a
  268|       |         * HelloRetryRequest.
  269|       |         */
  270|      0|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|      0|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (270:13): [True: 0, False: 0]
  ------------------
  271|      0|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  272|      0|            return 1;
  273|      0|        }
  274|      0|        break;
  275|       |
  276|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (276:5): [True: 0, False: 211]
  ------------------
  277|      0|        if (s->hit) {
  ------------------
  |  Branch (277:13): [True: 0, False: 0]
  ------------------
  278|      0|            if (s->ext.ticket_expected) {
  ------------------
  |  Branch (278:17): [True: 0, False: 0]
  ------------------
  279|      0|                if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (279:21): [True: 0, False: 0]
  ------------------
  280|      0|                    st->hand_state = TLS_ST_CR_SESSION_TICKET;
  281|      0|                    return 1;
  282|      0|                }
  283|      0|            } else if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (283:24): [True: 0, False: 0]
  ------------------
  284|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  285|      0|                return 1;
  286|      0|            }
  287|      0|        } else {
  288|      0|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      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)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  289|      0|                && mt == DTLS1_MT_HELLO_VERIFY_REQUEST) {
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
  |  Branch (289:20): [True: 0, False: 0]
  ------------------
  290|      0|                st->hand_state = DTLS_ST_CR_HELLO_VERIFY_REQUEST;
  291|      0|                return 1;
  292|      0|            } else if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (292:24): [True: 0, False: 0]
  ------------------
  293|      0|                && s->ext.session_secret_cb != NULL
  ------------------
  |  Branch (293:20): [True: 0, False: 0]
  ------------------
  294|      0|                && s->session->ext.tick != NULL
  ------------------
  |  Branch (294:20): [True: 0, False: 0]
  ------------------
  295|      0|                && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (295:20): [True: 0, False: 0]
  ------------------
  296|       |                /*
  297|       |                 * Normally, we can tell if the server is resuming the session
  298|       |                 * from the session ID. EAP-FAST (RFC 4851), however, relies on
  299|       |                 * the next server message after the ServerHello to determine if
  300|       |                 * the server is resuming.
  301|       |                 */
  302|      0|                s->hit = 1;
  303|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  304|      0|                return 1;
  305|      0|            } else if (!(s->s3.tmp.new_cipher->algorithm_auth
  ------------------
  |  Branch (305:24): [True: 0, False: 0]
  ------------------
  306|      0|                           & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  112|      0|#define SSL_aNULL 0x00000004U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  120|      0|#define SSL_aSRP 0x00000040U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  116|      0|#define SSL_aPSK 0x00000010U
  ------------------
  307|      0|                if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (307:21): [True: 0, False: 0]
  ------------------
  308|      0|                    st->hand_state = TLS_ST_CR_CERT;
  309|      0|                    return 1;
  310|      0|                }
  311|      0|            } else {
  312|      0|                ske_expected = key_exchange_expected(s);
  313|       |                /* SKE is optional for some PSK ciphersuites */
  314|      0|                if (ske_expected
  ------------------
  |  Branch (314:21): [True: 0, False: 0]
  ------------------
  315|      0|                    || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK)
  ------------------
  |  |  101|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   87|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   93|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   94|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   95|      0|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
  |  Branch (315:25): [True: 0, False: 0]
  ------------------
  316|      0|                        && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (316:28): [True: 0, False: 0]
  ------------------
  317|      0|                    if (mt == SSL3_MT_SERVER_KEY_EXCHANGE) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (317:25): [True: 0, False: 0]
  ------------------
  318|      0|                        st->hand_state = TLS_ST_CR_KEY_EXCH;
  319|      0|                        return 1;
  320|      0|                    }
  321|      0|                } else if (mt == SSL3_MT_CERTIFICATE_REQUEST
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (321:28): [True: 0, False: 0]
  ------------------
  322|      0|                    && cert_req_allowed(s)) {
  ------------------
  |  Branch (322:24): [True: 0, False: 0]
  ------------------
  323|      0|                    st->hand_state = TLS_ST_CR_CERT_REQ;
  324|      0|                    return 1;
  325|      0|                } else if (mt == SSL3_MT_SERVER_DONE) {
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
  |  Branch (325:28): [True: 0, False: 0]
  ------------------
  326|      0|                    st->hand_state = TLS_ST_CR_SRVR_DONE;
  327|      0|                    return 1;
  328|      0|                }
  329|      0|            }
  330|      0|        }
  331|      0|        break;
  332|       |
  333|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (333:5): [True: 0, False: 211]
  ------------------
  334|      0|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (334:5): [True: 0, False: 211]
  ------------------
  335|       |        /*
  336|       |         * The CertificateStatus message is optional even if
  337|       |         * |ext.status_expected| is set
  338|       |         */
  339|      0|        if (s->ext.status_expected && mt == SSL3_MT_CERTIFICATE_STATUS) {
  ------------------
  |  |  326|      0|#define SSL3_MT_CERTIFICATE_STATUS 22
  ------------------
  |  Branch (339:13): [True: 0, False: 0]
  |  Branch (339:39): [True: 0, False: 0]
  ------------------
  340|      0|            st->hand_state = TLS_ST_CR_CERT_STATUS;
  341|      0|            return 1;
  342|      0|        }
  343|       |        /* Fall through */
  344|       |
  345|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (345:5): [True: 0, False: 211]
  ------------------
  346|      0|        ske_expected = key_exchange_expected(s);
  347|       |        /* SKE is optional for some PSK ciphersuites */
  348|      0|        if (ske_expected || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK) && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  101|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   87|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   93|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   94|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   95|      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 (348:13): [True: 0, False: 0]
  |  Branch (348:30): [True: 0, False: 0]
  |  Branch (348:82): [True: 0, False: 0]
  ------------------
  349|      0|            if (mt == SSL3_MT_SERVER_KEY_EXCHANGE) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (349:17): [True: 0, False: 0]
  ------------------
  350|      0|                st->hand_state = TLS_ST_CR_KEY_EXCH;
  351|      0|                return 1;
  352|      0|            }
  353|      0|            goto err;
  354|      0|        }
  355|       |        /* Fall through */
  356|       |
  357|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (357:5): [True: 0, False: 211]
  ------------------
  358|      0|        if (mt == SSL3_MT_CERTIFICATE_REQUEST) {
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (358:13): [True: 0, False: 0]
  ------------------
  359|      0|            if (cert_req_allowed(s)) {
  ------------------
  |  Branch (359:17): [True: 0, False: 0]
  ------------------
  360|      0|                st->hand_state = TLS_ST_CR_CERT_REQ;
  361|      0|                return 1;
  362|      0|            }
  363|      0|            goto err;
  364|      0|        }
  365|       |        /* Fall through */
  366|       |
  367|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (367:5): [True: 0, False: 211]
  ------------------
  368|      0|        if (mt == SSL3_MT_SERVER_DONE) {
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
  |  Branch (368:13): [True: 0, False: 0]
  ------------------
  369|      0|            st->hand_state = TLS_ST_CR_SRVR_DONE;
  370|      0|            return 1;
  371|      0|        }
  372|      0|        break;
  373|       |
  374|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (374:5): [True: 0, False: 211]
  ------------------
  375|      0|        if (s->ext.ticket_expected) {
  ------------------
  |  Branch (375:13): [True: 0, False: 0]
  ------------------
  376|      0|            if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (376:17): [True: 0, False: 0]
  ------------------
  377|      0|                st->hand_state = TLS_ST_CR_SESSION_TICKET;
  378|      0|                return 1;
  379|      0|            }
  380|      0|        } else if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (380:20): [True: 0, False: 0]
  ------------------
  381|      0|            st->hand_state = TLS_ST_CR_CHANGE;
  382|      0|            return 1;
  383|      0|        }
  384|      0|        break;
  385|       |
  386|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (386:5): [True: 0, False: 211]
  ------------------
  387|      0|        if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  ------------------
  388|      0|            st->hand_state = TLS_ST_CR_CHANGE;
  389|      0|            return 1;
  390|      0|        }
  391|      0|        break;
  392|       |
  393|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (393:5): [True: 0, False: 211]
  ------------------
  394|      0|        if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (394:13): [True: 0, False: 0]
  ------------------
  395|      0|            st->hand_state = TLS_ST_CR_FINISHED;
  396|      0|            return 1;
  397|      0|        }
  398|      0|        break;
  399|       |
  400|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (400:5): [True: 0, False: 211]
  ------------------
  401|      0|        if (mt == SSL3_MT_HELLO_REQUEST) {
  ------------------
  |  |  312|      0|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
  |  Branch (401:13): [True: 0, False: 0]
  ------------------
  402|      0|            st->hand_state = TLS_ST_CR_HELLO_REQ;
  403|      0|            return 1;
  404|      0|        }
  405|      0|        break;
  406|    211|    }
  407|       |
  408|     12|err:
  409|       |    /* No valid transition found */
  410|     12|    if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  258|     24|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|     12|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|     12|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 12]
  |  |  ------------------
  ------------------
                  if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (410:38): [True: 0, False: 0]
  ------------------
  411|      0|        BIO *rbio;
  412|       |
  413|       |        /*
  414|       |         * CCS messages don't have a message sequence number so this is probably
  415|       |         * because of an out-of-order CCS. We'll just drop it.
  416|       |         */
  417|      0|        s->init_num = 0;
  418|      0|        s->rwstate = SSL_READING;
  ------------------
  |  |  934|      0|#define SSL_READING 3
  ------------------
  419|      0|        rbio = SSL_get_rbio(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  420|      0|        BIO_clear_retry_flags(rbio);
  ------------------
  |  |  263|      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
  |  |  ------------------
  ------------------
  421|      0|        BIO_set_retry_read(rbio);
  ------------------
  |  |  257|      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
  |  |  ------------------
  ------------------
  422|      0|        return 0;
  423|      0|    }
  424|     12|    SSLfatal(s, SSL3_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  148|     12|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|     12|    (ERR_new(),                                                  \
  |  |  |  |  151|     12|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     12|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|     12|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  425|     12|    return 0;
  426|     12|}
ossl_statem_client_write_transition:
  543|  3.78k|{
  544|  3.78k|    OSSL_STATEM *st = &s->statem;
  545|       |
  546|       |    /*
  547|       |     * Note that immediately before/after a ClientHello we don't know what
  548|       |     * version we are going to negotiate yet, so we don't take this branch until
  549|       |     * later
  550|       |     */
  551|  3.78k|    if (SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  265|  3.78k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|  7.56k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.78k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  3.78k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 3.78k, False: 0]
  |  |  ------------------
  |  |  266|  3.78k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.78k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.56k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 3.78k, False: 0]
  |  |  ------------------
  |  |  267|  3.78k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.78k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.78k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 3.78k]
  |  |  ------------------
  ------------------
  552|      0|        return ossl_statem_client13_write_transition(s);
  553|       |
  554|  3.78k|    switch (st->hand_state) {
  555|      0|    default:
  ------------------
  |  Branch (555:5): [True: 0, False: 3.78k]
  ------------------
  556|       |        /* Shouldn't happen */
  557|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  558|      0|        return WRITE_TRAN_ERROR;
  559|       |
  560|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (560:5): [True: 0, False: 3.78k]
  ------------------
  561|      0|        if (!s->renegotiate) {
  ------------------
  |  Branch (561:13): [True: 0, False: 0]
  ------------------
  562|       |            /*
  563|       |             * We haven't requested a renegotiation ourselves so we must have
  564|       |             * received a message from the server. Better read it.
  565|       |             */
  566|      0|            return WRITE_TRAN_FINISHED;
  567|      0|        }
  568|       |        /* Renegotiation */
  569|       |        /* fall thru */
  570|  1.95k|    case TLS_ST_BEFORE:
  ------------------
  |  Branch (570:5): [True: 1.95k, False: 1.83k]
  ------------------
  571|  1.95k|        st->hand_state = TLS_ST_CW_CLNT_HELLO;
  572|  1.95k|        return WRITE_TRAN_CONTINUE;
  573|       |
  574|  1.83k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (574:5): [True: 1.83k, False: 1.95k]
  ------------------
  575|  1.83k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (575:13): [True: 0, False: 1.83k]
  ------------------
  576|      0|            && !SSL_IS_QUIC_HANDSHAKE(s)) {
  ------------------
  |  |  303|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   29|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  ------------------
  |  Branch (576:16): [True: 0, False: 0]
  ------------------
  577|       |            /*
  578|       |             * We are assuming this is a TLSv1.3 connection, although we haven't
  579|       |             * actually selected a version yet.
  580|       |             */
  581|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0)
  ------------------
  |  |  403|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (581:17): [True: 0, False: 0]
  ------------------
  582|      0|                st->hand_state = TLS_ST_CW_CHANGE;
  583|      0|            else
  584|      0|                st->hand_state = TLS_ST_EARLY_DATA;
  585|      0|            return WRITE_TRAN_CONTINUE;
  586|      0|        }
  587|       |        /*
  588|       |         * No transition at the end of writing because we don't know what
  589|       |         * we will be sent
  590|       |         */
  591|  1.83k|        s->ts_msg_write = ossl_time_now();
  592|  1.83k|        return WRITE_TRAN_FINISHED;
  593|       |
  594|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (594:5): [True: 0, False: 3.78k]
  ------------------
  595|       |        /*
  596|       |         * We only get here in TLSv1.3. We just received an HRR, so issue a
  597|       |         * CCS unless middlebox compat mode is off, or we already issued one
  598|       |         * because we did early data.
  599|       |         */
  600|      0|        if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0
  ------------------
  |  |  403|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (600:13): [True: 0, False: 0]
  ------------------
  601|      0|            && s->early_data_state != SSL_EARLY_DATA_FINISHED_WRITING)
  ------------------
  |  Branch (601:16): [True: 0, False: 0]
  ------------------
  602|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  603|      0|        else
  604|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  605|      0|        return WRITE_TRAN_CONTINUE;
  606|       |
  607|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (607:5): [True: 0, False: 3.78k]
  ------------------
  608|      0|        s->ts_msg_write = ossl_time_now();
  609|      0|        return WRITE_TRAN_FINISHED;
  610|       |
  611|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (611:5): [True: 0, False: 3.78k]
  ------------------
  612|      0|        st->hand_state = TLS_ST_CW_CLNT_HELLO;
  613|      0|        return WRITE_TRAN_CONTINUE;
  614|       |
  615|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (615:5): [True: 0, False: 3.78k]
  ------------------
  616|      0|        s->ts_msg_read = ossl_time_now();
  617|      0|        if (s->s3.tmp.cert_req)
  ------------------
  |  Branch (617:13): [True: 0, False: 0]
  ------------------
  618|      0|            st->hand_state = TLS_ST_CW_CERT;
  619|      0|        else
  620|      0|            st->hand_state = TLS_ST_CW_KEY_EXCH;
  621|      0|        return WRITE_TRAN_CONTINUE;
  622|       |
  623|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (623:5): [True: 0, False: 3.78k]
  ------------------
  624|      0|        st->hand_state = TLS_ST_CW_KEY_EXCH;
  625|      0|        return WRITE_TRAN_CONTINUE;
  626|       |
  627|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (627:5): [True: 0, False: 3.78k]
  ------------------
  628|       |        /*
  629|       |         * For TLS, cert_req is set to 2, so a cert chain of nothing is
  630|       |         * sent, but no verify packet is sent
  631|       |         */
  632|       |        /*
  633|       |         * XXX: For now, we do not support client authentication in ECDH
  634|       |         * cipher suites with ECDH (rather than ECDSA) certificates. We
  635|       |         * need to skip the certificate verify message when client's
  636|       |         * ECDH public key is sent inside the client certificate.
  637|       |         */
  638|      0|        if (s->s3.tmp.cert_req == 1) {
  ------------------
  |  Branch (638:13): [True: 0, False: 0]
  ------------------
  639|      0|            st->hand_state = TLS_ST_CW_CERT_VRFY;
  640|      0|        } else {
  641|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  642|      0|        }
  643|      0|        if (s->s3.flags & TLS1_FLAGS_SKIP_CERT_VERIFY) {
  ------------------
  |  |  293|      0|#define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010
  ------------------
  |  Branch (643:13): [True: 0, False: 0]
  ------------------
  644|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  645|      0|        }
  646|      0|        return WRITE_TRAN_CONTINUE;
  647|       |
  648|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (648:5): [True: 0, False: 3.78k]
  ------------------
  649|      0|        st->hand_state = TLS_ST_CW_CHANGE;
  650|      0|        return WRITE_TRAN_CONTINUE;
  651|       |
  652|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (652:5): [True: 0, False: 3.78k]
  ------------------
  653|      0|        if (s->hello_retry_request == SSL_HRR_PENDING) {
  ------------------
  |  Branch (653:13): [True: 0, False: 0]
  ------------------
  654|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  655|      0|        } else if (s->early_data_state == SSL_EARLY_DATA_CONNECTING) {
  ------------------
  |  Branch (655:20): [True: 0, False: 0]
  ------------------
  656|      0|            st->hand_state = TLS_ST_EARLY_DATA;
  657|      0|        } else {
  658|       |#if defined(OPENSSL_NO_NEXTPROTONEG)
  659|       |            st->hand_state = TLS_ST_CW_FINISHED;
  660|       |#else
  661|      0|            if (!SSL_CONNECTION_IS_DTLS(s) && s->s3.npn_seen)
  ------------------
  |  |  258|      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)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (661:17): [True: 0, False: 0]
  |  Branch (661:47): [True: 0, False: 0]
  ------------------
  662|      0|                st->hand_state = TLS_ST_CW_NEXT_PROTO;
  663|      0|            else
  664|      0|                st->hand_state = TLS_ST_CW_FINISHED;
  665|      0|#endif
  666|      0|        }
  667|      0|        return WRITE_TRAN_CONTINUE;
  668|       |
  669|      0|#if !defined(OPENSSL_NO_NEXTPROTONEG)
  670|      0|    case TLS_ST_CW_NEXT_PROTO:
  ------------------
  |  Branch (670:5): [True: 0, False: 3.78k]
  ------------------
  671|      0|        st->hand_state = TLS_ST_CW_FINISHED;
  672|      0|        return WRITE_TRAN_CONTINUE;
  673|      0|#endif
  674|       |
  675|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (675:5): [True: 0, False: 3.78k]
  ------------------
  676|      0|        if (s->hit) {
  ------------------
  |  Branch (676:13): [True: 0, False: 0]
  ------------------
  677|      0|            st->hand_state = TLS_ST_OK;
  678|      0|            return WRITE_TRAN_CONTINUE;
  679|      0|        } else {
  680|      0|            return WRITE_TRAN_FINISHED;
  681|      0|        }
  682|       |
  683|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (683:5): [True: 0, False: 3.78k]
  ------------------
  684|      0|        if (s->hit) {
  ------------------
  |  Branch (684:13): [True: 0, False: 0]
  ------------------
  685|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  686|      0|            return WRITE_TRAN_CONTINUE;
  687|      0|        } else {
  688|      0|            st->hand_state = TLS_ST_OK;
  689|      0|            return WRITE_TRAN_CONTINUE;
  690|      0|        }
  691|       |
  692|      0|    case TLS_ST_CR_HELLO_REQ:
  ------------------
  |  Branch (692:5): [True: 0, False: 3.78k]
  ------------------
  693|       |        /*
  694|       |         * If we can renegotiate now then do so, otherwise wait for a more
  695|       |         * convenient time.
  696|       |         */
  697|      0|        if (ssl3_renegotiate_check(SSL_CONNECTION_GET_SSL(s), 1)) {
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (697:13): [True: 0, False: 0]
  ------------------
  698|      0|            if (!tls_setup_handshake(s)) {
  ------------------
  |  Branch (698:17): [True: 0, False: 0]
  ------------------
  699|       |                /* SSLfatal() already called */
  700|      0|                return WRITE_TRAN_ERROR;
  701|      0|            }
  702|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  703|      0|            return WRITE_TRAN_CONTINUE;
  704|      0|        }
  705|      0|        st->hand_state = TLS_ST_OK;
  706|      0|        return WRITE_TRAN_CONTINUE;
  707|  3.78k|    }
  708|  3.78k|}
ossl_statem_client_pre_work:
  715|  1.95k|{
  716|  1.95k|    OSSL_STATEM *st = &s->statem;
  717|       |
  718|  1.95k|    switch (st->hand_state) {
  719|      0|    default:
  ------------------
  |  Branch (719:5): [True: 0, False: 1.95k]
  ------------------
  720|       |        /* No pre work to be done */
  721|      0|        break;
  722|       |
  723|  1.95k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (723:5): [True: 1.95k, False: 0]
  ------------------
  724|  1.95k|        s->shutdown = 0;
  725|  1.95k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.95k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.95k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.95k]
  |  |  ------------------
  ------------------
  726|       |            /* every DTLS ClientHello resets Finished MAC */
  727|      0|            if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (727:17): [True: 0, False: 0]
  ------------------
  728|       |                /* SSLfatal() already called */
  729|      0|                return WORK_ERROR;
  730|      0|            }
  731|  1.95k|        } else if (s->ext.early_data == SSL_EARLY_DATA_REJECTED) {
  ------------------
  |  | 2036|  1.95k|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  |  Branch (731:20): [True: 0, False: 1.95k]
  ------------------
  732|       |            /*
  733|       |             * This must be a second ClientHello after an HRR following an
  734|       |             * earlier rejected attempt to send early data. Since we were
  735|       |             * previously encrypting the early data we now need to reset the
  736|       |             * write record layer in order to write in plaintext again.
  737|       |             */
  738|      0|            if (!ssl_set_new_record_layer(s,
  ------------------
  |  Branch (738:17): [True: 0, False: 0]
  ------------------
  739|      0|                    TLS_ANY_VERSION,
  ------------------
  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  ------------------
  740|      0|                    OSSL_RECORD_DIRECTION_WRITE,
  ------------------
  |  |   43|      0|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  741|      0|                    OSSL_RECORD_PROTECTION_LEVEL_NONE,
  ------------------
  |  | 2932|      0|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  742|      0|                    NULL, 0, NULL, 0, NULL, 0, NULL, 0,
  743|      0|                    NULL, 0, NID_undef, NULL, NULL,
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  744|      0|                    NULL)) {
  745|       |                /* SSLfatal already called */
  746|      0|                return WORK_ERROR;
  747|      0|            }
  748|      0|        }
  749|  1.95k|        break;
  750|       |
  751|  1.95k|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (751:5): [True: 0, False: 1.95k]
  ------------------
  752|      0|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|      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)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  753|      0|            if (s->hit) {
  ------------------
  |  Branch (753:17): [True: 0, False: 0]
  ------------------
  754|       |                /*
  755|       |                 * We're into the last flight so we don't retransmit these
  756|       |                 * messages unless we need to.
  757|       |                 */
  758|      0|                st->use_timer = 0;
  759|      0|            }
  760|       |#ifndef OPENSSL_NO_SCTP
  761|       |            if (BIO_dgram_is_sctp(SSL_get_wbio(SSL_CONNECTION_GET_SSL(s)))) {
  762|       |                /* Calls SSLfatal() as required */
  763|       |                return dtls_wait_for_dry(s);
  764|       |            }
  765|       |#endif
  766|      0|        }
  767|      0|        break;
  768|       |
  769|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (769:5): [True: 0, False: 1.95k]
  ------------------
  770|       |        /*
  771|       |         * If we've been called by SSL_do_handshake()/SSL_write(), or we did not
  772|       |         * attempt to write early data before calling SSL_read() then we press
  773|       |         * on with the handshake. Otherwise we pause here.
  774|       |         */
  775|      0|        if (s->early_data_state == SSL_EARLY_DATA_FINISHED_WRITING
  ------------------
  |  Branch (775:13): [True: 0, False: 0]
  ------------------
  776|      0|            || s->early_data_state == SSL_EARLY_DATA_NONE)
  ------------------
  |  Branch (776:16): [True: 0, False: 0]
  ------------------
  777|      0|            return WORK_FINISHED_CONTINUE;
  778|       |        /* Fall through */
  779|       |
  780|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (780:5): [True: 0, False: 1.95k]
  ------------------
  781|      0|        return tls_finish_handshake(s, wst, 0, 1);
  782|       |
  783|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (783:5): [True: 0, False: 1.95k]
  ------------------
  784|       |        /* Calls SSLfatal() as required */
  785|      0|        return tls_finish_handshake(s, wst, 1, 1);
  786|  1.95k|    }
  787|       |
  788|  1.95k|    return WORK_FINISHED_CONTINUE;
  789|  1.95k|}
ossl_statem_client_post_work:
  796|  1.83k|{
  797|  1.83k|    OSSL_STATEM *st = &s->statem;
  798|  1.83k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  799|       |
  800|  1.83k|    s->init_num = 0;
  801|       |
  802|  1.83k|    switch (st->hand_state) {
  803|      0|    default:
  ------------------
  |  Branch (803:5): [True: 0, False: 1.83k]
  ------------------
  804|       |        /* No post work to be done */
  805|      0|        break;
  806|       |
  807|  1.83k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (807:5): [True: 1.83k, False: 0]
  ------------------
  808|  1.83k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (808:13): [True: 0, False: 1.83k]
  ------------------
  809|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (809:16): [True: 0, False: 0]
  ------------------
  810|       |            /*
  811|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  812|       |             * cipher state function associated with the SSL_METHOD. Instead
  813|       |             * we call tls13_change_cipher_state() directly.
  814|       |             */
  815|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0) {
  ------------------
  |  |  403|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (815:17): [True: 0, False: 0]
  ------------------
  816|      0|                if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (816:21): [True: 0, False: 0]
  ------------------
  817|      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
  |  |  ------------------
  ------------------
  818|       |                    /* SSLfatal() already called */
  819|      0|                    return WORK_ERROR;
  820|      0|                }
  821|      0|            }
  822|       |            /* else we're in compat mode so we delay flushing until after CCS */
  823|  1.83k|        } else if (!statem_flush(s)) {
  ------------------
  |  Branch (823:20): [True: 0, False: 1.83k]
  ------------------
  824|      0|            return WORK_MORE_A;
  825|      0|        }
  826|       |
  827|  1.83k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.83k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.83k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.83k]
  |  |  ------------------
  ------------------
  828|       |            /* Treat the next message as the first packet */
  829|      0|            s->first_packet = 1;
  830|      0|        }
  831|  1.83k|        break;
  832|       |
  833|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (833:5): [True: 0, False: 1.83k]
  ------------------
  834|      0|        if (tls_client_key_exchange_post_work(s) == 0) {
  ------------------
  |  Branch (834:13): [True: 0, False: 0]
  ------------------
  835|       |            /* SSLfatal() already called */
  836|      0|            return WORK_ERROR;
  837|      0|        }
  838|      0|        break;
  839|       |
  840|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (840:5): [True: 0, False: 1.83k]
  ------------------
  841|      0|        if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      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 (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  842|      0|            || s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (842:16): [True: 0, False: 0]
  ------------------
  843|      0|            break;
  844|      0|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (844:13): [True: 0, False: 0]
  ------------------
  845|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (845:16): [True: 0, False: 0]
  ------------------
  846|       |            /*
  847|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  848|       |             * cipher state function associated with the SSL_METHOD. Instead
  849|       |             * we call tls13_change_cipher_state() directly.
  850|       |             */
  851|      0|            if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (851:17): [True: 0, False: 0]
  ------------------
  852|      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
  |  |  ------------------
  ------------------
  853|      0|                return WORK_ERROR;
  854|      0|            break;
  855|      0|        }
  856|      0|        s->session->cipher = s->s3.tmp.new_cipher;
  857|       |#ifdef OPENSSL_NO_COMP
  858|       |        s->session->compress_meth = 0;
  859|       |#else
  860|      0|        if (s->s3.tmp.new_compression == NULL)
  ------------------
  |  Branch (860:13): [True: 0, False: 0]
  ------------------
  861|      0|            s->session->compress_meth = 0;
  862|      0|        else
  863|      0|            s->session->compress_meth = s->s3.tmp.new_compression->id;
  864|      0|#endif
  865|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)) {
  ------------------
  |  Branch (865:13): [True: 0, False: 0]
  ------------------
  866|       |            /* SSLfatal() already called */
  867|      0|            return WORK_ERROR;
  868|      0|        }
  869|       |
  870|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (870:13): [True: 0, False: 0]
  ------------------
  871|      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
  |  |  ------------------
  ------------------
  872|       |            /* SSLfatal() already called */
  873|      0|            return WORK_ERROR;
  874|      0|        }
  875|       |
  876|       |#ifndef OPENSSL_NO_SCTP
  877|       |        if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
  878|       |            /*
  879|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  880|       |             * no SCTP used.
  881|       |             */
  882|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  883|       |                0, NULL);
  884|       |        }
  885|       |#endif
  886|      0|        break;
  887|       |
  888|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (888:5): [True: 0, False: 1.83k]
  ------------------
  889|       |#ifndef OPENSSL_NO_SCTP
  890|       |        if (wst == WORK_MORE_A && SSL_CONNECTION_IS_DTLS(s) && s->hit == 0) {
  891|       |            /*
  892|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  893|       |             * no SCTP used.
  894|       |             */
  895|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  896|       |                0, NULL);
  897|       |        }
  898|       |#endif
  899|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (899:13): [True: 0, False: 0]
  ------------------
  900|      0|            return WORK_MORE_B;
  901|       |
  902|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      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 (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  903|      0|            if (!tls13_save_handshake_digest_for_pha(s)) {
  ------------------
  |  Branch (903:17): [True: 0, False: 0]
  ------------------
  904|       |                /* SSLfatal() already called */
  905|      0|                return WORK_ERROR;
  906|      0|            }
  907|      0|            if (s->post_handshake_auth != SSL_PHA_REQUESTED) {
  ------------------
  |  Branch (907:17): [True: 0, False: 0]
  ------------------
  908|      0|                if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (908:21): [True: 0, False: 0]
  ------------------
  909|      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
  |  |  ------------------
  ------------------
  910|       |                    /* SSLfatal() already called */
  911|      0|                    return WORK_ERROR;
  912|      0|                }
  913|       |                /*
  914|       |                 * For QUIC we deferred setting up these keys until now so
  915|       |                 * that we can ensure write keys are always set up before read
  916|       |                 * keys.
  917|       |                 */
  918|      0|                if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  303|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   29|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (303:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  919|      0|                    && !ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (919:24): [True: 0, False: 0]
  ------------------
  920|      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
  |  |  ------------------
  ------------------
  921|       |                    /* SSLfatal() already called */
  922|      0|                    return WORK_ERROR;
  923|      0|                }
  924|      0|            }
  925|      0|        }
  926|      0|        break;
  927|       |
  928|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (928:5): [True: 0, False: 1.83k]
  ------------------
  929|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (929:13): [True: 0, False: 0]
  ------------------
  930|      0|            return WORK_MORE_A;
  931|      0|        if (!tls13_update_key(s, 1)) {
  ------------------
  |  Branch (931:13): [True: 0, False: 0]
  ------------------
  932|       |            /* SSLfatal() already called */
  933|      0|            return WORK_ERROR;
  934|      0|        }
  935|      0|        break;
  936|  1.83k|    }
  937|       |
  938|  1.83k|    return WORK_FINISHED_CONTINUE;
  939|  1.83k|}
ossl_statem_client_construct_message:
  951|  1.95k|{
  952|  1.95k|    OSSL_STATEM *st = &s->statem;
  953|       |
  954|  1.95k|    switch (st->hand_state) {
  955|      0|    default:
  ------------------
  |  Branch (955:5): [True: 0, False: 1.95k]
  ------------------
  956|       |        /* Shouldn't happen */
  957|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_HANDSHAKE_STATE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  958|      0|        return 0;
  959|       |
  960|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (960:5): [True: 0, False: 1.95k]
  ------------------
  961|      0|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  258|      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)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  962|      0|            *confunc = dtls_construct_change_cipher_spec;
  963|      0|        else
  964|      0|            *confunc = tls_construct_change_cipher_spec;
  965|      0|        *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  966|      0|        break;
  967|       |
  968|  1.95k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (968:5): [True: 1.95k, False: 0]
  ------------------
  969|  1.95k|        *confunc = tls_construct_client_hello;
  970|  1.95k|        *mt = SSL3_MT_CLIENT_HELLO;
  ------------------
  |  |  313|  1.95k|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
  971|  1.95k|        break;
  972|       |
  973|      0|    case TLS_ST_CW_END_OF_EARLY_DATA:
  ------------------
  |  Branch (973:5): [True: 0, False: 1.95k]
  ------------------
  974|      0|        *confunc = tls_construct_end_of_early_data;
  975|      0|        *mt = SSL3_MT_END_OF_EARLY_DATA;
  ------------------
  |  |  316|      0|#define SSL3_MT_END_OF_EARLY_DATA 5
  ------------------
  976|      0|        break;
  977|       |
  978|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (978:5): [True: 0, False: 1.95k]
  ------------------
  979|      0|        *confunc = NULL;
  980|      0|        *mt = SSL3_MT_DUMMY;
  ------------------
  |  |   41|      0|#define SSL3_MT_DUMMY -1
  ------------------
  981|      0|        break;
  982|       |
  983|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (983:5): [True: 0, False: 1.95k]
  ------------------
  984|      0|        *confunc = tls_construct_client_certificate;
  985|      0|        *mt = SSL3_MT_CERTIFICATE;
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  986|      0|        break;
  987|       |
  988|       |#ifndef OPENSSL_NO_COMP_ALG
  989|       |    case TLS_ST_CW_COMP_CERT:
  990|       |        *confunc = tls_construct_client_compressed_certificate;
  991|       |        *mt = SSL3_MT_COMPRESSED_CERTIFICATE;
  992|       |        break;
  993|       |#endif
  994|       |
  995|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (995:5): [True: 0, False: 1.95k]
  ------------------
  996|      0|        *confunc = tls_construct_client_key_exchange;
  997|      0|        *mt = SSL3_MT_CLIENT_KEY_EXCHANGE;
  ------------------
  |  |  323|      0|#define SSL3_MT_CLIENT_KEY_EXCHANGE 16
  ------------------
  998|      0|        break;
  999|       |
 1000|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (1000:5): [True: 0, False: 1.95k]
  ------------------
 1001|      0|        *confunc = tls_construct_cert_verify;
 1002|      0|        *mt = SSL3_MT_CERTIFICATE_VERIFY;
  ------------------
  |  |  322|      0|#define SSL3_MT_CERTIFICATE_VERIFY 15
  ------------------
 1003|      0|        break;
 1004|       |
 1005|      0|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 1006|      0|    case TLS_ST_CW_NEXT_PROTO:
  ------------------
  |  Branch (1006:5): [True: 0, False: 1.95k]
  ------------------
 1007|      0|        *confunc = tls_construct_next_proto;
 1008|      0|        *mt = SSL3_MT_NEXT_PROTO;
  ------------------
  |  |  331|      0|#define SSL3_MT_NEXT_PROTO 67
  ------------------
 1009|      0|        break;
 1010|      0|#endif
 1011|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (1011:5): [True: 0, False: 1.95k]
  ------------------
 1012|      0|        *confunc = tls_construct_finished;
 1013|      0|        *mt = SSL3_MT_FINISHED;
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
 1014|      0|        break;
 1015|       |
 1016|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (1016:5): [True: 0, False: 1.95k]
  ------------------
 1017|      0|        *confunc = tls_construct_key_update;
 1018|      0|        *mt = SSL3_MT_KEY_UPDATE;
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
 1019|      0|        break;
 1020|  1.95k|    }
 1021|       |
 1022|  1.95k|    return 1;
 1023|  1.95k|}
ossl_statem_client_max_message_size:
 1030|    199|{
 1031|    199|    OSSL_STATEM *st = &s->statem;
 1032|       |
 1033|    199|    switch (st->hand_state) {
 1034|      0|    default:
  ------------------
  |  Branch (1034:5): [True: 0, False: 199]
  ------------------
 1035|       |        /* Shouldn't happen */
 1036|      0|        return 0;
 1037|       |
 1038|    199|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1038:5): [True: 199, False: 0]
  ------------------
 1039|    199|        return SERVER_HELLO_MAX_LENGTH;
  ------------------
  |  |   32|    199|#define SERVER_HELLO_MAX_LENGTH 65607
  ------------------
 1040|       |
 1041|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1041:5): [True: 0, False: 199]
  ------------------
 1042|      0|        return HELLO_VERIFY_REQUEST_MAX_LENGTH;
  ------------------
  |  |   20|      0|#define HELLO_VERIFY_REQUEST_MAX_LENGTH 258
  ------------------
 1043|       |
 1044|      0|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (1044:5): [True: 0, False: 199]
  ------------------
 1045|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1045:5): [True: 0, False: 199]
  ------------------
 1046|      0|        return s->max_cert_list;
 1047|       |
 1048|      0|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1048:5): [True: 0, False: 199]
  ------------------
 1049|      0|        return CERTIFICATE_VERIFY_MAX_LENGTH;
  ------------------
  |  |   35|      0|#define CERTIFICATE_VERIFY_MAX_LENGTH 65539
  ------------------
 1050|       |
 1051|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (1051:5): [True: 0, False: 199]
  ------------------
 1052|      0|        return SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1053|       |
 1054|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (1054:5): [True: 0, False: 199]
  ------------------
 1055|      0|        return SERVER_KEY_EXCH_MAX_LENGTH;
  ------------------
  |  |   26|      0|#define SERVER_KEY_EXCH_MAX_LENGTH 102400
  ------------------
 1056|       |
 1057|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1057:5): [True: 0, False: 199]
  ------------------
 1058|       |        /*
 1059|       |         * Set to s->max_cert_list for compatibility with previous releases. In
 1060|       |         * practice these messages can get quite long if servers are configured
 1061|       |         * to provide a long list of acceptable CAs
 1062|       |         */
 1063|      0|        return s->max_cert_list;
 1064|       |
 1065|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (1065:5): [True: 0, False: 199]
  ------------------
 1066|      0|        return SERVER_HELLO_DONE_MAX_LENGTH;
  ------------------
  |  |   27|      0|#define SERVER_HELLO_DONE_MAX_LENGTH 0
  ------------------
 1067|       |
 1068|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (1068:5): [True: 0, False: 199]
  ------------------
 1069|      0|        if (s->version == DTLS1_BAD_VER)
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (1069:13): [True: 0, False: 0]
  ------------------
 1070|      0|            return 3;
 1071|      0|        return CCS_MAX_LENGTH;
  ------------------
  |  |   29|      0|#define CCS_MAX_LENGTH 1
  ------------------
 1072|       |
 1073|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (1073:5): [True: 0, False: 199]
  ------------------
 1074|      0|        return (SSL_CONNECTION_IS_TLS13(s)) ? SESSION_TICKET_MAX_LENGTH_TLS13
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      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 (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      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 (267: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
  ------------------
 1075|      0|                                            : SESSION_TICKET_MAX_LENGTH_TLS12;
  ------------------
  |  |   25|      0|#define SESSION_TICKET_MAX_LENGTH_TLS12 65541
  ------------------
 1076|       |
 1077|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (1077:5): [True: 0, False: 199]
  ------------------
 1078|      0|        return FINISHED_MAX_LENGTH;
  ------------------
  |  |   38|      0|#define FINISHED_MAX_LENGTH 64
  ------------------
 1079|       |
 1080|      0|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1080:5): [True: 0, False: 199]
  ------------------
 1081|      0|        return ENCRYPTED_EXTENSIONS_MAX_LENGTH;
  ------------------
  |  |   23|      0|#define ENCRYPTED_EXTENSIONS_MAX_LENGTH 20000
  ------------------
 1082|       |
 1083|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (1083:5): [True: 0, False: 199]
  ------------------
 1084|      0|        return KEY_UPDATE_MAX_LENGTH;
  ------------------
  |  |   28|      0|#define KEY_UPDATE_MAX_LENGTH 1
  ------------------
 1085|    199|    }
 1086|    199|}
ossl_statem_client_process_message:
 1093|    151|{
 1094|    151|    OSSL_STATEM *st = &s->statem;
 1095|       |
 1096|    151|    switch (st->hand_state) {
 1097|      0|    default:
  ------------------
  |  Branch (1097:5): [True: 0, False: 151]
  ------------------
 1098|       |        /* Shouldn't happen */
 1099|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1100|      0|        return MSG_PROCESS_ERROR;
 1101|       |
 1102|    151|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1102:5): [True: 151, False: 0]
  ------------------
 1103|    151|        return tls_process_server_hello(s, pkt);
 1104|       |
 1105|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1105:5): [True: 0, False: 151]
  ------------------
 1106|      0|        return dtls_process_hello_verify(s, pkt);
 1107|       |
 1108|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1108:5): [True: 0, False: 151]
  ------------------
 1109|      0|        return tls_process_server_certificate(s, pkt);
 1110|       |
 1111|       |#ifndef OPENSSL_NO_COMP_ALG
 1112|       |    case TLS_ST_CR_COMP_CERT:
 1113|       |        return tls_process_server_compressed_certificate(s, pkt);
 1114|       |#endif
 1115|       |
 1116|      0|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1116:5): [True: 0, False: 151]
  ------------------
 1117|      0|        return tls_process_cert_verify(s, pkt);
 1118|       |
 1119|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (1119:5): [True: 0, False: 151]
  ------------------
 1120|      0|        return tls_process_cert_status(s, pkt);
 1121|       |
 1122|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (1122:5): [True: 0, False: 151]
  ------------------
 1123|      0|        return tls_process_key_exchange(s, pkt);
 1124|       |
 1125|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1125:5): [True: 0, False: 151]
  ------------------
 1126|      0|        return tls_process_certificate_request(s, pkt);
 1127|       |
 1128|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (1128:5): [True: 0, False: 151]
  ------------------
 1129|      0|        return tls_process_server_done(s, pkt);
 1130|       |
 1131|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (1131:5): [True: 0, False: 151]
  ------------------
 1132|      0|        return tls_process_change_cipher_spec(s, pkt);
 1133|       |
 1134|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (1134:5): [True: 0, False: 151]
  ------------------
 1135|      0|        return tls_process_new_session_ticket(s, pkt);
 1136|       |
 1137|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (1137:5): [True: 0, False: 151]
  ------------------
 1138|      0|        return tls_process_finished(s, pkt);
 1139|       |
 1140|      0|    case TLS_ST_CR_HELLO_REQ:
  ------------------
  |  Branch (1140:5): [True: 0, False: 151]
  ------------------
 1141|      0|        return tls_process_hello_req(s, pkt);
 1142|       |
 1143|      0|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1143:5): [True: 0, False: 151]
  ------------------
 1144|      0|        return tls_process_encrypted_extensions(s, pkt);
 1145|       |
 1146|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (1146:5): [True: 0, False: 151]
  ------------------
 1147|      0|        return tls_process_key_update(s, pkt);
 1148|    151|    }
 1149|    151|}
tls_construct_client_hello:
 1177|  1.95k|{
 1178|  1.95k|    unsigned char *p;
 1179|  1.95k|    size_t sess_id_len;
 1180|  1.95k|    int i, protverr;
 1181|  1.95k|#ifndef OPENSSL_NO_COMP
 1182|  1.95k|    SSL_COMP *comp;
 1183|  1.95k|#endif
 1184|  1.95k|    SSL_SESSION *sess = s->session;
 1185|  1.95k|    unsigned char *session_id;
 1186|  1.95k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.95k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1187|       |
 1188|       |    /* Work out what SSL/TLS/DTLS version to use */
 1189|  1.95k|    protverr = ssl_set_client_hello_version(s);
 1190|  1.95k|    if (protverr != 0) {
  ------------------
  |  Branch (1190:9): [True: 0, False: 1.95k]
  ------------------
 1191|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, protverr);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1192|      0|        return CON_FUNC_ERROR;
 1193|      0|    }
 1194|       |
 1195|  1.95k|    if (sess == NULL
  ------------------
  |  Branch (1195:9): [True: 1.95k, False: 0]
  ------------------
 1196|      0|        || !ssl_version_supported(s, sess->ssl_version, NULL)
  ------------------
  |  Branch (1196:12): [True: 0, False: 0]
  ------------------
 1197|  1.95k|        || !SSL_SESSION_is_resumable(sess)) {
  ------------------
  |  Branch (1197:12): [True: 0, False: 0]
  ------------------
 1198|  1.95k|        if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1198:13): [True: 1.95k, False: 0]
  ------------------
 1199|  1.95k|            && !ssl_get_new_session(s, 0)) {
  ------------------
  |  Branch (1199:16): [True: 0, False: 1.95k]
  ------------------
 1200|       |            /* SSLfatal() already called */
 1201|      0|            return CON_FUNC_ERROR;
 1202|      0|        }
 1203|  1.95k|    }
 1204|       |    /* else use the pre-loaded session */
 1205|       |
 1206|  1.95k|    p = s->s3.client_random;
 1207|       |
 1208|       |    /*
 1209|       |     * for DTLS if client_random is initialized, reuse it, we are
 1210|       |     * required to use same upon reply to HelloVerify
 1211|       |     */
 1212|  1.95k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.95k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.95k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.95k]
  |  |  ------------------
  ------------------
 1213|      0|        size_t idx;
 1214|      0|        i = 1;
 1215|      0|        for (idx = 0; idx < sizeof(s->s3.client_random); idx++) {
  ------------------
  |  Branch (1215:23): [True: 0, False: 0]
  ------------------
 1216|      0|            if (p[idx]) {
  ------------------
  |  Branch (1216:17): [True: 0, False: 0]
  ------------------
 1217|      0|                i = 0;
 1218|      0|                break;
 1219|      0|            }
 1220|      0|        }
 1221|  1.95k|    } else {
 1222|  1.95k|        i = (s->hello_retry_request == SSL_HRR_NONE);
 1223|  1.95k|    }
 1224|       |
 1225|  1.95k|    if (i && ssl_fill_hello_random(s, 0, p, sizeof(s->s3.client_random), DOWNGRADE_NONE) <= 0) {
  ------------------
  |  Branch (1225:9): [True: 1.95k, False: 0]
  |  Branch (1225:14): [True: 0, False: 1.95k]
  ------------------
 1226|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1227|      0|        return CON_FUNC_ERROR;
 1228|      0|    }
 1229|       |
 1230|       |    /*-
 1231|       |     * version indicates the negotiated version: for example from
 1232|       |     * an SSLv2/v3 compatible client hello). The client_version
 1233|       |     * field is the maximum version we permit and it is also
 1234|       |     * used in RSA encrypted premaster secrets. Some servers can
 1235|       |     * choke if we initially report a higher version then
 1236|       |     * renegotiate to a lower one in the premaster secret. This
 1237|       |     * didn't happen with TLS 1.0 as most servers supported it
 1238|       |     * but it can with TLS 1.1 or later if the server only supports
 1239|       |     * 1.0.
 1240|       |     *
 1241|       |     * Possible scenario with previous logic:
 1242|       |     *      1. Client hello indicates TLS 1.2
 1243|       |     *      2. Server hello says TLS 1.0
 1244|       |     *      3. RSA encrypted premaster secret uses 1.2.
 1245|       |     *      4. Handshake proceeds using TLS 1.0.
 1246|       |     *      5. Server sends hello request to renegotiate.
 1247|       |     *      6. Client hello indicates TLS v1.0 as we now
 1248|       |     *         know that is maximum server supports.
 1249|       |     *      7. Server chokes on RSA encrypted premaster secret
 1250|       |     *         containing version 1.0.
 1251|       |     *
 1252|       |     * For interoperability it should be OK to always use the
 1253|       |     * maximum version we support in client hello and then rely
 1254|       |     * on the checking of version to ensure the servers isn't
 1255|       |     * being inconsistent: for example initially negotiating with
 1256|       |     * TLS 1.0 and renegotiating with TLS 1.2. We do this by using
 1257|       |     * client_version in client hello and not resetting it to
 1258|       |     * the negotiated version.
 1259|       |     *
 1260|       |     * For TLS 1.3 we always set the ClientHello version to 1.2 and rely on the
 1261|       |     * supported_versions extension for the real supported versions.
 1262|       |     */
 1263|  1.95k|    if (!WPACKET_put_bytes_u16(pkt, s->client_version)
  ------------------
  |  |  891|  3.90k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1263:9): [True: 0, False: 1.95k]
  ------------------
 1264|  1.95k|        || !WPACKET_memcpy(pkt, s->s3.client_random, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|  1.95k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1264:12): [True: 0, False: 1.95k]
  ------------------
 1265|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1266|      0|        return CON_FUNC_ERROR;
 1267|      0|    }
 1268|       |
 1269|       |    /* Session ID */
 1270|  1.95k|    session_id = s->session->session_id;
 1271|  1.95k|    if (s->new_session || s->session->ssl_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|  1.95k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1271:9): [True: 0, False: 1.95k]
  |  Branch (1271:27): [True: 1.93k, False: 16]
  ------------------
 1272|  1.93k|        if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|  3.87k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1272:13): [True: 1.93k, False: 0]
  ------------------
 1273|  1.93k|            && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0) {
  ------------------
  |  |  403|  1.93k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|  1.93k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1273:16): [True: 1.93k, False: 0]
  ------------------
 1274|  1.93k|            sess_id_len = sizeof(s->tmp_session_id);
 1275|  1.93k|            s->tmp_session_id_len = sess_id_len;
 1276|  1.93k|            session_id = s->tmp_session_id;
 1277|  1.93k|            if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1277:17): [True: 1.93k, False: 0]
  ------------------
 1278|  1.93k|                && RAND_bytes_ex(sctx->libctx, s->tmp_session_id,
  ------------------
  |  Branch (1278:20): [True: 0, False: 1.93k]
  ------------------
 1279|  1.93k|                       sess_id_len, 0)
 1280|  1.93k|                    <= 0) {
 1281|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1282|      0|                return CON_FUNC_ERROR;
 1283|      0|            }
 1284|  1.93k|        } else {
 1285|      0|            sess_id_len = 0;
 1286|      0|        }
 1287|  1.93k|    } else {
 1288|     16|        assert(s->session->session_id_length <= sizeof(s->session->session_id));
  ------------------
  |  Branch (1288:9): [True: 0, False: 16]
  |  Branch (1288:9): [True: 16, False: 0]
  ------------------
 1289|     16|        sess_id_len = s->session->session_id_length;
 1290|     16|        if (s->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|     16|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1290:13): [True: 0, False: 16]
  ------------------
 1291|      0|            s->tmp_session_id_len = sess_id_len;
 1292|      0|            memcpy(s->tmp_session_id, s->session->session_id, sess_id_len);
 1293|      0|        }
 1294|     16|    }
 1295|  1.95k|    if (!WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  790|  3.90k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1295:9): [True: 0, False: 1.95k]
  ------------------
 1296|  1.95k|        || (sess_id_len != 0 && !WPACKET_memcpy(pkt, session_id, sess_id_len))
  ------------------
  |  Branch (1296:13): [True: 1.93k, False: 16]
  |  Branch (1296:33): [True: 0, False: 1.93k]
  ------------------
 1297|  1.95k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1297:12): [True: 0, False: 1.95k]
  ------------------
 1298|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1299|      0|        return CON_FUNC_ERROR;
 1300|      0|    }
 1301|       |
 1302|       |    /* cookie stuff for DTLS */
 1303|  1.95k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.95k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.95k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.95k]
  |  |  ------------------
  ------------------
 1304|      0|        if (s->d1->cookie_len > sizeof(s->d1->cookie)
  ------------------
  |  Branch (1304:13): [True: 0, False: 0]
  ------------------
 1305|      0|            || !WPACKET_sub_memcpy_u8(pkt, s->d1->cookie,
  ------------------
  |  |  918|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1305:16): [True: 0, False: 0]
  ------------------
 1306|      0|                s->d1->cookie_len)) {
 1307|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1308|      0|            return CON_FUNC_ERROR;
 1309|      0|        }
 1310|      0|    }
 1311|       |
 1312|       |    /* Ciphers supported */
 1313|  1.95k|    if (!WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|  1.95k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1313:9): [True: 0, False: 1.95k]
  ------------------
 1314|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1315|      0|        return CON_FUNC_ERROR;
 1316|      0|    }
 1317|       |
 1318|  1.95k|    if (!ssl_cipher_list_to_bytes(s, SSL_get_ciphers(SSL_CONNECTION_GET_SSL(s)),
  ------------------
  |  |   27|  1.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (1318:9): [True: 66, False: 1.88k]
  ------------------
 1319|  1.95k|            pkt)) {
 1320|       |        /* SSLfatal() already called */
 1321|     66|        return CON_FUNC_ERROR;
 1322|     66|    }
 1323|  1.88k|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1323:9): [True: 0, False: 1.88k]
  ------------------
 1324|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1325|      0|        return CON_FUNC_ERROR;
 1326|      0|    }
 1327|       |
 1328|       |    /* COMPRESSION */
 1329|  1.88k|    if (!WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  790|  1.88k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1329:9): [True: 0, False: 1.88k]
  ------------------
 1330|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1331|      0|        return CON_FUNC_ERROR;
 1332|      0|    }
 1333|  1.88k|#ifndef OPENSSL_NO_COMP
 1334|  1.88k|    if (ssl_allow_compression(s)
  ------------------
  |  Branch (1334:9): [True: 0, False: 1.88k]
  ------------------
 1335|      0|        && sctx->comp_methods
  ------------------
  |  Branch (1335:12): [True: 0, False: 0]
  ------------------
 1336|      0|        && (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      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)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1337|      0|            || s->s3.tmp.max_ver < TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1337:16): [True: 0, False: 0]
  ------------------
 1338|      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))
  ------------------
 1339|      0|        for (i = 0; i < compnum; i++) {
  ------------------
  |  Branch (1339:21): [True: 0, False: 0]
  ------------------
 1340|      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)))
  ------------------
 1341|      0|            if (!WPACKET_put_bytes_u8(pkt, comp->id)) {
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1341:17): [True: 0, False: 0]
  ------------------
 1342|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1343|      0|                return CON_FUNC_ERROR;
 1344|      0|            }
 1345|      0|        }
 1346|      0|    }
 1347|  1.88k|#endif
 1348|       |    /* Add the NULL method */
 1349|  1.88k|    if (!WPACKET_put_bytes_u8(pkt, 0) || !WPACKET_close(pkt)) {
  ------------------
  |  |  889|  3.77k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1349:9): [True: 0, False: 1.88k]
  |  Branch (1349:42): [True: 0, False: 1.88k]
  ------------------
 1350|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1351|      0|        return CON_FUNC_ERROR;
 1352|      0|    }
 1353|       |
 1354|       |    /* TLS extensions */
 1355|  1.88k|    if (!tls_construct_extensions(s, pkt, SSL_EXT_CLIENT_HELLO, NULL, 0)) {
  ------------------
  |  |  299|  1.88k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1355:9): [True: 52, False: 1.83k]
  ------------------
 1356|       |        /* SSLfatal() already called */
 1357|     52|        return CON_FUNC_ERROR;
 1358|     52|    }
 1359|       |
 1360|  1.83k|    return CON_FUNC_SUCCESS;
 1361|  1.88k|}
tls_process_server_hello:
 1468|    151|{
 1469|    151|    PACKET session_id, extpkt;
 1470|    151|    size_t session_id_len;
 1471|    151|    const unsigned char *cipherchars;
 1472|    151|    int hrr = 0;
 1473|    151|    unsigned int compression;
 1474|    151|    unsigned int sversion;
 1475|    151|    unsigned int context;
 1476|    151|    RAW_EXTENSION *extensions = NULL;
 1477|    151|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|    151|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1478|    151|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|    151|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1479|    151|#ifndef OPENSSL_NO_COMP
 1480|    151|    SSL_COMP *comp;
 1481|    151|#endif
 1482|       |
 1483|    151|    if (!PACKET_get_net_2(pkt, &sversion)) {
  ------------------
  |  Branch (1483:9): [True: 3, False: 148]
  ------------------
 1484|      3|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      3|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      3|    (ERR_new(),                                                  \
  |  |  |  |  151|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      3|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      3|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1485|      3|        goto err;
 1486|      3|    }
 1487|       |
 1488|       |    /* load the server random */
 1489|    148|    if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|    296|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1489:9): [True: 148, False: 0]
  ------------------
 1490|    148|        && sversion == TLS1_2_VERSION
  ------------------
  |  |   26|    296|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (1490:12): [True: 56, False: 92]
  ------------------
 1491|     56|        && PACKET_remaining(pkt) >= SSL3_RANDOM_SIZE
  ------------------
  |  |  137|    204|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1491:12): [True: 55, False: 1]
  ------------------
 1492|     55|        && memcmp(hrrrandom, PACKET_data(pkt), SSL3_RANDOM_SIZE) == 0) {
  ------------------
  |  |  137|     55|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1492:12): [True: 2, False: 53]
  ------------------
 1493|      2|        if (s->hello_retry_request != SSL_HRR_NONE) {
  ------------------
  |  Branch (1493:13): [True: 0, False: 2]
  ------------------
 1494|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1495|      0|            goto err;
 1496|      0|        }
 1497|      2|        s->hello_retry_request = SSL_HRR_PENDING;
 1498|       |        /* Tell the record layer that we know we're going to get TLSv1.3 */
 1499|      2|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (1499:13): [True: 0, False: 2]
  ------------------
 1500|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1501|      0|            goto err;
 1502|      0|        }
 1503|      2|        hrr = 1;
 1504|      2|        if (!PACKET_forward(pkt, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|      2|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1504:13): [True: 0, False: 2]
  ------------------
 1505|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1506|      0|            goto err;
 1507|      0|        }
 1508|    146|    } else {
 1509|    146|        if (!PACKET_copy_bytes(pkt, s->s3.server_random, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|    146|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1509:13): [True: 4, False: 142]
  ------------------
 1510|      4|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      4|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      4|    (ERR_new(),                                                  \
  |  |  |  |  151|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      4|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1511|      4|            goto err;
 1512|      4|        }
 1513|    146|    }
 1514|       |
 1515|       |    /* Get the session-id. */
 1516|    144|    if (!PACKET_get_length_prefixed_1(pkt, &session_id)) {
  ------------------
  |  Branch (1516:9): [True: 16, False: 128]
  ------------------
 1517|     16|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|     16|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|     16|    (ERR_new(),                                                  \
  |  |  |  |  151|     16|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     16|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|     16|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1518|     16|        goto err;
 1519|     16|    }
 1520|    128|    session_id_len = PACKET_remaining(&session_id);
 1521|    128|    if (session_id_len > sizeof(s->session->session_id)
  ------------------
  |  Branch (1521:9): [True: 0, False: 128]
  ------------------
 1522|    128|        || session_id_len > SSL3_SESSION_ID_SIZE) {
  ------------------
  |  |  138|    128|#define SSL3_SESSION_ID_SIZE 32
  ------------------
  |  Branch (1522:12): [True: 0, False: 128]
  ------------------
 1523|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_SSL3_SESSION_ID_TOO_LONG);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1524|      0|        goto err;
 1525|      0|    }
 1526|       |
 1527|    128|    if (!PACKET_get_bytes(pkt, &cipherchars, TLS_CIPHER_LEN)) {
  ------------------
  |  |  379|    128|#define TLS_CIPHER_LEN 2
  ------------------
  |  Branch (1527:9): [True: 1, False: 127]
  ------------------
 1528|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1529|      1|        goto err;
 1530|      1|    }
 1531|       |
 1532|    127|    if (!PACKET_get_1(pkt, &compression)) {
  ------------------
  |  Branch (1532:9): [True: 1, False: 126]
  ------------------
 1533|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1534|      1|        goto err;
 1535|      1|    }
 1536|       |
 1537|       |    /* TLS extensions */
 1538|    126|    if (PACKET_remaining(pkt) == 0 && !hrr) {
  ------------------
  |  Branch (1538:9): [True: 3, False: 123]
  |  Branch (1538:39): [True: 3, False: 0]
  ------------------
 1539|      3|        PACKET_null_init(&extpkt);
 1540|    123|    } else if (!PACKET_as_length_prefixed_2(pkt, &extpkt)
  ------------------
  |  Branch (1540:16): [True: 24, False: 99]
  ------------------
 1541|     99|        || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (1541:12): [True: 0, False: 99]
  ------------------
 1542|     24|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  148|     24|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|     24|    (ERR_new(),                                                  \
  |  |  |  |  151|     24|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     24|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|     24|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1543|     24|        goto err;
 1544|     24|    }
 1545|       |
 1546|    102|    if (!hrr) {
  ------------------
  |  Branch (1546:9): [True: 101, False: 1]
  ------------------
 1547|    101|        if (!tls_collect_extensions(s, &extpkt,
  ------------------
  |  Branch (1547:13): [True: 20, False: 81]
  ------------------
 1548|    101|                SSL_EXT_TLS1_2_SERVER_HELLO
  ------------------
  |  |  301|    101|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1549|    101|                    | SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  302|    101|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1550|    101|                &extensions, NULL, 1)) {
 1551|       |            /* SSLfatal() already called */
 1552|     20|            goto err;
 1553|     20|        }
 1554|       |
 1555|     81|        if (!ssl_choose_client_version(s, sversion, extensions)) {
  ------------------
  |  Branch (1555:13): [True: 36, False: 45]
  ------------------
 1556|       |            /* SSLfatal() already called */
 1557|     36|            goto err;
 1558|     36|        }
 1559|     81|    }
 1560|       |
 1561|     46|    if (SSL_CONNECTION_IS_TLS13(s) || hrr) {
  ------------------
  |  |  265|     92|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|     92|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     46|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|     46|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 46, False: 0]
  |  |  ------------------
  |  |  266|     46|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     46|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     92|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 3, False: 43]
  |  |  ------------------
  |  |  267|     92|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      3|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      3|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 2, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (1561:39): [True: 1, False: 43]
  ------------------
 1562|      3|        if (compression != 0) {
  ------------------
  |  Branch (1562:13): [True: 1, False: 2]
  ------------------
 1563|      1|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1564|      1|                SSL_R_INVALID_COMPRESSION_ALGORITHM);
 1565|      1|            goto err;
 1566|      1|        }
 1567|       |
 1568|      2|        if (session_id_len != s->tmp_session_id_len
  ------------------
  |  Branch (1568:13): [True: 2, False: 0]
  ------------------
 1569|      0|            || memcmp(PACKET_data(&session_id), s->tmp_session_id,
  ------------------
  |  Branch (1569:16): [True: 0, False: 0]
  ------------------
 1570|      0|                   session_id_len)
 1571|      2|                != 0) {
 1572|      2|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_INVALID_SESSION_ID);
  ------------------
  |  |  148|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      2|    (ERR_new(),                                                  \
  |  |  |  |  151|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1573|      2|            goto err;
 1574|      2|        }
 1575|      2|    }
 1576|       |
 1577|     43|    if (hrr) {
  ------------------
  |  Branch (1577:9): [True: 0, False: 43]
  ------------------
 1578|      0|        if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (1578:13): [True: 0, False: 0]
  ------------------
 1579|       |            /* SSLfatal() already called */
 1580|      0|            goto err;
 1581|      0|        }
 1582|       |
 1583|      0|        return tls_process_as_hello_retry_request(s, &extpkt);
 1584|      0|    }
 1585|       |
 1586|       |    /*
 1587|       |     * Now we have chosen the version we need to check again that the extensions
 1588|       |     * are appropriate for this version.
 1589|       |     */
 1590|     43|    context = SSL_CONNECTION_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  265|     43|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|     86|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     43|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|     43|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 43, False: 0]
  |  |  ------------------
  |  |  266|     43|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     43|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     86|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 43]
  |  |  ------------------
  |  |  267|     43|    && 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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  context = SSL_CONNECTION_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1591|     43|                                         : SSL_EXT_TLS1_2_SERVER_HELLO;
  ------------------
  |  |  301|     86|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1592|     43|    if (!tls_validate_all_contexts(s, context, extensions)) {
  ------------------
  |  Branch (1592:9): [True: 2, False: 41]
  ------------------
 1593|      2|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      2|    (ERR_new(),                                                  \
  |  |  |  |  151|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1594|      2|        goto err;
 1595|      2|    }
 1596|       |
 1597|     41|    s->hit = 0;
 1598|       |
 1599|     41|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|     41|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|     82|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     41|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|     41|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 41, False: 0]
  |  |  ------------------
  |  |  266|     41|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     41|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     82|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 41]
  |  |  ------------------
  |  |  267|     41|    && 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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1600|       |        /*
 1601|       |         * In TLSv1.3 a ServerHello message signals a key change so the end of
 1602|       |         * the message must be on a record boundary.
 1603|       |         */
 1604|      0|        if (RECORD_LAYER_processed_read_pending(&s->rlayer)) {
  ------------------
  |  Branch (1604:13): [True: 0, False: 0]
  ------------------
 1605|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1606|      0|                SSL_R_NOT_ON_RECORD_BOUNDARY);
 1607|      0|            goto err;
 1608|      0|        }
 1609|       |
 1610|       |        /* This will set s->hit if we are resuming */
 1611|      0|        if (!tls_parse_extension(s, TLSEXT_IDX_psk,
  ------------------
  |  Branch (1611:13): [True: 0, False: 0]
  ------------------
 1612|      0|                SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1613|      0|                extensions, NULL, 0)) {
 1614|       |            /* SSLfatal() already called */
 1615|      0|            goto err;
 1616|      0|        }
 1617|     41|    } else {
 1618|       |        /*
 1619|       |         * Check if we can resume the session based on external pre-shared
 1620|       |         * secret. EAP-FAST (RFC 4851) supports two types of session resumption.
 1621|       |         * Resumption based on server-side state works with session IDs.
 1622|       |         * Resumption based on pre-shared Protected Access Credentials (PACs)
 1623|       |         * works by overriding the SessionTicket extension at the application
 1624|       |         * layer, and does not send a session ID. (We do not know whether
 1625|       |         * EAP-FAST servers would honour the session ID.) Therefore, the session
 1626|       |         * ID alone is not a reliable indicator of session resumption, so we
 1627|       |         * first check if we can resume, and later peek at the next handshake
 1628|       |         * message to see if the server wants to resume.
 1629|       |         */
 1630|     41|        if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|     82|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1630:13): [True: 41, False: 0]
  ------------------
 1631|     41|            && s->ext.session_secret_cb != NULL && s->session->ext.tick) {
  ------------------
  |  Branch (1631:16): [True: 0, False: 41]
  |  Branch (1631:52): [True: 0, False: 0]
  ------------------
 1632|      0|            const SSL_CIPHER *pref_cipher = NULL;
 1633|       |            /*
 1634|       |             * s->session->master_key_length is a size_t, but this is an int for
 1635|       |             * backwards compat reasons
 1636|       |             */
 1637|      0|            int master_key_length;
 1638|       |
 1639|      0|            master_key_length = sizeof(s->session->master_key);
 1640|      0|            if (s->ext.session_secret_cb(ussl, s->session->master_key,
  ------------------
  |  Branch (1640:17): [True: 0, False: 0]
  ------------------
 1641|      0|                    &master_key_length,
 1642|      0|                    NULL, &pref_cipher,
 1643|      0|                    s->ext.session_secret_cb_arg)
 1644|      0|                && master_key_length > 0) {
  ------------------
  |  Branch (1644:20): [True: 0, False: 0]
  ------------------
 1645|      0|                s->session->master_key_length = master_key_length;
 1646|      0|                s->session->cipher = pref_cipher ? pref_cipher : ssl_get_cipher_by_char(s, cipherchars, 0);
  ------------------
  |  Branch (1646:38): [True: 0, False: 0]
  ------------------
 1647|      0|            } else {
 1648|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1649|      0|                goto err;
 1650|      0|            }
 1651|      0|        }
 1652|       |
 1653|     41|        if (session_id_len != 0
  ------------------
  |  Branch (1653:13): [True: 9, False: 32]
  ------------------
 1654|      9|            && session_id_len == s->session->session_id_length
  ------------------
  |  Branch (1654:16): [True: 0, False: 9]
  ------------------
 1655|      0|            && memcmp(PACKET_data(&session_id), s->session->session_id,
  ------------------
  |  Branch (1655:16): [True: 0, False: 0]
  ------------------
 1656|      0|                   session_id_len)
 1657|      0|                == 0)
 1658|      0|            s->hit = 1;
 1659|     41|    }
 1660|       |
 1661|     41|    if (s->hit) {
  ------------------
  |  Branch (1661:9): [True: 0, False: 41]
  ------------------
 1662|      0|        if (s->sid_ctx_length != s->session->sid_ctx_length
  ------------------
  |  Branch (1662:13): [True: 0, False: 0]
  ------------------
 1663|      0|            || memcmp(s->session->sid_ctx, s->sid_ctx, s->sid_ctx_length)) {
  ------------------
  |  Branch (1663:16): [True: 0, False: 0]
  ------------------
 1664|       |            /* actually a client application bug */
 1665|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1666|      0|                SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT);
 1667|      0|            goto err;
 1668|      0|        }
 1669|     41|    } else {
 1670|       |        /*
 1671|       |         * If we were trying for session-id reuse but the server
 1672|       |         * didn't resume, make a new SSL_SESSION.
 1673|       |         * In the case of EAP-FAST and PAC, we do not send a session ID,
 1674|       |         * so the PAC-based session secret is always preserved. It'll be
 1675|       |         * overwritten if the server refuses resumption.
 1676|       |         */
 1677|     41|        if (s->session->session_id_length > 0) {
  ------------------
  |  Branch (1677:13): [True: 0, False: 41]
  ------------------
 1678|      0|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_miss);
 1679|      0|            if (!ssl_get_new_session(s, 0)) {
  ------------------
  |  Branch (1679:17): [True: 0, False: 0]
  ------------------
 1680|       |                /* SSLfatal() already called */
 1681|      0|                goto err;
 1682|      0|            }
 1683|      0|        }
 1684|       |
 1685|     41|        s->session->ssl_version = s->version;
 1686|       |        /*
 1687|       |         * In TLSv1.2 and below we save the session id we were sent so we can
 1688|       |         * resume it later. In TLSv1.3 the session id we were sent is just an
 1689|       |         * echo of what we originally sent in the ClientHello and should not be
 1690|       |         * used for resumption.
 1691|       |         */
 1692|     41|        if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|     41|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|     82|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     41|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|     41|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 41, False: 0]
  |  |  ------------------
  |  |  266|     41|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     41|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     82|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 41]
  |  |  ------------------
  |  |  267|     41|    && 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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1693|     41|            s->session->session_id_length = session_id_len;
 1694|       |            /* session_id_len could be 0 */
 1695|     41|            if (session_id_len > 0)
  ------------------
  |  Branch (1695:17): [True: 9, False: 32]
  ------------------
 1696|      9|                memcpy(s->session->session_id, PACKET_data(&session_id),
 1697|      9|                    session_id_len);
 1698|     41|        }
 1699|     41|    }
 1700|       |
 1701|       |    /* Session version and negotiated protocol version should match */
 1702|     41|    if (s->version != s->session->ssl_version) {
  ------------------
  |  Branch (1702:9): [True: 0, False: 41]
  ------------------
 1703|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1704|      0|            SSL_R_SSL_SESSION_VERSION_MISMATCH);
 1705|      0|        goto err;
 1706|      0|    }
 1707|       |    /*
 1708|       |     * Now that we know the version, update the check to see if it's an allowed
 1709|       |     * version.
 1710|       |     */
 1711|     41|    s->s3.tmp.min_ver = s->version;
 1712|     41|    s->s3.tmp.max_ver = s->version;
 1713|       |
 1714|     41|    if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (1714:9): [True: 21, False: 20]
  ------------------
 1715|       |        /* SSLfatal() already called */
 1716|     21|        goto err;
 1717|     21|    }
 1718|       |
 1719|       |#ifdef OPENSSL_NO_COMP
 1720|       |    if (compression != 0) {
 1721|       |        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
 1722|       |            SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
 1723|       |        goto err;
 1724|       |    }
 1725|       |    /*
 1726|       |     * If compression is disabled we'd better not try to resume a session
 1727|       |     * using compression.
 1728|       |     */
 1729|       |    if (s->session->compress_meth != 0) {
 1730|       |        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_COMPRESSION);
 1731|       |        goto err;
 1732|       |    }
 1733|       |#else
 1734|     20|    if (s->hit && compression != s->session->compress_meth) {
  ------------------
  |  Branch (1734:9): [True: 0, False: 20]
  |  Branch (1734:19): [True: 0, False: 0]
  ------------------
 1735|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1736|      0|            SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED);
 1737|      0|        goto err;
 1738|      0|    }
 1739|     20|    if (compression == 0)
  ------------------
  |  Branch (1739:9): [True: 19, False: 1]
  ------------------
 1740|     19|        comp = NULL;
 1741|      1|    else if (!ssl_allow_compression(s)) {
  ------------------
  |  Branch (1741:14): [True: 1, False: 0]
  ------------------
 1742|      1|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_COMPRESSION_DISABLED);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1743|      1|        goto err;
 1744|      1|    } else {
 1745|      0|        comp = ssl3_comp_find(SSL_CONNECTION_GET_CTX(s)->comp_methods,
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1746|      0|            compression);
 1747|      0|    }
 1748|       |
 1749|     19|    if (compression != 0 && comp == NULL) {
  ------------------
  |  Branch (1749:9): [True: 0, False: 19]
  |  Branch (1749:29): [True: 0, False: 0]
  ------------------
 1750|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1751|      0|            SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
 1752|      0|        goto err;
 1753|     19|    } else {
 1754|     19|        s->s3.tmp.new_compression = comp;
 1755|     19|    }
 1756|     19|#endif
 1757|       |
 1758|     19|    if (!tls_parse_all_extensions(s, context, extensions, NULL, 0, 1)) {
  ------------------
  |  Branch (1758:9): [True: 19, False: 0]
  ------------------
 1759|       |        /* SSLfatal() already called */
 1760|     19|        goto err;
 1761|     19|    }
 1762|       |
 1763|       |#ifndef OPENSSL_NO_SCTP
 1764|       |    if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
 1765|       |        unsigned char sctpauthkey[64];
 1766|       |        char labelbuffer[sizeof(DTLS1_SCTP_AUTH_LABEL)];
 1767|       |        size_t labellen;
 1768|       |
 1769|       |        /*
 1770|       |         * Add new shared key for SCTP-Auth, will be ignored if
 1771|       |         * no SCTP used.
 1772|       |         */
 1773|       |        memcpy(labelbuffer, DTLS1_SCTP_AUTH_LABEL,
 1774|       |            sizeof(DTLS1_SCTP_AUTH_LABEL));
 1775|       |
 1776|       |        /* Don't include the terminating zero. */
 1777|       |        labellen = sizeof(labelbuffer) - 1;
 1778|       |        if (s->mode & SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG)
 1779|       |            labellen += 1;
 1780|       |
 1781|       |        if (SSL_export_keying_material(ssl, sctpauthkey,
 1782|       |                sizeof(sctpauthkey),
 1783|       |                labelbuffer,
 1784|       |                labellen, NULL, 0, 0)
 1785|       |            <= 0) {
 1786|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 1787|       |            goto err;
 1788|       |        }
 1789|       |
 1790|       |        BIO_ctrl(SSL_get_wbio(ssl),
 1791|       |            BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY,
 1792|       |            sizeof(sctpauthkey), sctpauthkey);
 1793|       |    }
 1794|       |#endif
 1795|       |
 1796|       |    /*
 1797|       |     * In TLSv1.3 we have some post-processing to change cipher state, otherwise
 1798|       |     * we're done with this message
 1799|       |     */
 1800|      0|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      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 (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1801|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)
  ------------------
  |  Branch (1801:13): [True: 0, False: 0]
  ------------------
 1802|      0|            || !tls13_store_handshake_traffic_hash(s)) {
  ------------------
  |  Branch (1802:16): [True: 0, False: 0]
  ------------------
 1803|       |            /* SSLfatal() already called */
 1804|      0|            goto err;
 1805|      0|        }
 1806|       |        /*
 1807|       |         * If we're not doing early-data and we're not going to send a dummy CCS
 1808|       |         * (i.e. no middlebox compat mode) then we can change the write keys
 1809|       |         * immediately. Otherwise we have to defer this until after all possible
 1810|       |         * early data is written. We could just always defer until the last
 1811|       |         * moment except QUIC needs it done at the same time as the read keys
 1812|       |         * are changed. Since QUIC doesn't do TLS early data or need middlebox
 1813|       |         * compat this doesn't cause a problem.
 1814|       |         */
 1815|      0|        if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  303|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   29|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (303:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1816|      0|            || (s->early_data_state == SSL_EARLY_DATA_NONE
  ------------------
  |  Branch (1816:17): [True: 0, False: 0]
  ------------------
 1817|      0|                && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0)) {
  ------------------
  |  |  403|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1817:20): [True: 0, False: 0]
  ------------------
 1818|      0|            if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (1818:17): [True: 0, False: 0]
  ------------------
 1819|      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
  |  |  ------------------
  ------------------
 1820|       |                /* SSLfatal() already called */
 1821|      0|                goto err;
 1822|      0|            }
 1823|      0|        }
 1824|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (1824:13): [True: 0, False: 0]
  ------------------
 1825|      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
  |  |  ------------------
  ------------------
 1826|       |            /* SSLfatal() already called */
 1827|      0|            goto err;
 1828|      0|        }
 1829|      0|    }
 1830|       |
 1831|      0|    OPENSSL_free(extensions);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1832|      0|    return MSG_PROCESS_CONTINUE_READING;
 1833|    151|err:
 1834|    151|    OPENSSL_free(extensions);
  ------------------
  |  |  131|    151|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1835|    151|    return MSG_PROCESS_ERROR;
 1836|      0|}
statem_clnt.c:set_client_ciphersuite:
 1391|     41|{
 1392|     41|    STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|     41|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1393|     41|    const SSL_CIPHER *c;
 1394|     41|    int i;
 1395|     41|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|     41|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1396|       |
 1397|     41|    c = ssl_get_cipher_by_char(s, cipherchars, 0);
 1398|     41|    if (c == NULL) {
  ------------------
  |  Branch (1398:9): [True: 13, False: 28]
  ------------------
 1399|       |        /* unknown cipher */
 1400|     13|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_UNKNOWN_CIPHER_RETURNED);
  ------------------
  |  |  148|     13|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|     13|    (ERR_new(),                                                  \
  |  |  |  |  151|     13|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     13|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|     13|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1401|     13|        return 0;
 1402|     13|    }
 1403|       |    /*
 1404|       |     * If it is a disabled cipher we either didn't send it in client hello,
 1405|       |     * or it's not allowed for the selected protocol. So we return an error.
 1406|       |     */
 1407|     28|    if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_CHECK, 1)) {
  ------------------
  |  | 2756|     28|#define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|     28|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1407:9): [True: 6, False: 22]
  ------------------
 1408|      6|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  148|      6|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      6|    (ERR_new(),                                                  \
  |  |  |  |  151|      6|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      6|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      6|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1409|      6|        return 0;
 1410|      6|    }
 1411|       |
 1412|     22|    sk = ssl_get_ciphers_by_id(s);
 1413|     22|    i = sk_SSL_CIPHER_find(sk, c);
  ------------------
  |  | 1022|     22|#define sk_SSL_CIPHER_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 1414|     22|    if (i < 0) {
  ------------------
  |  Branch (1414:9): [True: 2, False: 20]
  ------------------
 1415|       |        /* we did not say we would use this cipher */
 1416|      2|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  148|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      2|    (ERR_new(),                                                  \
  |  |  |  |  151|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1417|      2|        return 0;
 1418|      2|    }
 1419|       |
 1420|     20|    if (SSL_CONNECTION_IS_TLS13(s) && s->s3.tmp.new_cipher != NULL
  ------------------
  |  |  265|     40|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|     40|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     20|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|     20|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 20, False: 0]
  |  |  ------------------
  |  |  266|     20|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     20|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     40|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 20]
  |  |  ------------------
  |  |  267|     40|    && 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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1420:39): [True: 0, False: 0]
  ------------------
 1421|      0|        && s->s3.tmp.new_cipher->id != c->id) {
  ------------------
  |  Branch (1421:12): [True: 0, False: 0]
  ------------------
 1422|       |        /* ServerHello selected a different ciphersuite to that in the HRR */
 1423|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1424|      0|        return 0;
 1425|      0|    }
 1426|       |
 1427|       |    /*
 1428|       |     * Depending on the session caching (internal/external), the cipher
 1429|       |     * and/or cipher_id values may not be set. Make sure that cipher_id is
 1430|       |     * set and use it for comparison.
 1431|       |     */
 1432|     20|    if (s->session->cipher != NULL)
  ------------------
  |  Branch (1432:9): [True: 0, False: 20]
  ------------------
 1433|      0|        s->session->cipher_id = s->session->cipher->id;
 1434|     20|    if (s->hit && (s->session->cipher_id != c->id)) {
  ------------------
  |  Branch (1434:9): [True: 0, False: 20]
  |  Branch (1434:19): [True: 0, False: 0]
  ------------------
 1435|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      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 (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1436|      0|            const EVP_MD *md = ssl_md(sctx, c->algorithm2);
 1437|       |
 1438|      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 (1438:17): [True: 0, False: 0]
  ------------------
 1439|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1440|      0|                return 0;
 1441|      0|            }
 1442|       |            /*
 1443|       |             * In TLSv1.3 it is valid for the server to select a different
 1444|       |             * ciphersuite as long as the hash is the same.
 1445|       |             */
 1446|      0|            if (md == NULL
  ------------------
  |  Branch (1446:17): [True: 0, False: 0]
  ------------------
 1447|      0|                || md != ssl_md(sctx, s->session->cipher->algorithm2)) {
  ------------------
  |  Branch (1447:20): [True: 0, False: 0]
  ------------------
 1448|      0|                SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1449|      0|                    SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED);
 1450|      0|                return 0;
 1451|      0|            }
 1452|      0|        } else {
 1453|       |            /*
 1454|       |             * Prior to TLSv1.3 resuming a session always meant using the same
 1455|       |             * ciphersuite.
 1456|       |             */
 1457|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1458|      0|                SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED);
 1459|      0|            return 0;
 1460|      0|        }
 1461|      0|    }
 1462|     20|    s->s3.tmp.new_cipher = c;
 1463|       |
 1464|     20|    return 1;
 1465|     20|}
statem_clnt.c:ssl_cipher_list_to_bytes:
 4152|  1.95k|{
 4153|  1.95k|    int i;
 4154|  1.95k|    size_t totlen = 0, len, maxlen, maxverok = 0;
 4155|  1.95k|    int empty_reneg_info_scsv = !s->renegotiate
  ------------------
  |  Branch (4155:33): [True: 1.95k, False: 0]
  ------------------
 4156|  1.95k|        && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|  3.90k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.95k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (4156:12): [True: 1.95k, False: 0]
  ------------------
 4157|  1.95k|        && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2766|  1.95k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|  1.95k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                      && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  1.95k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (4157:12): [True: 17, False: 1.93k]
  ------------------
 4158|     17|        && s->min_proto_version <= TLS1_VERSION;
  ------------------
  |  |   24|     17|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (4158:12): [True: 7, False: 10]
  ------------------
 4159|  1.95k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 4160|       |
 4161|       |    /* Set disabled masks for this session */
 4162|  1.95k|    if (!ssl_set_client_disabled(s)) {
  ------------------
  |  Branch (4162:9): [True: 0, False: 1.95k]
  ------------------
 4163|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4164|      0|        return 0;
 4165|      0|    }
 4166|       |
 4167|  1.95k|    if (sk == NULL) {
  ------------------
  |  Branch (4167:9): [True: 0, False: 1.95k]
  ------------------
 4168|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4169|      0|        return 0;
 4170|      0|    }
 4171|       |
 4172|       |#ifdef OPENSSL_MAX_TLS1_2_CIPHER_LENGTH
 4173|       |#if OPENSSL_MAX_TLS1_2_CIPHER_LENGTH < 6
 4174|       |#error Max cipher length too short
 4175|       |#endif
 4176|       |    /*
 4177|       |     * Some servers hang if client hello > 256 bytes as hack workaround
 4178|       |     * chop number of supported ciphers to keep it well below this if we
 4179|       |     * use TLS v1.2
 4180|       |     */
 4181|       |    if (TLS1_get_version(ssl) >= TLS1_2_VERSION)
 4182|       |        maxlen = OPENSSL_MAX_TLS1_2_CIPHER_LENGTH & ~1;
 4183|       |    else
 4184|       |#endif
 4185|       |        /* Maximum length that can be stored in 2 bytes. Length must be even */
 4186|  1.95k|        maxlen = 0xfffe;
 4187|       |
 4188|  1.95k|    if (empty_reneg_info_scsv)
  ------------------
  |  Branch (4188:9): [True: 7, False: 1.94k]
  ------------------
 4189|      7|        maxlen -= 2;
 4190|  1.95k|    if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV)
  ------------------
  |  |  531|  1.95k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (4190:9): [True: 0, False: 1.95k]
  ------------------
 4191|      0|        maxlen -= 2;
 4192|       |
 4193|   115k|    for (i = 0; i < sk_SSL_CIPHER_num(sk) && totlen < maxlen; i++) {
  ------------------
  |  | 1005|   231k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4193:17): [True: 113k, False: 1.95k]
  |  Branch (4193:46): [True: 113k, False: 0]
  ------------------
 4194|   113k|        const SSL_CIPHER *c;
 4195|       |
 4196|   113k|        c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1006|   113k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4197|       |        /* Skip disabled ciphers */
 4198|   113k|        if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0))
  ------------------
  |  | 2752|   113k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|   113k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (4198:13): [True: 57.8k, False: 55.7k]
  ------------------
 4199|  57.8k|            continue;
 4200|       |
 4201|  55.7k|        if (!ssl->method->put_cipher_by_char(c, pkt, &len)) {
  ------------------
  |  Branch (4201:13): [True: 0, False: 55.7k]
  ------------------
 4202|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4203|      0|            return 0;
 4204|      0|        }
 4205|       |
 4206|       |        /* Sanity check that the maximum version we offer has ciphers enabled */
 4207|  55.7k|        if (!maxverok) {
  ------------------
  |  Branch (4207:13): [True: 3.12k, False: 52.5k]
  ------------------
 4208|  3.12k|            int minproto = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  258|  3.12k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.12k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  3.12k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 3.12k]
  |  |  ------------------
  ------------------
 4209|  3.12k|            int maxproto = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  258|  3.12k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.12k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  3.12k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 3.12k]
  |  |  ------------------
  ------------------
 4210|       |
 4211|  3.12k|            if (ssl_version_cmp(s, maxproto, s->s3.tmp.max_ver) >= 0
  ------------------
  |  Branch (4211:17): [True: 1.88k, False: 1.24k]
  ------------------
 4212|  1.88k|                && ssl_version_cmp(s, minproto, s->s3.tmp.max_ver) <= 0)
  ------------------
  |  Branch (4212:20): [True: 1.88k, False: 0]
  ------------------
 4213|  1.88k|                maxverok = 1;
 4214|  3.12k|        }
 4215|       |
 4216|  55.7k|        totlen += len;
 4217|  55.7k|    }
 4218|       |
 4219|  1.95k|    if (totlen == 0 || !maxverok) {
  ------------------
  |  Branch (4219:9): [True: 10, False: 1.94k]
  |  Branch (4219:24): [True: 56, False: 1.88k]
  ------------------
 4220|     66|        const char *maxvertext = !maxverok
  ------------------
  |  Branch (4220:34): [True: 66, False: 0]
  ------------------
 4221|     66|            ? "No ciphers enabled for max supported SSL/TLS version"
 4222|     66|            : NULL;
 4223|       |
 4224|     66|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  150|     66|    (ERR_new(),                                                  \
  |  |  151|     66|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|     66|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|     66|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  | 1243|     66|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|     66|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  195|     66|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
 4225|     66|            maxvertext);
 4226|     66|        return 0;
 4227|     66|    }
 4228|       |
 4229|  1.88k|    if (totlen != 0) {
  ------------------
  |  Branch (4229:9): [True: 1.88k, False: 0]
  ------------------
 4230|  1.88k|        if (empty_reneg_info_scsv) {
  ------------------
  |  Branch (4230:13): [True: 5, False: 1.88k]
  ------------------
 4231|      5|            static const SSL_CIPHER scsv = {
 4232|      5|                0, NULL, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
  ------------------
  |  |   33|      5|#define SSL3_CK_SCSV 0x030000FF
  ------------------
 4233|      5|            };
 4234|      5|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (4234:17): [True: 0, False: 5]
  ------------------
 4235|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4236|      0|                return 0;
 4237|      0|            }
 4238|      5|        }
 4239|  1.88k|        if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV) {
  ------------------
  |  |  531|  1.88k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (4239:13): [True: 0, False: 1.88k]
  ------------------
 4240|      0|            static const SSL_CIPHER scsv = {
 4241|      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
  ------------------
 4242|      0|            };
 4243|      0|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (4243:17): [True: 0, False: 0]
  ------------------
 4244|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4245|      0|                return 0;
 4246|      0|            }
 4247|      0|        }
 4248|  1.88k|    }
 4249|       |
 4250|  1.88k|    return 1;
 4251|  1.88k|}

ssl3_do_write:
   63|  1.83k|{
   64|  1.83k|    int ret;
   65|  1.83k|    size_t written = 0;
   66|  1.83k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
   67|  1.83k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  1.83k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
   68|       |
   69|       |    /*
   70|       |     * If we're running the test suite then we may need to mutate the message
   71|       |     * we've been asked to write. Does not happen in normal operation.
   72|       |     */
   73|  1.83k|    if (s->statem.mutate_handshake_cb != NULL
  ------------------
  |  Branch (73:9): [True: 0, False: 1.83k]
  ------------------
   74|      0|        && !s->statem.write_in_progress
  ------------------
  |  Branch (74:12): [True: 0, False: 0]
  ------------------
   75|      0|        && type == SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|  1.83k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (75:12): [True: 0, False: 0]
  ------------------
   76|      0|        && s->init_num >= SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (76:12): [True: 0, False: 0]
  ------------------
   77|      0|        unsigned char *msg;
   78|      0|        size_t msglen;
   79|       |
   80|      0|        if (!s->statem.mutate_handshake_cb((unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|                s->init_num,
   82|      0|                &msg, &msglen,
   83|      0|                s->statem.mutatearg))
   84|      0|            return -1;
   85|      0|        if (msglen < SSL3_HM_HEADER_LENGTH
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (85:13): [True: 0, False: 0]
  ------------------
   86|      0|            || !BUF_MEM_grow(s->init_buf, msglen))
  ------------------
  |  Branch (86:16): [True: 0, False: 0]
  ------------------
   87|      0|            return -1;
   88|      0|        memcpy(s->init_buf->data, msg, msglen);
   89|      0|        s->init_num = msglen;
   90|      0|        s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
   91|      0|        s->statem.finish_mutate_handshake_cb(s->statem.mutatearg);
   92|      0|        s->statem.write_in_progress = 1;
   93|      0|    }
   94|       |
   95|  1.83k|    ret = ssl3_write_bytes(ssl, type, &s->init_buf->data[s->init_off],
   96|  1.83k|        s->init_num, &written);
   97|  1.83k|    if (ret <= 0)
  ------------------
  |  Branch (97:9): [True: 0, False: 1.83k]
  ------------------
   98|      0|        return -1;
   99|  1.83k|    if (type == SSL3_RT_HANDSHAKE)
  ------------------
  |  |  221|  1.83k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (99:9): [True: 1.83k, False: 0]
  ------------------
  100|       |        /*
  101|       |         * should not be done for 'Hello Request's, but in that case we'll
  102|       |         * ignore the result anyway
  103|       |         * TLS1.3 KeyUpdate and NewSessionTicket do not need to be added
  104|       |         */
  105|  1.83k|        if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  265|  3.66k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|  3.66k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  1.83k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 1.83k, False: 0]
  |  |  ------------------
  |  |  266|  1.83k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.66k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 1.83k, False: 0]
  |  |  ------------------
  |  |  267|  3.66k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  1.83k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 1.83k]
  |  |  ------------------
  ------------------
  106|      0|            || (s->statem.hand_state != TLS_ST_SW_SESSION_TICKET
  ------------------
  |  Branch (106:17): [True: 0, False: 0]
  ------------------
  107|      0|                && s->statem.hand_state != TLS_ST_CW_KEY_UPDATE
  ------------------
  |  Branch (107:20): [True: 0, False: 0]
  ------------------
  108|      0|                && s->statem.hand_state != TLS_ST_SW_KEY_UPDATE))
  ------------------
  |  Branch (108:20): [True: 0, False: 0]
  ------------------
  109|  1.83k|            if (!ssl3_finish_mac(s,
  ------------------
  |  Branch (109:17): [True: 0, False: 1.83k]
  ------------------
  110|  1.83k|                    (unsigned char *)&s->init_buf->data[s->init_off],
  111|  1.83k|                    written))
  112|      0|                return -1;
  113|  1.83k|    if (written == s->init_num) {
  ------------------
  |  Branch (113:9): [True: 1.83k, False: 0]
  ------------------
  114|  1.83k|        s->statem.write_in_progress = 0;
  115|  1.83k|        if (s->msg_callback)
  ------------------
  |  Branch (115:13): [True: 0, False: 1.83k]
  ------------------
  116|      0|            s->msg_callback(1, s->version, type, s->init_buf->data,
  117|      0|                (size_t)(s->init_off + s->init_num), ussl,
  118|      0|                s->msg_callback_arg);
  119|  1.83k|        return 1;
  120|  1.83k|    }
  121|      0|    s->init_off += written;
  122|      0|    s->init_num -= written;
  123|      0|    return 0;
  124|  1.83k|}
tls_close_construct_packet:
  127|  1.83k|{
  128|  1.83k|    size_t msglen;
  129|       |
  130|  1.83k|    if ((htype != SSL3_MT_CHANGE_CIPHER_SPEC && !WPACKET_close(pkt))
  ------------------
  |  |  337|  3.66k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (130:10): [True: 1.83k, False: 0]
  |  Branch (130:49): [True: 0, False: 1.83k]
  ------------------
  131|  1.83k|        || !WPACKET_get_length(pkt, &msglen)
  ------------------
  |  Branch (131:12): [True: 0, False: 1.83k]
  ------------------
  132|  1.83k|        || msglen > INT_MAX)
  ------------------
  |  Branch (132:12): [True: 0, False: 1.83k]
  ------------------
  133|      0|        return 0;
  134|  1.83k|    s->init_num = (int)msglen;
  135|  1.83k|    s->init_off = 0;
  136|       |
  137|  1.83k|    return 1;
  138|  1.83k|}
tls_setup_handshake:
  141|  1.95k|{
  142|  1.95k|    int ver_min, ver_max, ok;
  143|  1.95k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  144|  1.95k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.95k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  145|       |
  146|  1.95k|    if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (146:9): [True: 0, False: 1.95k]
  ------------------
  147|       |        /* SSLfatal() already called */
  148|      0|        return 0;
  149|      0|    }
  150|       |
  151|       |    /* Reset any extension flags */
  152|  1.95k|    memset(s->ext.extflags, 0, sizeof(s->ext.extflags));
  153|       |
  154|  1.95k|    if (ssl_get_min_max_version(s, &ver_min, &ver_max, NULL) != 0) {
  ------------------
  |  Branch (154:9): [True: 5, False: 1.95k]
  ------------------
  155|      5|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  148|      5|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      5|    (ERR_new(),                                                  \
  |  |  |  |  151|      5|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      5|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      5|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  156|      5|        return 0;
  157|      5|    }
  158|       |
  159|       |    /* Sanity check that we have MD5-SHA1 if we need it */
  160|  1.95k|    if (sctx->ssl_digest_methods[SSL_MD_MD5_SHA1_IDX] == NULL) {
  ------------------
  |  |  196|  1.95k|#define SSL_MD_MD5_SHA1_IDX 9
  ------------------
  |  Branch (160:9): [True: 0, False: 1.95k]
  ------------------
  161|      0|        int negotiated_minversion;
  162|      0|        int md5sha1_needed_maxversion = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      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)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  163|      0|            ? DTLS1_VERSION
  ------------------
  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  ------------------
  164|      0|            : TLS1_1_VERSION;
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  165|       |
  166|       |        /* We don't have MD5-SHA1 - do we need it? */
  167|      0|        if (ssl_version_cmp(s, ver_max, md5sha1_needed_maxversion) <= 0) {
  ------------------
  |  Branch (167:13): [True: 0, False: 0]
  ------------------
  168|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1219|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  169|      0|                SSL_R_NO_SUITABLE_DIGEST_ALGORITHM,
  ------------------
  |  |  213|      0|#define SSL_R_NO_SUITABLE_DIGEST_ALGORITHM 297
  ------------------
  170|      0|                "The max supported SSL/TLS version needs the"
  171|      0|                " MD5-SHA1 digest but it is not available"
  172|      0|                " in the loaded providers. Use (D)TLSv1.2 or"
  173|      0|                " above, or load different providers");
  174|      0|            return 0;
  175|      0|        }
  176|       |
  177|      0|        ok = 1;
  178|       |
  179|       |        /* Don't allow TLSv1.1 or below to be negotiated */
  180|      0|        negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |  258|      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)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258: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
  ------------------
  181|      0|        if (ssl_version_cmp(s, ver_min, negotiated_minversion) < 0)
  ------------------
  |  Branch (181:13): [True: 0, False: 0]
  ------------------
  182|      0|            ok = SSL_set_min_proto_version(ssl, negotiated_minversion);
  ------------------
  |  | 1565|      0|    SSL_ctrl(s, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
  |  |  ------------------
  |  |  |  | 1377|      0|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  |  |  ------------------
  ------------------
  183|      0|        if (!ok) {
  ------------------
  |  Branch (183:13): [True: 0, False: 0]
  ------------------
  184|       |            /* Shouldn't happen */
  185|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  186|      0|            return 0;
  187|      0|        }
  188|      0|    }
  189|       |
  190|  1.95k|    ok = 0;
  191|  1.95k|    if (s->server) {
  ------------------
  |  Branch (191:9): [True: 0, False: 1.95k]
  ------------------
  192|      0|        STACK_OF(SSL_CIPHER) *ciphers = SSL_get_ciphers(ssl);
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  193|      0|        int i;
  194|       |
  195|       |        /*
  196|       |         * Sanity check that the maximum version we accept has ciphers
  197|       |         * enabled. For clients we do this check during construction of the
  198|       |         * ClientHello.
  199|       |         */
  200|      0|        for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1005|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (200:21): [True: 0, False: 0]
  ------------------
  201|      0|            const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1006|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  202|      0|            int cipher_minprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      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)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  203|      0|                ? c->min_dtls
  204|      0|                : c->min_tls;
  205|      0|            int cipher_maxprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      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)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  206|      0|                ? c->max_dtls
  207|      0|                : c->max_tls;
  208|       |
  209|      0|            if (ssl_version_cmp(s, ver_max, cipher_minprotover) >= 0
  ------------------
  |  Branch (209:17): [True: 0, False: 0]
  ------------------
  210|      0|                && ssl_version_cmp(s, ver_max, cipher_maxprotover) <= 0) {
  ------------------
  |  Branch (210:20): [True: 0, False: 0]
  ------------------
  211|      0|                ok = 1;
  212|      0|                break;
  213|      0|            }
  214|      0|        }
  215|      0|        if (!ok) {
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1219|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  217|      0|                SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  195|      0|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
  218|      0|                "No ciphers enabled for max supported "
  219|      0|                "SSL/TLS version");
  220|      0|            return 0;
  221|      0|        }
  222|      0|        if (SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  277|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  278|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  223|       |            /* N.B. s->session_ctx == s->ctx here */
  224|      0|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_accept);
  225|      0|        } else {
  226|       |            /* N.B. s->ctx may not equal s->session_ctx */
  227|      0|            ssl_tsan_counter(sctx, &sctx->stats.sess_accept_renegotiate);
  228|       |
  229|      0|            s->s3.tmp.cert_request = 0;
  230|      0|        }
  231|  1.95k|    } else {
  232|  1.95k|        if (SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  277|  1.95k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 1.95k, False: 0]
  |  |  ------------------
  |  |  278|  1.95k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  233|  1.95k|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_connect);
  234|      0|        else
  235|      0|            ssl_tsan_counter(s->session_ctx,
  236|      0|                &s->session_ctx->stats.sess_connect_renegotiate);
  237|       |
  238|       |        /* mark client_random uninitialized */
  239|  1.95k|        memset(s->s3.client_random, 0, sizeof(s->s3.client_random));
  240|  1.95k|        s->hit = 0;
  241|       |
  242|  1.95k|        s->s3.tmp.cert_req = 0;
  243|       |
  244|  1.95k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  258|  1.95k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.95k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.95k]
  |  |  ------------------
  ------------------
  245|      0|            s->statem.use_timer = 1;
  246|  1.95k|    }
  247|       |
  248|  1.95k|    return 1;
  249|  1.95k|}
tls_get_message_header:
 1554|  2.12k|{
 1555|       |    /* s->init_num < SSL3_HM_HEADER_LENGTH */
 1556|  2.12k|    int skip_message, i;
 1557|  2.12k|    uint8_t recvd_type;
 1558|  2.12k|    unsigned char *p;
 1559|  2.12k|    size_t l, readbytes;
 1560|  2.12k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.12k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1561|  2.12k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  2.12k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1562|       |
 1563|  2.12k|    p = (unsigned char *)s->init_buf->data;
 1564|       |
 1565|  2.35k|    do {
 1566|  2.82k|        while (s->init_num < SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|  2.82k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1566:16): [True: 2.38k, False: 435]
  ------------------
 1567|  2.38k|            i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, &recvd_type,
  ------------------
  |  |  221|  2.38k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1568|  2.38k|                &p[s->init_num],
 1569|  2.38k|                SSL3_HM_HEADER_LENGTH - s->init_num,
  ------------------
  |  |  141|  2.38k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1570|  2.38k|                0, &readbytes);
 1571|  2.38k|            if (i <= 0) {
  ------------------
  |  Branch (1571:17): [True: 1.91k, False: 471]
  ------------------
 1572|  1.91k|                s->rwstate = SSL_READING;
  ------------------
  |  |  934|  1.91k|#define SSL_READING 3
  ------------------
 1573|  1.91k|                return 0;
 1574|  1.91k|            }
 1575|    471|            if (recvd_type == SSL3_RT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  219|    471|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1575:17): [True: 4, False: 467]
  ------------------
 1576|       |                /*
 1577|       |                 * A ChangeCipherSpec must be a single byte and may not occur
 1578|       |                 * in the middle of a handshake message.
 1579|       |                 */
 1580|      4|                if (s->init_num != 0 || readbytes != 1 || p[0] != SSL3_MT_CCS) {
  ------------------
  |  |  339|      2|#define SSL3_MT_CCS 1
  ------------------
  |  Branch (1580:21): [True: 1, False: 3]
  |  Branch (1580:41): [True: 1, False: 2]
  |  Branch (1580:59): [True: 1, False: 1]
  ------------------
 1581|      3|                    SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  148|      3|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      3|    (ERR_new(),                                                  \
  |  |  |  |  151|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      3|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      3|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1582|      3|                        SSL_R_BAD_CHANGE_CIPHER_SPEC);
 1583|      3|                    return 0;
 1584|      3|                }
 1585|      1|                if (s->statem.hand_state == TLS_ST_BEFORE
  ------------------
  |  Branch (1585:21): [True: 0, False: 1]
  ------------------
 1586|      0|                    && (s->s3.flags & TLS1_FLAGS_STATELESS) != 0) {
  ------------------
  |  |  304|      0|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (1586:24): [True: 0, False: 0]
  ------------------
 1587|       |                    /*
 1588|       |                     * We are stateless and we received a CCS. Probably this is
 1589|       |                     * from a client between the first and second ClientHellos.
 1590|       |                     * We should ignore this, but return an error because we do
 1591|       |                     * not return success until we see the second ClientHello
 1592|       |                     * with a valid cookie.
 1593|       |                     */
 1594|      0|                    return 0;
 1595|      0|                }
 1596|      1|                s->s3.tmp.message_type = *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|      1|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
 1597|      1|                s->init_num = readbytes - 1;
 1598|      1|                s->init_msg = s->init_buf->data;
 1599|      1|                s->s3.tmp.message_size = readbytes;
 1600|      1|                return 1;
 1601|    467|            } else if (recvd_type != SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|    467|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (1601:24): [True: 0, False: 467]
  ------------------
 1602|      0|                SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1603|      0|                    SSL_R_CCS_RECEIVED_EARLY);
 1604|      0|                return 0;
 1605|      0|            }
 1606|    467|            s->init_num += readbytes;
 1607|    467|        }
 1608|       |
 1609|    435|        skip_message = 0;
 1610|    435|        if (!s->server)
  ------------------
  |  Branch (1610:13): [True: 435, False: 0]
  ------------------
 1611|    435|            if (s->statem.hand_state != TLS_ST_OK
  ------------------
  |  Branch (1611:17): [True: 435, False: 0]
  ------------------
 1612|    435|                && p[0] == SSL3_MT_HELLO_REQUEST)
  ------------------
  |  |  312|    435|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
  |  Branch (1612:20): [True: 233, False: 202]
  ------------------
 1613|       |                /*
 1614|       |                 * The server may always send 'Hello Request' messages --
 1615|       |                 * we are doing a handshake anyway now, so ignore them if
 1616|       |                 * their format is correct. Does not count for 'Finished'
 1617|       |                 * MAC.
 1618|       |                 */
 1619|    233|                if (p[1] == 0 && p[2] == 0 && p[3] == 0) {
  ------------------
  |  Branch (1619:21): [True: 231, False: 2]
  |  Branch (1619:34): [True: 227, False: 4]
  |  Branch (1619:47): [True: 225, False: 2]
  ------------------
 1620|    225|                    s->init_num = 0;
 1621|    225|                    skip_message = 1;
 1622|       |
 1623|    225|                    if (s->msg_callback)
  ------------------
  |  Branch (1623:25): [True: 0, False: 225]
  ------------------
 1624|      0|                        s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE,
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1625|      0|                            p, SSL3_HM_HEADER_LENGTH, ussl,
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1626|      0|                            s->msg_callback_arg);
 1627|    225|                }
 1628|    435|    } while (skip_message);
  ------------------
  |  Branch (1628:14): [True: 225, False: 210]
  ------------------
 1629|       |    /* s->init_num == SSL3_HM_HEADER_LENGTH */
 1630|       |
 1631|    210|    *mt = *p;
 1632|    210|    s->s3.tmp.message_type = *(p++);
 1633|       |
 1634|    210|    if (RECORD_LAYER_is_sslv2_record(&s->rlayer)) {
  ------------------
  |  Branch (1634:9): [True: 0, False: 210]
  ------------------
 1635|       |        /*
 1636|       |         * Only happens with SSLv3+ in an SSLv2 backward compatible
 1637|       |         * ClientHello
 1638|       |         *
 1639|       |         * Total message size is the remaining record bytes to read
 1640|       |         * plus the SSL3_HM_HEADER_LENGTH bytes that we already read
 1641|       |         */
 1642|      0|        l = s->rlayer.tlsrecs[0].length + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1643|      0|        s->s3.tmp.message_size = l;
 1644|       |
 1645|      0|        s->init_msg = s->init_buf->data;
 1646|      0|        s->init_num = SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1647|    210|    } else {
 1648|    210|        n2l3(p, l);
  ------------------
  |  |  196|    210|#define n2l3(c, l) ((l = (((unsigned long)((c)[0])) << 16) | (((unsigned long)((c)[1])) << 8) | (((unsigned long)((c)[2])))), (c) += 3)
  ------------------
 1649|       |        /* BUF_MEM_grow takes an 'int' parameter */
 1650|    210|        if (l > (INT_MAX - SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|    210|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1650:13): [True: 0, False: 210]
  ------------------
 1651|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1652|      0|                SSL_R_EXCESSIVE_MESSAGE_SIZE);
 1653|      0|            return 0;
 1654|      0|        }
 1655|    210|        s->s3.tmp.message_size = l;
 1656|       |
 1657|    210|        s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|    210|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1658|    210|        s->init_num = 0;
 1659|    210|    }
 1660|       |
 1661|    210|    return 1;
 1662|    210|}
tls_get_message_body:
 1665|    182|{
 1666|    182|    size_t n, readbytes;
 1667|    182|    unsigned char *p;
 1668|    182|    int i;
 1669|    182|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|    182|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1670|    182|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|    182|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1671|       |
 1672|    182|    if (s->s3.tmp.message_type == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|    182|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (1672:9): [True: 0, False: 182]
  ------------------
 1673|       |        /* We've already read everything in */
 1674|      0|        *len = (unsigned long)s->init_num;
 1675|      0|        return 1;
 1676|      0|    }
 1677|       |
 1678|    182|    p = s->init_msg;
 1679|    182|    n = s->s3.tmp.message_size - s->init_num;
 1680|    359|    while (n > 0) {
  ------------------
  |  Branch (1680:12): [True: 208, False: 151]
  ------------------
 1681|    208|        i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, NULL,
  ------------------
  |  |  221|    208|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1682|    208|            &p[s->init_num], n, 0, &readbytes);
 1683|    208|        if (i <= 0) {
  ------------------
  |  Branch (1683:13): [True: 31, False: 177]
  ------------------
 1684|     31|            s->rwstate = SSL_READING;
  ------------------
  |  |  934|     31|#define SSL_READING 3
  ------------------
 1685|     31|            *len = 0;
 1686|     31|            return 0;
 1687|     31|        }
 1688|    177|        s->init_num += readbytes;
 1689|    177|        n -= readbytes;
 1690|    177|    }
 1691|       |
 1692|       |    /*
 1693|       |     * If receiving Finished, record MAC of prior handshake messages for
 1694|       |     * Finished verification.
 1695|       |     */
 1696|    151|    if (*(s->init_buf->data) == SSL3_MT_FINISHED && !ssl3_take_mac(s)) {
  ------------------
  |  |  324|    302|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (1696:9): [True: 0, False: 151]
  |  Branch (1696:53): [True: 0, False: 0]
  ------------------
 1697|       |        /* SSLfatal() already called */
 1698|      0|        *len = 0;
 1699|      0|        return 0;
 1700|      0|    }
 1701|       |
 1702|       |    /* Feed this message into MAC computation. */
 1703|    151|    if (RECORD_LAYER_is_sslv2_record(&s->rlayer)) {
  ------------------
  |  Branch (1703:9): [True: 0, False: 151]
  ------------------
 1704|      0|        if (!ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (1704:13): [True: 0, False: 0]
  ------------------
 1705|      0|                s->init_num)) {
 1706|       |            /* SSLfatal() already called */
 1707|      0|            *len = 0;
 1708|      0|            return 0;
 1709|      0|        }
 1710|      0|        if (s->msg_callback)
  ------------------
  |  Branch (1710:13): [True: 0, False: 0]
  ------------------
 1711|      0|            s->msg_callback(0, SSL2_VERSION, 0, s->init_buf->data,
  ------------------
  |  |   23|      0|#define SSL2_VERSION 0x0002
  ------------------
 1712|      0|                (size_t)s->init_num, ussl, s->msg_callback_arg);
 1713|    151|    } else {
 1714|       |        /*
 1715|       |         * We defer feeding in the HRR until later. We'll do it as part of
 1716|       |         * processing the message
 1717|       |         * The TLsv1.3 handshake transcript stops at the ClientFinished
 1718|       |         * message.
 1719|       |         */
 1720|    151|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
 1721|       |        /* KeyUpdate and NewSessionTicket do not need to be added */
 1722|    151|        if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  265|    302|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|    302|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    151|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|    151|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 151, False: 0]
  |  |  ------------------
  |  |  266|    151|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    151|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    302|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 151, False: 0]
  |  |  ------------------
  |  |  267|    302|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|    151|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|    151|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 151]
  |  |  ------------------
  ------------------
 1723|      0|            || (s->s3.tmp.message_type != SSL3_MT_NEWSESSION_TICKET
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (1723:17): [True: 0, False: 0]
  ------------------
 1724|    151|                && s->s3.tmp.message_type != SSL3_MT_KEY_UPDATE)) {
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
  |  Branch (1724:20): [True: 0, False: 0]
  ------------------
 1725|    151|            if (s->s3.tmp.message_type != SSL3_MT_SERVER_HELLO
  ------------------
  |  |  314|    302|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (1725:17): [True: 0, False: 151]
  ------------------
 1726|    151|                || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  | 1720|    151|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|    151|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
                              || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|    302|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1726:20): [True: 8, False: 143]
  ------------------
 1727|    143|                || memcmp(hrrrandom,
  ------------------
  |  Branch (1727:20): [True: 140, False: 3]
  ------------------
 1728|    143|                       s->init_buf->data + SERVER_HELLO_RANDOM_OFFSET,
  ------------------
  |  | 1720|    143|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|    143|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
 1729|    143|                       SSL3_RANDOM_SIZE)
  ------------------
  |  |  137|    143|#define SSL3_RANDOM_SIZE 32
  ------------------
 1730|    148|                    != 0) {
 1731|    148|                if (!ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (1731:21): [True: 0, False: 148]
  ------------------
 1732|    148|                        s->init_num + SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|    148|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1733|       |                    /* SSLfatal() already called */
 1734|      0|                    *len = 0;
 1735|      0|                    return 0;
 1736|      0|                }
 1737|    148|            }
 1738|    151|        }
 1739|    151|        if (s->msg_callback)
  ------------------
  |  Branch (1739:13): [True: 0, False: 151]
  ------------------
 1740|      0|            s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->init_buf->data,
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1741|      0|                (size_t)s->init_num + SSL3_HM_HEADER_LENGTH, ussl,
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1742|      0|                s->msg_callback_arg);
 1743|    151|    }
 1744|       |
 1745|    151|    *len = s->init_num;
 1746|    151|    return 1;
 1747|    151|}
ssl_allow_compression:
 1806|  1.88k|{
 1807|  1.88k|    if (s->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  394|  1.88k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  350|  1.88k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1807:9): [True: 1.88k, False: 0]
  ------------------
 1808|  1.88k|        return 0;
 1809|      0|    return ssl_security(s, SSL_SECOP_COMPRESSION, 0, 0, NULL);
  ------------------
  |  | 2778|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 1810|  1.88k|}
ssl_version_cmp:
 1821|   477k|{
 1822|   477k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  258|   477k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   477k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|   477k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 1823|       |
 1824|   477k|    if (versiona == versionb)
  ------------------
  |  Branch (1824:9): [True: 218k, False: 259k]
  ------------------
 1825|   218k|        return 0;
 1826|   259k|    if (!dtls)
  ------------------
  |  Branch (1826:9): [True: 259k, False: 0]
  ------------------
 1827|   259k|        return versiona < versionb ? -1 : 1;
  ------------------
  |  Branch (1827:16): [True: 206k, False: 52.8k]
  ------------------
 1828|      0|    return DTLS_VERSION_LT(versiona, versionb) ? -1 : 1;
  ------------------
  |  |   60|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (60:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1829|   259k|}
ssl_set_version_bound:
 2080|  5.41k|{
 2081|  5.41k|    int valid_tls;
 2082|  5.41k|    int valid_dtls;
 2083|       |
 2084|  5.41k|    if (version == 0) {
  ------------------
  |  Branch (2084:9): [True: 2.67k, False: 2.73k]
  ------------------
 2085|  2.67k|        *bound = version;
 2086|  2.67k|        return 1;
 2087|  2.67k|    }
 2088|       |
 2089|  2.73k|    valid_tls = version >= SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   23|  5.47k|#define SSL3_VERSION 0x0300
  ------------------
                  valid_tls = version >= SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   50|  2.73k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  5.47k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  |  Branch (2089:17): [True: 2.73k, False: 0]
  |  Branch (2089:44): [True: 2.73k, False: 0]
  ------------------
 2090|  2.73k|    valid_dtls =
 2091|       |        /* We support client side pre-standardisation version of DTLS */
 2092|  2.73k|        (version == DTLS1_BAD_VER)
  ------------------
  |  |   30|  2.73k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (2092:9): [True: 0, False: 2.73k]
  ------------------
 2093|  2.73k|        || (DTLS_VERSION_LE(version, DTLS_MAX_VERSION_INTERNAL)
  ------------------
  |  |   61|  5.47k|#define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|  2.73k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  2.73k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 2.73k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|  2.73k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  2.73k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 2.73k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:33): [True: 0, False: 2.73k]
  |  |  ------------------
  ------------------
 2094|      0|            && DTLS_VERSION_GE(version, DTLS1_VERSION));
  ------------------
  |  |   59|      0|#define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (59:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2095|       |
 2096|  2.73k|    if (!valid_tls && !valid_dtls)
  ------------------
  |  Branch (2096:9): [True: 0, False: 2.73k]
  |  Branch (2096:23): [True: 0, False: 0]
  ------------------
 2097|      0|        return 0;
 2098|       |
 2099|       |    /*-
 2100|       |     * Restrict TLS methods to TLS protocol versions.
 2101|       |     * Restrict DTLS methods to DTLS protocol versions.
 2102|       |     * Note, DTLS version numbers are decreasing, use comparison macros.
 2103|       |     *
 2104|       |     * Note that for both lower-bounds we use explicit versions, not
 2105|       |     * (D)TLS_MIN_VERSION.  This is because we don't want to break user
 2106|       |     * configurations.  If the MIN (supported) version ever rises, the user's
 2107|       |     * "floor" remains valid even if no longer available.  We don't expect the
 2108|       |     * MAX ceiling to ever get lower, so making that variable makes sense.
 2109|       |     *
 2110|       |     * We ignore attempts to set bounds on version-inflexible methods,
 2111|       |     * returning success.
 2112|       |     */
 2113|  2.73k|    switch (method_version) {
 2114|      0|    default:
  ------------------
  |  Branch (2114:5): [True: 0, False: 2.73k]
  ------------------
 2115|      0|        break;
 2116|       |
 2117|  2.73k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  2.73k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2117:5): [True: 2.73k, False: 0]
  ------------------
 2118|  2.73k|        if (valid_tls)
  ------------------
  |  Branch (2118:13): [True: 2.73k, False: 0]
  ------------------
 2119|  2.73k|            *bound = version;
 2120|  2.73k|        break;
 2121|       |
 2122|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2122:5): [True: 0, False: 2.73k]
  ------------------
 2123|      0|        if (valid_dtls)
  ------------------
  |  Branch (2123:13): [True: 0, False: 0]
  ------------------
 2124|      0|            *bound = version;
 2125|      0|        break;
 2126|  2.73k|    }
 2127|  2.73k|    return 1;
 2128|  2.73k|}
ssl_choose_client_version:
 2317|     81|{
 2318|     81|    const version_info *vent;
 2319|     81|    const version_info *table;
 2320|     81|    int ret, ver_min, ver_max, real_max, origv;
 2321|     81|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|     81|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2322|       |
 2323|     81|    origv = s->version;
 2324|     81|    s->version = version;
 2325|       |
 2326|       |    /* This will overwrite s->version if the extension is present */
 2327|     81|    if (!tls_parse_extension(s, TLSEXT_IDX_supported_versions,
  ------------------
  |  Branch (2327:9): [True: 10, False: 71]
  ------------------
 2328|     81|            SSL_EXT_TLS1_2_SERVER_HELLO
  ------------------
  |  |  301|     81|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 2329|     81|                | SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  302|     81|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 2330|     81|            extensions,
 2331|     81|            NULL, 0)) {
 2332|     10|        s->version = origv;
 2333|     10|        return 0;
 2334|     10|    }
 2335|       |
 2336|     71|    if (s->hello_retry_request != SSL_HRR_NONE
  ------------------
  |  Branch (2336:9): [True: 0, False: 71]
  ------------------
 2337|      0|        && s->version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2337:12): [True: 0, False: 0]
  ------------------
 2338|      0|        s->version = origv;
 2339|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_WRONG_SSL_VERSION);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2340|      0|        return 0;
 2341|      0|    }
 2342|       |
 2343|     71|    switch (ssl->method->version) {
 2344|      0|    default:
  ------------------
  |  Branch (2344:5): [True: 0, False: 71]
  ------------------
 2345|      0|        if (s->version != ssl->method->version) {
  ------------------
  |  Branch (2345:13): [True: 0, False: 0]
  ------------------
 2346|      0|            s->version = origv;
 2347|      0|            SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_WRONG_SSL_VERSION);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2348|      0|            return 0;
 2349|      0|        }
 2350|       |        /*
 2351|       |         * If this SSL handle is not from a version flexible method we don't
 2352|       |         * (and never did) check min/max, FIPS or Suite B constraints.  Hope
 2353|       |         * that's OK.  It is up to the caller to not choose fixed protocol
 2354|       |         * versions they don't want.  If not, then easy to fix, just return
 2355|       |         * ssl_method_error(s, s->method)
 2356|       |         */
 2357|      0|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (2357:13): [True: 0, False: 0]
  ------------------
 2358|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2359|      0|            return 0;
 2360|      0|        }
 2361|      0|        return 1;
 2362|     71|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|     71|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2362:5): [True: 71, False: 0]
  ------------------
 2363|     71|        table = tls_version_table;
 2364|     71|        break;
 2365|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2365:5): [True: 0, False: 71]
  ------------------
 2366|      0|        table = dtls_version_table;
 2367|      0|        break;
 2368|     71|    }
 2369|       |
 2370|     71|    ret = ssl_get_min_max_version(s, &ver_min, &ver_max, &real_max);
 2371|     71|    if (ret != 0) {
  ------------------
  |  Branch (2371:9): [True: 0, False: 71]
  ------------------
 2372|      0|        s->version = origv;
 2373|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, ret);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2374|      0|        return 0;
 2375|      0|    }
 2376|     71|    if (ssl_version_cmp(s, s->version, ver_min) < 0
  ------------------
  |  Branch (2376:9): [True: 2, False: 69]
  ------------------
 2377|     69|        || ssl_version_cmp(s, s->version, ver_max) > 0) {
  ------------------
  |  Branch (2377:12): [True: 22, False: 47]
  ------------------
 2378|     24|        s->version = origv;
 2379|     24|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_PROTOCOL);
  ------------------
  |  |  148|     24|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|     24|    (ERR_new(),                                                  \
  |  |  |  |  151|     24|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     24|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|     24|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2380|     24|        return 0;
 2381|     24|    }
 2382|       |
 2383|     47|    if ((s->mode & SSL_MODE_SEND_FALLBACK_SCSV) == 0)
  ------------------
  |  |  531|     47|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2383:9): [True: 47, False: 0]
  ------------------
 2384|     47|        real_max = ver_max;
 2385|       |
 2386|       |    /* Check for downgrades */
 2387|       |    /* TODO(DTLSv1.3): Update this code for DTLSv1.3 */
 2388|     47|    if (!SSL_CONNECTION_IS_DTLS(s) && real_max > s->version) {
  ------------------
  |  |  258|     94|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|     47|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|     47|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2388:9): [True: 47, False: 0]
  |  Branch (2388:39): [True: 45, False: 2]
  ------------------
 2389|       |        /* Signal applies to all versions */
 2390|     45|        if (memcmp(tls11downgrade,
  ------------------
  |  Branch (2390:13): [True: 1, False: 44]
  ------------------
 2391|     45|                s->s3.server_random + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|     45|#define SSL3_RANDOM_SIZE 32
  ------------------
 2392|     45|                    - sizeof(tls11downgrade),
 2393|     45|                sizeof(tls11downgrade))
 2394|     45|            == 0) {
 2395|      1|            s->version = origv;
 2396|      1|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2397|      1|                SSL_R_INAPPROPRIATE_FALLBACK);
 2398|      1|            return 0;
 2399|      1|        }
 2400|       |        /* Only when accepting TLS1.3 */
 2401|     44|        if (real_max == TLS1_3_VERSION
  ------------------
  |  |   27|     88|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2401:13): [True: 44, False: 0]
  ------------------
 2402|     44|            && memcmp(tls12downgrade,
  ------------------
  |  Branch (2402:16): [True: 1, False: 43]
  ------------------
 2403|     44|                   s->s3.server_random + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|     44|#define SSL3_RANDOM_SIZE 32
  ------------------
 2404|     44|                       - sizeof(tls12downgrade),
 2405|     44|                   sizeof(tls12downgrade))
 2406|     44|                == 0) {
 2407|      1|            s->version = origv;
 2408|      1|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2409|      1|                SSL_R_INAPPROPRIATE_FALLBACK);
 2410|      1|            return 0;
 2411|      1|        }
 2412|     44|    }
 2413|       |
 2414|     88|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2414:24): [True: 88, False: 0]
  ------------------
 2415|     88|        if (vent->cmeth == NULL || s->version != vent->version)
  ------------------
  |  Branch (2415:13): [True: 0, False: 88]
  |  Branch (2415:36): [True: 43, False: 45]
  ------------------
 2416|     43|            continue;
 2417|       |
 2418|     45|        ssl->method = vent->cmeth();
 2419|     45|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (2419:13): [True: 0, False: 45]
  ------------------
 2420|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2421|      0|            return 0;
 2422|      0|        }
 2423|     45|        return 1;
 2424|     45|    }
 2425|       |
 2426|      0|    s->version = origv;
 2427|       |    SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_PROTOCOL);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2428|      0|    return 0;
 2429|     45|}
ssl_get_min_max_version:
 2455|  17.1k|{
 2456|  17.1k|    int version, tmp_real_max;
 2457|  17.1k|    int hole;
 2458|  17.1k|    const SSL_METHOD *method;
 2459|  17.1k|    const version_info *table;
 2460|  17.1k|    const version_info *vent;
 2461|  17.1k|    const SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  17.1k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2462|       |
 2463|  17.1k|    switch (ssl->method->version) {
 2464|      0|    default:
  ------------------
  |  Branch (2464:5): [True: 0, False: 17.1k]
  ------------------
 2465|       |        /*
 2466|       |         * If this SSL handle is not from a version flexible method we don't
 2467|       |         * (and never did) check min/max FIPS or Suite B constraints.  Hope
 2468|       |         * that's OK.  It is up to the caller to not choose fixed protocol
 2469|       |         * versions they don't want.  If not, then easy to fix, just return
 2470|       |         * ssl_method_error(s, s->method)
 2471|       |         */
 2472|      0|        *min_version = *max_version = s->version;
 2473|       |        /*
 2474|       |         * Providing a real_max only makes sense where we're using a version
 2475|       |         * flexible method.
 2476|       |         */
 2477|      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 (2477:13): [True: 0, False: 0]
  ------------------
 2478|      0|            return ERR_R_INTERNAL_ERROR;
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2479|      0|        return 0;
 2480|  17.1k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  17.1k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2480:5): [True: 17.1k, False: 0]
  ------------------
 2481|  17.1k|        table = tls_version_table;
 2482|  17.1k|        break;
 2483|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2483:5): [True: 0, False: 17.1k]
  ------------------
 2484|      0|        table = dtls_version_table;
 2485|      0|        break;
 2486|  17.1k|    }
 2487|       |
 2488|       |    /*
 2489|       |     * SSL_OP_NO_X disables all protocols above X *if* there are some protocols
 2490|       |     * below X enabled. This is required in order to maintain the "version
 2491|       |     * capability" vector contiguous. Any versions with a NULL client method
 2492|       |     * (protocol version client is disabled at compile-time) is also a "hole".
 2493|       |     *
 2494|       |     * Our initial state is hole == 1, version == 0.  That is, versions above
 2495|       |     * the first version in the method table are disabled (a "hole" above
 2496|       |     * the valid protocol entries) and we don't have a selected version yet.
 2497|       |     *
 2498|       |     * Whenever "hole == 1", and we hit an enabled method, its version becomes
 2499|       |     * the selected version.  We're no longer in a hole, so "hole" becomes 0.
 2500|       |     *
 2501|       |     * If "hole == 0" and we hit an enabled method, we support a contiguous
 2502|       |     * range of at least two methods.  If we hit a disabled method,
 2503|       |     * then hole becomes true again, but nothing else changes yet,
 2504|       |     * because all the remaining methods may be disabled too.
 2505|       |     * If we again hit an enabled method after the new hole, it becomes
 2506|       |     * selected, as we start from scratch.
 2507|       |     */
 2508|  17.1k|    *min_version = version = 0;
 2509|  17.1k|    hole = 1;
 2510|  17.1k|    if (real_max != NULL)
  ------------------
  |  Branch (2510:9): [True: 71, False: 17.1k]
  ------------------
 2511|     71|        *real_max = 0;
 2512|  17.1k|    tmp_real_max = 0;
 2513|   103k|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2513:24): [True: 85.9k, False: 17.1k]
  ------------------
 2514|       |        /*
 2515|       |         * A table entry with a NULL client method is still a hole in the
 2516|       |         * "version capability" vector.
 2517|       |         */
 2518|  85.9k|        if (vent->cmeth == NULL) {
  ------------------
  |  Branch (2518:13): [True: 0, False: 85.9k]
  ------------------
 2519|      0|            hole = 1;
 2520|      0|            tmp_real_max = 0;
 2521|      0|            continue;
 2522|      0|        }
 2523|  85.9k|        method = vent->cmeth();
 2524|       |
 2525|  85.9k|        if (hole == 1 && tmp_real_max == 0)
  ------------------
  |  Branch (2525:13): [True: 51.6k, False: 34.2k]
  |  Branch (2525:26): [True: 17.1k, False: 34.4k]
  ------------------
 2526|  17.1k|            tmp_real_max = vent->version;
 2527|       |
 2528|  85.9k|        if (ssl_method_error(s, method) != 0) {
  ------------------
  |  Branch (2528:13): [True: 51.6k, False: 34.2k]
  ------------------
 2529|  51.6k|            hole = 1;
 2530|  51.6k|        } else if (!hole) {
  ------------------
  |  Branch (2530:20): [True: 17.0k, False: 17.1k]
  ------------------
 2531|  17.0k|            *min_version = method->version;
 2532|  17.1k|        } else {
 2533|  17.1k|            if (real_max != NULL && tmp_real_max != 0)
  ------------------
  |  Branch (2533:17): [True: 71, False: 17.1k]
  |  Branch (2533:37): [True: 71, False: 0]
  ------------------
 2534|     71|                *real_max = tmp_real_max;
 2535|  17.1k|            version = method->version;
 2536|  17.1k|            *min_version = version;
 2537|  17.1k|            hole = 0;
 2538|  17.1k|        }
 2539|  85.9k|    }
 2540|       |
 2541|  17.1k|    *max_version = version;
 2542|       |
 2543|       |    /* Fail if everything is disabled */
 2544|  17.1k|    if (version == 0)
  ------------------
  |  Branch (2544:9): [True: 5, False: 17.1k]
  ------------------
 2545|      5|        return SSL_R_NO_PROTOCOLS_AVAILABLE;
  ------------------
  |  |  205|      5|#define SSL_R_NO_PROTOCOLS_AVAILABLE 191
  ------------------
 2546|       |
 2547|  17.1k|    return 0;
 2548|  17.1k|}
ssl_set_client_hello_version:
 2559|  1.95k|{
 2560|  1.95k|    int ver_min, ver_max, ret;
 2561|       |
 2562|       |    /*
 2563|       |     * In a renegotiation we always send the same client_version that we sent
 2564|       |     * last time, regardless of which version we eventually negotiated.
 2565|       |     */
 2566|  1.95k|    if (!SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  277|  1.95k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 1.95k, False: 0]
  |  |  ------------------
  |  |  278|  1.95k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2567|      0|        return 0;
 2568|       |
 2569|  1.95k|    ret = ssl_get_min_max_version(s, &ver_min, &ver_max, NULL);
 2570|       |
 2571|  1.95k|    if (ret != 0)
  ------------------
  |  Branch (2571:9): [True: 0, False: 1.95k]
  ------------------
 2572|      0|        return ret;
 2573|       |
 2574|  1.95k|    s->version = ver_max;
 2575|       |
 2576|  1.95k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.95k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.95k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.95k]
  |  |  ------------------
  ------------------
 2577|      0|        if (ver_max == DTLS1_BAD_VER) {
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (2577:13): [True: 0, False: 0]
  ------------------
 2578|       |            /*
 2579|       |             * Even though this is technically before version negotiation,
 2580|       |             * because we have asked for DTLS1_BAD_VER we will never negotiate
 2581|       |             * anything else, and this has impacts on the record layer for when
 2582|       |             * we read the ServerHello. So we need to tell the record layer
 2583|       |             * about this immediately.
 2584|       |             */
 2585|      0|            if (!ssl_set_record_protocol_version(s, ver_max))
  ------------------
  |  Branch (2585:17): [True: 0, False: 0]
  ------------------
 2586|      0|                return 0;
 2587|      0|        }
 2588|  1.95k|    } else if (ver_max > TLS1_2_VERSION) {
  ------------------
  |  |   26|  1.95k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (2588:16): [True: 1.93k, False: 16]
  ------------------
 2589|       |        /* TLS1.3 always uses TLS1.2 in the legacy_version field */
 2590|  1.93k|        ver_max = TLS1_2_VERSION;
  ------------------
  |  |   26|  1.93k|#define TLS1_2_VERSION 0x0303
  ------------------
 2591|  1.93k|    }
 2592|       |
 2593|  1.95k|    s->client_version = ver_max;
 2594|  1.95k|    return 0;
 2595|  1.95k|}
get_ca_names:
 2742|  1.81k|{
 2743|  1.81k|    const STACK_OF(X509_NAME) *ca_sk = NULL;
 2744|  1.81k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.81k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2745|       |
 2746|  1.81k|    if (s->server) {
  ------------------
  |  Branch (2746:9): [True: 0, False: 1.81k]
  ------------------
 2747|      0|        ca_sk = SSL_get_client_CA_list(ssl);
 2748|      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 (2748:13): [True: 0, False: 0]
  |  Branch (2748:30): [True: 0, False: 0]
  ------------------
 2749|      0|            ca_sk = NULL;
 2750|      0|    }
 2751|       |
 2752|  1.81k|    if (ca_sk == NULL)
  ------------------
  |  Branch (2752:9): [True: 1.81k, False: 0]
  ------------------
 2753|  1.81k|        ca_sk = SSL_get0_CA_list(ssl);
 2754|       |
 2755|  1.81k|    return ca_sk;
 2756|  1.81k|}
statem_lib.c:ssl_method_error:
 1901|  85.9k|{
 1902|  85.9k|    int version = method->version;
 1903|       |
 1904|  85.9k|    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)
  ------------------
  |  | 2766|  34.5k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|  34.5k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1904:10): [True: 85.9k, False: 0]
  |  Branch (1904:39): [True: 51.3k, False: 34.5k]
  |  Branch (1904:97): [True: 124, False: 34.4k]
  ------------------
 1905|  51.4k|        return SSL_R_VERSION_TOO_LOW;
  ------------------
  |  |  367|  51.4k|#define SSL_R_VERSION_TOO_LOW 396
  ------------------
 1906|       |
 1907|  34.4k|    if (s->max_proto_version != 0 && ssl_version_cmp(s, version, s->max_proto_version) > 0)
  ------------------
  |  Branch (1907:9): [True: 450, False: 34.0k]
  |  Branch (1907:38): [True: 180, False: 270]
  ------------------
 1908|    180|        return SSL_R_VERSION_TOO_HIGH;
  ------------------
  |  |  366|    180|#define SSL_R_VERSION_TOO_HIGH 166
  ------------------
 1909|       |
 1910|  34.2k|    if ((s->options & method->mask) != 0)
  ------------------
  |  Branch (1910:9): [True: 0, False: 34.2k]
  ------------------
 1911|      0|        return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  361|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 1912|  34.2k|    if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2342|  34.2k|#define SSL_METHOD_NO_SUITEB (1U << 1)
  ------------------
                  if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2029|    132|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  562|    132|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2029:24): [True: 0, False: 132]
  |  |  ------------------
  ------------------
  |  Branch (1912:9): [True: 132, False: 34.1k]
  ------------------
 1913|      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
  ------------------
 1914|       |
 1915|  34.2k|    return 0;
 1916|  34.2k|}

tls1_alert_code:
  526|  1.80k|{
  527|  1.80k|    switch (code) {
  528|      0|    case SSL_AD_CLOSE_NOTIFY:
  ------------------
  |  | 1209|      0|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (528:5): [True: 0, False: 1.80k]
  ------------------
  529|      0|        return SSL3_AD_CLOSE_NOTIFY;
  ------------------
  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  ------------------
  530|     29|    case SSL_AD_UNEXPECTED_MESSAGE:
  ------------------
  |  | 1211|     29|#define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE
  |  |  ------------------
  |  |  |  |  253|     29|#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (530:5): [True: 29, False: 1.77k]
  ------------------
  531|     29|        return SSL3_AD_UNEXPECTED_MESSAGE;
  ------------------
  |  |  253|     29|#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */
  ------------------
  532|      0|    case SSL_AD_BAD_RECORD_MAC:
  ------------------
  |  | 1213|      0|#define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC
  |  |  ------------------
  |  |  |  |  254|      0|#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (532:5): [True: 0, False: 1.80k]
  ------------------
  533|      0|        return SSL3_AD_BAD_RECORD_MAC;
  ------------------
  |  |  254|      0|#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */
  ------------------
  534|      0|    case SSL_AD_DECRYPTION_FAILED:
  ------------------
  |  | 1214|      0|#define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED
  |  |  ------------------
  |  |  |  |   57|      0|#define TLS1_AD_DECRYPTION_FAILED 21
  |  |  ------------------
  ------------------
  |  Branch (534:5): [True: 0, False: 1.80k]
  ------------------
  535|      0|        return TLS1_AD_DECRYPTION_FAILED;
  ------------------
  |  |   57|      0|#define TLS1_AD_DECRYPTION_FAILED 21
  ------------------
  536|      3|    case SSL_AD_RECORD_OVERFLOW:
  ------------------
  |  | 1215|      3|#define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW
  |  |  ------------------
  |  |  |  |   58|      3|#define TLS1_AD_RECORD_OVERFLOW 22
  |  |  ------------------
  ------------------
  |  Branch (536:5): [True: 3, False: 1.80k]
  ------------------
  537|      3|        return TLS1_AD_RECORD_OVERFLOW;
  ------------------
  |  |   58|      3|#define TLS1_AD_RECORD_OVERFLOW 22
  ------------------
  538|      0|    case SSL_AD_DECOMPRESSION_FAILURE:
  ------------------
  |  | 1217|      0|#define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE
  |  |  ------------------
  |  |  |  |  255|      0|#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (538:5): [True: 0, False: 1.80k]
  ------------------
  539|      0|        return SSL3_AD_DECOMPRESSION_FAILURE;
  ------------------
  |  |  255|      0|#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */
  ------------------
  540|      7|    case SSL_AD_HANDSHAKE_FAILURE:
  ------------------
  |  | 1219|      7|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      7|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (540:5): [True: 7, False: 1.79k]
  ------------------
  541|      7|        return SSL3_AD_HANDSHAKE_FAILURE;
  ------------------
  |  |  256|      7|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  ------------------
  542|      0|    case SSL_AD_NO_CERTIFICATE:
  ------------------
  |  | 1221|      0|#define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE
  |  |  ------------------
  |  |  |  |  257|      0|#define SSL3_AD_NO_CERTIFICATE 41
  |  |  ------------------
  ------------------
  |  Branch (542:5): [True: 0, False: 1.80k]
  ------------------
  543|      0|        return -1;
  544|      0|    case SSL_AD_BAD_CERTIFICATE:
  ------------------
  |  | 1222|      0|#define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE
  |  |  ------------------
  |  |  |  |  258|      0|#define SSL3_AD_BAD_CERTIFICATE 42
  |  |  ------------------
  ------------------
  |  Branch (544:5): [True: 0, False: 1.80k]
  ------------------
  545|      0|        return SSL3_AD_BAD_CERTIFICATE;
  ------------------
  |  |  258|      0|#define SSL3_AD_BAD_CERTIFICATE 42
  ------------------
  546|      0|    case SSL_AD_UNSUPPORTED_CERTIFICATE:
  ------------------
  |  | 1223|      0|#define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE
  |  |  ------------------
  |  |  |  |  259|      0|#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
  |  |  ------------------
  ------------------
  |  Branch (546:5): [True: 0, False: 1.80k]
  ------------------
  547|      0|        return SSL3_AD_UNSUPPORTED_CERTIFICATE;
  ------------------
  |  |  259|      0|#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
  ------------------
  548|      0|    case SSL_AD_CERTIFICATE_REVOKED:
  ------------------
  |  | 1224|      0|#define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED
  |  |  ------------------
  |  |  |  |  260|      0|#define SSL3_AD_CERTIFICATE_REVOKED 44
  |  |  ------------------
  ------------------
  |  Branch (548:5): [True: 0, False: 1.80k]
  ------------------
  549|      0|        return SSL3_AD_CERTIFICATE_REVOKED;
  ------------------
  |  |  260|      0|#define SSL3_AD_CERTIFICATE_REVOKED 44
  ------------------
  550|      0|    case SSL_AD_CERTIFICATE_EXPIRED:
  ------------------
  |  | 1225|      0|#define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED
  |  |  ------------------
  |  |  |  |  261|      0|#define SSL3_AD_CERTIFICATE_EXPIRED 45
  |  |  ------------------
  ------------------
  |  Branch (550:5): [True: 0, False: 1.80k]
  ------------------
  551|      0|        return SSL3_AD_CERTIFICATE_EXPIRED;
  ------------------
  |  |  261|      0|#define SSL3_AD_CERTIFICATE_EXPIRED 45
  ------------------
  552|      0|    case SSL_AD_CERTIFICATE_UNKNOWN:
  ------------------
  |  | 1226|      0|#define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN
  |  |  ------------------
  |  |  |  |  262|      0|#define SSL3_AD_CERTIFICATE_UNKNOWN 46
  |  |  ------------------
  ------------------
  |  Branch (552:5): [True: 0, False: 1.80k]
  ------------------
  553|      0|        return SSL3_AD_CERTIFICATE_UNKNOWN;
  ------------------
  |  |  262|      0|#define SSL3_AD_CERTIFICATE_UNKNOWN 46
  ------------------
  554|     67|    case SSL_AD_ILLEGAL_PARAMETER:
  ------------------
  |  | 1228|     67|#define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER
  |  |  ------------------
  |  |  |  |  263|     67|#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (554:5): [True: 67, False: 1.73k]
  ------------------
  555|     67|        return SSL3_AD_ILLEGAL_PARAMETER;
  ------------------
  |  |  263|     67|#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */
  ------------------
  556|      0|    case SSL_AD_UNKNOWN_CA:
  ------------------
  |  | 1230|      0|#define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA
  |  |  ------------------
  |  |  |  |   59|      0|#define TLS1_AD_UNKNOWN_CA 48 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (556:5): [True: 0, False: 1.80k]
  ------------------
  557|      0|        return TLS1_AD_UNKNOWN_CA;
  ------------------
  |  |   59|      0|#define TLS1_AD_UNKNOWN_CA 48 /* fatal */
  ------------------
  558|      0|    case SSL_AD_ACCESS_DENIED:
  ------------------
  |  | 1232|      0|#define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED
  |  |  ------------------
  |  |  |  |   60|      0|#define TLS1_AD_ACCESS_DENIED 49 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (558:5): [True: 0, False: 1.80k]
  ------------------
  559|      0|        return TLS1_AD_ACCESS_DENIED;
  ------------------
  |  |   60|      0|#define TLS1_AD_ACCESS_DENIED 49 /* fatal */
  ------------------
  560|  1.52k|    case SSL_AD_DECODE_ERROR:
  ------------------
  |  | 1234|  1.52k|#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR
  |  |  ------------------
  |  |  |  |   61|  1.52k|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (560:5): [True: 1.52k, False: 280]
  ------------------
  561|  1.52k|        return TLS1_AD_DECODE_ERROR;
  ------------------
  |  |   61|  1.52k|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  ------------------
  562|      0|    case SSL_AD_DECRYPT_ERROR:
  ------------------
  |  | 1235|      0|#define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR
  |  |  ------------------
  |  |  |  |   62|      0|#define TLS1_AD_DECRYPT_ERROR 51
  |  |  ------------------
  ------------------
  |  Branch (562:5): [True: 0, False: 1.80k]
  ------------------
  563|      0|        return TLS1_AD_DECRYPT_ERROR;
  ------------------
  |  |   62|      0|#define TLS1_AD_DECRYPT_ERROR 51
  ------------------
  564|      0|    case SSL_AD_EXPORT_RESTRICTION:
  ------------------
  |  | 1237|      0|#define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION
  |  |  ------------------
  |  |  |  |   63|      0|#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (564:5): [True: 0, False: 1.80k]
  ------------------
  565|      0|        return TLS1_AD_EXPORT_RESTRICTION;
  ------------------
  |  |   63|      0|#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */
  ------------------
  566|     47|    case SSL_AD_PROTOCOL_VERSION:
  ------------------
  |  | 1239|     47|#define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION
  |  |  ------------------
  |  |  |  |   64|     47|#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (566:5): [True: 47, False: 1.75k]
  ------------------
  567|     47|        return TLS1_AD_PROTOCOL_VERSION;
  ------------------
  |  |   64|     47|#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
  ------------------
  568|      0|    case SSL_AD_INSUFFICIENT_SECURITY:
  ------------------
  |  | 1241|      0|#define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY
  |  |  ------------------
  |  |  |  |   65|      0|#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (568:5): [True: 0, False: 1.80k]
  ------------------
  569|      0|        return TLS1_AD_INSUFFICIENT_SECURITY;
  ------------------
  |  |   65|      0|#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */
  ------------------
  570|    118|    case SSL_AD_INTERNAL_ERROR:
  ------------------
  |  | 1243|    118|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|    118|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (570:5): [True: 118, False: 1.68k]
  ------------------
  571|    118|        return TLS1_AD_INTERNAL_ERROR;
  ------------------
  |  |   66|    118|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  ------------------
  572|      0|    case SSL_AD_USER_CANCELLED:
  ------------------
  |  | 1244|      0|#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
  |  |  ------------------
  |  |  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  |  |  ------------------
  ------------------
  |  Branch (572:5): [True: 0, False: 1.80k]
  ------------------
  573|      0|        return TLS1_AD_USER_CANCELLED;
  ------------------
  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  ------------------
  574|      0|    case SSL_AD_NO_RENEGOTIATION:
  ------------------
  |  | 1245|      0|#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
  |  |  ------------------
  |  |  |  |   69|      0|#define TLS1_AD_NO_RENEGOTIATION 100
  |  |  ------------------
  ------------------
  |  Branch (574:5): [True: 0, False: 1.80k]
  ------------------
  575|      0|        return TLS1_AD_NO_RENEGOTIATION;
  ------------------
  |  |   69|      0|#define TLS1_AD_NO_RENEGOTIATION 100
  ------------------
  576|      9|    case SSL_AD_UNSUPPORTED_EXTENSION:
  ------------------
  |  | 1248|      9|#define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION
  |  |  ------------------
  |  |  |  |   74|      9|#define TLS1_AD_UNSUPPORTED_EXTENSION 110
  |  |  ------------------
  ------------------
  |  Branch (576:5): [True: 9, False: 1.79k]
  ------------------
  577|      9|        return TLS1_AD_UNSUPPORTED_EXTENSION;
  ------------------
  |  |   74|      9|#define TLS1_AD_UNSUPPORTED_EXTENSION 110
  ------------------
  578|      0|    case SSL_AD_CERTIFICATE_UNOBTAINABLE:
  ------------------
  |  | 1249|      0|#define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE
  |  |  ------------------
  |  |  |  |   75|      0|#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  |  |  ------------------
  ------------------
  |  Branch (578:5): [True: 0, False: 1.80k]
  ------------------
  579|      0|        return TLS1_AD_CERTIFICATE_UNOBTAINABLE;
  ------------------
  |  |   75|      0|#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  ------------------
  580|      0|    case SSL_AD_UNRECOGNIZED_NAME:
  ------------------
  |  | 1250|      0|#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME
  |  |  ------------------
  |  |  |  |   76|      0|#define TLS1_AD_UNRECOGNIZED_NAME 112
  |  |  ------------------
  ------------------
  |  Branch (580:5): [True: 0, False: 1.80k]
  ------------------
  581|      0|        return TLS1_AD_UNRECOGNIZED_NAME;
  ------------------
  |  |   76|      0|#define TLS1_AD_UNRECOGNIZED_NAME 112
  ------------------
  582|      0|    case SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
  ------------------
  |  | 1251|      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 (582:5): [True: 0, False: 1.80k]
  ------------------
  583|      0|        return TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE;
  ------------------
  |  |   77|      0|#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
  ------------------
  584|      0|    case SSL_AD_BAD_CERTIFICATE_HASH_VALUE:
  ------------------
  |  | 1252|      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 (584:5): [True: 0, False: 1.80k]
  ------------------
  585|      0|        return TLS1_AD_BAD_CERTIFICATE_HASH_VALUE;
  ------------------
  |  |   78|      0|#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
  ------------------
  586|      0|    case SSL_AD_UNKNOWN_PSK_IDENTITY:
  ------------------
  |  | 1254|      0|#define SSL_AD_UNKNOWN_PSK_IDENTITY TLS1_AD_UNKNOWN_PSK_IDENTITY
  |  |  ------------------
  |  |  |  |   79|      0|#define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (586:5): [True: 0, False: 1.80k]
  ------------------
  587|      0|        return TLS1_AD_UNKNOWN_PSK_IDENTITY;
  ------------------
  |  |   79|      0|#define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */
  ------------------
  588|      0|    case SSL_AD_INAPPROPRIATE_FALLBACK:
  ------------------
  |  | 1256|      0|#define SSL_AD_INAPPROPRIATE_FALLBACK TLS1_AD_INAPPROPRIATE_FALLBACK
  |  |  ------------------
  |  |  |  |   67|      0|#define TLS1_AD_INAPPROPRIATE_FALLBACK 86 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (588:5): [True: 0, False: 1.80k]
  ------------------
  589|      0|        return TLS1_AD_INAPPROPRIATE_FALLBACK;
  ------------------
  |  |   67|      0|#define TLS1_AD_INAPPROPRIATE_FALLBACK 86 /* fatal */
  ------------------
  590|      0|    case SSL_AD_NO_APPLICATION_PROTOCOL:
  ------------------
  |  | 1257|      0|#define SSL_AD_NO_APPLICATION_PROTOCOL TLS1_AD_NO_APPLICATION_PROTOCOL
  |  |  ------------------
  |  |  |  |   80|      0|#define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (590:5): [True: 0, False: 1.80k]
  ------------------
  591|      0|        return TLS1_AD_NO_APPLICATION_PROTOCOL;
  ------------------
  |  |   80|      0|#define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  ------------------
  592|      0|    case SSL_AD_CERTIFICATE_REQUIRED:
  ------------------
  |  | 1247|      0|#define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED
  |  |  ------------------
  |  |  |  |   72|      0|#define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (592:5): [True: 0, False: 1.80k]
  ------------------
  593|      0|        return SSL_AD_HANDSHAKE_FAILURE;
  ------------------
  |  | 1219|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  594|      0|    case TLS13_AD_MISSING_EXTENSION:
  ------------------
  |  |   71|      0|#define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
  ------------------
  |  Branch (594:5): [True: 0, False: 1.80k]
  ------------------
  595|      0|        return SSL_AD_HANDSHAKE_FAILURE;
  ------------------
  |  | 1219|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  596|      0|    default:
  ------------------
  |  Branch (596:5): [True: 0, False: 1.80k]
  ------------------
  597|      0|        return -1;
  598|  1.80k|    }
  599|  1.80k|}

tls1_default_timeout:
   97|  2.78k|{
   98|       |    /*
   99|       |     * 2 hours, the 24 hours mentioned in the TLSv1 spec is way too long for
  100|       |     * http, the cache would over fill
  101|       |     */
  102|  2.78k|    return ossl_seconds2time(60 * 60 * 2);
  ------------------
  |  |   42|  2.78k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  2.78k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  103|  2.78k|}
tls1_new:
  106|  1.95k|{
  107|  1.95k|    if (!ssl3_new(s))
  ------------------
  |  Branch (107:9): [True: 0, False: 1.95k]
  ------------------
  108|      0|        return 0;
  109|  1.95k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (109:9): [True: 0, False: 1.95k]
  ------------------
  110|      0|        return 0;
  111|       |
  112|  1.95k|    return 1;
  113|  1.95k|}
tls1_free:
  116|  1.95k|{
  117|  1.95k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.95k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.95k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.95k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.95k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.95k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.95k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.95k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.95k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  118|       |
  119|  1.95k|    if (sc == NULL)
  ------------------
  |  Branch (119:9): [True: 0, False: 1.95k]
  ------------------
  120|      0|        return;
  121|       |
  122|  1.95k|    OPENSSL_free(sc->ext.session_ticket);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  123|  1.95k|    ssl3_free(s);
  124|  1.95k|}
tls1_clear:
  127|  7.82k|{
  128|  7.82k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.82k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.82k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.82k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.82k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  7.82k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.82k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.82k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.82k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  129|       |
  130|  7.82k|    if (sc == NULL)
  ------------------
  |  Branch (130:9): [True: 0, False: 7.82k]
  ------------------
  131|      0|        return 0;
  132|       |
  133|  7.82k|    if (!ssl3_clear(s))
  ------------------
  |  Branch (133:9): [True: 0, False: 7.82k]
  ------------------
  134|      0|        return 0;
  135|       |
  136|  7.82k|    if (s->method->version == TLS_ANY_VERSION)
  ------------------
  |  |   40|  7.82k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (136:9): [True: 7.82k, False: 0]
  ------------------
  137|  7.82k|        sc->version = TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   50|  7.82k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  7.82k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  138|      0|    else
  139|      0|        sc->version = s->method->version;
  140|       |
  141|  7.82k|    return 1;
  142|  7.82k|}
ssl_load_groups:
  367|  2.78k|{
  368|  2.78k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_groups, ctx))
  ------------------
  |  Branch (368:9): [True: 0, False: 2.78k]
  ------------------
  369|      0|        return 0;
  370|       |
  371|  2.78k|    return SSL_CTX_set1_groups_list(ctx, TLS_DEFAULT_GROUP_LIST);
  ------------------
  |  | 1505|  2.78k|    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_GROUPS_LIST, 0, (char *)(s))
  |  |  ------------------
  |  |  |  | 1353|  2.78k|#define SSL_CTRL_SET_GROUPS_LIST 92
  |  |  ------------------
  ------------------
  372|  2.78k|}
ssl_load_sigalgs:
  681|  2.78k|{
  682|  2.78k|    size_t i;
  683|  2.78k|    SSL_CERT_LOOKUP lu;
  684|       |
  685|  2.78k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_sigalgs, ctx))
  ------------------
  |  Branch (685:9): [True: 0, False: 2.78k]
  ------------------
  686|      0|        return 0;
  687|       |
  688|       |    /* now populate ctx->ssl_cert_info */
  689|  2.78k|    if (ctx->sigalg_list_len > 0) {
  ------------------
  |  Branch (689:9): [True: 2.70k, False: 79]
  ------------------
  690|  2.70k|        OPENSSL_free(ctx->ssl_cert_info);
  ------------------
  |  |  131|  2.70k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  691|  2.70k|        ctx->ssl_cert_info = OPENSSL_calloc(ctx->sigalg_list_len, sizeof(lu));
  ------------------
  |  |  112|  2.70k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  692|  2.70k|        if (ctx->ssl_cert_info == NULL)
  ------------------
  |  Branch (692:13): [True: 0, False: 2.70k]
  ------------------
  693|      0|            return 0;
  694|  10.8k|        for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (694:21): [True: 8.11k, False: 2.70k]
  ------------------
  695|  8.11k|            const char *keytype = inferred_keytype(&ctx->sigalg_list[i]);
  696|  8.11k|            ctx->ssl_cert_info[i].pkey_nid = OBJ_txt2nid(keytype);
  697|  8.11k|            ctx->ssl_cert_info[i].amask = SSL_aANY;
  ------------------
  |  |  124|  8.11k|#define SSL_aANY 0x00000000U
  ------------------
  698|  8.11k|        }
  699|  2.70k|    }
  700|       |
  701|       |    /*
  702|       |     * For now, leave it at this: legacy sigalgs stay in their own
  703|       |     * data structures until "legacy cleanup" occurs.
  704|       |     */
  705|       |
  706|  2.78k|    return 1;
  707|  2.78k|}
tls1_group_id_lookup:
  723|  44.9k|{
  724|  44.9k|    size_t i;
  725|       |
  726|   230k|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (726:17): [True: 230k, False: 0]
  ------------------
  727|   230k|        if (ctx->group_list[i].group_id == group_id)
  ------------------
  |  Branch (727:13): [True: 44.9k, False: 185k]
  ------------------
  728|  44.9k|            return &ctx->group_list[i];
  729|   230k|    }
  730|       |
  731|      0|    return NULL;
  732|  44.9k|}
tls1_group_id2nid:
  745|  19.1k|{
  746|  19.1k|    size_t i;
  747|       |
  748|  19.1k|    if (group_id == 0)
  ------------------
  |  Branch (748:9): [True: 0, False: 19.1k]
  ------------------
  749|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  750|       |
  751|       |    /*
  752|       |     * Return well known Group NIDs - for backwards compatibility. This won't
  753|       |     * work for groups we don't know about.
  754|       |     */
  755|   621k|    for (i = 0; i < OSSL_NELEM(nid_to_group); i++) {
  ------------------
  |  |   14|   621k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (755:17): [True: 618k, False: 2.93k]
  ------------------
  756|   618k|        if (nid_to_group[i].group_id == group_id)
  ------------------
  |  Branch (756:13): [True: 16.2k, False: 602k]
  ------------------
  757|  16.2k|            return nid_to_group[i].nid;
  758|   618k|    }
  759|  2.93k|    if (!include_unknown)
  ------------------
  |  Branch (759:9): [True: 2.93k, False: 0]
  ------------------
  760|  2.93k|        return NID_undef;
  ------------------
  |  |   18|  2.93k|#define NID_undef                       0
  ------------------
  761|      0|    return TLSEXT_nid_unknown | (int)group_id;
  ------------------
  |  |  219|      0|#define TLSEXT_nid_unknown 0x1000000
  ------------------
  762|  2.93k|}
tls1_get_supported_groups:
  786|  5.79k|{
  787|  5.79k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  5.79k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  788|       |
  789|       |    /* For Suite B mode only include P-256, P-384 */
  790|  5.79k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2029|  5.79k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  562|  5.79k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  ------------------
  791|     84|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  562|     84|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (791:5): [True: 84, False: 5.71k]
  ------------------
  792|     84|        *pgroups = suiteb_curves;
  793|     84|        *pgroupslen = OSSL_NELEM(suiteb_curves);
  ------------------
  |  |   14|     84|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  794|     84|        break;
  795|       |
  796|      3|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  558|      3|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (796:5): [True: 3, False: 5.79k]
  ------------------
  797|      3|        *pgroups = suiteb_curves;
  798|      3|        *pgroupslen = 1;
  799|      3|        break;
  800|       |
  801|     10|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  560|     10|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (801:5): [True: 10, False: 5.78k]
  ------------------
  802|     10|        *pgroups = suiteb_curves + 1;
  803|     10|        *pgroupslen = 1;
  804|     10|        break;
  805|       |
  806|  5.69k|    default:
  ------------------
  |  Branch (806:5): [True: 5.69k, False: 97]
  ------------------
  807|  5.69k|        if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (807:13): [True: 0, False: 5.69k]
  ------------------
  808|      0|            *pgroups = sctx->ext.supportedgroups;
  809|      0|            *pgroupslen = sctx->ext.supportedgroups_len;
  810|  5.69k|        } else {
  811|  5.69k|            *pgroups = s->ext.supportedgroups;
  812|  5.69k|            *pgroupslen = s->ext.supportedgroups_len;
  813|  5.69k|        }
  814|  5.69k|        break;
  815|  5.79k|    }
  816|  5.79k|}
tls1_get_requested_keyshare_groups:
  833|  1.82k|{
  834|  1.82k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.82k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  835|       |
  836|  1.82k|    if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (836:9): [True: 0, False: 1.82k]
  ------------------
  837|      0|        *pgroups = sctx->ext.supportedgroups;
  838|      0|        *pgroupslen = sctx->ext.supportedgroups_len;
  839|  1.82k|    } else {
  840|  1.82k|        *pgroups = s->ext.keyshares;
  841|  1.82k|        *pgroupslen = s->ext.keyshares_len;
  842|  1.82k|    }
  843|  1.82k|}
tls_valid_group:
  862|  22.2k|{
  863|  22.2k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  22.2k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  864|  22.2k|        group_id);
  865|  22.2k|    int ret;
  866|  22.2k|    int group_minversion, group_maxversion;
  867|       |
  868|  22.2k|    if (okfortls13 != NULL)
  ------------------
  |  Branch (868:9): [True: 12.0k, False: 10.1k]
  ------------------
  869|  12.0k|        *okfortls13 = 0;
  870|       |
  871|  22.2k|    if (ginfo == NULL)
  ------------------
  |  Branch (871:9): [True: 0, False: 22.2k]
  ------------------
  872|      0|        return 0;
  873|       |
  874|  22.2k|    group_minversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->mindtls : ginfo->mintls;
  ------------------
  |  |  258|  22.2k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  22.2k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  22.2k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 22.2k]
  |  |  ------------------
  ------------------
  875|  22.2k|    group_maxversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->maxdtls : ginfo->maxtls;
  ------------------
  |  |  258|  22.2k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  22.2k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  22.2k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 22.2k]
  |  |  ------------------
  ------------------
  876|       |
  877|  22.2k|    if (group_minversion < 0 || group_maxversion < 0)
  ------------------
  |  Branch (877:9): [True: 0, False: 22.2k]
  |  Branch (877:33): [True: 0, False: 22.2k]
  ------------------
  878|      0|        return 0;
  879|  22.2k|    if (group_maxversion == 0)
  ------------------
  |  Branch (879:9): [True: 22.1k, False: 64]
  ------------------
  880|  22.1k|        ret = 1;
  881|     64|    else
  882|     64|        ret = (ssl_version_cmp(s, minversion, group_maxversion) <= 0);
  883|  22.2k|    if (group_minversion > 0)
  ------------------
  |  Branch (883:9): [True: 22.2k, False: 0]
  ------------------
  884|  22.2k|        ret &= (ssl_version_cmp(s, maxversion, group_minversion) >= 0);
  885|       |
  886|  22.2k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  22.2k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  22.2k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  22.2k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (886:9): [True: 22.2k, False: 0]
  ------------------
  887|  22.2k|        if (ret && okfortls13 != NULL && maxversion == TLS1_3_VERSION)
  ------------------
  |  |   27|  12.0k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (887:13): [True: 22.1k, False: 59]
  |  Branch (887:20): [True: 12.0k, False: 10.1k]
  |  Branch (887:42): [True: 11.9k, False: 45]
  ------------------
  888|  11.9k|            *okfortls13 = (group_maxversion == 0)
  ------------------
  |  Branch (888:27): [True: 11.9k, False: 30]
  ------------------
  889|     30|                || (group_maxversion >= TLS1_3_VERSION);
  ------------------
  |  |   27|     30|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (889:20): [True: 0, False: 30]
  ------------------
  890|  22.2k|    }
  891|  22.2k|    ret &= !isec
  ------------------
  |  Branch (891:12): [True: 15.6k, False: 6.59k]
  ------------------
  892|  6.59k|        || strcmp(ginfo->algorithm, "EC") == 0
  ------------------
  |  Branch (892:12): [True: 744, False: 5.85k]
  ------------------
  893|  5.85k|        || strcmp(ginfo->algorithm, "X25519") == 0
  ------------------
  |  Branch (893:12): [True: 2.80k, False: 3.05k]
  ------------------
  894|  3.05k|        || strcmp(ginfo->algorithm, "X448") == 0;
  ------------------
  |  Branch (894:12): [True: 20, False: 3.03k]
  ------------------
  895|       |
  896|  22.2k|    return ret;
  897|  22.2k|}
tls_group_allowed:
  901|  19.1k|{
  902|  19.1k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  19.1k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  903|  19.1k|        group);
  904|  19.1k|    unsigned char gtmp[2];
  905|       |
  906|  19.1k|    if (ginfo == NULL)
  ------------------
  |  Branch (906:9): [True: 0, False: 19.1k]
  ------------------
  907|      0|        return 0;
  908|       |
  909|  19.1k|    gtmp[0] = group >> 8;
  910|  19.1k|    gtmp[1] = group & 0xff;
  911|  19.1k|    return ssl_security(s, op, ginfo->secbits,
  912|  19.1k|        tls1_group_id2nid(ginfo->group_id, 0), (void *)gtmp);
  913|  19.1k|}
tls1_set_groups_list:
 1610|  3.34k|{
 1611|  3.34k|    size_t i = 0, j;
 1612|  3.34k|    int ret = 0, parse_ret = 0;
 1613|  3.34k|    gid_cb_st gcb;
 1614|       |
 1615|       |    /* Sanity check */
 1616|  3.34k|    if (ctx == NULL) {
  ------------------
  |  Branch (1616:9): [True: 0, False: 3.34k]
  ------------------
 1617|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1618|      0|        return 0;
 1619|      0|    }
 1620|       |
 1621|  3.34k|    memset(&gcb, 0, sizeof(gcb));
 1622|  3.34k|    gcb.gidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|  3.34k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1623|  3.34k|    gcb.tplmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|  3.34k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1624|  3.34k|    gcb.ksidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|  3.34k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1625|  3.34k|    gcb.ctx = ctx;
 1626|       |
 1627|       |    /* Prepare initial chunks of memory for groups, tuples and keyshares groupIDs */
 1628|  3.34k|    gcb.gid_arr = OPENSSL_malloc_array(gcb.gidmax, sizeof(*gcb.gid_arr));
  ------------------
  |  |  110|  3.34k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1629|  3.34k|    if (gcb.gid_arr == NULL)
  ------------------
  |  Branch (1629:9): [True: 0, False: 3.34k]
  ------------------
 1630|      0|        goto end;
 1631|  3.34k|    gcb.tuplcnt_arr = OPENSSL_malloc_array(gcb.tplmax, sizeof(*gcb.tuplcnt_arr));
  ------------------
  |  |  110|  3.34k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1632|  3.34k|    if (gcb.tuplcnt_arr == NULL)
  ------------------
  |  Branch (1632:9): [True: 0, False: 3.34k]
  ------------------
 1633|      0|        goto end;
 1634|  3.34k|    gcb.tuplcnt_arr[0] = 0;
 1635|  3.34k|    gcb.ksid_arr = OPENSSL_malloc_array(gcb.ksidmax, sizeof(*gcb.ksid_arr));
  ------------------
  |  |  110|  3.34k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1636|  3.34k|    if (gcb.ksid_arr == NULL)
  ------------------
  |  Branch (1636:9): [True: 0, False: 3.34k]
  ------------------
 1637|      0|        goto end;
 1638|       |
 1639|  3.94k|    while (str[0] != '\0' && isspace((unsigned char)*str))
  ------------------
  |  Branch (1639:12): [True: 3.92k, False: 26]
  |  Branch (1639:30): [True: 600, False: 3.32k]
  ------------------
 1640|    600|        str++;
 1641|  3.34k|    if (str[0] == '\0')
  ------------------
  |  Branch (1641:9): [True: 26, False: 3.32k]
  ------------------
 1642|     26|        goto empty_list;
 1643|       |
 1644|       |    /*
 1645|       |     * Start the (potentially recursive) tuple processing by calling CONF_parse_list
 1646|       |     * with the TUPLE_DELIMITER_CHARACTER (which will call tuple_cb after cleaning spaces)
 1647|       |     */
 1648|  3.32k|    parse_ret = CONF_parse_list(str, TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, &gcb);
  ------------------
  |  | 1204|  3.32k|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1649|       |
 1650|  3.32k|    if (parse_ret == 0)
  ------------------
  |  Branch (1650:9): [True: 58, False: 3.26k]
  ------------------
 1651|     58|        goto end;
 1652|  3.26k|    if (parse_ret == -1) {
  ------------------
  |  Branch (1652:9): [True: 16, False: 3.24k]
  ------------------
 1653|     16|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  406|     16|    (ERR_new(),                                                  \
  |  |  407|     16|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|     16|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|     16|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   89|     16|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  358|     16|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|     16|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|     16|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1654|     16|            "Syntax error in '%s'", str);
 1655|     16|        goto end;
 1656|     16|    }
 1657|       |
 1658|       |    /*
 1659|       |     * We check whether a tuple was completely emptied by using "-" prefix
 1660|       |     * excessively, in which case we remove the tuple
 1661|       |     */
 1662|  14.9k|    for (i = j = 0; j < gcb.tplcnt; j++) {
  ------------------
  |  Branch (1662:21): [True: 11.6k, False: 3.24k]
  ------------------
 1663|  11.6k|        if (gcb.tuplcnt_arr[j] == 0)
  ------------------
  |  Branch (1663:13): [True: 7, False: 11.6k]
  ------------------
 1664|      7|            continue;
 1665|       |        /* If there's a gap, move to first unfilled slot */
 1666|  11.6k|        if (j == i)
  ------------------
  |  Branch (1666:13): [True: 11.6k, False: 6]
  ------------------
 1667|  11.6k|            ++i;
 1668|      6|        else
 1669|      6|            gcb.tuplcnt_arr[i++] = gcb.tuplcnt_arr[j];
 1670|  11.6k|    }
 1671|  3.24k|    gcb.tplcnt = i;
 1672|       |
 1673|  3.24k|    if (gcb.ksidcnt > OPENSSL_CLIENT_MAX_KEY_SHARES) {
  ------------------
  |  |  790|  3.24k|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
  |  Branch (1673:9): [True: 0, False: 3.24k]
  ------------------
 1674|      0|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   89|      0|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  358|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1675|      0|            "To many keyshares requested in '%s' (max = %d)",
 1676|      0|            str, OPENSSL_CLIENT_MAX_KEY_SHARES);
  ------------------
  |  |  790|      0|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
 1677|      0|        goto end;
 1678|      0|    }
 1679|       |
 1680|       |    /*
 1681|       |     * For backward compatibility we let the rest of the code know that a key share
 1682|       |     * for the first valid group should be added if no "*" prefix was used anywhere
 1683|       |     */
 1684|  3.24k|    if (gcb.gidcnt > 0 && gcb.ksidcnt == 0) {
  ------------------
  |  Branch (1684:9): [True: 3.15k, False: 95]
  |  Branch (1684:27): [True: 156, False: 2.99k]
  ------------------
 1685|       |        /*
 1686|       |         * No key share group prefix character was used, hence we indicate that a single
 1687|       |         * key share should be sent and flag that it should come from the supported_groups list
 1688|       |         */
 1689|    156|        gcb.ksidcnt = 1;
 1690|    156|        gcb.ksid_arr[0] = 0;
 1691|    156|    }
 1692|       |
 1693|  3.27k|empty_list:
 1694|       |    /*
 1695|       |     * A call to tls1_set_groups_list with any of the args (other than ctx) set
 1696|       |     * to NULL only does a syntax check, hence we're done here and report success
 1697|       |     */
 1698|  3.27k|    if (grpext == NULL || ksext == NULL || tplext == NULL || grpextlen == NULL || ksextlen == NULL || tplextlen == NULL) {
  ------------------
  |  Branch (1698:9): [True: 0, False: 3.27k]
  |  Branch (1698:27): [True: 0, False: 3.27k]
  |  Branch (1698:44): [True: 0, False: 3.27k]
  |  Branch (1698:62): [True: 0, False: 3.27k]
  |  Branch (1698:83): [True: 0, False: 3.27k]
  |  Branch (1698:103): [True: 0, False: 3.27k]
  ------------------
 1699|      0|        ret = 1;
 1700|      0|        goto end;
 1701|      0|    }
 1702|       |
 1703|       |    /*
 1704|       |     * tuple_cb and gid_cb combo ensures there are no duplicates or unknown groups so we
 1705|       |     * can just go ahead and set the results (after disposing the existing)
 1706|       |     */
 1707|  3.27k|    OPENSSL_free(*grpext);
  ------------------
  |  |  131|  3.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1708|  3.27k|    *grpext = gcb.gid_arr;
 1709|  3.27k|    *grpextlen = gcb.gidcnt;
 1710|  3.27k|    OPENSSL_free(*ksext);
  ------------------
  |  |  131|  3.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1711|  3.27k|    *ksext = gcb.ksid_arr;
 1712|  3.27k|    *ksextlen = gcb.ksidcnt;
 1713|  3.27k|    OPENSSL_free(*tplext);
  ------------------
  |  |  131|  3.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1714|  3.27k|    *tplext = gcb.tuplcnt_arr;
 1715|  3.27k|    *tplextlen = gcb.tplcnt;
 1716|       |
 1717|  3.27k|    return 1;
 1718|       |
 1719|     74|end:
 1720|     74|    OPENSSL_free(gcb.gid_arr);
  ------------------
  |  |  131|     74|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1721|     74|    OPENSSL_free(gcb.tuplcnt_arr);
  ------------------
  |  |  131|     74|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1722|     74|    OPENSSL_free(gcb.ksid_arr);
  ------------------
  |  |  131|     74|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1723|     74|    return ret;
 1724|  3.27k|}
tls1_get_formatlist:
 1782|  1.75k|{
 1783|       |    /*
 1784|       |     * If we have a custom point format list use it otherwise use default
 1785|       |     */
 1786|  1.75k|    if (s->ext.ecpointformats) {
  ------------------
  |  Branch (1786:9): [True: 0, False: 1.75k]
  ------------------
 1787|      0|        *pformats = s->ext.ecpointformats;
 1788|      0|        *num_formats = s->ext.ecpointformats_len;
 1789|  1.75k|    } else if ((s->options & SSL_OP_LEGACY_EC_POINT_FORMATS) != 0) {
  ------------------
  |  |  455|  1.75k|#define SSL_OP_LEGACY_EC_POINT_FORMATS SSL_OP_BIT(36)
  |  |  ------------------
  |  |  |  |  350|  1.75k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1789:16): [True: 0, False: 1.75k]
  ------------------
 1790|      0|        *pformats = ecformats_all;
 1791|       |        /* For Suite B we don't support char2 fields */
 1792|      0|        if (tls1_suiteb(s))
  ------------------
  |  | 2029|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  562|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2029:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1793|      0|            *num_formats = sizeof(ecformats_all) - 1;
 1794|      0|        else
 1795|      0|            *num_formats = sizeof(ecformats_all);
 1796|  1.75k|    } else {
 1797|  1.75k|        *pformats = ecformats_default;
 1798|  1.75k|        *num_formats = sizeof(ecformats_default);
 1799|  1.75k|    }
 1800|  1.75k|}
ssl_setup_sigalgs:
 2191|  2.78k|{
 2192|  2.78k|    size_t i, cache_idx, sigalgs_len, enabled;
 2193|  2.78k|    const SIGALG_LOOKUP *lu;
 2194|  2.78k|    SIGALG_LOOKUP *cache = NULL;
 2195|  2.78k|    uint16_t *tls12_sigalgs_list = NULL;
 2196|  2.78k|    EVP_PKEY *tmpkey = EVP_PKEY_new();
 2197|  2.78k|    int istls;
 2198|  2.78k|    int ret = 0;
 2199|       |
 2200|  2.78k|    if (ctx == NULL)
  ------------------
  |  Branch (2200:9): [True: 0, False: 2.78k]
  ------------------
 2201|      0|        goto err;
 2202|       |
 2203|  2.78k|    istls = !SSL_CTX_IS_DTLS(ctx);
  ------------------
  |  |  262|  2.78k|    (ctx->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  2.78k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 2204|       |
 2205|  2.78k|    sigalgs_len = OSSL_NELEM(sigalg_lookup_tbl) + ctx->sigalg_list_len;
  ------------------
  |  |   14|  2.78k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2206|       |
 2207|  2.78k|    cache = OPENSSL_calloc(sigalgs_len, sizeof(const SIGALG_LOOKUP));
  ------------------
  |  |  112|  2.78k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2208|  2.78k|    if (cache == NULL || tmpkey == NULL)
  ------------------
  |  Branch (2208:9): [True: 0, False: 2.78k]
  |  Branch (2208:26): [True: 0, False: 2.78k]
  ------------------
 2209|      0|        goto err;
 2210|       |
 2211|  2.78k|    tls12_sigalgs_list = OPENSSL_calloc(sigalgs_len, sizeof(uint16_t));
  ------------------
  |  |  112|  2.78k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2212|  2.78k|    if (tls12_sigalgs_list == NULL)
  ------------------
  |  Branch (2212:9): [True: 0, False: 2.78k]
  ------------------
 2213|      0|        goto err;
 2214|       |
 2215|  2.78k|    ERR_set_mark();
 2216|       |    /* First fill cache and tls12_sigalgs list from legacy algorithm list */
 2217|  2.78k|    for (i = 0, lu = sigalg_lookup_tbl;
 2218|  89.0k|        i < OSSL_NELEM(sigalg_lookup_tbl); lu++, i++) {
  ------------------
  |  |   14|  89.0k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2218:9): [True: 86.3k, False: 2.78k]
  ------------------
 2219|  86.3k|        EVP_PKEY_CTX *pctx;
 2220|       |
 2221|  86.3k|        cache[i] = *lu;
 2222|       |
 2223|       |        /*
 2224|       |         * Check hash is available.
 2225|       |         * This test is not perfect. A provider could have support
 2226|       |         * for a signature scheme, but not a particular hash. However the hash
 2227|       |         * could be available from some other loaded provider. In that case it
 2228|       |         * could be that the signature is available, and the hash is available
 2229|       |         * independently - but not as a combination. We ignore this for now.
 2230|       |         */
 2231|  86.3k|        if (lu->hash != NID_undef
  ------------------
  |  |   18|   172k|#define NID_undef                       0
  ------------------
  |  Branch (2231:13): [True: 80.7k, False: 5.56k]
  ------------------
 2232|  80.7k|            && ctx->ssl_digest_methods[lu->hash_idx] == NULL) {
  ------------------
  |  Branch (2232:16): [True: 15.8k, False: 64.9k]
  ------------------
 2233|  15.8k|            cache[i].available = 0;
 2234|  15.8k|            continue;
 2235|  15.8k|        }
 2236|       |
 2237|  70.4k|        if (!EVP_PKEY_set_type(tmpkey, lu->sig)) {
  ------------------
  |  Branch (2237:13): [True: 0, False: 70.4k]
  ------------------
 2238|      0|            cache[i].available = 0;
 2239|      0|            continue;
 2240|      0|        }
 2241|  70.4k|        pctx = EVP_PKEY_CTX_new_from_pkey(ctx->libctx, tmpkey, ctx->propq);
 2242|       |        /* If unable to create pctx we assume the sig algorithm is unavailable */
 2243|  70.4k|        if (pctx == NULL)
  ------------------
  |  Branch (2243:13): [True: 158, False: 70.3k]
  ------------------
 2244|    158|            cache[i].available = 0;
 2245|  70.4k|        EVP_PKEY_CTX_free(pctx);
 2246|  70.4k|    }
 2247|       |
 2248|       |    /* Now complete cache and tls12_sigalgs list with provider sig information */
 2249|  2.78k|    cache_idx = OSSL_NELEM(sigalg_lookup_tbl);
  ------------------
  |  |   14|  2.78k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2250|  10.8k|    for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (2250:17): [True: 8.11k, False: 2.78k]
  ------------------
 2251|  8.11k|        TLS_SIGALG_INFO si = ctx->sigalg_list[i];
 2252|  8.11k|        cache[cache_idx].name = si.name;
 2253|  8.11k|        cache[cache_idx].name12 = si.sigalg_name;
 2254|  8.11k|        cache[cache_idx].sigalg = si.code_point;
 2255|  8.11k|        tls12_sigalgs_list[cache_idx] = si.code_point;
 2256|  8.11k|        cache[cache_idx].hash = si.hash_name ? OBJ_txt2nid(si.hash_name) : NID_undef;
  ------------------
  |  |   18|  16.2k|#define NID_undef                       0
  ------------------
  |  Branch (2256:33): [True: 0, False: 8.11k]
  ------------------
 2257|  8.11k|        cache[cache_idx].hash_idx = ssl_get_md_idx(cache[cache_idx].hash);
 2258|  8.11k|        cache[cache_idx].sig = OBJ_txt2nid(si.sigalg_name);
 2259|  8.11k|        cache[cache_idx].sig_idx = (int)(i + SSL_PKEY_NUM);
  ------------------
  |  |  328|  8.11k|#define SSL_PKEY_NUM 9
  ------------------
 2260|  8.11k|        cache[cache_idx].sigandhash = OBJ_txt2nid(si.sigalg_name);
 2261|  8.11k|        cache[cache_idx].curve = NID_undef;
  ------------------
  |  |   18|  8.11k|#define NID_undef                       0
  ------------------
 2262|  8.11k|        cache[cache_idx].mintls = TLS1_3_VERSION;
  ------------------
  |  |   27|  8.11k|#define TLS1_3_VERSION 0x0304
  ------------------
 2263|  8.11k|        cache[cache_idx].maxtls = TLS1_3_VERSION;
  ------------------
  |  |   27|  8.11k|#define TLS1_3_VERSION 0x0304
  ------------------
 2264|  8.11k|        cache[cache_idx].mindtls = -1;
 2265|  8.11k|        cache[cache_idx].maxdtls = -1;
 2266|       |        /* Compatibility with TLS 1.3 is checked on load */
 2267|  8.11k|        cache[cache_idx].available = istls;
 2268|  8.11k|        cache[cache_idx].advertise = 0;
 2269|  8.11k|        cache_idx++;
 2270|  8.11k|    }
 2271|  2.78k|    ERR_pop_to_mark();
 2272|       |
 2273|  2.78k|    enabled = 0;
 2274|  97.4k|    for (i = 0; i < OSSL_NELEM(tls12_sigalgs); ++i) {
  ------------------
  |  |   14|  97.4k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2274:17): [True: 94.6k, False: 2.78k]
  ------------------
 2275|  94.6k|        SIGALG_LOOKUP *ent = cache;
 2276|  94.6k|        size_t j;
 2277|       |
 2278|  1.65M|        for (j = 0; j < sigalgs_len; ent++, j++) {
  ------------------
  |  Branch (2278:21): [True: 1.65M, False: 237]
  ------------------
 2279|  1.65M|            if (ent->sigalg != tls12_sigalgs[i])
  ------------------
  |  Branch (2279:17): [True: 1.56M, False: 94.4k]
  ------------------
 2280|  1.56M|                continue;
 2281|       |            /* Dedup by marking cache entry as default enabled. */
 2282|  94.4k|            if (ent->available && !ent->advertise) {
  ------------------
  |  Branch (2282:17): [True: 78.4k, False: 15.9k]
  |  Branch (2282:35): [True: 78.4k, False: 0]
  ------------------
 2283|  78.4k|                ent->advertise = 1;
 2284|  78.4k|                tls12_sigalgs_list[enabled++] = tls12_sigalgs[i];
 2285|  78.4k|            }
 2286|  94.4k|            break;
 2287|  1.65M|        }
 2288|  94.6k|    }
 2289|       |
 2290|       |    /* Append any provider sigalgs not yet handled */
 2291|  10.8k|    for (i = OSSL_NELEM(sigalg_lookup_tbl); i < sigalgs_len; ++i) {
  ------------------
  |  |   14|  2.78k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2291:45): [True: 8.11k, False: 2.78k]
  ------------------
 2292|  8.11k|        SIGALG_LOOKUP *ent = &cache[i];
 2293|       |
 2294|  8.11k|        if (ent->available && !ent->advertise)
  ------------------
  |  Branch (2294:13): [True: 8.11k, False: 0]
  |  Branch (2294:31): [True: 0, False: 8.11k]
  ------------------
 2295|      0|            tls12_sigalgs_list[enabled++] = ent->sigalg;
 2296|  8.11k|    }
 2297|       |
 2298|  2.78k|    ctx->sigalg_lookup_cache = cache;
 2299|  2.78k|    ctx->sigalg_lookup_cache_len = sigalgs_len;
 2300|  2.78k|    ctx->tls12_sigalgs = tls12_sigalgs_list;
 2301|  2.78k|    ctx->tls12_sigalgs_len = enabled;
 2302|  2.78k|    cache = NULL;
 2303|  2.78k|    tls12_sigalgs_list = NULL;
 2304|       |
 2305|  2.78k|    ret = 1;
 2306|  2.78k|err:
 2307|  2.78k|    OPENSSL_free(cache);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2308|  2.78k|    OPENSSL_free(tls12_sigalgs_list);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2309|  2.78k|    EVP_PKEY_free(tmpkey);
 2310|  2.78k|    return ret;
 2311|  2.78k|}
tls1_lookup_md:
 2407|  69.5k|{
 2408|  69.5k|    const EVP_MD *md;
 2409|       |
 2410|  69.5k|    if (lu == NULL)
  ------------------
  |  Branch (2410:9): [True: 0, False: 69.5k]
  ------------------
 2411|      0|        return 0;
 2412|       |    /* lu->hash == NID_undef means no associated digest */
 2413|  69.5k|    if (lu->hash == NID_undef) {
  ------------------
  |  |   18|  69.5k|#define NID_undef                       0
  ------------------
  |  Branch (2413:9): [True: 8.99k, False: 60.6k]
  ------------------
 2414|  8.99k|        md = NULL;
 2415|  60.6k|    } else {
 2416|  60.6k|        md = ssl_md(ctx, lu->hash_idx);
 2417|  60.6k|        if (md == NULL)
  ------------------
  |  Branch (2417:13): [True: 0, False: 60.6k]
  ------------------
 2418|      0|            return 0;
 2419|  60.6k|    }
 2420|  69.5k|    if (pmd)
  ------------------
  |  Branch (2420:9): [True: 69.5k, False: 0]
  ------------------
 2421|  69.5k|        *pmd = md;
 2422|  69.5k|    return 1;
 2423|  69.5k|}
tls12_get_psigalgs:
 2544|  7.55k|{
 2545|       |    /*
 2546|       |     * If Suite B mode use Suite B sigalgs only, ignore any other
 2547|       |     * preferences.
 2548|       |     */
 2549|  7.55k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2029|  7.55k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  562|  7.55k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2029:24): [True: 124, False: 7.43k]
  |  |  ------------------
  ------------------
 2550|    106|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  562|    106|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (2550:5): [True: 106, False: 7.45k]
  ------------------
 2551|    106|        *psigs = suiteb_sigalgs;
 2552|    106|        return OSSL_NELEM(suiteb_sigalgs);
  ------------------
  |  |   14|    106|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2553|       |
 2554|      5|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  558|      5|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (2554:5): [True: 5, False: 7.55k]
  ------------------
 2555|      5|        *psigs = suiteb_sigalgs;
 2556|      5|        return 1;
 2557|       |
 2558|     13|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  560|     13|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (2558:5): [True: 13, False: 7.54k]
  ------------------
 2559|     13|        *psigs = suiteb_sigalgs + 1;
 2560|     13|        return 1;
 2561|  7.55k|    }
 2562|       |    /*
 2563|       |     *  We use client_sigalgs (if not NULL) if we're a server
 2564|       |     *  and sending a certificate request or if we're a client and
 2565|       |     *  determining which shared algorithm to use.
 2566|       |     */
 2567|  7.43k|    if ((s->server == sent) && s->cert->client_sigalgs != NULL) {
  ------------------
  |  Branch (2567:9): [True: 0, False: 7.43k]
  |  Branch (2567:32): [True: 0, False: 0]
  ------------------
 2568|      0|        *psigs = s->cert->client_sigalgs;
 2569|      0|        return s->cert->client_sigalgslen;
 2570|  7.43k|    } else if (s->cert->conf_sigalgs) {
  ------------------
  |  Branch (2570:16): [True: 0, False: 7.43k]
  ------------------
 2571|      0|        *psigs = s->cert->conf_sigalgs;
 2572|      0|        return s->cert->conf_sigalgslen;
 2573|  7.43k|    } else {
 2574|  7.43k|        *psigs = SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs;
  ------------------
  |  |   26|  7.43k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2575|  7.43k|        return SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs_len;
  ------------------
  |  |   26|  7.43k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2576|  7.43k|    }
 2577|  7.43k|}
ssl_set_client_disabled:
 2878|  5.72k|{
 2879|  5.72k|    s->s3.tmp.mask_a = 0;
 2880|  5.72k|    s->s3.tmp.mask_k = 0;
 2881|  5.72k|    ssl_set_sig_mask(&s->s3.tmp.mask_a, s, SSL_SECOP_SIGALG_MASK);
  ------------------
  |  | 2776|  5.72k|#define SSL_SECOP_SIGALG_MASK (14 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2742|  5.72k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
 2882|  5.72k|    if (ssl_get_min_max_version(s, &s->s3.tmp.min_ver,
  ------------------
  |  Branch (2882:9): [True: 0, False: 5.72k]
  ------------------
 2883|  5.72k|            &s->s3.tmp.max_ver, NULL)
 2884|  5.72k|        != 0)
 2885|      0|        return 0;
 2886|  5.72k|#ifndef OPENSSL_NO_PSK
 2887|       |    /* with PSK there must be client callback set */
 2888|  5.72k|    if (!s->psk_client_callback) {
  ------------------
  |  Branch (2888:9): [True: 5.72k, False: 0]
  ------------------
 2889|  5.72k|        s->s3.tmp.mask_a |= SSL_aPSK;
  ------------------
  |  |  116|  5.72k|#define SSL_aPSK 0x00000010U
  ------------------
 2890|  5.72k|        s->s3.tmp.mask_k |= SSL_PSK;
  ------------------
  |  |  101|  5.72k|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   87|  5.72k|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   93|  5.72k|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   94|  5.72k|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   95|  5.72k|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
 2891|  5.72k|    }
 2892|  5.72k|#endif /* OPENSSL_NO_PSK */
 2893|  5.72k|#ifndef OPENSSL_NO_SRP
 2894|  5.72k|    if (!(s->srp_ctx.srp_Mask & SSL_kSRP)) {
  ------------------
  |  |   91|  5.72k|#define SSL_kSRP 0x00000020U
  ------------------
  |  Branch (2894:9): [True: 5.71k, False: 6]
  ------------------
 2895|  5.71k|        s->s3.tmp.mask_a |= SSL_aSRP;
  ------------------
  |  |  120|  5.71k|#define SSL_aSRP 0x00000040U
  ------------------
 2896|  5.71k|        s->s3.tmp.mask_k |= SSL_kSRP;
  ------------------
  |  |   91|  5.71k|#define SSL_kSRP 0x00000020U
  ------------------
 2897|  5.71k|    }
 2898|  5.72k|#endif
 2899|  5.72k|    return 1;
 2900|  5.72k|}
ssl_cipher_disabled:
 2913|   334k|{
 2914|   334k|    int minversion = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  258|   334k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   334k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|   334k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 334k]
  |  |  ------------------
  ------------------
 2915|   334k|    int maxversion = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  258|   334k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   334k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|   334k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 334k]
  |  |  ------------------
  ------------------
 2916|       |
 2917|   334k|    if (c->algorithm_mkey & s->s3.tmp.mask_k
  ------------------
  |  Branch (2917:9): [True: 163k, False: 170k]
  ------------------
 2918|   170k|        || c->algorithm_auth & s->s3.tmp.mask_a)
  ------------------
  |  Branch (2918:12): [True: 0, False: 170k]
  ------------------
 2919|   163k|        return 1;
 2920|   170k|    if (s->s3.tmp.max_ver == 0)
  ------------------
  |  Branch (2920:9): [True: 0, False: 170k]
  ------------------
 2921|      0|        return 1;
 2922|       |
 2923|   170k|    if (SSL_IS_QUIC_INT_HANDSHAKE(s))
  ------------------
  |  |  304|   170k|#define SSL_IS_QUIC_INT_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC_INTERNAL) != 0)
  |  |  ------------------
  |  |  |  |   31|   170k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  |  |  ------------------
  |  |  |  Branch (304:38): [True: 0, False: 170k]
  |  |  ------------------
  ------------------
 2924|       |        /* For QUIC, only allow these ciphersuites. */
 2925|      0|        switch (SSL_CIPHER_get_id(c)) {
 2926|      0|        case TLS1_3_CK_AES_128_GCM_SHA256:
  ------------------
  |  |  626|      0|#define TLS1_3_CK_AES_128_GCM_SHA256 0x03001301
  ------------------
  |  Branch (2926:9): [True: 0, False: 0]
  ------------------
 2927|      0|        case TLS1_3_CK_AES_256_GCM_SHA384:
  ------------------
  |  |  627|      0|#define TLS1_3_CK_AES_256_GCM_SHA384 0x03001302
  ------------------
  |  Branch (2927:9): [True: 0, False: 0]
  ------------------
 2928|      0|        case TLS1_3_CK_CHACHA20_POLY1305_SHA256:
  ------------------
  |  |  628|      0|#define TLS1_3_CK_CHACHA20_POLY1305_SHA256 0x03001303
  ------------------
  |  Branch (2928:9): [True: 0, False: 0]
  ------------------
 2929|      0|            break;
 2930|      0|        default:
  ------------------
  |  Branch (2930:9): [True: 0, False: 0]
  ------------------
 2931|      0|            return 1;
 2932|      0|        }
 2933|       |
 2934|       |    /*
 2935|       |     * For historical reasons we will allow ECHDE to be selected by a server
 2936|       |     * in SSLv3 if we are a client
 2937|       |     */
 2938|   170k|    if (minversion == TLS1_VERSION
  ------------------
  |  |   24|   341k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2938:9): [True: 22.3k, False: 148k]
  ------------------
 2939|  22.3k|        && ecdhe
  ------------------
  |  Branch (2939:12): [True: 1, False: 22.3k]
  ------------------
 2940|      1|        && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   85|      1|#define SSL_kECDHE 0x00000004U
  ------------------
                      && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   94|      1|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (2940:12): [True: 0, False: 1]
  ------------------
 2941|      0|        minversion = SSL3_VERSION;
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
 2942|       |
 2943|   170k|    if (ssl_version_cmp(s, minversion, s->s3.tmp.max_ver) > 0
  ------------------
  |  Branch (2943:9): [True: 345, False: 170k]
  ------------------
 2944|   170k|        || ssl_version_cmp(s, maxversion, s->s3.tmp.min_ver) < 0)
  ------------------
  |  Branch (2944:12): [True: 595, False: 170k]
  ------------------
 2945|    940|        return 1;
 2946|       |
 2947|   170k|    return !ssl_security(s, op, c->strength_bits, 0, (void *)c);
 2948|   170k|}
tls_use_ticket:
 2951|  1.83k|{
 2952|  1.83k|    if ((s->options & SSL_OP_NO_TICKET))
  ------------------
  |  |  383|  1.83k|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  350|  1.83k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2952:9): [True: 1.83k, False: 0]
  ------------------
 2953|  1.83k|        return 0;
 2954|      0|    return ssl_security(s, SSL_SECOP_TICKET, 0, 0, NULL);
  ------------------
  |  | 2768|      0|#define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 2955|  1.83k|}
ssl_set_sig_mask:
 3425|  5.72k|{
 3426|  5.72k|    const uint16_t *sigalgs;
 3427|  5.72k|    size_t i, sigalgslen;
 3428|  5.72k|    uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  108|  5.72k|#define SSL_aRSA 0x00000001U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  110|  5.72k|#define SSL_aDSS 0x00000002U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  114|  5.72k|#define SSL_aECDSA 0x00000008U
  ------------------
 3429|       |    /*
 3430|       |     * Go through all signature algorithms seeing if we support any
 3431|       |     * in disabled_mask.
 3432|       |     */
 3433|  5.72k|    sigalgslen = tls12_get_psigalgs(s, 1, &sigalgs);
 3434|   169k|    for (i = 0; i < sigalgslen; i++, sigalgs++) {
  ------------------
  |  Branch (3434:17): [True: 163k, False: 5.72k]
  ------------------
 3435|   163k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *sigalgs);
  ------------------
  |  |   26|   163k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3436|   163k|        const SSL_CERT_LOOKUP *clu;
 3437|       |
 3438|   163k|        if (lu == NULL)
  ------------------
  |  Branch (3438:13): [True: 0, False: 163k]
  ------------------
 3439|      0|            continue;
 3440|       |
 3441|   163k|        clu = ssl_cert_lookup_by_idx(lu->sig_idx,
 3442|   163k|            SSL_CONNECTION_GET_CTX(s));
  ------------------
  |  |   26|   163k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3443|   163k|        if (clu == NULL)
  ------------------
  |  Branch (3443:13): [True: 0, False: 163k]
  ------------------
 3444|      0|            continue;
 3445|       |
 3446|       |        /* If algorithm is disabled see if we can enable it */
 3447|   163k|        if ((clu->amask & disabled_mask) != 0
  ------------------
  |  Branch (3447:13): [True: 17.3k, False: 146k]
  ------------------
 3448|  17.3k|            && tls12_sigalg_allowed(s, op, lu))
  ------------------
  |  Branch (3448:16): [True: 16.9k, False: 348]
  ------------------
 3449|  16.9k|            disabled_mask &= ~clu->amask;
 3450|   163k|    }
 3451|  5.72k|    *pmask_a |= disabled_mask;
 3452|  5.72k|}
tls12_copy_sigalgs:
 3456|  1.83k|{
 3457|  1.83k|    size_t i;
 3458|  1.83k|    int rv = 0;
 3459|       |
 3460|  54.2k|    for (i = 0; i < psiglen; i++, psig++) {
  ------------------
  |  Branch (3460:17): [True: 52.4k, False: 1.83k]
  ------------------
 3461|  52.4k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *psig);
  ------------------
  |  |   26|  52.4k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3462|       |
 3463|  52.4k|        if (lu == NULL || !tls_sigalg_compat(s, lu))
  ------------------
  |  Branch (3463:13): [True: 0, False: 52.4k]
  |  Branch (3463:27): [True: 5.61k, False: 46.8k]
  ------------------
 3464|  5.61k|            continue;
 3465|  46.8k|        if (!WPACKET_put_bytes_u16(pkt, *psig))
  ------------------
  |  |  891|  46.8k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (3465:13): [True: 0, False: 46.8k]
  ------------------
 3466|      0|            return 0;
 3467|       |        /*
 3468|       |         * If TLS 1.3 must have at least one valid TLS 1.3 message
 3469|       |         * signing algorithm: i.e. neither RSA nor SHA1/SHA224
 3470|       |         */
 3471|  46.8k|        if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  |  265|  3.67k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|  3.67k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  1.83k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 1.83k, False: 0]
  |  |  ------------------
  |  |  266|  1.83k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.67k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 1.83k, False: 0]
  |  |  ------------------
  |  |  267|  3.67k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  1.83k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  1.83k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 1.83k]
  |  |  ------------------
  ------------------
                      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)))
  ------------------
  |  | 2344|      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)))
  ------------------
  |  | 3302|      0|#define NID_sha224              675
  ------------------
  |  Branch (3471:13): [True: 1.83k, False: 44.9k]
  |  Branch (3471:57): [True: 0, False: 0]
  |  Branch (3471:84): [True: 0, False: 0]
  |  Branch (3471:108): [True: 0, False: 0]
  ------------------
 3472|  1.83k|            rv = 1;
 3473|  46.8k|    }
 3474|  1.83k|    if (rv == 0)
  ------------------
  |  Branch (3474:9): [True: 0, False: 1.83k]
  ------------------
 3475|       |        ERR_raise(ERR_LIB_SSL, SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3476|  1.83k|    return rv;
 3477|  1.83k|}
t1_lib.c:discover_provider_groups:
  357|  3.69k|{
  358|  3.69k|    struct provider_ctx_data_st pgd;
  359|       |
  360|  3.69k|    pgd.ctx = vctx;
  361|  3.69k|    pgd.provider = provider;
  362|  3.69k|    return OSSL_PROVIDER_get_capabilities(provider, "TLS-GROUP",
  363|  3.69k|        add_provider_groups, &pgd);
  364|  3.69k|}
t1_lib.c:add_provider_groups:
  228|   164k|{
  229|   164k|    struct provider_ctx_data_st *pgd = data;
  230|   164k|    SSL_CTX *ctx = pgd->ctx;
  231|   164k|    const OSSL_PARAM *p;
  232|   164k|    TLS_GROUP_INFO *ginf = NULL;
  233|   164k|    EVP_KEYMGMT *keymgmt;
  234|   164k|    unsigned int gid;
  235|   164k|    unsigned int is_kem = 0;
  236|   164k|    int ret = 0;
  237|       |
  238|   164k|    if (ctx->group_list_max_len == ctx->group_list_len) {
  ------------------
  |  Branch (238:9): [True: 16.3k, False: 147k]
  ------------------
  239|  16.3k|        TLS_GROUP_INFO *tmp = NULL;
  240|       |
  241|  16.3k|        if (ctx->group_list_max_len == 0)
  ------------------
  |  Branch (241:13): [True: 2.78k, False: 13.5k]
  ------------------
  242|  2.78k|            tmp = OPENSSL_malloc_array(TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  110|  2.78k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  243|  16.3k|                sizeof(TLS_GROUP_INFO));
  244|  13.5k|        else
  245|  13.5k|            tmp = OPENSSL_realloc_array(ctx->group_list,
  ------------------
  |  |  124|  13.5k|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  246|  16.3k|                ctx->group_list_max_len
  247|  16.3k|                    + TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  248|  16.3k|                sizeof(TLS_GROUP_INFO));
  249|  16.3k|        if (tmp == NULL)
  ------------------
  |  Branch (249:13): [True: 0, False: 16.3k]
  ------------------
  250|      0|            return 0;
  251|  16.3k|        ctx->group_list = tmp;
  252|  16.3k|        memset(tmp + ctx->group_list_max_len,
  253|  16.3k|            0,
  254|  16.3k|            sizeof(TLS_GROUP_INFO) * TLS_GROUP_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  225|  16.3k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  255|  16.3k|        ctx->group_list_max_len += TLS_GROUP_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  225|  16.3k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  256|  16.3k|    }
  257|       |
  258|   164k|    ginf = &ctx->group_list[ctx->group_list_len];
  259|       |
  260|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME);
  ------------------
  |  |  156|   164k|# define OSSL_CAPABILITY_TLS_GROUP_NAME "tls-group-name"
  ------------------
  261|   164k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   164k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (261:9): [True: 0, False: 164k]
  |  Branch (261:22): [True: 0, False: 164k]
  ------------------
  262|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  263|      0|        goto err;
  264|      0|    }
  265|   164k|    ginf->tlsname = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|   164k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  266|   164k|    if (ginf->tlsname == NULL)
  ------------------
  |  Branch (266:9): [True: 0, False: 164k]
  ------------------
  267|      0|        goto err;
  268|       |
  269|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL);
  ------------------
  |  |  157|   164k|# define OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL "tls-group-name-internal"
  ------------------
  270|   164k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   164k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (270:9): [True: 0, False: 164k]
  |  Branch (270:22): [True: 0, False: 164k]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        goto err;
  273|      0|    }
  274|   164k|    ginf->realname = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|   164k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  275|   164k|    if (ginf->realname == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 164k]
  ------------------
  276|      0|        goto err;
  277|       |
  278|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ID);
  ------------------
  |  |  150|   164k|# define OSSL_CAPABILITY_TLS_GROUP_ID "tls-group-id"
  ------------------
  279|   164k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &gid) || gid > UINT16_MAX) {
  ------------------
  |  Branch (279:9): [True: 0, False: 164k]
  |  Branch (279:22): [True: 0, False: 164k]
  |  Branch (279:55): [True: 0, False: 164k]
  ------------------
  280|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        goto err;
  282|      0|    }
  283|   164k|    ginf->group_id = (uint16_t)gid;
  284|       |
  285|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ALG);
  ------------------
  |  |  149|   164k|# define OSSL_CAPABILITY_TLS_GROUP_ALG "tls-group-alg"
  ------------------
  286|   164k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   164k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (286:9): [True: 0, False: 164k]
  |  Branch (286:22): [True: 0, False: 164k]
  ------------------
  287|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  288|      0|        goto err;
  289|      0|    }
  290|   164k|    ginf->algorithm = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|   164k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  291|   164k|    if (ginf->algorithm == NULL)
  ------------------
  |  Branch (291:9): [True: 0, False: 164k]
  ------------------
  292|      0|        goto err;
  293|       |
  294|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS);
  ------------------
  |  |  158|   164k|# define OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS "tls-group-sec-bits"
  ------------------
  295|   164k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &ginf->secbits)) {
  ------------------
  |  Branch (295:9): [True: 0, False: 164k]
  |  Branch (295:22): [True: 0, False: 164k]
  ------------------
  296|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  297|      0|        goto err;
  298|      0|    }
  299|       |
  300|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_IS_KEM);
  ------------------
  |  |  151|   164k|# define OSSL_CAPABILITY_TLS_GROUP_IS_KEM "tls-group-is-kem"
  ------------------
  301|   164k|    if (p != NULL && (!OSSL_PARAM_get_uint(p, &is_kem) || is_kem > 1)) {
  ------------------
  |  Branch (301:9): [True: 164k, False: 0]
  |  Branch (301:23): [True: 0, False: 164k]
  |  Branch (301:59): [True: 0, False: 164k]
  ------------------
  302|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  303|      0|        goto err;
  304|      0|    }
  305|   164k|    ginf->is_kem = 1 & is_kem;
  306|       |
  307|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_TLS);
  ------------------
  |  |  155|   164k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_TLS "tls-min-tls"
  ------------------
  308|   164k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mintls)) {
  ------------------
  |  Branch (308:9): [True: 0, False: 164k]
  |  Branch (308:22): [True: 0, False: 164k]
  ------------------
  309|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|        goto err;
  311|      0|    }
  312|       |
  313|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_TLS);
  ------------------
  |  |  153|   164k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_TLS "tls-max-tls"
  ------------------
  314|   164k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxtls)) {
  ------------------
  |  Branch (314:9): [True: 0, False: 164k]
  |  Branch (314:22): [True: 0, False: 164k]
  ------------------
  315|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        goto err;
  317|      0|    }
  318|       |
  319|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS);
  ------------------
  |  |  154|   164k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS "tls-min-dtls"
  ------------------
  320|   164k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mindtls)) {
  ------------------
  |  Branch (320:9): [True: 0, False: 164k]
  |  Branch (320:22): [True: 0, False: 164k]
  ------------------
  321|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  322|      0|        goto err;
  323|      0|    }
  324|       |
  325|   164k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS);
  ------------------
  |  |  152|   164k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS "tls-max-dtls"
  ------------------
  326|   164k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxdtls)) {
  ------------------
  |  Branch (326:9): [True: 0, False: 164k]
  |  Branch (326:22): [True: 0, False: 164k]
  ------------------
  327|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  328|      0|        goto err;
  329|      0|    }
  330|       |    /*
  331|       |     * Now check that the algorithm is actually usable for our property query
  332|       |     * string. Regardless of the result we still return success because we have
  333|       |     * successfully processed this group, even though we may decide not to use
  334|       |     * it.
  335|       |     */
  336|   164k|    ret = 1;
  337|   164k|    ERR_set_mark();
  338|   164k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, ginf->algorithm, ctx->propq);
  339|   164k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (339:9): [True: 159k, False: 4.66k]
  ------------------
  340|       |        /* We have successfully fetched the algorithm, we can use the group. */
  341|   159k|        ctx->group_list_len++;
  342|   159k|        ginf = NULL;
  343|   159k|        EVP_KEYMGMT_free(keymgmt);
  344|   159k|    }
  345|   164k|    ERR_pop_to_mark();
  346|   164k|err:
  347|   164k|    if (ginf != NULL) {
  ------------------
  |  Branch (347:9): [True: 4.66k, False: 159k]
  ------------------
  348|  4.66k|        OPENSSL_free(ginf->tlsname);
  ------------------
  |  |  131|  4.66k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  349|  4.66k|        OPENSSL_free(ginf->realname);
  ------------------
  |  |  131|  4.66k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  350|  4.66k|        OPENSSL_free(ginf->algorithm);
  ------------------
  |  |  131|  4.66k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  351|       |        ginf->algorithm = ginf->tlsname = ginf->realname = NULL;
  352|  4.66k|    }
  353|   164k|    return ret;
  354|   164k|}
t1_lib.c:discover_provider_sigalgs:
  666|  3.69k|{
  667|  3.69k|    struct provider_ctx_data_st pgd;
  668|       |
  669|  3.69k|    pgd.ctx = vctx;
  670|  3.69k|    pgd.provider = provider;
  671|  3.69k|    OSSL_PROVIDER_get_capabilities(provider, "TLS-SIGALG",
  672|  3.69k|        add_provider_sigalgs, &pgd);
  673|       |    /*
  674|       |     * Always OK, even if provider doesn't support the capability:
  675|       |     * Reconsider testing retval when legacy sigalgs are also loaded this way.
  676|       |     */
  677|  3.69k|    return 1;
  678|  3.69k|}
t1_lib.c:add_provider_sigalgs:
  386|  8.35k|{
  387|  8.35k|    struct provider_ctx_data_st *pgd = data;
  388|  8.35k|    SSL_CTX *ctx = pgd->ctx;
  389|  8.35k|    OSSL_PROVIDER *provider = pgd->provider;
  390|  8.35k|    const OSSL_PARAM *p;
  391|  8.35k|    TLS_SIGALG_INFO *sinf = NULL;
  392|  8.35k|    EVP_KEYMGMT *keymgmt;
  393|  8.35k|    const char *keytype;
  394|  8.35k|    unsigned int code_point = 0;
  395|  8.35k|    int ret = 0;
  396|       |
  397|  8.35k|    if (ctx->sigalg_list_max_len == ctx->sigalg_list_len) {
  ------------------
  |  Branch (397:9): [True: 2.78k, False: 5.56k]
  ------------------
  398|  2.78k|        TLS_SIGALG_INFO *tmp = NULL;
  399|       |
  400|  2.78k|        if (ctx->sigalg_list_max_len == 0)
  ------------------
  |  Branch (400:13): [True: 2.78k, False: 0]
  ------------------
  401|  2.78k|            tmp = OPENSSL_malloc_array(TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  110|  2.78k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  402|  2.78k|                sizeof(TLS_SIGALG_INFO));
  403|      0|        else
  404|      0|            tmp = OPENSSL_realloc_array(ctx->sigalg_list,
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  405|  2.78k|                ctx->sigalg_list_max_len
  406|  2.78k|                    + TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  407|  2.78k|                sizeof(TLS_SIGALG_INFO));
  408|  2.78k|        if (tmp == NULL)
  ------------------
  |  Branch (408:13): [True: 0, False: 2.78k]
  ------------------
  409|      0|            return 0;
  410|  2.78k|        ctx->sigalg_list = tmp;
  411|  2.78k|        memset(tmp + ctx->sigalg_list_max_len, 0,
  412|  2.78k|            sizeof(TLS_SIGALG_INFO) * TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  383|  2.78k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  413|  2.78k|        ctx->sigalg_list_max_len += TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  383|  2.78k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  414|  2.78k|    }
  415|       |
  416|  8.35k|    sinf = &ctx->sigalg_list[ctx->sigalg_list_len];
  417|       |
  418|       |    /* First, mandatory parameters */
  419|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_NAME);
  ------------------
  |  |  169|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_NAME "tls-sigalg-name"
  ------------------
  420|  8.35k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  8.35k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (420:9): [True: 0, False: 8.35k]
  |  Branch (420:22): [True: 0, False: 8.35k]
  ------------------
  421|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  422|      0|        goto err;
  423|      0|    }
  424|  8.35k|    OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  131|  8.35k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  425|  8.35k|    sinf->sigalg_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|  8.35k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  426|  8.35k|    if (sinf->sigalg_name == NULL)
  ------------------
  |  Branch (426:9): [True: 0, False: 8.35k]
  ------------------
  427|      0|        goto err;
  428|       |
  429|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME);
  ------------------
  |  |  162|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME "tls-sigalg-iana-name"
  ------------------
  430|  8.35k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  8.35k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (430:9): [True: 0, False: 8.35k]
  |  Branch (430:22): [True: 0, False: 8.35k]
  ------------------
  431|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  432|      0|        goto err;
  433|      0|    }
  434|  8.35k|    OPENSSL_free(sinf->name);
  ------------------
  |  |  131|  8.35k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  435|  8.35k|    sinf->name = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|  8.35k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  436|  8.35k|    if (sinf->name == NULL)
  ------------------
  |  Branch (436:9): [True: 0, False: 8.35k]
  ------------------
  437|      0|        goto err;
  438|       |
  439|  8.35k|    p = OSSL_PARAM_locate_const(params,
  440|  8.35k|        OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT);
  ------------------
  |  |  159|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT "tls-sigalg-code-point"
  ------------------
  441|  8.35k|    if (p == NULL
  ------------------
  |  Branch (441:9): [True: 0, False: 8.35k]
  ------------------
  442|  8.35k|        || !OSSL_PARAM_get_uint(p, &code_point)
  ------------------
  |  Branch (442:12): [True: 0, False: 8.35k]
  ------------------
  443|  8.35k|        || code_point > UINT16_MAX) {
  ------------------
  |  Branch (443:12): [True: 0, False: 8.35k]
  ------------------
  444|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  445|      0|        goto err;
  446|      0|    }
  447|  8.35k|    sinf->code_point = (uint16_t)code_point;
  448|       |
  449|  8.35k|    p = OSSL_PARAM_locate_const(params,
  450|  8.35k|        OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS);
  ------------------
  |  |  171|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS "tls-sigalg-sec-bits"
  ------------------
  451|  8.35k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &sinf->secbits)) {
  ------------------
  |  Branch (451:9): [True: 0, False: 8.35k]
  |  Branch (451:22): [True: 0, False: 8.35k]
  ------------------
  452|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  453|      0|        goto err;
  454|      0|    }
  455|       |
  456|       |    /* Now, optional parameters */
  457|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_OID);
  ------------------
  |  |  170|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_OID "tls-sigalg-oid"
  ------------------
  458|  8.35k|    if (p == NULL) {
  ------------------
  |  Branch (458:9): [True: 0, False: 8.35k]
  ------------------
  459|      0|        sinf->sigalg_oid = NULL;
  460|  8.35k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  8.35k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (460:16): [True: 0, False: 8.35k]
  ------------------
  461|      0|        goto err;
  462|  8.35k|    } else {
  463|  8.35k|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  131|  8.35k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  464|  8.35k|        sinf->sigalg_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|  8.35k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  465|  8.35k|        if (sinf->sigalg_oid == NULL)
  ------------------
  |  Branch (465:13): [True: 0, False: 8.35k]
  ------------------
  466|      0|            goto err;
  467|  8.35k|    }
  468|       |
  469|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME);
  ------------------
  |  |  172|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME "tls-sigalg-sig-name"
  ------------------
  470|  8.35k|    if (p == NULL) {
  ------------------
  |  Branch (470:9): [True: 8.35k, False: 0]
  ------------------
  471|  8.35k|        sinf->sig_name = NULL;
  472|  8.35k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (472:16): [True: 0, False: 0]
  ------------------
  473|      0|        goto err;
  474|      0|    } else {
  475|      0|        OPENSSL_free(sinf->sig_name);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  476|      0|        sinf->sig_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  477|      0|        if (sinf->sig_name == NULL)
  ------------------
  |  Branch (477:13): [True: 0, False: 0]
  ------------------
  478|      0|            goto err;
  479|      0|    }
  480|       |
  481|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_OID);
  ------------------
  |  |  173|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_OID "tls-sigalg-sig-oid"
  ------------------
  482|  8.35k|    if (p == NULL) {
  ------------------
  |  Branch (482:9): [True: 8.35k, False: 0]
  ------------------
  483|  8.35k|        sinf->sig_oid = NULL;
  484|  8.35k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (484:16): [True: 0, False: 0]
  ------------------
  485|      0|        goto err;
  486|      0|    } else {
  487|      0|        OPENSSL_free(sinf->sig_oid);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  488|      0|        sinf->sig_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  489|      0|        if (sinf->sig_oid == NULL)
  ------------------
  |  Branch (489:13): [True: 0, False: 0]
  ------------------
  490|      0|            goto err;
  491|      0|    }
  492|       |
  493|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME);
  ------------------
  |  |  160|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME "tls-sigalg-hash-name"
  ------------------
  494|  8.35k|    if (p == NULL) {
  ------------------
  |  Branch (494:9): [True: 8.35k, False: 0]
  ------------------
  495|  8.35k|        sinf->hash_name = NULL;
  496|  8.35k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (496:16): [True: 0, False: 0]
  ------------------
  497|      0|        goto err;
  498|      0|    } else {
  499|      0|        OPENSSL_free(sinf->hash_name);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  500|      0|        sinf->hash_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  501|      0|        if (sinf->hash_name == NULL)
  ------------------
  |  Branch (501:13): [True: 0, False: 0]
  ------------------
  502|      0|            goto err;
  503|      0|    }
  504|       |
  505|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_OID);
  ------------------
  |  |  161|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_OID "tls-sigalg-hash-oid"
  ------------------
  506|  8.35k|    if (p == NULL) {
  ------------------
  |  Branch (506:9): [True: 8.35k, False: 0]
  ------------------
  507|  8.35k|        sinf->hash_oid = NULL;
  508|  8.35k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (508:16): [True: 0, False: 0]
  ------------------
  509|      0|        goto err;
  510|      0|    } else {
  511|      0|        OPENSSL_free(sinf->hash_oid);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  512|      0|        sinf->hash_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  513|      0|        if (sinf->hash_oid == NULL)
  ------------------
  |  Branch (513:13): [True: 0, False: 0]
  ------------------
  514|      0|            goto err;
  515|      0|    }
  516|       |
  517|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE);
  ------------------
  |  |  163|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE "tls-sigalg-keytype"
  ------------------
  518|  8.35k|    if (p == NULL) {
  ------------------
  |  Branch (518:9): [True: 8.35k, False: 0]
  ------------------
  519|  8.35k|        sinf->keytype = NULL;
  520|  8.35k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (520:16): [True: 0, False: 0]
  ------------------
  521|      0|        goto err;
  522|      0|    } else {
  523|      0|        OPENSSL_free(sinf->keytype);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  524|      0|        sinf->keytype = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  525|      0|        if (sinf->keytype == NULL)
  ------------------
  |  Branch (525:13): [True: 0, False: 0]
  ------------------
  526|      0|            goto err;
  527|      0|    }
  528|       |
  529|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID);
  ------------------
  |  |  164|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID "tls-sigalg-keytype-oid"
  ------------------
  530|  8.35k|    if (p == NULL) {
  ------------------
  |  Branch (530:9): [True: 8.35k, False: 0]
  ------------------
  531|  8.35k|        sinf->keytype_oid = NULL;
  532|  8.35k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (532:16): [True: 0, False: 0]
  ------------------
  533|      0|        goto err;
  534|      0|    } else {
  535|      0|        OPENSSL_free(sinf->keytype_oid);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  536|      0|        sinf->keytype_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  537|      0|        if (sinf->keytype_oid == NULL)
  ------------------
  |  Branch (537:13): [True: 0, False: 0]
  ------------------
  538|      0|            goto err;
  539|      0|    }
  540|       |
  541|       |    /* Optional, not documented prior to 3.5 */
  542|  8.35k|    sinf->mindtls = sinf->maxdtls = -1;
  543|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS);
  ------------------
  |  |  167|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS "tls-min-dtls"
  ------------------
  544|  8.35k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->mindtls)) {
  ------------------
  |  Branch (544:9): [True: 8.35k, False: 0]
  |  Branch (544:22): [True: 0, False: 8.35k]
  ------------------
  545|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  546|      0|        goto err;
  547|      0|    }
  548|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS);
  ------------------
  |  |  165|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS "tls-max-dtls"
  ------------------
  549|  8.35k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->maxdtls)) {
  ------------------
  |  Branch (549:9): [True: 8.35k, False: 0]
  |  Branch (549:22): [True: 0, False: 8.35k]
  ------------------
  550|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  551|      0|        goto err;
  552|      0|    }
  553|       |    /* DTLS version numbers grow downward */
  554|  8.35k|    if ((sinf->maxdtls != 0) && (sinf->maxdtls != -1) && ((sinf->maxdtls > sinf->mindtls))) {
  ------------------
  |  Branch (554:9): [True: 8.35k, False: 0]
  |  Branch (554:33): [True: 0, False: 8.35k]
  |  Branch (554:58): [True: 0, False: 0]
  ------------------
  555|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  556|      0|        goto err;
  557|      0|    }
  558|       |    /* No provider sigalgs are supported in DTLS, reset after checking. */
  559|  8.35k|    sinf->mindtls = sinf->maxdtls = -1;
  560|       |
  561|       |    /* The remaining parameters below are mandatory again */
  562|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS);
  ------------------
  |  |  168|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS "tls-min-tls"
  ------------------
  563|  8.35k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->mintls)) {
  ------------------
  |  Branch (563:9): [True: 0, False: 8.35k]
  |  Branch (563:22): [True: 0, False: 8.35k]
  ------------------
  564|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  565|      0|        goto err;
  566|      0|    }
  567|  8.35k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS);
  ------------------
  |  |  166|  8.35k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS "tls-max-tls"
  ------------------
  568|  8.35k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->maxtls)) {
  ------------------
  |  Branch (568:9): [True: 0, False: 8.35k]
  |  Branch (568:22): [True: 0, False: 8.35k]
  ------------------
  569|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  570|      0|        goto err;
  571|      0|    }
  572|  8.35k|    if ((sinf->maxtls != 0) && (sinf->maxtls != -1) && ((sinf->maxtls < sinf->mintls))) {
  ------------------
  |  Branch (572:9): [True: 0, False: 8.35k]
  |  Branch (572:32): [True: 0, False: 0]
  |  Branch (572:56): [True: 0, False: 0]
  ------------------
  573|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  574|      0|        goto err;
  575|      0|    }
  576|  8.35k|    if ((sinf->mintls != 0) && (sinf->mintls != -1) && ((sinf->mintls > TLS1_3_VERSION)))
  ------------------
  |  |   27|  8.35k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (576:9): [True: 8.35k, False: 0]
  |  Branch (576:32): [True: 8.35k, False: 0]
  |  Branch (576:56): [True: 0, False: 8.35k]
  ------------------
  577|      0|        sinf->mintls = sinf->maxtls = -1;
  578|  8.35k|    if ((sinf->maxtls != 0) && (sinf->maxtls != -1) && ((sinf->maxtls < TLS1_3_VERSION)))
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (578:9): [True: 0, False: 8.35k]
  |  Branch (578:32): [True: 0, False: 0]
  |  Branch (578:56): [True: 0, False: 0]
  ------------------
  579|      0|        sinf->mintls = sinf->maxtls = -1;
  580|       |
  581|       |    /* Ignore unusable sigalgs */
  582|  8.35k|    if (sinf->mintls == -1 && sinf->mindtls == -1) {
  ------------------
  |  Branch (582:9): [True: 0, False: 8.35k]
  |  Branch (582:31): [True: 0, False: 0]
  ------------------
  583|      0|        ret = 1;
  584|      0|        goto err;
  585|      0|    }
  586|       |
  587|       |    /*
  588|       |     * Now check that the algorithm is actually usable for our property query
  589|       |     * string. Regardless of the result we still return success because we have
  590|       |     * successfully processed this signature, even though we may decide not to
  591|       |     * use it.
  592|       |     */
  593|  8.35k|    ret = 1;
  594|  8.35k|    ERR_set_mark();
  595|  8.35k|    keytype = inferred_keytype(sinf);
  596|  8.35k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, keytype, ctx->propq);
  597|  8.35k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (597:9): [True: 8.11k, False: 237]
  ------------------
  598|       |        /*
  599|       |         * We have successfully fetched the algorithm - however if the provider
  600|       |         * doesn't match this one then we ignore it.
  601|       |         *
  602|       |         * Note: We're cheating a little here. Technically if the same algorithm
  603|       |         * is available from more than one provider then it is undefined which
  604|       |         * implementation you will get back. Theoretically this could be
  605|       |         * different every time...we assume here that you'll always get the
  606|       |         * same one back if you repeat the exact same fetch. Is this a reasonable
  607|       |         * assumption to make (in which case perhaps we should document this
  608|       |         * behaviour)?
  609|       |         */
  610|  8.11k|        if (EVP_KEYMGMT_get0_provider(keymgmt) == provider) {
  ------------------
  |  Branch (610:13): [True: 8.11k, False: 0]
  ------------------
  611|       |            /*
  612|       |             * We have a match - so we could use this signature;
  613|       |             * Check proper object registration first, though.
  614|       |             * Don't care about return value as this may have been
  615|       |             * done within providers or previous calls to
  616|       |             * add_provider_sigalgs.
  617|       |             */
  618|  8.11k|            OBJ_create(sinf->sigalg_oid, sinf->sigalg_name, NULL);
  619|       |            /* sanity check: Without successful registration don't use alg */
  620|  8.11k|            if ((OBJ_txt2nid(sinf->sigalg_name) == NID_undef) || (OBJ_nid2obj(OBJ_txt2nid(sinf->sigalg_name)) == NULL)) {
  ------------------
  |  |   18|  8.11k|#define NID_undef                       0
  ------------------
  |  Branch (620:17): [True: 0, False: 8.11k]
  |  Branch (620:66): [True: 0, False: 8.11k]
  ------------------
  621|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  622|      0|                goto err;
  623|      0|            }
  624|  8.11k|            if (sinf->sig_name != NULL)
  ------------------
  |  Branch (624:17): [True: 0, False: 8.11k]
  ------------------
  625|      0|                OBJ_create(sinf->sig_oid, sinf->sig_name, NULL);
  626|  8.11k|            if (sinf->keytype != NULL)
  ------------------
  |  Branch (626:17): [True: 0, False: 8.11k]
  ------------------
  627|      0|                OBJ_create(sinf->keytype_oid, sinf->keytype, NULL);
  628|  8.11k|            if (sinf->hash_name != NULL)
  ------------------
  |  Branch (628:17): [True: 0, False: 8.11k]
  ------------------
  629|      0|                OBJ_create(sinf->hash_oid, sinf->hash_name, NULL);
  630|  8.11k|            OBJ_add_sigid(OBJ_txt2nid(sinf->sigalg_name),
  631|  8.11k|                (sinf->hash_name != NULL
  ------------------
  |  Branch (631:18): [True: 0, False: 8.11k]
  ------------------
  632|  8.11k|                        ? OBJ_txt2nid(sinf->hash_name)
  633|  8.11k|                        : NID_undef),
  ------------------
  |  |   18|  8.11k|#define NID_undef                       0
  ------------------
  634|  8.11k|                OBJ_txt2nid(keytype));
  635|  8.11k|            ctx->sigalg_list_len++;
  636|  8.11k|            sinf = NULL;
  637|  8.11k|        }
  638|  8.11k|        EVP_KEYMGMT_free(keymgmt);
  639|  8.11k|    }
  640|  8.35k|    ERR_pop_to_mark();
  641|  8.35k|err:
  642|  8.35k|    if (sinf != NULL) {
  ------------------
  |  Branch (642:9): [True: 237, False: 8.11k]
  ------------------
  643|    237|        OPENSSL_free(sinf->name);
  ------------------
  |  |  131|    237|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  644|    237|        sinf->name = NULL;
  645|    237|        OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  131|    237|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  646|    237|        sinf->sigalg_name = NULL;
  647|    237|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  131|    237|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  648|    237|        sinf->sigalg_oid = NULL;
  649|    237|        OPENSSL_free(sinf->sig_name);
  ------------------
  |  |  131|    237|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  650|    237|        sinf->sig_name = NULL;
  651|    237|        OPENSSL_free(sinf->sig_oid);
  ------------------
  |  |  131|    237|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  652|    237|        sinf->sig_oid = NULL;
  653|    237|        OPENSSL_free(sinf->hash_name);
  ------------------
  |  |  131|    237|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  654|    237|        sinf->hash_name = NULL;
  655|    237|        OPENSSL_free(sinf->hash_oid);
  ------------------
  |  |  131|    237|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  656|    237|        sinf->hash_oid = NULL;
  657|    237|        OPENSSL_free(sinf->keytype);
  ------------------
  |  |  131|    237|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  658|    237|        sinf->keytype = NULL;
  659|    237|        OPENSSL_free(sinf->keytype_oid);
  ------------------
  |  |  131|    237|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  660|       |        sinf->keytype_oid = NULL;
  661|    237|    }
  662|  8.35k|    return ret;
  663|  8.35k|}
t1_lib.c:inferred_keytype:
  375|  16.4k|{
  376|  16.4k|    return (sinf->keytype != NULL
  ------------------
  |  Branch (376:13): [True: 0, False: 16.4k]
  ------------------
  377|  16.4k|            ? sinf->keytype
  378|  16.4k|            : (sinf->sig_name != NULL
  ------------------
  |  Branch (378:16): [True: 0, False: 16.4k]
  ------------------
  379|  16.4k|                      ? sinf->sig_name
  380|  16.4k|                      : sinf->sigalg_name));
  381|  16.4k|}
t1_lib.c:tuple_cb:
 1562|  12.4k|{
 1563|  12.4k|    gid_cb_st *garg = arg;
 1564|  12.4k|    int retval = 1; /* We assume success */
 1565|  12.4k|    char *restored_tuple_string;
 1566|       |
 1567|       |    /* Sanity checks */
 1568|  12.4k|    if (garg == NULL || tuple == NULL || len <= 0) {
  ------------------
  |  Branch (1568:9): [True: 0, False: 12.4k]
  |  Branch (1568:25): [True: 4, False: 12.4k]
  |  Branch (1568:42): [True: 0, False: 12.4k]
  ------------------
 1569|      4|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  404|      4|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      4|    (ERR_new(),                                                  \
  |  |  |  |  407|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      4|        ERR_set_error)
  |  |  ------------------
  ------------------
 1570|      4|        return 0;
 1571|      4|    }
 1572|       |
 1573|  12.4k|    if (garg->inner && !garg->first && !close_tuple(garg))
  ------------------
  |  Branch (1573:9): [True: 281, False: 12.1k]
  |  Branch (1573:24): [True: 210, False: 71]
  |  Branch (1573:40): [True: 0, False: 210]
  ------------------
 1574|      0|        return 0;
 1575|  12.4k|    garg->first = 0;
 1576|       |
 1577|       |    /* Convert to \0-terminated string */
 1578|  12.4k|    restored_tuple_string = OPENSSL_malloc(len + 1 /* \0 */);
  ------------------
  |  |  106|  12.4k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1579|  12.4k|    if (restored_tuple_string == NULL)
  ------------------
  |  Branch (1579:9): [True: 0, False: 12.4k]
  ------------------
 1580|      0|        return 0;
 1581|  12.4k|    memcpy(restored_tuple_string, tuple, len);
 1582|  12.4k|    restored_tuple_string[len] = '\0';
 1583|       |
 1584|       |    /* Analyze group list of this tuple */
 1585|  12.4k|    retval = CONF_parse_list(restored_tuple_string, GROUP_DELIMITER_CHARACTER, 1, gid_cb, arg);
  ------------------
  |  | 1208|  12.4k|#define GROUP_DELIMITER_CHARACTER ':'
  ------------------
 1586|       |
 1587|       |    /* We don't need the \o-terminated string anymore */
 1588|  12.4k|    OPENSSL_free(restored_tuple_string);
  ------------------
  |  |  131|  12.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1589|       |
 1590|  12.4k|    if (!garg->inner && !close_tuple(garg))
  ------------------
  |  Branch (1590:9): [True: 12.1k, False: 281]
  |  Branch (1590:25): [True: 0, False: 12.1k]
  ------------------
 1591|      0|        return 0;
 1592|  12.4k|    return retval;
 1593|  12.4k|}
t1_lib.c:close_tuple:
 1548|  12.3k|{
 1549|  12.3k|    size_t gidcnt = garg->tuplcnt_arr[garg->tplcnt];
 1550|       |
 1551|  12.3k|    if (gidcnt == 0)
  ------------------
  |  Branch (1551:9): [True: 623, False: 11.7k]
  ------------------
 1552|    623|        return 1;
 1553|  11.7k|    if (!grow_tuples(garg))
  ------------------
  |  Branch (1553:9): [True: 0, False: 11.7k]
  ------------------
 1554|      0|        return 0;
 1555|       |
 1556|  11.7k|    garg->tuplcnt_arr[++garg->tplcnt] = 0;
 1557|  11.7k|    return 1;
 1558|  11.7k|}
t1_lib.c:grow_tuples:
 1532|  11.7k|{
 1533|  11.7k|    if (garg->tplcnt == garg->tplmax) {
  ------------------
  |  Branch (1533:9): [True: 0, False: 11.7k]
  ------------------
 1534|      0|        size_t newcnt = garg->tplmax + GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1535|      0|        size_t *tmp = OPENSSL_realloc_array(garg->tuplcnt_arr,
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1536|      0|            newcnt, sizeof(*garg->tuplcnt_arr));
 1537|       |
 1538|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1538:13): [True: 0, False: 0]
  ------------------
 1539|      0|            return 0;
 1540|       |
 1541|      0|        garg->tplmax = newcnt;
 1542|      0|        garg->tuplcnt_arr = tmp;
 1543|      0|    }
 1544|  11.7k|    return 1;
 1545|  11.7k|}
t1_lib.c:gid_cb:
 1264|  24.0k|{
 1265|  24.0k|    gid_cb_st *garg = arg;
 1266|  24.0k|    size_t i, j, k;
 1267|  24.0k|    uint16_t gid = 0;
 1268|  24.0k|    int found_group = 0;
 1269|  24.0k|    char etmp[GROUP_NAME_BUFFER_LENGTH];
 1270|  24.0k|    int retval = 1; /* We assume success */
 1271|  24.0k|    const char *current_prefix;
 1272|  24.0k|    int ignore_unknown = 0;
 1273|  24.0k|    int add_keyshare = 0;
 1274|  24.0k|    int remove_group = 0;
 1275|  24.0k|    size_t restored_prefix_index = 0;
 1276|  24.0k|    char *restored_default_group_string;
 1277|  24.0k|    int continue_while_loop = 1;
 1278|       |
 1279|       |    /* Sanity checks */
 1280|  24.0k|    if (garg == NULL || elem == NULL || len <= 0) {
  ------------------
  |  Branch (1280:9): [True: 0, False: 24.0k]
  |  Branch (1280:25): [True: 1, False: 24.0k]
  |  Branch (1280:41): [True: 0, False: 24.0k]
  ------------------
 1281|      1|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  404|      1|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      1|    (ERR_new(),                                                  \
  |  |  |  |  407|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      1|        ERR_set_error)
  |  |  ------------------
  ------------------
 1282|      1|        return 0;
 1283|      1|    }
 1284|       |
 1285|       |    /* Check the possible prefixes (remark: Leading and trailing spaces already cleared) */
 1286|  53.5k|    while (continue_while_loop && len > 0
  ------------------
  |  Branch (1286:12): [True: 53.5k, False: 32]
  |  Branch (1286:35): [True: 53.5k, False: 2]
  ------------------
 1287|  53.5k|        && ((current_prefix = strchr(prefixes, elem[0])) != NULL
  ------------------
  |  Branch (1287:13): [True: 29.5k, False: 24.0k]
  ------------------
 1288|  29.6k|            || OPENSSL_strncasecmp(current_prefix = (char *)DEFAULT_GROUPNAME_FIRST_CHARACTER, elem, 1) == 0)) {
  ------------------
  |  Branch (1288:16): [True: 105, False: 23.9k]
  ------------------
 1289|       |
 1290|  29.6k|        switch (*current_prefix) {
 1291|      0|        case TUPLE_DELIMITER_CHARACTER:
  ------------------
  |  | 1204|      0|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
  |  Branch (1291:9): [True: 0, False: 29.6k]
  ------------------
 1292|       |            /* tuple delimiter not allowed here -> syntax error */
 1293|      0|            return -1;
 1294|      0|            break;
 1295|      0|        case GROUP_DELIMITER_CHARACTER:
  ------------------
  |  | 1208|      0|#define GROUP_DELIMITER_CHARACTER ':'
  ------------------
  |  Branch (1295:9): [True: 0, False: 29.6k]
  ------------------
 1296|      0|            return -1; /* Not a valid prefix for a single group name-> syntax error */
 1297|      0|            break;
 1298|  6.42k|        case KEY_SHARE_INDICATOR_CHARACTER:
  ------------------
  |  | 1216|  6.42k|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
  |  Branch (1298:9): [True: 6.42k, False: 23.1k]
  ------------------
 1299|  6.42k|            if (add_keyshare)
  ------------------
  |  Branch (1299:17): [True: 2, False: 6.42k]
  ------------------
 1300|      2|                return -1; /* Only single key share prefix allowed -> syntax error */
 1301|  6.42k|            add_keyshare = 1;
 1302|  6.42k|            ++elem;
 1303|  6.42k|            --len;
 1304|  6.42k|            break;
 1305|    105|        case REMOVE_GROUP_INDICATOR_CHARACTER:
  ------------------
  |  | 1220|    105|#define REMOVE_GROUP_INDICATOR_CHARACTER '-'
  ------------------
  |  Branch (1305:9): [True: 105, False: 29.5k]
  ------------------
 1306|    105|            if (remove_group)
  ------------------
  |  Branch (1306:17): [True: 2, False: 103]
  ------------------
 1307|      2|                return -1; /* Only single remove group prefix allowed -> syntax error */
 1308|    103|            remove_group = 1;
 1309|    103|            ++elem;
 1310|    103|            --len;
 1311|    103|            break;
 1312|  22.9k|        case IGNORE_UNKNOWN_GROUP_CHARACTER:
  ------------------
  |  | 1212|  22.9k|#define IGNORE_UNKNOWN_GROUP_CHARACTER '?'
  ------------------
  |  Branch (1312:9): [True: 22.9k, False: 6.63k]
  ------------------
 1313|  22.9k|            if (ignore_unknown)
  ------------------
  |  Branch (1313:17): [True: 2, False: 22.9k]
  ------------------
 1314|      2|                return -1; /* Only single ? allowed -> syntax error */
 1315|  22.9k|            ignore_unknown = 1;
 1316|  22.9k|            ++elem;
 1317|  22.9k|            --len;
 1318|  22.9k|            break;
 1319|    105|        default:
  ------------------
  |  Branch (1319:9): [True: 105, False: 29.5k]
  ------------------
 1320|       |            /*
 1321|       |             * Check whether a DEFAULT[_XYZ] 'pseudo group' (= a built-in
 1322|       |             * list of groups) should be added
 1323|       |             */
 1324|    169|            for (i = 0; i < OSSL_NELEM(default_group_strings); i++) {
  ------------------
  |  |   14|    169|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1324:25): [True: 137, False: 32]
  ------------------
 1325|    137|                if ((size_t)len == (strlen(default_group_strings[i].list_name))
  ------------------
  |  Branch (1325:21): [True: 90, False: 47]
  ------------------
 1326|     90|                    && OPENSSL_strncasecmp(default_group_strings[i].list_name, elem, len) == 0) {
  ------------------
  |  Branch (1326:24): [True: 73, False: 17]
  ------------------
 1327|     73|                    int saved_first;
 1328|       |
 1329|       |                    /*
 1330|       |                     * We're asked to insert an entire list of groups from a
 1331|       |                     * DEFAULT[_XYZ] 'pseudo group' which we do by
 1332|       |                     * recursively calling this function (indirectly via
 1333|       |                     * CONF_parse_list and tuple_cb); essentially, we treat a DEFAULT
 1334|       |                     * group string like a tuple which is appended to the current tuple
 1335|       |                     * rather then starting a new tuple.
 1336|       |                     */
 1337|     73|                    if (ignore_unknown || remove_group)
  ------------------
  |  Branch (1337:25): [True: 1, False: 72]
  |  Branch (1337:43): [True: 1, False: 71]
  ------------------
 1338|      2|                        return -1; /* removal or ignore not allowed here -> syntax error */
 1339|       |
 1340|       |                    /*
 1341|       |                     * First, we restore any keyshare prefix in a new zero-terminated string
 1342|       |                     * (if not already present)
 1343|       |                     */
 1344|     71|                    restored_default_group_string = OPENSSL_malloc(1 /* max prefix length */ + strlen(default_group_strings[i].group_string) + 1 /* \0 */);
  ------------------
  |  |  106|     71|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1345|     71|                    if (restored_default_group_string == NULL)
  ------------------
  |  Branch (1345:25): [True: 0, False: 71]
  ------------------
 1346|      0|                        return 0;
 1347|     71|                    if (add_keyshare
  ------------------
  |  Branch (1347:25): [True: 1, False: 70]
  ------------------
 1348|       |                        /* Remark: we tolerate a duplicated keyshare indicator here */
 1349|      1|                        && default_group_strings[i].group_string[0]
  ------------------
  |  Branch (1349:28): [True: 1, False: 0]
  ------------------
 1350|      1|                            != KEY_SHARE_INDICATOR_CHARACTER)
  ------------------
  |  | 1216|      1|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
 1351|      1|                        restored_default_group_string[restored_prefix_index++] = KEY_SHARE_INDICATOR_CHARACTER;
  ------------------
  |  | 1216|      1|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
 1352|       |
 1353|     71|                    memcpy(restored_default_group_string + restored_prefix_index,
 1354|     71|                        default_group_strings[i].group_string,
 1355|     71|                        strlen(default_group_strings[i].group_string));
 1356|     71|                    restored_default_group_string[strlen(default_group_strings[i].group_string) + restored_prefix_index] = '\0';
 1357|       |                    /*
 1358|       |                     * Append first tuple of result to current tuple, and don't
 1359|       |                     * terminate the last tuple until we return to a top-level
 1360|       |                     * tuple_cb.
 1361|       |                     */
 1362|     71|                    saved_first = garg->first;
 1363|     71|                    garg->inner = garg->first = 1;
 1364|     71|                    retval = CONF_parse_list(restored_default_group_string,
 1365|     71|                        TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, garg);
  ------------------
  |  | 1204|     71|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1366|     71|                    garg->inner = 0;
 1367|     71|                    garg->first = saved_first;
 1368|       |                    /* We don't need the \0-terminated string anymore */
 1369|     71|                    OPENSSL_free(restored_default_group_string);
  ------------------
  |  |  131|     71|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1370|       |
 1371|     71|                    return retval;
 1372|     71|                }
 1373|    137|            }
 1374|       |            /*
 1375|       |             * If we reached this point, a group name started with a 'd' or 'D', but no request
 1376|       |             * for a DEFAULT[_XYZ] 'pseudo group' was detected, hence processing of the group
 1377|       |             * name can continue as usual (= the while loop checking prefixes can end)
 1378|       |             */
 1379|     32|            continue_while_loop = 0;
 1380|     32|            break;
 1381|  29.6k|        }
 1382|  29.6k|    }
 1383|       |
 1384|  23.9k|    if (len == 0)
  ------------------
  |  Branch (1384:9): [True: 2, False: 23.9k]
  ------------------
 1385|      2|        return -1; /* Seems we have prefxes without a group name -> syntax error */
 1386|       |
 1387|       |    /* Memory management in case more groups are present compared to initial allocation */
 1388|  23.9k|    if (garg->gidcnt == garg->gidmax) {
  ------------------
  |  Branch (1388:9): [True: 0, False: 23.9k]
  ------------------
 1389|      0|        uint16_t *tmp = OPENSSL_realloc_array(garg->gid_arr,
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1390|      0|            garg->gidmax + GROUPLIST_INCREMENT,
 1391|      0|            sizeof(*garg->gid_arr));
 1392|       |
 1393|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1393:13): [True: 0, False: 0]
  ------------------
 1394|      0|            return 0;
 1395|       |
 1396|      0|        garg->gidmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1397|      0|        garg->gid_arr = tmp;
 1398|      0|    }
 1399|       |    /* Memory management for key share groups */
 1400|  23.9k|    if (garg->ksidcnt == garg->ksidmax) {
  ------------------
  |  Branch (1400:9): [True: 0, False: 23.9k]
  ------------------
 1401|      0|        uint16_t *tmp = OPENSSL_realloc_array(garg->ksid_arr,
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1402|      0|            garg->ksidmax + GROUPLIST_INCREMENT,
 1403|      0|            sizeof(*garg->ksid_arr));
 1404|       |
 1405|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1405:13): [True: 0, False: 0]
  ------------------
 1406|      0|            return 0;
 1407|      0|        garg->ksidmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1408|      0|        garg->ksid_arr = tmp;
 1409|      0|    }
 1410|       |
 1411|  23.9k|    if (len > (int)(sizeof(etmp) - 1))
  ------------------
  |  Branch (1411:9): [True: 6, False: 23.9k]
  ------------------
 1412|      6|        return -1; /* group name to long  -> syntax error */
 1413|       |
 1414|       |    /*
 1415|       |     * Prepare addition or removal of a single group by converting
 1416|       |     * a group name into its groupID equivalent
 1417|       |     */
 1418|       |
 1419|       |    /* Create a \0-terminated string and get the gid for this group if possible */
 1420|  23.9k|    memcpy(etmp, elem, len);
 1421|  23.9k|    etmp[len] = 0;
 1422|       |
 1423|       |    /* Get the groupID */
 1424|  23.9k|    gid = tls1_group_name2id(garg->ctx, etmp);
 1425|       |    /*
 1426|       |     * Handle the case where no valid groupID was returned
 1427|       |     * e.g. for an unknown group, which we'd ignore (only) if relevant prefix was set
 1428|       |     */
 1429|  23.9k|    if (gid == 0) {
  ------------------
  |  Branch (1429:9): [True: 817, False: 23.1k]
  ------------------
 1430|       |        /* Is it one of the GOST groups ? */
 1431|  6.53k|        for (i = 0; i < OSSL_NELEM(name2id_arr); i++) {
  ------------------
  |  |   14|  6.53k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1431:21): [True: 5.71k, False: 817]
  ------------------
 1432|  5.71k|            if (OPENSSL_strcasecmp(etmp, name2id_arr[i].group_name) == 0) {
  ------------------
  |  Branch (1432:17): [True: 0, False: 5.71k]
  ------------------
 1433|      0|                gid = name2id_arr[i].groupID;
 1434|      0|                break;
 1435|      0|            }
 1436|  5.71k|        }
 1437|    817|        if (gid == 0) { /* still not found */
  ------------------
  |  Branch (1437:13): [True: 817, False: 0]
  ------------------
 1438|       |            /* Unknown group - ignore if ignore_unknown; trigger error otherwise */
 1439|    817|            retval = ignore_unknown;
 1440|    817|            goto done;
 1441|    817|        }
 1442|    817|    }
 1443|       |
 1444|       |    /* Make sure that at least one provider is supporting this groupID */
 1445|  23.1k|    found_group = 0;
 1446|   137k|    for (j = 0; j < garg->ctx->group_list_len; j++)
  ------------------
  |  Branch (1446:17): [True: 137k, False: 0]
  ------------------
 1447|   137k|        if (garg->ctx->group_list[j].group_id == gid) {
  ------------------
  |  Branch (1447:13): [True: 23.1k, False: 114k]
  ------------------
 1448|  23.1k|            found_group = 1;
 1449|  23.1k|            break;
 1450|  23.1k|        }
 1451|       |
 1452|       |    /*
 1453|       |     * No provider supports this group - ignore if
 1454|       |     * ignore_unknown; trigger error otherwise
 1455|       |     */
 1456|  23.1k|    if (found_group == 0) {
  ------------------
  |  Branch (1456:9): [True: 0, False: 23.1k]
  ------------------
 1457|      0|        retval = ignore_unknown;
 1458|      0|        goto done;
 1459|      0|    }
 1460|       |    /* Remove group (and keyshare) from anywhere in the list if present, ignore if not present */
 1461|  23.1k|    if (remove_group) {
  ------------------
  |  Branch (1461:9): [True: 71, False: 23.0k]
  ------------------
 1462|       |        /* Is the current group specified anywhere in the entire list so far? */
 1463|     71|        found_group = 0;
 1464|    286|        for (i = 0; i < garg->gidcnt; i++)
  ------------------
  |  Branch (1464:21): [True: 244, False: 42]
  ------------------
 1465|    244|            if (garg->gid_arr[i] == gid) {
  ------------------
  |  Branch (1465:17): [True: 29, False: 215]
  ------------------
 1466|     29|                found_group = 1;
 1467|     29|                break;
 1468|     29|            }
 1469|       |        /* The group to remove is at position i in the list of (zero indexed) groups */
 1470|     71|        if (found_group) {
  ------------------
  |  Branch (1470:13): [True: 29, False: 42]
  ------------------
 1471|       |            /* We remove that group from its position (which is at i)... */
 1472|     70|            for (j = i; j < (garg->gidcnt - 1); j++)
  ------------------
  |  Branch (1472:25): [True: 41, False: 29]
  ------------------
 1473|     41|                garg->gid_arr[j] = garg->gid_arr[j + 1]; /* ...shift remaining groups left ... */
 1474|     29|            garg->gidcnt--; /* ..and update the book keeping for the number of groups */
 1475|       |
 1476|       |            /*
 1477|       |             * We also must update the number of groups either in a previous tuple (which we
 1478|       |             * must identify and check whether it becomes empty due to the deletion) or in
 1479|       |             * the current tuple, pending where the deleted group resides
 1480|       |             */
 1481|     29|            k = 0;
 1482|     73|            for (j = 0; j < garg->tplcnt; j++) {
  ------------------
  |  Branch (1482:25): [True: 57, False: 16]
  ------------------
 1483|     57|                k += garg->tuplcnt_arr[j];
 1484|       |                /* Remark: i is zero-indexed, k is one-indexed */
 1485|     57|                if (k > i) { /* remove from one of the previous tuples */
  ------------------
  |  Branch (1485:21): [True: 13, False: 44]
  ------------------
 1486|     13|                    garg->tuplcnt_arr[j]--;
 1487|     13|                    break; /* We took care not to have group duplicates, hence we can stop here */
 1488|     13|                }
 1489|     57|            }
 1490|     29|            if (k <= i) /* remove from current tuple */
  ------------------
  |  Branch (1490:17): [True: 16, False: 13]
  ------------------
 1491|     16|                garg->tuplcnt_arr[j]--;
 1492|       |
 1493|       |            /* We also remove the group from the list of keyshares (if present) */
 1494|     29|            found_group = 0;
 1495|     60|            for (i = 0; i < garg->ksidcnt; i++)
  ------------------
  |  Branch (1495:25): [True: 52, False: 8]
  ------------------
 1496|     52|                if (garg->ksid_arr[i] == gid) {
  ------------------
  |  Branch (1496:21): [True: 21, False: 31]
  ------------------
 1497|     21|                    found_group = 1;
 1498|     21|                    break;
 1499|     21|                }
 1500|     29|            if (found_group) {
  ------------------
  |  Branch (1500:17): [True: 21, False: 8]
  ------------------
 1501|       |                /* Found, hence we remove that keyshare from its position (which is at i)... */
 1502|     33|                for (j = i; j < (garg->ksidcnt - 1); j++)
  ------------------
  |  Branch (1502:29): [True: 12, False: 21]
  ------------------
 1503|     12|                    garg->ksid_arr[j] = garg->ksid_arr[j + 1]; /* shift remaining key shares */
 1504|       |                /* ... and update the book keeping */
 1505|     21|                garg->ksidcnt--;
 1506|     21|            }
 1507|     29|        }
 1508|  23.0k|    } else { /* Processing addition of a single new group */
 1509|       |
 1510|       |        /* Check for duplicates */
 1511|   101k|        for (i = 0; i < garg->gidcnt; i++)
  ------------------
  |  Branch (1511:21): [True: 78.9k, False: 22.8k]
  ------------------
 1512|  78.9k|            if (garg->gid_arr[i] == gid) {
  ------------------
  |  Branch (1512:17): [True: 218, False: 78.7k]
  ------------------
 1513|       |                /* Duplicate group anywhere in the list of groups - ignore */
 1514|    218|                goto done;
 1515|    218|            }
 1516|       |
 1517|       |        /* Add the current group to the 'flat' list of groups */
 1518|  22.8k|        garg->gid_arr[garg->gidcnt++] = gid;
 1519|       |        /* and update the book keeping for the number of groups in current tuple */
 1520|  22.8k|        garg->tuplcnt_arr[garg->tplcnt]++;
 1521|       |
 1522|       |        /* We want to add a key share for the current group */
 1523|  22.8k|        if (add_keyshare)
  ------------------
  |  Branch (1523:13): [True: 6.14k, False: 16.6k]
  ------------------
 1524|  6.14k|            garg->ksid_arr[garg->ksidcnt++] = gid;
 1525|  22.8k|    }
 1526|       |
 1527|  23.9k|done:
 1528|  23.9k|    return retval;
 1529|  23.1k|}
t1_lib.c:tls1_group_name2id:
  710|  23.9k|{
  711|  23.9k|    size_t i;
  712|       |
  713|   149k|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (713:17): [True: 148k, False: 817]
  ------------------
  714|   148k|        if (OPENSSL_strcasecmp(ctx->group_list[i].tlsname, name) == 0
  ------------------
  |  Branch (714:13): [True: 23.1k, False: 125k]
  ------------------
  715|   125k|            || OPENSSL_strcasecmp(ctx->group_list[i].realname, name) == 0)
  ------------------
  |  Branch (715:16): [True: 6, False: 125k]
  ------------------
  716|  23.1k|            return ctx->group_list[i].group_id;
  717|   148k|    }
  718|       |
  719|    817|    return 0;
  720|  23.9k|}
t1_lib.c:tls1_lookup_sigalg:
 2391|   215k|{
 2392|   215k|    size_t i;
 2393|   215k|    const SIGALG_LOOKUP *lu = ctx->sigalg_lookup_cache;
 2394|       |
 2395|  3.34M|    for (i = 0; i < ctx->sigalg_lookup_cache_len; lu++, i++) {
  ------------------
  |  Branch (2395:17): [True: 3.34M, False: 0]
  ------------------
 2396|  3.34M|        if (lu->sigalg == sigalg) {
  ------------------
  |  Branch (2396:13): [True: 215k, False: 3.12M]
  ------------------
 2397|   215k|            if (!lu->available)
  ------------------
  |  Branch (2397:17): [True: 0, False: 215k]
  ------------------
 2398|      0|                return NULL;
 2399|   215k|            return lu;
 2400|   215k|        }
 2401|  3.34M|    }
 2402|      0|    return NULL;
 2403|   215k|}
t1_lib.c:tls_sigalg_compat:
 2663|  52.4k|{
 2664|  52.4k|    int minversion, maxversion;
 2665|  52.4k|    int minproto, maxproto;
 2666|       |
 2667|  52.4k|    if (!lu->available)
  ------------------
  |  Branch (2667:9): [True: 0, False: 52.4k]
  ------------------
 2668|      0|        return 0;
 2669|       |
 2670|  52.4k|    if (SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  258|  52.4k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  52.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  52.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 52.4k]
  |  |  ------------------
  ------------------
 2671|      0|        if (sc->ssl.method->version == DTLS_ANY_VERSION) {
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2671:13): [True: 0, False: 0]
  ------------------
 2672|      0|            minproto = sc->min_proto_version;
 2673|      0|            maxproto = sc->max_proto_version;
 2674|      0|        } else {
 2675|      0|            maxproto = minproto = sc->version;
 2676|      0|        }
 2677|      0|        minversion = lu->mindtls;
 2678|      0|        maxversion = lu->maxdtls;
 2679|  52.4k|    } else {
 2680|  52.4k|        if (sc->ssl.method->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|  52.4k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2680:13): [True: 52.4k, False: 0]
  ------------------
 2681|  52.4k|            minproto = sc->min_proto_version;
 2682|  52.4k|            maxproto = sc->max_proto_version;
 2683|  52.4k|        } else {
 2684|      0|            maxproto = minproto = sc->version;
 2685|      0|        }
 2686|  52.4k|        minversion = lu->mintls;
 2687|  52.4k|        maxversion = lu->maxtls;
 2688|  52.4k|    }
 2689|  52.4k|    if (minversion == -1 || maxversion == -1
  ------------------
  |  Branch (2689:9): [True: 0, False: 52.4k]
  |  Branch (2689:29): [True: 0, False: 52.4k]
  ------------------
 2690|  52.4k|        || (minversion != 0 && maxproto != 0
  ------------------
  |  Branch (2690:13): [True: 52.4k, False: 0]
  |  Branch (2690:32): [True: 377, False: 52.0k]
  ------------------
 2691|    377|            && ssl_version_cmp(sc, minversion, maxproto) > 0)
  ------------------
  |  Branch (2691:16): [True: 66, False: 311]
  ------------------
 2692|  52.3k|        || (maxversion != 0 && minproto != 0
  ------------------
  |  Branch (2692:13): [True: 21.6k, False: 30.7k]
  |  Branch (2692:32): [True: 21.6k, False: 0]
  ------------------
 2693|  21.6k|            && ssl_version_cmp(sc, maxversion, minproto) < 0)
  ------------------
  |  Branch (2693:16): [True: 18, False: 21.6k]
  ------------------
 2694|  52.3k|        || !tls12_sigalg_allowed(sc, SSL_SECOP_SIGALG_SUPPORTED, lu))
  ------------------
  |  | 2770|  52.3k|#define SSL_SECOP_SIGALG_SUPPORTED (11 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2742|  52.3k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2694:12): [True: 5.53k, False: 46.8k]
  ------------------
 2695|  5.61k|        return 0;
 2696|  46.8k|    return 1;
 2697|  52.4k|}
t1_lib.c:sigalg_security_bits:
 2615|  69.5k|{
 2616|  69.5k|    const EVP_MD *md = NULL;
 2617|  69.5k|    int secbits = 0;
 2618|       |
 2619|  69.5k|    if (!tls1_lookup_md(ctx, lu, &md))
  ------------------
  |  Branch (2619:9): [True: 0, False: 69.5k]
  ------------------
 2620|      0|        return 0;
 2621|  69.5k|    if (md != NULL) {
  ------------------
  |  Branch (2621:9): [True: 60.6k, False: 8.99k]
  ------------------
 2622|  60.6k|        int md_type = EVP_MD_get_type(md);
 2623|       |
 2624|       |        /* Security bits: half digest bits */
 2625|  60.6k|        secbits = EVP_MD_get_size(md) * 4;
 2626|  60.6k|        if (secbits <= 0)
  ------------------
  |  Branch (2626:13): [True: 0, False: 60.6k]
  ------------------
 2627|      0|            return 0;
 2628|       |        /*
 2629|       |         * SHA1 and MD5 are known to be broken. Reduce security bits so that
 2630|       |         * they're no longer accepted at security level 1. The real values don't
 2631|       |         * really matter as long as they're lower than 80, which is our
 2632|       |         * security level 1.
 2633|       |         * https://eprint.iacr.org/2020/014 puts a chosen-prefix attack for
 2634|       |         * SHA1 at 2^63.4 and MD5+SHA1 at 2^67.2
 2635|       |         * https://documents.epfl.ch/users/l/le/lenstra/public/papers/lat.pdf
 2636|       |         * puts a chosen-prefix attack for MD5 at 2^39.
 2637|       |         */
 2638|  60.6k|        if (md_type == NID_sha1)
  ------------------
  |  | 2344|  60.6k|#define NID_sha1                64
  ------------------
  |  Branch (2638:13): [True: 5.46k, False: 55.1k]
  ------------------
 2639|  5.46k|            secbits = 64;
 2640|  55.1k|        else if (md_type == NID_md5_sha1)
  ------------------
  |  | 1243|  55.1k|#define NID_md5_sha1            114
  ------------------
  |  Branch (2640:18): [True: 0, False: 55.1k]
  ------------------
 2641|      0|            secbits = 67;
 2642|  55.1k|        else if (md_type == NID_md5)
  ------------------
  |  | 1238|  55.1k|#define NID_md5         4
  ------------------
  |  Branch (2642:18): [True: 0, False: 55.1k]
  ------------------
 2643|      0|            secbits = 39;
 2644|  60.6k|    } else {
 2645|       |        /* Values from https://tools.ietf.org/html/rfc8032#section-8.5 */
 2646|  8.99k|        if (lu->sigalg == TLSEXT_SIGALG_ed25519)
  ------------------
  |  | 2237|  8.99k|#define TLSEXT_SIGALG_ed25519 0x0807
  ------------------
  |  Branch (2646:13): [True: 1.80k, False: 7.19k]
  ------------------
 2647|  1.80k|            secbits = 128;
 2648|  7.19k|        else if (lu->sigalg == TLSEXT_SIGALG_ed448)
  ------------------
  |  | 2238|  7.19k|#define TLSEXT_SIGALG_ed448 0x0808
  ------------------
  |  Branch (2648:18): [True: 1.80k, False: 5.38k]
  ------------------
 2649|  1.80k|            secbits = 224;
 2650|  8.99k|    }
 2651|       |    /*
 2652|       |     * For provider-based sigalgs we have secbits information available
 2653|       |     * in the (provider-loaded) sigalg_list structure
 2654|       |     */
 2655|  69.5k|    if ((secbits == 0) && (lu->sig_idx >= SSL_PKEY_NUM)
  ------------------
  |  |  328|  5.38k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2655:9): [True: 5.38k, False: 64.2k]
  |  Branch (2655:27): [True: 5.38k, False: 0]
  ------------------
 2656|  5.38k|        && ((lu->sig_idx - SSL_PKEY_NUM) < (int)ctx->sigalg_list_len)) {
  ------------------
  |  |  328|  5.38k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2656:12): [True: 5.38k, False: 0]
  ------------------
 2657|  5.38k|        secbits = ctx->sigalg_list[lu->sig_idx - SSL_PKEY_NUM].secbits;
  ------------------
  |  |  328|  5.38k|#define SSL_PKEY_NUM 9
  ------------------
 2658|  5.38k|    }
 2659|  69.5k|    return secbits;
 2660|  69.5k|}
t1_lib.c:tls12_sigalg_allowed:
 3348|  69.6k|{
 3349|  69.6k|    unsigned char sigalgstr[2];
 3350|  69.6k|    int secbits;
 3351|       |
 3352|  69.6k|    if (lu == NULL || !lu->available)
  ------------------
  |  Branch (3352:9): [True: 0, False: 69.6k]
  |  Branch (3352:23): [True: 0, False: 69.6k]
  ------------------
 3353|      0|        return 0;
 3354|       |    /* DSA is not allowed in TLS 1.3 */
 3355|  69.6k|    if (SSL_CONNECTION_IS_TLS13(s) && lu->sig == EVP_PKEY_DSA)
  ------------------
  |  |  265|   139k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|   139k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  69.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  69.6k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 69.6k, False: 0]
  |  |  ------------------
  |  |  266|  69.6k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  69.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   139k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 69.6k, False: 0]
  |  |  ------------------
  |  |  267|   139k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  69.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  69.6k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 69.6k]
  |  |  ------------------
  ------------------
                  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 (3355:39): [True: 0, False: 0]
  ------------------
 3356|      0|        return 0;
 3357|       |    /*
 3358|       |     * At some point we should fully axe DSA/etc. in ClientHello as per TLS 1.3
 3359|       |     * spec
 3360|       |     */
 3361|  69.6k|    if (!s->server && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|   139k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  69.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  69.6k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (3361:9): [True: 69.6k, False: 0]
  |  Branch (3361:23): [True: 69.6k, False: 0]
  ------------------
 3362|  69.6k|        && s->s3.tmp.min_ver >= TLS1_3_VERSION
  ------------------
  |  |   27|   139k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3362:12): [True: 124, False: 69.5k]
  ------------------
 3363|    124|        && (lu->sig == EVP_PKEY_DSA || lu->hash_idx == SSL_MD_SHA1_IDX
  ------------------
  |  |   66|    124|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|    248|#define NID_dsa         116
  |  |  ------------------
  ------------------
                      && (lu->sig == EVP_PKEY_DSA || lu->hash_idx == SSL_MD_SHA1_IDX
  ------------------
  |  |  188|    188|#define SSL_MD_SHA1_IDX 1
  ------------------
  |  Branch (3363:13): [True: 60, False: 64]
  |  Branch (3363:40): [True: 0, False: 64]
  ------------------
 3364|     64|            || lu->hash_idx == SSL_MD_MD5_IDX
  ------------------
  |  |  187|    188|#define SSL_MD_MD5_IDX 0
  ------------------
  |  Branch (3364:16): [True: 0, False: 64]
  ------------------
 3365|     64|            || lu->hash_idx == SSL_MD_SHA224_IDX))
  ------------------
  |  |  197|     64|#define SSL_MD_SHA224_IDX 10
  ------------------
  |  Branch (3365:16): [True: 0, False: 64]
  ------------------
 3366|     60|        return 0;
 3367|       |
 3368|       |    /* See if public key algorithm allowed */
 3369|  69.5k|    if (ssl_cert_is_disabled(SSL_CONNECTION_GET_CTX(s), lu->sig_idx))
  ------------------
  |  |   26|  69.5k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (3369:9): [True: 0, False: 69.5k]
  ------------------
 3370|      0|        return 0;
 3371|       |
 3372|  69.5k|    if (lu->sig == NID_id_GostR3410_2012_256
  ------------------
  |  | 4790|   139k|#define NID_id_GostR3410_2012_256               979
  ------------------
  |  Branch (3372:9): [True: 0, False: 69.5k]
  ------------------
 3373|  69.5k|        || lu->sig == NID_id_GostR3410_2012_512
  ------------------
  |  | 4795|   139k|#define NID_id_GostR3410_2012_512               980
  ------------------
  |  Branch (3373:12): [True: 0, False: 69.5k]
  ------------------
 3374|  69.5k|        || lu->sig == NID_id_GostR3410_2001) {
  ------------------
  |  | 4579|  69.5k|#define NID_id_GostR3410_2001           811
  ------------------
  |  Branch (3374:12): [True: 0, False: 69.5k]
  ------------------
 3375|       |        /* We never allow GOST sig algs on the server with TLSv1.3 */
 3376|      0|        if (s->server && SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      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 (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      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 (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3376:13): [True: 0, False: 0]
  ------------------
 3377|      0|            return 0;
 3378|      0|        if (!s->server
  ------------------
  |  Branch (3378:13): [True: 0, False: 0]
  ------------------
 3379|      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 (3379:16): [True: 0, False: 0]
  ------------------
 3380|      0|            && s->s3.tmp.max_ver >= TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3380:16): [True: 0, False: 0]
  ------------------
 3381|      0|            int i, num;
 3382|      0|            STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3383|       |
 3384|       |            /*
 3385|       |             * We're a client that could negotiate TLSv1.3. We only allow GOST
 3386|       |             * sig algs if we could negotiate TLSv1.2 or below and we have GOST
 3387|       |             * ciphersuites enabled.
 3388|       |             */
 3389|       |
 3390|      0|            if (s->s3.tmp.min_ver >= TLS1_3_VERSION)
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3390:17): [True: 0, False: 0]
  ------------------
 3391|      0|                return 0;
 3392|       |
 3393|      0|            sk = SSL_get_ciphers(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 3394|      0|            num = sk != NULL ? sk_SSL_CIPHER_num(sk) : 0;
  ------------------
  |  | 1005|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3394:19): [True: 0, False: 0]
  ------------------
 3395|      0|            for (i = 0; i < num; i++) {
  ------------------
  |  Branch (3395:25): [True: 0, False: 0]
  ------------------
 3396|      0|                const SSL_CIPHER *c;
 3397|       |
 3398|      0|                c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1006|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3399|       |                /* Skip disabled ciphers */
 3400|      0|                if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0))
  ------------------
  |  | 2752|      0|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|      0|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (3400:21): [True: 0, False: 0]
  ------------------
 3401|      0|                    continue;
 3402|       |
 3403|      0|                if ((c->algorithm_mkey & (SSL_kGOST | SSL_kGOST18)) != 0)
  ------------------
  |  |   89|      0|#define SSL_kGOST 0x00000010U
  ------------------
                              if ((c->algorithm_mkey & (SSL_kGOST | SSL_kGOST18)) != 0)
  ------------------
  |  |   97|      0|#define SSL_kGOST18 0x00000200U
  ------------------
  |  Branch (3403:21): [True: 0, False: 0]
  ------------------
 3404|      0|                    break;
 3405|      0|            }
 3406|      0|            if (i == num)
  ------------------
  |  Branch (3406:17): [True: 0, False: 0]
  ------------------
 3407|      0|                return 0;
 3408|      0|        }
 3409|      0|    }
 3410|       |
 3411|       |    /* Finally see if security callback allows it */
 3412|  69.5k|    secbits = sigalg_security_bits(SSL_CONNECTION_GET_CTX(s), lu);
  ------------------
  |  |   26|  69.5k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3413|  69.5k|    sigalgstr[0] = (lu->sigalg >> 8) & 0xff;
 3414|  69.5k|    sigalgstr[1] = lu->sigalg & 0xff;
 3415|  69.5k|    return ssl_security(s, op, secbits, lu->hash, (void *)sigalgstr);
 3416|  69.5k|}

tls13_alert_code:
  838|      4|{
  839|       |    /* There are 2 additional alerts in TLSv1.3 compared to TLSv1.2 */
  840|      4|    if (code == SSL_AD_MISSING_EXTENSION || code == SSL_AD_CERTIFICATE_REQUIRED)
  ------------------
  |  | 1246|      4|#define SSL_AD_MISSING_EXTENSION TLS13_AD_MISSING_EXTENSION
  |  |  ------------------
  |  |  |  |   71|      8|#define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
  |  |  ------------------
  ------------------
                  if (code == SSL_AD_MISSING_EXTENSION || code == SSL_AD_CERTIFICATE_REQUIRED)
  ------------------
  |  | 1247|      4|#define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED
  |  |  ------------------
  |  |  |  |   72|      4|#define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (840:9): [True: 0, False: 4]
  |  Branch (840:45): [True: 0, False: 4]
  ------------------
  841|      0|        return code;
  842|       |
  843|      4|    return tls1_alert_code(code);
  844|      4|}

tls_engine_finish:
   24|  22.2k|{
   25|  22.2k|    ENGINE_finish(e);
   26|  22.2k|}
tls_get_cipher_from_engine:
   30|  64.0k|{
   31|  64.0k|    const EVP_CIPHER *ret = NULL;
   32|  64.0k|#ifndef OPENSSL_NO_ENGINE
   33|  64.0k|    ENGINE *eng;
   34|       |
   35|       |    /*
   36|       |     * If there is an Engine available for this cipher we use the "implicit"
   37|       |     * form to ensure we use that engine later.
   38|       |     */
   39|  64.0k|    eng = ENGINE_get_cipher_engine(nid);
   40|  64.0k|    if (eng != NULL) {
  ------------------
  |  Branch (40:9): [True: 0, False: 64.0k]
  ------------------
   41|      0|        ret = ENGINE_get_cipher(eng, nid);
   42|      0|        ENGINE_finish(eng);
   43|      0|    }
   44|  64.0k|#endif
   45|  64.0k|    return ret;
   46|  64.0k|}
tls_get_digest_from_engine:
   49|  44.3k|{
   50|  44.3k|    const EVP_MD *ret = NULL;
   51|  44.3k|#ifndef OPENSSL_NO_ENGINE
   52|  44.3k|    ENGINE *eng;
   53|       |
   54|       |    /*
   55|       |     * If there is an Engine available for this digest we use the "implicit"
   56|       |     * form to ensure we use that engine later.
   57|       |     */
   58|  44.3k|    eng = ENGINE_get_digest_engine(nid);
   59|  44.3k|    if (eng != NULL) {
  ------------------
  |  Branch (59:9): [True: 0, False: 44.3k]
  ------------------
   60|      0|        ret = ENGINE_get_digest(eng, nid);
   61|      0|        ENGINE_finish(eng);
   62|      0|    }
   63|  44.3k|#endif
   64|  44.3k|    return ret;
   65|  44.3k|}

ssl_ctx_srp_ctx_free_intern:
   34|  2.78k|{
   35|  2.78k|    if (ctx == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 2.78k]
  ------------------
   36|      0|        return 0;
   37|  2.78k|    OPENSSL_free(ctx->srp_ctx.login);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|  2.78k|    OPENSSL_free(ctx->srp_ctx.info);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|  2.78k|    BN_free(ctx->srp_ctx.N);
   40|  2.78k|    BN_free(ctx->srp_ctx.g);
   41|  2.78k|    BN_free(ctx->srp_ctx.s);
   42|  2.78k|    BN_free(ctx->srp_ctx.B);
   43|  2.78k|    BN_free(ctx->srp_ctx.A);
   44|  2.78k|    BN_free(ctx->srp_ctx.a);
   45|  2.78k|    BN_free(ctx->srp_ctx.b);
   46|  2.78k|    BN_free(ctx->srp_ctx.v);
   47|  2.78k|    memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
   48|  2.78k|    ctx->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  2.78k|#define SRP_MINIMAL_N 1024
  ------------------
   49|  2.78k|    return 1;
   50|  2.78k|}
ssl_srp_ctx_free_intern:
   62|  1.95k|{
   63|  1.95k|    if (s == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 1.95k]
  ------------------
   64|      0|        return 0;
   65|  1.95k|    OPENSSL_free(s->srp_ctx.login);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|  1.95k|    OPENSSL_free(s->srp_ctx.info);
  ------------------
  |  |  131|  1.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|  1.95k|    BN_free(s->srp_ctx.N);
   68|  1.95k|    BN_free(s->srp_ctx.g);
   69|  1.95k|    BN_free(s->srp_ctx.s);
   70|  1.95k|    BN_free(s->srp_ctx.B);
   71|  1.95k|    BN_free(s->srp_ctx.A);
   72|  1.95k|    BN_free(s->srp_ctx.a);
   73|  1.95k|    BN_free(s->srp_ctx.b);
   74|  1.95k|    BN_free(s->srp_ctx.v);
   75|  1.95k|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
   76|  1.95k|    s->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  1.95k|#define SRP_MINIMAL_N 1024
  ------------------
   77|  1.95k|    return 1;
   78|  1.95k|}
ssl_srp_ctx_init_intern:
   93|  1.95k|{
   94|  1.95k|    SSL_CTX *ctx;
   95|       |
   96|  1.95k|    if (s == NULL || (ctx = SSL_CONNECTION_GET_CTX(s)) == NULL)
  ------------------
  |  |   26|  1.95k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (96:9): [True: 0, False: 1.95k]
  |  Branch (96:22): [True: 0, False: 1.95k]
  ------------------
   97|      0|        return 0;
   98|       |
   99|  1.95k|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
  100|       |
  101|  1.95k|    s->srp_ctx.SRP_cb_arg = ctx->srp_ctx.SRP_cb_arg;
  102|       |    /* set client Hello login callback */
  103|  1.95k|    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|  1.95k|    s->srp_ctx.SRP_verify_param_callback = ctx->srp_ctx.SRP_verify_param_callback;
  106|       |    /* set SRP client passwd callback */
  107|  1.95k|    s->srp_ctx.SRP_give_srp_client_pwd_callback = ctx->srp_ctx.SRP_give_srp_client_pwd_callback;
  108|       |
  109|  1.95k|    s->srp_ctx.strength = ctx->srp_ctx.strength;
  110|       |
  111|  1.95k|    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: 1.95k]
  |  Branch (111:38): [True: 0, False: 0]
  |  Branch (111:93): [True: 0, False: 1.95k]
  |  Branch (111:121): [True: 0, False: 0]
  |  Branch (111:176): [True: 0, False: 1.95k]
  |  Branch (111:204): [True: 0, False: 0]
  |  Branch (111:259): [True: 0, False: 1.95k]
  |  Branch (111:287): [True: 0, False: 0]
  |  Branch (111:342): [True: 0, False: 1.95k]
  |  Branch (111:370): [True: 0, False: 0]
  |  Branch (111:425): [True: 0, False: 1.95k]
  |  Branch (111:453): [True: 0, False: 0]
  |  Branch (111:508): [True: 0, False: 1.95k]
  |  Branch (111:536): [True: 0, False: 0]
  |  Branch (111:591): [True: 0, False: 1.95k]
  |  Branch (111:619): [True: 0, False: 0]
  ------------------
  112|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|        goto err;
  114|      0|    }
  115|  1.95k|    if ((ctx->srp_ctx.login != NULL) && ((s->srp_ctx.login = OPENSSL_strdup(ctx->srp_ctx.login)) == NULL)) {
  ------------------
  |  |  135|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 2, False: 1.95k]
  |  Branch (115:41): [True: 0, False: 2]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|  1.95k|    if ((ctx->srp_ctx.info != NULL) && ((s->srp_ctx.info = OPENSSL_strdup(ctx->srp_ctx.info)) == NULL)) {
  ------------------
  |  |  135|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (119:9): [True: 2, False: 1.95k]
  |  Branch (119:40): [True: 0, False: 2]
  ------------------
  120|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  121|      0|        goto err;
  122|      0|    }
  123|  1.95k|    s->srp_ctx.srp_Mask = ctx->srp_ctx.srp_Mask;
  124|       |
  125|  1.95k|    return 1;
  126|      0|err:
  127|      0|    OPENSSL_free(s->srp_ctx.login);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  128|      0|    OPENSSL_free(s->srp_ctx.info);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#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|  1.95k|}
ssl_ctx_srp_ctx_init_intern:
  154|  2.70k|{
  155|  2.70k|    if (ctx == NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 2.70k]
  ------------------
  156|      0|        return 0;
  157|       |
  158|  2.70k|    memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
  159|  2.70k|    ctx->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  2.70k|#define SRP_MINIMAL_N 1024
  ------------------
  160|       |
  161|  2.70k|    return 1;
  162|  2.70k|}
SSL_CTX_set_srp_username:
  506|      6|{
  507|      6|    return tls1_ctx_ctrl(ctx, SSL_CTRL_SET_TLS_EXT_SRP_USERNAME, 0, name);
  ------------------
  |  |  502|      6|#define tls1_ctx_ctrl ssl3_ctx_ctrl
  ------------------
                  return tls1_ctx_ctrl(ctx, SSL_CTRL_SET_TLS_EXT_SRP_USERNAME, 0, name);
  ------------------
  |  | 1339|      6|#define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME 79
  ------------------
  508|      6|}
SSL_CTX_set_srp_password:
  511|      4|{
  512|      4|    return tls1_ctx_ctrl(ctx, SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD, 0, password);
  ------------------
  |  |  502|      4|#define tls1_ctx_ctrl ssl3_ctx_ctrl
  ------------------
                  return tls1_ctx_ctrl(ctx, SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD, 0, password);
  ------------------
  |  | 1341|      4|#define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD 81
  ------------------
  513|      4|}

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

_Z16fuzz_open_socketPv12curlsocktypeP13curl_sockaddr:
   42|  5.36k|{
   43|  5.36k|  FUZZ_DATA *fuzz = (FUZZ_DATA *)ptr;
   44|  5.36k|  int fds[2];
   45|  5.36k|  int flags;
   46|  5.36k|  int status;
   47|  5.36k|  const uint8_t *data;
   48|  5.36k|  size_t data_len;
   49|  5.36k|  struct sockaddr_un client_addr;
   50|  5.36k|  FUZZ_SOCKET_MANAGER *sman;
   51|       |
   52|       |  /* Handle unused parameters */
   53|  5.36k|  (void)purpose;
   54|  5.36k|  (void)address;
   55|       |
   56|  5.36k|  if(fuzz->sockman[0].fd_state != FUZZ_SOCK_CLOSED &&
  ------------------
  |  Branch (56:6): [True: 49, False: 5.32k]
  ------------------
   57|     49|     fuzz->sockman[1].fd_state != FUZZ_SOCK_CLOSED) {
  ------------------
  |  Branch (57:6): [True: 0, False: 49]
  ------------------
   58|       |    /* Both sockets have already been opened. */
   59|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   60|      0|  }
   61|  5.36k|  else if(fuzz->sockman[0].fd_state != FUZZ_SOCK_CLOSED) {
  ------------------
  |  Branch (61:11): [True: 49, False: 5.32k]
  ------------------
   62|     49|    sman = &fuzz->sockman[1];
   63|     49|  }
   64|  5.32k|  else {
   65|  5.32k|    FV_PRINTF(fuzz, "FUZZ: Using socket manager 0 \n");
  ------------------
  |  |  530|  5.32k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 5.32k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   66|  5.32k|    sman = &fuzz->sockman[0];
   67|  5.32k|  }
   68|  5.36k|  FV_PRINTF(fuzz, "FUZZ[%d]: Using socket manager %d \n",
  ------------------
  |  |  530|  5.36k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 5.36k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   69|  5.36k|            sman->index,
   70|  5.36k|            sman->index);
   71|       |
   72|  5.36k|  if(socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) {
  ------------------
  |  Branch (72:6): [True: 0, False: 5.36k]
  ------------------
   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.36k|  if(!FUZZ_VALID_SOCK(fds[0]) || !FUZZ_VALID_SOCK(fds[1])) {
  ------------------
  |  |   34|  10.7k|#define FUZZ_VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
  |  |  ------------------
  |  |  |  Branch (34:29): [True: 5.36k, False: 0]
  |  |  |  Branch (34:43): [True: 5.36k, False: 0]
  |  |  ------------------
  ------------------
                if(!FUZZ_VALID_SOCK(fds[0]) || !FUZZ_VALID_SOCK(fds[1])) {
  ------------------
  |  |   34|  5.36k|#define FUZZ_VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
  |  |  ------------------
  |  |  |  Branch (34:29): [True: 5.36k, False: 0]
  |  |  |  Branch (34:43): [True: 5.36k, 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 the server non-blocking. */
   95|  5.36k|  flags = fcntl(fds[0], F_GETFL, 0);
   96|  5.36k|  status = fcntl(fds[0], F_SETFL, flags | O_NONBLOCK);
   97|       |
   98|  5.36k|  if(status == -1) {
  ------------------
  |  Branch (98:6): [True: 0, False: 5.36k]
  ------------------
   99|       |    /* Close the file descriptors so they don't leak. */
  100|      0|    close(fds[0]);
  101|      0|    close(fds[1]);
  102|       |
  103|       |    /* Setting non-blocking failed. Return a negative response code. */
  104|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  105|      0|  }
  106|       |
  107|       |  /* At this point, the file descriptors in hand should be good enough to
  108|       |     work with. */
  109|  5.36k|  sman->fd = fds[0];
  110|  5.36k|  sman->fd_state = FUZZ_SOCK_OPEN;
  111|       |
  112|       |  /* If the server should be sending data immediately, send it here. */
  113|  5.36k|  data = sman->responses[0].data;
  114|  5.36k|  data_len = sman->responses[0].data_len;
  115|       |
  116|  5.36k|  if(data != NULL) {
  ------------------
  |  Branch (116:6): [True: 1.15k, False: 4.21k]
  ------------------
  117|  1.15k|    FV_PRINTF(fuzz, "FUZZ[%d]: Sending initial response \n", sman->index);
  ------------------
  |  |  530|  1.15k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 1.15k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  118|       |
  119|  1.15k|    if(write(sman->fd, data, data_len) != (ssize_t)data_len) {
  ------------------
  |  Branch (119:8): [True: 0, False: 1.15k]
  ------------------
  120|       |      /* Close the file descriptors so they don't leak. */
  121|      0|      close(sman->fd);
  122|      0|      sman->fd = -1;
  123|       |
  124|      0|      close(fds[1]);
  125|       |
  126|       |      /* Failed to write all of the response data. */
  127|      0|      return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  128|      0|    }
  129|  1.15k|  }
  130|       |
  131|       |  /* Check to see if the socket should be shut down immediately. */
  132|  5.36k|  if(sman->responses[1].data == NULL) {
  ------------------
  |  Branch (132:6): [True: 4.78k, False: 585]
  ------------------
  133|  4.78k|    FV_PRINTF(fuzz,
  ------------------
  |  |  530|  4.78k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 4.78k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  134|  4.78k|              "FUZZ[%d]: Shutting down server socket: %d \n",
  135|  4.78k|              sman->index,
  136|  4.78k|              sman->fd);
  137|  4.78k|    shutdown(sman->fd, SHUT_WR);
  138|  4.78k|    sman->fd_state = FUZZ_SOCK_SHUTDOWN;
  139|  4.78k|  }
  140|       |
  141|       |  /* Return the other half of the socket pair. */
  142|  5.36k|  return fds[1];
  143|  5.36k|}
_Z21fuzz_sockopt_callbackPvi12curlsocktype:
  152|  5.36k|{
  153|  5.36k|  (void)ptr;
  154|  5.36k|  (void)curlfd;
  155|  5.36k|  (void)purpose;
  156|       |
  157|  5.36k|  return CURL_SOCKOPT_ALREADY_CONNECTED;
  ------------------
  |  |  421|  5.36k|#define CURL_SOCKOPT_ALREADY_CONNECTED 2
  ------------------
  158|  5.36k|}
_Z19fuzz_write_callbackPvmmS_:
  211|   211k|{
  212|   211k|  size_t total = size * nmemb;
  213|   211k|  FUZZ_DATA *fuzz = (FUZZ_DATA *)ptr;
  214|   211k|  size_t copy_len = total;
  215|       |
  216|       |  /* Restrict copy_len to at most TEMP_WRITE_ARRAY_SIZE. */
  217|   211k|  if(copy_len > TEMP_WRITE_ARRAY_SIZE) {
  ------------------
  |  |  271|   211k|#define TEMP_WRITE_ARRAY_SIZE           10
  ------------------
  |  Branch (217:6): [True: 8.77k, False: 202k]
  ------------------
  218|  8.77k|    copy_len = TEMP_WRITE_ARRAY_SIZE;
  ------------------
  |  |  271|  8.77k|#define TEMP_WRITE_ARRAY_SIZE           10
  ------------------
  219|  8.77k|  }
  220|       |
  221|       |  /* Copy bytes to the temp store just to ensure the parameters are
  222|       |     exercised. */
  223|   211k|  memcpy(fuzz->write_array, contents, copy_len);
  224|       |
  225|       |  /* Add on the total to the count. If it exceeds the maximum then return
  226|       |     zero to the caller so that the transfer is terminated early. */
  227|   211k|  fuzz->written_data += total;
  228|       |
  229|   211k|  if(fuzz->written_data > MAXIMUM_WRITE_LENGTH) {
  ------------------
  |  |  274|   211k|#define MAXIMUM_WRITE_LENGTH            52428800
  ------------------
  |  Branch (229:6): [True: 0, False: 211k]
  ------------------
  230|      0|    FV_PRINTF(fuzz,
  ------------------
  |  |  530|      0|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  231|      0|              "FUZZ: Exceeded maximum write length (%zu) \n",
  232|      0|              fuzz->written_data);
  233|      0|    total = 0;
  234|      0|  }
  235|       |
  236|   211k|  return total;
  237|   211k|}

_Z18fuzz_get_first_tlvP9fuzz_dataP3tlv:
   32|  12.5k|{
   33|       |  /* Reset the cursor. */
   34|  12.5k|  fuzz->state.data_pos = 0;
   35|  12.5k|  return fuzz_get_tlv_comn(fuzz, tlv);
   36|  12.5k|}
_Z17fuzz_get_next_tlvP9fuzz_dataP3tlv:
   43|  36.8k|{
   44|       |  /* Advance the cursor by the full length of the previous TLV. */
   45|  36.8k|  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|  36.8k|  if(fuzz->state.data_pos + sizeof(TLV_RAW) > fuzz->state.data_len) {
  ------------------
  |  Branch (48:6): [True: 10.3k, False: 26.4k]
  ------------------
   49|       |    /* No more TLVs to parse */
   50|  10.3k|    return TLV_RC_NO_MORE_TLVS;
  ------------------
  |  |  267|  10.3k|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
   51|  10.3k|  }
   52|       |
   53|  26.4k|  return fuzz_get_tlv_comn(fuzz, tlv);
   54|  36.8k|}
_Z17fuzz_get_tlv_comnP9fuzz_dataP3tlv:
   61|  39.0k|{
   62|  39.0k|  int rc = 0;
   63|  39.0k|  size_t data_offset;
   64|  39.0k|  TLV_RAW *raw;
   65|       |
   66|       |  /* Start by casting the data stream to a TLV. */
   67|  39.0k|  raw = (TLV_RAW *)&fuzz->state.data[fuzz->state.data_pos];
   68|  39.0k|  data_offset = fuzz->state.data_pos + sizeof(TLV_RAW);
   69|       |
   70|       |  /* Set the TLV values. */
   71|  39.0k|  tlv->type = to_u16(raw->raw_type);
   72|  39.0k|  tlv->length = to_u32(raw->raw_length);
   73|  39.0k|  tlv->value = &fuzz->state.data[data_offset];
   74|       |
   75|  39.0k|  FV_PRINTF(fuzz, "TLV: type %x length %u\n", tlv->type, tlv->length);
  ------------------
  |  |  530|  39.0k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 39.0k]
  |  |  ------------------
  |  |  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|  39.0k|  uint64_t check_length = data_offset;
   80|  39.0k|  check_length += tlv->length;
   81|       |
   82|  39.0k|  uint64_t remaining_len = fuzz->state.data_len;
   83|  39.0k|  FV_PRINTF(fuzz, "Check length of data: %" PRIu64 " \n", check_length);
  ------------------
  |  |  530|  39.0k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 39.0k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   84|  39.0k|  FV_PRINTF(fuzz, "Remaining length of data: %" PRIu64 " \n", remaining_len);
  ------------------
  |  |  530|  39.0k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 39.0k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   85|       |
   86|       |  /* Sanity check that the TLV length is ok. */
   87|  39.0k|  if(check_length > remaining_len) {
  ------------------
  |  Branch (87:6): [True: 604, False: 38.4k]
  ------------------
   88|    604|    FV_PRINTF(fuzz, "Returning TLV_RC_SIZE_ERROR\n");
  ------------------
  |  |  530|    604|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 604]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   89|    604|    rc = TLV_RC_SIZE_ERROR;
  ------------------
  |  |  268|    604|#define TLV_RC_SIZE_ERROR               2
  ------------------
   90|    604|  }
   91|       |
   92|  39.0k|  return rc;
   93|  39.0k|}
_Z14fuzz_parse_tlvP9fuzz_dataP3tlv:
   99|  37.4k|{
  100|  37.4k|  int rc;
  101|  37.4k|  char *tmp = NULL;
  102|  37.4k|  uint32_t tmp_u32;
  103|  37.4k|  curl_slist *new_list;
  104|       |
  105|  37.4k|  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|  1.35k|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE0, 0);
  ------------------
  |  |  513|  1.35k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 1.35k, False: 36.1k]
  |  |  ------------------
  |  |  514|  1.35k|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|  1.35k|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|  1.35k|          break
  ------------------
  109|    785|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE1, 1);
  ------------------
  |  |  513|    785|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 785, False: 36.7k]
  |  |  ------------------
  |  |  514|    785|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    785|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    785|          break
  ------------------
  110|    262|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE2, 2);
  ------------------
  |  |  513|    262|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 262, False: 37.2k]
  |  |  ------------------
  |  |  514|    262|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    262|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    262|          break
  ------------------
  111|    211|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE3, 3);
  ------------------
  |  |  513|    211|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 211, False: 37.2k]
  |  |  ------------------
  |  |  514|    211|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    211|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    211|          break
  ------------------
  112|    195|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE4, 4);
  ------------------
  |  |  513|    195|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 195, False: 37.2k]
  |  |  ------------------
  |  |  514|    195|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    195|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    195|          break
  ------------------
  113|    195|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE5, 5);
  ------------------
  |  |  513|    195|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 195, False: 37.2k]
  |  |  ------------------
  |  |  514|    195|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    195|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    195|          break
  ------------------
  114|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE6, 6);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 37.2k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  115|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE7, 7);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 37.2k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  116|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE8, 8);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 37.2k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  117|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE9, 9);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 37.2k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  118|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE10, 10);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 37.2k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  119|       |
  120|    194|    FRESPONSETLV(&fuzz->sockman[1], TLV_TYPE_SECOND_RESPONSE0, 0);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 37.2k]
  |  |  ------------------
  |  |  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: 37.2k]
  |  |  ------------------
  |  |  514|    195|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    195|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    195|          break
  ------------------
  122|       |
  123|     60|    case TLV_TYPE_UPLOAD1:
  ------------------
  |  |   36|     60|#define TLV_TYPE_UPLOAD1                        8
  ------------------
  |  Branch (123:5): [True: 60, False: 37.4k]
  ------------------
  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|     60|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_UPLOAD);
  ------------------
  |  |  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|        }
  |  |  ------------------
  ------------------
  128|       |
  129|     59|      fuzz->upload1_data = tlv->value;
  130|     59|      fuzz->upload1_data_len = tlv->length;
  131|       |
  132|     59|      FSET_OPTION(fuzz, CURLOPT_UPLOAD, 1L);
  ------------------
  |  |  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
  ------------------
  133|     59|      FSET_OPTION(fuzz,
  ------------------
  |  |  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
  ------------------
  134|     59|                  CURLOPT_INFILESIZE_LARGE,
  135|     59|                  (curl_off_t)fuzz->upload1_data_len);
  136|     59|      break;
  137|       |
  138|  9.78k|    case TLV_TYPE_HEADER:
  ------------------
  |  |   34|  9.78k|#define TLV_TYPE_HEADER                         6
  ------------------
  |  Branch (138:5): [True: 9.78k, False: 27.7k]
  ------------------
  139|       |      /* Limit the number of headers that can be added to a message to prevent
  140|       |         timeouts. */
  141|  9.78k|      if(fuzz->header_list_count >= TLV_MAX_NUM_CURLOPT_HEADER) {
  ------------------
  |  |  301|  9.78k|#define TLV_MAX_NUM_CURLOPT_HEADER      2000
  ------------------
  |  Branch (141:10): [True: 1, False: 9.78k]
  ------------------
  142|      1|        rc = 255;
  143|      1|        goto EXIT_LABEL;
  144|      1|      }
  145|       |
  146|  9.78k|      tmp = fuzz_tlv_to_string(tlv);
  147|  9.78k|      if (tmp == NULL) {
  ------------------
  |  Branch (147:11): [True: 0, False: 9.78k]
  ------------------
  148|       |        // keep on despite allocation failure
  149|      0|        break;
  150|      0|      }
  151|  9.78k|      new_list = curl_slist_append(fuzz->header_list, tmp);
  152|  9.78k|      if (new_list == NULL) {
  ------------------
  |  Branch (152:11): [True: 0, False: 9.78k]
  ------------------
  153|      0|        break;
  154|      0|      }
  155|  9.78k|      fuzz->header_list = new_list;
  156|  9.78k|      fuzz->header_list_count++;
  157|  9.78k|      break;
  158|       |
  159|    530|    case TLV_TYPE_MAIL_RECIPIENT:
  ------------------
  |  |   39|    530|#define TLV_TYPE_MAIL_RECIPIENT                 11
  ------------------
  |  Branch (159:5): [True: 530, False: 36.9k]
  ------------------
  160|       |      /* Limit the number of headers that can be added to a message to prevent
  161|       |         timeouts. */
  162|    530|      if(fuzz->header_list_count >= TLV_MAX_NUM_CURLOPT_HEADER) {
  ------------------
  |  |  301|    530|#define TLV_MAX_NUM_CURLOPT_HEADER      2000
  ------------------
  |  Branch (162:10): [True: 1, False: 529]
  ------------------
  163|      1|        rc = 255;
  164|      1|        goto EXIT_LABEL;
  165|      1|      }
  166|    529|      tmp = fuzz_tlv_to_string(tlv);
  167|    529|      if (tmp == NULL) {
  ------------------
  |  Branch (167:11): [True: 0, False: 529]
  ------------------
  168|       |        // keep on despite allocation failure
  169|      0|        break;
  170|      0|      }
  171|    529|      new_list = curl_slist_append(fuzz->mail_recipients_list, tmp);
  172|    529|      if (new_list != NULL) {
  ------------------
  |  Branch (172:11): [True: 529, False: 0]
  ------------------
  173|    529|        fuzz->mail_recipients_list = new_list;
  174|    529|        fuzz->header_list_count++;
  175|    529|      }
  176|    529|      break;
  177|       |
  178|  2.56k|    case TLV_TYPE_MIME_PART:
  ------------------
  |  |   41|  2.56k|#define TLV_TYPE_MIME_PART                      13
  ------------------
  |  Branch (178:5): [True: 2.56k, False: 34.9k]
  ------------------
  179|  2.56k|      if(fuzz->mime == NULL) {
  ------------------
  |  Branch (179:10): [True: 144, False: 2.42k]
  ------------------
  180|    144|        fuzz->mime = curl_mime_init(fuzz->easy);
  181|    144|      }
  182|       |
  183|  2.56k|      fuzz->part = curl_mime_addpart(fuzz->mime);
  184|       |
  185|       |      /* This TLV may have sub TLVs. */
  186|  2.56k|      fuzz_add_mime_part(tlv, fuzz->part);
  187|       |
  188|  2.56k|      break;
  189|       |
  190|     27|    case TLV_TYPE_POSTFIELDS:
  ------------------
  |  |   33|     27|#define TLV_TYPE_POSTFIELDS                     5
  ------------------
  |  Branch (190:5): [True: 27, False: 37.4k]
  ------------------
  191|     27|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_POSTFIELDS);
  ------------------
  |  |  503|     27|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  ------------------
  |  |  |  |  490|     27|        {                                                                     \
  |  |  |  |  491|     27|          if (!(COND))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (491:15): [True: 1, False: 26]
  |  |  |  |  ------------------
  |  |  |  |  492|     27|          {                                                                   \
  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  496|     27|        }
  |  |  ------------------
  ------------------
  192|     26|      fuzz->postfields = fuzz_tlv_to_string(tlv);
  193|     26|      FSET_OPTION(fuzz, CURLOPT_POSTFIELDS, fuzz->postfields);
  ------------------
  |  |  499|     26|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|     26|        {                                                                     \
  |  |  |  |  481|     26|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|     26|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 26]
  |  |  |  |  ------------------
  |  |  |  |  483|     26|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|     26|        }
  |  |  ------------------
  |  |  500|     26|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  194|     26|      break;
  195|       |
  196|     28|    case TLV_TYPE_HTTPPOSTBODY:
  ------------------
  |  |   80|     28|#define TLV_TYPE_HTTPPOSTBODY                   52
  ------------------
  |  Branch (196:5): [True: 28, False: 37.4k]
  ------------------
  197|     28|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_HTTPPOST);
  ------------------
  |  |  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|        }
  |  |  ------------------
  ------------------
  198|     27|      fuzz_setup_http_post(fuzz, tlv);
  199|     27|      FSET_OPTION(fuzz, CURLOPT_HTTPPOST, fuzz->httppost);
  ------------------
  |  |  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
  ------------------
  200|     27|      break;
  201|       |
  202|       |    /* Define a set of u32 options. */
  203|  1.60k|    FU32TLV(fuzz, TLV_TYPE_HTTPAUTH, CURLOPT_HTTPAUTH);
  ------------------
  |  |  519|    538|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 538, False: 36.9k]
  |  |  ------------------
  |  |  520|    538|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 536]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    538|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    536|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    536|        {                                                                     \
  |  |  |  |  |  |  491|    536|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 535]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    536|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    536|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    535|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    535|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    535|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    535|        {                                                                     \
  |  |  |  |  |  |  481|    535|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    535|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 534]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    535|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|    535|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    534|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    534|          break
  ------------------
  204|     40|    FU32TLV(fuzz, TLV_TYPE_OPTHEADER, CURLOPT_HEADER);
  ------------------
  |  |  519|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 15, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  205|     30|    FU32TLV(fuzz, TLV_TYPE_NOBODY, CURLOPT_NOBODY);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 37.4k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 10]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     11|          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
  ------------------
  206|     39|    FU32TLV(fuzz, TLV_TYPE_FOLLOWLOCATION, CURLOPT_FOLLOWLOCATION);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 37.4k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 12]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     16|          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: 9, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     11|          {                                                                   \
  |  |  |  |  |  |  484|      9|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      9|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      9|          }                                                                   \
  |  |  |  |  |  |  487|     11|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  207|     76|    FU32TLV(fuzz, TLV_TYPE_WILDCARDMATCH, CURLOPT_WILDCARDMATCH);
  ------------------
  |  |  519|     27|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 27, False: 37.4k]
  |  |  ------------------
  |  |  520|     27|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 25]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     27|          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
  ------------------
  208|     99|    FU32TLV(fuzz, TLV_TYPE_RTSP_REQUEST, CURLOPT_RTSP_REQUEST);
  ------------------
  |  |  519|     36|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 36, False: 37.4k]
  |  |  ------------------
  |  |  520|     36|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 32]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     36|          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: 28, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     31|          {                                                                   \
  |  |  |  |  |  |  484|     28|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     28|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     28|          }                                                                   \
  |  |  |  |  |  |  487|     31|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  209|    164|    FU32TLV(fuzz, TLV_TYPE_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_CLIENT_CSEQ);
  ------------------
  |  |  519|     57|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 57, False: 37.4k]
  |  |  ------------------
  |  |  520|     57|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 54]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     57|          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
  ------------------
  210|    136|    FU32TLV(fuzz, TLV_TYPE_HTTP_VERSION, CURLOPT_HTTP_VERSION);
  ------------------
  |  |  519|     47|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 47, False: 37.4k]
  |  |  ------------------
  |  |  520|     47|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 45]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     47|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     45|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     45|        {                                                                     \
  |  |  |  |  |  |  491|     45|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     45|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     45|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     44|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     44|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     44|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     44|        {                                                                     \
  |  |  |  |  |  |  481|     44|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     44|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 35, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     44|          {                                                                   \
  |  |  |  |  |  |  484|     35|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     35|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     35|          }                                                                   \
  |  |  |  |  |  |  487|     44|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  211|    136|    FU32TLV(fuzz, TLV_TYPE_NETRC, CURLOPT_NETRC);
  ------------------
  |  |  519|     47|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 47, False: 37.4k]
  |  |  ------------------
  |  |  520|     47|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 45]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     47|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     45|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     45|        {                                                                     \
  |  |  |  |  |  |  491|     45|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     45|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     45|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     44|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     44|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     44|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     44|        {                                                                     \
  |  |  |  |  |  |  481|     44|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     44|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 30, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     44|          {                                                                   \
  |  |  |  |  |  |  484|     30|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     30|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     30|          }                                                                   \
  |  |  |  |  |  |  487|     44|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     14|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     14|          break
  ------------------
  212|     19|    FU32TLV(fuzz, TLV_TYPE_WS_OPTIONS, CURLOPT_WS_OPTIONS);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  213|    112|    FU32TLV(fuzz, TLV_TYPE_CONNECT_ONLY, CURLOPT_CONNECT_ONLY);
  ------------------
  |  |  519|     39|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 39, False: 37.4k]
  |  |  ------------------
  |  |  520|     39|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 37]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     39|          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: 28, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     36|          {                                                                   \
  |  |  |  |  |  |  484|     28|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     28|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     28|          }                                                                   \
  |  |  |  |  |  |  487|     36|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  214|     22|    FU32TLV(fuzz, TLV_TYPE_POST, CURLOPT_POST);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 37.4k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 5]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     13|          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
  ------------------
  215|  1.11k|    FU32TLV(fuzz, TLV_TYPE_PROXYTYPE, CURLOPT_PROXYTYPE);
  ------------------
  |  |  519|    372|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 372, False: 37.1k]
  |  |  ------------------
  |  |  520|    372|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 371]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|    372|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    371|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    371|        {                                                                     \
  |  |  |  |  |  |  491|    371|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 370]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    371|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    371|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    370|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    370|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    370|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    370|        {                                                                     \
  |  |  |  |  |  |  481|    370|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    370|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 29, False: 341]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    370|          {                                                                   \
  |  |  |  |  |  |  484|     29|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     29|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     29|          }                                                                   \
  |  |  |  |  |  |  487|    370|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    341|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    341|          break
  ------------------
  216|    149|    FU32TLV(fuzz, TLV_TYPE_PORT, CURLOPT_PORT);
  ------------------
  |  |  519|     52|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 52, False: 37.4k]
  |  |  ------------------
  |  |  520|     52|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 49]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     52|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     49|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     49|        {                                                                     \
  |  |  |  |  |  |  491|     49|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 48]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     49|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     49|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     48|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     48|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     48|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     48|        {                                                                     \
  |  |  |  |  |  |  481|     48|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     48|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 23, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     48|          {                                                                   \
  |  |  |  |  |  |  484|     23|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     23|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     23|          }                                                                   \
  |  |  |  |  |  |  487|     48|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     25|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     25|          break
  ------------------
  217|    247|    FU32TLV(fuzz, TLV_TYPE_LOW_SPEED_LIMIT, CURLOPT_LOW_SPEED_LIMIT);
  ------------------
  |  |  519|     84|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 84, False: 37.4k]
  |  |  ------------------
  |  |  520|     84|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 82]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     84|          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: 0, False: 81]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     81|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     81|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     81|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     81|          break
  ------------------
  218|    292|    FU32TLV(fuzz, TLV_TYPE_LOW_SPEED_TIME, CURLOPT_LOW_SPEED_TIME);
  ------------------
  |  |  519|     99|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 99, False: 37.3k]
  |  |  ------------------
  |  |  520|     99|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 97]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     99|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     96|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     96|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  527|     96|          break
  ------------------
  219|    190|    FU32TLV(fuzz, TLV_TYPE_RESUME_FROM, CURLOPT_RESUME_FROM);
  ------------------
  |  |  519|     65|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 65, False: 37.4k]
  |  |  ------------------
  |  |  520|     65|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 63]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     65|          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
  ------------------
  220|     20|    FU32TLV(fuzz, TLV_TYPE_TIMEVALUE, CURLOPT_TIMEVALUE);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  221|    276|    FU32TLV(fuzz, TLV_TYPE_NOPROGRESS, CURLOPT_NOPROGRESS);
  ------------------
  |  |  519|     93|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 93, False: 37.3k]
  |  |  ------------------
  |  |  520|     93|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 92]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     93|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     92|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     92|        {                                                                     \
  |  |  |  |  |  |  491|     92|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 91]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     92|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     92|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     91|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     91|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     91|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     91|        {                                                                     \
  |  |  |  |  |  |  481|     91|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     91|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 91]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     91|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     91|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     91|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     91|          break
  ------------------
  222|     53|    FU32TLV(fuzz, TLV_TYPE_FAILONERROR, CURLOPT_FAILONERROR);
  ------------------
  |  |  519|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 20, False: 37.4k]
  |  |  ------------------
  |  |  520|     20|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 17]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     20|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     16|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     16|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  527|     16|          break
  ------------------
  223|     10|    FU32TLV(fuzz, TLV_TYPE_DIRLISTONLY, CURLOPT_DIRLISTONLY);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  224|     13|    FU32TLV(fuzz, TLV_TYPE_APPEND, CURLOPT_APPEND);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  225|     13|    FU32TLV(fuzz, TLV_TYPE_TRANSFERTEXT, CURLOPT_TRANSFERTEXT);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  226|     36|    FU32TLV(fuzz, TLV_TYPE_AUTOREFERER, CURLOPT_AUTOREFERER);
  ------------------
  |  |  519|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 17, False: 37.4k]
  |  |  ------------------
  |  |  520|     17|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 10]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     17|          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
  ------------------
  227|    167|    FU32TLV(fuzz, TLV_TYPE_PROXYPORT, CURLOPT_PROXYPORT);
  ------------------
  |  |  519|     60|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 60, False: 37.4k]
  |  |  ------------------
  |  |  520|     60|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 54]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     60|          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: 21, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     53|          {                                                                   \
  |  |  |  |  |  |  484|     21|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     21|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     21|          }                                                                   \
  |  |  |  |  |  |  487|     53|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     32|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     32|          break
  ------------------
  228|       |    // too easy for API misuse FU32TLV(fuzz, TLV_TYPE_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE);
  229|     11|    FU32TLV(fuzz, TLV_TYPE_HTTPPROXYTUNNEL, CURLOPT_HTTPPROXYTUNNEL);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  230|    439|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYPEER, CURLOPT_SSL_VERIFYPEER);
  ------------------
  |  |  519|    148|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 148, False: 37.3k]
  |  |  ------------------
  |  |  520|    148|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 146]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    148|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    146|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    146|        {                                                                     \
  |  |  |  |  |  |  491|    146|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 145]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    146|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    146|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    145|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    145|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    145|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    145|        {                                                                     \
  |  |  |  |  |  |  481|    145|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    145|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 145]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    145|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    145|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    145|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    145|          break
  ------------------
  231|    129|    FU32TLV(fuzz, TLV_TYPE_MAXREDIRS, CURLOPT_MAXREDIRS);
  ------------------
  |  |  519|     44|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 44, False: 37.4k]
  |  |  ------------------
  |  |  520|     44|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 43]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     44|          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: 0, False: 42]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     42|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     42|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     42|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     42|          break
  ------------------
  232|     13|    FU32TLV(fuzz, TLV_TYPE_FILETIME, CURLOPT_FILETIME);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  233|    158|    FU32TLV(fuzz, TLV_TYPE_MAXCONNECTS, CURLOPT_MAXCONNECTS);
  ------------------
  |  |  519|     55|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 55, False: 37.4k]
  |  |  ------------------
  |  |  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: 1, False: 50]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     51|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     51|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     50|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     50|          break
  ------------------
  234|     19|    FU32TLV(fuzz, TLV_TYPE_FRESH_CONNECT, CURLOPT_FRESH_CONNECT);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  235|     23|    FU32TLV(fuzz, TLV_TYPE_FORBID_REUSE, CURLOPT_FORBID_REUSE);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 37.4k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 7]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     10|          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
  ------------------
  236|    317|    FU32TLV(fuzz, TLV_TYPE_CONNECTTIMEOUT, CURLOPT_CONNECTTIMEOUT);
  ------------------
  |  |  519|    114|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 114, False: 37.3k]
  |  |  ------------------
  |  |  520|    114|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 12, False: 102]
  |  |  ------------------
  |  |  521|     12|            rc = 255;                                                         \
  |  |  522|     12|            goto EXIT_LABEL;                                                  \
  |  |  523|     12|          }                                                                   \
  |  |  524|    114|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    102|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    102|        {                                                                     \
  |  |  |  |  |  |  491|    102|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 101]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    102|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    102|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    101|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    101|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    101|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    101|        {                                                                     \
  |  |  |  |  |  |  481|    101|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    101|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 101]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    101|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    101|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    101|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    101|          break
  ------------------
  237|     14|    FU32TLV(fuzz, TLV_TYPE_HTTPGET, CURLOPT_HTTPGET);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  238|     28|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYHOST, CURLOPT_SSL_VERIFYHOST);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 37.4k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 9]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     11|          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
  ------------------
  239|     14|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_EPSV, CURLOPT_FTP_USE_EPSV);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  240|     19|    FU32TLV(fuzz, TLV_TYPE_SSLENGINE_DEFAULT, CURLOPT_SSLENGINE_DEFAULT);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  241|    304|    FU32TLV(fuzz, TLV_TYPE_DNS_CACHE_TIMEOUT, CURLOPT_DNS_CACHE_TIMEOUT);
  ------------------
  |  |  519|    105|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 105, False: 37.3k]
  |  |  ------------------
  |  |  520|    105|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 100]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|    105|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    100|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    100|        {                                                                     \
  |  |  |  |  |  |  491|    100|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 99]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    100|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    100|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     99|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     99|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     99|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     99|        {                                                                     \
  |  |  |  |  |  |  481|     99|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     99|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 99]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     99|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     99|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     99|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     99|          break
  ------------------
  242|     11|    FU32TLV(fuzz, TLV_TYPE_COOKIESESSION, CURLOPT_COOKIESESSION);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  243|    364|    FU32TLV(fuzz, TLV_TYPE_BUFFERSIZE, CURLOPT_BUFFERSIZE);
  ------------------
  |  |  519|    123|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 123, False: 37.3k]
  |  |  ------------------
  |  |  520|    123|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 121]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    123|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    121|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    121|        {                                                                     \
  |  |  |  |  |  |  491|    121|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    121|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    121|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    120|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    120|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    120|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    120|        {                                                                     \
  |  |  |  |  |  |  481|    120|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    120|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    120|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    120|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    120|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    120|          break
  ------------------
  244|     55|    FU32TLV(fuzz, TLV_TYPE_NOSIGNAL, CURLOPT_NOSIGNAL);
  ------------------
  |  |  519|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 20, False: 37.4k]
  |  |  ------------------
  |  |  520|     20|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 18]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     20|          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|     24|    FU32TLV(fuzz, TLV_TYPE_UNRESTRICTED_AUTH, CURLOPT_UNRESTRICTED_AUTH);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  246|      9|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_EPRT, CURLOPT_FTP_USE_EPRT);
  ------------------
  |  |  519|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 4, False: 37.4k]
  |  |  ------------------
  |  |  520|      4|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 3]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      4|          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
  ------------------
  247|    113|    FU32TLV(fuzz, TLV_TYPE_FTP_CREATE_MISSING_DIRS, CURLOPT_FTP_CREATE_MISSING_DIRS);
  ------------------
  |  |  519|     40|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 40, False: 37.4k]
  |  |  ------------------
  |  |  520|     40|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 37]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     40|          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
  ------------------
  248|    217|    FU32TLV(fuzz, TLV_TYPE_MAXFILESIZE, CURLOPT_MAXFILESIZE);
  ------------------
  |  |  519|     74|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 74, False: 37.4k]
  |  |  ------------------
  |  |  520|     74|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 72]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     74|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     72|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     72|        {                                                                     \
  |  |  |  |  |  |  491|     72|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     72|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     72|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     71|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     71|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     71|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     71|        {                                                                     \
  |  |  |  |  |  |  481|     71|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     71|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     71|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     71|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     71|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     71|          break
  ------------------
  249|     21|    FU32TLV(fuzz, TLV_TYPE_TCP_NODELAY, CURLOPT_TCP_NODELAY);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 37.4k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 6]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     10|          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|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 37.4k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 10, False: 3]
  |  |  ------------------
  |  |  521|     10|            rc = 255;                                                         \
  |  |  522|     10|            goto EXIT_LABEL;                                                  \
  |  |  523|     10|          }                                                                   \
  |  |  524|     13|          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
  ------------------
  251|      9|    FU32TLV(fuzz, TLV_TYPE_FTP_SKIP_PASV_IP, CURLOPT_FTP_SKIP_PASV_IP);
  ------------------
  |  |  519|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 4, False: 37.4k]
  |  |  ------------------
  |  |  520|      4|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 3]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      4|          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
  ------------------
  252|    197|    FU32TLV(fuzz, TLV_TYPE_LOCALPORT, CURLOPT_LOCALPORT);
  ------------------
  |  |  519|     72|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 72, False: 37.4k]
  |  |  ------------------
  |  |  520|     72|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 63]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|     72|          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: 29, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     62|          {                                                                   \
  |  |  |  |  |  |  484|     29|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     29|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     29|          }                                                                   \
  |  |  |  |  |  |  487|     62|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     33|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     33|          break
  ------------------
  253|    175|    FU32TLV(fuzz, TLV_TYPE_LOCALPORTRANGE, CURLOPT_LOCALPORTRANGE);
  ------------------
  |  |  519|     60|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 60, False: 37.4k]
  |  |  ------------------
  |  |  520|     60|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 58]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     60|          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: 28, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     57|          {                                                                   \
  |  |  |  |  |  |  484|     28|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     28|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     28|          }                                                                   \
  |  |  |  |  |  |  487|     57|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     29|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     29|          break
  ------------------
  254|     21|    FU32TLV(fuzz, TLV_TYPE_SSL_SESSIONID_CACHE, CURLOPT_SSL_SESSIONID_CACHE);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 37.4k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 7]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      8|          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
  ------------------
  255|     98|    FU32TLV(fuzz, TLV_TYPE_FTP_SSL_CCC, CURLOPT_FTP_SSL_CCC);
  ------------------
  |  |  519|     35|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 35, False: 37.4k]
  |  |  ------------------
  |  |  520|     35|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 32]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     35|          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
  ------------------
  256|    328|    FU32TLV(fuzz, TLV_TYPE_CONNECTTIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS);
  ------------------
  |  |  519|    111|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 111, False: 37.3k]
  |  |  ------------------
  |  |  520|    111|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 109]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    111|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    109|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    109|        {                                                                     \
  |  |  |  |  |  |  491|    109|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    109|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    109|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    108|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    108|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    108|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    108|        {                                                                     \
  |  |  |  |  |  |  481|    108|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    108|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    108|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    108|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    108|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    108|          break
  ------------------
  257|     10|    FU32TLV(fuzz, TLV_TYPE_HTTP_TRANSFER_DECODING, CURLOPT_HTTP_TRANSFER_DECODING);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  258|     12|    FU32TLV(fuzz, TLV_TYPE_HTTP_CONTENT_DECODING, CURLOPT_HTTP_CONTENT_DECODING);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  259|    132|    FU32TLV(fuzz, TLV_TYPE_NEW_FILE_PERMS, CURLOPT_NEW_FILE_PERMS);
  ------------------
  |  |  519|     45|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 45, False: 37.4k]
  |  |  ------------------
  |  |  520|     45|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 44]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     45|          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: 34, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     43|          {                                                                   \
  |  |  |  |  |  |  484|     34|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     34|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     34|          }                                                                   \
  |  |  |  |  |  |  487|     43|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  260|      5|    FU32TLV(fuzz, TLV_TYPE_NEW_DIRECTORY_PERMS, CURLOPT_NEW_DIRECTORY_PERMS);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  261|     10|    FU32TLV(fuzz, TLV_TYPE_PROXY_TRANSFER_MODE, CURLOPT_PROXY_TRANSFER_MODE);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  262|    312|    FU32TLV(fuzz, TLV_TYPE_ADDRESS_SCOPE, CURLOPT_ADDRESS_SCOPE);
  ------------------
  |  |  519|    105|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 105, False: 37.3k]
  |  |  ------------------
  |  |  520|    105|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 104]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|    105|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    104|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    104|        {                                                                     \
  |  |  |  |  |  |  491|    104|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 103]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    104|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    104|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    103|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    103|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    103|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    103|        {                                                                     \
  |  |  |  |  |  |  481|    103|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    103|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 103]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    103|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    103|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    103|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    103|          break
  ------------------
  263|     24|    FU32TLV(fuzz, TLV_TYPE_CERTINFO, CURLOPT_CERTINFO);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  264|    157|    FU32TLV(fuzz, TLV_TYPE_TFTP_BLKSIZE, CURLOPT_TFTP_BLKSIZE);
  ------------------
  |  |  519|     58|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 58, False: 37.4k]
  |  |  ------------------
  |  |  520|     58|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 50]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     58|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     50|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     50|        {                                                                     \
  |  |  |  |  |  |  491|     50|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 49]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     50|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     50|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     49|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     49|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     49|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     49|        {                                                                     \
  |  |  |  |  |  |  481|     49|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     49|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 49]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     49|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     49|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     49|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     49|          break
  ------------------
  265|      5|    FU32TLV(fuzz, TLV_TYPE_SOCKS5_GSSAPI_NEC, CURLOPT_SOCKS5_GSSAPI_NEC);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  266|     16|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_PRET, CURLOPT_FTP_USE_PRET);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  267|    156|    FU32TLV(fuzz, TLV_TYPE_RTSP_SERVER_CSEQ, CURLOPT_RTSP_SERVER_CSEQ);
  ------------------
  |  |  519|     53|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 53, False: 37.4k]
  |  |  ------------------
  |  |  520|     53|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 52]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     53|          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
  ------------------
  268|     10|    FU32TLV(fuzz, TLV_TYPE_TRANSFER_ENCODING, CURLOPT_TRANSFER_ENCODING);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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|     65|    FU32TLV(fuzz, TLV_TYPE_ACCEPTTIMEOUT_MS, CURLOPT_ACCEPTTIMEOUT_MS);
  ------------------
  |  |  519|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 24, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  270|     91|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPALIVE, CURLOPT_TCP_KEEPALIVE);
  ------------------
  |  |  519|     32|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 32, False: 37.4k]
  |  |  ------------------
  |  |  520|     32|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 30]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     32|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     30|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     30|        {                                                                     \
  |  |  |  |  |  |  491|     30|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     30|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     30|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     29|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     29|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     29|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     29|        {                                                                     \
  |  |  |  |  |  |  481|     29|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     29|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     29|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     29|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     29|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     29|          break
  ------------------
  271|    243|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPIDLE, CURLOPT_TCP_KEEPIDLE);
  ------------------
  |  |  519|     82|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 82, False: 37.4k]
  |  |  ------------------
  |  |  520|     82|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 81]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     82|          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
  ------------------
  272|    179|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPINTVL, CURLOPT_TCP_KEEPINTVL);
  ------------------
  |  |  519|     62|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 62, False: 37.4k]
  |  |  ------------------
  |  |  520|     62|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 59]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     62|          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
  ------------------
  273|     33|    FU32TLV(fuzz, TLV_TYPE_SASL_IR, CURLOPT_SASL_IR);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 37.4k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 9]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     16|          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
  ------------------
  274|     18|    FU32TLV(fuzz, TLV_TYPE_SSL_ENABLE_ALPN, CURLOPT_SSL_ENABLE_ALPN);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 37.4k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 5]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|      9|          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
  ------------------
  275|    147|    FU32TLV(fuzz, TLV_TYPE_EXPECT_100_TIMEOUT_MS, CURLOPT_EXPECT_100_TIMEOUT_MS);
  ------------------
  |  |  519|     50|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 50, False: 37.4k]
  |  |  ------------------
  |  |  520|     50|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 49]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     50|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     49|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     49|        {                                                                     \
  |  |  |  |  |  |  491|     49|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 48]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     49|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     49|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     48|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     48|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     48|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     48|        {                                                                     \
  |  |  |  |  |  |  481|     48|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     48|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 48]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     48|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     48|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     48|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     48|          break
  ------------------
  276|     25|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYSTATUS, CURLOPT_SSL_VERIFYSTATUS);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 37.4k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 8]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     10|          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
  ------------------
  277|      5|    FU32TLV(fuzz, TLV_TYPE_SSL_FALSESTART, CURLOPT_SSL_FALSESTART);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  278|     23|    FU32TLV(fuzz, TLV_TYPE_PATH_AS_IS, CURLOPT_PATH_AS_IS);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 37.4k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 7]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     10|          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
  ------------------
  279|     16|    FU32TLV(fuzz, TLV_TYPE_PIPEWAIT, CURLOPT_PIPEWAIT);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 37.4k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 4]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|      9|          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|    142|    FU32TLV(fuzz, TLV_TYPE_STREAM_WEIGHT, CURLOPT_STREAM_WEIGHT);
  ------------------
  |  |  519|     52|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 52, False: 37.4k]
  |  |  ------------------
  |  |  520|     52|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 46]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     52|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     46|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     46|        {                                                                     \
  |  |  |  |  |  |  491|     46|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 2, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     46|          {                                                                   \
  |  |  |  |  |  |  493|      2|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      2|          }                                                                   \
  |  |  |  |  |  |  496|     46|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     44|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     44|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     44|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     44|        {                                                                     \
  |  |  |  |  |  |  481|     44|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     44|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     44|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     44|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     44|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     44|          break
  ------------------
  281|     15|    FU32TLV(fuzz, TLV_TYPE_TFTP_NO_OPTIONS, CURLOPT_TFTP_NO_OPTIONS);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  282|     14|    FU32TLV(fuzz, TLV_TYPE_TCP_FASTOPEN, CURLOPT_TCP_FASTOPEN);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  283|     13|    FU32TLV(fuzz, TLV_TYPE_KEEP_SENDING_ON_ERROR, CURLOPT_KEEP_SENDING_ON_ERROR);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  284|     37|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_VERIFYPEER, CURLOPT_PROXY_SSL_VERIFYPEER);
  ------------------
  |  |  519|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 14, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  285|     20|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_VERIFYHOST, CURLOPT_PROXY_SSL_VERIFYHOST);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  286|     16|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_OPTIONS, CURLOPT_PROXY_SSL_OPTIONS);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  287|     47|    FU32TLV(fuzz, TLV_TYPE_SUPPRESS_CONNECT_HEADERS, CURLOPT_SUPPRESS_CONNECT_HEADERS);
  ------------------
  |  |  519|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 18, False: 37.4k]
  |  |  ------------------
  |  |  520|     18|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 15]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     18|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     14|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     14|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  527|     14|          break
  ------------------
  288|     43|    FU32TLV(fuzz, TLV_TYPE_SOCKS5_AUTH, CURLOPT_SOCKS5_AUTH);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 37.4k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 14]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     16|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     13|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  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: 10, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|     10|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     10|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     10|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  289|     11|    FU32TLV(fuzz, TLV_TYPE_SSH_COMPRESSION, CURLOPT_SSH_COMPRESSION);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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: 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
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  290|    108|    FU32TLV(fuzz, TLV_TYPE_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS);
  ------------------
  |  |  519|     41|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 41, False: 37.4k]
  |  |  ------------------
  |  |  520|     41|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 34]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     41|          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: 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
  |  |  ------------------
  |  |  527|     33|          break
  ------------------
  291|     36|    FU32TLV(fuzz, TLV_TYPE_HAPROXYPROTOCOL, CURLOPT_HAPROXYPROTOCOL);
  ------------------
  |  |  519|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 17, False: 37.4k]
  |  |  ------------------
  |  |  520|     17|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 10]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     17|          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
  ------------------
  292|     90|    FU32TLV(fuzz, TLV_TYPE_DNS_SHUFFLE_ADDRESSES, CURLOPT_DNS_SHUFFLE_ADDRESSES);
  ------------------
  |  |  519|     31|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 31, False: 37.4k]
  |  |  ------------------
  |  |  520|     31|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 30]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     31|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     30|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     30|        {                                                                     \
  |  |  |  |  |  |  491|     30|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     30|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     30|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     29|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     29|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     29|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     29|        {                                                                     \
  |  |  |  |  |  |  481|     29|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     29|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     29|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     29|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     29|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     29|          break
  ------------------
  293|     18|    FU32TLV(fuzz, TLV_TYPE_DISALLOW_USERNAME_IN_URL, CURLOPT_DISALLOW_USERNAME_IN_URL);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 37.4k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 5]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|      9|          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
  ------------------
  294|    217|    FU32TLV(fuzz, TLV_TYPE_UPLOAD_BUFFERSIZE, CURLOPT_UPLOAD_BUFFERSIZE);
  ------------------
  |  |  519|     76|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 76, False: 37.4k]
  |  |  ------------------
  |  |  520|     76|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 71]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     76|          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: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     70|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     70|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     70|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     70|          break
  ------------------
  295|     94|    FU32TLV(fuzz, TLV_TYPE_UPKEEP_INTERVAL_MS, CURLOPT_UPKEEP_INTERVAL_MS);
  ------------------
  |  |  519|     33|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 33, False: 37.4k]
  |  |  ------------------
  |  |  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|     13|    FU32TLV(fuzz, TLV_TYPE_HTTP09_ALLOWED, CURLOPT_HTTP09_ALLOWED);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  297|    115|    FU32TLV(fuzz, TLV_TYPE_ALTSVC_CTRL, CURLOPT_ALTSVC_CTRL);
  ------------------
  |  |  519|     40|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 40, False: 37.4k]
  |  |  ------------------
  |  |  520|     40|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 38]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     40|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     38|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     38|        {                                                                     \
  |  |  |  |  |  |  491|     38|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     38|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     38|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     37|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     37|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     37|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     37|        {                                                                     \
  |  |  |  |  |  |  481|     37|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     37|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 36]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     37|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     37|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     36|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     36|          break
  ------------------
  298|    128|    FU32TLV(fuzz, TLV_TYPE_MAXAGE_CONN, CURLOPT_MAXAGE_CONN);
  ------------------
  |  |  519|     45|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 45, False: 37.4k]
  |  |  ------------------
  |  |  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: 0, False: 41]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     41|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     41|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     41|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     41|          break
  ------------------
  299|     13|    FU32TLV(fuzz, TLV_TYPE_MAIL_RCPT_ALLOWFAILS, CURLOPT_MAIL_RCPT_ALLOWFAILS);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  300|     24|    FU32TLV(fuzz, TLV_TYPE_HSTS_CTRL, CURLOPT_HSTS_CTRL);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 37.4k]
  |  |  ------------------
  |  |  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|     10|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYPEER, CURLOPT_DOH_SSL_VERIFYPEER);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  302|     10|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYHOST, CURLOPT_DOH_SSL_VERIFYHOST);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  303|     19|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYSTATUS, CURLOPT_DOH_SSL_VERIFYSTATUS);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  304|    124|    FU32TLV(fuzz, TLV_TYPE_MAXLIFETIME_CONN, CURLOPT_MAXLIFETIME_CONN);
  ------------------
  |  |  519|     45|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 45, False: 37.4k]
  |  |  ------------------
  |  |  520|     45|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 40]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     45|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     40|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     40|        {                                                                     \
  |  |  |  |  |  |  491|     40|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 39]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     40|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     40|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     39|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     39|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     39|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     39|        {                                                                     \
  |  |  |  |  |  |  481|     39|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     39|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 39]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     39|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     39|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     39|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     39|          break
  ------------------
  305|     22|    FU32TLV(fuzz, TLV_TYPE_MIME_OPTIONS, CURLOPT_MIME_OPTIONS);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  306|    166|    FU32TLV(fuzz, TLV_TYPE_CA_CACHE_TIMEOUT, CURLOPT_CA_CACHE_TIMEOUT);
  ------------------
  |  |  519|     57|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 57, False: 37.4k]
  |  |  ------------------
  |  |  520|     57|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 55]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     57|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     55|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     55|        {                                                                     \
  |  |  |  |  |  |  491|     55|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 54]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     55|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     55|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     54|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     54|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     54|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     54|        {                                                                     \
  |  |  |  |  |  |  481|     54|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     54|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 54]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     54|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     54|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     54|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     54|          break
  ------------------
  307|     13|    FU32TLV(fuzz, TLV_TYPE_QUICK_EXIT, CURLOPT_QUICK_EXIT);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  308|     94|    FU32TLV(fuzz, TLV_TYPE_SERVER_RESPONSE_TIMEOUT_MS, CURLOPT_SERVER_RESPONSE_TIMEOUT_MS);
  ------------------
  |  |  519|     33|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 33, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  309|    164|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPCNT, CURLOPT_TCP_KEEPCNT);
  ------------------
  |  |  519|     57|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 57, False: 37.4k]
  |  |  ------------------
  |  |  520|     57|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 54]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     57|          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
  ------------------
  310|    190|    FU32TLV(fuzz, TLV_TYPE_SSLVERSION, CURLOPT_SSLVERSION);
  ------------------
  |  |  519|     65|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 65, False: 37.4k]
  |  |  ------------------
  |  |  520|     65|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 63]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     65|          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: 16, False: 46]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     62|          {                                                                   \
  |  |  |  |  |  |  484|     16|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     16|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     16|          }                                                                   \
  |  |  |  |  |  |  487|     62|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     46|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     46|          break
  ------------------
  311|    122|    FU32TLV(fuzz, TLV_TYPE_TIMECONDITION, CURLOPT_TIMECONDITION);
  ------------------
  |  |  519|     43|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 43, False: 37.4k]
  |  |  ------------------
  |  |  520|     43|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 40]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     43|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     40|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     40|        {                                                                     \
  |  |  |  |  |  |  491|     40|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 39]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     40|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     40|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     39|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     39|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     39|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     39|        {                                                                     \
  |  |  |  |  |  |  481|     39|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     39|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 35, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     39|          {                                                                   \
  |  |  |  |  |  |  484|     35|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     35|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     35|          }                                                                   \
  |  |  |  |  |  |  487|     39|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  312|    185|    FU32TLV(fuzz, TLV_TYPE_PROXYAUTH, CURLOPT_PROXYAUTH);
  ------------------
  |  |  519|     64|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 64, False: 37.4k]
  |  |  ------------------
  |  |  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: 1, False: 59]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     60|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     60|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     59|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     59|          break
  ------------------
  313|    148|    FU32TLV(fuzz, TLV_TYPE_IPRESOLVE, CURLOPT_IPRESOLVE);
  ------------------
  |  |  519|     51|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 51, False: 37.4k]
  |  |  ------------------
  |  |  520|     51|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 49]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     51|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     49|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     49|        {                                                                     \
  |  |  |  |  |  |  491|     49|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 48]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     49|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     49|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     48|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     48|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     48|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     48|        {                                                                     \
  |  |  |  |  |  |  481|     48|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     48|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 28, False: 20]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     48|          {                                                                   \
  |  |  |  |  |  |  484|     28|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     28|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     28|          }                                                                   \
  |  |  |  |  |  |  487|     48|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     20|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     20|          break
  ------------------
  314|    114|    FU32TLV(fuzz, TLV_TYPE_USE_SSL, CURLOPT_USE_SSL);
  ------------------
  |  |  519|     39|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 39, False: 37.4k]
  |  |  ------------------
  |  |  520|     39|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 38]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     39|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     38|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     38|        {                                                                     \
  |  |  |  |  |  |  491|     38|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     38|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     38|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     37|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     37|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     37|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     37|        {                                                                     \
  |  |  |  |  |  |  481|     37|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     37|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 29, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     37|          {                                                                   \
  |  |  |  |  |  |  484|     29|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     29|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     29|          }                                                                   \
  |  |  |  |  |  |  487|     37|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  315|    135|    FU32TLV(fuzz, TLV_TYPE_FTPSSLAUTH, CURLOPT_FTPSSLAUTH);
  ------------------
  |  |  519|     46|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 46, False: 37.4k]
  |  |  ------------------
  |  |  520|     46|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 45]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     46|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     45|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     45|        {                                                                     \
  |  |  |  |  |  |  491|     45|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     45|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     45|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     44|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     44|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     44|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     44|        {                                                                     \
  |  |  |  |  |  |  481|     44|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     44|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 38, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     44|          {                                                                   \
  |  |  |  |  |  |  484|     38|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     38|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     38|          }                                                                   \
  |  |  |  |  |  |  487|     44|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  316|    106|    FU32TLV(fuzz, TLV_TYPE_FTP_FILEMETHOD, CURLOPT_FTP_FILEMETHOD);
  ------------------
  |  |  519|     37|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 37, False: 37.4k]
  |  |  ------------------
  |  |  520|     37|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 35]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     37|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     35|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     35|        {                                                                     \
  |  |  |  |  |  |  491|     35|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     35|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     35|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     34|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     34|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     34|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     34|        {                                                                     \
  |  |  |  |  |  |  481|     34|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     34|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 30, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     34|          {                                                                   \
  |  |  |  |  |  |  484|     30|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     30|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     30|          }                                                                   \
  |  |  |  |  |  |  487|     34|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  317|      8|    FU32TLV(fuzz, TLV_TYPE_SSH_AUTH_TYPES, CURLOPT_SSH_AUTH_TYPES);
  ------------------
  |  |  519|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 4, False: 37.4k]
  |  |  ------------------
  |  |  520|      4|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 2]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      4|          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
  ------------------
  318|     83|    FU32TLV(fuzz, TLV_TYPE_POSTREDIR, CURLOPT_POSTREDIR);
  ------------------
  |  |  519|     32|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 32, False: 37.4k]
  |  |  ------------------
  |  |  520|     32|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 26]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     32|          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
  ------------------
  319|      5|    FU32TLV(fuzz, TLV_TYPE_GSSAPI_DELEGATION, CURLOPT_GSSAPI_DELEGATION);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  320|     25|    FU32TLV(fuzz, TLV_TYPE_SSL_OPTIONS, CURLOPT_SSL_OPTIONS);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 37.4k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 8]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     10|          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
  ------------------
  321|    160|    FU32TLV(fuzz, TLV_TYPE_HEADEROPT, CURLOPT_HEADEROPT);
  ------------------
  |  |  519|     55|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 55, False: 37.4k]
  |  |  ------------------
  |  |  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: 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
  ------------------
  322|     46|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSLVERSION, CURLOPT_PROXY_SSLVERSION);
  ------------------
  |  |  519|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 17, False: 37.4k]
  |  |  ------------------
  |  |  520|     17|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 15]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     17|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     14|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     14|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  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: 7, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     14|          {                                                                   \
  |  |  |  |  |  |  484|      7|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      7|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      7|          }                                                                   \
  |  |  |  |  |  |  487|     14|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      7|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      7|          break
  ------------------
  323|    196|    FU32TLV(fuzz, TLV_TYPE_RESUME_FROM_LARGE, CURLOPT_RESUME_FROM_LARGE);
  ------------------
  |  |  519|     67|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 67, False: 37.4k]
  |  |  ------------------
  |  |  520|     67|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 65]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     67|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     65|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     65|        {                                                                     \
  |  |  |  |  |  |  491|     65|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 64]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     65|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     65|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     64|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     64|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     64|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     64|        {                                                                     \
  |  |  |  |  |  |  481|     64|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     64|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 64]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     64|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     64|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     64|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     64|          break
  ------------------
  324|    120|    FU32TLV(fuzz, TLV_TYPE_MAXFILESIZE_LARGE, CURLOPT_MAXFILESIZE_LARGE);
  ------------------
  |  |  519|     43|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 43, False: 37.4k]
  |  |  ------------------
  |  |  520|     43|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 39]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     43|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     39|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     39|        {                                                                     \
  |  |  |  |  |  |  491|     39|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     39|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     39|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     38|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     38|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     38|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     38|        {                                                                     \
  |  |  |  |  |  |  481|     38|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     38|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     38|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     38|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     38|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     38|          break
  ------------------
  325|       |    // too easy for API misuse FU32TLV(fuzz, TLV_TYPE_POSTFIELDSIZE_LARGE, CURLOPT_POSTFIELDSIZE_LARGE);
  326|    245|    FU32TLV(fuzz, TLV_TYPE_MAX_SEND_SPEED_LARGE, CURLOPT_MAX_SEND_SPEED_LARGE);
  ------------------
  |  |  519|     84|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 84, False: 37.4k]
  |  |  ------------------
  |  |  520|     84|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 81]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     84|          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
  ------------------
  327|    610|    FU32TLV(fuzz, TLV_TYPE_MAX_RECV_SPEED_LARGE, CURLOPT_MAX_RECV_SPEED_LARGE);
  ------------------
  |  |  519|    205|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 205, False: 37.2k]
  |  |  ------------------
  |  |  520|    205|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 203]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    205|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    203|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    203|        {                                                                     \
  |  |  |  |  |  |  491|    203|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 202]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    203|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    203|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    202|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    202|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    202|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    202|        {                                                                     \
  |  |  |  |  |  |  481|    202|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    202|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 202]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    202|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    202|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    202|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    202|          break
  ------------------
  328|     16|    FU32TLV(fuzz, TLV_TYPE_TIMEVALUE_LARGE, CURLOPT_TIMEVALUE_LARGE);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  329|       |
  330|       |    /* Define a set of singleton TLVs - they can only have their value set once
  331|       |       and all follow the same pattern. */
  332|  13.6k|    FSINGLETONTLV(fuzz, TLV_TYPE_URL, CURLOPT_URL);
  ------------------
  |  |  506|  6.83k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 6.83k, False: 30.6k]
  |  |  ------------------
  |  |  507|  6.83k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  6.83k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  6.83k|        {                                                                     \
  |  |  |  |  |  |  491|  6.83k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  6.83k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  6.83k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  6.83k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  6.83k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  6.83k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  6.83k|        {                                                                     \
  |  |  |  |  |  |  481|  6.83k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  6.83k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  6.83k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  6.83k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  6.83k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  6.83k|          break
  ------------------
  333|    773|    FSINGLETONTLV(fuzz, TLV_TYPE_DOH_URL, CURLOPT_DOH_URL);
  ------------------
  |  |  506|    387|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 387, False: 37.1k]
  |  |  ------------------
  |  |  507|    387|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    387|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    387|        {                                                                     \
  |  |  |  |  |  |  491|    387|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 386]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    387|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    387|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    386|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    386|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    386|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    386|        {                                                                     \
  |  |  |  |  |  |  481|    386|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    386|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 386]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    386|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    386|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    386|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    386|          break
  ------------------
  334|     79|    FSINGLETONTLV(fuzz, TLV_TYPE_USERNAME, CURLOPT_USERNAME);
  ------------------
  |  |  506|     40|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 40, False: 37.4k]
  |  |  ------------------
  |  |  507|     40|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     40|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     40|        {                                                                     \
  |  |  |  |  |  |  491|     40|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 39]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     40|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     40|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     39|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     39|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     39|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     39|        {                                                                     \
  |  |  |  |  |  |  481|     39|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     39|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 39]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     39|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     39|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     39|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     39|          break
  ------------------
  335|     69|    FSINGLETONTLV(fuzz, TLV_TYPE_PASSWORD, CURLOPT_PASSWORD);
  ------------------
  |  |  506|     35|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 35, False: 37.4k]
  |  |  ------------------
  |  |  507|     35|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     35|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     35|        {                                                                     \
  |  |  |  |  |  |  491|     35|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     35|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     35|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     34|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     34|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     34|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     34|        {                                                                     \
  |  |  |  |  |  |  481|     34|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     34|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     34|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     34|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     34|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     34|          break
  ------------------
  336|     11|    FSINGLETONTLV(fuzz, TLV_TYPE_COOKIE, CURLOPT_COOKIE);
  ------------------
  |  |  506|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  507|      6|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      5|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|      5|          break
  ------------------
  337|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_RANGE, CURLOPT_RANGE);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  338|     53|    FSINGLETONTLV(fuzz, TLV_TYPE_CUSTOMREQUEST, CURLOPT_CUSTOMREQUEST);
  ------------------
  |  |  506|     27|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 27, False: 37.4k]
  |  |  ------------------
  |  |  507|     27|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     27|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     27|        {                                                                     \
  |  |  |  |  |  |  491|     27|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 26]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     27|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     27|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     26|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     26|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     26|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     26|        {                                                                     \
  |  |  |  |  |  |  481|     26|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     26|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 26]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     26|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     26|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     26|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     26|          break
  ------------------
  339|     87|    FSINGLETONTLV(fuzz, TLV_TYPE_MAIL_FROM, CURLOPT_MAIL_FROM);
  ------------------
  |  |  506|     44|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 44, False: 37.4k]
  |  |  ------------------
  |  |  507|     44|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     43|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     43|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|     43|          break
  ------------------
  340|     23|    FSINGLETONTLV(fuzz, TLV_TYPE_ACCEPTENCODING, CURLOPT_ACCEPT_ENCODING);
  ------------------
  |  |  506|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 12, False: 37.4k]
  |  |  ------------------
  |  |  507|     12|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     11|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     11|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|     11|          break
  ------------------
  341|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_SESSION_ID, CURLOPT_RTSP_SESSION_ID);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  342|     17|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_STREAM_URI, CURLOPT_RTSP_STREAM_URI);
  ------------------
  |  |  506|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 9, False: 37.4k]
  |  |  ------------------
  |  |  507|      9|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      8|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      8|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|      8|          break
  ------------------
  343|      5|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_TRANSPORT, CURLOPT_RTSP_TRANSPORT);
  ------------------
  |  |  506|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 3, False: 37.4k]
  |  |  ------------------
  |  |  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: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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: 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
  |  |  ------------------
  |  |  510|      2|          break
  ------------------
  344|      7|    FSINGLETONTLV(fuzz, TLV_TYPE_MAIL_AUTH, CURLOPT_MAIL_AUTH);
  ------------------
  |  |  506|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 4, False: 37.4k]
  |  |  ------------------
  |  |  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: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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: 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
  |  |  ------------------
  |  |  510|      3|          break
  ------------------
  345|    221|    FSINGLETONTLV(fuzz, TLV_TYPE_LOGIN_OPTIONS, CURLOPT_LOGIN_OPTIONS);
  ------------------
  |  |  506|    111|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 111, False: 37.3k]
  |  |  ------------------
  |  |  507|    111|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    111|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    111|        {                                                                     \
  |  |  |  |  |  |  491|    111|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 110]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    111|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    111|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    110|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    110|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    110|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    110|        {                                                                     \
  |  |  |  |  |  |  481|    110|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    110|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 110]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    110|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    110|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    110|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    110|          break
  ------------------
  346|     61|    FSINGLETONTLV(fuzz, TLV_TYPE_XOAUTH2_BEARER, CURLOPT_XOAUTH2_BEARER);
  ------------------
  |  |  506|     31|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 31, False: 37.4k]
  |  |  ------------------
  |  |  507|     31|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     30|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     30|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|     30|          break
  ------------------
  347|    291|    FSINGLETONTLV(fuzz, TLV_TYPE_USERPWD, CURLOPT_USERPWD);
  ------------------
  |  |  506|    146|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 146, False: 37.3k]
  |  |  ------------------
  |  |  507|    146|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    146|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    146|        {                                                                     \
  |  |  |  |  |  |  491|    146|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 145]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    146|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    146|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    145|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    145|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    145|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    145|        {                                                                     \
  |  |  |  |  |  |  481|    145|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    145|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 145]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    145|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    145|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    145|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    145|          break
  ------------------
  348|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_USERAGENT, CURLOPT_USERAGENT);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  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: 37.4k]
  |  |  ------------------
  |  |  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|  2.83k|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY, CURLOPT_PROXY);
  ------------------
  |  |  506|  1.41k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1.41k, False: 36.0k]
  |  |  ------------------
  |  |  507|  1.41k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.41k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.41k|        {                                                                     \
  |  |  |  |  |  |  491|  1.41k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.41k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.41k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  1.41k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  1.41k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  1.41k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.41k|        {                                                                     \
  |  |  |  |  |  |  481|  1.41k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.41k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 1.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.41k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  1.41k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.41k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  1.41k|          break
  ------------------
  351|    251|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYUSERPWD, CURLOPT_PROXYUSERPWD);
  ------------------
  |  |  506|    126|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 126, False: 37.3k]
  |  |  ------------------
  |  |  507|    126|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    126|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    126|        {                                                                     \
  |  |  |  |  |  |  491|    126|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 125]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    126|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    126|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    125|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    125|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    125|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    125|        {                                                                     \
  |  |  |  |  |  |  481|    125|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    125|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 124]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    125|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|    125|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    124|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    124|          break
  ------------------
  352|     15|    FSINGLETONTLV(fuzz, TLV_TYPE_REFERER, CURLOPT_REFERER);
  ------------------
  |  |  506|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 8, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  353|      7|    FSINGLETONTLV(fuzz, TLV_TYPE_FTPPORT, CURLOPT_FTPPORT);
  ------------------
  |  |  506|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 4, False: 37.4k]
  |  |  ------------------
  |  |  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: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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: 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
  |  |  ------------------
  |  |  510|      3|          break
  ------------------
  354|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLCERT, CURLOPT_SSLCERT);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  355|     11|    FSINGLETONTLV(fuzz, TLV_TYPE_KEYPASSWD, CURLOPT_KEYPASSWD);
  ------------------
  |  |  506|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  507|      6|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      5|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|      5|          break
  ------------------
  356|    451|    FSINGLETONTLV(fuzz, TLV_TYPE_INTERFACE, CURLOPT_INTERFACE);
  ------------------
  |  |  506|    226|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 226, False: 37.2k]
  |  |  ------------------
  |  |  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: 6, False: 219]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    225|          {                                                                   \
  |  |  |  |  |  |  484|      6|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      6|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      6|          }                                                                   \
  |  |  |  |  |  |  487|    225|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    219|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    219|          break
  ------------------
  357|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_KRBLEVEL, CURLOPT_KRBLEVEL);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 37.4k]
  |  |  ------------------
  |  |  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|    275|    FSINGLETONTLV(fuzz, TLV_TYPE_CAINFO, CURLOPT_CAINFO);
  ------------------
  |  |  506|    138|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 138, False: 37.3k]
  |  |  ------------------
  |  |  507|    138|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    138|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    138|        {                                                                     \
  |  |  |  |  |  |  491|    138|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 137]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    138|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    138|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    137|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    137|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    137|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    137|        {                                                                     \
  |  |  |  |  |  |  481|    137|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    137|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 137]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    137|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    137|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    137|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    137|          break
  ------------------
  359|  1.68k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSL_CIPHER_LIST, CURLOPT_SSL_CIPHER_LIST);
  ------------------
  |  |  506|    841|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 841, False: 36.6k]
  |  |  ------------------
  |  |  507|    841|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    841|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    841|        {                                                                     \
  |  |  |  |  |  |  491|    841|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 840]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    841|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    841|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    840|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    840|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    840|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    840|        {                                                                     \
  |  |  |  |  |  |  481|    840|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    840|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 840]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    840|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    840|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    840|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    840|          break
  ------------------
  360|     29|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLCERTTYPE, CURLOPT_SSLCERTTYPE);
  ------------------
  |  |  506|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 15, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  361|     15|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLKEY, CURLOPT_SSLKEY);
  ------------------
  |  |  506|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 8, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  362|     37|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLKEYTYPE, CURLOPT_SSLKEYTYPE);
  ------------------
  |  |  506|     19|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 19, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  363|  1.75k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLENGINE, CURLOPT_SSLENGINE);
  ------------------
  |  |  506|    878|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 878, False: 36.6k]
  |  |  ------------------
  |  |  507|    878|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    878|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    878|        {                                                                     \
  |  |  |  |  |  |  491|    878|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 877]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    878|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    878|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    877|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    877|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    877|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    877|        {                                                                     \
  |  |  |  |  |  |  481|    877|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    877|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 193, False: 684]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    877|          {                                                                   \
  |  |  |  |  |  |  484|    193|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|    193|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|    193|          }                                                                   \
  |  |  |  |  |  |  487|    877|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    684|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    684|          break
  ------------------
  364|    317|    FSINGLETONTLV(fuzz, TLV_TYPE_CAPATH, CURLOPT_CAPATH);
  ------------------
  |  |  506|    159|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 159, False: 37.3k]
  |  |  ------------------
  |  |  507|    159|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    159|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    159|        {                                                                     \
  |  |  |  |  |  |  491|    159|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 158]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    159|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    159|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    158|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    158|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    158|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    158|        {                                                                     \
  |  |  |  |  |  |  481|    158|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    158|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 158]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    158|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    158|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    158|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    158|          break
  ------------------
  365|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_FTP_ACCOUNT, CURLOPT_FTP_ACCOUNT);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  366|  2.81k|    FSINGLETONTLV(fuzz, TLV_TYPE_COOKIELIST, CURLOPT_COOKIELIST);
  ------------------
  |  |  506|  1.40k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1.40k, False: 36.0k]
  |  |  ------------------
  |  |  507|  1.40k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.40k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.40k|        {                                                                     \
  |  |  |  |  |  |  491|  1.40k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.40k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.40k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  1.40k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  1.40k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  1.40k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.40k|        {                                                                     \
  |  |  |  |  |  |  481|  1.40k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.40k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 1.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.40k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  1.40k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.40k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  1.40k|          break
  ------------------
  367|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_FTP_ALTERNATIVE_TO_USER, CURLOPT_FTP_ALTERNATIVE_TO_USER);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  368|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_PUBLIC_KEYFILE, CURLOPT_SSH_PUBLIC_KEYFILE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 37.4k]
  |  |  ------------------
  |  |  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|      4|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_PRIVATE_KEYFILE, CURLOPT_SSH_PRIVATE_KEYFILE);
  ------------------
  |  |  506|      2|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 2, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  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: 37.4k]
  |  |  ------------------
  |  |  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|     13|    FSINGLETONTLV(fuzz, TLV_TYPE_ISSUERCERT, CURLOPT_ISSUERCERT);
  ------------------
  |  |  506|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 7, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  372|     29|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYUSERNAME, CURLOPT_PROXYUSERNAME);
  ------------------
  |  |  506|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 15, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  373|     19|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYPASSWORD, CURLOPT_PROXYPASSWORD);
  ------------------
  |  |  506|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 10, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  374|    303|    FSINGLETONTLV(fuzz, TLV_TYPE_NOPROXY, CURLOPT_NOPROXY);
  ------------------
  |  |  506|    152|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 152, False: 37.3k]
  |  |  ------------------
  |  |  507|    152|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    152|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    152|        {                                                                     \
  |  |  |  |  |  |  491|    152|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 151]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    152|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    152|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    151|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    151|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    151|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    151|        {                                                                     \
  |  |  |  |  |  |  481|    151|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    151|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 151]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    151|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    151|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    151|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    151|          break
  ------------------
  375|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_KNOWNHOSTS, CURLOPT_SSH_KNOWNHOSTS);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 37.4k]
  |  |  ------------------
  |  |  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|     25|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_USERNAME, CURLOPT_TLSAUTH_USERNAME);
  ------------------
  |  |  506|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 13, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  377|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_PASSWORD, CURLOPT_TLSAUTH_PASSWORD);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  378|      7|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_TYPE, CURLOPT_TLSAUTH_TYPE);
  ------------------
  |  |  506|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 4, False: 37.4k]
  |  |  ------------------
  |  |  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: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      2|          break
  ------------------
  379|      4|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_SERVERS, CURLOPT_DNS_SERVERS);
  ------------------
  |  |  506|      2|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 2, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  380|      4|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_INTERFACE, CURLOPT_DNS_INTERFACE);
  ------------------
  |  |  506|      2|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 2, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  381|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_LOCAL_IP4, CURLOPT_DNS_LOCAL_IP4);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 37.4k]
  |  |  ------------------
  |  |  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: 37.4k]
  |  |  ------------------
  |  |  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|     39|    FSINGLETONTLV(fuzz, TLV_TYPE_PINNEDPUBLICKEY, CURLOPT_PINNEDPUBLICKEY);
  ------------------
  |  |  506|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 20, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  384|     15|    FSINGLETONTLV(fuzz, TLV_TYPE_UNIX_SOCKET_PATH, CURLOPT_UNIX_SOCKET_PATH);
  ------------------
  |  |  506|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 8, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  385|     23|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SERVICE_NAME, CURLOPT_PROXY_SERVICE_NAME);
  ------------------
  |  |  506|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 12, False: 37.4k]
  |  |  ------------------
  |  |  507|     12|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     11|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     11|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|     11|          break
  ------------------
  386|     49|    FSINGLETONTLV(fuzz, TLV_TYPE_SERVICE_NAME, CURLOPT_SERVICE_NAME);
  ------------------
  |  |  506|     25|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 25, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  387|    121|    FSINGLETONTLV(fuzz, TLV_TYPE_DEFAULT_PROTOCOL, CURLOPT_DEFAULT_PROTOCOL);
  ------------------
  |  |  506|     61|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 61, False: 37.4k]
  |  |  ------------------
  |  |  507|     61|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     60|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     60|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|     60|          break
  ------------------
  388|     11|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CAINFO, CURLOPT_PROXY_CAINFO);
  ------------------
  |  |  506|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  507|      6|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      5|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|      5|          break
  ------------------
  389|     39|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CAPATH, CURLOPT_PROXY_CAPATH);
  ------------------
  |  |  506|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 20, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  390|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_USERNAME, CURLOPT_PROXY_TLSAUTH_USERNAME);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  391|     11|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_PASSWORD, CURLOPT_PROXY_TLSAUTH_PASSWORD);
  ------------------
  |  |  506|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 6, False: 37.4k]
  |  |  ------------------
  |  |  507|      6|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      5|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|      5|          break
  ------------------
  392|      7|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_TYPE, CURLOPT_PROXY_TLSAUTH_TYPE);
  ------------------
  |  |  506|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 4, False: 37.4k]
  |  |  ------------------
  |  |  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: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      2|          break
  ------------------
  393|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLCERT, CURLOPT_PROXY_SSLCERT);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  394|     13|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLCERTTYPE, CURLOPT_PROXY_SSLCERTTYPE);
  ------------------
  |  |  506|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 7, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  395|     21|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLKEY, CURLOPT_PROXY_SSLKEY);
  ------------------
  |  |  506|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  396|     35|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLKEYTYPE, CURLOPT_PROXY_SSLKEYTYPE);
  ------------------
  |  |  506|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 18, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  397|     21|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_KEYPASSWD, CURLOPT_PROXY_KEYPASSWD);
  ------------------
  |  |  506|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  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: 37.4k]
  |  |  ------------------
  |  |  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|     35|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CRLFILE, CURLOPT_PROXY_CRLFILE);
  ------------------
  |  |  506|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 18, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  400|  1.01k|    FSINGLETONTLV(fuzz, TLV_TYPE_PRE_PROXY, CURLOPT_PRE_PROXY);
  ------------------
  |  |  506|    509|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 509, False: 36.9k]
  |  |  ------------------
  |  |  507|    509|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    509|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    509|        {                                                                     \
  |  |  |  |  |  |  491|    509|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 508]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    509|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    509|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    508|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    508|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    508|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    508|        {                                                                     \
  |  |  |  |  |  |  481|    508|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    508|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 508]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    508|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    508|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    508|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    508|          break
  ------------------
  401|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_PINNEDPUBLICKEY, CURLOPT_PROXY_PINNEDPUBLICKEY);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  402|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_ABSTRACT_UNIX_SOCKET, CURLOPT_ABSTRACT_UNIX_SOCKET);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  403|      7|    FSINGLETONTLV(fuzz, TLV_TYPE_REQUEST_TARGET, CURLOPT_REQUEST_TARGET);
  ------------------
  |  |  506|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 4, False: 37.4k]
  |  |  ------------------
  |  |  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: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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: 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
  |  |  ------------------
  |  |  510|      3|          break
  ------------------
  404|    323|    FSINGLETONTLV(fuzz, TLV_TYPE_TLS13_CIPHERS, CURLOPT_TLS13_CIPHERS);
  ------------------
  |  |  506|    162|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 162, False: 37.3k]
  |  |  ------------------
  |  |  507|    162|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    162|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    162|        {                                                                     \
  |  |  |  |  |  |  491|    162|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 161]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    162|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    162|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    161|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    161|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    161|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    161|        {                                                                     \
  |  |  |  |  |  |  481|    161|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    161|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 161]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    161|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    161|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    161|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    161|          break
  ------------------
  405|     17|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLS13_CIPHERS, CURLOPT_PROXY_TLS13_CIPHERS);
  ------------------
  |  |  506|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 9, False: 37.4k]
  |  |  ------------------
  |  |  507|      9|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      8|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      8|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|      8|          break
  ------------------
  406|     25|    FSINGLETONTLV(fuzz, TLV_TYPE_SASL_AUTHZID, CURLOPT_SASL_AUTHZID);
  ------------------
  |  |  506|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 13, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  407|     39|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_ISSUERCERT, CURLOPT_PROXY_ISSUERCERT);
  ------------------
  |  |  506|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 20, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  408|  1.20k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSL_EC_CURVES, CURLOPT_SSL_EC_CURVES);
  ------------------
  |  |  506|    604|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 604, False: 36.8k]
  |  |  ------------------
  |  |  507|    604|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    604|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    604|        {                                                                     \
  |  |  |  |  |  |  491|    604|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 603]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    604|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    604|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    603|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    603|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    603|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    603|        {                                                                     \
  |  |  |  |  |  |  481|    603|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    603|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 603]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    603|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    603|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    603|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    603|          break
  ------------------
  409|    357|    FSINGLETONTLV(fuzz, TLV_TYPE_AWS_SIGV4, CURLOPT_AWS_SIGV4);
  ------------------
  |  |  506|    179|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 179, False: 37.3k]
  |  |  ------------------
  |  |  507|    179|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    179|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    179|        {                                                                     \
  |  |  |  |  |  |  491|    179|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 178]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    179|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    179|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    178|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    178|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    178|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    178|        {                                                                     \
  |  |  |  |  |  |  481|    178|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    178|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 178]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    178|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    178|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    178|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    178|          break
  ------------------
  410|     77|    FSINGLETONTLV(fuzz, TLV_TYPE_REDIR_PROTOCOLS_STR, CURLOPT_REDIR_PROTOCOLS_STR);
  ------------------
  |  |  506|     39|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 39, False: 37.4k]
  |  |  ------------------
  |  |  507|     39|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     39|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     39|        {                                                                     \
  |  |  |  |  |  |  491|     39|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     39|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     39|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     38|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     38|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     38|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     38|        {                                                                     \
  |  |  |  |  |  |  481|     38|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     38|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 30, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     38|          {                                                                   \
  |  |  |  |  |  |  484|     30|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     30|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     30|          }                                                                   \
  |  |  |  |  |  |  487|     38|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      8|          break
  ------------------
  411|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_HAPROXY_CLIENT_IP, CURLOPT_HAPROXY_CLIENT_IP);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 37.4k]
  |  |  ------------------
  |  |  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
  ------------------
  412|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_ECH, CURLOPT_ECH);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 37.4k]
  |  |  ------------------
  |  |  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|     41|    default:
  ------------------
  |  Branch (413:5): [True: 41, False: 37.4k]
  ------------------
  414|       |      /* The fuzzer generates lots of unknown TLVs - we don't want these in the
  415|       |         corpus so we reject any unknown TLVs. */
  416|     41|      rc = 127;
  417|     41|      goto EXIT_LABEL;
  418|      0|      break;
  419|  37.4k|  }
  420|       |
  421|  36.0k|  rc = 0;
  422|       |
  423|  37.4k|EXIT_LABEL:
  424|       |
  425|  37.4k|  fuzz_free((void **)&tmp);
  426|       |
  427|  37.4k|  return rc;
  428|  36.0k|}
_Z18fuzz_tlv_to_stringP3tlv:
  434|  25.6k|{
  435|  25.6k|  char *tlvstr;
  436|       |
  437|       |  /* Allocate enough space, plus a null terminator */
  438|  25.6k|  tlvstr = (char *)malloc(tlv->length + 1);
  439|       |
  440|  25.6k|  if(tlvstr != NULL) {
  ------------------
  |  Branch (440:6): [True: 25.6k, False: 0]
  ------------------
  441|  25.6k|    memcpy(tlvstr, tlv->value, tlv->length);
  442|  25.6k|    tlvstr[tlv->length] = 0;
  443|  25.6k|  }
  444|       |
  445|  25.6k|  return tlvstr;
  446|  25.6k|}
_Z20fuzz_setup_http_postP9fuzz_dataP3tlv:
  450|     27|{
  451|     27|  if (fuzz->httppost == NULL) {
  ------------------
  |  Branch (451:7): [True: 27, False: 0]
  ------------------
  452|     27|    struct curl_httppost *post = NULL;
  453|     27|    struct curl_httppost *last = NULL;
  454|       |
  455|     27|    fuzz->post_body = fuzz_tlv_to_string(tlv);
  456|     27|    if (fuzz->post_body == NULL) {
  ------------------
  |  Branch (456:9): [True: 0, False: 27]
  ------------------
  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|     27|    curl_formadd(&post, &last,
  465|     27|                 CURLFORM_COPYNAME, FUZZ_HTTPPOST_NAME,
  ------------------
  |  |  277|     27|#define FUZZ_HTTPPOST_NAME              "test"
  ------------------
  466|     27|                 CURLFORM_PTRCONTENTS, fuzz->post_body,
  467|     27|                 CURLFORM_CONTENTLEN, (curl_off_t) strlen(fuzz->post_body),
  468|     27|                 CURLFORM_END);
  469|       |
  470|     27|    fuzz->last_post_part = last;
  471|     27|    fuzz->httppost = post;
  472|     27|  }
  473|       |
  474|     27|  return;
  475|     27|}
_Z18fuzz_add_mime_partP3tlvP13curl_mimepart:
  481|  2.56k|{
  482|  2.56k|  FUZZ_DATA part_fuzz;
  483|  2.56k|  TLV tlv;
  484|  2.56k|  int rc = 0;
  485|  2.56k|  int tlv_rc;
  486|       |
  487|  2.56k|  memset(&part_fuzz, 0, sizeof(FUZZ_DATA));
  488|       |
  489|  2.56k|  if(src_tlv->length < sizeof(TLV_RAW)) {
  ------------------
  |  Branch (489:6): [True: 1.66k, False: 908]
  ------------------
  490|       |    /* Not enough data for a single TLV - don't continue */
  491|  1.66k|    goto EXIT_LABEL;
  492|  1.66k|  }
  493|       |
  494|       |  /* Set up the state parser */
  495|    908|  part_fuzz.state.data = src_tlv->value;
  496|    908|  part_fuzz.state.data_len = src_tlv->length;
  497|       |
  498|    908|  for(tlv_rc = fuzz_get_first_tlv(&part_fuzz, &tlv);
  499|  1.63k|      tlv_rc == 0;
  ------------------
  |  Branch (499:7): [True: 935, False: 704]
  ------------------
  500|    935|      tlv_rc = fuzz_get_next_tlv(&part_fuzz, &tlv)) {
  501|       |
  502|       |    /* Have the TLV in hand. Parse the TLV. */
  503|    935|    rc = fuzz_parse_mime_tlv(part, &tlv);
  504|       |
  505|    935|    if(rc != 0) {
  ------------------
  |  Branch (505:8): [True: 204, False: 731]
  ------------------
  506|       |      /* Failed to parse the TLV. Can't continue. */
  507|    204|      goto EXIT_LABEL;
  508|    204|    }
  509|    935|  }
  510|       |
  511|    704|  if(tlv_rc != TLV_RC_NO_MORE_TLVS) {
  ------------------
  |  |  267|    704|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
  |  Branch (511:6): [True: 403, False: 301]
  ------------------
  512|       |    /* A TLV call failed. Can't continue. */
  513|    403|    goto EXIT_LABEL;
  514|    403|  }
  515|       |
  516|  2.56k|EXIT_LABEL:
  517|       |
  518|  2.56k|  return(rc);
  519|    704|}
_Z19fuzz_parse_mime_tlvP13curl_mimepartP3tlv:
  525|    935|{
  526|    935|  int rc;
  527|    935|  char *tmp;
  528|       |
  529|    935|  switch(tlv->type) {
  530|    257|    case TLV_TYPE_MIME_PART_NAME:
  ------------------
  |  |   42|    257|#define TLV_TYPE_MIME_PART_NAME                 14
  ------------------
  |  Branch (530:5): [True: 257, False: 678]
  ------------------
  531|    257|      tmp = fuzz_tlv_to_string(tlv);
  532|    257|      curl_mime_name(part, tmp);
  533|    257|      fuzz_free((void **)&tmp);
  534|    257|      break;
  535|       |
  536|    474|    case TLV_TYPE_MIME_PART_DATA:
  ------------------
  |  |   43|    474|#define TLV_TYPE_MIME_PART_DATA                 15
  ------------------
  |  Branch (536:5): [True: 474, False: 461]
  ------------------
  537|    474|      curl_mime_data(part, (const char *)tlv->value, tlv->length);
  538|    474|      break;
  539|       |
  540|    204|    default:
  ------------------
  |  Branch (540:5): [True: 204, False: 731]
  ------------------
  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|    935|  }
  547|       |
  548|    731|  rc = 0;
  549|       |
  550|    935|EXIT_LABEL:
  551|       |
  552|    935|  return rc;
  553|    731|}

